summaryrefslogtreecommitdiff
path: root/svl/source/items/style.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'svl/source/items/style.cxx')
-rw-r--r--svl/source/items/style.cxx21
1 files changed, 13 insertions, 8 deletions
diff --git a/svl/source/items/style.cxx b/svl/source/items/style.cxx
index c2879e799f1a..8c8c19314736 100644
--- a/svl/source/items/style.cxx
+++ b/svl/source/items/style.cxx
@@ -734,14 +734,19 @@ 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& )
- {
- }
+ // #120015# Do not dispose, the removed StyleSheet may still be used in
+ // existing SdrUndoAttrObj incarnations. Rely on refcounting for disposal,
+ // this works well under normal conditions (checked breaking and counting
+ // on SfxStyleSheetBase constructors and destructors)
+ //
+ // 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 ) );