Kaydet (Commit) 2dfd8f15 authored tarafından Markus Mohrhard's avatar Markus Mohrhard

correct enumerate the condition entries in the dialog

Change-Id: I43c83674464f7c41505735b2ec4208f21567ed4c
üst adc2aebb
...@@ -143,7 +143,9 @@ ScCondFrmtEntry::ScCondFrmtEntry(Window* pParent, ScDocument* pDoc): ...@@ -143,7 +143,9 @@ ScCondFrmtEntry::ScCondFrmtEntry(Window* pParent, ScDocument* pDoc):
maEdDataBarMin( this, ScResId( ED_COL_SCALE ) ), maEdDataBarMin( this, ScResId( ED_COL_SCALE ) ),
maEdDataBarMax( this, ScResId( ED_COL_SCALE ) ), maEdDataBarMax( this, ScResId( ED_COL_SCALE ) ),
maBtOptions( this, ScResId( BTN_OPTIONS ) ), maBtOptions( this, ScResId( BTN_OPTIONS ) ),
mpDoc(pDoc) mpDoc(pDoc),
mnIndex(0),
maStrCondition(ScResId( STR_CONDITION ).toString())
{ {
SetControlBackground(GetSettings().GetStyleSettings().GetDialogColor()); SetControlBackground(GetSettings().GetStyleSettings().GetDialogColor());
FreeResource(); FreeResource();
...@@ -422,6 +424,14 @@ void ScCondFrmtEntry::SwitchToType( ScCondFormatEntryType eType ) ...@@ -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() void ScCondFrmtEntry::HideCondElements()
{ {
maEdVal1.Hide(); maEdVal1.Hide();
...@@ -937,9 +947,12 @@ ScConditionalFormat* ScCondFormatList::GetConditionalFormat() const ...@@ -937,9 +947,12 @@ ScConditionalFormat* ScCondFormatList::GetConditionalFormat() const
void ScCondFormatList::RecalcAll() void ScCondFormatList::RecalcAll()
{ {
sal_Int32 nTotalHeight = 0; sal_Int32 nTotalHeight = 0;
sal_Int32 nIndex = 1;
for(EntryContainer::iterator itr = maEntries.begin(); itr != maEntries.end(); ++itr) for(EntryContainer::iterator itr = maEntries.begin(); itr != maEntries.end(); ++itr)
{ {
nTotalHeight += itr->GetSizePixel().Height(); nTotalHeight += itr->GetSizePixel().Height();
itr->SetIndex( nIndex );
++nIndex;
} }
Size aCtrlSize = GetOutputSize(); Size aCtrlSize = GetOutputSize();
......
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
#include <rtl/ustrbuf.hxx> #include <rtl/ustrbuf.hxx>
#include "condformathelper.hxx" #include "condformathelper.hxx"
#include "globstr.hrc"
namespace { namespace {
...@@ -48,13 +49,13 @@ rtl::OUString getExpression(sal_Int32 nIndex) ...@@ -48,13 +49,13 @@ rtl::OUString getExpression(sal_Int32 nIndex)
case 5: case 5:
return rtl::OUString("!="); return rtl::OUString("!=");
case 6: case 6:
return ScGlobaLL:GetRscString(STR_COND_BETWEEN); return ScGlobal::GetRscString(STR_COND_BETWEEN);
case 7: case 7:
return ScGlobaLL:GetRscString(STR_COND_NOTBETWEEN); return ScGlobal::GetRscString(STR_COND_NOTBETWEEN);
case 8: case 8:
return ScGlobaLL:GetRscString(STR_COND_DUPLICATE); return ScGlobal::GetRscString(STR_COND_DUPLICATE);
case 9: case 9:
return ScGlobaLL:GetRscString(STR_COND_UNIQUE); return ScGlobal::GetRscString(STR_COND_UNIQUE);
} }
return rtl::OUString(); return rtl::OUString();
} }
......
...@@ -53,5 +53,6 @@ ...@@ -53,5 +53,6 @@
#define WD_PREVIEW 26 #define WD_PREVIEW 26
#define LB_COL 27 #define LB_COL 27
#define BTN_OPTIONS 30 #define BTN_OPTIONS 30
#define STR_CONDITION 31
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
...@@ -115,6 +115,8 @@ private: ...@@ -115,6 +115,8 @@ private:
ScDocument* mpDoc; ScDocument* mpDoc;
ScAddress maPos; ScAddress maPos;
sal_Int32 mnIndex;
rtl::OUString maStrCondition;
DECL_LINK( TypeListHdl, void*); DECL_LINK( TypeListHdl, void*);
DECL_LINK( ColFormatTypeHdl, void*); DECL_LINK( ColFormatTypeHdl, void*);
...@@ -134,6 +136,7 @@ public: ...@@ -134,6 +136,7 @@ public:
void Deselect(); void Deselect();
bool IsSelected() const; bool IsSelected() const;
void SetIndex(sal_Int32 nIndex);
ScFormatEntry* GetEntry() const; ScFormatEntry* GetEntry() const;
}; };
......
...@@ -80,7 +80,10 @@ Control RID_COND_ENTRY ...@@ -80,7 +80,10 @@ Control RID_COND_ENTRY
{ {
Pos = MAP_APPFONT( 2, 2 ); Pos = MAP_APPFONT( 2, 2 );
Size = MAP_APPFONT( 30, 10 ); Size = MAP_APPFONT( 30, 10 );
Text [ en-US ] = "Condition"; };
String STR_CONDITION
{
Text [ en-US ] = "Condition ";
}; };
FixedText FT_CONDITION FixedText FT_CONDITION
......
...@@ -1865,7 +1865,7 @@ Resource RID_GLOBSTR ...@@ -1865,7 +1865,7 @@ Resource RID_GLOBSTR
}; };
String STR_COND_CONDITION String STR_COND_CONDITION
{ {
Text [ en-US ] = "Condition"; Text [ en-US ] = "Cell value is";
}; };
String STR_COND_COLORSCALE String STR_COND_COLORSCALE
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment