summaryrefslogtreecommitdiff
path: root/svtools
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2014-02-10 20:39:25 +0100
committerMichael Stahl <mstahl@redhat.com>2014-02-11 12:52:22 +0100
commit06d5616f65c6195b65d06f3733a4b325b74f3877 (patch)
treeeff4fac78293bb2007d0dcd7a83dc7d9df937dfe /svtools
parent414fa67bf20f1c8b1b75790142babb655a052ca9 (diff)
svtools: add some missing locks in new code
Change-Id: I6f000fb0f205b437e4ff5238c8ede5735c403077
Diffstat (limited to 'svtools')
-rw-r--r--svtools/source/control/valueacc.cxx1
-rw-r--r--svtools/source/control/vclxaccessibleheaderbar.cxx9
2 files changed, 9 insertions, 1 deletions
diff --git a/svtools/source/control/valueacc.cxx b/svtools/source/control/valueacc.cxx
index cba9d062d22b..786ad106566e 100644
--- a/svtools/source/control/valueacc.cxx
+++ b/svtools/source/control/valueacc.cxx
@@ -307,6 +307,7 @@ uno::Reference< accessibility::XAccessibleRelationSet > SAL_CALL ValueSetAcc::ge
throw (uno::RuntimeException)
{
ThrowIfDisposed();
+ SolarMutexGuard g;
uno::Reference< accessibility::XAccessibleRelationSet > xRelSet;
Window* pWindow = (Window*)mpParent;
if ( pWindow )
diff --git a/svtools/source/control/vclxaccessibleheaderbar.cxx b/svtools/source/control/vclxaccessibleheaderbar.cxx
index de2b2778fae9..e610875c7eae 100644
--- a/svtools/source/control/vclxaccessibleheaderbar.cxx
+++ b/svtools/source/control/vclxaccessibleheaderbar.cxx
@@ -26,6 +26,7 @@
#include <cppuhelper/typeprovider.hxx>
#include <comphelper/sequence.hxx>
#include <com/sun/star/accessibility/AccessibleRole.hpp>
+#include <vcl/svapp.hxx>
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
@@ -100,6 +101,8 @@ Sequence< ::rtl::OUString > VCLXAccessibleHeaderBar::getSupportedServiceNames()
sal_Int32 SAL_CALL VCLXAccessibleHeaderBar::getAccessibleChildCount( )
throw (::com::sun::star::uno::RuntimeException)
{
+ SolarMutexGuard g;
+
sal_Int32 nCount = 0;
if ( m_pHeadBar )
nCount = m_pHeadBar->GetItemCount();
@@ -109,6 +112,8 @@ sal_Int32 SAL_CALL VCLXAccessibleHeaderBar::getAccessibleChildCount( )
::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL
VCLXAccessibleHeaderBar::getAccessibleChild( sal_Int32 i ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException)
{
+ SolarMutexGuard g;
+
if ( i < 0 || i >= getAccessibleChildCount() )
throw IndexOutOfBoundsException();
@@ -130,8 +135,10 @@ sal_Int16 SAL_CALL VCLXAccessibleHeaderBar::getAccessibleRole( ) throw (::com::
return com::sun::star::accessibility::AccessibleRole::LIST;
}
-void SAL_CALL VCLXAccessibleHeaderBar::disposing (void)
+void SAL_CALL VCLXAccessibleHeaderBar::disposing()
{
+ SolarMutexGuard g;
+
ListItems().swap(m_aAccessibleChildren);
VCLXAccessibleComponent::disposing();
}