diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2012-07-02 11:30:28 +0200 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2012-07-04 02:17:25 +0200 |
commit | 7d295975c51f198a0e6933f6e4c7d85dfa9e3c8f (patch) | |
tree | 6a7f945af0be9fbc77f3a8532e5be768301def5d /sc/source/ui/condformat/condformatdlg.cxx | |
parent | 871111155e302ecaf245003bcd8357e294f8b268 (diff) |
add the cond format manager
Change-Id: I2c21b048c24333e4d04434ff92b9d9da2efe9558
Diffstat (limited to 'sc/source/ui/condformat/condformatdlg.cxx')
-rw-r--r-- | sc/source/ui/condformat/condformatdlg.cxx | 58 |
1 files changed, 2 insertions, 56 deletions
diff --git a/sc/source/ui/condformat/condformatdlg.cxx b/sc/source/ui/condformat/condformatdlg.cxx index 6c4865be1e7d..9e8ca45419cf 100644 --- a/sc/source/ui/condformat/condformatdlg.cxx +++ b/sc/source/ui/condformat/condformatdlg.cxx @@ -387,57 +387,6 @@ void ScCondFrmtEntry::Init() mpDataBarData->maPositiveColor = COL_LIGHTBLUE; } -namespace { - -rtl::OUString getTextForType(ScCondFormatEntryType eType) -{ - switch(eType) - { - case CONDITION: - return rtl::OUString("Cell value"); - case COLORSCALE: - return rtl::OUString("Color scale"); - case DATABAR: - return rtl::OUString("Data Bar"); - case FORMULA: - return rtl::OUString("Formula is"); - default: - break; - } - - return rtl::OUString(""); -} - -rtl::OUString getExpression(sal_Int32 nIndex) -{ - switch(nIndex) - { - case 0: - return rtl::OUString("="); - case 1: - return rtl::OUString("<"); - case 2: - return rtl::OUString(">"); - case 3: - return rtl::OUString("<="); - case 4: - return rtl::OUString(">="); - case 5: - return rtl::OUString("!="); - case 6: - return rtl::OUString("between"); - case 7: - return rtl::OUString("not between"); - case 8: - return rtl::OUString("duplicate"); - case 9: - return rtl::OUString("unique"); - } - return rtl::OUString(); -} - -} - long ScCondFrmtEntry::Notify( NotifyEvent& rNEvt ) { if( rNEvt.GetType() == EVENT_MOUSEBUTTONDOWN ) @@ -454,11 +403,8 @@ void ScCondFrmtEntry::SwitchToType( ScCondFormatEntryType eType ) case COLLAPSED: { maLbType.Hide(); - rtl::OUStringBuffer maCondText(getTextForType(meType)); - maCondText.append(rtl::OUString(" ")); - if(meType == CONDITION) - maCondText.append(getExpression(maLbCondType.GetSelectEntryPos())); - maFtCondition.SetText(maCondText.makeStringAndClear()); + rtl::OUString maCondText = ScCondFormatHelper::GetExpression(meType, maLbCondType.GetSelectEntryPos()); + maFtCondition.SetText(maCondText); maFtCondition.Show(); maLbType.Hide(); HideCondElements(); |