diff options
author | Michael Meeks <michael.meeks@novell.com> | 2011-09-23 14:05:07 +0100 |
---|---|---|
committer | Michael Meeks <michael.meeks@novell.com> | 2011-09-24 08:33:46 +0100 |
commit | c8dc73720883333a13187865cd0d69b64af6b4b5 (patch) | |
tree | c9037bb6e79fd49507f2de1cf2b22f7159572720 /cui/source/tabpages/tpbitmap.cxx | |
parent | 7fc35af5fd3171cc9bf43d2c27660afcf407d3f6 (diff) |
re-factor XPropertyList derivatives to use a rtl::Reference
This cleans up a lot of lifecycle nasties and cleans up some serious
cut/paste code duplication issues at the same time. Cleanup the
naming of ColorTable -> ColorList to match the impl. too
Diffstat (limited to 'cui/source/tabpages/tpbitmap.cxx')
-rw-r--r-- | cui/source/tabpages/tpbitmap.cxx | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/cui/source/tabpages/tpbitmap.cxx b/cui/source/tabpages/tpbitmap.cxx index 3deed69a50f1..4d4ea337edb9 100644 --- a/cui/source/tabpages/tpbitmap.cxx +++ b/cui/source/tabpages/tpbitmap.cxx @@ -176,7 +176,7 @@ void SvxBitmapTabPage::ActivatePage( const SfxItemSet& ) { *pbAreaTP = sal_False; - if( pColorTab ) + if( pColorTab.is() ) { // ColorTable if( *pnColorTableState & CT_CHANGED || @@ -958,14 +958,11 @@ IMPL_LINK( SvxBitmapTabPage, ClickLoadHdl_Impl, void *, EMPTYARG ) aPathURL.removeFinalSlash(); // Tabelle speichern - XBitmapList* pBmpList = new XBitmapList( aPathURL.GetMainURL( INetURLObject::NO_DECODE ), pXPool ); + XBitmapListRef pBmpList = XPropertyList::CreatePropertyList( + XBITMAP_LIST, aPathURL.GetMainURL( INetURLObject::NO_DECODE ), pXPool )->AsBitmapList(); pBmpList->SetName( aURL.getName() ); if( pBmpList->Load() ) { - // Pruefen, ob Tabelle geloescht werden darf: - if( pBitmapList != ( (SvxAreaTabDialog*) DLGWIN )->GetBitmapList() ) - delete pBitmapList; - pBitmapList = pBmpList; ( (SvxAreaTabDialog*) DLGWIN )->SetNewBitmapList( pBitmapList ); |