include/toolkit/helper/vclunohelper.hxx      |    1 -
 sd/source/console/PresenterAccessibility.cxx |   24 +++++++-----------------
 toolkit/source/helper/vclunohelper.cxx       |    6 ------
 3 files changed, 7 insertions(+), 24 deletions(-)

New commits:
commit d8a908c28fa2d5e6e9a2437fc039f413d968199a
Author:     Michael Weghorn <m.wegh...@posteo.de>
AuthorDate: Tue May 13 19:10:54 2025 +0200
Commit:     Michael Weghorn <m.wegh...@posteo.de>
CommitDate: Thu May 15 06:47:39 2025 +0200

    toolkit: Drop unnecessary XWindow2 param specialization
    
    XWindow2 subclasses XWindow, so there's no need for
    a VCLUnoHelper::GetWindow variant taking an XWindow2
    reference that does the same as the variant taking
    an XWindow reference.
    
    Change-Id: I6f931252d2ae2e046dc31c076094e71b8aa71346
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/185273
    Tested-by: Jenkins
    Reviewed-by: Michael Weghorn <m.wegh...@posteo.de>

diff --git a/include/toolkit/helper/vclunohelper.hxx 
b/include/toolkit/helper/vclunohelper.hxx
index b0099d547e79..c32de33f28aa 100644
--- a/include/toolkit/helper/vclunohelper.hxx
+++ b/include/toolkit/helper/vclunohelper.hxx
@@ -77,7 +77,6 @@ public:
 
     // Window
     static vcl::Window*                               GetWindow( const 
css::uno::Reference< css::awt::XWindow>& rxWindow );
-    static vcl::Window*                               GetWindow( const 
css::uno::Reference< css::awt::XWindow2>& rxWindow2 );
     static vcl::Window*                               GetWindow( const 
css::uno::Reference< css::awt::XWindowPeer>& rxWindowPeer );
     static css::uno::Reference< css::awt::XWindow>    GetInterface( 
vcl::Window* pWindow );
 
diff --git a/toolkit/source/helper/vclunohelper.cxx 
b/toolkit/source/helper/vclunohelper.cxx
index 8e70456b1386..fb39ae519edb 100644
--- a/toolkit/source/helper/vclunohelper.cxx
+++ b/toolkit/source/helper/vclunohelper.cxx
@@ -80,12 +80,6 @@ vcl::Window* VCLUnoHelper::GetWindow( const 
css::uno::Reference< css::awt::XWind
     return pVCLXWindow ? pVCLXWindow->GetWindow() : nullptr;
 }
 
-vcl::Window* VCLUnoHelper::GetWindow( const css::uno::Reference< 
css::awt::XWindow2>& rxWindow )
-{
-    VCLXWindow* pVCLXWindow = dynamic_cast<VCLXWindow*>( rxWindow.get() );
-    return pVCLXWindow ? pVCLXWindow->GetWindow() : nullptr;
-}
-
 vcl::Window* VCLUnoHelper::GetWindow( const css::uno::Reference< 
css::awt::XWindowPeer>& rxWindow )
 {
     VCLXWindow* pVCLXWindow = dynamic_cast<VCLXWindow*>( rxWindow.get() );
commit b4b6193ab8d0bff882b711eb881a7c0341b87419
Author:     Michael Weghorn <m.wegh...@posteo.de>
AuthorDate: Tue May 13 17:52:11 2025 +0200
Commit:     Michael Weghorn <m.wegh...@posteo.de>
CommitDate: Thu May 15 06:47:32 2025 +0200

    sd a11y: Drop unnecessary call to getAccessibleContext
    
    AccessibleObject::getAccessibleContext returns a
    reference to self, so calling it is unnecessary
    here.
    
    Change-Id: I396a517b5e8bfc14269e9b8e3513477e9a355c8a
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/185270
    Tested-by: Jenkins
    Reviewed-by: Michael Weghorn <m.wegh...@posteo.de>

diff --git a/sd/source/console/PresenterAccessibility.cxx 
b/sd/source/console/PresenterAccessibility.cxx
index 900baeb6a41d..a809f5bbb4e5 100644
--- a/sd/source/console/PresenterAccessibility.cxx
+++ b/sd/source/console/PresenterAccessibility.cxx
@@ -325,7 +325,7 @@ Reference<XAccessibleContext> SAL_CALL 
PresenterAccessible::getAccessibleContext
         if (mpPresenterController.is())
             mpPresenterController->SetAccessibilityActiveState(true);
     }
-    return mpAccessibleConsole->getAccessibleContext();
+    return mpAccessibleConsole;
 }
 
 //----- XFocusListener ----------------------------------------------------
commit e8a8d4a9a83027a3627f856335dcd7ca4c7db3e7
Author:     Michael Weghorn <m.wegh...@posteo.de>
AuthorDate: Tue May 13 17:47:41 2025 +0200
Commit:     Michael Weghorn <m.wegh...@posteo.de>
CommitDate: Thu May 15 06:47:25 2025 +0200

    sd a11y: Inline helper to PresenterAccessible::getAccessibleContext
    
    Change-Id: I61b49f76ec921ff785aecb2eaa0963210d278494
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/185269
    Tested-by: Jenkins
    Reviewed-by: Michael Weghorn <m.wegh...@posteo.de>

diff --git a/sd/source/console/PresenterAccessibility.cxx 
b/sd/source/console/PresenterAccessibility.cxx
index a1257738cb98..900baeb6a41d 100644
--- a/sd/source/console/PresenterAccessibility.cxx
+++ b/sd/source/console/PresenterAccessibility.cxx
@@ -57,21 +57,6 @@ namespace sdext::presenter {
 
 namespace {
 
-class AccessibleConsole
-{
-public:
-    static rtl::Reference<AccessibleObject> Create()
-    {
-        const OUString sName = SdResId(STR_A11Y_PRESENTER_CONSOLE);
-        rtl::Reference<AccessibleObject> pObject (
-            new AccessibleObject(AccessibleRole::PANEL, sName));
-        pObject->LateInitialization();
-        pObject->UpdateStateSet();
-
-        return pObject;
-    }
-};
-
 //===== AccessiblePreview =====================================================
 
 class AccessiblePreview
@@ -328,7 +313,12 @@ Reference<XAccessibleContext> SAL_CALL 
PresenterAccessible::getAccessibleContext
             mxMainWindow = xMainPane->getWindow();
             mxMainWindow->addFocusListener(this);
         }
-        mpAccessibleConsole = AccessibleConsole::Create();
+
+        const OUString sName = SdResId(STR_A11Y_PRESENTER_CONSOLE);
+        mpAccessibleConsole = new AccessibleObject(AccessibleRole::PANEL, 
sName);
+        mpAccessibleConsole->LateInitialization();
+        mpAccessibleConsole->UpdateStateSet();
+
         mpAccessibleConsole->SetWindow(mxMainWindow, nullptr);
         mpAccessibleConsole->SetAccessibleParent(mxAccessibleParent);
         UpdateAccessibilityHierarchy();

Reply via email to