diff --git a/framework/inc/xml/imagesdocumenthandler.hxx b/framework/inc/xml/imagesdocumenthandler.hxx index 3791b3f99ee0..f6e663435d41 100644 --- a/framework/inc/xml/imagesdocumenthandler.hxx +++ b/framework/inc/xml/imagesdocumenthandler.hxx @@ -25,7 +25,6 @@ #include #include -#include #include #include @@ -37,8 +36,7 @@ namespace framework{ // Hash code function for using in all hash maps of follow implementation. -class OReadImagesDocumentHandler : private ThreadHelpBase, // Struct for right initalization of lock member! Must be first of baseclasses. - public ::cppu::WeakImplHelper1< ::com::sun::star::xml::sax::XDocumentHandler > +class OReadImagesDocumentHandler : public ::cppu::WeakImplHelper1< ::com::sun::star::xml::sax::XDocumentHandler > { public: enum Image_XML_Entry @@ -140,7 +138,7 @@ class OReadImagesDocumentHandler : private ThreadHelpBase, // Struct for right ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XLocator > m_xLocator; }; -class OWriteImagesDocumentHandler : private ThreadHelpBase // Struct for right initalization of lock member! Must be first of baseclasses. +class OWriteImagesDocumentHandler { public: OWriteImagesDocumentHandler( diff --git a/framework/source/xml/imagesdocumenthandler.cxx b/framework/source/xml/imagesdocumenthandler.cxx index 610b580b67cf..79bb0b6db6eb 100644 --- a/framework/source/xml/imagesdocumenthandler.cxx +++ b/framework/source/xml/imagesdocumenthandler.cxx @@ -20,7 +20,6 @@ #include -#include #include #include @@ -102,7 +101,6 @@ ImageXMLEntryProperty ImagesEntries[OReadImagesDocumentHandler::IMG_XML_ENTRY_CO OReadImagesDocumentHandler::OReadImagesDocumentHandler( ImageListsDescriptor& aItems ) : - ThreadHelpBase( &Application::GetSolarMutex() ), m_aImageList( aItems ), m_pImages( 0 ), m_pExternalImages( 0 ) @@ -152,7 +150,7 @@ throw ( SAXException, RuntimeException, std::exception ) void SAL_CALL OReadImagesDocumentHandler::endDocument(void) throw( SAXException, RuntimeException, std::exception ) { - Guard aGuard( m_aLock ); + SolarMutexGuard g; if (( m_bImageContainerStartFound && !m_bImageContainerEndFound ) || ( !m_bImageContainerStartFound && m_bImageContainerEndFound ) ) @@ -169,7 +167,7 @@ void SAL_CALL OReadImagesDocumentHandler::startElement( RuntimeException, std::exception) { - Guard aGuard( m_aLock ); + SolarMutexGuard g; ImageHashMap::const_iterator pImageEntry = m_aImageMap.find( aName ) ; if ( pImageEntry != m_aImageMap.end() ) @@ -503,7 +501,7 @@ void SAL_CALL OReadImagesDocumentHandler::endElement(const OUString& aName) RuntimeException, std::exception) { - Guard aGuard( m_aLock ); + SolarMutexGuard g; ImageHashMap::const_iterator pImageEntry = m_aImageMap.find( aName ) ; if ( pImageEntry != m_aImageMap.end() ) @@ -579,16 +577,13 @@ void SAL_CALL OReadImagesDocumentHandler::setDocumentLocator( const Reference< XLocator > &xLocator) throw( SAXException, RuntimeException, std::exception ) { - Guard aGuard( m_aLock ); - + SolarMutexGuard g; m_xLocator = xLocator; } OUString OReadImagesDocumentHandler::getErrorLineString() { - Guard aGuard( m_aLock ); - - + SolarMutexGuard g; if ( m_xLocator.is() ) { OUStringBuffer buffer("Line: "); @@ -608,7 +603,6 @@ OUString OReadImagesDocumentHandler::getErrorLineString() OWriteImagesDocumentHandler::OWriteImagesDocumentHandler( const ImageListsDescriptor& aItems, Reference< XDocumentHandler > rWriteDocumentHandler ) : - ThreadHelpBase( &Application::GetSolarMutex() ), m_aImageListsItems( aItems ), m_xWriteDocumentHandler( rWriteDocumentHandler ) { @@ -628,7 +622,7 @@ OWriteImagesDocumentHandler::~OWriteImagesDocumentHandler() void OWriteImagesDocumentHandler::WriteImagesDocument() throw ( SAXException, RuntimeException ) { - Guard aGuard( m_aLock ); + SolarMutexGuard g; m_xWriteDocumentHandler->startDocument();