summaryrefslogtreecommitdiff
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
parent1ec9daed1d8b6d952b5102d98fec5d092d66cf46 (diff)
Related tdf#93688: better place this into import finalize phase
Change-Id: I08066248973f4560f8f5d149e9f84c4c2302f12c
-rw-r--r--sc/source/filter/xml/xmlimprt.cxx17
-rw-r--r--sc/source/filter/xml/xmlimprt.hxx1
-rw-r--r--sc/source/ui/unoobj/confuno.cxx10
3 files changed, 18 insertions, 10 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();
diff --git a/sc/source/filter/xml/xmlimprt.hxx b/sc/source/filter/xml/xmlimprt.hxx
index 2f44e39df90c..2d67be1ed616 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 8b9d4a789772..3c9277c1f3fa 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();