Description: When calling XTabPageModel.setEnabled or XTabPageModel.setTitle via UNO API to change the title or enable/disable a tab page via UNO, the UI is not updated accordingly (if the calls happen when the corresponding dialog is already shown on screen). A sample extension to demonstrate that will be attached. Steps to Reproduce: 1. install attached sample extension StarterExtensionLHM.oxt 2. start Writer 3. open the extension's dialog via Menu using "Test Extension" -> "Show Dialog" 4. press the "toggle tab" button Actual Results: Nothing seems to happen. Expected Results: The second tab should toggle its enabled status (i.e. it should become disabled on first press, enabled again on second button press,...) and change its text every time the button is pressed. Reproducible: Always User Profile Reset: Yes Additional Info: Version: 7.0.0.0.alpha1+ Build ID: 50150601bb103a3bf5881e07d93a0e1d324f2722 CPU threads: 4; OS: Linux 5.6; UI render: default; VCL: kf5; Locale: en-GB (en_GB.UTF-8); UI: en-US Calc: threaded Version: 7.0.0.0.alpha1+ Build ID: 50150601bb103a3bf5881e07d93a0e1d324f2722 CPU threads: 4; OS: Linux 5.6; UI render: default; VCL: gtk3; Locale: en-GB (en_GB.UTF-8); UI: en-US Calc: threaded
Created attachment 160967 [details] Sample extension to demonstrate the issue The relevant lines in the Java source code of the sample extension that are supposed to change the text and enable/disable the tab are the following ones (with 'tabPageModel2' being the second tab's XTabPageModel: @Override public void actionPerformed(ActionEvent arg0) { // when the button is pressed: // toggle enabled/disabled status of the second tab and change its title tabPageModel2.setEnabled(!tabPageModel2.getEnabled()); final String text1 = "some text"; final String text2 = "other words"; String newText = text1; String currentText = tabPageModel2.getTitle(); if (currentText.equals(text1)) { newText = text2; } tabPageModel2.setTitle(newText); } });
This issue was originally reported by somebody else in our organization. I've already taken a look. Fix pending in Gerrit: https://gerrit.libreoffice.org/c/core/+/94402
Michael Weghorn committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/92289c5f121499959b6f5edf859e5f34b5b96a78 tdf#133142 UnoControlTabPageContainer: Handle tab property changes It will be available in 7.0.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
(In reply to Michael Weghorn from comment #0) > 1. install attached sample extension StarterExtensionLHM.oxt Note that the attachment 160967 [details] is actually a misnamed zip file containing both the souce code and the built extension. The actual extension to be installed is in `dist/StarterProjectLHM.oxt` inside the zip archive.