[Libreoffice-commits] .: sc/source

Kohei Yoshida kohei at kemper.freedesktop.org
Wed Nov 3 11:44:38 PDT 2010


 sc/source/core/tool/docoptio.cxx |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

New commits:
commit a673095531c977a9012195cfcbf60bd6c457a718
Author: Kohei Yoshida <kyoshida at novell.com>
Date:   Wed Nov 3 14:41:59 2010 -0400

    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)

diff --git a/sc/source/core/tool/docoptio.cxx b/sc/source/core/tool/docoptio.cxx
index 4813d8c..1b87ae6 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);


More information about the Libreoffice-commits mailing list