summaryrefslogtreecommitdiff
path: root/chart2/source/tools
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2023-10-16 15:22:17 +0300
committerMike Kaganski <mike.kaganski@collabora.com>2023-10-16 18:27:49 +0200
commitf26bf09a0e93449ea85269a09a8a073a20903349 (patch)
tree0e7071c1bfd3c5f5fe4adb47a81cdf2b037db28c /chart2/source/tools
parent6506279e3bed2284ce0ec9a0957a0201eb0d72ae (diff)
tdf#141892: Set chart view to dirty state after loading
Previously, ChartViewHelper::setViewToDirtyState was only called in ChartModel::impl_notifyModifiedListeners during the load process of inline charts; after commit 574eec9036c5f185b3572ba1e0ca9d111eb361dc, the chart doesn't set its modified state when loading, and thus the view did not get notified about the necessary updates. This change introduces a hidden property in ChartDocumentWrapper, named 'ODFImport_UpdateView', which is set in SchXMLImport dtor to force the notification after the loading. Change-Id: Id9d82f16d233d2172cd6808a8498822e13b21b21 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158051 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'chart2/source/tools')
-rw-r--r--chart2/source/tools/ChartViewHelper.cxx10
1 files changed, 8 insertions, 2 deletions
diff --git a/chart2/source/tools/ChartViewHelper.cxx b/chart2/source/tools/ChartViewHelper.cxx
index 183d28189531..8011da3c171c 100644
--- a/chart2/source/tools/ChartViewHelper.cxx
+++ b/chart2/source/tools/ChartViewHelper.cxx
@@ -21,8 +21,7 @@
#include <ChartModel.hxx>
#include <servicenames.hxx>
-#include <com/sun/star/frame/XModel.hpp>
-#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+#include <com/sun/star/chart2/XChartDocument.hpp>
#include <com/sun/star/util/XModifyListener.hpp>
#include <comphelper/diagnose_ex.hxx>
@@ -51,6 +50,13 @@ void ChartViewHelper::setViewToDirtyState(const rtl::Reference<::chart::ChartMod
DBG_UNHANDLED_EXCEPTION("chart2");
}
}
+
+void ChartViewHelper::setViewToDirtyState_UNO(
+ const css::uno::Reference<css::chart2::XChartDocument>& xChartModel)
+{
+ if (auto pChartModel = dynamic_cast<ChartModel*>(xChartModel.get()))
+ setViewToDirtyState(rtl::Reference(pChartModel));
+}
} //namespace chart
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */