diff options
author | Caolán McNamara <caolanm@redhat.com> | 2021-06-09 14:31:05 +0100 |
---|---|---|
committer | Adolfo Jayme Barrientos <fitojb@ubuntu.com> | 2021-06-10 21:13:37 +0200 |
commit | 4b6af3412f72be85706fc5355a36bd8364726c13 (patch) | |
tree | fe9f99200913c9579eda1bdc7d499b75a7f3e3dd /sc | |
parent | dtd files are not xml files and shouldn't have xml headers (diff) | |
download | core-4b6af3412f72be85706fc5355a36bd8364726c13.tar.gz core-4b6af3412f72be85706fc5355a36bd8364726c13.zip |
tdf#141769 ScTextWnd has to be available before the editview is created
Change-Id: Iec3b4180c4dc83723224b7122a1513cb8fe3ea0b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116921
Tested-by: Jenkins
Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/ui/Accessibility/AccessibleEditObject.cxx | 9 | ||||
-rw-r--r-- | sc/source/ui/app/inputwin.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/inc/AccessibleEditObject.hxx | 8 |
3 files changed, 18 insertions, 1 deletions
diff --git a/sc/source/ui/Accessibility/AccessibleEditObject.cxx b/sc/source/ui/Accessibility/AccessibleEditObject.cxx index d0afd2c8196c..ea6787478abd 100644 --- a/sc/source/ui/Accessibility/AccessibleEditObject.cxx +++ b/sc/source/ui/Accessibility/AccessibleEditObject.cxx @@ -27,6 +27,7 @@ #include <editsrc.hxx> #include <scmod.hxx> #include <inputhdl.hxx> +#include <inputwin.hxx> #include <unotools/accessiblestatesethelper.hxx> #include <com/sun/star/accessibility/AccessibleRole.hpp> @@ -595,4 +596,12 @@ OutputDevice* ScAccessibleEditControlObject::GetOutputDeviceForView() return &m_pController->GetDrawingArea()->get_ref_device(); } +ScAccessibleEditLineObject::ScAccessibleEditLineObject(ScTextWnd* pTextWnd) + : ScAccessibleEditControlObject(pTextWnd, ScAccessibleEditObject::EditLine) +{ + // tdf#141769 set this early so its always available, even before the on-demand + // editview is created + mpTextWnd = pTextWnd; +} + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx index 2846ca43dc54..6307eee3edd7 100644 --- a/sc/source/ui/app/inputwin.cxx +++ b/sc/source/ui/app/inputwin.cxx @@ -2075,7 +2075,7 @@ void ScTextWnd::SetDrawingArea(weld::DrawingArea* pDrawingArea) css::uno::Reference< css::accessibility::XAccessible > ScTextWnd::CreateAccessible() { - pAcc = new ScAccessibleEditControlObject(this, ScAccessibleEditObject::EditLine); + pAcc = new ScAccessibleEditLineObject(this); return pAcc; } diff --git a/sc/source/ui/inc/AccessibleEditObject.hxx b/sc/source/ui/inc/AccessibleEditObject.hxx index 83dedda9b387..9244964cfae3 100644 --- a/sc/source/ui/inc/AccessibleEditObject.hxx +++ b/sc/source/ui/inc/AccessibleEditObject.hxx @@ -175,7 +175,9 @@ private: std::unique_ptr<accessibility::AccessibleTextHelper> mpTextHelper; EditView* mpEditView; VclPtr<vcl::Window> mpWindow; +protected: ScTextWnd* mpTextWnd; +private: EditObjectType meObjectType; bool mbHasFocus; @@ -222,6 +224,12 @@ public: virtual void SAL_CALL disposing() override; }; +class ScAccessibleEditLineObject : public ScAccessibleEditControlObject +{ +public: + ScAccessibleEditLineObject(ScTextWnd* pTextWnd); +}; + #endif /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |