style.cxx (40df464e) | style.cxx (6b46875c) |
---|---|
1/************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance --- 792 unchanged lines hidden (view full) --- 801 if( p ) 802 { 803 SfxStyles::iterator aIter( std::find( aStyles.begin(), aStyles.end(), rtl::Reference< SfxStyleSheetBase >( p ) ) ); 804 if( aIter != aStyles.end() ) 805 { 806 // Alle Styles umsetzen, deren Parent dieser hier ist 807 ChangeParent( p->GetName(), p->GetParent() ); 808 | 1/************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance --- 792 unchanged lines hidden (view full) --- 801 if( p ) 802 { 803 SfxStyles::iterator aIter( std::find( aStyles.begin(), aStyles.end(), rtl::Reference< SfxStyleSheetBase >( p ) ) ); 804 if( aIter != aStyles.end() ) 805 { 806 // Alle Styles umsetzen, deren Parent dieser hier ist 807 ChangeParent( p->GetName(), p->GetParent() ); 808 |
809 com::sun::star::uno::Reference< com::sun::star::lang::XComponent > xComp( static_cast< ::cppu::OWeakObject* >((*aIter).get()), com::sun::star::uno::UNO_QUERY ); 810 if( xComp.is() ) try 811 { 812 xComp->dispose(); 813 } 814 catch( com::sun::star::uno::Exception& ) 815 { 816 } | 809 // #120015# Do not dispose, the removed StyleSheet may still be used in 810 // existing SdrUndoAttrObj incarnations. Rely on refcounting for disposal, 811 // this works well under normal conditions (checked breaking and counting 812 // on SfxStyleSheetBase constructors and destructors) 813 // 814 // com::sun::star::uno::Reference< com::sun::star::lang::XComponent > xComp( static_cast< ::cppu::OWeakObject* >((*aIter).get()), com::sun::star::uno::UNO_QUERY ); 815 // if( xComp.is() ) try 816 // { 817 // xComp->dispose(); 818 // } 819 // catch( com::sun::star::uno::Exception& ) 820 // { 821 // } |
817 818 aStyles.erase(aIter); 819 Broadcast( SfxStyleSheetHint( SFX_STYLESHEET_ERASED, *p ) ); 820 } 821 } 822} 823 824void SfxStyleSheetBasePool::Insert( SfxStyleSheetBase* p ) --- 569 unchanged lines hidden --- | 822 823 aStyles.erase(aIter); 824 Broadcast( SfxStyleSheetHint( SFX_STYLESHEET_ERASED, *p ) ); 825 } 826 } 827} 828 829void SfxStyleSheetBasePool::Insert( SfxStyleSheetBase* p ) --- 569 unchanged lines hidden --- |