summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMichael Weghorn <m.weghorn@posteo.de>2024-12-04 15:48:51 +0100
committerMichael Weghorn <m.weghorn@posteo.de>2024-12-04 20:47:30 +0100
commit739b0716504d2526fb7283100420e4bd5eacb7c2 (patch)
tree3e1281c0c74ffa5a25267e1a8b953df762c364bb /include
parent3d780e72b93773a25f796feb488b0fd878c490b5 (diff)
a11y: Move menu a11y classes to vcl, no more use factory
Other than most of the a11y implementations for vcl classes, VCLXAccessiblePopupMenu etc. do not make use of any VCLXWindow (i.e. UNO/toolkit wrapper of a vcl::Window) and thus do not depend on the toolkit module, which the accessibility module depends on. Therefore, there's also no need to use the accessible factory to create them (which is needed when toolkit classes are involved to avoid a dependency cycle). Move those classes from the accessibility module to vcl and add a new method Menu::CreateAccessible and move the logic from AccessibleFactory::createAccessible there. Drop the now unnecessary factory methods previously used for those classes. No change in behavior intended (yet), but this also simplifies the code involved for the tdf#164093 scenario. Change-Id: Ie3f6f1a02bf6662206d31383473cdc868e1f9164 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177812 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Diffstat (limited to 'include')
-rw-r--r--include/toolkit/helper/accessiblefactory.hxx5
-rw-r--r--include/vcl/menu.hxx3
-rw-r--r--include/vcl/toolkit/unowrap.hxx4
3 files changed, 3 insertions, 9 deletions
diff --git a/include/toolkit/helper/accessiblefactory.hxx b/include/toolkit/helper/accessiblefactory.hxx
index 6c0532ce9edb..2b2c3455abd7 100644
--- a/include/toolkit/helper/accessiblefactory.hxx
+++ b/include/toolkit/helper/accessiblefactory.hxx
@@ -133,11 +133,6 @@ namespace toolkit
virtual css::uno::Reference< css::accessibility::XAccessibleContext >
createAccessibleContext( VCLXWindow* _pXWindow ) = 0;
- /** creates an accessible component for the given menu
- */
- virtual css::uno::Reference< css::accessibility::XAccessible >
- createAccessible( Menu* _pMenu, bool _bIsMenuBar ) = 0;
-
protected:
virtual ~IAccessibleFactory() override {}
};
diff --git a/include/vcl/menu.hxx b/include/vcl/menu.hxx
index 19216d9585cc..e241609fcdb6 100644
--- a/include/vcl/menu.hxx
+++ b/include/vcl/menu.hxx
@@ -401,6 +401,9 @@ public:
* Get the ID of the window.
*/
const OUString& get_id() const { return maID; }
+
+private:
+ css::uno::Reference<css::accessibility::XAccessible> CreateAccessible();
};
struct MenuBarButtonCallbackArg
diff --git a/include/vcl/toolkit/unowrap.hxx b/include/vcl/toolkit/unowrap.hxx
index 359810652e05..9d1231919229 100644
--- a/include/vcl/toolkit/unowrap.hxx
+++ b/include/vcl/toolkit/unowrap.hxx
@@ -65,10 +65,6 @@ public:
virtual void WindowDestroyed( vcl::Window* pWindow ) = 0;
- // Accessibility
- virtual css::uno::Reference< css::accessibility::XAccessible >
- CreateAccessible( Menu* pMenu, bool bIsMenuBar ) = 0;
-
/** Get the application's UNO wrapper object.
Note that this static function will only ever try to create UNO wrapper object once, and