diff options
4 files changed, 27 insertions, 3 deletions
diff --git a/chart2/source/controller/sidebar/ChartLinePanel.cxx b/chart2/source/controller/sidebar/ChartLinePanel.cxx index fbec91c8261f..fe26ec66c0ec 100644 --- a/chart2/source/controller/sidebar/ChartLinePanel.cxx +++ b/chart2/source/controller/sidebar/ChartLinePanel.cxx @@ -27,6 +27,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 { namespace sidebar { namespace { @@ -204,6 +208,11 @@ void ChartLinePanel::updateData() XLineStyleItem aStyleItem(eStyle); updateLineStyle(false, true, &aStyleItem); + sal_uInt32 nWidth; + xPropSet->getPropertyValue("LineWidth") >>= nWidth; + XLineWidthItem aWidthItem(nWidth); + updateLineWidth(false, true, &aWidthItem); + css::uno::Any aLineDashName = xPropSet->getPropertyValue("LineDashName"); OUString aDashName; aLineDashName >>= aDashName; @@ -327,6 +336,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 c2e5d1fee7e1..edc01f1e5537 100644 --- a/chart2/source/controller/sidebar/ChartLinePanel.hxx +++ b/chart2/source/controller/sidebar/ChartLinePanel.hxx @@ -72,6 +72,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; diff --git a/include/svx/sidebar/LinePropertyPanelBase.hxx b/include/svx/sidebar/LinePropertyPanelBase.hxx index e94513781fb6..5413888f2a18 100644 --- a/include/svx/sidebar/LinePropertyPanelBase.hxx +++ b/include/svx/sidebar/LinePropertyPanelBase.hxx @@ -91,7 +91,7 @@ protected: void updateLineStyle(bool bDisabled, bool bSetOrDefault, const SfxPoolItem* pItem); void updateLineDash(bool bDisabled, bool bSetOrDefault, const SfxPoolItem* pItem); void updateLineTransparence(bool bDisabled, bool bSetOrDefault, const SfxPoolItem* pItem); - void updateLineWidth(bool bDisabled, bool bSetOrDefault, const SfxPoolItem* pItem); + virtual void updateLineWidth(bool bDisabled, bool bSetOrDefault, const SfxPoolItem* pItem); void updateLineStart(bool bDisabled, bool bSetOrDefault, const SfxPoolItem* pItem); void updateLineEnd(bool bDisabled, bool bSetOrDefault, const SfxPoolItem* pItem); void updateLineJoint(bool bDisabled, bool bSetOrDefault, const SfxPoolItem* pItem); @@ -112,6 +112,8 @@ protected: VclPtr<sfx2::sidebar::SidebarToolBox> mpTBColor; + sal_Int32 mnWidthCoreValue; + private: //ui controls VclPtr<FixedText> mpFTWidth; @@ -133,7 +135,6 @@ private: sal_uInt16 mnTrans; MapUnit meMapUnit; - sal_Int32 mnWidthCoreValue; XLineEndListRef mxLineEndList; XDashListRef mxLineStyleList; std::unique_ptr<XLineStartItem> mpStartItem; diff --git a/svx/source/sidebar/line/LinePropertyPanelBase.cxx b/svx/source/sidebar/line/LinePropertyPanelBase.cxx index ae583af16f4b..494bc981b1c5 100644 --- a/svx/source/sidebar/line/LinePropertyPanelBase.cxx +++ b/svx/source/sidebar/line/LinePropertyPanelBase.cxx @@ -165,11 +165,11 @@ LinePropertyPanelBase::LinePropertyPanelBase( vcl::Window* pParent, const uno::Reference<css::frame::XFrame>& rxFrame) : PanelLayout(pParent, "LinePropertyPanel", "svx/ui/sidebarline.ui", rxFrame), + mnWidthCoreValue(0), mpStyleItem(), mpDashItem(), mnTrans(0), meMapUnit(MapUnit::MapMM), - mnWidthCoreValue(0), mpStartItem(), mpEndItem(), mxLineWidthPopup(VclPtr<LineWidthPopup>::Create(*this)), |