Run this macro from Writer and it will generate an error message. Sub mistake 'Cannot read property of ParaBackGraphicURL dim oVCur, a oVCur=thisComponent.currentcontroller.getViewCursor() 'view cursor a=oVCur.getPropertyValue("ParaBackGraphicURL") 'for other proprerties it is OK End Sub Generated error: BASIC runtime error. An exception occurred Type: com.sun.star.uno.RuntimeException Message: Getting from this property is not unsupported. Version: 6.1.0.3 (x64) Build ID: efb621ed25068d70781dc026f7e9c5187a4decd1 CPU threads: 2; OS: Windows 6.1; UI render: default; Locale: cs-CZ (cs_CZ); Calc: CL
confirming, calc property "BackGraphicURL" is affected too. Version: 6.2.0.0.alpha0+ (x64) Build ID: 7cb6dc2652ce7e2e7d9ec7464bb1eed0d93306d7 CPU threads: 4; OS: Windows 10.0; UI render: default; Locale: de-DE (de_DE); Calc: threaded i think, root cause is the changed handling of image urls, for example https://bugs.documentfoundation.org/show_bug.cgi?id=119519
Perhaps just to find difference in code more easily, could you give some examples of properties which work?
FooterBackGraphicURL/HeaderBackGraphicURL are affected too OPTION EXPLICIT Sub TesPageStyleProps() On Local Error Goto ErrorHandler Dim oDoc as Object Dim osheet as Object Dim oPStyles as Object Dim oPStyle as Object Dim aProps as Object Dim vTmp Dim sProp as String Dim i as Integer oDoc = ThisComponent oSheet = oDoc.getSheets().getByIndex(0) oPStyles = oDoc.StyleFamilies.getByName("PageStyles") oPStyle = oPStyles.getByName(oSheet.PageStyle) aProps = oPStyle.PropertySetInfo.Properties For i = LBound(aProps) to UBound(aProps) sProp = aProps(i).Name vTmp = oPStyle.getPropertyValue(sProp) Next i Exit Sub ErrorHandler: MsgBox sProp Resume Next End Sub
Macro with example for some working properties: Sub mistake2 'example with some working properties dim oVCur, a oVCur=thisComponent.currentcontroller.getViewCursor() 'view cursor a=oVCur.getPropertyValue("CharFontFamily") 'it works a=oVCur.getPropertyValue("CharColor") 'it works a=oVCur.getPropertyValue("CharWeight") 'it works a=oVCur.getPropertyValue("ParaVertAlignment") 'it works a=oVCur.getPropertyValue("ReferenceMark") 'it works a=oVCur.getPropertyValue("ParaTopMargin") 'it works a=oVCur.getPropertyValue("TextParagraph") 'it works a=oVCur.getPropertyValue("ParaBackGraphicURL") 'for other proprerties it is OK End Sub And testing macro for Writer: For "Standard" page styles is also affected FooterBackGraphicURL, for others BackGraphicURL. OPTION EXPLICIT Sub TesPageStylePropsForWriter() 'test for Writer On Local Error Goto ErrorHandler Dim oDoc as Object, osheet as Object, oPStyles as Object, oPStyle as Object, aProps as Object, vTmp, sProp as String, i as Integer, j as Integer, elems oDoc = ThisComponent oPStyles = oDoc.StyleFamilies.getByName("PageStyles") elems=oPStyles.ElementNames() For j=lbound(elems) to ubound(elems) oPStyle = oPStyles.getByName(elems(j)) aProps = oPStyle.PropertySetInfo.Properties For i = LBound(aProps) to UBound(aProps) sProp = aProps(i).Name vTmp = oPStyle.getPropertyValue(sProp) Next i Next j Exit Sub ErrorHandler: MsgBox elems(j) & ":" & chr(10) & sProp Resume Next End Sub
Created attachment 144564 [details] bt with debug symbols On pc Debian x86-64 with master sources updated today, I could reproduce this. Here's a bt from throw statement.
I'm afraid that it's the expected behavior since 6.1, please see: https://opengrok.libreoffice.org/xref/core/offapi/com/sun/star/style/ParagraphProperties.idl#64 https://cgit.freedesktop.org/libreoffice/core/commit/?id=7a8ed362eb163ac15a000ba1cfc74b58315800a1 https://tomazvajngerl.blogspot.com/2018/03/improving-image-handling-in-libreoffice.html
Tomaz: noticing the throw statement put in 7a8ed362eb163ac15a000ba1cfc74b58315800a1, thought you might be interested in this one.
Oups, I forced my comment whereas Maxim had already responded. Sorry!
*** Bug 119616 has been marked as a duplicate of this bug. ***
(In reply to Maxim Monastirsky from comment #6) > I'm afraid that it's the expected behavior since 6.1, please see: Closing as RESOLVED WONTFIX