[Libreoffice-commits] core.git: Branch 'private/tml/cp-4.2-ia2' - 9 commits - accessibility/inc accessibility/source editeng/source include/svtools include/svx sc/source svtools/source svx/source vcl/source

Stephan Bergmann sbergman at redhat.com
Tue Jun 3 06:39:02 PDT 2014


 accessibility/inc/accessibility/extended/AccessibleGridControl.hxx     |    3 
 accessibility/inc/accessibility/extended/AccessibleGridControlBase.hxx |   39 ----
 accessibility/source/extended/AccessibleGridControl.cxx                |   16 -
 accessibility/source/extended/AccessibleGridControlBase.cxx            |   41 +++-
 accessibility/source/extended/AccessibleGridControlHeader.cxx          |   11 -
 accessibility/source/extended/AccessibleGridControlHeaderCell.cxx      |    5 
 accessibility/source/extended/AccessibleGridControlTable.cxx           |   38 ++--
 accessibility/source/extended/AccessibleGridControlTableBase.cxx       |   22 +-
 accessibility/source/extended/AccessibleGridControlTableCell.cxx       |   38 ++--
 accessibility/source/standard/vclxaccessiblebox.cxx                    |    2 
 editeng/source/accessibility/AccessibleEditableTextPara.cxx            |   11 -
 include/svtools/accessibletable.hxx                                    |    2 
 include/svx/svdobj.hxx                                                 |    2 
 sc/source/ui/Accessibility/AccessibleCell.cxx                          |   14 +
 sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx                   |   83 +++-------
 sc/source/ui/inc/AccessibleCell.hxx                                    |   12 +
 sc/source/ui/inc/AccessibleSpreadsheet.hxx                             |   11 -
 svtools/source/table/tablecontrol_impl.cxx                             |    2 
 svx/source/accessibility/AccessibleShape.cxx                           |   35 +---
 svx/source/svdraw/svdobj.cxx                                           |    5 
 vcl/source/app/svdata.cxx                                              |    2 
 21 files changed, 172 insertions(+), 222 deletions(-)

New commits:
commit e053b3489df7a2b0b9abb3a5a573042ad2d16bbf
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Wed Nov 27 09:12:38 2013 +0100

    Revert sense in VCLXAccessibleBox::getAccessibleActionCount again
    
    ...this had been switched from "m_bIsDropDownBox ? 1 : 0" to "m_bIsDropDownBox ?
    0 : 1" in efb23f29983f87104a684e7fab00b84fc59d131d "Integrate branch of
    IAccessible2" for no apparent reason and broke JunitTest_testtools_unoapi.
    
    Change-Id: I276d2f452648387a5fa693349cf868787b2d48e1

diff --git a/accessibility/source/standard/vclxaccessiblebox.cxx b/accessibility/source/standard/vclxaccessiblebox.cxx
index 2f40002..608f17f 100644
--- a/accessibility/source/standard/vclxaccessiblebox.cxx
+++ b/accessibility/source/standard/vclxaccessiblebox.cxx
@@ -409,7 +409,7 @@ sal_Int32 SAL_CALL VCLXAccessibleBox::getAccessibleActionCount (void)
 
     // There is one action for drop down boxes (toggle popup) and none for
     // the other boxes.
-    return m_bIsDropDownBox ? 0 : 1;
+    return m_bIsDropDownBox ? 1 : 0;
 }
 
 sal_Bool SAL_CALL VCLXAccessibleBox::doAccessibleAction (sal_Int32 nIndex)
commit 6f2a4ee2e62b1094e505f484ae56e265c8a13ce0
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Wed Nov 27 11:28:57 2013 +0100

    IAccessible2: revert some bounds-checking changes again
    
    ...that were introduced with c23ab5eaed57cc3fb5860e26c591c73c5b22687b "Integrate
    branch of IAccessible2" but broke JunitTest_sc_unoapi, which expects calls to
    getCharacterAttributes and getIndexAtPoint to actually fail for out-of-bounds
    arguments.  The above commit does not make it obvious why those changes were
    actually made.
    
    Change-Id: I3492c3e6a49d68885df1206e9368f4483c0dc4f9

diff --git a/editeng/source/accessibility/AccessibleEditableTextPara.cxx b/editeng/source/accessibility/AccessibleEditableTextPara.cxx
index 7bd87b0..5a575be 100644
--- a/editeng/source/accessibility/AccessibleEditableTextPara.cxx
+++ b/editeng/source/accessibility/AccessibleEditableTextPara.cxx
@@ -1381,11 +1381,7 @@ namespace accessibility
         EBulletInfo aBulletInfo = rCacheTF.GetBulletInfo( static_cast< sal_uInt16 >(GetParagraphIndex()) );
         if (aBulletInfo.bVisible)
             nIndex += aBulletInfo.aText.getLength();
-        if (nIndex != 0 && nIndex >= getCharacterCount())
-            nIndex = getCharacterCount()-1;
-        //
-        if (nIndex != 0)
-            CheckIndex(nIndex); // may throw IndexOutOfBoundsException
+        CheckIndex(nIndex); // may throw IndexOutOfBoundsException
 
         bool bSupplementalMode = false;
         uno::Sequence< OUString > aPropertyNames = rRequestedAttributes;
@@ -1534,9 +1530,6 @@ namespace accessibility
 
         SolarMutexGuard aGuard;
 
-        if ((rPoint.X <= 0) && (rPoint.Y <= 0))
-            return 0;
-
         sal_Int32 nPara;
         sal_uInt16 nIndex;
 
commit b0e63964ecf0a1cc9541612d561e469f972bf6b6
Author: Armin Le Grand <alg at apache.org>
Date:   Wed Nov 27 13:00:02 2013 +0000

    removed pCaptionObj from accessibility
    
    it was not initialized but accessed in one place. Checked with symphony code,
    there was a set method which is not in AOO trunk, thus solved accesses to zero
    pointer usage
    
    (cherry picked from commit bd0c3b940f6006d3cb49381230795db667aeb943)
    
    Conflicts:
    	svx/inc/svx/svdobj.hxx
    	svx/source/svdraw/svdobj.cxx
    
    Change-Id: Ic8dec5c6def35753d757066c7ea02e1a92b46f6c

diff --git a/include/svx/svdobj.hxx b/include/svx/svdobj.hxx
index ee08d6b..f1b3dbb 100644
--- a/include/svx/svdobj.hxx
+++ b/include/svx/svdobj.hxx
@@ -357,7 +357,6 @@ protected:
     SdrObjUserCall*             pUserCall;
     SdrObjPlusData*             pPlusData;    // Broadcaster, UserData, Konnektoren, ... (Das ist der Bitsack)
 
-    SdrObject*  pCaptionObj;
     sal_uInt32                  nOrdNum;      // Rangnummer des Obj in der Liste
 
     SfxGrabBagItem*             pGrabBagItem; // Holds the GrabBagItem property
@@ -1036,7 +1035,6 @@ public:
     // #i121917#
     virtual bool HasText() const;
 
-    const SdrObject* GetCaptionObj() const;
 protected:
     /** Sets a new UNO shape
       *
diff --git a/svx/source/accessibility/AccessibleShape.cxx b/svx/source/accessibility/AccessibleShape.cxx
index 47d951d..a8419d8 100644
--- a/svx/source/accessibility/AccessibleShape.cxx
+++ b/svx/source/accessibility/AccessibleShape.cxx
@@ -421,36 +421,27 @@ uno::Reference<XAccessibleRelationSet> SAL_CALL
         throw (::com::sun::star::uno::RuntimeException)
 {
     ::osl::MutexGuard aGuard (maMutex);
-    ::utl::AccessibleRelationSetHelper* pRelationSet =
-        new utl::AccessibleRelationSetHelper;
-    SdrObject* pCaptionSdr = const_cast < SdrObject* > ( m_pShape->GetCaptionObj() )  ;
-    if(pCaptionSdr!=NULL)
-    {
-            uno::Sequence< uno::Reference< uno::XInterface > > aSequence(1);
-            uno::Reference<drawing::XShape> xCaptionShape ( pCaptionSdr->getUnoShape(),uno::UNO_QUERY);
-            if(xCaptionShape.is())
-            {
-                aSequence[0] = mpParent->GetAccessibleCaption(xCaptionShape);
-                pRelationSet->AddRelation( AccessibleRelation( AccessibleRelationType::DESCRIBED_BY, aSequence ) );
-        }
-    }
-    else
+    ::utl::AccessibleRelationSetHelper* pRelationSet = new utl::AccessibleRelationSetHelper;
+    uno::Sequence< uno::Reference< uno::XInterface > > aSequence(1);
+    aSequence[0] = mpParent->GetAccessibleCaption(mxShape);
+
+    //this mxshape is the captioned shape, only for sw
+    if(aSequence[0].get())
     {
-        //this mxshape is the captioned shape, only for sw
-        if(mpParent->GetAccessibleCaption(mxShape).get())
-        {
-            uno::Sequence< uno::Reference< uno::XInterface > > aSequence(1);
-            aSequence[0] = mpParent->GetAccessibleCaption(mxShape);
-            pRelationSet->AddRelation( AccessibleRelation( AccessibleRelationType::DESCRIBED_BY, aSequence ) );
-        }
+        pRelationSet->AddRelation(
+            AccessibleRelation( AccessibleRelationType::DESCRIBED_BY, aSequence ) );
     }
-   if (pRelationSet != NULL)
+
+    if (pRelationSet != NULL)
     {
         return uno::Reference<XAccessibleRelationSet> (
             new ::utl::AccessibleRelationSetHelper (*pRelationSet));
     }
     else
+    {
         return uno::Reference<XAccessibleRelationSet>(NULL);
+    }
+
     return uno::Reference<XAccessibleRelationSet>();
 }
 
diff --git a/svx/source/svdraw/svdobj.cxx b/svx/source/svdraw/svdobj.cxx
index 4016094..b495c5b 100644
--- a/svx/source/svdraw/svdobj.cxx
+++ b/svx/source/svdraw/svdobj.cxx
@@ -3128,11 +3128,6 @@ void SdrObject::notifyShapePropertyChange( const ::svx::ShapeProperty _eProperty
         return pSvxShape->getShapePropertyChangeNotifier().notifyPropertyChange( _eProperty );
 }
 
-const SdrObject* SdrObject::GetCaptionObj() const
-{
-    return pCaptionObj;
-}
-
 ////////////////////////////////////////////////////////////////////////////////////////////////////
 //
 // transformation interface for StarOfficeAPI. This implements support for
commit 6db10e0c8d6e5d16f26c080081cff2ed7ce186ca
Author: Tor Lillqvist <tml at collabora.com>
Date:   Thu Dec 5 21:02:39 2013 +0200

    I think SAL_FORCE_IACCESSIBLE2 is what is intended here
    
    Change-Id: If03696cfcc9a3d5053af881e00a4c6a484cbd445

diff --git a/vcl/source/app/svdata.cxx b/vcl/source/app/svdata.cxx
index 500e18d..d326335 100644
--- a/vcl/source/app/svdata.cxx
+++ b/vcl/source/app/svdata.cxx
@@ -295,7 +295,7 @@ bool ImplInitAccessBridge()
         css::uno::Reference< XComponentContext > xContext(comphelper::getProcessComponentContext());
 
 #ifdef _WIN32
-        if (!HasAtHook() && !getenv("SAL_DISABLE_IACCESSIBLE2"))
+        if (!HasAtHook() && !getenv("SAL_FORCE_IACCESSIBLE2"))
         {
             SAL_INFO("vcl", "Apparently no running AT -> "
                      "not enabling IAccessible2 integration");
commit 33f279386881c00ecaef472b0225a213678775ad
Author: Steve Yin <steve_y at apache.org>
Date:   Tue Dec 10 07:58:01 2013 +0000

    Resolves: #i123620# IAccessibleHypertext::hyperlinkIndex returns 0...
    
    when editing a cell/object where there is no link
    
    (cherry picked from commit 552e71c2482b5911ac485c9331a4f354ba7150b5)
    
    Change-Id: I9be20b045d3472f15c98352928d45a1349cec5c4

diff --git a/editeng/source/accessibility/AccessibleEditableTextPara.cxx b/editeng/source/accessibility/AccessibleEditableTextPara.cxx
index e9941df..7bd87b0 100644
--- a/editeng/source/accessibility/AccessibleEditableTextPara.cxx
+++ b/editeng/source/accessibility/AccessibleEditableTextPara.cxx
@@ -2915,7 +2915,7 @@ namespace accessibility
 //        const sal_uInt16 nEEIndex = aIndex.GetEEIndex();
 
         const sal_uInt16 nEEIndex = rT.CalcEditEngineIndex( nPara, nCharIndex );
-        sal_Int32 nHLIndex = 0;
+        sal_Int32 nHLIndex = -1; //i123620
         sal_uInt16 nHyperLink = 0;
         sal_uInt16 nFields = rT.GetFieldCount( nPara );
         for ( sal_uInt16 n = 0; n < nFields; n++ )
commit a37e31bf5c4e305cd04abe32e32345e9c8242138
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Thu Dec 12 18:10:56 2013 +0100

    Only call ScAccessibleCell::Init once on freshly created cells
    
    Change-Id: I64542af7585cea9d361a99f83e110e1e8135bf2d

diff --git a/sc/source/ui/Accessibility/AccessibleCell.cxx b/sc/source/ui/Accessibility/AccessibleCell.cxx
index 626748b..b69279e 100644
--- a/sc/source/ui/Accessibility/AccessibleCell.cxx
+++ b/sc/source/ui/Accessibility/AccessibleCell.cxx
@@ -50,7 +50,19 @@
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::accessibility;
 
-//=====  internal  ============================================================
+rtl::Reference<ScAccessibleCell> ScAccessibleCell::create(
+        const uno::Reference<XAccessible>& rxParent,
+        ScTabViewShell* pViewShell,
+        ScAddress& rCellAddress,
+        sal_Int32 nIndex,
+        ScSplitPos eSplitPos,
+        ScAccessibleDocument* pAccDoc)
+{
+    rtl::Reference<ScAccessibleCell> x(new ScAccessibleCell(
+        rxParent, pViewShell, rCellAddress, nIndex, eSplitPos, pAccDoc));
+    x->Init();
+    return x;
+}
 
 ScAccessibleCell::ScAccessibleCell(
         const uno::Reference<XAccessible>& rxParent,
diff --git a/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx b/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx
index 8f70b07..0960a37 100644
--- a/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx
+++ b/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx
@@ -258,7 +258,6 @@ ScAccessibleSpreadsheet::ScAccessibleSpreadsheet(
     mbIsSpreadsheet( sal_True ),
     m_bFormulaMode(sal_False),
     m_bFormulaLastMode(sal_False),
-    m_pAccFormulaCell(NULL),
     m_nMinX(0),m_nMaxX(0),m_nMinY(0),m_nMaxY(0)
 {
     ConstructScAccessibleSpreadsheet( pAccDoc, pViewShell, nTab, eSplitPos );
@@ -289,7 +288,7 @@ void ScAccessibleSpreadsheet::ConstructScAccessibleSpreadsheet(
     mpMarkedRanges = 0;
     mpSortedMarkedCells = 0;
     mpAccDoc = pAccDoc;
-    mpAccCell = 0;
+    mpAccCell.clear();
     meSplitPos = eSplitPos;
     mnTab = nTab;
     mbHasSelection = false;
@@ -306,8 +305,6 @@ void ScAccessibleSpreadsheet::ConstructScAccessibleSpreadsheet(
         mbHasSelection = rMarkData.GetTableSelect(maActiveCell.Tab()) &&
                     (rMarkData.IsMarked() || rMarkData.IsMultiMarked());
         mpAccCell = GetAccessibleCellAt(maActiveCell.Row(), maActiveCell.Col());
-        mpAccCell->acquire();
-        mpAccCell->Init();
         ScDocument* pScDoc= GetDocument(mpViewShell);
         if (pScDoc)
         {
@@ -324,11 +321,7 @@ void SAL_CALL ScAccessibleSpreadsheet::disposing()
         mpViewShell->RemoveAccessibilityObject(*this);
         mpViewShell = NULL;
     }
-    if (mpAccCell)
-    {
-        mpAccCell->release();
-        mpAccCell = NULL;
-    }
+    mpAccCell.clear();
 
     ScAccessibleTableBase::disposing();
 }
@@ -359,8 +352,7 @@ void ScAccessibleSpreadsheet::LostFocus()
     AccessibleEventObject aEvent;
     aEvent.EventId = AccessibleEventId::ACTIVE_DESCENDANT_CHANGED;
     aEvent.Source = uno::Reference< XAccessibleContext >(this);
-    uno::Reference< XAccessible > xOld = mpAccCell;
-    aEvent.OldValue <<= xOld;
+    aEvent.OldValue <<= uno::Reference<XAccessible>(mpAccCell.get());
 
     CommitChange(aEvent);
 
@@ -375,7 +367,7 @@ void ScAccessibleSpreadsheet::GotFocus()
     uno::Reference< XAccessible > xNew;
     if (IsFormulaMode())
     {
-        if (!m_pAccFormulaCell || !m_bFormulaLastMode)
+        if (!m_pAccFormulaCell.is() || !m_bFormulaLastMode)
         {
             ScAddress aFormulaAddr;
             if(!GetFormulaCurrentFocusCell(aFormulaAddr))
@@ -383,19 +375,14 @@ void ScAccessibleSpreadsheet::GotFocus()
                 return;
             }
             m_pAccFormulaCell = GetAccessibleCellAt(aFormulaAddr.Row(),aFormulaAddr.Col());
-
-            m_pAccFormulaCell->acquire();
-            m_pAccFormulaCell->Init();
-
-
         }
-        xNew = m_pAccFormulaCell;
+        xNew = m_pAccFormulaCell.get();
     }
     else
     {
         if(mpAccCell->GetCellAddress() == maActiveCell)
         {
-            xNew = mpAccCell;
+            xNew = mpAccCell.get();
         }
         else
         {
@@ -450,11 +437,7 @@ void ScAccessibleSpreadsheet::Notify( SfxBroadcaster& rBC, const SfxHint& rHint
                 {//Last Notify Mode  Is Formula Mode.
                     m_vecFormulaLastMyAddr.clear();
                     RemoveFormulaSelection(sal_True);
-                    if(m_pAccFormulaCell)
-                    {
-                        m_pAccFormulaCell->release();
-                        m_pAccFormulaCell =NULL;
-                    }
+                    m_pAccFormulaCell.clear();
                     //Remove All Selection
                 }
                 m_bFormulaLastMode = m_bFormulaMode;
@@ -547,13 +530,12 @@ void ScAccessibleSpreadsheet::Notify( SfxBroadcaster& rBC, const SfxHint& rHint
                     uno::Reference< XAccessible > xChild ;
                     if (bNewPosCellFocus)
                     {
-                        xChild = mpAccCell;
+                        xChild = mpAccCell.get();
                     }
                     else
                     {
                         mpAccCell = GetAccessibleCellAt(aNewCell.Row(),aNewCell.Col());
-                        xChild = mpAccCell;
-                        mpAccCell->Init();
+                        xChild = mpAccCell.get();
 
                         maActiveCell = aNewCell;
                         aEvent.EventId = AccessibleEventId::ACTIVE_DESCENDANT_CHANGED_NOFOCUS;
@@ -728,8 +710,7 @@ void ScAccessibleSpreadsheet::Notify( SfxBroadcaster& rBC, const SfxHint& rHint
                 AccessibleEventObject aEvent;
                 aEvent.EventId = AccessibleEventId::ACTIVE_DESCENDANT_CHANGED;
                 aEvent.Source = uno::Reference< XAccessibleContext >(this);
-                uno::Reference< XAccessible > xNew = mpAccCell;
-                aEvent.NewValue <<= xNew;
+                aEvent.NewValue <<= uno::Reference<XAccessible>(mpAccCell.get());
 
                 CommitChange(aEvent);
             }
@@ -772,15 +753,10 @@ void ScAccessibleSpreadsheet::CommitFocusCell(const ScAddress &aNewCell)
     AccessibleEventObject aEvent;
     aEvent.EventId = AccessibleEventId::ACTIVE_DESCENDANT_CHANGED;
     aEvent.Source = uno::Reference< XAccessible >(this);
-    uno::Reference< XAccessible > xOld = mpAccCell;
-    mpAccCell->release();
-    mpAccCell=NULL;
-    aEvent.OldValue <<= xOld;
+    aEvent.OldValue <<= uno::Reference<XAccessible>(mpAccCell.get());
+    mpAccCell.clear();
     mpAccCell = GetAccessibleCellAt(aNewCell.Row(), aNewCell.Col());
-    mpAccCell->acquire();
-    mpAccCell->Init();
-    uno::Reference< XAccessible > xNew = mpAccCell;
-    aEvent.NewValue <<= xNew;
+    aEvent.NewValue <<= uno::Reference<XAccessible>(mpAccCell.get());
     maActiveCell = aNewCell;
     ScDocument* pScDoc= GetDocument(mpViewShell);
     if (pScDoc)
@@ -941,32 +917,29 @@ sal_Bool SAL_CALL ScAccessibleSpreadsheet::isAccessibleColumnSelected( sal_Int32
     return bResult;
 }
 
-ScAccessibleCell* ScAccessibleSpreadsheet::GetAccessibleCellAt(sal_Int32 nRow, sal_Int32 nColumn)
+rtl::Reference<ScAccessibleCell> ScAccessibleSpreadsheet::GetAccessibleCellAt(sal_Int32 nRow, sal_Int32 nColumn)
 {
-    ScAccessibleCell* pAccessibleCell = NULL;
     if (IsFormulaMode())
     {
         ScAddress aCellAddress(static_cast<SCCOL>(nColumn), nRow, mpViewShell->GetViewData()->GetTabNo());
-        if ((aCellAddress == m_aFormulaActiveCell) && m_pAccFormulaCell)
+        if ((aCellAddress == m_aFormulaActiveCell) && m_pAccFormulaCell.is())
         {
-            pAccessibleCell = m_pAccFormulaCell;
+            return m_pAccFormulaCell;
         }
         else
-            pAccessibleCell = new ScAccessibleCell(this, mpViewShell, aCellAddress, GetAccessibleIndexFormula(nRow, nColumn), meSplitPos, mpAccDoc);
+            return ScAccessibleCell::create(this, mpViewShell, aCellAddress, GetAccessibleIndexFormula(nRow, nColumn), meSplitPos, mpAccDoc);
     }
     else
     {
         ScAddress aCellAddress(static_cast<SCCOL>(maRange.aStart.Col() + nColumn),
             static_cast<SCROW>(maRange.aStart.Row() + nRow), maRange.aStart.Tab());
-        if ((aCellAddress == maActiveCell) && mpAccCell)
+        if ((aCellAddress == maActiveCell) && mpAccCell.is())
         {
-            pAccessibleCell = mpAccCell;
+            return mpAccCell;
         }
         else
-            pAccessibleCell = new ScAccessibleCell(this, mpViewShell, aCellAddress, getAccessibleIndex(nRow, nColumn), meSplitPos, mpAccDoc);
+            return ScAccessibleCell::create(this, mpViewShell, aCellAddress, getAccessibleIndex(nRow, nColumn), meSplitPos, mpAccDoc);
     }
-
-    return pAccessibleCell;
 }
 
 uno::Reference< XAccessible > SAL_CALL ScAccessibleSpreadsheet::getAccessibleCellAt( sal_Int32 nRow, sal_Int32 nColumn )
@@ -982,11 +955,8 @@ uno::Reference< XAccessible > SAL_CALL ScAccessibleSpreadsheet::getAccessibleCel
         nColumn < 0)
         throw lang::IndexOutOfBoundsException();
     }
-    uno::Reference<XAccessible> xAccessible;
-    ScAccessibleCell* pAccessibleCell = GetAccessibleCellAt(nRow, nColumn);
-    xAccessible = pAccessibleCell;
-    pAccessibleCell->Init();
-    return xAccessible;
+    rtl::Reference<ScAccessibleCell> pAccessibleCell = GetAccessibleCellAt(nRow, nColumn);
+    return pAccessibleCell.get();
 }
 
 sal_Bool SAL_CALL ScAccessibleSpreadsheet::isAccessibleSelected( sal_Int32 nRow, sal_Int32 nColumn )
@@ -1621,12 +1591,9 @@ void ScAccessibleSpreadsheet::NotifyRefMode()
         aEvent.Source = uno::Reference< XAccessible >(this);
         aEvent.EventId = AccessibleEventId::ACTIVE_DESCENDANT_CHANGED;
         aEvent.Source = uno::Reference< XAccessible >(this);
-        uno::Reference< XAccessible > xOld = m_pAccFormulaCell;
-        aEvent.OldValue <<= xOld;
+        aEvent.OldValue <<= uno::Reference<XAccessible>(m_pAccFormulaCell.get());
         m_pAccFormulaCell = GetAccessibleCellAt(aFormulaAddr.Row(), aFormulaAddr.Col());
-        m_pAccFormulaCell->acquire();
-        m_pAccFormulaCell->Init();
-        uno::Reference< XAccessible > xNew = m_pAccFormulaCell;
+        uno::Reference< XAccessible > xNew = m_pAccFormulaCell.get();
         aEvent.NewValue <<= xNew;
         CommitChange(aEvent);
         if (nRefStartX == nRefEndX && nRefStartY == nRefEndY)
@@ -1671,7 +1638,7 @@ void ScAccessibleSpreadsheet::NotifyRefMode()
                     uno::Reference< XAccessible > xChild;
                     if (*viAddr == aFormulaAddr)
                     {
-                        xChild = m_pAccFormulaCell;
+                        xChild = m_pAccFormulaCell.get();
                     }
                     else
                     {
diff --git a/sc/source/ui/inc/AccessibleCell.hxx b/sc/source/ui/inc/AccessibleCell.hxx
index bd8185d..dd53521 100644
--- a/sc/source/ui/inc/AccessibleCell.hxx
+++ b/sc/source/ui/inc/AccessibleCell.hxx
@@ -26,6 +26,7 @@
 #include "viewdata.hxx"
 #include <com/sun/star/accessibility/XAccessibleExtendedAttributes.hpp>
 #include <com/sun/star/accessibility/XAccessibleRelationSet.hpp>
+#include <rtl/ref.hxx>
 #include <unotools/accessiblerelationsethelper.hxx>
 #include <editeng/AccessibleStaticTextBase.hxx>
 #include <comphelper/uno3.hxx>
@@ -46,7 +47,16 @@ class ScAccessibleCell
         public  ScAccessibleCellAttributeImpl
 {
 public:
-    //=====  internal  ========================================================
+    static rtl::Reference<ScAccessibleCell> create(
+        const ::com::sun::star::uno::Reference<
+        ::com::sun::star::accessibility::XAccessible>& rxParent,
+        ScTabViewShell* pViewShell,
+        ScAddress& rCellAddress,
+        sal_Int32 nIndex,
+        ScSplitPos eSplitPos,
+        ScAccessibleDocument* pAccDoc);
+
+private:
     ScAccessibleCell(
         const ::com::sun::star::uno::Reference<
         ::com::sun::star::accessibility::XAccessible>& rxParent,
diff --git a/sc/source/ui/inc/AccessibleSpreadsheet.hxx b/sc/source/ui/inc/AccessibleSpreadsheet.hxx
index 56749be..b2354aa 100644
--- a/sc/source/ui/inc/AccessibleSpreadsheet.hxx
+++ b/sc/source/ui/inc/AccessibleSpreadsheet.hxx
@@ -21,6 +21,10 @@
 #ifndef _SC_ACCESSIBLESPREADSHEET_HXX
 #define _SC_ACCESSIBLESPREADSHEET_HXX
 
+#include <sal/config.h>
+
+#include <rtl/ref.hxx>
+
 #include "AccessibleTableBase.hxx"
 #include "viewdata.hxx"
 
@@ -92,6 +96,7 @@ public:
     void BoundingBoxChanged();
     void VisAreaChanged();
 
+private:
     ///=====  SfxListener  =====================================================
     virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
 
@@ -135,7 +140,7 @@ public:
                     throw (::com::sun::star::uno::RuntimeException,
                             ::com::sun::star::lang::IndexOutOfBoundsException);
 
-    ScAccessibleCell* GetAccessibleCellAt(sal_Int32 nRow, sal_Int32 nColumn);
+    rtl::Reference<ScAccessibleCell> GetAccessibleCellAt(sal_Int32 nRow, sal_Int32 nColumn);
 
     /// Returns a boolean value indicating whether the accessible at a specified row and column is selected.
     virtual sal_Bool SAL_CALL
@@ -258,7 +263,7 @@ private:
     ScRangeList*    mpMarkedRanges;
     std::vector<ScMyAddress>* mpSortedMarkedCells;
     ScAccessibleDocument* mpAccDoc;
-    ScAccessibleCell*   mpAccCell;
+    rtl::Reference<ScAccessibleCell> mpAccCell;
     Rectangle       maVisCells;
     ScSplitPos      meSplitPos;
     ScAddress       maActiveCell;
@@ -300,7 +305,7 @@ private:
     ScAddress m_aFormulaActiveCell;
     MAP_ADDR_XACC m_mapFormulaSelectionSend;
     VEC_MYADDR m_vecFormulaLastMyAddr;
-    ScAccessibleCell*   m_pAccFormulaCell;
+    rtl::Reference<ScAccessibleCell> m_pAccFormulaCell;
     sal_uInt16 m_nMinX;
     sal_uInt16 m_nMaxX;
     sal_Int32 m_nMinY;
commit 8348c30e5a64adf5d67772a89ed403334775a0a9
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Thu Dec 12 00:29:42 2013 +0100

    Keep maActiveCell, mpAccCell in sync
    
    Otherwise ScAccessibleSpreadsheet::GetAccessibleCellAt could return wrong results
    and JunitTest_sc_unoapi would fail at least on Mac OS X.
    
    Change-Id: I65e9231920d13393a6991db318d330ee42a985d4

diff --git a/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx b/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx
index f610824..8f70b07 100644
--- a/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx
+++ b/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx
@@ -551,7 +551,9 @@ void ScAccessibleSpreadsheet::Notify( SfxBroadcaster& rBC, const SfxHint& rHint
                     }
                     else
                     {
-                        xChild = getAccessibleCellAt(aNewCell.Row(),aNewCell.Col());
+                        mpAccCell = GetAccessibleCellAt(aNewCell.Row(),aNewCell.Col());
+                        xChild = mpAccCell;
+                        mpAccCell->Init();
 
                         maActiveCell = aNewCell;
                         aEvent.EventId = AccessibleEventId::ACTIVE_DESCENDANT_CHANGED_NOFOCUS;
commit 2581b4e25ca7dffb4a8314bcda29e4f712e7aeb5
Author: Michael Stahl <mstahl at redhat.com>
Date:   Mon Dec 16 15:35:59 2013 +0100

    accessibility: Mutex cleanup in AccessibleGridControl* classes
    
    For unknown reasons this uses both SolarMutex and a OBaseMutex::m_aMutex
    to lock some but not all methods, which seems odd.
    
    - remove a third mutex AccessibleGridControl::m_aMutex that appears
      unused
    - lock OBaseMutex::m_aMutex in AccessibleGridControlBase::isAlive()
      which accesses rBHelper members, which should be sufficient
    - lock SolarMutex in all UNO methods
    - remove misc weird stuff like TC_SolarMethodGuard
    
    Change-Id: I8321757fb4a5043a05c23f2dc9801f5d8c8d911e

diff --git a/accessibility/inc/accessibility/extended/AccessibleGridControl.hxx b/accessibility/inc/accessibility/extended/AccessibleGridControl.hxx
index 5616117..8996a64 100644
--- a/accessibility/inc/accessibility/extended/AccessibleGridControl.hxx
+++ b/accessibility/inc/accessibility/extended/AccessibleGridControl.hxx
@@ -193,7 +193,6 @@ class AccessibleGridControlAccess :public AccessibleGridControlAccess_Base
     ,public ::svt::table::IAccessibleTableControl
 {
 private:
-    ::osl::Mutex                m_aMutex;
     ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >
                                         m_xParent;
     ::svt::table::IAccessibleTable *    m_pTable;
diff --git a/accessibility/inc/accessibility/extended/AccessibleGridControlBase.hxx b/accessibility/inc/accessibility/extended/AccessibleGridControlBase.hxx
index 52fdce8..fb130c3 100644
--- a/accessibility/inc/accessibility/extended/AccessibleGridControlBase.hxx
+++ b/accessibility/inc/accessibility/extended/AccessibleGridControlBase.hxx
@@ -286,11 +286,6 @@ protected:
     void ensureIsAlive() const
         throw ( ::com::sun::star::lang::DisposedException );
 
-    /** @return  The ::osl::Mutex member provided by the class OBaseMutex. */
-    inline ::osl::Mutex& getOslMutex();
-    /** @return  Pointer to the global ::osl::Mutex. */
-    static inline ::osl::Mutex* getOslGlobalMutex();
-
     /** Changes the name of the object (flat assignment, no notify).
         @attention  This method requires a locked mutex. */
     inline void implSetName( const OUString& rName );
@@ -312,13 +307,6 @@ protected:
     ::comphelper::AccessibleEventNotifier::TClientId getClientId() const { return m_aClientId; }
     void setClientId(::comphelper::AccessibleEventNotifier::TClientId _aNewClientId) { m_aClientId = _aNewClientId; }
 
-public:
-    // public versions of internal helper methods, with access control
-    struct TC_AccessControl { friend class TC_SolarMethodGuard; private: TC_AccessControl() { } };
-
-    inline ::osl::Mutex&    getMutex( const TC_AccessControl& ) { return getOslMutex(); }
-    inline void             ensureIsAlive( const TC_AccessControl& ) { ensureIsAlive(); }
-
 protected:
     // members ----------------------------------------------------------------
 
@@ -387,23 +375,6 @@ private:
     GridControlAccessibleElement& operator=( const GridControlAccessibleElement& ); // never implemented
 };
 
-// ============================================================================
-// a helper class for protecting methods which need to lock the solar mutex in addition to the own mutex
-
-typedef ::osl::MutexGuard OslMutexGuard;
-
-class TC_SolarMethodGuard : public SolarMutexGuard, public OslMutexGuard
-{
-public:
-    inline TC_SolarMethodGuard( AccessibleGridControlBase& _rOwner, bool _bEnsureAlive = true )
-        : SolarMutexGuard(),
-        OslMutexGuard( _rOwner.getMutex( AccessibleGridControlBase::TC_AccessControl() ) )
-    {
-        if ( _bEnsureAlive )
-            _rOwner.ensureIsAlive( AccessibleGridControlBase::TC_AccessControl() );
-    }
-};
-
 // inlines --------------------------------------------------------------------
 
 inline ::svt::table::AccessibleTableControlObjType AccessibleGridControlBase::getType() const
@@ -411,16 +382,6 @@ inline ::svt::table::AccessibleTableControlObjType AccessibleGridControlBase::ge
     return m_eObjType;
 }
 
-inline ::osl::Mutex& AccessibleGridControlBase::getOslMutex()
-{
-    return m_aMutex;
-}
-
-inline ::osl::Mutex* AccessibleGridControlBase::getOslGlobalMutex()
-{
-    return ::osl::Mutex::getGlobalMutex();
-}
-
 inline void AccessibleGridControlBase::implSetName(
         const OUString& rName )
 {
diff --git a/accessibility/source/extended/AccessibleGridControl.cxx b/accessibility/source/extended/AccessibleGridControl.cxx
index 9947183..5ee23f6 100644
--- a/accessibility/source/extended/AccessibleGridControl.cxx
+++ b/accessibility/source/extended/AccessibleGridControl.cxx
@@ -87,7 +87,7 @@ AccessibleGridControl::~AccessibleGridControl()
 
 void SAL_CALL AccessibleGridControl::disposing()
 {
-    ::osl::MutexGuard aGuard( getOslMutex() );
+    SolarMutexGuard g;
 
     m_pImpl->m_pTable       = NULL;
     m_pImpl->m_pColumnHeaderBar = NULL;
@@ -122,7 +122,6 @@ sal_Int32 SAL_CALL AccessibleGridControl::getAccessibleChildCount()
     throw ( uno::RuntimeException )
 {
     SolarMutexGuard aSolarGuard;
-    ::osl::MutexGuard aGuard( getOslMutex() );
     ensureIsAlive();
     return m_aTable.GetAccessibleControlCount();
 }
@@ -133,7 +132,6 @@ AccessibleGridControl::getAccessibleChild( sal_Int32 nChildIndex )
     throw ( lang::IndexOutOfBoundsException, uno::RuntimeException )
 {
     SolarMutexGuard aSolarGuard;
-    ::osl::MutexGuard aGuard( getOslMutex() );
 
     if (nChildIndex<0 || nChildIndex>=getAccessibleChildCount())
         throw IndexOutOfBoundsException();
@@ -177,6 +175,8 @@ AccessibleGridControl::getAccessibleChild( sal_Int32 nChildIndex )
 sal_Int16 SAL_CALL AccessibleGridControl::getAccessibleRole()
     throw ( uno::RuntimeException )
 {
+    SolarMutexGuard g;
+
     ensureIsAlive();
     return AccessibleRole::PANEL;
 }
@@ -189,7 +189,6 @@ AccessibleGridControl::getAccessibleAtPoint( const awt::Point& rPoint )
     throw ( uno::RuntimeException )
 {
     SolarMutexGuard aSolarGuard;
-    ::osl::MutexGuard aGuard( getOslMutex() );
     ensureIsAlive();
 
     Reference< XAccessible > xChild;
@@ -220,7 +219,6 @@ void SAL_CALL AccessibleGridControl::grabFocus()
     throw ( uno::RuntimeException )
 {
     SolarMutexGuard aSolarGuard;
-    ::osl::MutexGuard aGuard( getOslMutex() );
     ensureIsAlive();
         m_aTable.GrabFocus();
 }
@@ -229,6 +227,8 @@ void SAL_CALL AccessibleGridControl::grabFocus()
 Any SAL_CALL AccessibleGridControl::getAccessibleKeyBinding()
     throw ( uno::RuntimeException )
 {
+    SolarMutexGuard g;
+
     ensureIsAlive();
     return Any();
 }
@@ -423,7 +423,7 @@ AccessibleGridControlAccess::~AccessibleGridControlAccess()
 // -----------------------------------------------------------------------------
 void AccessibleGridControlAccess::DisposeAccessImpl()
 {
-    ::osl::MutexGuard aGuard( m_aMutex );
+    SolarMutexGuard g;
 
     m_pTable = 0;
     m_pContext = NULL;
@@ -433,7 +433,7 @@ void AccessibleGridControlAccess::DisposeAccessImpl()
 // -----------------------------------------------------------------------------
 Reference< XAccessibleContext > SAL_CALL AccessibleGridControlAccess::getAccessibleContext() throw ( RuntimeException )
 {
-    ::osl::MutexGuard aGuard( m_aMutex );
+    SolarMutexGuard g;
 
     OSL_ENSURE( ( m_pContext && m_xContext.is() ) || ( !m_pContext && !m_xContext.is() ),
         "accessibility/extended/AccessibleGridControlAccess::getAccessibleContext: inconsistency!" );
diff --git a/accessibility/source/extended/AccessibleGridControlBase.cxx b/accessibility/source/extended/AccessibleGridControlBase.cxx
index 553ccbb..8df5cf6 100644
--- a/accessibility/source/extended/AccessibleGridControlBase.cxx
+++ b/accessibility/source/extended/AccessibleGridControlBase.cxx
@@ -72,7 +72,7 @@ AccessibleGridControlBase::~AccessibleGridControlBase()
 
 void SAL_CALL AccessibleGridControlBase::disposing()
 {
-    ::osl::MutexGuard aGuard( getOslMutex() );
+    SolarMutexGuard g;
 
     if ( getClientId( ) )
     {
@@ -90,7 +90,8 @@ void SAL_CALL AccessibleGridControlBase::disposing()
 Reference< XAccessible > SAL_CALL AccessibleGridControlBase::getAccessibleParent()
     throw ( uno::RuntimeException )
 {
-    ::osl::MutexGuard aGuard( getOslMutex() );
+    SolarMutexGuard g;
+
     ensureIsAlive();
     return m_xParent;
 }
@@ -98,7 +99,8 @@ Reference< XAccessible > SAL_CALL AccessibleGridControlBase::getAccessibleParent
 sal_Int32 SAL_CALL AccessibleGridControlBase::getAccessibleIndexInParent()
     throw ( uno::RuntimeException )
 {
-    ::osl::MutexGuard aGuard( getOslMutex() );
+    SolarMutexGuard g;
+
     ensureIsAlive();
 
     // -1 for child not found/no parent (according to specification)
@@ -133,7 +135,8 @@ sal_Int32 SAL_CALL AccessibleGridControlBase::getAccessibleIndexInParent()
 OUString SAL_CALL AccessibleGridControlBase::getAccessibleDescription()
     throw ( uno::RuntimeException )
 {
-    ::osl::MutexGuard aGuard( getOslMutex() );
+    SolarMutexGuard g;
+
     ensureIsAlive();
     return m_aDescription;
 }
@@ -141,7 +144,8 @@ OUString SAL_CALL AccessibleGridControlBase::getAccessibleDescription()
 OUString SAL_CALL AccessibleGridControlBase::getAccessibleName()
     throw ( uno::RuntimeException )
 {
-    ::osl::MutexGuard aGuard( getOslMutex() );
+    SolarMutexGuard g;
+
     ensureIsAlive();
     return m_aName;
 }
@@ -150,6 +154,8 @@ Reference< XAccessibleRelationSet > SAL_CALL
 AccessibleGridControlBase::getAccessibleRelationSet()
     throw ( uno::RuntimeException )
 {
+   SolarMutexGuard g;
+
    ensureIsAlive();
    // GridControl does not have relations.
    return new utl::AccessibleRelationSetHelper;
@@ -160,7 +166,7 @@ AccessibleGridControlBase::getAccessibleStateSet()
     throw ( uno::RuntimeException )
 {
     SolarMutexGuard aSolarGuard;
-    ::osl::MutexGuard aGuard( getOslMutex() );
+
     // don't check whether alive -> StateSet may contain DEFUNC
     return implCreateStateSetHelper();
 }
@@ -168,7 +174,8 @@ AccessibleGridControlBase::getAccessibleStateSet()
 lang::Locale SAL_CALL AccessibleGridControlBase::getLocale()
     throw ( IllegalAccessibleComponentStateException, uno::RuntimeException )
 {
-    ::osl::MutexGuard aGuard( getOslMutex() );
+    SolarMutexGuard g;
+
     ensureIsAlive();
     if( m_xParent.is() )
     {
@@ -216,7 +223,7 @@ sal_Bool SAL_CALL AccessibleGridControlBase::isShowing()
     throw ( uno::RuntimeException )
 {
     SolarMutexGuard aSolarGuard;
-    ::osl::MutexGuard aGuard( getOslMutex() );
+
     ensureIsAlive();
     return implIsShowing();
 }
@@ -244,7 +251,8 @@ void SAL_CALL AccessibleGridControlBase::addAccessibleEventListener(
 {
     if ( _rxListener.is() )
     {
-        ::osl::MutexGuard aGuard( getOslMutex() );
+        SolarMutexGuard g;
+
         if ( !getClientId( ) )
             setClientId( AccessibleEventNotifier::registerClient( ) );
 
@@ -258,7 +266,8 @@ void SAL_CALL AccessibleGridControlBase::removeAccessibleEventListener(
 {
     if( _rxListener.is() && getClientId( ) )
     {
-    ::osl::MutexGuard aGuard( getOslMutex() );
+        SolarMutexGuard g;
+
         sal_Int32 nListenerCount = AccessibleEventNotifier::removeEventListener( getClientId( ), _rxListener );
     if ( !nListenerCount )
     {
@@ -339,6 +348,7 @@ sal_Bool AccessibleGridControlBase::implIsShowing()
 
 sal_Bool AccessibleGridControlBase::isAlive() const
 {
+    ::osl::MutexGuard g(m_aMutex); // guards rBHelper members
     return !rBHelper.bDisposed && !rBHelper.bInDispose && &m_aTable;
 }
 
@@ -353,7 +363,6 @@ Rectangle AccessibleGridControlBase::getBoundingBox()
     throw ( lang::DisposedException )
 {
     SolarMutexGuard aSolarGuard;
-    ::osl::MutexGuard aGuard( getOslMutex() );
     ensureIsAlive();
     Rectangle aRect = implGetBoundingBox();
     if ( 0 == aRect.Left() && 0 == aRect.Top() && 0 == aRect.Right() && 0 == aRect.Bottom() )
@@ -367,7 +376,6 @@ Rectangle AccessibleGridControlBase::getBoundingBoxOnScreen()
     throw ( lang::DisposedException )
 {
     SolarMutexGuard aSolarGuard;
-    ::osl::MutexGuard aGuard( getOslMutex() );
     ensureIsAlive();
     Rectangle aRect = implGetBoundingBoxOnScreen();
     if ( 0 == aRect.Left() && 0 == aRect.Top() && 0 == aRect.Right() && 0 == aRect.Bottom() )
@@ -380,7 +388,8 @@ Rectangle AccessibleGridControlBase::getBoundingBoxOnScreen()
 void AccessibleGridControlBase::commitEvent(
         sal_Int16 _nEventId, const Any& _rNewValue, const Any& _rOldValue )
 {
-    ::osl::ClearableMutexGuard aGuard( getOslMutex() );
+    SolarMutexGuard g;
+
     if ( !getClientId( ) )
             // if we don't have a client id for the notifier, then we don't have listeners, then
             // we don't need to notify anything
@@ -441,7 +450,7 @@ Reference<XAccessible > SAL_CALL AccessibleGridControlBase::getAccessibleAtPoint
 sal_Int32 SAL_CALL AccessibleGridControlBase::getForeground(  ) throw (::com::sun::star::uno::RuntimeException)
 {
     SolarMutexGuard aSolarGuard;
-    ::osl::MutexGuard aGuard( getOslMutex() );
+
     ensureIsAlive();
 
     sal_Int32 nColor = 0;
@@ -466,7 +475,7 @@ sal_Int32 SAL_CALL AccessibleGridControlBase::getForeground(  ) throw (::com::su
 sal_Int32 SAL_CALL AccessibleGridControlBase::getBackground(  ) throw (::com::sun::star::uno::RuntimeException)
 {
     SolarMutexGuard aSolarGuard;
-    ::osl::MutexGuard aGuard( getOslMutex() );
+
     ensureIsAlive();
     sal_Int32 nColor = 0;
     Window* pInst = m_aTable.GetWindowInstance();
@@ -498,6 +507,8 @@ IMPLEMENT_FORWARD_XTYPEPROVIDER2( GridControlAccessibleElement, AccessibleGridCo
 
 Reference< XAccessibleContext > SAL_CALL GridControlAccessibleElement::getAccessibleContext() throw ( uno::RuntimeException )
 {
+    SolarMutexGuard g;
+
     ensureIsAlive();
     return this;
 }
diff --git a/accessibility/source/extended/AccessibleGridControlHeader.cxx b/accessibility/source/extended/AccessibleGridControlHeader.cxx
index 0bc1649..24f3116 100644
--- a/accessibility/source/extended/AccessibleGridControlHeader.cxx
+++ b/accessibility/source/extended/AccessibleGridControlHeader.cxx
@@ -64,7 +64,6 @@ AccessibleGridControlHeader::getAccessibleChild( sal_Int32 nChildIndex )
     throw ( lang::IndexOutOfBoundsException, uno::RuntimeException )
 {
     SolarMutexGuard aSolarGuard;
-    ::osl::MutexGuard aGuard( getOslMutex() );
 
     if (nChildIndex<0 || nChildIndex>=getAccessibleChildCount())
         throw IndexOutOfBoundsException();
@@ -100,7 +99,7 @@ AccessibleGridControlHeader::getAccessibleAtPoint( const awt::Point& rPoint )
     throw ( uno::RuntimeException )
 {
     SolarMutexGuard aSolarGuard;
-    ::osl::MutexGuard aGuard( getOslMutex() );
+
     ensureIsAlive();
 
     sal_Int32 nRow = 0;
@@ -132,7 +131,7 @@ OUString SAL_CALL AccessibleGridControlHeader::getAccessibleRowDescription( sal_
     throw ( lang::IndexOutOfBoundsException, uno::RuntimeException )
 {
     SolarMutexGuard aSolarGuard;
-    ::osl::MutexGuard aGuard( getOslMutex() );
+
     ensureIsAlive();
     ensureIsValidRow( nRow );
     return OUString();  // no headers in headers
@@ -142,7 +141,7 @@ OUString SAL_CALL AccessibleGridControlHeader::getAccessibleColumnDescription( s
     throw ( lang::IndexOutOfBoundsException, uno::RuntimeException )
 {
     SolarMutexGuard aSolarGuard;
-    ::osl::MutexGuard aGuard( getOslMutex() );
+
     ensureIsAlive();
     ensureIsValidColumn( nColumn );
     return OUString();  // no headers in headers
@@ -151,6 +150,8 @@ OUString SAL_CALL AccessibleGridControlHeader::getAccessibleColumnDescription( s
 Reference< XAccessibleTable > SAL_CALL AccessibleGridControlHeader::getAccessibleRowHeaders()
     throw ( uno::RuntimeException )
 {
+    SolarMutexGuard g;
+
     ensureIsAlive();
     return NULL;        // no headers in headers
 }
@@ -158,6 +159,8 @@ Reference< XAccessibleTable > SAL_CALL AccessibleGridControlHeader::getAccessibl
 Reference< XAccessibleTable > SAL_CALL AccessibleGridControlHeader::getAccessibleColumnHeaders()
     throw ( uno::RuntimeException )
 {
+    SolarMutexGuard g;
+
     ensureIsAlive();
     return NULL;        // no headers in headers
 }
diff --git a/accessibility/source/extended/AccessibleGridControlHeaderCell.cxx b/accessibility/source/extended/AccessibleGridControlHeaderCell.cxx
index 548c21b..f716a8a 100644
--- a/accessibility/source/extended/AccessibleGridControlHeaderCell.cxx
+++ b/accessibility/source/extended/AccessibleGridControlHeaderCell.cxx
@@ -45,7 +45,6 @@ AccessibleGridControlHeaderCell::AccessibleGridControlHeaderCell(sal_Int32 _nCol
 */
 ::utl::AccessibleStateSetHelper* AccessibleGridControlHeaderCell::implCreateStateSetHelper()
 {
-    ::osl::MutexGuard aGuard( getOslMutex() );
     ::utl::AccessibleStateSetHelper*
         pStateSetHelper = new ::utl::AccessibleStateSetHelper;
 
@@ -55,7 +54,6 @@ AccessibleGridControlHeaderCell::AccessibleGridControlHeaderCell(sal_Int32 _nCol
         if( implIsShowing() )
             pStateSetHelper->AddState( AccessibleStateType::SHOWING );
 
-        SolarMutexGuard aSolarGuard;
         pStateSetHelper->AddState( AccessibleStateType::VISIBLE );
         pStateSetHelper->AddState( AccessibleStateType::FOCUSABLE );
         pStateSetHelper->AddState( AccessibleStateType::TRANSIENT );
@@ -163,7 +161,8 @@ Rectangle AccessibleGridControlHeaderCell::implGetBoundingBoxOnScreen()
 sal_Int32 SAL_CALL AccessibleGridControlHeaderCell::getAccessibleIndexInParent()
     throw ( RuntimeException )
 {
-    ::osl::MutexGuard aGuard( getOslMutex() );
+    SolarMutexGuard g;
+
     ensureIsAlive();
     sal_Int32 nIndex = m_nColumnRowId;
     return nIndex;
diff --git a/accessibility/source/extended/AccessibleGridControlTable.cxx b/accessibility/source/extended/AccessibleGridControlTable.cxx
index 3b08ead..5b31740 100644
--- a/accessibility/source/extended/AccessibleGridControlTable.cxx
+++ b/accessibility/source/extended/AccessibleGridControlTable.cxx
@@ -58,7 +58,7 @@ AccessibleGridControlTable::getAccessibleChild( sal_Int32 nChildIndex )
     throw ( lang::IndexOutOfBoundsException, uno::RuntimeException )
 {
     SolarMutexGuard aSolarGuard;
-    ::osl::MutexGuard aGuard( getOslMutex() );
+
     ensureIsAlive();
     ensureIsValidIndex( nChildIndex );
     sal_Int32 nCount = getAccessibleChildCount();
@@ -95,7 +95,7 @@ AccessibleGridControlTable::getAccessibleAtPoint( const awt::Point& rPoint )
     throw ( uno::RuntimeException )
 {
     SolarMutexGuard aSolarGuard;
-    ::osl::MutexGuard aGuard( getOslMutex() );
+
     ensureIsAlive();
 
     Reference< XAccessible > xChild;
@@ -110,7 +110,7 @@ void SAL_CALL AccessibleGridControlTable::grabFocus()
     throw ( uno::RuntimeException )
 {
     SolarMutexGuard aSolarGuard;
-    ::osl::MutexGuard aGuard( getOslMutex() );
+
     ensureIsAlive();
     m_aTable.GrabFocus();
 }
@@ -128,7 +128,7 @@ OUString SAL_CALL AccessibleGridControlTable::getAccessibleRowDescription( sal_I
     throw ( lang::IndexOutOfBoundsException, uno::RuntimeException )
 {
     SolarMutexGuard aSolarGuard;
-    ::osl::MutexGuard aGuard( getOslMutex() );
+
     ensureIsAlive();
     ensureIsValidRow( nRow );
     return m_aTable.GetRowDescription( nRow );
@@ -138,7 +138,7 @@ OUString SAL_CALL AccessibleGridControlTable::getAccessibleColumnDescription( sa
     throw ( lang::IndexOutOfBoundsException, uno::RuntimeException )
 {
     SolarMutexGuard aSolarGuard;
-    ::osl::MutexGuard aGuard( getOslMutex() );
+
     ensureIsAlive();
     ensureIsValidColumn( nColumn );
     return m_aTable.GetColumnDescription( (sal_uInt16)nColumn );
@@ -147,7 +147,8 @@ OUString SAL_CALL AccessibleGridControlTable::getAccessibleColumnDescription( sa
 Reference< XAccessibleTable > SAL_CALL AccessibleGridControlTable::getAccessibleRowHeaders()
     throw ( uno::RuntimeException )
 {
-    ::osl::MutexGuard aGuard( getOslMutex() );
+    SolarMutexGuard g;
+
     ensureIsAlive();
     if(m_aTable.HasColHeader())
         return implGetHeaderBar( 1 );
@@ -158,7 +159,8 @@ Reference< XAccessibleTable > SAL_CALL AccessibleGridControlTable::getAccessible
 Reference< XAccessibleTable > SAL_CALL AccessibleGridControlTable::getAccessibleColumnHeaders()
     throw ( uno::RuntimeException )
 {
-    ::osl::MutexGuard aGuard( getOslMutex() );
+    SolarMutexGuard g;
+
     ensureIsAlive();
     return implGetHeaderBar( 0 );
 }
@@ -167,7 +169,7 @@ Sequence< sal_Int32 > SAL_CALL AccessibleGridControlTable::getSelectedAccessible
     throw ( uno::RuntimeException )
 {
     SolarMutexGuard aSolarGuard;
-    ::osl::MutexGuard aGuard( getOslMutex() );
+
     ensureIsAlive();
     Sequence< sal_Int32 > aSelSeq;
     implGetSelectedRows( aSelSeq );
@@ -186,7 +188,7 @@ sal_Bool SAL_CALL AccessibleGridControlTable::isAccessibleRowSelected( sal_Int32
     throw ( lang::IndexOutOfBoundsException, uno::RuntimeException )
 {
     SolarMutexGuard aSolarGuard;
-    ::osl::MutexGuard aGuard( getOslMutex() );
+
     ensureIsAlive();
     ensureIsValidRow( nRow );
     sal_Bool bSelected = sal_False;
@@ -215,7 +217,7 @@ Reference< XAccessible > SAL_CALL AccessibleGridControlTable::getAccessibleCellA
     throw ( lang::IndexOutOfBoundsException, uno::RuntimeException )
 {
     SolarMutexGuard aSolarGuard;
-    ::osl::MutexGuard aGuard( getOslMutex() );
+
     ensureIsAlive();
     ensureIsValidAddress( nRow, nColumn );
     sal_Int32 nCount = getAccessibleChildCount();
@@ -239,7 +241,7 @@ sal_Bool SAL_CALL AccessibleGridControlTable::isAccessibleSelected(
     throw ( lang::IndexOutOfBoundsException, uno::RuntimeException )
 {
     SolarMutexGuard aSolarGuard;
-    ::osl::MutexGuard aGuard( getOslMutex() );
+
     ensureIsAlive();
     ensureIsValidAddress( nRow, nColumn );
     (void) nColumn;
@@ -250,7 +252,7 @@ void SAL_CALL AccessibleGridControlTable::selectAccessibleChild( sal_Int32 nChil
     throw ( lang::IndexOutOfBoundsException, uno::RuntimeException )
 {
     SolarMutexGuard aSolarGuard;
-    ::osl::MutexGuard aGuard( getOslMutex() );
+
     ensureIsAlive();
     ensureIsValidIndex( nChildIndex );
     sal_Int32 nColumns = m_aTable.GetColumnCount();
@@ -261,7 +263,7 @@ sal_Bool SAL_CALL AccessibleGridControlTable::isAccessibleChildSelected( sal_Int
     throw ( lang::IndexOutOfBoundsException, uno::RuntimeException )
 {
     SolarMutexGuard aSolarGuard;
-    ::osl::MutexGuard aGuard( getOslMutex() );
+
     ensureIsAlive();
     ensureIsValidIndex( nChildIndex );
     sal_Int32 nColumns = m_aTable.GetColumnCount();
@@ -272,7 +274,7 @@ void SAL_CALL AccessibleGridControlTable::clearAccessibleSelection()
     throw ( uno::RuntimeException )
 {
     SolarMutexGuard aSolarGuard;
-    ::osl::MutexGuard aGuard( getOslMutex() );
+
     ensureIsAlive();
     m_aTable.SelectAllRows( false );
 }
@@ -280,7 +282,7 @@ void SAL_CALL AccessibleGridControlTable::selectAllAccessibleChildren()
     throw ( uno::RuntimeException )
 {
     SolarMutexGuard aSolarGuard;
-    ::osl::MutexGuard aGuard( getOslMutex() );
+
     ensureIsAlive();
     Sequence< sal_Int32 > selectedRows = getSelectedAccessibleRows();
     for(int i=0;i<m_aTable.GetRowCount();i++)
@@ -290,7 +292,7 @@ sal_Int32 SAL_CALL AccessibleGridControlTable::getSelectedAccessibleChildCount()
     throw ( uno::RuntimeException )
 {
     SolarMutexGuard aSolarGuard;
-    ::osl::MutexGuard aGuard( getOslMutex() );
+
     ensureIsAlive();
     Sequence< sal_Int32 > selectedRows = getSelectedAccessibleRows();
     sal_Int32 nColumns = m_aTable.GetColumnCount();
@@ -301,7 +303,7 @@ AccessibleGridControlTable::getSelectedAccessibleChild( sal_Int32 nSelectedChild
     throw ( lang::IndexOutOfBoundsException, uno::RuntimeException )
 {
     SolarMutexGuard aSolarGuard;
-    ::osl::MutexGuard aGuard( getOslMutex() );
+
     ensureIsAlive();
     if(isAccessibleChildSelected(nSelectedChildIndex))
         return getAccessibleChild(nSelectedChildIndex);
@@ -314,7 +316,7 @@ void SAL_CALL AccessibleGridControlTable::deselectAccessibleChild(
     throw ( lang::IndexOutOfBoundsException, uno::RuntimeException )
 {
     SolarMutexGuard aSolarGuard;
-    ::osl::MutexGuard aGuard( getOslMutex() );
+
     ensureIsAlive();
     (void)nSelectedChildIndex;
 }
diff --git a/accessibility/source/extended/AccessibleGridControlTableBase.cxx b/accessibility/source/extended/AccessibleGridControlTableBase.cxx
index f6d7570..737a59e 100644
--- a/accessibility/source/extended/AccessibleGridControlTableBase.cxx
+++ b/accessibility/source/extended/AccessibleGridControlTableBase.cxx
@@ -58,7 +58,7 @@ sal_Int32 SAL_CALL AccessibleGridControlTableBase::getAccessibleChildCount()
     throw ( uno::RuntimeException )
 {
     SolarMutexGuard aSolarGuard;
-    ::osl::MutexGuard aGuard( getOslMutex() );
+
     ensureIsAlive();
     sal_Int32 nChildren = 0;
     if(m_eObjType == TCTYPE_ROWHEADERBAR)
@@ -73,6 +73,8 @@ sal_Int32 SAL_CALL AccessibleGridControlTableBase::getAccessibleChildCount()
 sal_Int16 SAL_CALL AccessibleGridControlTableBase::getAccessibleRole()
     throw ( uno::RuntimeException )
 {
+    SolarMutexGuard g;
+
     ensureIsAlive();
     return AccessibleRole::TABLE;
 }
@@ -83,7 +85,7 @@ sal_Int32 SAL_CALL AccessibleGridControlTableBase::getAccessibleRowCount()
     throw ( uno::RuntimeException )
 {
     SolarMutexGuard aSolarGuard;
-    ::osl::MutexGuard aGuard( getOslMutex() );
+
     ensureIsAlive();
     return  m_aTable.GetRowCount();
 }
@@ -92,7 +94,7 @@ sal_Int32 SAL_CALL AccessibleGridControlTableBase::getAccessibleColumnCount()
     throw ( uno::RuntimeException )
 {
     SolarMutexGuard aSolarGuard;
-    ::osl::MutexGuard aGuard( getOslMutex() );
+
     ensureIsAlive();
     return m_aTable.GetColumnCount();
 }
@@ -102,7 +104,7 @@ sal_Int32 SAL_CALL AccessibleGridControlTableBase::getAccessibleRowExtentAt(
     throw ( lang::IndexOutOfBoundsException, uno::RuntimeException )
 {
     SolarMutexGuard aSolarGuard;
-    ::osl::MutexGuard aGuard( getOslMutex() );
+
     ensureIsAlive();
     ensureIsValidAddress( nRow, nColumn );
     return 1;   // merged cells not supported
@@ -113,7 +115,7 @@ sal_Int32 SAL_CALL AccessibleGridControlTableBase::getAccessibleColumnExtentAt(
     throw ( lang::IndexOutOfBoundsException, uno::RuntimeException )
 {
     SolarMutexGuard aSolarGuard;
-    ::osl::MutexGuard aGuard( getOslMutex() );
+
     ensureIsAlive();
     ensureIsValidAddress( nRow, nColumn );
     return 1;   // merged cells not supported
@@ -122,6 +124,8 @@ sal_Int32 SAL_CALL AccessibleGridControlTableBase::getAccessibleColumnExtentAt(
 Reference< XAccessible > SAL_CALL AccessibleGridControlTableBase::getAccessibleCaption()
     throw ( uno::RuntimeException )
 {
+    SolarMutexGuard g;
+
     ensureIsAlive();
     return NULL;    // not supported
 }
@@ -129,6 +133,8 @@ Reference< XAccessible > SAL_CALL AccessibleGridControlTableBase::getAccessibleC
 Reference< XAccessible > SAL_CALL AccessibleGridControlTableBase::getAccessibleSummary()
     throw ( uno::RuntimeException )
 {
+    SolarMutexGuard g;
+
     ensureIsAlive();
     return NULL;    // not supported
 }
@@ -138,7 +144,7 @@ sal_Int32 SAL_CALL AccessibleGridControlTableBase::getAccessibleIndex(
     throw ( lang::IndexOutOfBoundsException, uno::RuntimeException )
 {
     SolarMutexGuard aSolarGuard;
-    ::osl::MutexGuard aGuard( getOslMutex() );
+
     ensureIsAlive();
     ensureIsValidAddress( nRow, nColumn );
     return implGetChildIndex( nRow, nColumn );
@@ -148,7 +154,7 @@ sal_Int32 SAL_CALL AccessibleGridControlTableBase::getAccessibleRow( sal_Int32 n
     throw ( lang::IndexOutOfBoundsException, uno::RuntimeException )
 {
     SolarMutexGuard aSolarGuard;
-    ::osl::MutexGuard aGuard( getOslMutex() );
+
     ensureIsAlive();
     ensureIsValidIndex( nChildIndex );
     return implGetRow( nChildIndex );
@@ -158,7 +164,7 @@ sal_Int32 SAL_CALL AccessibleGridControlTableBase::getAccessibleColumn( sal_Int3
     throw ( lang::IndexOutOfBoundsException, uno::RuntimeException )
 {
     SolarMutexGuard aSolarGuard;
-    ::osl::MutexGuard aGuard( getOslMutex() );
+
     ensureIsAlive();
     ensureIsValidIndex( nChildIndex );
     return implGetColumn( nChildIndex );
diff --git a/accessibility/source/extended/AccessibleGridControlTableCell.cxx b/accessibility/source/extended/AccessibleGridControlTableCell.cxx
index 1f70088..84fdb1a 100644
--- a/accessibility/source/extended/AccessibleGridControlTableCell.cxx
+++ b/accessibility/source/extended/AccessibleGridControlTableCell.cxx
@@ -80,7 +80,7 @@ namespace accessibility
     void SAL_CALL AccessibleGridControlCell::grabFocus() throw ( RuntimeException )
     {
         SolarMutexGuard aSolarGuard;
-        ::osl::MutexGuard aGuard( getOslMutex() );
+
         m_aTable.GoToCell( m_nColPos, m_nRowPos );
     }
     //// -----------------------------------------------------------------------------
@@ -140,7 +140,6 @@ namespace accessibility
     ::com::sun::star::awt::Rectangle SAL_CALL AccessibleGridControlTableCell::getCharacterBounds( sal_Int32 nIndex ) throw (IndexOutOfBoundsException, RuntimeException)
     {
         SolarMutexGuard aSolarGuard;
-        ::osl::MutexGuard aGuard( getOslMutex() );
 
         ensureIsAlive();
         if ( !implIsValidIndex( nIndex, implGetText().getLength() ) )
@@ -156,7 +155,7 @@ namespace accessibility
     sal_Int32 SAL_CALL AccessibleGridControlTableCell::getIndexAtPoint( const ::com::sun::star::awt::Point& _aPoint ) throw (RuntimeException)
     {
         SolarMutexGuard aSolarGuard;
-        ::osl::MutexGuard aGuard( getOslMutex() );
+
         ensureIsAlive();
 
         return m_aTable.GetFieldIndexAtPoint( getRowPos(), getColumnPos(), VCLPoint( _aPoint ) );
@@ -195,9 +194,6 @@ namespace accessibility
     */
     ::utl::AccessibleStateSetHelper* AccessibleGridControlTableCell::implCreateStateSetHelper()
     {
-        SolarMutexGuard aSolarGuard;
-        ::osl::MutexGuard aGuard( getOslMutex() );
-
         ::utl::AccessibleStateSetHelper* pStateSetHelper = new ::utl::AccessibleStateSetHelper;
 
         if( isAlive() )
@@ -220,6 +216,8 @@ namespace accessibility
     /** @return  The XAccessibleContext interface of this object. */
     Reference< XAccessibleContext > SAL_CALL AccessibleGridControlTableCell::getAccessibleContext() throw ( RuntimeException )
     {
+        SolarMutexGuard g;
+
         ensureIsAlive();
         return this;
     }
@@ -230,7 +228,7 @@ namespace accessibility
             throw ( ::com::sun::star::uno::RuntimeException )
     {
         SolarMutexGuard aSolarGuard;
-        ::osl::MutexGuard aGuard( getOslMutex() );
+
         ensureIsAlive();
 
         return ( getRowPos() * m_aTable.GetColumnCount() ) + getColumnPos();
@@ -243,7 +241,6 @@ namespace accessibility
     sal_Bool SAL_CALL AccessibleGridControlTableCell::setCaretPosition ( sal_Int32 nIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException)
     {
         SolarMutexGuard aSolarGuard;
-        ::osl::MutexGuard aGuard( getOslMutex() );
 
         if ( !implIsValidRange( nIndex, nIndex, implGetText().getLength() ) )
             throw IndexOutOfBoundsException();
@@ -253,13 +250,12 @@ namespace accessibility
     sal_Unicode SAL_CALL AccessibleGridControlTableCell::getCharacter( sal_Int32 nIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException)
     {
         SolarMutexGuard aSolarGuard;
-        ::osl::MutexGuard aGuard( getOslMutex() );
+
         return OCommonAccessibleText::getCharacter( nIndex );
     }
     ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > SAL_CALL AccessibleGridControlTableCell::getCharacterAttributes( sal_Int32 nIndex, const ::com::sun::star::uno::Sequence< OUString >& ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException)
     {
         SolarMutexGuard aSolarGuard;
-        ::osl::MutexGuard aGuard( getOslMutex() );
 
         OUString sText( implGetText() );
 
@@ -271,32 +267,32 @@ namespace accessibility
     sal_Int32 SAL_CALL AccessibleGridControlTableCell::getCharacterCount(  ) throw (::com::sun::star::uno::RuntimeException)
     {
         SolarMutexGuard aSolarGuard;
-        ::osl::MutexGuard aGuard( getOslMutex() );
+
         return OCommonAccessibleText::getCharacterCount(  );
     }
 
     OUString SAL_CALL AccessibleGridControlTableCell::getSelectedText(  ) throw (::com::sun::star::uno::RuntimeException)
     {
         SolarMutexGuard aSolarGuard;
-        ::osl::MutexGuard aGuard( getOslMutex() );
+
         return OCommonAccessibleText::getSelectedText(  );
     }
     sal_Int32 SAL_CALL AccessibleGridControlTableCell::getSelectionStart(  ) throw (::com::sun::star::uno::RuntimeException)
     {
         SolarMutexGuard aSolarGuard;
-        ::osl::MutexGuard aGuard( getOslMutex() );
+
         return OCommonAccessibleText::getSelectionStart(  );
     }
     sal_Int32 SAL_CALL AccessibleGridControlTableCell::getSelectionEnd(  ) throw (::com::sun::star::uno::RuntimeException)
     {
         SolarMutexGuard aSolarGuard;
-        ::osl::MutexGuard aGuard( getOslMutex() );
+
         return OCommonAccessibleText::getSelectionEnd(  );
     }
     sal_Bool SAL_CALL AccessibleGridControlTableCell::setSelection( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException)
     {
         SolarMutexGuard aSolarGuard;
-        ::osl::MutexGuard aGuard( getOslMutex() );
+
         if ( !implIsValidRange( nStartIndex, nEndIndex, implGetText().getLength() ) )
             throw IndexOutOfBoundsException();
 
@@ -305,37 +301,37 @@ namespace accessibility
     OUString SAL_CALL AccessibleGridControlTableCell::getText(  ) throw (::com::sun::star::uno::RuntimeException)
     {
         SolarMutexGuard aSolarGuard;
-        ::osl::MutexGuard aGuard( getOslMutex() );
+
         return OCommonAccessibleText::getText(  );
     }
     OUString SAL_CALL AccessibleGridControlTableCell::getTextRange( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException)
     {
         SolarMutexGuard aSolarGuard;
-        ::osl::MutexGuard aGuard( getOslMutex() );
+
         return OCommonAccessibleText::getTextRange( nStartIndex, nEndIndex );
     }
     ::com::sun::star::accessibility::TextSegment SAL_CALL AccessibleGridControlTableCell::getTextAtIndex( sal_Int32 nIndex, sal_Int16 aTextType ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException)
     {
         SolarMutexGuard aSolarGuard;
-        ::osl::MutexGuard aGuard( getOslMutex() );
+
         return OCommonAccessibleText::getTextAtIndex( nIndex ,aTextType);
     }
     ::com::sun::star::accessibility::TextSegment SAL_CALL AccessibleGridControlTableCell::getTextBeforeIndex( sal_Int32 nIndex, sal_Int16 aTextType ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException)
     {
         SolarMutexGuard aSolarGuard;
-        ::osl::MutexGuard aGuard( getOslMutex() );
+
         return OCommonAccessibleText::getTextBeforeIndex( nIndex ,aTextType);
     }
     ::com::sun::star::accessibility::TextSegment SAL_CALL AccessibleGridControlTableCell::getTextBehindIndex( sal_Int32 nIndex, sal_Int16 aTextType ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException)
     {
         SolarMutexGuard aSolarGuard;
-        ::osl::MutexGuard aGuard( getOslMutex() );
+
         return OCommonAccessibleText::getTextBehindIndex( nIndex ,aTextType);
     }
     sal_Bool SAL_CALL AccessibleGridControlTableCell::copyText( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException)
     {
         SolarMutexGuard aSolarGuard;
-        ::osl::MutexGuard aGuard( getOslMutex() );
+
         OUString sText = implGetText();
         checkIndex_Impl( nStartIndex, sText );
         checkIndex_Impl( nEndIndex, sText );
commit 81ff254b4631019f6a2ac33799f93b286e880685
Author: Michael Stahl <mstahl at redhat.com>
Date:   Mon Dec 16 16:16:15 2013 +0100

    svtools: rename IAccessibleTableControl::dispose()
    
    ... to not confuse it with XComponent::dispose().
    
    Change-Id: I056fdf77f9116d1c22f8ca9313a0ea313fb1c4aa

diff --git a/accessibility/inc/accessibility/extended/AccessibleGridControl.hxx b/accessibility/inc/accessibility/extended/AccessibleGridControl.hxx
index eb3be36..5616117 100644
--- a/accessibility/inc/accessibility/extended/AccessibleGridControl.hxx
+++ b/accessibility/inc/accessibility/extended/AccessibleGridControl.hxx
@@ -229,7 +229,7 @@ protected:
     {
         return this;
     }
-    void dispose();
+    void DisposeAccessImpl() SAL_OVERRIDE;
     virtual sal_Bool isAlive() const
     {
         return isContextAlive();
diff --git a/accessibility/source/extended/AccessibleGridControl.cxx b/accessibility/source/extended/AccessibleGridControl.cxx
index fcd8dbc..9947183 100644
--- a/accessibility/source/extended/AccessibleGridControl.cxx
+++ b/accessibility/source/extended/AccessibleGridControl.cxx
@@ -421,7 +421,7 @@ AccessibleGridControlAccess::~AccessibleGridControlAccess()
 }
 
 // -----------------------------------------------------------------------------
-void AccessibleGridControlAccess::dispose()
+void AccessibleGridControlAccess::DisposeAccessImpl()
 {
     ::osl::MutexGuard aGuard( m_aMutex );
 
diff --git a/include/svtools/accessibletable.hxx b/include/svtools/accessibletable.hxx
index 285ab84..8b89684 100644
--- a/include/svtools/accessibletable.hxx
+++ b/include/svtools/accessibletable.hxx
@@ -139,7 +139,7 @@ public:
 
     /** disposes the accessible implementation, so that it becomes defunc
     */
-    virtual void dispose() = 0;
+    virtual void DisposeAccessImpl() = 0;
 
     /** checks whether the accessible implementation, and its context, are still alive
         @return  <TRUE/>, if the object is not disposed or disposing.
diff --git a/svtools/source/table/tablecontrol_impl.cxx b/svtools/source/table/tablecontrol_impl.cxx
index e27dbac..f4238c9 100644
--- a/svtools/source/table/tablecontrol_impl.cxx
+++ b/svtools/source/table/tablecontrol_impl.cxx
@@ -2727,7 +2727,7 @@ namespace svt { namespace table
     void TableControl_Impl::disposeAccessible()
     {
         if ( m_pAccessibleTable )
-            m_pAccessibleTable->dispose();
+            m_pAccessibleTable->DisposeAccessImpl();
         m_pAccessibleTable = NULL;
     }
 


More information about the Libreoffice-commits mailing list