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

sw: more double dispose work.

Change-Id: I746623d14a96bb1b2756e49da4d41adf9dbc55ca
üst 7fd0cd65
...@@ -206,7 +206,7 @@ bool ODesignView::PreNotify( NotifyEvent& rNEvt ) ...@@ -206,7 +206,7 @@ bool ODesignView::PreNotify( NotifyEvent& rNEvt )
const vcl::KeyCode& rCode = pKeyEvent->GetKeyCode(); const vcl::KeyCode& rCode = pKeyEvent->GetKeyCode();
util::URL aUrl; util::URL aUrl;
aUrl.Complete = m_pAccel->findCommand(svt::AcceleratorExecute::st_VCLKey2AWTKey(rCode)); aUrl.Complete = m_pAccel->findCommand(svt::AcceleratorExecute::st_VCLKey2AWTKey(rCode));
if ( aUrl.Complete.isEmpty() || !m_rController.isCommandEnabled( aUrl.Complete ) ) if ( aUrl.Complete.isEmpty() || !m_xController->isCommandEnabled( aUrl.Complete ) )
nRet = false; nRet = false;
} }
} }
......
...@@ -34,6 +34,11 @@ SwFrameControlsManager::SwFrameControlsManager( const SwFrameControlsManager& rC ...@@ -34,6 +34,11 @@ SwFrameControlsManager::SwFrameControlsManager( const SwFrameControlsManager& rC
{ {
} }
void SwFrameControlsManager::dispose()
{
m_aControls.clear();
}
const SwFrameControlsManager& SwFrameControlsManager::operator=( const SwFrameControlsManager& rCopy ) const SwFrameControlsManager& SwFrameControlsManager::operator=( const SwFrameControlsManager& rCopy )
{ {
m_pEditWin = rCopy.m_pEditWin; m_pEditWin = rCopy.m_pEditWin;
......
...@@ -124,9 +124,13 @@ void SwPageBreakWin::dispose() ...@@ -124,9 +124,13 @@ void SwPageBreakWin::dispose()
m_bDestroyed = true; m_bDestroyed = true;
m_aFadeTimer.Stop(); m_aFadeTimer.Stop();
delete m_pPopupMenu;
delete m_pLine; delete m_pLine;
m_pLine = NULL;
delete m_pPopupMenu;
m_pPopupMenu = NULL;
delete m_pMousePt; delete m_pMousePt;
m_pMousePt = NULL;
MenuButton::dispose(); MenuButton::dispose();
} }
......
...@@ -142,6 +142,9 @@ SwSidebarWin::~SwSidebarWin() ...@@ -142,6 +142,9 @@ SwSidebarWin::~SwSidebarWin()
void SwSidebarWin::dispose() void SwSidebarWin::dispose()
{ {
if (IsDisposed())
return;
mrMgr.DisconnectSidebarWinFromFrm( *(mrSidebarItem.maLayoutInfo.mpAnchorFrm), mrMgr.DisconnectSidebarWinFromFrm( *(mrSidebarItem.maLayoutInfo.mpAnchorFrm),
*this ); *this );
...@@ -206,6 +209,7 @@ void SwSidebarWin::dispose() ...@@ -206,6 +209,7 @@ void SwSidebarWin::dispose()
if (mnEventId) if (mnEventId)
Application::RemoveUserEvent( mnEventId ); Application::RemoveUserEvent( mnEventId );
vcl::Window::dispose(); vcl::Window::dispose();
} }
......
...@@ -4974,16 +4974,29 @@ SwEditWin::~SwEditWin() ...@@ -4974,16 +4974,29 @@ SwEditWin::~SwEditWin()
void SwEditWin::dispose() void SwEditWin::dispose()
{ {
m_aKeyInputTimer.Stop(); m_aKeyInputTimer.Stop();
delete m_pShadCrsr; delete m_pShadCrsr;
m_pShadCrsr = NULL;
delete m_pRowColumnSelectionStart; delete m_pRowColumnSelectionStart;
m_pRowColumnSelectionStart = NULL;
if( m_pQuickHlpData->m_bIsDisplayed && m_rView.GetWrtShellPtr() ) if( m_pQuickHlpData->m_bIsDisplayed && m_rView.GetWrtShellPtr() )
m_pQuickHlpData->Stop( m_rView.GetWrtShell() ); m_pQuickHlpData->Stop( m_rView.GetWrtShell() );
g_bExecuteDrag = false; g_bExecuteDrag = false;
delete m_pApplyTempl; delete m_pApplyTempl;
m_pApplyTempl = NULL;
m_rView.SetDrawFuncPtr(NULL); m_rView.SetDrawFuncPtr(NULL);
delete m_pUserMarker; delete m_pUserMarker;
m_pUserMarker = NULL;
delete m_pAnchorMarker; delete m_pAnchorMarker;
m_pAnchorMarker = NULL;
m_aFrameControlsManager.dispose();
vcl::Window::dispose(); vcl::Window::dispose();
} }
......
...@@ -35,7 +35,8 @@ class SwFrameControlsManager ...@@ -35,7 +35,8 @@ class SwFrameControlsManager
public: public:
SwFrameControlsManager( SwEditWin* pEditWin ); SwFrameControlsManager( SwEditWin* pEditWin );
~SwFrameControlsManager( ); ~SwFrameControlsManager();
void dispose();
SwFrameControlsManager( const SwFrameControlsManager& rCopy ); SwFrameControlsManager( const SwFrameControlsManager& rCopy );
const SwFrameControlsManager& operator=( const SwFrameControlsManager& rCopy ); const SwFrameControlsManager& operator=( const SwFrameControlsManager& rCopy );
......
...@@ -2530,6 +2530,8 @@ void Window::GetBorder( sal_Int32& rLeftBorder, sal_Int32& rTopBorder, ...@@ -2530,6 +2530,8 @@ void Window::GetBorder( sal_Int32& rLeftBorder, sal_Int32& rTopBorder,
void Window::Enable( bool bEnable, bool bChild ) void Window::Enable( bool bEnable, bool bChild )
{ {
if ( IsDisposed() )
return;
if ( !bEnable ) if ( !bEnable )
{ {
......
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