summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@gmail.com>2012-05-30 11:00:58 -0400
committerKohei Yoshida <kohei.yoshida@gmail.com>2012-05-30 11:37:22 -0400
commit78ed21e078aa7c8aa863594c9a4f6c2c7863cb0f (patch)
tree68d949c74b2d6618fcf9b77775cedd31c6470fa8 /sc
parent33d57704c6d79dbd806caf94124776a6a05152a1 (diff)
Share common localized strings: Calc A1, Excel A1, and Excel R1C1.
Change-Id: Ia3fbdd8770ca2e2a0125bd39550ab44c1776e6d8
Diffstat (limited to 'sc')
-rw-r--r--sc/inc/sc.hrc5
-rw-r--r--sc/source/ui/optdlg/calcoptionsdlg.cxx15
-rw-r--r--sc/source/ui/optdlg/calcoptionsdlg.hxx4
-rw-r--r--sc/source/ui/optdlg/tpformula.cxx4
-rw-r--r--sc/source/ui/src/optdlg.src6
-rw-r--r--sc/source/ui/src/scstring.src15
6 files changed, 36 insertions, 13 deletions
diff --git a/sc/inc/sc.hrc b/sc/inc/sc.hrc
index 69398565537c..936de6ee76d5 100644
--- a/sc/inc/sc.hrc
+++ b/sc/inc/sc.hrc
@@ -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)
diff --git a/sc/source/ui/optdlg/calcoptionsdlg.cxx b/sc/source/ui/optdlg/calcoptionsdlg.cxx
index a661adc45db5..d3eeaa5cadc2 100644
--- a/sc/source/ui/optdlg/calcoptionsdlg.cxx
+++ b/sc/source/ui/optdlg/calcoptionsdlg.cxx
@@ -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:
;
diff --git a/sc/source/ui/optdlg/calcoptionsdlg.hxx b/sc/source/ui/optdlg/calcoptionsdlg.hxx
index 51781a651cf7..d80def876680 100644
--- a/sc/source/ui/optdlg/calcoptionsdlg.hxx
+++ b/sc/source/ui/optdlg/calcoptionsdlg.hxx
@@ -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;
diff --git a/sc/source/ui/optdlg/tpformula.cxx b/sc/source/ui/optdlg/tpformula.cxx
index cb15a0020ac0..61d05feead4f 100644
--- a/sc/source/ui/optdlg/tpformula.cxx
+++ b/sc/source/ui/optdlg/tpformula.cxx
@@ -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 );
diff --git a/sc/source/ui/src/optdlg.src b/sc/source/ui/src/optdlg.src
index eddda53aa932..4e00b1d88448 100644
--- a/sc/source/ui/src/optdlg.src
+++ b/sc/source/ui/src/optdlg.src
@@ -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
diff --git a/sc/source/ui/src/scstring.src b/sc/source/ui/src/scstring.src
index c3f3e00c72c6..84b20eba5cef 100644
--- a/sc/source/ui/src/scstring.src
+++ b/sc/source/ui/src/scstring.src
@@ -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";
+};