diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2012-10-10 03:33:01 +0200 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2012-10-10 04:47:08 +0200 |
commit | 0b5a7d25c7314d69cfa54da16111bde6805e3335 (patch) | |
tree | 9f6209366ead31f233f37956f33122d6f7a754ff /sc | |
parent | 549726ae15ec7bfa8381fe2ad0e8e4e13eec29af (diff) |
prevent overwriting the entry if the same has been selected
Change-Id: If15ad07c3813dfe8d8c9460060771b0c5bae5b5e
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/ui/condformat/condformatdlg.cxx | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/sc/source/ui/condformat/condformatdlg.cxx b/sc/source/ui/condformat/condformatdlg.cxx index 21093fec53a4..b6b6ea4c1cc9 100644 --- a/sc/source/ui/condformat/condformatdlg.cxx +++ b/sc/source/ui/condformat/condformatdlg.cxx @@ -240,16 +240,32 @@ IMPL_LINK(ScCondFormatList, TypeListHdl, ListBox*, pBox) switch(nPos) { case 0: + switch(itr->GetType()) + { + case condformat::entry::FORMULA: + case condformat::entry::CONDITION: + break; + case condformat::entry::COLORSCALE2: + case condformat::entry::COLORSCALE3: + case condformat::entry::DATABAR: + return 0; + } maEntries.replace( itr, new ScColorScale3FrmtEntry(this, mpDoc, maPos)); static_cast<ScCondFormatDlg*>(GetParent())->InvalidateRefData(); itr->SetActive(); break; case 1: + if(itr->GetType() == condformat::entry::CONDITION) + return 0; + maEntries.replace( itr, new ScConditionFrmtEntry(this, mpDoc, maPos)); static_cast<ScCondFormatDlg*>(GetParent())->InvalidateRefData(); itr->SetActive(); break; case 2: + if(itr->GetType() == condformat::entry::FORMULA) + return 0; + maEntries.replace( itr, new ScFormulaFrmtEntry(this, mpDoc, maPos)); static_cast<ScCondFormatDlg*>(GetParent())->InvalidateRefData(); itr->SetActive(); |