[Libreoffice-commits] core.git: 2 commits - chart2/source include/svx sc/source sd/source svx/source sw/source

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Fri May 17 07:55:51 UTC 2019


 chart2/source/controller/accessibility/AccessibleChartShape.cxx |    2 -
 include/svx/AccessibleShapeTreeInfo.hxx                         |   15 ++++++----
 sc/source/ui/Accessibility/AccessibleDocument.cxx               |    4 +-
 sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx    |    2 -
 sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx       |    2 -
 svx/source/accessibility/AccessibleControlShape.cxx             |    6 ++--
 svx/source/accessibility/AccessibleShapeTreeInfo.cxx            |   11 +------
 svx/source/accessibility/GraphCtlAccessibleContext.cxx          |    2 -
 sw/source/core/access/accmap.cxx                                |    2 -
 9 files changed, 22 insertions(+), 24 deletions(-)

New commits:
commit 57a23fcb90a3af9ed362dc053c4112f844a81a2c
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Thu May 16 14:14:48 2019 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Fri May 17 09:54:56 2019 +0200

    allow a OutputDevice parent where that is sufficient
    
    Change-Id: I2920ea1a82de5eacbfeceafbb3c63693dd4365db
    Reviewed-on: https://gerrit.libreoffice.org/72414
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/chart2/source/controller/accessibility/AccessibleChartShape.cxx b/chart2/source/controller/accessibility/AccessibleChartShape.cxx
index b935bd9923d1..6b751a369d24 100644
--- a/chart2/source/controller/accessibility/AccessibleChartShape.cxx
+++ b/chart2/source/controller/accessibility/AccessibleChartShape.cxx
@@ -50,7 +50,7 @@ AccessibleChartShape::AccessibleChartShape(
 
         m_aShapeTreeInfo.SetSdrView( rAccInfo.m_pSdrView );
         m_aShapeTreeInfo.SetController( nullptr );
-        m_aShapeTreeInfo.SetWindow( VCLUnoHelper::GetWindow( rAccInfo.m_xWindow ) );
+        m_aShapeTreeInfo.SetDevice( VCLUnoHelper::GetWindow( rAccInfo.m_xWindow ) );
         m_aShapeTreeInfo.SetViewForwarder( rAccInfo.m_pViewForwarder );
 
         ::accessibility::ShapeTypeHandler& rShapeHandler = ::accessibility::ShapeTypeHandler::Instance();
diff --git a/include/svx/AccessibleShapeTreeInfo.hxx b/include/svx/AccessibleShapeTreeInfo.hxx
index 6057433c4181..0b5ddf8fae52 100644
--- a/include/svx/AccessibleShapeTreeInfo.hxx
+++ b/include/svx/AccessibleShapeTreeInfo.hxx
@@ -22,7 +22,7 @@
 
 #include <com/sun/star/uno/Reference.hxx>
 #include <svx/svxdllapi.h>
-#include <vcl/vclptr.hxx>
+#include <vcl/window.hxx>
 
 namespace com { namespace sun { namespace star {
     namespace accessibility { class XAccessibleComponent; }
@@ -31,7 +31,6 @@ namespace com { namespace sun { namespace star {
 } } }
 
 class SdrView;
-namespace vcl { class Window; }
 
 namespace accessibility {
 
@@ -135,13 +134,19 @@ public:
     /** Set the window that is used to construct SvxTextEditSources which in
         turn is used to create accessible edit engines.
     */
-    void SetWindow (vcl::Window* pWindow);
+    void SetDevice(OutputDevice* pWindow);
 
     /** Return the current Window.
         @return
             The returned value may be NULL.
     */
-    vcl::Window* GetWindow() const { return mpWindow;}
+    vcl::Window* GetWindow() const
+    {
+        if (mpWindow && mpWindow->GetOutDevType() == OUTDEV_WINDOW)
+            return static_cast<vcl::Window*>(mpWindow.get());
+        return nullptr;
+    }
+    OutputDevice* GetDevice() const { return mpWindow;}
 
     /** The view forwarder allows the transformation between internal
         and pixel coordinates and can be asked for the visible area.
@@ -183,7 +188,7 @@ private:
     /** This window is necessary to construct an SvxTextEditSource which in
         turn is used to create an accessible edit engine.
     */
-    VclPtr<vcl::Window> mpWindow;
+    VclPtr<OutputDevice> mpWindow;
 
     /** The view forwarder allows the transformation between internal
         and pixel coordinates and can be asked for the visible area.
diff --git a/sc/source/ui/Accessibility/AccessibleDocument.cxx b/sc/source/ui/Accessibility/AccessibleDocument.cxx
index f95028b5aca3..9ad7aa3a98f0 100644
--- a/sc/source/ui/Accessibility/AccessibleDocument.cxx
+++ b/sc/source/ui/Accessibility/AccessibleDocument.cxx
@@ -317,7 +317,7 @@ ScChildrenShapes::ScChildrenShapes(ScAccessibleDocument* pAccessibleDocument, Sc
             maShapeTreeInfo.SetModelBroadcaster( new ScDrawModelBroadcaster(rViewData.GetDocument()->GetDrawLayer()) );
             maShapeTreeInfo.SetSdrView(rViewData.GetScDrawView());
             maShapeTreeInfo.SetController(nullptr);
-            maShapeTreeInfo.SetWindow(pViewShell->GetWindowByPos(meSplitPos));
+            maShapeTreeInfo.SetDevice(pViewShell->GetWindowByPos(meSplitPos));
             maShapeTreeInfo.SetViewForwarder(mpAccessibleDocument);
         }
     }
@@ -350,7 +350,7 @@ void ScChildrenShapes::SetDrawBroadcaster()
             maShapeTreeInfo.SetModelBroadcaster( new ScDrawModelBroadcaster(rViewData.GetDocument()->GetDrawLayer()) );
             maShapeTreeInfo.SetSdrView(rViewData.GetScDrawView());
             maShapeTreeInfo.SetController(nullptr);
-            maShapeTreeInfo.SetWindow(mpViewShell->GetWindowByPos(meSplitPos));
+            maShapeTreeInfo.SetDevice(mpViewShell->GetWindowByPos(meSplitPos));
             maShapeTreeInfo.SetViewForwarder(mpAccessibleDocument);
         }
     }
diff --git a/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx b/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx
index cffe595b2043..1bc96eb92037 100644
--- a/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx
+++ b/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx
@@ -919,7 +919,7 @@ uno::Reference<XAccessible> ScShapeChildren::GetBackgroundShapeAt(const awt::Poi
             ::accessibility::AccessibleShapeTreeInfo aShapeTreeInfo;
             aShapeTreeInfo.SetSdrView(mpViewShell->GetPreview()->GetDrawView());
             aShapeTreeInfo.SetController(nullptr);
-            aShapeTreeInfo.SetWindow(mpViewShell->GetWindow());
+            aShapeTreeInfo.SetDevice(mpViewShell->GetWindow());
             aShapeTreeInfo.SetViewForwarder(&(maShapeRanges[rShape.mnRangeId].maViewForwarder));
             rShape.mpAccShape = rShapeHandler.CreateAccessibleObject(aShapeInfo, aShapeTreeInfo);
             if (rShape.mpAccShape.is())
diff --git a/sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx b/sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx
index ae783b311a29..c271e70718cb 100644
--- a/sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx
+++ b/sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx
@@ -80,7 +80,7 @@ AccessibleDocumentViewBase::AccessibleDocumentViewBase (
             mxModel, uno::UNO_QUERY));
     maShapeTreeInfo.SetController (mxController);
     maShapeTreeInfo.SetSdrView (pViewShell->GetView());
-    maShapeTreeInfo.SetWindow (pSdWindow);
+    maShapeTreeInfo.SetDevice (pSdWindow);
     maShapeTreeInfo.SetViewForwarder (&maViewForwarder);
 
     mxWindow = ::VCLUnoHelper::GetInterface (pSdWindow);
diff --git a/svx/source/accessibility/AccessibleControlShape.cxx b/svx/source/accessibility/AccessibleControlShape.cxx
index 4721672ee00e..09dd1fb887bb 100644
--- a/svx/source/accessibility/AccessibleControlShape.cxx
+++ b/svx/source/accessibility/AccessibleControlShape.cxx
@@ -189,7 +189,7 @@ void AccessibleControlShape::Init()
         // I'm aware of at the moment .....
 
         // get the control which belongs to our model (relative to our view)
-        const OutputDevice* pViewWindow = maShapeTreeInfo.GetWindow();
+        const OutputDevice* pViewWindow = maShapeTreeInfo.GetDevice();
         SdrUnoObj* pUnoObjectImpl = dynamic_cast<SdrUnoObj*>( GetSdrObjectFromXShape(mxShape)  );
         SdrView* pView = maShapeTreeInfo.GetSdrView();
         OSL_ENSURE( pView && pViewWindow && pUnoObjectImpl, "AccessibleControlShape::Init: no view, or no view window, no SdrUnoObj!" );
@@ -637,7 +637,7 @@ void SAL_CALL AccessibleControlShape::disposing()
     if ( m_bWaitingForControl )
     {
         OSL_FAIL( "AccessibleControlShape::disposing: this should never happen!" );
-        Reference< XContainer > xContainer = lcl_getControlContainer( maShapeTreeInfo.GetWindow(), maShapeTreeInfo.GetSdrView() );
+        Reference< XContainer > xContainer = lcl_getControlContainer( maShapeTreeInfo.GetDevice(), maShapeTreeInfo.GetSdrView() );
         if ( xContainer.is() )
         {
             m_bWaitingForControl = false;
diff --git a/svx/source/accessibility/AccessibleShapeTreeInfo.cxx b/svx/source/accessibility/AccessibleShapeTreeInfo.cxx
index 837c73081ea7..88d24ac1d86f 100644
--- a/svx/source/accessibility/AccessibleShapeTreeInfo.cxx
+++ b/svx/source/accessibility/AccessibleShapeTreeInfo.cxx
@@ -72,14 +72,12 @@ AccessibleShapeTreeInfo& AccessibleShapeTreeInfo::operator= (const AccessibleSha
     return *this;
 }
 
-
 AccessibleShapeTreeInfo::~AccessibleShapeTreeInfo()
 {
     SolarMutexGuard g;
     mpWindow.reset();
 }
 
-
 void AccessibleShapeTreeInfo::SetDocumentWindow (
     const Reference<XAccessibleComponent>& rxDocumentWindow)
 {
@@ -93,32 +91,27 @@ void AccessibleShapeTreeInfo::SetModelBroadcaster (
     mxModelBroadcaster = rxModelBroadcaster;
 }
 
-
 void AccessibleShapeTreeInfo::SetSdrView (SdrView* pView)
 {
     mpView = pView;
 }
 
-
 void AccessibleShapeTreeInfo::SetController (
     const Reference<frame::XController>& rxController)
 {
     mxController = rxController;
 }
 
-
-void AccessibleShapeTreeInfo::SetWindow (vcl::Window* pWindow)
+void AccessibleShapeTreeInfo::SetDevice(OutputDevice* pDevice)
 {
-    mpWindow = pWindow;
+    mpWindow = pDevice;
 }
 
-
 void AccessibleShapeTreeInfo::SetViewForwarder (const IAccessibleViewForwarder* pViewForwarder)
 {
     mpViewForwarder = pViewForwarder;
 }
 
-
 } // end of namespace accessibility
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/source/accessibility/GraphCtlAccessibleContext.cxx b/svx/source/accessibility/GraphCtlAccessibleContext.cxx
index 23584422480f..065515de3604 100644
--- a/svx/source/accessibility/GraphCtlAccessibleContext.cxx
+++ b/svx/source/accessibility/GraphCtlAccessibleContext.cxx
@@ -96,7 +96,7 @@ SvxGraphCtrlAccessibleContext::SvxGraphCtrlAccessibleContext(
     }
 
     maTreeInfo.SetSdrView( mpView );
-    maTreeInfo.SetWindow( mpControl );
+    maTreeInfo.SetDevice( mpControl );
     maTreeInfo.SetViewForwarder( this );
 }
 
diff --git a/sw/source/core/access/accmap.cxx b/sw/source/core/access/accmap.cxx
index 6b49f1ca5c55..a2919d91372f 100644
--- a/sw/source/core/access/accmap.cxx
+++ b/sw/source/core/access/accmap.cxx
@@ -243,7 +243,7 @@ public:
         : maMap()
     {
         maInfo.SetSdrView( pMap->GetShell()->GetDrawView() );
-        maInfo.SetWindow( pMap->GetShell()->GetWin() );
+        maInfo.SetDevice( pMap->GetShell()->GetWin() );
         maInfo.SetViewForwarder( pMap );
         uno::Reference < document::XEventBroadcaster > xModelBroadcaster =
             new SwDrawModellListener_Impl(
commit aaa44dc0b07262d2fcae8f6136566baa6c8c169d
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Thu May 16 13:00:03 2019 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Fri May 17 09:54:36 2019 +0200

    recipients just need OutputDevices
    
    Change-Id: Ia4b2fae44a873323444faf558d831b31635a8ee1
    Reviewed-on: https://gerrit.libreoffice.org/72411
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/svx/source/accessibility/AccessibleControlShape.cxx b/svx/source/accessibility/AccessibleControlShape.cxx
index e570bcb68bce..4721672ee00e 100644
--- a/svx/source/accessibility/AccessibleControlShape.cxx
+++ b/svx/source/accessibility/AccessibleControlShape.cxx
@@ -146,7 +146,7 @@ AccessibleControlShape::~AccessibleControlShape()
 }
 
 namespace {
-    Reference< XContainer > lcl_getControlContainer( const vcl::Window* _pWin, const SdrView* _pView )
+    Reference< XContainer > lcl_getControlContainer( const OutputDevice* _pWin, const SdrView* _pView )
     {
         Reference< XContainer > xReturn;
         DBG_ASSERT( _pView, "lcl_getControlContainer: invalid view!" );
@@ -189,7 +189,7 @@ void AccessibleControlShape::Init()
         // I'm aware of at the moment .....
 
         // get the control which belongs to our model (relative to our view)
-        const vcl::Window* pViewWindow = maShapeTreeInfo.GetWindow();
+        const OutputDevice* pViewWindow = maShapeTreeInfo.GetWindow();
         SdrUnoObj* pUnoObjectImpl = dynamic_cast<SdrUnoObj*>( GetSdrObjectFromXShape(mxShape)  );
         SdrView* pView = maShapeTreeInfo.GetSdrView();
         OSL_ENSURE( pView && pViewWindow && pUnoObjectImpl, "AccessibleControlShape::Init: no view, or no view window, no SdrUnoObj!" );


More information about the Libreoffice-commits mailing list