Bug 119616 - BASIC macro runtime error on GetByIndex of TextGraphicObjects
Summary: BASIC macro runtime error on GetByIndex of TextGraphicObjects
Status: RESOLVED DUPLICATE of bug 119609
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: BASIC (show other bugs)
Version:
(earliest affected)
6.1.0.3 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-08-31 07:39 UTC by Konstantin Lavrov
Modified: 2018-08-31 09:35 UTC (History)
0 users

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Konstantin Lavrov 2018-08-31 07:39:19 UTC
Description:
This code is running on versions before 6.1 but after upgrade to LO 6.1 message is shown "Getting from this property is not unspported"

Steps to Reproduce:
1. Run this macro from Writer document with Graphics

Sub GetFirstPictureName()
  Dim oGraphics As Object
  Dim oGraph As Object
  Dim sGraphURL As String
  
	If not HasUnoInterfaces(ThisComponent,"com.sun.star.text.XTextGraphicObjectsSupplier") Then Exit Sub
	oGraphics = ThisComponent.getGraphicObjects()
	If oGraphics.getCount = 0 Then Exit Sub
	oGraph = oGraphics.getByIndex(0)
	sGraphURL = oGraph.GraphicURL
	GetFirstPictureName= FileNameoutofPath(sGraphURL, "/")
		
End Sub


2.
3.

Actual Results:
Runtime Error Message
"Getting from this property is not unspported"

Expected Results:
This code is working without errors if version 6.0.6 or less


Reproducible: Always


User Profile Reset: No



Additional Info:
Версия: 6.1.1.1 (x64)
ID сборки: 2718b4a18dfcc6a54ebe5f7b801ee7a47fa81e0c
Потоков ЦП: 4; ОС:Windows 10.0; Отрисовка ИП: по умолчанию; 
Локаль: ru-RU (en_US); Calc: group threaded
Comment 1 Julien Nabet 2018-08-31 09:35:10 UTC

*** This bug has been marked as a duplicate of bug 119609 ***