summaryrefslogtreecommitdiff
path: root/chart2/qa
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2020-09-12 17:22:23 +0300
committerMike Kaganski <mike.kaganski@collabora.com>2020-09-15 06:09:04 +0200
commit574eec9036c5f185b3572ba1e0ca9d111eb361dc (patch)
tree1bb42b53b1b41fbaf87517fb268c08a834d3e0ba /chart2/qa
parentabcc4eb907661e07ad850ccce7eb06f129da4286 (diff)
tdf#77007: chart must honor its parent's IsEnableSetModified
Regression from commit bb97ecdbcc8d8dafd39e728b21bc68efee4eccbc, which had dropped storing chart doc (calling its storeOwn) while loading back in 2012, to avoid performance problems when loading XLS. Funnily, in 2013, commit a666862deffa33013d3df3bb62e87c67f9a89948 was merged, that was expected to solve exactly the same problem as this change, by calling storeOwn for charts being loaded; while obviously not fixing the problem properly, it seems to had undone the effect of the Markus's commit. The latter commit had a side effect of updating views of modified charts while exporting them inside storeOwn, which made respective draw pages to be up-to-date right after loading, including those on inactive sheets. Now, after this change, this is not so, thus unit tests' getChartDocFromSheet was made to update the view explicitly. Unfortunately, it's not yet possible to revert the change from commit a666862deffa33013d3df3bb62e87c67f9a89948, because obviously some dependency grew, which makes e.g. testTdf122594 fail if that commit is reverted. Given that testTdf122594 has no charts, storing the modified objects while loading has much wider side effects than was expected by author of a666862deffa33013d3df3bb62e87c67f9a89948. Change-Id: Iee1b9ef6f4d8c2dfa0a49680c5e2b465f1817a59 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102534 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'chart2/qa')
-rw-r--r--chart2/qa/extras/charttest.hxx6
1 files changed, 6 insertions, 0 deletions
diff --git a/chart2/qa/extras/charttest.hxx b/chart2/qa/extras/charttest.hxx
index 156893cd2cb5..bcd1f101189d 100644
--- a/chart2/qa/extras/charttest.hxx
+++ b/chart2/qa/extras/charttest.hxx
@@ -29,6 +29,7 @@
#include <unotools/tempfile.hxx>
#include <rtl/math.hxx>
+#include <svx/charthelper.hxx>
#include <com/sun/star/chart2/XAnyDescriptionAccess.hpp>
#include <com/sun/star/chart2/XChartDocument.hpp>
@@ -204,6 +205,11 @@ Reference< lang::XComponent > getChartCompFromSheet( sal_Int32 nSheet, uno::Refe
Reference< chart2::XChartDocument > getChartDocFromSheet( sal_Int32 nSheet, uno::Reference< lang::XComponent > const & xComponent )
{
uno::Reference< chart2::XChartDocument > xChartDoc ( getChartCompFromSheet(nSheet, xComponent), UNO_QUERY_THROW );
+
+ // Update the chart view, so that its draw page is updated and ready for the test
+ css::uno::Reference<css::frame::XModel> xModel(xChartDoc, css::uno::UNO_QUERY_THROW);
+ ChartHelper::updateChart(xModel);
+
return xChartDoc;
}