https://bugs.documentfoundation.org/show_bug.cgi?id=138525
Bug ID: 138525
Summary: CALC - Recording Cut Paste Cell Macro creates code
written in wrong order causing it to fail
Product: LibreOffice
Version: 6.4.7.2 release
Hardware: All
OS: Windows (All)
Status: UNCONFIRMED
Severity: normal
Priority: medium
Component: BASIC
Assignee: [email protected]
Reporter: [email protected]
Hi
Macro recorded a simple cut and paste cell from one location to another. When
run it didn't work.
This was code created by the Macro recorder:
sub movetank
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 ----------------------------------------------------------------------
dim args1(0) as new com.sun.star.beans.PropertyValue
args1(0).Name = "ToPoint"
args1(0).Value = "$C$8"
dispatcher.executeDispatch(document, ".uno:GoToCell", "", 0, args1())
rem ----------------------------------------------------------------------
dispatcher.executeDispatch(document, ".uno:Cut", "", 0, Array())
rem ----------------------------------------------------------------------
dispatcher.executeDispatch(document, ".uno:Paste", "", 0, Array())
rem ----------------------------------------------------------------------
dim args4(0) as new com.sun.star.beans.PropertyValue
args4(0).Name = "ToPoint"
args4(0).Value = "$I$10"
dispatcher.executeDispatch(document, ".uno:GoToCell", "", 0, args4())
----------------------------------------------------------------------
----------------------------------------------------------------------
Note that the uno.Paste line is simply pasting the value back into it's origin.
It should be the last line of code.
Summary: Macro recorder issue in cell cut/paste. Recorder software inserting
Paste code before initiating the target cell address.
--
You are receiving this mail because:
You are the assignee for the bug._______________________________________________
Libreoffice-bugs mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs