[Libreoffice-commits] core.git: sc/source

Katarina Behrens Katarina.Behrens at cib.de
Mon Oct 12 06:11:39 PDT 2015


 sc/source/filter/xml/xmlimprt.cxx |   17 +++++++++++++++++
 sc/source/filter/xml/xmlimprt.hxx |    1 +
 sc/source/ui/unoobj/confuno.cxx   |   10 ----------
 3 files changed, 18 insertions(+), 10 deletions(-)

New commits:
commit 24d745ea31ec49609a22d1395e6ba340c890936d
Author: Katarina Behrens <Katarina.Behrens at cib.de>
Date:   Mon Oct 12 15:06:20 2015 +0200

    Related tdf#93688: better place this into import finalize phase
    
    Change-Id: I08066248973f4560f8f5d149e9f84c4c2302f12c

diff --git a/sc/source/filter/xml/xmlimprt.cxx b/sc/source/filter/xml/xmlimprt.cxx
index e4802e3..7ddf148 100644
--- a/sc/source/filter/xml/xmlimprt.cxx
+++ b/sc/source/filter/xml/xmlimprt.cxx
@@ -3171,6 +3171,22 @@ void ScXMLImport::SetSheetNamedRanges()
     }
 }
 
+void ScXMLImport::SetStringRefSyntaxIfMissing()
+{
+    if (!pDoc)
+        return;
+
+    ScCalcConfig aCalcConfig = pDoc->GetCalcConfig();
+
+    // Has any string ref syntax been imported?
+    // If not, we need to take action
+    if ( !aCalcConfig.mbHasStringRefSyntax )
+    {
+        aCalcConfig.meStringRefAddressSyntax = formula::FormulaGrammar::CONV_A1_XL_A1;
+        pDoc->SetCalcConfig(aCalcConfig);
+    }
+}
+
 void SAL_CALL ScXMLImport::endDocument()
     throw(::com::sun::star::xml::sax::SAXException,
           ::com::sun::star::uno::RuntimeException,
@@ -3217,6 +3233,7 @@ void SAL_CALL ScXMLImport::endDocument()
             SetLabelRanges();
             SetNamedRanges();
             SetSheetNamedRanges();
+            SetStringRefSyntaxIfMissing();
             if (mpPivotSources)
                 // Process pivot table sources after the named ranges have been set.
                 mpPivotSources->process();
diff --git a/sc/source/filter/xml/xmlimprt.hxx b/sc/source/filter/xml/xmlimprt.hxx
index 2f44e39..2d67be1 100644
--- a/sc/source/filter/xml/xmlimprt.hxx
+++ b/sc/source/filter/xml/xmlimprt.hxx
@@ -1208,6 +1208,7 @@ public:
     void SetNamedRanges();
     void SetSheetNamedRanges();
     void SetLabelRanges();
+    void SetStringRefSyntaxIfMissing();
 
     /** Extracts the formula string, the formula grammar namespace URL, and a
         grammar enum value from the passed formula attribute value.
diff --git a/sc/source/ui/unoobj/confuno.cxx b/sc/source/ui/unoobj/confuno.cxx
index 8b9d4a7..3c9277c 100644
--- a/sc/source/ui/unoobj/confuno.cxx
+++ b/sc/source/ui/unoobj/confuno.cxx
@@ -355,16 +355,6 @@ void SAL_CALL ScDocumentConfiguration::setPropertyValue(
                     pDocShell->PostPaint(ScRange(0, 0, nTab, MAXCOL, MAXROW, nTab), PAINT_GRID);
             pDocShell->SetDocumentModified();
         }
-
-        ScCalcConfig aCalcConfig = rDoc.GetCalcConfig();
-
-        // Has any string ref syntax been imported?
-        // If not, we need to take action
-        if ( !aCalcConfig.mbHasStringRefSyntax )
-        {
-            aCalcConfig.meStringRefAddressSyntax = formula::FormulaGrammar::CONV_A1_XL_A1;
-            rDoc.SetCalcConfig(aCalcConfig);
-        }
     }
     else
         throw uno::RuntimeException();


More information about the Libreoffice-commits mailing list