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

localize all parts of the new cond format dialogs

Change-Id: Ia582433bd126b9e60b7aecdc19bce57b2a6e85a6
üst 7d295975
...@@ -591,7 +591,16 @@ ...@@ -591,7 +591,16 @@
#define STR_PIVOT_GROUP 467 #define STR_PIVOT_GROUP 467
#define STR_HEADER_COND 468 #define STR_HEADER_COND 468
#define STR_COUNT 469 #define STR_COND_CONDITION 469
#define STR_COND_COLORSCALE 470
#define STR_COND_DATABAR 471
#define STR_COND_FORMULA 472
#define STR_COND_BETWEEN 473
#define STR_COND_NOTBETWEEN 474
#define STR_COND_UNIQUE 475
#define STR_COND_DUPLICATE 476
#define STR_COUNT 477
#endif #endif
...@@ -17,13 +17,13 @@ rtl::OUString getTextForType(ScCondFormatEntryType eType) ...@@ -17,13 +17,13 @@ rtl::OUString getTextForType(ScCondFormatEntryType eType)
switch(eType) switch(eType)
{ {
case CONDITION: case CONDITION:
return rtl::OUString("Cell value"); return ScGlobal::GetRscString(STR_COND_CONDITION);
case COLORSCALE: case COLORSCALE:
return rtl::OUString("Color scale"); return ScGlobal::GetRscString(STR_COND_COLORSCALE);
case DATABAR: case DATABAR:
return rtl::OUString("Data Bar"); return ScGlobal::GetRscString(STR_COND_DATABAR);
case FORMULA: case FORMULA:
return rtl::OUString("Formula is"); return ScGlobal::GetRscString(STR_COND_FORMULA);
default: default:
break; break;
} }
...@@ -48,13 +48,13 @@ rtl::OUString getExpression(sal_Int32 nIndex) ...@@ -48,13 +48,13 @@ rtl::OUString getExpression(sal_Int32 nIndex)
case 5: case 5:
return rtl::OUString("!="); return rtl::OUString("!=");
case 6: case 6:
return rtl::OUString("between"); return ScGlobaLL:GetRscString(STR_COND_BETWEEN);
case 7: case 7:
return rtl::OUString("not between"); return ScGlobaLL:GetRscString(STR_COND_NOTBETWEEN);
case 8: case 8:
return rtl::OUString("duplicate"); return ScGlobaLL:GetRscString(STR_COND_DUPLICATE);
case 9: case 9:
return rtl::OUString("unique"); return ScGlobaLL:GetRscString(STR_COND_UNIQUE);
} }
return rtl::OUString(); return rtl::OUString();
} }
......
...@@ -62,7 +62,8 @@ ScCondFormatManagerWindow::ScCondFormatManagerWindow(Window* pParent, ScDocument ...@@ -62,7 +62,8 @@ ScCondFormatManagerWindow::ScCondFormatManagerWindow(Window* pParent, ScDocument
SetPosSizePixel( Point( 0, aHeadSize.Height() ), Size( aBoxSize.Width(), aBoxSize.Height() - aHeadSize.Height() ) ); SetPosSizePixel( Point( 0, aHeadSize.Height() ), Size( aBoxSize.Width(), aBoxSize.Height() - aHeadSize.Height() ) );
SetTabs( &nTabs[0], MAP_PIXEL ); SetTabs( &nTabs[0], MAP_PIXEL );
//maHeaderBar.SetEndDragHdl( LINK( this, ScRangeManagerTable, HeaderEndDragHdl ) ); maHeaderBar.SetEndDragHdl( LINK(this, ScCondFormatManagerWindow, HeaderEndDragHdl ) );
HeaderEndDragHdl(NULL);
Init(); Init();
Show(); Show();
...@@ -122,6 +123,25 @@ void ScCondFormatManagerWindow::Update() ...@@ -122,6 +123,25 @@ void ScCondFormatManagerWindow::Update()
Init(); Init();
} }
IMPL_LINK_NOARG(ScCondFormatManagerWindow, HeaderEndDragHdl)
{
long aTableSize = maHeaderBar.GetSizePixel().Width();
long aItemRangeSize = maHeaderBar.GetItemSize(ITEMID_RANGE);
//calculate column size based on user input and minimum size
long aItemCondSize = aTableSize - aItemRangeSize;
Size aSz;
aSz.Width() = aItemRangeSize;
SetTab( ITEMID_RANGE, PixelToLogic( aSz, MapMode(MAP_APPFONT) ).Width(), MAP_APPFONT );
maHeaderBar.SetItemSize(ITEMID_RANGE, aItemRangeSize);
aSz.Width() += aItemCondSize;
SetTab( ITEMID_CONDITION, PixelToLogic( aSz, MapMode(MAP_APPFONT) ).Width(), MAP_APPFONT );
maHeaderBar.SetItemSize(ITEMID_CONDITION, aItemCondSize);
return 0;
}
ScCondFormatManagerCtrl::ScCondFormatManagerCtrl(Window* pParent, ScDocument* pDoc, ScConditionalFormatList* pFormatList, const ScAddress& rPos): ScCondFormatManagerCtrl::ScCondFormatManagerCtrl(Window* pParent, ScDocument* pDoc, ScConditionalFormatList* pFormatList, const ScAddress& rPos):
Control(pParent, ScResId(CTRL_TABLE)), Control(pParent, ScResId(CTRL_TABLE)),
maWdManager(this, pDoc, pFormatList, rPos) maWdManager(this, pDoc, pFormatList, rPos)
...@@ -199,6 +219,7 @@ IMPL_LINK_NOARG(ScCondFormatManagerDlg, EditBtnHdl) ...@@ -199,6 +219,7 @@ IMPL_LINK_NOARG(ScCondFormatManagerDlg, EditBtnHdl)
mpFormatList->InsertNew(pNewFormat); mpFormatList->InsertNew(pNewFormat);
maCtrlManager.Update(); maCtrlManager.Update();
} }
delete pDlg;
return 0; return 0;
} }
......
...@@ -54,6 +54,8 @@ private: ...@@ -54,6 +54,8 @@ private:
const ScAddress& mrPos; const ScAddress& mrPos;
std::map<SvLBoxEntry*, sal_Int32> maMapLBoxEntryToCondIndex; std::map<SvLBoxEntry*, sal_Int32> maMapLBoxEntryToCondIndex;
DECL_LINK( HeaderEndDragHdl, void* );
public: public:
ScCondFormatManagerWindow( Window* pParent, ScDocument* pDoc, ScConditionalFormatList* pFormatList, const ScAddress& rPos ); ScCondFormatManagerWindow( Window* pParent, ScDocument* pDoc, ScConditionalFormatList* pFormatList, const ScAddress& rPos );
......
...@@ -1861,7 +1861,35 @@ Resource RID_GLOBSTR ...@@ -1861,7 +1861,35 @@ Resource RID_GLOBSTR
}; };
String STR_HEADER_COND String STR_HEADER_COND
{ {
Text [ en_US ] = "First Condition"; Text [ en-US ] = "First Condition";
};
String STR_COND_CONDITION
{
Text [ en-US ] = "Condition";
};
String STR_COND_COLORSCALE
{
Text [ en-US ] = "ColorScale";
};
String STR_COND_DATABAR
{
Text [ en-US ] = "DataBar";
};
String STR_COND_BETWEEN
{
Text [ en-US ] = "between";
};
String STR_COND_NOTBETWEEN
{
Text [ en-US ] = "not between";
};
String STR_COND_UNIQUE
{
Text [ en-US ] = "unique";
};
String STR_COND_DUPLICATE
{
Text [ en-US ] = "duplicate";
}; };
}; };
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