summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@collabora.com>2015-05-03 21:41:41 +0200
committerMichael Meeks <michael.meeks@collabora.com>2015-05-03 22:35:14 +0200
commitf66572b2ff5f27ab938edbe3a2329395aae43c2d (patch)
tree4fd357633c91468fa1ce8c3d69abb578636d0982 /sc
parent873b6d9d47591ffb7f3de88a3ef67cfe462f4b1c (diff)
tdf#90982 - repair parts of the conditional formatting dialog.
Change-Id: I5203e8205969004c6c2dd8f1dc438c9e7583a991
Diffstat (limited to 'sc')
-rw-r--r--sc/source/ui/condformat/condformatdlg.cxx9
-rw-r--r--sc/source/ui/view/cellsh1.cxx2
2 files changed, 10 insertions, 1 deletions
diff --git a/sc/source/ui/condformat/condformatdlg.cxx b/sc/source/ui/condformat/condformatdlg.cxx
index 59d343195294..d4ea0caee1ad 100644
--- a/sc/source/ui/condformat/condformatdlg.cxx
+++ b/sc/source/ui/condformat/condformatdlg.cxx
@@ -56,6 +56,9 @@ void ScCondFormatList::dispose()
{
mpDialogParent.clear();
mpScrollBar.disposeAndClear();
+ for (auto it = maEntries.begin(); it != maEntries.end(); ++it)
+ it->disposeAndClear();
+ maEntries.clear();
Control::dispose();
}
@@ -250,24 +253,28 @@ IMPL_LINK(ScCondFormatList, ColFormatTypeHdl, ListBox*, pBox)
if((*itr)->GetType() == condformat::entry::COLORSCALE2)
return 0;
+ itr->disposeAndClear();
*itr = VclPtr<ScColorScale2FrmtEntry>::Create( this, mpDoc, maPos );
break;
case 1:
if((*itr)->GetType() == condformat::entry::COLORSCALE3)
return 0;
+ itr->disposeAndClear();
*itr = VclPtr<ScColorScale3FrmtEntry>::Create( this, mpDoc, maPos );
break;
case 2:
if((*itr)->GetType() == condformat::entry::DATABAR)
return 0;
+ itr->disposeAndClear();
*itr = VclPtr<ScDataBarFrmtEntry>::Create( this, mpDoc, maPos );
break;
case 3:
if((*itr)->GetType() == condformat::entry::ICONSET)
return 0;
+ itr->disposeAndClear();
*itr = VclPtr<ScIconSetFrmtEntry>::Create( this, mpDoc, maPos );
break;
default:
@@ -370,6 +377,7 @@ IMPL_LINK_NOARG( ScCondFormatList, RemoveBtnHdl )
{
if((*itr)->IsSelected())
{
+ itr->disposeAndClear();
maEntries.erase(itr);
break;
}
@@ -461,6 +469,7 @@ void ScCondFormatDlg::dispose()
mpRbRange.clear();
mpCondFormList.clear();
mpLastEdit.clear();
+
ScAnyRefModalDlg::dispose();
}
diff --git a/sc/source/ui/view/cellsh1.cxx b/sc/source/ui/view/cellsh1.cxx
index 1145e2bd5633..09ef8c72638c 100644
--- a/sc/source/ui/view/cellsh1.cxx
+++ b/sc/source/ui/view/cellsh1.cxx
@@ -1931,7 +1931,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
const ScPatternAttr* pPattern = pDoc->GetPattern(aPos.Col(), aPos.Row(), aPos.Tab());
const std::vector<sal_uInt32>& rCondFormats = static_cast<const ScCondFormatItem&>(pPattern->GetItem(ATTR_CONDITIONAL)).GetCondFormatData();
bool bContainsCondFormat = !rCondFormats.empty();
- VclPtr<ScCondFormatDlg> pCondFormatDlg;
+ ScopedVclPtr<ScCondFormatDlg> pCondFormatDlg;
if(bContainsCondFormat)
{
bool bContainsExistingCondFormat = false;