summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorKatarina Behrens <Katarina.Behrens@cib.de>2015-07-20 13:47:14 +0200
committerEike Rathke <erack@redhat.com>2015-07-20 12:32:39 +0000
commitaa354f2718b0ac81a6701b8c8ef41a15fe80c880 (patch)
tree648ff7f85b9f784cd04c0d09c5dcae178e4f0e79 /sc
parente8e742a6159b1a1148e2b30b8c417086921dca05 (diff)
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@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
Diffstat (limited to 'sc')
-rw-r--r--sc/source/ui/optdlg/calcoptionsdlg.cxx18
1 files changed, 17 insertions, 1 deletions
diff --git a/sc/source/ui/optdlg/calcoptionsdlg.cxx b/sc/source/ui/optdlg/calcoptionsdlg.cxx
index 0a4b8af15792..d49fb65ceee8 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");