summaryrefslogtreecommitdiff
path: root/sc/source/filter/xml/xmlimprt.cxx
diff options
context:
space:
mode:
authorKatarina Behrens <Katarina.Behrens@cib.de>2015-10-12 15:06:20 +0200
committerKatarina Behrens <Katarina.Behrens@cib.de>2015-10-12 15:09:54 +0200
commit24d745ea31ec49609a22d1395e6ba340c890936d (patch)
tree9a2f6fdd789b2097d9d522b3e2dad21ce1679623 /sc/source/filter/xml/xmlimprt.cxx
parent1ec9daed1d8b6d952b5102d98fec5d092d66cf46 (diff)
Related tdf#93688: better place this into import finalize phase
Change-Id: I08066248973f4560f8f5d149e9f84c4c2302f12c
Diffstat (limited to 'sc/source/filter/xml/xmlimprt.cxx')
-rw-r--r--sc/source/filter/xml/xmlimprt.cxx17
1 files changed, 17 insertions, 0 deletions
diff --git a/sc/source/filter/xml/xmlimprt.cxx b/sc/source/filter/xml/xmlimprt.cxx
index e4802e35ad2f..7ddf1482405d 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();