summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2013-12-13 23:33:21 +0100
committerMichael Stahl <mstahl@redhat.com>2013-12-13 23:39:41 +0100
commit8552bd76dcbb1db407bc9b0c1ab32a9f3afac87a (patch)
treebe70ae69f74352a0d95525eef9cf92a5bfd6ecb7
parent49f9694e34d07468cff4a7e4de332f11be3e0dd8 (diff)
sw: add some more obviously missing mutex guards
... to methods added in 76c549eb01dcb7b5bf28a271ce00e386f3d388ba Change-Id: I32101ec882420babb394af6db5cd56d1035acf4a
-rw-r--r--sw/source/core/access/acccell.cxx4
-rw-r--r--sw/source/core/access/accembedded.cxx2
-rw-r--r--sw/source/core/access/accfield.cxx1
-rw-r--r--sw/source/core/access/accgraphic.cxx2
-rw-r--r--sw/source/core/access/acchyperlink.cxx4
-rw-r--r--sw/source/core/access/accnotextframe.cxx2
-rw-r--r--sw/source/core/access/accnotexthyperlink.cxx12
-rw-r--r--sw/source/core/access/accpara.cxx8
-rw-r--r--sw/source/core/access/accselectionhelper.cxx2
-rw-r--r--sw/source/core/access/acctable.cxx8
-rw-r--r--sw/source/core/access/acctextframe.cxx4
11 files changed, 49 insertions, 0 deletions
diff --git a/sw/source/core/access/acccell.cxx b/sw/source/core/access/acccell.cxx
index 8bc30eb3f1d5..84c334778f87 100644
--- a/sw/source/core/access/acccell.cxx
+++ b/sw/source/core/access/acccell.cxx
@@ -424,6 +424,8 @@ static OUString ReplaceFourChar(OUString oldOUString)
::com::sun::star::uno::Any SAL_CALL SwAccessibleCell::getExtendedAttributes()
throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException)
{
+ SolarMutexGuard g;
+
::com::sun::star::uno::Any strRet;
SwFrmFmt *pFrmFmt = GetTblBoxFormat();
DBG_ASSERT(pFrmFmt,"Must be Valid");
@@ -442,6 +444,8 @@ static OUString ReplaceFourChar(OUString oldOUString)
sal_Int32 SAL_CALL SwAccessibleCell::getBackground()
throw (::com::sun::star::uno::RuntimeException)
{
+ SolarMutexGuard g;
+
const SvxBrushItem &rBack = GetFrm()->GetAttrSet()->GetBackground();
sal_uInt32 crBack = rBack.GetColor().GetColor();
diff --git a/sw/source/core/access/accembedded.cxx b/sw/source/core/access/accembedded.cxx
index 61680c587fd6..0dab373b3394 100644
--- a/sw/source/core/access/accembedded.cxx
+++ b/sw/source/core/access/accembedded.cxx
@@ -111,6 +111,8 @@ uno::Sequence< sal_Int8 > SAL_CALL SwAccessibleEmbeddedObject::getImplementation
::com::sun::star::uno::Any SAL_CALL SwAccessibleEmbeddedObject::getExtendedAttributes()
throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException)
{
+ SolarMutexGuard g;
+
::com::sun::star::uno::Any strRet;
OUString style;
SwFlyFrm* pFFrm = getFlyFrm();
diff --git a/sw/source/core/access/accfield.cxx b/sw/source/core/access/accfield.cxx
index cb9532c8b4de..3ed4da8da4e6 100644
--- a/sw/source/core/access/accfield.cxx
+++ b/sw/source/core/access/accfield.cxx
@@ -88,6 +88,7 @@ sal_Int32 SAL_CALL SwAccessibleField::getAccessibleIndexInParent (void)
sal_Int16 SAL_CALL SwAccessibleField::getAccessibleRole (void)
throw (::com::sun::star::uno::RuntimeException)
{
+ SolarMutexGuard g;
return m_nRole;
}
diff --git a/sw/source/core/access/accgraphic.cxx b/sw/source/core/access/accgraphic.cxx
index 5326df0f6e4a..c92154635c24 100644
--- a/sw/source/core/access/accgraphic.cxx
+++ b/sw/source/core/access/accgraphic.cxx
@@ -79,6 +79,8 @@ Sequence< sal_Int8 > SAL_CALL SwAccessibleGraphic::getImplementationId()
sal_Int16 SAL_CALL SwAccessibleGraphic::getAccessibleRole (void)
throw (::com::sun::star::uno::RuntimeException)
{
+ SolarMutexGuard g;
+
SwFmtURL aURL( ((SwLayoutFrm*)GetFrm())->GetFmt()->GetURL() );
if (aURL.GetMap())
diff --git a/sw/source/core/access/acchyperlink.cxx b/sw/source/core/access/acchyperlink.cxx
index 79045f2c80d8..0a1f67c1b128 100644
--- a/sw/source/core/access/acchyperlink.cxx
+++ b/sw/source/core/access/acchyperlink.cxx
@@ -149,6 +149,8 @@ uno::Any SAL_CALL SwAccessibleHyperlink::getAccessibleActionAnchor(
sal_Int32 nIndex)
throw (lang::IndexOutOfBoundsException, uno::RuntimeException)
{
+ SolarMutexGuard g;
+
uno::Any aRet;
if(nIndex != 0)
throw lang::IndexOutOfBoundsException();
@@ -162,6 +164,8 @@ uno::Any SAL_CALL SwAccessibleHyperlink::getAccessibleActionObject(
sal_Int32 nIndex )
throw (lang::IndexOutOfBoundsException, uno::RuntimeException)
{
+ SolarMutexGuard g;
+
if(nIndex != 0)
throw lang::IndexOutOfBoundsException();
const SwTxtAttr *pTxtAttr = GetTxtAttr();
diff --git a/sw/source/core/access/accnotextframe.cxx b/sw/source/core/access/accnotextframe.cxx
index f9c6dace4c1c..378c521af232 100644
--- a/sw/source/core/access/accnotextframe.cxx
+++ b/sw/source/core/access/accnotextframe.cxx
@@ -355,6 +355,8 @@ sal_Int32 SAL_CALL SwAccessibleNoTextFrame::getHyperLinkIndex( sal_Int32 )
AccessibleRelation SwAccessibleNoTextFrame::makeRelation( sal_Int16 nType, const SwFlyFrm* pFrm )
{
+ SolarMutexGuard g;
+
uno::Sequence<uno::Reference<XInterface> > aSequence(1);
aSequence[0] = GetMap()->GetContext( pFrm );
return AccessibleRelation( nType, aSequence );
diff --git a/sw/source/core/access/accnotexthyperlink.cxx b/sw/source/core/access/accnotexthyperlink.cxx
index 1efe3924c8bc..bd2485db7460 100644
--- a/sw/source/core/access/accnotexthyperlink.cxx
+++ b/sw/source/core/access/accnotexthyperlink.cxx
@@ -45,6 +45,8 @@ SwAccessibleNoTextHyperlink::SwAccessibleNoTextHyperlink( SwAccessibleNoTextFram
sal_Int32 SAL_CALL SwAccessibleNoTextHyperlink::getAccessibleActionCount()
throw (RuntimeException)
{
+ SolarMutexGuard g;
+
SwFmtURL aURL( GetFmt()->GetURL() );
ImageMap* pMap = aURL.GetMap();
if( pMap != NULL )
@@ -102,6 +104,8 @@ OUString SAL_CALL SwAccessibleNoTextHyperlink::getAccessibleActionDescription(
sal_Int32 nIndex )
throw (IndexOutOfBoundsException, RuntimeException)
{
+ SolarMutexGuard g;
+
OUString sDesc;
if(nIndex < 0 || nIndex >= getAccessibleActionCount())
@@ -127,6 +131,8 @@ Reference< XAccessibleKeyBinding > SAL_CALL
SwAccessibleNoTextHyperlink::getAccessibleActionKeyBinding( sal_Int32 nIndex )
throw (IndexOutOfBoundsException, RuntimeException)
{
+ SolarMutexGuard g;
+
Reference< XAccessibleKeyBinding > xKeyBinding;
if(nIndex < 0 || nIndex >= getAccessibleActionCount())
@@ -166,6 +172,8 @@ Any SAL_CALL SwAccessibleNoTextHyperlink::getAccessibleActionAnchor(
sal_Int32 nIndex )
throw (IndexOutOfBoundsException, RuntimeException)
{
+ SolarMutexGuard g;
+
if(nIndex < 0 || nIndex >= getAccessibleActionCount())
throw lang::IndexOutOfBoundsException();
@@ -182,6 +190,8 @@ Any SAL_CALL SwAccessibleNoTextHyperlink::getAccessibleActionObject(
sal_Int32 nIndex )
throw (IndexOutOfBoundsException, RuntimeException)
{
+ SolarMutexGuard g;
+
if(nIndex < 0 || nIndex >= getAccessibleActionCount())
throw lang::IndexOutOfBoundsException();
@@ -217,6 +227,8 @@ sal_Int32 SAL_CALL SwAccessibleNoTextHyperlink::getEndIndex()
sal_Bool SAL_CALL SwAccessibleNoTextHyperlink::isValid( )
throw (::com::sun::star::uno::RuntimeException)
{
+ SolarMutexGuard g;
+
SwFmtURL aURL( GetFmt()->GetURL() );
if( aURL.GetMap() || !aURL.GetURL().isEmpty() )
diff --git a/sw/source/core/access/accpara.cxx b/sw/source/core/access/accpara.cxx
index a70569f14ee5..0bcf314ce0f2 100644
--- a/sw/source/core/access/accpara.cxx
+++ b/sw/source/core/access/accpara.cxx
@@ -3561,6 +3561,8 @@ sal_Bool SAL_CALL SwAccessibleParagraph::scrollToPosition( const ::com::sun::sta
sal_Int32 SAL_CALL SwAccessibleParagraph::getSelectedPortionCount( )
throw (::com::sun::star::uno::RuntimeException)
{
+ SolarMutexGuard g;
+
sal_Int32 nSeleted = 0;
SwPaM* pCrsr = GetCursor( true );
if( pCrsr != NULL )
@@ -3626,6 +3628,8 @@ sal_Int32 SAL_CALL SwAccessibleParagraph::getSeletedPositionEnd( sal_Int32 nSele
sal_Bool SAL_CALL SwAccessibleParagraph::removeSelection( sal_Int32 selectionIndex )
throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException)
{
+ SolarMutexGuard g;
+
if(selectionIndex < 0) return sal_False;
sal_Bool bRet = sal_False;
@@ -4076,6 +4080,8 @@ sal_Bool SwAccessibleParagraph::GetSelectionAtIndex(
sal_Int16 SAL_CALL SwAccessibleParagraph::getAccessibleRole (void) throw (::com::sun::star::uno::RuntimeException)
{
+ SolarMutexGuard g;
+
//Get the real heading level, Heading1 ~ Heading10
if (nHeadingLevel > 0)
{
@@ -4155,6 +4161,8 @@ sal_Int32 SwAccessibleParagraph::GetRealHeadingLevel()
uno::Any SAL_CALL SwAccessibleParagraph::getExtendedAttributes()
throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException)
{
+ SolarMutexGuard g;
+
uno::Any Ret;
OUString strHeading("heading-level:");
if( nHeadingLevel >= 0 )
diff --git a/sw/source/core/access/accselectionhelper.cxx b/sw/source/core/access/accselectionhelper.cxx
index d0817d439a43..df68f9abec3b 100644
--- a/sw/source/core/access/accselectionhelper.cxx
+++ b/sw/source/core/access/accselectionhelper.cxx
@@ -382,6 +382,8 @@ void SwAccessibleSelectionHelper::deselectAccessibleChild(
throw ( lang::IndexOutOfBoundsException,
RuntimeException )
{
+ SolarMutexGuard g;
+
if( nChildIndex < 0 ||
nChildIndex >= rContext.GetChildCount( *(rContext.GetMap()) ) )
throwIndexOutOfBoundsException();
diff --git a/sw/source/core/access/acctable.cxx b/sw/source/core/access/acctable.cxx
index 49ffcdbedf1c..0b82539dfaee 100644
--- a/sw/source/core/access/acctable.cxx
+++ b/sw/source/core/access/acctable.cxx
@@ -1794,6 +1794,8 @@ void SwAccessibleTable::AddSelectionCell(const SwAccessibleContext* pAccCell ,sa
sal_Bool SAL_CALL SwAccessibleTable::selectRow( sal_Int32 row )
throw (lang::IndexOutOfBoundsException, uno::RuntimeException)
{
+ SolarMutexGuard g;
+
if( isAccessibleColumnSelected( row ) )
return sal_True;
@@ -1810,6 +1812,8 @@ sal_Bool SAL_CALL SwAccessibleTable::selectRow( sal_Int32 row )
sal_Bool SAL_CALL SwAccessibleTable::selectColumn( sal_Int32 column )
throw (lang::IndexOutOfBoundsException, uno::RuntimeException)
{
+ SolarMutexGuard g;
+
if( isAccessibleColumnSelected( column ) )
return sal_True;
@@ -1826,6 +1830,8 @@ sal_Bool SAL_CALL SwAccessibleTable::selectColumn( sal_Int32 column )
sal_Bool SAL_CALL SwAccessibleTable::unselectRow( sal_Int32 row )
throw (lang::IndexOutOfBoundsException, uno::RuntimeException)
{
+ SolarMutexGuard g;
+
if( isAccessibleSelected( row , 0 ) && isAccessibleSelected( row , getAccessibleColumnCount()-1 ) )
{
SwCrsrShell* pCrsrShell = GetCrsrShell();
@@ -1842,6 +1848,8 @@ sal_Bool SAL_CALL SwAccessibleTable::unselectRow( sal_Int32 row )
sal_Bool SAL_CALL SwAccessibleTable::unselectColumn( sal_Int32 column )
throw (lang::IndexOutOfBoundsException, uno::RuntimeException)
{
+ SolarMutexGuard g;
+
if( isAccessibleSelected( 0 , column ) && isAccessibleSelected( getAccessibleRowCount()-1,column))
{
SwCrsrShell* pCrsrShell = GetCrsrShell();
diff --git a/sw/source/core/access/acctextframe.cxx b/sw/source/core/access/acctextframe.cxx
index dc6bc34e5749..53befa85a29e 100644
--- a/sw/source/core/access/acctextframe.cxx
+++ b/sw/source/core/access/acctextframe.cxx
@@ -186,6 +186,8 @@ void SAL_CALL SwAccessibleTextFrame::selectAccessibleChild( sal_Int32 )
sal_Bool SAL_CALL SwAccessibleTextFrame::isAccessibleChildSelected( sal_Int32 nChildIndex )
throw (lang::IndexOutOfBoundsException, uno::RuntimeException )
{
+ SolarMutexGuard g;
+
uno::Reference<XAccessible> xAcc = getAccessibleChild( nChildIndex );
uno::Reference<XAccessibleContext> xContext;
if( xAcc.is() )
@@ -237,6 +239,8 @@ sal_Int32 SAL_CALL SwAccessibleTextFrame::getSelectedAccessibleChildCount()
uno::Reference<XAccessible> SAL_CALL SwAccessibleTextFrame::getSelectedAccessibleChild( sal_Int32 nSelectedChildIndex )
throw ( lang::IndexOutOfBoundsException, uno::RuntimeException)
{
+ SolarMutexGuard g;
+
if ( nSelectedChildIndex > getSelectedAccessibleChildCount() )
throw lang::IndexOutOfBoundsException();
sal_Int32 i1, i2;