diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2012-07-02 18:48:30 +0200 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2012-07-04 02:17:26 +0200 |
commit | 2dfd8f150583130201132eaa9816e7646bbb6bf4 (patch) | |
tree | 2142ec3dbfc161aefb79202b1758060c08516d0d /sc | |
parent | adc2aebb2828e3570f72f214f31341049eaf6709 (diff) |
correct enumerate the condition entries in the dialog
Change-Id: I43c83674464f7c41505735b2ec4208f21567ed4c
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/ui/condformat/condformatdlg.cxx | 15 | ||||
-rw-r--r-- | sc/source/ui/condformat/condformathelper.cxx | 9 | ||||
-rw-r--r-- | sc/source/ui/inc/condformatdlg.hrc | 1 | ||||
-rw-r--r-- | sc/source/ui/inc/condformatdlg.hxx | 3 | ||||
-rw-r--r-- | sc/source/ui/src/condformatdlg.src | 5 | ||||
-rw-r--r-- | sc/source/ui/src/globstr.src | 2 |
6 files changed, 28 insertions, 7 deletions
diff --git a/sc/source/ui/condformat/condformatdlg.cxx b/sc/source/ui/condformat/condformatdlg.cxx index 9e8ca45419cf..a6de790e69fe 100644 --- a/sc/source/ui/condformat/condformatdlg.cxx +++ b/sc/source/ui/condformat/condformatdlg.cxx @@ -143,7 +143,9 @@ ScCondFrmtEntry::ScCondFrmtEntry(Window* pParent, ScDocument* pDoc): maEdDataBarMin( this, ScResId( ED_COL_SCALE ) ), maEdDataBarMax( this, ScResId( ED_COL_SCALE ) ), maBtOptions( this, ScResId( BTN_OPTIONS ) ), - mpDoc(pDoc) + mpDoc(pDoc), + mnIndex(0), + maStrCondition(ScResId( STR_CONDITION ).toString()) { SetControlBackground(GetSettings().GetStyleSettings().GetDialogColor()); FreeResource(); @@ -422,6 +424,14 @@ void ScCondFrmtEntry::SwitchToType( ScCondFormatEntryType eType ) } } +void ScCondFrmtEntry::SetIndex(sal_Int32 nIndex) +{ + mnIndex = nIndex; + rtl::OUStringBuffer aBuffer(maStrCondition); + aBuffer.append(rtl::OUString::valueOf(nIndex)); + maFtCondNr.SetText(aBuffer.makeStringAndClear()); +} + void ScCondFrmtEntry::HideCondElements() { maEdVal1.Hide(); @@ -937,9 +947,12 @@ ScConditionalFormat* ScCondFormatList::GetConditionalFormat() const void ScCondFormatList::RecalcAll() { sal_Int32 nTotalHeight = 0; + sal_Int32 nIndex = 1; for(EntryContainer::iterator itr = maEntries.begin(); itr != maEntries.end(); ++itr) { nTotalHeight += itr->GetSizePixel().Height(); + itr->SetIndex( nIndex ); + ++nIndex; } Size aCtrlSize = GetOutputSize(); diff --git a/sc/source/ui/condformat/condformathelper.cxx b/sc/source/ui/condformat/condformathelper.cxx index 341f390dc90f..dda40a8a1049 100644 --- a/sc/source/ui/condformat/condformathelper.cxx +++ b/sc/source/ui/condformat/condformathelper.cxx @@ -9,6 +9,7 @@ #include <rtl/ustrbuf.hxx> #include "condformathelper.hxx" +#include "globstr.hrc" namespace { @@ -48,13 +49,13 @@ rtl::OUString getExpression(sal_Int32 nIndex) case 5: return rtl::OUString("!="); case 6: - return ScGlobaLL:GetRscString(STR_COND_BETWEEN); + return ScGlobal::GetRscString(STR_COND_BETWEEN); case 7: - return ScGlobaLL:GetRscString(STR_COND_NOTBETWEEN); + return ScGlobal::GetRscString(STR_COND_NOTBETWEEN); case 8: - return ScGlobaLL:GetRscString(STR_COND_DUPLICATE); + return ScGlobal::GetRscString(STR_COND_DUPLICATE); case 9: - return ScGlobaLL:GetRscString(STR_COND_UNIQUE); + return ScGlobal::GetRscString(STR_COND_UNIQUE); } return rtl::OUString(); } diff --git a/sc/source/ui/inc/condformatdlg.hrc b/sc/source/ui/inc/condformatdlg.hrc index 045b21525753..d92e7a7e774b 100644 --- a/sc/source/ui/inc/condformatdlg.hrc +++ b/sc/source/ui/inc/condformatdlg.hrc @@ -53,5 +53,6 @@ #define WD_PREVIEW 26 #define LB_COL 27 #define BTN_OPTIONS 30 +#define STR_CONDITION 31 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sc/source/ui/inc/condformatdlg.hxx b/sc/source/ui/inc/condformatdlg.hxx index 8015b263805e..2c53ab0ad068 100644 --- a/sc/source/ui/inc/condformatdlg.hxx +++ b/sc/source/ui/inc/condformatdlg.hxx @@ -115,6 +115,8 @@ private: ScDocument* mpDoc; ScAddress maPos; + sal_Int32 mnIndex; + rtl::OUString maStrCondition; DECL_LINK( TypeListHdl, void*); DECL_LINK( ColFormatTypeHdl, void*); @@ -134,6 +136,7 @@ public: void Deselect(); bool IsSelected() const; + void SetIndex(sal_Int32 nIndex); ScFormatEntry* GetEntry() const; }; diff --git a/sc/source/ui/src/condformatdlg.src b/sc/source/ui/src/condformatdlg.src index 26b8d13c286f..e2b529c7fcbc 100644 --- a/sc/source/ui/src/condformatdlg.src +++ b/sc/source/ui/src/condformatdlg.src @@ -80,7 +80,10 @@ Control RID_COND_ENTRY { Pos = MAP_APPFONT( 2, 2 ); Size = MAP_APPFONT( 30, 10 ); - Text [ en-US ] = "Condition"; + }; + String STR_CONDITION + { + Text [ en-US ] = "Condition "; }; FixedText FT_CONDITION diff --git a/sc/source/ui/src/globstr.src b/sc/source/ui/src/globstr.src index 5eec9073943a..9938cd6e2273 100644 --- a/sc/source/ui/src/globstr.src +++ b/sc/source/ui/src/globstr.src @@ -1865,7 +1865,7 @@ Resource RID_GLOBSTR }; String STR_COND_CONDITION { - Text [ en-US ] = "Condition"; + Text [ en-US ] = "Cell value is"; }; String STR_COND_COLORSCALE { |