Bug 119616

Summary: BASIC macro runtime error on GetByIndex of TextGraphicObjects
Product: LibreOffice Reporter: Konstantin Lavrov <i_o5>
Component: BASICAssignee: Not Assigned <libreoffice-bugs>
Status: RESOLVED DUPLICATE    
Severity: normal    
Priority: medium    
Version: 6.1.0.3 release   
Hardware: All   
OS: All   
Whiteboard:
Crash report or crash signature: Regression By:

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 ***