Apache OpenOffice (AOO) Bugzilla – Issue 128582
Keyboard mappings to macros became unavailable when AOO is started from C++
Last modified: 2024-02-07 12:01:36 UTC
Hi, This issue is observed on Linux in 4.1.15 and 4.5.0. It is not observed in 4.1.7. A C++ application starts AOO using bootstrap() and text documents are created from *.ott templates containing basic macros. Some macros have bindings to keyboard combinations, all defined in the UI. In 4.1.7, the keyboard bindings work as expected in unsaved new documents. In 4.1.15 and 4.5.0, the macros are not called by the keyboard shortcuts when a new file is generated from a template. Executing the macros directly using the UI dialogs succeeds. The bindings will work in 2 circumstances: - the newly generated document is saved and reloaded via the File menu, - the newly generated document is saved, closed and opened again. If AOO is started from bash, without being started by the controlling application, the bindings just work. I am reporting in the bug tracker because I could not find another official place to discuss this unexpected behaviour. Thank you for any input, help and eventual resolution. Regards.
(In reply to SET from comment #0) > I am reporting in the bug tracker because I could not find another official > place to discuss this unexpected behaviour. Hi, You can always subscribe to our developer mailing list: https://openoffice.apache.org/mailing-lists.html#development-mailing-list-public
> You can always subscribe to our developer mailing list: > I subscribed and posted the the dev mailing list. Thank you for your reply.
You're welcome! One thing comes to my mind: The gap between 4.1.7 and 4.1.15 is quite big. Can you try with 4.1.14?
(In reply to Matthias Seidel from comment #3) > You're welcome! > > One thing comes to my mind: > The gap between 4.1.7 and 4.1.15 is quite big. Can you try with 4.1.14? The keyboard shortcuts are operational with 4.1.11, but not with 4.1.12.
If the regression happened between 4.1.11 and 4.1.12, then the list of possible commits that caused the regression is in: git log --name-status AOO411..AOO412 There's 71 of them, not sure what to look for. If possible, please attach a minimal sample of this C++ code that reproduces the issue?
It is 4.1.11 to 4.1.12: https://github.com/apache/openoffice/compare/AOO4111-GA...AOO4112-GA
Created attachment 87206 [details] Simplest test case Please find a test app to test different AOO versions. Using: - gcc (GCC) 13.2.1 20230801 - clang version 16.0.6 - cmake version 3.28.1 on Arch Linux. Thank you for your time.
Hello, 4.1.12 had some commits that changed the logic of allowing macro execution: 417e12810c61e06dae9a3df49a2e1860863ccceb 57221d74ec27db61efcf416a9f0e37ad824b5ccc b42dd17c7ad2f25b3e10e8cdee9dd5292510f975 <-- check this in particular SET, your C++ code does not seem to load any OTT templates, and the ZIP file does not include any. I suspect that the culprit could be the above commit pointed with the arrow <-- because it stops macro execution on files that contain _no macros_. Is this your case? (this check should be later repeated when macros are added).
Hi, After reverting fb9ad7aa175, basic macros are callable by keyboard shortcuts when AOO 4.5.0 is started with ::cppu::bootstrap(). I made a diff bdb20b2a64..60e0a1c111 where I suspected fb9ad7aa175. bdb20b2a64 is the commit displayed in the 'About' dialog of 4.1.11 from your website, and 60e0a1c111 got 4.1.12. To recapitulate the many situation: A. Any version started with the 'soffice' script on Arch Linux No unexpected behaviour when macros are called by keyboard shortcuts in all situations. B. 4.1.11 started by ::cppu::bootstrap() No unexpected behaviour in all situations. C. 4.1.12 to 4.5.0 started by ::cppu::bootstrap() with fb9ad7aa175 applied Macros are not callable by keyboard shortcuts on a new unsaved text document; they are callable by keyboard shortcuts after loading a saved document from storage. D. 4.5.0 started by ::cppu::bootstrap() with fb9ad7aa175 *reverted* No unexpected behaviour when macros are called by keyboard shortcuts in all situations. Please consider for a fix. Thank you.
(In reply to Arrigo Marchiori from comment #8) > Hello, I just saw your reply, completely missed it, sorry. I just posted #9.
(In reply to Arrigo Marchiori from comment #8) > Hello, > > SET, your C++ code does not seem to load any OTT templates, and the ZIP file > does not include any. I indeed mentioned templates in the OP because it's my workflow. In fact the problem occurs without templates also, please see comment #9.
Hello, the commit list I was referring to for 4.1.12 shall be changed as follows for trunk (4.5.0): aea5254635d14376dd83e528769fd1dec8f7dbd7 fb9ad7aa17549019ccdd2762a97d104449abf45d <-- you reverted this 4018d3b8a14b17c2bbe7eaec1ac3a460adc072cb <-- please check this We cannot just revert fb9ad7aa175, unfortunately.
> 4018d3b8a14b17c2bbe7eaec1ac3a460adc072cb <-- please check this Should I understand - apply fb9ad7aa17549019ccdd2762a97d104449abf45d - revert 4018d3b8a14b17c2bbe7eaec1ac3a460adc072cb - or update 4018d3b8a14b17c2bbe7eaec1ac3a460adc072cb ? Updating 4018d3b8a14b17c2bbe7eaec1ac3a460adc072cb is not really within my reach. Thank you for having considered.
Reverting 4018d3b8a14b17c2bbe7eaec1ac3a460adc072cb does not change anything. The macros are not callable by keyboard shortcuts. Please note that the macros are callable throughout via custom menu items and custom toolbar buttons. I suppose 4018d3b8a14b17c2bbe7eaec1ac3a460adc072cb must be left applied and updated. That's complicated for me.