[Libreoffice-commits] core.git: sc/source
Katarina Behrens
Katarina.Behrens at cib.de
Mon Jul 20 05:33:10 PDT 2015
sc/source/ui/optdlg/calcoptionsdlg.cxx | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
New commits:
commit aa354f2718b0ac81a6701b8c8ef41a15fe80c880
Author: Katarina Behrens <Katarina.Behrens at cib.de>
Date: Mon Jul 20 13:47:14 2015 +0200
Related tdf#92256: map CONV_OOO to listbox item no.1
it worked only accidentally for CONV_XL_A1 and CONV_XL_R1C1, as their
enum value was the same as listbox item no.
Change-Id: I57dc9f373de5a43fca8dcbe5bc6da25dfc54680f
Reviewed-on: https://gerrit.libreoffice.org/17229
Reviewed-by: Eike Rathke <erack at redhat.com>
Tested-by: Eike Rathke <erack at redhat.com>
diff --git a/sc/source/ui/optdlg/calcoptionsdlg.cxx b/sc/source/ui/optdlg/calcoptionsdlg.cxx
index 0a4b8af..d49fb65 100644
--- a/sc/source/ui/optdlg/calcoptionsdlg.cxx
+++ b/sc/source/ui/optdlg/calcoptionsdlg.cxx
@@ -54,6 +54,22 @@ formula::FormulaGrammar::AddressConvention toAddressConvention(sal_Int32 nPos)
return formula::FormulaGrammar::CONV_UNSPECIFIED;
}
+sal_Int32 toSelectedItem( formula::FormulaGrammar::AddressConvention eConv )
+{
+ switch (eConv)
+ {
+ case formula::FormulaGrammar::CONV_OOO:
+ return 1;
+ case formula::FormulaGrammar::CONV_XL_A1:
+ return 2;
+ case formula::FormulaGrammar::CONV_XL_R1C1:
+ return 3;
+ default:
+ ;
+ }
+ return 0;
+}
+
}
ScCalcOptionsDialog::ScCalcOptionsDialog(vcl::Window* pParent, const ScCalcConfig& rConfig)
@@ -79,7 +95,7 @@ ScCalcOptionsDialog::ScCalcOptionsDialog(vcl::Window* pParent, const ScCalcConfi
mpEmptyAsZero->SetClickHdl(LINK(this, ScCalcOptionsDialog, AsZeroModifiedHdl));
get(mpSyntax,"comboSyntaxRef");
- mpSyntax->SelectEntryPos(rConfig.meStringRefAddressSyntax);
+ mpSyntax->SelectEntryPos( toSelectedItem(rConfig.meStringRefAddressSyntax) );
mpSyntax->SetSelectHdl(LINK(this, ScCalcOptionsDialog, SyntaxModifiedHdl));
get(mpUseOpenCL,"CBUseOpenCL");
More information about the Libreoffice-commits
mailing list