Description: If I run a macro via a button, I have to press it 2 or more times to get all the macro done. If you do it via the macro editor, it works flawlessly. I have attached a .ods with an example. It deletes the cell value on some columns and then pastes the value from the "master" colum. The first time you press the button, it just deletes everything. The second or third time, it normally finishes the work. Steps to Reproduce: 1. Open the attachment 2. Push the button. Everything will be deleted as it should. 3. Push the button another time (or more). It pastes the numbers as it should 4. Repeat it via the macro editor. It works from the firs time. Actual Results: After pushing the button once, it deletes the values in the columns with a pink cell above. After the second or third time, you see that it pastes the value from the "DA" column. Expected Results: After pushing the button 1, it should have deleted the values and restore them. Running the macro via the macro editor works just fine. Reproducible: Always User Profile Reset: Yes OpenGL enabled: Yes Additional Info: It may be related to this bug: https://bugs.documentfoundation.org/show_bug.cgi?id=70883 The first line of the macro is the "workaround" suggested in this bug report. Also, if you clic on a random cell after pushing the button you may have the expected result from the first time. Versión: 6.4.1.2 (x64) Id. de compilación: 4d224e95b98b138af42a64d84056446d09082932 Subprocs. CPU: 8; SO: Windows 10.0 Build 18363; Repres. IU: GL; VCL: win; Configuración regional: es-ES (es_ES); Idioma de IU: es-ES Calc: CL
Created attachment 158659 [details] just a way to quickly check the bug
If I add the workaround suggested in the mentioned bug (add the following line to the beginning of the macro: ThisComponent.CurrentController.Frame.ContainerWindow.setFocus) after every other line of code, it works.
Hello, Did it work in the pass ?
Hi, for sure it did not work with version 6.3.4 nor 6.2. And I´m pretty sure that neither with an earlier version, but I was a noob so I thought it was my fault.
[Automated Action] NeedInfo-To-Unconfirmed
Works fine for me. A single click both deletes and pastes. Maybe try with 6.4.3 and maybe deactivate opengl Tools - Options - LibreOffice - View - Use OpenGL for all rendering Version: 6.4.3.2 (x64) Build ID: 747b5d0ebf89f41c860ec2a39efd7cb15b54f2d8 CPU threads: 4; OS: Windows 10.0 Build 18362; UI render: default; VCL: win; Locale: fi-FI (fi_FI); UI-Language: en-US Calc: threaded
I believe it is this same bug: Bug 70883 - "uno: copy" via the dispatcher does not work when a button has focus The work I "solved" it is by pasting after every copy or paste line in a macro: ThisComponent.CurrentController.Frame.ContainerWindow.setFocus And never had the problem again. The bug is still there though...
Ok, good catch. Let's close as duplicate *** This bug has been marked as a duplicate of bug 70883 ***
So it is never fixed :D