https://bugs.freedesktop.org/show_bug.cgi?id=81231

          Priority: medium
            Bug ID: 81231
          Assignee: [email protected]
           Summary: macro not working in 4.3.x
          Severity: normal
    Classification: Unclassified
                OS: Windows (All)
          Reporter: [email protected]
          Hardware: Other
            Status: UNCONFIRMED
           Version: 4.3.0.1 rc
         Component: BASIC
           Product: LibreOffice

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 ?

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Libreoffice-bugs mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs

Reply via email to