Kaydet (Commit) dbf239dd authored tarafından Michael Meeks's avatar Michael Meeks

Revert "sb140: #i116786# use auto_ptr to track member lifetime"

This reverts commit 335f7fa8.

Conflicts:
	framework/source/layoutmanager/toolbarlayoutmanager.cxx
üst 1099f6d5
...@@ -65,6 +65,8 @@ ToolbarLayoutManager::ToolbarLayoutManager( ...@@ -65,6 +65,8 @@ ToolbarLayoutManager::ToolbarLayoutManager(
m_pParentLayouter( pParentLayouter ), m_pParentLayouter( pParentLayouter ),
m_eDockOperation( DOCKOP_ON_COLROW ), m_eDockOperation( DOCKOP_ON_COLROW ),
m_ePreviewDetection( PREVIEWFRAME_UNKNOWN ), m_ePreviewDetection( PREVIEWFRAME_UNKNOWN ),
m_pAddonOptions( 0 ),
m_pGlobalSettings( 0 ),
m_bComponentAttached( false ), m_bComponentAttached( false ),
m_bLayoutDirty( false ), m_bLayoutDirty( false ),
m_bStoreWindowState( false ), m_bStoreWindowState( false ),
...@@ -88,6 +90,8 @@ ToolbarLayoutManager::ToolbarLayoutManager( ...@@ -88,6 +90,8 @@ ToolbarLayoutManager::ToolbarLayoutManager(
ToolbarLayoutManager::~ToolbarLayoutManager() ToolbarLayoutManager::~ToolbarLayoutManager()
{ {
delete m_pGlobalSettings;
delete m_pAddonOptions;
} }
//--------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------
...@@ -969,8 +973,8 @@ rtl::OUString ToolbarLayoutManager::implts_generateGenericAddonToolbarTitle( sal ...@@ -969,8 +973,8 @@ rtl::OUString ToolbarLayoutManager::implts_generateGenericAddonToolbarTitle( sal
void ToolbarLayoutManager::implts_createAddonsToolBars() void ToolbarLayoutManager::implts_createAddonsToolBars()
{ {
WriteGuard aWriteLock( m_aLock ); WriteGuard aWriteLock( m_aLock );
if ( m_pAddonOptions.get() == 0 ) if ( !m_pAddonOptions )
m_pAddonOptions.reset( new AddonsOptions ); m_pAddonOptions = new AddonsOptions;
uno::Reference< ui::XUIElementFactory > xUIElementFactory( m_xUIElementFactoryManager ); uno::Reference< ui::XUIElementFactory > xUIElementFactory( m_xUIElementFactoryManager );
uno::Reference< frame::XFrame > xFrame( m_xFrame ); uno::Reference< frame::XFrame > xFrame( m_xFrame );
...@@ -1580,12 +1584,12 @@ sal_Bool ToolbarLayoutManager::implts_readWindowStateData( const rtl::OUString& ...@@ -1580,12 +1584,12 @@ sal_Bool ToolbarLayoutManager::implts_readWindowStateData( const rtl::OUString&
aWriteLock.lock(); aWriteLock.lock();
bool bGlobalSettings( m_bGlobalSettings ); bool bGlobalSettings( m_bGlobalSettings );
GlobalSettings* pGlobalSettings( 0 ); 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; bGetSettingsState = true;
} }
pGlobalSettings = m_pGlobalSettings.get(); pGlobalSettings = m_pGlobalSettings;
aWriteLock.unlock(); aWriteLock.unlock();
try try
......
...@@ -32,7 +32,6 @@ ...@@ -32,7 +32,6 @@
/** Attention: stl headers must(!) be included at first. Otherwhise it can make trouble /** Attention: stl headers must(!) be included at first. Otherwhise it can make trouble
with solaris headers ... with solaris headers ...
*/ */
#include <memory>
#include <vector> #include <vector>
#include <threadhelp/threadhelpbase.hxx> #include <threadhelp/threadhelpbase.hxx>
...@@ -318,8 +317,8 @@ class ToolbarLayoutManager : public ::cppu::WeakImplHelper3< ::com::sun::star::a ...@@ -318,8 +317,8 @@ class ToolbarLayoutManager : public ::cppu::WeakImplHelper3< ::com::sun::star::a
DockingOperation m_eDockOperation; DockingOperation m_eDockOperation;
PreviewFrameDetection m_ePreviewDetection; PreviewFrameDetection m_ePreviewDetection;
std::auto_ptr< AddonsOptions > m_pAddonOptions; AddonsOptions* m_pAddonOptions;
std::auto_ptr< GlobalSettings > m_pGlobalSettings; GlobalSettings* m_pGlobalSettings;
bool m_bComponentAttached; bool m_bComponentAttached;
bool m_bLayoutDirty; bool m_bLayoutDirty;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment