Description: I can successfully remove/reset commands that are present in menu pulldowns using 'disable commands' wiki documentation: https://wiki.documentfoundation.org/Documentation/DevGuide/Writing_UNO_Components#Disable_Commands I noticed that this does not remove counterpart commands from xxxToolbars such as ‘Tabbed Compact’ and the like. Steps to Reproduce: 1. Copy the indicated wiki code inside any document 2. Run Main 3. Observe xxxToolbars are unaffected Actual Results: Menu pulldowns commands are removed or reset Expected Results: Equivalent xxxToolbars commands should be disabled/enabled in parallel Reproducible: Always User Profile Reset: No Additional Info: Versions past 7.2.5 exhibit a misbehaviour that's reported in bug#157915
Thanks Alain. I tried to bibisect bug 157915 and shared my results there, hopefully that gets things moving along. However, the issue I noticed started in 7.4. When you say "versions past 7.2.5 exhibit a misbehaviour", do you mean that you can reproduce the bug in e.g. 7.2.6? And 7.3.0? I assume it's not possible to test the issue you describe here in a recent master build, then, correct? But we can safely assume that the behaviour hasn't changed since 7.2 in that regard.
(In reply to Stéphane Guillou (stragu) from comment #1) > Thanks Alain. I tried to bibisect bug 157915 and shared my results there, > hopefully that gets things moving along. However, the issue I noticed > started in 7.4. > When you say "versions past 7.2.5 exhibit a misbehaviour", do you mean that > you can reproduce the bug in e.g. 7.2.6? And 7.3.0? > > I assume it's not possible to test the issue you describe here in a recent > master build, then, correct? But we can safely assume that the behaviour > hasn't changed since 7.2 in that regard. Hi Stéphane, By misbehaviour I meant that menu bars do not refresh properly: 1. run _disableCommands() subroutine Menus are hidden and become unoperating as expected 2. run _enableCommands() subroutine Menus are kept hidden and require to (re)open the doc in order to (re)appear However running main() routine does not exhibit that behaviour
I tried to reproduce, but I got stuck. I copied the Basic code from https://wiki.documentfoundation.org/Documentation/DevGuide/Writing_UNO_Components#Disabling_Commands_at_Runtime If I run the main function, the About dialog opens and another dialog opens with the text "Ok, dispatch object for .uno:About" and I am unable to close this dialog. I have to kill the LibreOffice process. If I run disableCommands, I get BASIC runtime error. Property or method not found: stopped. Pointing to line 94: EXC.stopped REM Let's bubble-up the error condition What should I do to reproduce this?
(In reply to Buovjaga from comment #3) > I tried to reproduce, but I got stuck. I copied the Basic code from > https://wiki.documentfoundation.org/Documentation/DevGuide/ > Writing_UNO_Components#Disabling_Commands_at_Runtime > > If I run the main function, the About dialog opens and another dialog opens > with the text "Ok, dispatch object for .uno:About" and I am unable to close > this dialog. I have to kill the LibreOffice process. > > If I run disableCommands, I get > > BASIC runtime error. > Property or method not found: stopped. > > Pointing to line 94: > > EXC.stopped REM Let's bubble-up the error condition > > What should I do to reproduce this? Hi Ilmari, Including the 'About' panel in the test is probably a bad idea as pointed by Noel in bug157915. Please remove "About" from CMD_LIST Basic array when running Main() routine. If you intend to run routines separately, please make sure they include Main() initialization statements: Set EXC = New ERROR_RAISER ' Exception artifact With ... ... End With CMD_LIST = ...
Ilmari, I tested the code sample under Win10 using TDF copy of LibO Can you indicate your OS and LibO versions?
(In reply to Alain Romedenne from comment #4) > Including the 'About' panel in the test is probably a bad idea as pointed by > Noel in bug157915. Please remove "About" from CMD_LIST Basic array when > running Main() routine. I removed it. I got the File Open dialog, I canceled out. I realised that Linux with kf5 didn't let me close the dialog that popped up. I was able to close it when using the gen backend. What is the result I am looking for? I see in the description of the code "At the end, the code removes the disabled commands again, otherwise LibreOffice would not be fully usable any longer". I also ran the macro when in Tabbed UI and the running seemed to be the same. Arch Linux 64-bit, X11 Version: 24.8.0.0.alpha0+ (X86_64) / LibreOffice Community Build ID: 88a7384edcd8f4240a659f2c2c7c1258471341f4 CPU threads: 8; OS: Linux 6.7; UI render: default; VCL: x11 Locale: fi-FI (fi_FI.UTF-8); UI: en-US Calc: threaded Built on 17 January 2024
(In reply to Buovjaga from comment #6) > (In reply to Alain Romedenne from comment #4) > > Including the 'About' panel in the test is probably a bad idea as pointed by > > Noel in bug157915. Please remove "About" from CMD_LIST Basic array when > > running Main() routine. > > I removed it. I got the File Open dialog, I canceled out. I realised that > Linux with kf5 didn't let me close the dialog that popped up. I was able to > close it when using the gen backend. > > What is the result I am looking for? I see in the description of the code > "At the end, the code removes the disabled commands again, otherwise > LibreOffice would not be fully usable any longer". I also ran the macro when > in Tabbed UI and the running seemed to be the same. > > Arch Linux 64-bit, X11 > Version: 24.8.0.0.alpha0+ (X86_64) / LibreOffice Community > Build ID: 88a7384edcd8f4240a659f2c2c7c1258471341f4 > CPU threads: 8; OS: Linux 6.7; UI render: default; VCL: x11 > Locale: fi-FI (fi_FI.UTF-8); UI: en-US > Calc: threaded > Built on 17 January 2024 For Open SelectAll, Quit command sequence, you should get: 1. FileOpen dialog that you may cancel - Ok msg box stating that UNO dispatch command went fine 2. Writer doc content selected or Basic IDE code selected or else .. - Ok msg box stating that UNO dispatch command went fine 3. Quit dialog that you may cancel - Ok msg box stating that UNO dispatch command went fine Then.. 4. 3 Msg boxes boxes stating that Open, SelectAll and Quit UNO commands aren't available