sd a11y: Pass OAccessible for AccessibleDocumentViewBase parent

Pass the more concrete OAccessible instead of the abstract
XAccessible UNO interface for the parent param to the
AccessibleDocumentViewBase ctor.

Change-Id: I7bc782f2d6f9b2debd49230cd07eff5013a0be9b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210379
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
This commit is contained in:
Michael Weghorn
2026-09-02 14:33:43 +02:00
parent fbb0fb4aac
commit df73eb8eac
2 changed files with 13 additions and 18 deletions
@@ -58,19 +58,16 @@ using ::com::sun::star::uno::Reference;
namespace accessibility {
AccessibleDocumentViewBase::AccessibleDocumentViewBase (
::sd::Window* pSdWindow,
::sd::ViewShell* pViewShell,
AccessibleDocumentViewBase::AccessibleDocumentViewBase(
::sd::Window* pSdWindow, ::sd::ViewShell* pViewShell,
uno::Reference<frame::XController> xController,
const uno::Reference<XAccessible>& rxParent)
: AccessibleContextBase (rxParent,
pViewShell->GetDoc()->GetDocumentType() == DocumentType::Impress ?
AccessibleRole::DOCUMENT_PRESENTATION :
AccessibleRole::DOCUMENT),
mxController (std::move(xController)),
maViewForwarder (
static_cast<SdrPaintView*>(pViewShell->GetView()),
*pSdWindow->GetOutDev())
const rtl::Reference<comphelper::OAccessible>& rpParent)
: AccessibleContextBase(rpParent,
pViewShell->GetDoc()->GetDocumentType() == DocumentType::Impress
? AccessibleRole::DOCUMENT_PRESENTATION
: AccessibleRole::DOCUMENT)
, mxController(std::move(xController))
, maViewForwarder(static_cast<SdrPaintView*>(pViewShell->GetView()), *pSdWindow->GetOutDev())
{
if (mxController.is())
mxModel = mxController->getModel();
@@ -92,15 +92,13 @@ public:
The view shell associated with the given window.
@param rxController
The controller from which to get the model.
@param rxParent
@param rpParent
The accessible parent of the new object. Note that this parent does
not necessarily correspond with the parent of the given window.
*/
AccessibleDocumentViewBase (
::sd::Window* pSdWindow,
::sd::ViewShell* pViewShell,
css::uno::Reference<css::frame::XController> xController,
const css::uno::Reference<css::accessibility::XAccessible>& rxParent);
AccessibleDocumentViewBase(::sd::Window* pSdWindow, ::sd::ViewShell* pViewShell,
css::uno::Reference<css::frame::XController> xController,
const rtl::Reference<comphelper::OAccessible>& rpParent);
virtual ~AccessibleDocumentViewBase() override;