summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Weghorn <m.weghorn@posteo.de>2024-12-13 09:53:34 +0100
committerMichael Weghorn <m.weghorn@posteo.de>2024-12-13 20:50:52 +0100
commitcd76d6caafa0fe20bed9df42f84d82cd857b20a8 (patch)
tree878a93ac42ddb9bd765d5e308f7faecd9ae1cb10
parent667823e412ac2b08d1a2f929e0347fc9ef54256c (diff)
a11y: Pass vcl::Window instead of VCLXWindow for TextWindow a11y
As was done for the other a11y classes subclassing VCLXAccessibleComponent in commit 168512dce7f1f1453c045584d47bd78a0a6c73f7 Author: Michael Weghorn <m.weghorn@posteo.de> Date: Thu Dec 12 18:06:13 2024 +0100 a11y: Stop using VCLXWindow in vcl a11y classes , also pass the vcl::Window when creating an XAccessibleContext for a TextView, to get rid of the UNO/toolkit dependency. Change-Id: I3c5febd27a53fe17f83cc4e95dd7466f11a7a225 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/178403 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
-rw-r--r--accessibility/inc/extended/textwindowaccessibility.hxx3
-rw-r--r--accessibility/source/extended/textwindowaccessibility.cxx6
-rw-r--r--accessibility/source/helper/acc_factory.cxx6
-rw-r--r--basctl/source/basicide/textwindowpeer.cxx2
-rw-r--r--include/vcl/accessiblefactory.hxx3
5 files changed, 10 insertions, 10 deletions
diff --git a/accessibility/inc/extended/textwindowaccessibility.hxx b/accessibility/inc/extended/textwindowaccessibility.hxx
index 60511460991d..6fbaed7175b0 100644
--- a/accessibility/inc/extended/textwindowaccessibility.hxx
+++ b/accessibility/inc/extended/textwindowaccessibility.hxx
@@ -316,8 +316,7 @@ typedef std::unordered_map< OUString,
class Document final : public ::VCLXAccessibleComponent, public ::SfxListener
{
public:
- Document(::VCLXWindow * pVclXWindow, ::TextEngine & rEngine,
- ::TextView & rView);
+ Document(vcl::Window* pWindow, ::TextEngine & rEngine, ::TextView & rView);
css::uno::Reference<css::accessibility::XAccessible> getAccessible() const;
diff --git a/accessibility/source/extended/textwindowaccessibility.cxx b/accessibility/source/extended/textwindowaccessibility.cxx
index 78e6ea3932c4..4216c62665de 100644
--- a/accessibility/source/extended/textwindowaccessibility.cxx
+++ b/accessibility/source/extended/textwindowaccessibility.cxx
@@ -701,9 +701,9 @@ void Paragraph::checkDisposed()
OUString(), getXWeak());
}
-Document::Document(::VCLXWindow * pVclXWindow, ::TextEngine & rEngine,
- ::TextView & rView):
- VCLXAccessibleComponent(pVclXWindow->GetWindow()),
+Document::Document(vcl::Window* pWindow, ::TextEngine & rEngine,
+ ::TextView & rView)
+ : VCLXAccessibleComponent(pWindow),
m_rEngine(rEngine),
m_rView(rView),
m_aEngineListener(*this),
diff --git a/accessibility/source/helper/acc_factory.cxx b/accessibility/source/helper/acc_factory.cxx
index 9ac17ca3e106..ac32fb769b13 100644
--- a/accessibility/source/helper/acc_factory.cxx
+++ b/accessibility/source/helper/acc_factory.cxx
@@ -146,7 +146,7 @@ public:
virtual css::uno::Reference< css::accessibility::XAccessibleContext >
createAccessibleTextWindowContext(
- VCLXWindow* pVclXWindow, TextEngine& rEngine, TextView& rView
+ vcl::Window* pWindow, TextEngine& rEngine, TextView& rView
) const override;
virtual css::uno::Reference< css::accessibility::XAccessible >
@@ -387,9 +387,9 @@ Reference< XAccessible > AccessibleFactory::createAccessibleTabBar( TabBar& _rTa
}
Reference< XAccessibleContext > AccessibleFactory::createAccessibleTextWindowContext(
- VCLXWindow* pVclXWindow, TextEngine& rEngine, TextView& rView ) const
+ vcl::Window* pWindow, TextEngine& rEngine, TextView& rView) const
{
- return new Document( pVclXWindow, rEngine, rView );
+ return new Document(pWindow, rEngine, rView );
}
Reference< XAccessible > AccessibleFactory::createAccessibleTreeListBox(
diff --git a/basctl/source/basicide/textwindowpeer.cxx b/basctl/source/basicide/textwindowpeer.cxx
index 421468a27918..a3ad564baccd 100644
--- a/basctl/source/basicide/textwindowpeer.cxx
+++ b/basctl/source/basicide/textwindowpeer.cxx
@@ -57,7 +57,7 @@ TextWindowPeer::TextWindowPeer(TextView & view):
css::uno::Reference<css::accessibility::XAccessibleContext>
TextWindowPeer::CreateAccessibleContext() {
return m_aFactoryAccess.getFactory().createAccessibleTextWindowContext(
- this, m_rEngine, m_rView);
+ GetWindow(), m_rEngine, m_rView);
}
}
diff --git a/include/vcl/accessiblefactory.hxx b/include/vcl/accessiblefactory.hxx
index fde375c79875..1ccef276cde3 100644
--- a/include/vcl/accessiblefactory.hxx
+++ b/include/vcl/accessiblefactory.hxx
@@ -41,6 +41,7 @@ namespace com::sun::star {
namespace vcl { class IAccessibleBrowseBox; }
namespace vcl { class IAccessibleTabListBox; }
namespace vcl { class IAccessibleTableProvider; }
+namespace vcl { class Window; }
class SvHeaderTabListBox;
class SvtIconChoiceCtrl;
@@ -112,7 +113,7 @@ namespace vcl
virtual css::uno::Reference< css::accessibility::XAccessibleContext >
createAccessibleTextWindowContext(
- VCLXWindow* pVclXWindow, TextEngine& rEngine, TextView& rView
+ vcl::Window* pWindow, TextEngine& rEngine, TextView& rView
) const = 0;
virtual css::uno::Reference< css::accessibility::XAccessible >