diff options
author | Michael Meeks <michael.meeks@suse.com> | 2012-11-13 12:18:28 +0000 |
---|---|---|
committer | Michael Meeks <michael.meeks@suse.com> | 2012-11-15 16:06:06 +0000 |
commit | dbf239ddda094a43de2e052db72de232d89f214c (patch) | |
tree | caf36b42958643ca25719532ac4b49227c3d2089 /framework/source/layoutmanager | |
parent | 1099f6d52b1b8319c0eb9364ead75540318cfdc3 (diff) |
Revert "sb140: #i116786# use auto_ptr to track member lifetime"
This reverts commit 335f7fa8c2ef418df7010dd996a2a32bbbdff459.
Conflicts:
framework/source/layoutmanager/toolbarlayoutmanager.cxx
Diffstat (limited to 'framework/source/layoutmanager')
-rw-r--r-- | framework/source/layoutmanager/toolbarlayoutmanager.cxx | 14 | ||||
-rw-r--r-- | framework/source/layoutmanager/toolbarlayoutmanager.hxx | 5 |
2 files changed, 11 insertions, 8 deletions
diff --git a/framework/source/layoutmanager/toolbarlayoutmanager.cxx b/framework/source/layoutmanager/toolbarlayoutmanager.cxx index 2bb41fe93235..4eb77d26f2f7 100644 --- a/framework/source/layoutmanager/toolbarlayoutmanager.cxx +++ b/framework/source/layoutmanager/toolbarlayoutmanager.cxx @@ -65,6 +65,8 @@ ToolbarLayoutManager::ToolbarLayoutManager( m_pParentLayouter( pParentLayouter ), m_eDockOperation( DOCKOP_ON_COLROW ), m_ePreviewDetection( PREVIEWFRAME_UNKNOWN ), + m_pAddonOptions( 0 ), + m_pGlobalSettings( 0 ), m_bComponentAttached( false ), m_bLayoutDirty( false ), m_bStoreWindowState( false ), @@ -88,6 +90,8 @@ ToolbarLayoutManager::ToolbarLayoutManager( ToolbarLayoutManager::~ToolbarLayoutManager() { + delete m_pGlobalSettings; + delete m_pAddonOptions; } //--------------------------------------------------------------------------------------------------------- @@ -969,8 +973,8 @@ rtl::OUString ToolbarLayoutManager::implts_generateGenericAddonToolbarTitle( sal void ToolbarLayoutManager::implts_createAddonsToolBars() { WriteGuard aWriteLock( m_aLock ); - if ( m_pAddonOptions.get() == 0 ) - m_pAddonOptions.reset( new AddonsOptions ); + if ( !m_pAddonOptions ) + m_pAddonOptions = new AddonsOptions; uno::Reference< ui::XUIElementFactory > xUIElementFactory( m_xUIElementFactoryManager ); uno::Reference< frame::XFrame > xFrame( m_xFrame ); @@ -1580,12 +1584,12 @@ sal_Bool ToolbarLayoutManager::implts_readWindowStateData( const rtl::OUString& aWriteLock.lock(); bool bGlobalSettings( m_bGlobalSettings ); GlobalSettings* pGlobalSettings( 0 ); - if ( m_pGlobalSettings.get() == 0 ) + if ( m_pGlobalSettings == 0 ) { - m_pGlobalSettings.reset( new GlobalSettings( m_xContext ) ); + m_pGlobalSettings = new GlobalSettings( m_xContext ); bGetSettingsState = true; } - pGlobalSettings = m_pGlobalSettings.get(); + pGlobalSettings = m_pGlobalSettings; aWriteLock.unlock(); try diff --git a/framework/source/layoutmanager/toolbarlayoutmanager.hxx b/framework/source/layoutmanager/toolbarlayoutmanager.hxx index 1237c147de4b..8141d018c3e8 100644 --- a/framework/source/layoutmanager/toolbarlayoutmanager.hxx +++ b/framework/source/layoutmanager/toolbarlayoutmanager.hxx @@ -32,7 +32,6 @@ /** Attention: stl headers must(!) be included at first. Otherwhise it can make trouble with solaris headers ... */ -#include <memory> #include <vector> #include <threadhelp/threadhelpbase.hxx> @@ -318,8 +317,8 @@ class ToolbarLayoutManager : public ::cppu::WeakImplHelper3< ::com::sun::star::a DockingOperation m_eDockOperation; PreviewFrameDetection m_ePreviewDetection; - std::auto_ptr< AddonsOptions > m_pAddonOptions; - std::auto_ptr< GlobalSettings > m_pGlobalSettings; + AddonsOptions* m_pAddonOptions; + GlobalSettings* m_pGlobalSettings; bool m_bComponentAttached; bool m_bLayoutDirty; |