https://bugs.documentfoundation.org/show_bug.cgi?id=145622

            Bug ID: 145622
           Summary: Recording a Macro in Calc, not generating the proper
                    code
           Product: LibreOffice
           Version: 7.1.6.2 release
          Hardware: All
                OS: Windows (All)
            Status: UNCONFIRMED
          Severity: normal
          Priority: medium
         Component: BASIC
          Assignee: [email protected]
          Reporter: [email protected]

Description:
I have created a macro to sort columns of numbers or letters many times with no
issues. Now when I create the same macro and assign it to a button, it does not
work. When I look at the code for the macro I notice it is missing a large
number of args() lines.
Example of missings lines:  args3(0).Name="Byrows" args3(0).value=true ETC..
Completely mystified.  

Steps to Reproduce:
In Calc create a short list of Letters and Numbers in columns. Maybe 6 rows.
Now RECORD a Macro to sort the LETTERS in ASCENDING order. And RECORD a macro
to sort the NUMBERS in DECSENDING order. Create 2 buttons and assign the macros
to the proper buttons. Once done, click the buttons and the letters or numbers
should be sorted in proper order, basedon the assigned macro.

Actual Results:
THE MACROS DO NOT SORT THE ROWS.

Expected Results:
SORTED THE ROWS


Reproducible: Always


User Profile Reset: Yes



Additional Info:
Version: 7.1.6.2

IF YOU EDIT THE MACRO, YOU WILL SEE THE LINES ARGx(0).Name="Byrows" etc.. are
missing. Also notice below the REM in front of the DISPATCHER line. ???? below

rem ----------------------------------------------------------------------
dim args2(0) as new com.sun.star.beans.PropertyValue
args2(0).Name = "ToPoint"
args2(0).Value = "$A$4:$B$9"

dispatcher.executeDispatch(document, ".uno:GoToCell", "", 0, args2())

rem ----------------------------------------------------------------------
rem dispatcher.executeDispatch(document, ".uno:DataSort", "", 0, Array())

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to