summaryrefslogtreecommitdiff
path: root/svl
diff options
context:
space:
mode:
authorIvo Hinkelmann <ihi@openoffice.org>2010-05-11 11:08:58 +0200
committerIvo Hinkelmann <ihi@openoffice.org>2010-05-11 11:08:58 +0200
commit977d781e21898b22a6f896714829c1e8efcdb3be (patch)
tree924e171e49f27060e004342000241a9d94ca6736 /svl
parent7c365da7e4dff304ebd1b0fc114587d98ad8a221 (diff)
parent0d26b21b603b07aa6dba089c12e8a6c66eade60a (diff)
CWS-TOOLING: integrate CWS impress188
Diffstat (limited to 'svl')
-rw-r--r--svl/source/items/style.cxx22
1 files changed, 21 insertions, 1 deletions
diff --git a/svl/source/items/style.cxx b/svl/source/items/style.cxx
index b8bed49b603b..60c622208d53 100644
--- a/svl/source/items/style.cxx
+++ b/svl/source/items/style.cxx
@@ -28,7 +28,8 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_svl.hxx"
-#ifndef GCC
+#ifndef _COM_SUN_STAR_LANG_XCOMPONENT_HPP_
+#include <com/sun/star/lang/XComponent.hpp>
#endif
#define _SVSTDARR_STRINGS
@@ -808,6 +809,16 @@ void SfxStyleSheetBasePool::Remove( SfxStyleSheetBase* p )
{
// Alle Styles umsetzen, deren Parent dieser hier ist
ChangeParent( p->GetName(), p->GetParent() );
+
+ com::sun::star::uno::Reference< com::sun::star::lang::XComponent > xComp( static_cast< ::cppu::OWeakObject* >((*aIter).get()), com::sun::star::uno::UNO_QUERY );
+ if( xComp.is() ) try
+ {
+ xComp->dispose();
+ }
+ catch( com::sun::star::uno::Exception& )
+ {
+ }
+
aStyles.erase(aIter);
Broadcast( SfxStyleSheetHint( SFX_STYLESHEET_ERASED, *p ) );
}
@@ -838,6 +849,15 @@ void SfxStyleSheetBasePool::Clear()
SfxStyles::iterator aIter( aClearStyles.begin() );
while( aIter != aClearStyles.end() )
{
+ com::sun::star::uno::Reference< com::sun::star::lang::XComponent > xComp( static_cast< ::cppu::OWeakObject* >((*aIter).get()), com::sun::star::uno::UNO_QUERY );
+ if( xComp.is() ) try
+ {
+ xComp->dispose();
+ }
+ catch( com::sun::star::uno::Exception& )
+ {
+ }
+
Broadcast( SfxStyleSheetHint( SFX_STYLESHEET_ERASED, *(*aIter++).get() ) );
}
}