summaryrefslogtreecommitdiff
path: root/chart2
diff options
context:
space:
mode:
authorSzymon Kłos <szymon.klos@collabora.com>2021-01-06 11:44:43 +0100
committerSzymon Kłos <szymon.klos@collabora.com>2021-01-08 14:54:32 +0100
commit00140e3df4a22e75261de3af18c6c0fc3f5fc92c (patch)
tree55961e1393b31b0c9f4091554d81c5d3044499d7 /chart2
parent2752fd1b665694a4db3a4e34c7fdc8780a86492e (diff)
lok: send chart line width updates
Change-Id: I4c9c4a977df12a1cefb81cfbcac73b61ff26e488 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108843 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Andras Timar <andras.timar@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108966 Tested-by: Jenkins Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
Diffstat (limited to 'chart2')
-rw-r--r--chart2/source/controller/sidebar/ChartLinePanel.cxx21
-rw-r--r--chart2/source/controller/sidebar/ChartLinePanel.hxx2
2 files changed, 23 insertions, 0 deletions
diff --git a/chart2/source/controller/sidebar/ChartLinePanel.cxx b/chart2/source/controller/sidebar/ChartLinePanel.cxx
index 3ae57de73739..019b022bd1a3 100644
--- a/chart2/source/controller/sidebar/ChartLinePanel.cxx
+++ b/chart2/source/controller/sidebar/ChartLinePanel.cxx
@@ -24,6 +24,10 @@
#include <com/sun/star/util/XModifyBroadcaster.hpp>
#include <com/sun/star/chart2/XDiagram.hpp>
+#include <comphelper/lok.hxx>
+#include <sfx2/viewsh.hxx>
+#include <LibreOfficeKit/LibreOfficeKitEnums.h>
+
namespace chart::sidebar {
namespace {
@@ -189,6 +193,11 @@ void ChartLinePanel::updateData()
XLineTransparenceItem aLineTransparenceItem(nLineTransparence);
updateLineTransparence(false, true, &aLineTransparenceItem);
+ sal_uInt32 nWidth;
+ xPropSet->getPropertyValue("LineWidth") >>= nWidth;
+ XLineWidthItem aWidthItem(nWidth);
+ updateLineWidth(false, true, &aWidthItem);
+
maLineStyleWrapper.updateData();
maLineColorWrapper.updateData();
}
@@ -274,6 +283,18 @@ void ChartLinePanel::setLineWidth(const XLineWidthItem& rItem)
xPropSet->setPropertyValue("LineWidth", css::uno::Any(rItem.GetValue()));
}
+void ChartLinePanel::updateLineWidth(bool bDisabled, bool bSetOrDefault, const SfxPoolItem* pItem)
+{
+ LinePropertyPanelBase::updateLineWidth(bDisabled, bSetOrDefault, pItem);
+
+ SfxViewShell* pViewShell = SfxViewShell::Current();
+ if (comphelper::LibreOfficeKit::isActive() && pViewShell)
+ {
+ pViewShell->libreOfficeKitViewCallback(LOK_CALLBACK_STATE_CHANGED,
+ (".uno:LineWidth=" + std::to_string(mnWidthCoreValue)).c_str());
+ }
+}
+
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/controller/sidebar/ChartLinePanel.hxx b/chart2/source/controller/sidebar/ChartLinePanel.hxx
index 2f703839a22c..ef174a5ee3a9 100644
--- a/chart2/source/controller/sidebar/ChartLinePanel.hxx
+++ b/chart2/source/controller/sidebar/ChartLinePanel.hxx
@@ -67,6 +67,8 @@ protected:
virtual void setLineJoint(const XLineJointItem* pItem) override;
virtual void setLineCap(const XLineCapItem* pItem) override;
+ virtual void updateLineWidth(bool bDisabled, bool bSetOrDefault, const SfxPoolItem* pItem) override;
+
private:
css::uno::Reference<css::frame::XModel> mxModel;