summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorKohei Yoshida <kyoshida@novell.com>2010-11-03 14:41:59 -0400
committerKohei Yoshida <kyoshida@novell.com>2010-11-03 14:41:59 -0400
commit5fd666fd0f984c84677b18ac7d1fdf90fc8a9cd6 (patch)
tree2060879170148d489812d60123c65d1fb7576e44 /sc
parent892231d6dc012788f4776e4925fa3e22d5f4ae83 (diff)
Set correct default formula syntax value in case it's not explicitly set.
When starting from a fresh config, Calc failed to assign default 'Calc A1' syntax unless the user specifically goes to the Options page and sets the formula syntax in the Calc - Formula options page. This caused e.g. print range editing to fail miserably. (fdo#31041)
Diffstat (limited to 'sc')
-rw-r--r--sc/source/core/tool/docoptio.cxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/sc/source/core/tool/docoptio.cxx b/sc/source/core/tool/docoptio.cxx
index 4933681ab2f3..08e5b85cfe35 100644
--- a/sc/source/core/tool/docoptio.cxx
+++ b/sc/source/core/tool/docoptio.cxx
@@ -452,7 +452,8 @@ ScDocCfg::ScDocCfg() :
{
case SCFORMULAOPT_GRAMMAR:
{
- ::formula::FormulaGrammar::Grammar eGram = ::formula::FormulaGrammar::GRAM_DEFAULT;
+ // Get default value in case this option is not set.
+ ::formula::FormulaGrammar::Grammar eGram = GetFormulaSyntax();
do
{
@@ -471,6 +472,8 @@ ScDocCfg::ScDocCfg() :
case 2: // Excel R1C1
eGram = ::formula::FormulaGrammar::GRAM_NATIVE_XL_R1C1;
break;
+ default:
+ ;
}
}
while (false);