the simple macro below that used to work in LibO 4.2.5 and earlier releases doesn't work anymore in LibO 4.3.0.1 and 4.3.0.2 under Win7x64 and WinXP, unless it is modified as it follows. --------------------------------- original 4.2.x macro code --------------------------------- Sub RemoveTextHighlighting dim document as object dim dispatcher as object document = ThisComponent.CurrentController.Frame dispatcher = createUnoService("com.sun.star.frame.DispatchHelper") dispatcher.executeDispatch(document, ".uno:BackColor", "", 0, Array()) End Sub --------------------------------- modified 4.3.x macro code --------------------------------- Sub RemoveTextHighlighting Dim document as object Dim dispatcher as object document = ThisComponent.CurrentController.Frame dispatcher = createUnoService("com.sun.star.frame.DispatchHelper") REM We need to define the args for the dispatcher. without this the backcolor will not change. Dim args1(0) as new com.sun.star.beans.PropertyValue args1(0).name = "BackColor" args1(0).value = -1 dispatcher.executeDispatch(document, ".uno:BackColor", "", 0,args1()) End Sub --------------------------------- to test the macro just highlight some text on a Writer document then select it and run the macro. it should remove the highlight. I set status as NEW because of independent confirmation here: https://bugs.freedesktop.org/show_bug.cgi?id=81187#c6 has the BASIC interpreter changed in 4.3.x ? why the same code that works in 4.2.x doesn't works in 4.3.x ?
I see from 4.3 release wiki page and find this commit: http://cgit.freedesktop.org/libreoffice/core/commit/?id=8c6342c25896e515869500f538370de336b123c7 This commit is about dispatcher change, may be related to this issue. (and maybe I am wrong...)
thanks Kevin. I add Matus to CC list and ask him if he confirms your suspicion. I'll later test all my macros to see if there's other broken compatibility between 4.2.x and 4.3.x
I don't see why that commit would be responsible. Might be worth to bibisect.
That's my fault, sorry.
Maxim Monastirsky committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=cdfd24fe2a45ab41c84f813eb0d6a52a9d731a79 fdo#81231 Make this macro work again The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
The commit notification didn't work for some reason, so here is the commit for the 4-3 branch: http://cgit.freedesktop.org/libreoffice/core/commit/?h=libreoffice-4-3&id=3a4e6c4673a4e4dde774d1f6267256d8d8c48e59