summaryrefslogtreecommitdiff
path: root/framework
diff options
context:
space:
mode:
authorMichael Weghorn <m.weghorn@posteo.de>2023-12-18 09:30:02 +0100
committerMichael Weghorn <m.weghorn@posteo.de>2023-12-19 09:30:31 +0100
commitb7ba91311abaf1af4d97822e5c8eccc53b1e11fa (patch)
tree8abfac2be87f22dc9573aebe76c438f31e596910 /framework
parenteef4d5cbd10a042bd3b5fb555e0bf9b0dd7d1215 (diff)
tdf#123864 a11y: Evaluate checkable/toggle flag for more toolbar items
commit 4342408a8359e590f57b016baaf7d8dcfdebdbd4 Author: Carsten Driesner <cd@openoffice.org> Date: Thu May 6 18:15:21 2010 +0200 fwk142: #i104293 Use Commands.xcu files to mark commands which support a toggle state introduced a `UICOMMANDDESCRIPTION_PROPERTIES_TOGGLEBUTTON` state to mark commands that can be toggled, see `framework/inc/properties.h`. Despite that one being set for the `.uno:Underline` command in `officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu`, the underline button in Writer's formatting toolbar would not expose the CHECKABLE a11y state even after commit 78241a40628e5721aa50cb0fa13a63333343f766 Author: Michael Weghorn <m.weghorn@posteo.de> Date: Mon Dec 18 08:48:12 2023 +0100 tdf#123864 a11y: Handle new CHECKABLE state in misc places because the state set in the .xcu file was only applied in `ToolBarManager::CreateControllers` in the code path where no controller is set. There seems to be no particular reason for that, so move this out of that block so this gets run for other items, too. With this in place, the underline button in Writer's formatting toolbar now has the checkable AT-SPI state when using the gtk3 VCL plugin. (Orca still doesn't announce the button as checked when it is, despite the checked state also being set then, but that's another aspect that will be addressed in a separate commit.) Change-Id: Ib9200077a95feea3ce7c0380b9b8f31c96632223 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160903 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Diffstat (limited to 'framework')
-rw-r--r--framework/source/uielement/toolbarmanager.cxx10
1 files changed, 5 insertions, 5 deletions
diff --git a/framework/source/uielement/toolbarmanager.cxx b/framework/source/uielement/toolbarmanager.cxx
index bdc4627c2c8d..0ef5ea3c723e 100644
--- a/framework/source/uielement/toolbarmanager.cxx
+++ b/framework/source/uielement/toolbarmanager.cxx
@@ -1120,15 +1120,15 @@ void ToolBarManager::CreateControllers()
xController.set( new GenericToolbarController( m_xContext, m_xFrame, m_pToolBar, nId, aCommandURL ));
else
xController.set( new GenericToolbarController( m_xContext, m_xFrame, *m_pWeldedToolBar, aCommandURL ));
-
- // Accessibility support: Set toggle button role for specific commands
- sal_Int32 nProps = vcl::CommandInfoProvider::GetPropertiesForCommand(aCommandURL, m_aModuleIdentifier);
- if ( nProps & UICOMMANDDESCRIPTION_PROPERTIES_TOGGLEBUTTON )
- m_pImpl->SetItemCheckable( nId );
}
}
}
+ // Accessibility support: Set toggle button role for specific commands
+ const sal_Int32 nProps = vcl::CommandInfoProvider::GetPropertiesForCommand(aCommandURL, m_aModuleIdentifier);
+ if (nProps & UICOMMANDDESCRIPTION_PROPERTIES_TOGGLEBUTTON)
+ m_pImpl->SetItemCheckable(nId);
+
// Associate ID and controller to be able to retrieve
// the controller from the ID later.
m_aControllerMap[ nId ] = xController;