1

Recently upgraded from Debian Wheezy to Jessie (yeah, I know...). During said upgrade, the LibreOffice suite got upgraded from version 3.5.4 to 4.3.3.

Well, lots of my Writer macros were broken after said upgrade.

Is anyone aware of any issues that could have caused this as a result of said upgrade?

1 Answer 1

1

Apparently, at some time after version 3.5.4, LibreOffice changed the protocol by which they title various styles (FYI, in the example shown below, it is a paragraph style that is referenced).

A snippet of code from a Writer macro which was broken by the subject upgrade (FYI, I use the Record method to create most of my macros):

rem ----------------------------------------------------------------------
dim args13(1) as new com.sun.star.beans.PropertyValue
args13(0).Name = "Template"
args13(0).Value = "First line indent"
args13(1).Name = "Family"
args13(1).Value = 2

dispatcher.executeDispatch(document, ".uno:StyleApply", "", 0, args13())

rem ----------------------------------------------------------------------

Note the format of the named style, "First line indent". I discovered that, if I merely capitalized said style name (replacing First line indent with First Line Indent), this fixed my macro:

rem ----------------------------------------------------------------------
dim args13(1) as new com.sun.star.beans.PropertyValue
args13(0).Name = "Template"
args13(0).Value = "First Line Indent"
args13(1).Name = "Family"
args13(1).Value = 2

dispatcher.executeDispatch(document, ".uno:StyleApply", "", 0, args13())

rem ----------------------------------------------------------------------

And, like substitutions for other so broken macros fixed them, too!

End of problem.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .