summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2012-10-10 03:35:33 +0200
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2012-10-10 04:47:09 +0200
commitad7d278372a05fc2c64f80d80c3638c367a78cde (patch)
tree1b5436797a20157a2ddd06507edf8aeb09305452 /sc
parent0b5a7d25c7314d69cfa54da16111bde6805e3335 (diff)
little clean-up for the color format case
Change-Id: I8e42a2494e9f7761ca55beb465c3f20d2b057060
Diffstat (limited to 'sc')
-rw-r--r--sc/source/ui/condformat/condformatdlg.cxx33
1 files changed, 14 insertions, 19 deletions
diff --git a/sc/source/ui/condformat/condformatdlg.cxx b/sc/source/ui/condformat/condformatdlg.cxx
index b6b6ea4c1cc9..041faec0b1b9 100644
--- a/sc/source/ui/condformat/condformatdlg.cxx
+++ b/sc/source/ui/condformat/condformatdlg.cxx
@@ -53,9 +53,6 @@
#include "globstr.hrc"
-#include <cassert>
-#include <iostream>
-
ScCondFormatList::ScCondFormatList(Window* pParent, const ResId& rResId, ScDocument* pDoc, const ScConditionalFormat* pFormat,
const ScRangeList& rRanges, const ScAddress& rPos, condformat::dialog::ScCondFormatDialogType eType):
Control(pParent, rResId),
@@ -191,35 +188,33 @@ IMPL_LINK(ScCondFormatList, ColFormatTypeHdl, ListBox*, pBox)
break;
}
if(itr == maEntries.end())
- return 0;;
+ return 0;
sal_Int32 nPos = pBox->GetSelectEntryPos();
switch(nPos)
{
case 0:
- if(itr->GetType() != condformat::entry::COLORSCALE2)
- {
- maEntries.replace( itr, new ScColorScale2FrmtEntry( this, mpDoc, maPos ) );
- static_cast<ScCondFormatDlg*>(GetParent())->InvalidateRefData();
- }
+ if(itr->GetType() == condformat::entry::COLORSCALE2)
+ return 0;
+
+ maEntries.replace( itr, new ScColorScale2FrmtEntry( this, mpDoc, maPos ) );
break;
case 1:
- if(itr->GetType() != condformat::entry::COLORSCALE3)
- {
- maEntries.replace( itr, new ScColorScale3FrmtEntry( this, mpDoc, maPos ) );
- static_cast<ScCondFormatDlg*>(GetParent())->InvalidateRefData();
- }
+ if(itr->GetType() == condformat::entry::COLORSCALE3)
+ return 0;
+
+ maEntries.replace( itr, new ScColorScale3FrmtEntry( this, mpDoc, maPos ) );
break;
case 2:
- if(itr->GetType() != condformat::entry::DATABAR)
- {
- maEntries.replace( itr, new ScDataBarFrmtEntry( this, mpDoc, maPos ) );
- static_cast<ScCondFormatDlg*>(GetParent())->InvalidateRefData();
- }
+ if(itr->GetType() == condformat::entry::DATABAR)
+ return 0;
+
+ maEntries.replace( itr, new ScDataBarFrmtEntry( this, mpDoc, maPos ) );
break;
default:
break;
}
+ static_cast<ScCondFormatDlg*>(GetParent())->InvalidateRefData();
itr->SetActive();
RecalcAll();
return 0;