API-CHANGE - dropping string properties which use vnd.sun.star.GraphicObject URL
Pusteblumi
benbignoise at gmx.de
Thu Aug 30 16:39:18 UTC 2018
Hi Tomaž,
sorry if that is a stupid question, but...
as Thorsten wrote, many macros make use of GraphicURL for inserting
graphics.
Is there any documentation what we need to change to make those macros work
again?
I'm no developer but just an ordinary user who has no clue what do do now...
;-)
To be more precise, I have the following code to insert a SVG file into a
Writer document:
' --------------------------------------------------------
Function ImportBitmapIntoWriter(sFile As String) As Object
Dim oBitmaps As Object
Dim sNewUrl As String
Dim oDoc As Object
oDoc = ThisComponent
oBitmaps = oDoc.createInstance("com.sun.star.drawing.BitmapTable")
' If there is an older entry with that name, remove it:
If oBitmaps.hasByName( "OOoLilyPond" ) Then
oBitmaps.removeByName( "OOoLilyPond" )
End If
' Load the image into the internal bitmap table:
oBitmaps.insertByName( "OOoLilyPond", ConvertToURL(sFile) )
' Up to here, everything works fine.
sNewURL = oBitmaps.getByName( "OOoLilyPond" )
' This line causes the error "Incorrect property value".
' Thus the following lines are not executed.
oTextGraphic = oDoc.createInstance("com.sun.star.text.GraphicObject")
oTextGraphic.GraphicURL = sNewURL
' do some more stuff...
End Function
' --------------------------------------------------------
The whole function can be found here (starting with line 235):
https://github.com/openlilylib/LO-ly/blob/master/extension/OOoLilyPond/Tools.xba
It's about the "OOoLilyPond" extension:
https://extensions.libreoffice.org/extensions/ooolilypond
https://github.com/openlilylib/LO-ly
(The thing is, I don't understand every step myself. The original developer
of the project has retired and I'm continuing his work...)
Best wishes and thanks for any help,
Klaus
--
Sent from: http://document-foundation-mail-archive.969070.n3.nabble.com/Dev-f1639786.html
More information about the LibreOffice
mailing list