summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2020-12-10 11:27:15 +0000
committerCaolán McNamara <caolanm@redhat.com>2020-12-10 14:01:40 +0100
commitdf264ca516a1cdbd24342d399f843bb3ae16c138 (patch)
tree4bd292400e5c779797ed99fa3095d21e1ba24ef4 /include
parent85db1368d6f8965c636c82b8d85734627ffa5bbd (diff)
Resolves: tdf#138789 disable widgets on 'none' when status changes
instead of when chage is dispatched, the chart case has its own dispatcher that disables the base class one. This fixes the reported problem, and the related problem of updating when moving focus from one line that has style 'none' to one that doesn't, and vice-versa, where no change is dispached on received on context change Change-Id: I6afb396e75ba93c13fcae71c52618cfce7f9cecb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107525 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'include')
-rw-r--r--include/svx/linectrl.hxx5
-rw-r--r--include/svx/sidebar/LinePropertyPanelBase.hxx4
2 files changed, 7 insertions, 2 deletions
diff --git a/include/svx/linectrl.hxx b/include/svx/linectrl.hxx
index 62f428aa5136..7ade8dc06643 100644
--- a/include/svx/linectrl.hxx
+++ b/include/svx/linectrl.hxx
@@ -32,6 +32,7 @@ class XLineStyleItem;
class XLineDashItem;
typedef std::function<bool(const OUString&, const css::uno::Any&)> LineStyleSelectFunction;
+typedef std::function<void(bool)> LineStyleIsNoneFunction;
// SvxLineStyleController:
class SVXCORE_DLLPUBLIC SvxLineStyleToolBoxControl final : public svt::PopupWindowController
@@ -40,6 +41,7 @@ private:
std::unique_ptr<svx::ToolboxButtonLineStyleUpdater> m_xBtnUpdater;
LineStyleSelectFunction m_aLineStyleSelectFunction;
+ LineStyleIsNoneFunction m_aLineStyleIsNoneFunction;
public:
SvxLineStyleToolBoxControl( const css::uno::Reference<css::uno::XComponentContext>& rContext );
@@ -56,7 +58,10 @@ public:
virtual ~SvxLineStyleToolBoxControl() override;
+ // called when the user selects a line style
void setLineStyleSelectFunction(const LineStyleSelectFunction& aLineStyleSelectFunction);
+ // called when the line style changes, can be used to trigger disabling the arrows if the none line style is selected
+ void setLineStyleIsNoneFunction(const LineStyleIsNoneFunction& aLineStyleIsNoneFunction);
void dispatchLineStyleCommand(const OUString& rCommand, const css::uno::Sequence<css::beans::PropertyValue>& rArgs);
private:
diff --git a/include/svx/sidebar/LinePropertyPanelBase.hxx b/include/svx/sidebar/LinePropertyPanelBase.hxx
index 1905e66d7c2c..cd924e6b8a8f 100644
--- a/include/svx/sidebar/LinePropertyPanelBase.hxx
+++ b/include/svx/sidebar/LinePropertyPanelBase.hxx
@@ -40,7 +40,7 @@ class XDashList;
namespace svx::sidebar
{
-class DisableArrowsWrapper;
+class LineStyleNoneChange;
class SVX_DLLPUBLIC LinePropertyPanelBase : public PanelLayout
{
@@ -108,7 +108,7 @@ private:
//popup windows
std::unique_ptr<LineWidthPopup> mxLineWidthPopup;
- std::unique_ptr<DisableArrowsWrapper> mxDisableArrowsWrapper;
+ std::unique_ptr<LineStyleNoneChange> mxLineStyleNoneChange;
sal_uInt16 mnTrans;
MapUnit meMapUnit;