[Libreoffice-commits] core.git: Branch 'private/bubli/lhm-4-1-6-backports' - sc/source

Katarina Behrens Katarina.Behrens at cib.de
Tue Oct 13 03:58:19 PDT 2015


 sc/source/filter/xml/xmlimprt.cxx |   17 +++++++++++++++++
 sc/source/filter/xml/xmlimprt.hxx |    1 +
 2 files changed, 18 insertions(+)

New commits:
commit 08603fe366c73f9f3ed343ed16d7c52a6262c57c
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 3378541..c95f77f 100644
--- a/sc/source/filter/xml/xmlimprt.cxx
+++ b/sc/source/filter/xml/xmlimprt.cxx
@@ -3197,6 +3197,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(void)
 throw( ::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException )
 {
@@ -3241,6 +3257,7 @@ throw( ::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeE
             SetLabelRanges();
             SetNamedRanges();
             SetSheetNamedRanges();
+            SetStringRefSyntaxIfMissing();
         }
         GetProgressBarHelper()->End();  // make room for subsequent SfxProgressBars
         if (pDoc)
diff --git a/sc/source/filter/xml/xmlimprt.hxx b/sc/source/filter/xml/xmlimprt.hxx
index 3fb584a..b3748fe 100644
--- a/sc/source/filter/xml/xmlimprt.hxx
+++ b/sc/source/filter/xml/xmlimprt.hxx
@@ -1183,6 +1183,7 @@ public:
     void SetSheetNamedRanges();
     void SetLabelRanges();
     void AddDefaultNote( const com::sun::star::table::CellAddress& aCell );
+    void SetStringRefSyntaxIfMissing();
 
     /** Extracts the formula string, the formula grammar namespace URL, and a
         grammar enum value from the passed formula attribute value.


More information about the Libreoffice-commits mailing list