summaryrefslogtreecommitdiff
path: root/sc/qa
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2022-05-06 18:46:27 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2022-05-07 08:10:49 +0200
commit1fe08ae6b383c2222178a21c926480a055a87f99 (patch)
treeb3a96a9a1babd0db5b4c4408468fd89369ee9582 /sc/qa
parentf15e6293cf78d67963a6e512f60a11ae58da72c5 (diff)
tdf#121740 increase DrawingEngine::OLE_Objects cache limit
shaves 5% off the load time for me Change-Id: Ia0ed8caa9300bfe5bcf71cfe844b8c4fdaf0fef6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133962 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc/qa')
-rw-r--r--sc/qa/unit/subsequent_export_test2.cxx14
1 files changed, 11 insertions, 3 deletions
diff --git a/sc/qa/unit/subsequent_export_test2.cxx b/sc/qa/unit/subsequent_export_test2.cxx
index 77b8858fcd97..fa55acdf5160 100644
--- a/sc/qa/unit/subsequent_export_test2.cxx
+++ b/sc/qa/unit/subsequent_export_test2.cxx
@@ -2696,9 +2696,17 @@ void ScExportTest2::testHyperlinkLocationXLSX()
void ScExportTest2::testTdf142264ManyChartsToXLSX()
{
// The cache size for the test should be small enough, to make sure that some charts get
- // unloaded in the process, and then loaded on demand properly (default is currently 20)
- CPPUNIT_ASSERT_LESS(sal_Int32(40),
- officecfg::Office::Common::Cache::DrawingEngine::OLE_Objects::get());
+ // unloaded in the process, and then loaded on demand properly (default is currently 200)
+ comphelper::ScopeGuard g([]() {
+ std::shared_ptr<comphelper::ConfigurationChanges> pBatch(
+ comphelper::ConfigurationChanges::create());
+ officecfg::Office::Common::Cache::DrawingEngine::OLE_Objects::set(200, pBatch);
+ return pBatch->commit();
+ });
+ std::shared_ptr<comphelper::ConfigurationChanges> pBatch(
+ comphelper::ConfigurationChanges::create());
+ officecfg::Office::Common::Cache::DrawingEngine::OLE_Objects::set(20, pBatch);
+ pBatch->commit();
ScDocShellRef xDocSh = loadDoc(u"many_charts.", FORMAT_ODS);
xDocSh = saveAndReload(*xDocSh, FORMAT_XLSX);