diff options
author | Michael Stahl <mstahl@redhat.com> | 2014-02-10 23:25:01 +0100 |
---|---|---|
committer | Michael Meeks <michael.meeks@collabora.com> | 2014-06-10 16:33:55 +0100 |
commit | bd554e1d330bc7cda9cc6bdd2e4b746d6429084b (patch) | |
tree | 70a45c635bf462adfaf739b99c1694db0338187a /sc | |
parent | b33409289cd46a782421e7698286bb980dc5d39c (diff) |
sc: add some missing locks in new code
Change-Id: Ia35693f6c5915e898e5b137920431c7bebfc761c
Diffstat (limited to 'sc')
5 files changed, 26 insertions, 1 deletions
diff --git a/sc/source/ui/Accessibility/AccessibleCell.cxx b/sc/source/ui/Accessibility/AccessibleCell.cxx index c768f8a63eff..626748bda0f0 100644 --- a/sc/source/ui/Accessibility/AccessibleCell.cxx +++ b/sc/source/ui/Accessibility/AccessibleCell.cxx @@ -498,6 +498,8 @@ OUString ReplaceFourChar(OUString oldOUString) uno::Any SAL_CALL ScAccessibleCell::getExtendedAttributes() throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException) { + SolarMutexGuard aGuard; + uno::Any strRet; if (mpViewShell) { @@ -531,6 +533,8 @@ uno::Any SAL_CALL ScAccessibleCell::getExtendedAttributes() // cell has its own ParaIndent property, so when calling character attributes on cell, the ParaIndent should replace the ParaLeftMargin if its value is not zero. uno::Sequence< beans::PropertyValue > SAL_CALL ScAccessibleCell::getCharacterAttributes( sal_Int32 nIndex, const ::com::sun::star::uno::Sequence< OUString >& aRequestedAttributes ) throw (lang::IndexOutOfBoundsException, uno::RuntimeException) { + SolarMutexGuard aGuard; + uno::Sequence< beans::PropertyValue > aAttribs = AccessibleStaticTextBase::getCharacterAttributes( nIndex, aRequestedAttributes ); beans::PropertyValue *pAttribs = aAttribs.getArray(); diff --git a/sc/source/ui/Accessibility/AccessibleDataPilotControl.cxx b/sc/source/ui/Accessibility/AccessibleDataPilotControl.cxx index 0b5dc352adc4..a620ce20c00d 100644 --- a/sc/source/ui/Accessibility/AccessibleDataPilotControl.cxx +++ b/sc/source/ui/Accessibility/AccessibleDataPilotControl.cxx @@ -721,6 +721,8 @@ uno::Reference<XAccessibleStateSet> SAL_CALL ScAccessibleDataPilotButton::getAcc ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleRelationSet > SAL_CALL ScAccessibleDataPilotButton::getAccessibleRelationSet( ) throw (::com::sun::star::uno::RuntimeException) { + SolarMutexGuard g; + utl::AccessibleRelationSetHelper* pRelationSetHelper = new utl::AccessibleRelationSetHelper; uno::Reference< com::sun::star::accessibility::XAccessibleRelationSet > xSet = pRelationSetHelper; if(mxParent.is()) @@ -759,7 +761,9 @@ uno::Sequence<sal_Int8> SAL_CALL ScAccessibleDataPilotButton::getImplementationI OUString SAL_CALL ScAccessibleDataPilotButton::createAccessibleDescription(void) throw (::com::sun::star::uno::RuntimeException) { - if (mpFieldWindow) + SolarMutexGuard g; + + if (mpFieldWindow) return mpFieldWindow->GetHelpText(); return OUString(); } @@ -822,6 +826,8 @@ OUString ScAccessibleDataPilotButton::getAccessibleActionDescription ( sal_Int32 ::com::sun::star::uno::Reference< XAccessibleKeyBinding > ScAccessibleDataPilotButton::getAccessibleActionKeyBinding( sal_Int32 nIndex ) throw (lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException) { + SolarMutexGuard g; + if ( nIndex < 0 || nIndex >= getAccessibleActionCount() ) throw lang::IndexOutOfBoundsException(); comphelper::OAccessibleKeyBindingHelper* pKeyBindingHelper = new comphelper::OAccessibleKeyBindingHelper(); diff --git a/sc/source/ui/Accessibility/AccessibleDocument.cxx b/sc/source/ui/Accessibility/AccessibleDocument.cxx index 2dfee9db7fa8..20bfb0cf480f 100644 --- a/sc/source/ui/Accessibility/AccessibleDocument.cxx +++ b/sc/source/ui/Accessibility/AccessibleDocument.cxx @@ -1868,6 +1868,8 @@ OUString SAL_CALL ScAccessibleDocument::getAccessibleName(void) throw (::com::sun::star::uno::RuntimeException) { + SolarMutexGuard g; + OUString aName = ScResId(STR_ACC_DOC_SPREADSHEET); ScDocument* pScDoc = GetDocument(); if (!pScDoc) @@ -2389,6 +2391,7 @@ ScAddress ScAccessibleDocument::GetCurCellAddress() const uno::Any SAL_CALL ScAccessibleDocument::getExtendedAttributes() throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException) { + SolarMutexGuard g; uno::Any anyAtrribute; @@ -2465,6 +2468,8 @@ com::sun::star::uno::Sequence< com::sun::star::uno::Any > ScAccessibleDocument:: SAL_CALL ScAccessibleDocument::get_AccFlowTo(const ::com::sun::star::uno::Any& rAny, sal_Int32 nType) throw ( ::com::sun::star::uno::RuntimeException ) { + SolarMutexGuard g; + const sal_Int32 SPELLCHECKFLOWTO = 1; const sal_Int32 FINDREPLACEFLOWTO = 2; if ( nType == SPELLCHECKFLOWTO ) diff --git a/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx b/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx index d9abbb9c0fd8..08a5e09fb597 100644 --- a/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx +++ b/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx @@ -1700,6 +1700,8 @@ ScShapeChildren* ScAccessibleDocumentPagePreview::GetShapeChildren() OUString ScAccessibleDocumentPagePreview::getAccessibleName(void) throw (::com::sun::star::uno::RuntimeException) { + SolarMutexGuard g; + OUString aName = ScResId(STR_ACC_DOC_SPREADSHEET); ScDocument* pScDoc = mpViewShell->GetDocument(); if (!pScDoc) diff --git a/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx b/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx index 29c22425383d..6c1e86c90eac 100644 --- a/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx +++ b/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx @@ -1503,6 +1503,8 @@ Rectangle ScAccessibleSpreadsheet::GetVisCells(const Rectangle& rVisArea) sal_Bool SAL_CALL ScAccessibleSpreadsheet::selectRow( sal_Int32 row ) throw (lang::IndexOutOfBoundsException, uno::RuntimeException) { + SolarMutexGuard g; + if (IsFormulaMode()) { return sal_False; @@ -1519,6 +1521,8 @@ throw (lang::IndexOutOfBoundsException, uno::RuntimeException) sal_Bool SAL_CALL ScAccessibleSpreadsheet::selectColumn( sal_Int32 column ) throw (lang::IndexOutOfBoundsException, uno::RuntimeException) { + SolarMutexGuard g; + if (IsFormulaMode()) { return sal_False; @@ -1535,6 +1539,8 @@ sal_Bool SAL_CALL ScAccessibleSpreadsheet::selectColumn( sal_Int32 column ) sal_Bool SAL_CALL ScAccessibleSpreadsheet::unselectRow( sal_Int32 row ) throw (lang::IndexOutOfBoundsException, uno::RuntimeException) { + SolarMutexGuard g; + if (IsFormulaMode()) { return sal_False; @@ -1552,6 +1558,8 @@ sal_Bool SAL_CALL ScAccessibleSpreadsheet::unselectRow( sal_Int32 row ) sal_Bool SAL_CALL ScAccessibleSpreadsheet::unselectColumn( sal_Int32 column ) throw (lang::IndexOutOfBoundsException, uno::RuntimeException) { + SolarMutexGuard g; + if (IsFormulaMode()) { return sal_False; |