diff options
author | Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> | 2018-09-28 17:00:12 +0200 |
---|---|---|
committer | Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> | 2018-10-01 08:49:24 +0200 |
commit | 7384e53bbc5163534ae898b7295b4efe51c8acde (patch) | |
tree | 7024eb4b82ba2aac06a20f0d275b15fcf7803088 /vcl/inc | |
parent | df9e895763d7887baef7fe14c035aff25b99be7e (diff) |
qt5 a11y: Use UNO Api instead of vcl::Window methods
This gets us into the document itself, not only the widgets.
Change-Id: Id0cf1294817309c889729d01242cae69d2391130
Reviewed-on: https://gerrit.libreoffice.org/61094
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Diffstat (limited to 'vcl/inc')
-rw-r--r-- | vcl/inc/qt5/Qt5AccessibleWidget.hxx | 8 | ||||
-rw-r--r-- | vcl/inc/qt5/Qt5XAccessible.hxx (renamed from vcl/inc/qt5/Qt5VclWindow.hxx) | 11 |
2 files changed, 10 insertions, 9 deletions
diff --git a/vcl/inc/qt5/Qt5AccessibleWidget.hxx b/vcl/inc/qt5/Qt5AccessibleWidget.hxx index df6862567dd0..c77104931eb6 100644 --- a/vcl/inc/qt5/Qt5AccessibleWidget.hxx +++ b/vcl/inc/qt5/Qt5AccessibleWidget.hxx @@ -22,7 +22,7 @@ #include <QtGui/QColor> #include <QtGui/QWindow> -#include <vcl/window.hxx> +#include <com/sun/star/accessibility/XAccessible.hpp> class Qt5Frame; class Qt5Widget; @@ -33,8 +33,7 @@ class VCLPLUG_QT5_PUBLIC Qt5AccessibleWidget : public QObject, public QAccessibl Q_OBJECT public: - Qt5AccessibleWidget(Qt5Widget* pFrame, vcl::Window* pWindow); - Qt5AccessibleWidget(vcl::Window* pWindow); + Qt5AccessibleWidget(const css::uno::Reference<css::accessibility::XAccessible> xAccessible); QWindow* window() const override; int childCount() const override; int indexOfChild(const QAccessibleInterface* child) const override; @@ -70,8 +69,7 @@ public: static QAccessibleInterface* customFactory(const QString& classname, QObject* object); private: - Qt5Widget* m_pFrame; - VclPtr<vcl::Window> m_pWindow; + css::uno::Reference<css::accessibility::XAccessible> m_xAccessible; }; /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/inc/qt5/Qt5VclWindow.hxx b/vcl/inc/qt5/Qt5XAccessible.hxx index f7883aa67c4d..66b3901f0b85 100644 --- a/vcl/inc/qt5/Qt5VclWindow.hxx +++ b/vcl/inc/qt5/Qt5XAccessible.hxx @@ -13,19 +13,22 @@ #include <QtCore/QObject> +#include <com/sun/star/accessibility/XAccessible.hpp> + #include <vcl/window.hxx> class Qt5Frame; class Qt5Widget; -// Wrapper class to hold a vcl::Window while being able to pass it as a QObject -class VCLPLUG_QT5_PUBLIC Qt5VclWindow : public QObject +// Wrapper class to hold a css::accessibility::XAccessible object +// while being able to pass it as a QObject +class VCLPLUG_QT5_PUBLIC Qt5XAccessible : public QObject { Q_OBJECT public: - Qt5VclWindow(vcl::Window* pWindow); - VclPtr<vcl::Window> m_pWindow; + Qt5XAccessible(css::uno::Reference<css::accessibility::XAccessible> xAccessible); + css::uno::Reference<css::accessibility::XAccessible> m_xAccessible; }; /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |