[Libreoffice-commits] core.git: Branch 'feature/vclref' - accessibility/source avmedia/source basctl/source cui/source sfx2/source
Michael Meeks
michael.meeks at collabora.com
Tue Mar 17 13:20:45 PDT 2015
accessibility/source/extended/AccessibleToolPanelDeck.cxx | 2 +-
accessibility/source/extended/AccessibleToolPanelDeckTabBar.cxx | 2 +-
accessibility/source/extended/AccessibleToolPanelDeckTabBarItem.cxx | 2 +-
avmedia/source/framework/mediacontrol.cxx | 2 +-
basctl/source/basicide/basidesh.cxx | 6 ++++++
basctl/source/basicide/moduldl2.cxx | 2 +-
basctl/source/basicide/moduldlg.cxx | 2 +-
cui/source/customize/cfg.cxx | 2 +-
cui/source/dialogs/iconcdlg.cxx | 2 +-
cui/source/dialogs/multipat.cxx | 2 +-
cui/source/factory/dlgfact.cxx | 5 ++++-
cui/source/factory/dlgfact.hxx | 3 ++-
sfx2/source/appl/childwin.cxx | 6 +++---
13 files changed, 24 insertions(+), 14 deletions(-)
New commits:
commit e9722508e4a117a4538b9bf0db8d89e6b6a0f510
Author: Michael Meeks <michael.meeks at collabora.com>
Date: Tue Mar 17 20:19:40 2015 +0000
clear() is the equivalent of assigning a local ptr to NULL.
Sometimes it matters; doing a disposeAndClear() instead can change
the order of destruction profoundly. Fix a number of issues from:
"vclwidget: change all vcl::window fields to be wrapped in VclPtr"
Change-Id: I3127d3ed973458e8299156453258e167dbdb8ccf
diff --git a/accessibility/source/extended/AccessibleToolPanelDeck.cxx b/accessibility/source/extended/AccessibleToolPanelDeck.cxx
index 54a8f58..3921c31 100644
--- a/accessibility/source/extended/AccessibleToolPanelDeck.cxx
+++ b/accessibility/source/extended/AccessibleToolPanelDeck.cxx
@@ -141,7 +141,7 @@ namespace accessibility
{
ENSURE_OR_RETURN_VOID( !isDisposed(), "disposed twice" );
m_pPanelDeck->RemoveListener( *this );
- m_pPanelDeck.disposeAndClear();
+ m_pPanelDeck.clear();
m_xAccessibleParent.clear();
}
diff --git a/accessibility/source/extended/AccessibleToolPanelDeckTabBar.cxx b/accessibility/source/extended/AccessibleToolPanelDeckTabBar.cxx
index 13e2d49..37ac3f8 100644
--- a/accessibility/source/extended/AccessibleToolPanelDeckTabBar.cxx
+++ b/accessibility/source/extended/AccessibleToolPanelDeckTabBar.cxx
@@ -163,7 +163,7 @@ namespace accessibility
m_pTabBar->GetScrollButton( true ).RemoveEventListener( LINK( this, AccessibleToolPanelTabBar_Impl, OnWindowEvent ) );
m_pTabBar->GetScrollButton( false ).RemoveEventListener( LINK( this, AccessibleToolPanelTabBar_Impl, OnWindowEvent ) );
- m_pTabBar.disposeAndClear();
+ m_pTabBar.clear();
m_xAccessibleParent.clear();
}
diff --git a/accessibility/source/extended/AccessibleToolPanelDeckTabBarItem.cxx b/accessibility/source/extended/AccessibleToolPanelDeckTabBarItem.cxx
index 16d90e8..78dc24b 100644
--- a/accessibility/source/extended/AccessibleToolPanelDeckTabBarItem.cxx
+++ b/accessibility/source/extended/AccessibleToolPanelDeckTabBarItem.cxx
@@ -139,7 +139,7 @@ namespace accessibility
m_xAccessibleParent.clear();
m_pPanelDeck->RemoveListener( *this );
m_pPanelDeck = NULL;
- m_pTabBar.disposeAndClear();
+ m_pTabBar.clear();
}
Reference< XAccessibleComponent > AccessibleToolPanelDeckTabBarItem_Impl::getParentAccessibleComponent() const
diff --git a/avmedia/source/framework/mediacontrol.cxx b/avmedia/source/framework/mediacontrol.cxx
index 57ca787..46882e2 100644
--- a/avmedia/source/framework/mediacontrol.cxx
+++ b/avmedia/source/framework/mediacontrol.cxx
@@ -202,7 +202,7 @@ MediaControl::~MediaControl()
void MediaControl::dispose()
{
maZoomToolBox->SetItemWindow( AVMEDIA_TOOLBOXITEM_ZOOM, NULL );
- mpZoomListBox.disposeAndClear();
+ mpZoomListBox.clear();
maTimeEdit.disposeAndClear();
maZoomToolBox.disposeAndClear();
maVolumeSlider.disposeAndClear();
diff --git a/basctl/source/basicide/basidesh.cxx b/basctl/source/basicide/basidesh.cxx
index d161f50..58938a2 100644
--- a/basctl/source/basicide/basidesh.cxx
+++ b/basctl/source/basicide/basidesh.cxx
@@ -232,6 +232,12 @@ Shell::~Shell()
SetWindow( 0 );
SetCurWindow( 0 );
+ for (WindowTable::iterator it = aWindowTable.begin(); it != aWindowTable.end(); ++it)
+ {
+ // no store; does already happen when the BasicManagers are destroyed
+ it->second.disposeAndClear();
+ }
+
// no store; does already happen when the BasicManagers are destroyed
aWindowTable.clear();
diff --git a/basctl/source/basicide/moduldl2.cxx b/basctl/source/basicide/moduldl2.cxx
index 07a6149..e9e11f2 100644
--- a/basctl/source/basicide/moduldl2.cxx
+++ b/basctl/source/basicide/moduldl2.cxx
@@ -533,7 +533,7 @@ void LibPage::dispose()
delete pEntry;
}
}
- m_pBasicsBox.disposeAndClear();
+ m_pBasicsBox.clear();
m_pLibBox.disposeAndClear();
m_pEditButton.disposeAndClear();
m_pPasswordButton.disposeAndClear();
diff --git a/basctl/source/basicide/moduldlg.cxx b/basctl/source/basicide/moduldlg.cxx
index bc09dec..290b771 100644
--- a/basctl/source/basicide/moduldlg.cxx
+++ b/basctl/source/basicide/moduldlg.cxx
@@ -496,7 +496,7 @@ void OrganizeDialog::dispose()
for ( sal_uInt16 i = 0; i < m_pTabCtrl->GetPageCount(); i++ )
delete m_pTabCtrl->GetTabPage( m_pTabCtrl->GetPageId( i ) );
}
- m_pTabCtrl.disposeAndClear();
+ m_pTabCtrl.clear();
TabDialog::dispose();
};
diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx
index c252385..d1c27c5 100644
--- a/cui/source/customize/cfg.cxx
+++ b/cui/source/customize/cfg.cxx
@@ -5006,7 +5006,7 @@ void SvxIconSelectorDialog::dispose()
}
}
- pTbSymbol.disposeAndClear();
+ pTbSymbol.clear();
pFtNote.disposeAndClear();
pBtnImport.disposeAndClear();
pBtnDelete.disposeAndClear();
diff --git a/cui/source/dialogs/iconcdlg.cxx b/cui/source/dialogs/iconcdlg.cxx
index 0f93d9a..6a13564 100644
--- a/cui/source/dialogs/iconcdlg.cxx
+++ b/cui/source/dialogs/iconcdlg.cxx
@@ -283,7 +283,7 @@ void IconChoiceDialog::dispose()
delete pOutSet;
pOutSet = NULL;
- m_pIconCtrl.disposeAndClear();
+ m_pIconCtrl.clear();
m_pOKBtn.disposeAndClear();
m_pApplyBtn.disposeAndClear();
m_pCancelBtn.disposeAndClear();
diff --git a/cui/source/dialogs/multipat.cxx b/cui/source/dialogs/multipat.cxx
index 16bdc76..54a82ea 100644
--- a/cui/source/dialogs/multipat.cxx
+++ b/cui/source/dialogs/multipat.cxx
@@ -258,7 +258,7 @@ void SvxPathSelectDialog::dispose()
while ( nPos-- )
delete (OUString*)m_pPathLB->GetEntryData(nPos);
}
- m_pPathLB.disposeAndClear();
+ m_pPathLB.clear();
m_pAddBtn.disposeAndClear();
m_pDelBtn.disposeAndClear();
ModalDialog::dispose();
diff --git a/cui/source/factory/dlgfact.cxx b/cui/source/factory/dlgfact.cxx
index 5018c9c..a0bb862 100644
--- a/cui/source/factory/dlgfact.cxx
+++ b/cui/source/factory/dlgfact.cxx
@@ -105,9 +105,11 @@ IMPL_ABSTDLG_BASE(AbstractFmShowColsDialog_Impl);
IMPL_ABSTDLG_BASE(AbstractHyphenWordDialog_Impl)
IMPL_ABSTDLG_BASE(AbstractThesaurusDialog_Impl)
-AbstractSvxZoomDialog_Impl::~AbstractSvxZoomDialog_Impl() \
+AbstractSvxZoomDialog_Impl::~AbstractSvxZoomDialog_Impl()
{
+ pDlg.disposeAndClear();
}
+
short AbstractSvxZoomDialog_Impl::Execute()
{
return pDlg->Execute();
@@ -153,6 +155,7 @@ IMPL_ABSTDLG_BASE(AbstractPasswordToOpenModifyDialog_Impl);
// virtual
VclAbstractDialog2_Impl::~VclAbstractDialog2_Impl()
{
+ m_pDlg.disposeAndClear();
}
// virtual
diff --git a/cui/source/factory/dlgfact.hxx b/cui/source/factory/dlgfact.hxx
index 27e48cc..221a4b7 100644
--- a/cui/source/factory/dlgfact.hxx
+++ b/cui/source/factory/dlgfact.hxx
@@ -72,8 +72,9 @@ public: \
#define IMPL_ABSTDLG_BASE(Class) \
Class::~Class() \
{ \
+ pDlg.disposeAndClear(); \
} \
-short Class::Execute() \
+short Class::Execute() \
{ \
return pDlg->Execute(); \
}
diff --git a/sfx2/source/appl/childwin.cxx b/sfx2/source/appl/childwin.cxx
index 342d978..29245e6 100644
--- a/sfx2/source/appl/childwin.cxx
+++ b/sfx2/source/appl/childwin.cxx
@@ -160,7 +160,6 @@ SfxChildWindow::SfxChildWindow(vcl::Window *pParentWindow, sal_uInt16 nId)
: pParent(pParentWindow)
, nType(nId)
, eChildAlignment(SFX_ALIGN_NOALIGNMENT)
- , pWindow(0L)
{
pImp = new SfxChildWindow_Impl;
pImp->pFact = 0L;
@@ -199,6 +198,7 @@ void SfxChildWindow::Destroy()
SfxChildWindow::~SfxChildWindow()
{
delete pContext;
+ pWindow.disposeAndClear();
delete pImp;
}
@@ -510,13 +510,13 @@ void SfxChildWindow::CreateContext( sal_uInt16 nContextId, SfxBindings& rBinding
}
SfxChildWindowContext::SfxChildWindowContext( sal_uInt16 nId )
- : pWindow( NULL )
- , nContextId( nId )
+ : nContextId( nId )
{
}
SfxChildWindowContext::~SfxChildWindowContext()
{
+ pWindow.disposeAndClear();
}
FloatingWindow* SfxChildWindowContext::GetFloatingWindow() const
More information about the Libreoffice-commits
mailing list