summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2014-03-18 14:34:20 +0100
committerStephan Bergmann <sbergman@redhat.com>2014-03-18 15:27:06 +0100
commite28207718cf83fa93bb1010a047fcb526d504e95 (patch)
tree1fc1552ef45bd3fa0037d760790f1b8c871461fa
parent3b45c88a404683bbad8dfbbbadffa2494b8476c0 (diff)
Use SolarMutexGuard directly
Change-Id: I0438d85b0c51010eff9e8d53ed8acada98563a20
-rw-r--r--framework/inc/xml/toolboxdocumenthandler.hxx5
-rw-r--r--framework/source/fwe/xml/toolboxdocumenthandler.cxx15
2 files changed, 8 insertions, 12 deletions
diff --git a/framework/inc/xml/toolboxdocumenthandler.hxx b/framework/inc/xml/toolboxdocumenthandler.hxx
index f57ce625a9fe..c1c3b165c444 100644
--- a/framework/inc/xml/toolboxdocumenthandler.hxx
+++ b/framework/inc/xml/toolboxdocumenthandler.hxx
@@ -25,7 +25,6 @@
#include <com/sun/star/xml/sax/XDocumentHandler.hpp>
#include <com/sun/star/beans/PropertyValue.hpp>
-#include <threadhelp/threadhelpbase.hxx>
#include <rtl/ustring.hxx>
#include <cppuhelper/implbase1.hxx>
#include <stdtypes.h>
@@ -36,7 +35,7 @@ namespace framework{
// Hash code function for using in all hash maps of follow implementation.
-class FWE_DLLPUBLIC OReadToolBoxDocumentHandler : private ThreadHelpBase, // Struct for right initalization of lock member! Must be first of baseclasses.
+class FWE_DLLPUBLIC OReadToolBoxDocumentHandler :
public ::cppu::WeakImplHelper1< ::com::sun::star::xml::sax::XDocumentHandler >
{
public:
@@ -152,7 +151,7 @@ class FWE_DLLPUBLIC OReadToolBoxDocumentHandler : private ThreadHelpBase, // S
};
-class FWE_DLLPUBLIC OWriteToolBoxDocumentHandler : private ThreadHelpBase // Struct for right initalization of lock member! Must be first of baseclasses.
+class FWE_DLLPUBLIC OWriteToolBoxDocumentHandler
{
public:
OWriteToolBoxDocumentHandler(
diff --git a/framework/source/fwe/xml/toolboxdocumenthandler.cxx b/framework/source/fwe/xml/toolboxdocumenthandler.cxx
index fcef4080f13b..854cb4b4fa03 100644
--- a/framework/source/fwe/xml/toolboxdocumenthandler.cxx
+++ b/framework/source/fwe/xml/toolboxdocumenthandler.cxx
@@ -20,7 +20,6 @@
#include <stdio.h>
-#include <threadhelp/guard.hxx>
#include <xml/toolboxdocumenthandler.hxx>
#include <xml/toolboxconfigurationdefines.hxx>
@@ -139,7 +138,6 @@ ToolBarEntryProperty ToolBoxEntries[OReadToolBoxDocumentHandler::TB_XML_ENTRY_CO
};
OReadToolBoxDocumentHandler::OReadToolBoxDocumentHandler( const Reference< XIndexContainer >& rItemContainer ) :
- ThreadHelpBase( &Application::GetSolarMutex() ),
m_rItemContainer( rItemContainer ),
m_aType( ITEM_DESCRIPTOR_TYPE ),
m_aLabel( ITEM_DESCRIPTOR_LABEL ),
@@ -204,7 +202,7 @@ throw ( SAXException, RuntimeException, std::exception )
void SAL_CALL OReadToolBoxDocumentHandler::endDocument(void)
throw( SAXException, RuntimeException, std::exception )
{
- Guard aGuard( m_aLock );
+ SolarMutexGuard g;
if (( m_bToolBarStartFound && !m_bToolBarEndFound ) ||
( !m_bToolBarStartFound && m_bToolBarEndFound ) )
@@ -219,7 +217,7 @@ void SAL_CALL OReadToolBoxDocumentHandler::startElement(
const OUString& aName, const Reference< XAttributeList > &xAttribs )
throw( SAXException, RuntimeException, std::exception )
{
- Guard aGuard( m_aLock );
+ SolarMutexGuard g;
ToolBoxHashMap::const_iterator pToolBoxEntry = m_aToolBoxMap.find( aName ) ;
if ( pToolBoxEntry != m_aToolBoxMap.end() )
@@ -537,7 +535,7 @@ throw( SAXException, RuntimeException, std::exception )
void SAL_CALL OReadToolBoxDocumentHandler::endElement(const OUString& aName)
throw( SAXException, RuntimeException, std::exception )
{
- Guard aGuard( m_aLock );
+ SolarMutexGuard g;
ToolBoxHashMap::const_iterator pToolBoxEntry = m_aToolBoxMap.find( aName ) ;
if ( pToolBoxEntry != m_aToolBoxMap.end() )
@@ -635,14 +633,14 @@ void SAL_CALL OReadToolBoxDocumentHandler::setDocumentLocator(
const Reference< XLocator > &xLocator)
throw( SAXException, RuntimeException, std::exception )
{
- Guard aGuard( m_aLock );
+ SolarMutexGuard g;
m_xLocator = xLocator;
}
OUString OReadToolBoxDocumentHandler::getErrorLineString()
{
- Guard aGuard( m_aLock );
+ SolarMutexGuard g;
char buffer[32];
@@ -663,7 +661,6 @@ OUString OReadToolBoxDocumentHandler::getErrorLineString()
OWriteToolBoxDocumentHandler::OWriteToolBoxDocumentHandler(
const Reference< XIndexAccess >& rItemAccess,
Reference< XDocumentHandler >& rWriteDocumentHandler ) :
- ThreadHelpBase( &Application::GetSolarMutex() ),
m_xWriteDocumentHandler( rWriteDocumentHandler ),
m_rItemAccess( rItemAccess )
{
@@ -681,7 +678,7 @@ OWriteToolBoxDocumentHandler::~OWriteToolBoxDocumentHandler()
void OWriteToolBoxDocumentHandler::WriteToolBoxDocument() throw
( SAXException, RuntimeException )
{
- Guard aGuard( m_aLock );
+ SolarMutexGuard g;
m_xWriteDocumentHandler->startDocument();