[Libreoffice-commits] core.git: sw/source

Caolán McNamara caolanm at redhat.com
Thu Apr 6 20:10:44 UTC 2017


 sw/source/core/access/acccell.cxx    |    2 +-
 sw/source/core/access/acccontext.cxx |   13 ++++++++++---
 sw/source/core/access/acccontext.hxx |    4 ++++
 3 files changed, 15 insertions(+), 4 deletions(-)

New commits:
commit d3099d03d5302303b9b7a3c29093455ff58be1ae
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Wed Apr 5 10:10:46 2017 +0100

    split getAccessibleParent
    
    Change-Id: I579064ec8a6d419f0b065f94d505103d3629c483

diff --git a/sw/source/core/access/acccell.cxx b/sw/source/core/access/acccell.cxx
index 824169db9604..f1756996c17d 100644
--- a/sw/source/core/access/acccell.cxx
+++ b/sw/source/core/access/acccell.cxx
@@ -110,7 +110,7 @@ SwAccessibleCell::SwAccessibleCell(std::shared_ptr<SwAccessibleMap> const& pInit
     m_bIsSelected = IsSelected();
 
     css::uno::Reference<css::accessibility::XAccessible> xTableReference(
-        getAccessibleParent());
+        getAccessibleParentImpl());
     css::uno::Reference<css::accessibility::XAccessibleContext> xContextTable(
         xTableReference, css::uno::UNO_QUERY);
     SAL_WARN_IF(
diff --git a/sw/source/core/access/acccontext.cxx b/sw/source/core/access/acccontext.cxx
index cba7854b5c35..a40303b866bb 100644
--- a/sw/source/core/access/acccontext.cxx
+++ b/sw/source/core/access/acccontext.cxx
@@ -630,12 +630,10 @@ uno::Reference< XAccessible> SAL_CALL
     return xChild;
 }
 
-uno::Reference< XAccessible> SAL_CALL SwAccessibleContext::getAccessibleParent()
+uno::Reference< XAccessible> SAL_CALL SwAccessibleContext::getAccessibleParentImpl()
 {
     SolarMutexGuard aGuard;
 
-    ThrowIfDisposed();
-
     const SwFrame *pUpper = GetParent();
     OSL_ENSURE( pUpper != nullptr || m_isDisposing, "no upper found" );
 
@@ -654,6 +652,15 @@ uno::Reference< XAccessible> SAL_CALL SwAccessibleContext::getAccessibleParent()
     return xAcc;
 }
 
+uno::Reference< XAccessible> SAL_CALL SwAccessibleContext::getAccessibleParent()
+{
+    SolarMutexGuard aGuard;
+
+    ThrowIfDisposed();
+
+    return getAccessibleParentImpl();
+}
+
 sal_Int32 SAL_CALL SwAccessibleContext::getAccessibleIndexInParent()
 {
     SolarMutexGuard aGuard;
diff --git a/sw/source/core/access/acccontext.hxx b/sw/source/core/access/acccontext.hxx
index b5a0dd0e6837..1d4808bf34da 100644
--- a/sw/source/core/access/acccontext.hxx
+++ b/sw/source/core/access/acccontext.hxx
@@ -201,6 +201,10 @@ protected:
 
     virtual ~SwAccessibleContext() override;
 
+    // Return a reference to the parent.
+    css::uno::Reference< css::accessibility::XAccessible> SAL_CALL
+        getAccessibleParentImpl();
+
 public:
     SwAccessibleContext( std::shared_ptr<SwAccessibleMap> const& pMap,
                          sal_Int16 nRole, const SwFrame *pFrame );


More information about the Libreoffice-commits mailing list