Share common localized strings: Calc A1, Excel A1, and Excel R1C1.

Change-Id: Ia3fbdd8770ca2e2a0125bd39550ab44c1776e6d8
This commit is contained in:
Kohei Yoshida
2012-05-30 11:00:58 -04:00
parent 33d57704c6
commit 78ed21e078
6 changed files with 36 additions and 13 deletions

View File

@@ -1021,8 +1021,11 @@
#define SCSTR_QHELP_COLLAPSE_FORMULA (STR_START + 407)
#define SCSTR_EXTDOC_NOT_LOADED (STR_START + 408)
#define SCSTR_FORMULA_SYNTAX_CALC_A1 (STR_START + 409)
#define SCSTR_FORMULA_SYNTAX_XL_A1 (STR_START + 410)
#define SCSTR_FORMULA_SYNTAX_XL_R1C1 (STR_START + 411)
#define STR_END (SCSTR_EXTDOC_NOT_LOADED)
#define STR_END (SCSTR_FORMULA_SYNTAX_XL_R1C1)
#define BMP_START (STR_END)

View File

@@ -91,6 +91,9 @@ ScCalcOptionsDialog::ScCalcOptionsDialog(Window* pParent, const ScCalcConfig& rC
maFtAnnotation(this, ScResId(FT_ANNOTATION)),
maBtnOK(this, ScResId(BTN_OK)),
maBtnCancel(this, ScResId(BTN_CANCEL)),
maCalcA1(ScResId(SCSTR_FORMULA_SYNTAX_CALC_A1).toString()),
maExcelA1(ScResId(SCSTR_FORMULA_SYNTAX_XL_A1).toString()),
maExcelR1C1(ScResId(SCSTR_FORMULA_SYNTAX_XL_R1C1).toString()),
maCaptionIndirectSyntax(ScResId(STR_INDIRECT_SYNTAX_CAPTION).toString()),
maDescIndirectSyntax(ScResId(STR_INDIRECT_SYNTAX_DESC).toString()),
maUseFormulaSyntax(ScResId(STR_USE_FORMULA_SYNTAX).toString()),
@@ -143,9 +146,9 @@ void ScCalcOptionsDialog::SelectionChanged()
// Formula syntax for INDIRECT function.
maLbOptionEdit.Clear();
maLbOptionEdit.InsertEntry(maUseFormulaSyntax);
maLbOptionEdit.InsertEntry(rtl::OUString("Calc A1"));
maLbOptionEdit.InsertEntry(rtl::OUString("Excel A1"));
maLbOptionEdit.InsertEntry(rtl::OUString("Excel R1C1"));
maLbOptionEdit.InsertEntry(maCalcA1);
maLbOptionEdit.InsertEntry(maExcelA1);
maLbOptionEdit.InsertEntry(maExcelR1C1);
switch (maConfig.meIndirectRefSyntax)
{
case formula::FormulaGrammar::CONV_OOO:
@@ -193,11 +196,11 @@ rtl::OUString ScCalcOptionsDialog::toString(formula::FormulaGrammar::AddressConv
switch (eConv)
{
case formula::FormulaGrammar::CONV_OOO:
return rtl::OUString("Calc A1");
return maCalcA1;
case formula::FormulaGrammar::CONV_XL_A1:
return rtl::OUString ("Excel A1");
return maExcelA1;
case formula::FormulaGrammar::CONV_XL_R1C1:
return rtl::OUString("Excel R1C1");
return maExcelR1C1;
case formula::FormulaGrammar::CONV_UNSPECIFIED:
default:
;

View File

@@ -65,6 +65,10 @@ private:
OKButton maBtnOK;
CancelButton maBtnCancel;
rtl::OUString maCalcA1;
rtl::OUString maExcelA1;
rtl::OUString maExcelR1C1;
rtl::OUString maCaptionIndirectSyntax;
rtl::OUString maDescIndirectSyntax;
rtl::OUString maUseFormulaSyntax;

View File

@@ -75,6 +75,10 @@ ScTpFormulaOptions::ScTpFormulaOptions(Window* pParent, const SfxItemSet& rCoreA
mnDecSep(0)
{
maLbFormulaSyntax.InsertEntry(ScResId(SCSTR_FORMULA_SYNTAX_CALC_A1).toString());
maLbFormulaSyntax.InsertEntry(ScResId(SCSTR_FORMULA_SYNTAX_XL_A1).toString());
maLbFormulaSyntax.InsertEntry(ScResId(SCSTR_FORMULA_SYNTAX_XL_R1C1).toString());
FreeResource();
Link aLink = LINK( this, ScTpFormulaOptions, ButtonHdl );

View File

@@ -213,12 +213,6 @@ TabPage RID_SCPAGE_FORMULA
Pos = MAP_APPFONT ( 105, 20 ) ;
Size = MAP_APPFONT ( 60, 46 ) ;
DropDown = TRUE ;
StringList [ en-US ] =
{
< "Calc A1" ; Default ; > ;
< "Excel A1" ; Default ; > ;
< "Excel R1C1" ; Default ; > ;
};
};
CheckBox CB_ENGLISH_FUNC_NAME

View File

@@ -824,3 +824,18 @@ String SCSTR_EXTDOC_NOT_LOADED
{
Text [ en-US ] = "The following external file could not be loaded. Data linked from this file did not get updated." ;
};
String SCSTR_FORMULA_SYNTAX_CALC_A1
{
Text [ en-US ] = "Calc A1";
};
String SCSTR_FORMULA_SYNTAX_XL_A1
{
Text [ en-US ] = "Excel A1";
};
String SCSTR_FORMULA_SYNTAX_XL_R1C1
{
Text [ en-US ] = "Excel R1C1";
};