[Libreoffice-commits] core.git: Branch 'private/bubli/lhm-4-1-6-backports' - sc/source
Katarina Behrens
Katarina.Behrens at cib.de
Tue Oct 13 04:08:51 PDT 2015
Rebased ref, commits from common ancestor:
commit 7c42b3a8fc772443e32826c7b05f22f793000f06
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.
diff --git a/sc/source/ui/unoobj/confuno.cxx b/sc/source/ui/unoobj/confuno.cxx
index d1a85d8..abcbdbc 100644
--- a/sc/source/ui/unoobj/confuno.cxx
+++ b/sc/source/ui/unoobj/confuno.cxx
@@ -348,16 +348,6 @@ void SAL_CALL ScDocumentConfiguration::setPropertyValue(
pDocShell->PostPaint(ScRange(0, 0, nTab, MAXCOL, MAXROW, nTab), PAINT_GRID);
pDocShell->SetDocumentModified();
}
-
- 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);
- }
}
else
throw uno::RuntimeException();
More information about the Libreoffice-commits
mailing list