summaryrefslogtreecommitdiff
path: root/reportdesign
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2016-12-09 00:28:46 +0100
committerJulien Nabet <serval2412@yahoo.fr>2016-12-09 06:11:10 +0000
commit987984ea21f1688eddfc124292f5e4b931d7d138 (patch)
tree6f90642bc63837063857a170d95e50710ff031ff /reportdesign
parent9f20f7adec3ca69d702cb02593fca231c25770af (diff)
tdf#104105: fix Vcl lifecycle in CondFormat (reportdesign)
Avoid this error: Window ( 7VclVBox()) with live children destroyed: N5rptui9ConditionE() * n by calling disposeAndClear on each element of m_aConditions m_aConditions is Conditions type Conditions type is ::std::vector< VclPtr<Condition> > See http://opengrok.libreoffice.org/xref/core/reportdesign/source/ui/inc/CondFormat.hxx#70 Change-Id: Ie99f8cdb5acd787892237787525d79f3231689db Reviewed-on: https://gerrit.libreoffice.org/31775 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr> (cherry picked from commit 73131fc3806ce2a7da61c93590e467e5b044c341) Reviewed-on: https://gerrit.libreoffice.org/31779 Tested-by: Julien Nabet <serval2412@yahoo.fr>
Diffstat (limited to 'reportdesign')
-rw-r--r--reportdesign/source/ui/dlg/CondFormat.cxx7
1 files changed, 6 insertions, 1 deletions
diff --git a/reportdesign/source/ui/dlg/CondFormat.cxx b/reportdesign/source/ui/dlg/CondFormat.cxx
index da28331e5ab0..5f398ffceaf1 100644
--- a/reportdesign/source/ui/dlg/CondFormat.cxx
+++ b/reportdesign/source/ui/dlg/CondFormat.cxx
@@ -134,6 +134,12 @@ namespace rptui
void ConditionalFormattingDialog::dispose()
{
+
+ for (auto i = m_aConditions.begin(); i != m_aConditions.end(); ++i)
+ {
+ i->disposeAndClear();
+ }
+
m_aConditions.clear();
m_pConditionPlayground.clear();
m_pScrollWindow.clear();
@@ -190,7 +196,6 @@ namespace rptui
Reference< XFormatCondition > xCond = m_xCopy->createFormatCondition();
::comphelper::copyProperties(m_xCopy.get(),xCond.get());
m_xCopy->insertByIndex( _nNewCondIndex, makeAny( xCond ) );
-
VclPtrInstance<Condition> pCon( m_pConditionPlayground, *this, m_rController );
pCon->setCondition( xCond );
pCon->reorderWithinParent(_nNewCondIndex);