Apache OpenOffice (AOO) Bugzilla – Issue 111471
calc, record macro, cells with function written manually not recorded
Last modified: 2013-07-29 09:14:33 UTC
In calc, when record macro, cells with function written manually not recorded. Tested with OOo 3.1.1 french, 3.2 french and US, on windows 2000 french, windows XP french, and windows 7 64 bits french. Steps to reproduce : 0. Open OOo calc. 1. Run the macro recorder. Select menu « Tools » → « Macros » → « Record Macro ». 2. In cell $B$1, write : =ACOS(0.5), press keyboard « Enter ». It results 1.05. 3. In cell $C$1, select menu « Insert » → « Function… » ; in « Functions », select ACOS ; in « number » , write 0.5 ; click « OK ». It results 1.05. 4. Stop the macro recorder. In the window « Macro record » (an ugly small window), click « Stop Recording », window « OpenOffice.org Basic Macros » appears. 5. Save the macro. In window « OpenOffice.org Basic Macros » ; select « OpenOffice.org Macros » → « Untitled 1 » ; Click « Save ». Window « New Module » appears with name « Module1 » ; click « OK ». 6. Delete all values in the sheet. With keyboard, Ctrl+a, Del ; window « Select Contents » appears ; click « Delete all » ; click « OK ». 7. Click anywhere in the sheet. 8. Run the macro. Select menu « Tools » → « Macros » → « Organize Macros » → « OpenOffice.org Basic… » ; window « OpenOffice.org Basic Macros » appears ; select « Untitled 1 » → « Standard » → « Module1 » ; in right-pane, name « Main » appears ; click « Run ». Actual results : In cell $C$1, value 1.05 appears. No value in cell $B$1. Expected results : In cell $C$1, value 1.05 appears. In cell $B$1, value 1.05 appears. Note : Display the source of the macro. Select menu « Tools » → « Macros » → « Organize Macros » → « OpenOffice.org Basic… » ; window « OpenOffice.org Basic Macros » appears ; select « Untitled 1 » → « Standard » → « Module1 » ; in right-pane, name « Main » appears ; click « Edit ». In the source, there is no action recorded in cell $B$1. sub Main 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 = "$B$1" dispatcher.executeDispatch(document, ".uno:GoToCell", "", 0, args1()) rem ---------------------------------------------------------------------- dispatcher.executeDispatch(document, ".uno:JumpToNextCell", "", 0, Array()) rem ---------------------------------------------------------------------- dim args3(0) as new com.sun.star.beans.PropertyValue args3(0).Name = "ToPoint" args3(0).Value = "$C$1" dispatcher.executeDispatch(document, ".uno:GoToCell", "", 0, args3()) rem ---------------------------------------------------------------------- dim args4(0) as new com.sun.star.beans.PropertyValue args4(0).Name = "StringName" args4(0).Value = "=ACOS(0,5)" dispatcher.executeDispatch(document, ".uno:EnterString", "", 0, args4()) end sub
Oops, in the description of the issue, some little writing errors : - in steps to reproduce, in step 2, replace words « cell $B1$1 » by « cell B1 », in step 3, replace words « cell $C1$1 » by « cell C1 ». - in actual results, replace words « cell $C1$1 » by « cell C1 », replace words « cell $B1$1 » by « cell B1 ». - in expected results, replace words « cell $C1$1 » by « cell C1 », replace words « cell $B1$1 » by « cell B1 ». Sorry.
Confirmed with Rev. 1505643 Win 7