Bug 73123

Summary: Macro recorder does not record selecting a column
Product: LibreOffice Reporter: jean.sanchez.fr
Component: BASICAssignee: Not Assigned <libreoffice-bugs>
Status: NEW --- QA Contact:
Severity: normal    
Priority: medium CC: barta, jean.sanchez.fr, lo_bugs, serval2412
Version: Inherited From OOo   
Hardware: Other   
OS: All   
Whiteboard: BSA
i915 platform: i915 features:
Attachments: a spreadsheet with data that behaves like explained. The macro is to be recorded manually.

Description jean.sanchez.fr 2013-12-29 14:11:10 UTC
Created attachment 91291 [details]
a spreadsheet with data that behaves like explained. The macro is to be recorded manually.

Problem description: 
I recorded a macro which deleted G column.
While applying it again it deletes always the A column instead the column that should have been recorded.


Steps to reproduce:
1. create some columns filled with anything, starting from A, or use the attached file (about one stock values, easy to read).
2. Record a macro which deletes (not the values, the whole column) G column
3. open back the initial file
4. apply the recorded macro

Current behavior:
it deletes always the column A

Expected behavior:
it should delete the G column that was recorded in the macro.
Operating System: Mac OS X
Version: 4.1.4.2 release
Comment 1 Julien Nabet 2013-12-29 15:16:46 UTC
I gave a try with master sources updated today.
In tests I did, it deleted the column where the cursor was.
Comment 2 Terrence Enger 2013-12-29 16:45:10 UTC
Julien beat me to it, but here is the comment I had prepared.

Starting from scratch, I recorded a macro while I selected column C
(by mouse click on the column heading) and deleted the column from the
pop-up menu.  The recorded macro did not capture the selection
operation.  Thus, in playback, the macro deletes each column that has
a selected cell.

For comparison:
(*) a macro recorded in Writer does copture selection done by
    <shift>+<right-arrow>.
(*) a macro recorded in Calc does capture selection by mouse-click on
   a cell and following <shift>+<right-arrow> <shift>+<down-arrow>.

My observations are in a debug build of master commit 480c7c2, fetched
2013-12-27 02:33 UTC.  So I am setting platform = All.
Comment 3 Terrence Enger 2013-12-29 16:46:10 UTC
This time fer shur, Rocky.
Comment 4 tommy27 2014-11-02 08:45:16 UTC
still reproducible with LibO 4.3.2.2 under Win7x64

(In reply to Terrence Enger from comment #2)
> ... The recorded macro did not capture the selection
> operation.  Thus, in playback, the macro deletes each column that has
> a selected cell.
> 
> ....

yes, this is exactly what happens.
this is the recorded code which is the same as in OOo 3.3.0

sub test
rem ----------------------------------------------------------------------
rem define variables
dim document   as object
dim dispatcher as object
rem ----------------------------------------------------------------------
rem get access to the document
document   = ThisComponent.CurrentController.Frame
dispatcher = createUnoService("com.sun.star.frame.DispatchHelper")
rem ----------------------------------------------------------------------
dispatcher.executeDispatch(document, ".uno:DeleteColumns", "", 0, Array())
end sub

so we are dealing with one of the limitation of the macro recorder which is inherited from OOo.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.