diff options
author | Caolán McNamara <caolanm@redhat.com> | 2020-01-21 15:43:46 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2020-01-22 17:55:28 +0100 |
commit | eae55d7397f953ca8a4be1a2665e8ca887adfe81 (patch) | |
tree | 47d84a1b81c3a4d7b4719b328cb1241ae80f1a2f /include/svx/itemwin.hxx | |
parent | 2399373778cf0778ad15b1fec9a1bf289b4089de (diff) |
rework line style to be a wide toolbar button
involves converting SvxLineStyleToolBoxControl to a PopupWindowController
because chart is doing interesting things in its panel there needs to be
a non-standard way to report/detect the selected line style, which is
then reused to disable/enable the arrows when none is selected/deselected
in non-chart sidebars
SvxLineBox becomes a toolbar dropdown instead of a combobox itemwindow
linectrl.cxx split into linewidthctrl.cxx and linewidthctrl because
SvxLineBox is now needed in svxcore
Change-Id: Icf0ef5e612b894a43d389af8a2908138c2e9c580
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87164
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'include/svx/itemwin.hxx')
-rw-r--r-- | include/svx/itemwin.hxx | 35 |
1 files changed, 13 insertions, 22 deletions
diff --git a/include/svx/itemwin.hxx b/include/svx/itemwin.hxx index 889a513586fe..e1a31d428724 100644 --- a/include/svx/itemwin.hxx +++ b/include/svx/itemwin.hxx @@ -20,40 +20,31 @@ #define INCLUDED_SVX_ITEMWIN_HXX #include <vcl/field.hxx> - +#include <svtools/toolbarmenu.hxx> #include <svx/dlgctrl.hxx> #include <svx/svxdllapi.h> class XLineWidthItem; class SfxObjectShell; +class SvtValueSet; +class SvxLineStyleToolBoxControl; -class SvxLineBox final : public ListBox +class SvxLineBox final : public WeldToolbarPopup { - sal_uInt16 nCurPos; - Timer aDelayTimer; - Size const aLogicalSize; - bool bRelease; - SfxObjectShell* mpSh; - css::uno::Reference< css::frame::XFrame > mxFrame; - - DECL_LINK(DelayHdl_Impl, Timer *, void); - - void ReleaseFocus_Impl(); - -public: - SvxLineBox( vcl::Window* pParent, - const css::uno::Reference< css::frame::XFrame >& rFrame ); + rtl::Reference<SvxLineStyleToolBoxControl> mxControl; + std::unique_ptr<SvtValueSet> mxLineStyleSet; + std::unique_ptr<weld::CustomWeld> mxLineStyleSetWin; void FillControl(); - void Fill(const XDashListRef &pList); -private: - virtual void Select() override; - virtual bool PreNotify( NotifyEvent& rNEvt ) override; - virtual bool EventNotify( NotifyEvent& rNEvt ) override; - virtual void DataChanged( const DataChangedEvent& rDCEvt ) override; + DECL_LINK(SelectHdl, SvtValueSet*, void); + + virtual void GrabFocus() override; +public: + SvxLineBox(SvxLineStyleToolBoxControl* pControl, weld::Widget* pParent, int nInitialIndex); + virtual ~SvxLineBox() override; }; class SVX_DLLPUBLIC SvxMetricField : public MetricField |