diff options
author | Caolán McNamara <caolanm@redhat.com> | 2019-09-02 14:37:37 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2019-09-03 10:08:42 +0200 |
commit | 5785fc06836607b3a0a25e649d81b8607b22d4af (patch) | |
tree | cbac275eff0142fd79cc24acd59a0f39cee64ed4 /include | |
parent | ed5064d819ff423766311516f2cdf0707b41cab3 (diff) |
Resolves: tdf#126935 a11y for hosted EditEngine
move it to svx so we can reuse the a11y code in svx for
EditEngines hosted in shapes to provide a11y for EditEngines
hosted in a native widget
Change-Id: I4068c413cdb8ddb0d0ef899774fbe9f65e1bdc60
Reviewed-on: https://gerrit.libreoffice.org/78407
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/svx/ClassificationEditView.hxx | 2 | ||||
-rw-r--r-- | include/svx/weldeditview.hxx (renamed from include/editeng/weldeditview.hxx) | 15 | ||||
-rw-r--r-- | include/vcl/customweld.hxx | 1 | ||||
-rw-r--r-- | include/vcl/weld.hxx | 1 |
4 files changed, 13 insertions, 6 deletions
diff --git a/include/svx/ClassificationEditView.hxx b/include/svx/ClassificationEditView.hxx index 0e6d5ed354b6..95e635322a15 100644 --- a/include/svx/ClassificationEditView.hxx +++ b/include/svx/ClassificationEditView.hxx @@ -13,7 +13,7 @@ #include <sal/config.h> #include <svx/svxdllapi.h> -#include <editeng/weldeditview.hxx> +#include <svx/weldeditview.hxx> #include <editeng/svxenum.hxx> #include <vcl/customweld.hxx> diff --git a/include/editeng/weldeditview.hxx b/include/svx/weldeditview.hxx index d14873258d0f..f5e0183d194d 100644 --- a/include/editeng/weldeditview.hxx +++ b/include/svx/weldeditview.hxx @@ -8,17 +8,19 @@ * */ -#ifndef INCLUDED_EDITENG_WELDEDITVIEW_HXX -#define INCLUDED_EDITENG_WELDEDITVIEW_HXX +#ifndef INCLUDED_SVX_WELDEDITVIEW_HXX +#define INCLUDED_SVX_WELDEDITVIEW_HXX #include <sal/config.h> -#include <editeng/editengdllapi.h> +#include <svx/svxdllapi.h> #include <editeng/editeng.hxx> #include <editeng/editview.hxx> #include <vcl/customweld.hxx> #include <vcl/outdev.hxx> -class EDITENG_DLLPUBLIC WeldEditView : public weld::CustomWidgetController, public EditViewCallbacks +class WeldEditAccessible; + +class SVX_DLLPUBLIC WeldEditView : public weld::CustomWidgetController, public EditViewCallbacks { public: WeldEditView(); @@ -28,6 +30,7 @@ public: protected: std::unique_ptr<EditEngine> m_xEditEngine; std::unique_ptr<EditView> m_xEditView; + rtl::Reference<WeldEditAccessible> m_xAccessible; virtual void makeEditEngine(); @@ -40,6 +43,8 @@ protected: virtual void LoseFocus() override; virtual void Resize() override; + virtual css::uno::Reference<css::accessibility::XAccessible> CreateAccessible() override; + virtual void EditViewInvalidate(const tools::Rectangle& rRect) const override { weld::DrawingArea* pDrawingArea = GetDrawingArea(); @@ -59,6 +64,6 @@ protected: } }; -#endif // INCLUDED_EDITENG_WELDEDITVIEW_HXX +#endif // INCLUDED_SVX_WELDEDITVIEW_HXX /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/vcl/customweld.hxx b/include/vcl/customweld.hxx index 8d91bedc1e42..47fdc99164f5 100644 --- a/include/vcl/customweld.hxx +++ b/include/vcl/customweld.hxx @@ -57,6 +57,7 @@ public: bool IsVisible() const { return m_pDrawingArea->get_visible(); } bool IsReallyVisible() const { return m_pDrawingArea->is_visible(); } bool IsEnabled() const { return m_pDrawingArea->get_sensitive(); } + bool IsActive() const { return m_pDrawingArea->is_active(); } int GetTextHeight() const { return m_pDrawingArea->get_text_height(); } OUString GetAccessibleName() const { return m_pDrawingArea->get_accessible_name(); } OUString GetAccessibleDescription() const diff --git a/include/vcl/weld.hxx b/include/vcl/weld.hxx index 3200164f1da6..39230aae670c 100644 --- a/include/vcl/weld.hxx +++ b/include/vcl/weld.hxx @@ -106,6 +106,7 @@ public: virtual void set_can_focus(bool bCanFocus) = 0; virtual void grab_focus() = 0; virtual bool has_focus() const = 0; + virtual bool is_active() const = 0; //if this widget has the focus within the active window virtual void set_has_default(bool has_default) = 0; virtual bool get_has_default() const = 0; virtual void set_size_request(int nWidth, int nHeight) = 0; |