summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2017-12-18 00:48:36 +0100
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2017-12-18 19:14:00 +0100
commit43b5d6b4a5cdafd63866046b1949431d75d7192c (patch)
treee638e70b2b639d3cbd2aafd3ba856992eab98949
parent80785f935455f3e740c57febc33410f1ee81f12a (diff)
clear the data provider cache after import, tdf#111960
This might also fix some problems with normal ODS files and not just with FODS files when we recompile formulas after the whole import. Change-Id: Iec05d2052ca5ce3bdf03abf02d502e4537fd3082 Reviewed-on: https://gerrit.libreoffice.org/46672 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com> (cherry picked from commit f9d8fe959d88011d63fc047a8cc00ded1dd2fda1) Reviewed-on: https://gerrit.libreoffice.org/46689
-rw-r--r--include/svl/hint.hxx1
-rw-r--r--sc/source/filter/xml/xmlimprt.cxx5
-rw-r--r--sc/source/ui/unoobj/chart2uno.cxx5
3 files changed, 11 insertions, 0 deletions
diff --git a/include/svl/hint.hxx b/include/svl/hint.hxx
index bce91f5462ae..e547afa3768d 100644
--- a/include/svl/hint.hxx
+++ b/include/svl/hint.hxx
@@ -89,6 +89,7 @@ enum class SfxHintId {
ScKillEditViewNoPaint,
ScHiddenRowsChanged,
ScSelectionChanged,
+ ScClearCache,
// SC accessibility hints
ScAccTableChanged,
diff --git a/sc/source/filter/xml/xmlimprt.cxx b/sc/source/filter/xml/xmlimprt.cxx
index 1bf8d576fe38..3adf318b6ad8 100644
--- a/sc/source/filter/xml/xmlimprt.cxx
+++ b/sc/source/filter/xml/xmlimprt.cxx
@@ -1868,6 +1868,11 @@ void SAL_CALL ScXMLImport::endDocument()
}
SvXMLImport::endDocument();
+ if (pDoc)
+ {
+ pDoc->BroadcastUno(SfxHint(SfxHintId::ScClearCache));
+ }
+
if(pDoc && bSelfImportingXMLSet)
ScModelObj::getImplementation(GetModel())->AfterXMLLoading();
}
diff --git a/sc/source/ui/unoobj/chart2uno.cxx b/sc/source/ui/unoobj/chart2uno.cxx
index f42fd4f1fff6..00cb7cded6a9 100644
--- a/sc/source/ui/unoobj/chart2uno.cxx
+++ b/sc/source/ui/unoobj/chart2uno.cxx
@@ -2871,6 +2871,11 @@ void ScChart2DataSequence::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint
if ( !m_aValueListeners.empty() )
m_bGotDataChangedHint = true;
}
+ else if (nId == SfxHintId::ScClearCache)
+ {
+ // necessary after import
+ m_aDataArray.clear();
+ }
}
}