diff options
author | Caolán McNamara <caolanm@redhat.com> | 2016-11-05 20:28:27 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2016-11-07 21:04:50 +0000 |
commit | 64a708cba9b954afe3331f63c58218eb53b3d0ce (patch) | |
tree | ddc1bea3b63f32a1c6d377c1d1dd7aee0803fb70 /include/svx/colorwindow.hxx | |
parent | style fix for cppcheck duplicateBreak (diff) | |
download | core-64a708cba9b954afe3331f63c58218eb53b3d0ce.tar.gz core-64a708cba9b954afe3331f63c58218eb53b3d0ce.zip |
Revert "Reverts a commit series that cripple windows ci."
with addition of...
- svxlo-SvxColorListBox
+ svxcorelo-SvxColorListBox
This reverts commit db380aab1063e8a5e40111c40ee9f7921aa82601.
Change-Id: I3af7aa0abb1a430bce64188244404fcbd480b128
Reviewed-on: https://gerrit.libreoffice.org/30598
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'include/svx/colorwindow.hxx')
-rw-r--r-- | include/svx/colorwindow.hxx | 48 |
1 files changed, 37 insertions, 11 deletions
diff --git a/include/svx/colorwindow.hxx b/include/svx/colorwindow.hxx index 8b185d952de3..1e417130effb 100644 --- a/include/svx/colorwindow.hxx +++ b/include/svx/colorwindow.hxx @@ -31,8 +31,22 @@ #include <functional> -class BorderColorStatus; +class SVX_DLLPUBLIC BorderColorStatus +{ + Color maColor; + Color maTLBRColor; + Color maBLTRColor; +public: + BorderColorStatus(); + ~BorderColorStatus(); + bool statusChanged( const css::frame::FeatureStateEvent& rEvent ); + Color GetColor(); +}; + class Button; +typedef std::function<void(const OUString&, const NamedColor&)> ColorSelectFunction; + +#define COL_NONE_COLOR TRGB_COLORDATA(0x80, 0xFF, 0xFF, 0xFF) class SVX_DLLPUBLIC SvxColorWindow : public SfxPopupWindow { @@ -43,37 +57,49 @@ private: VclPtr<ListBox> mpPaletteListBox; VclPtr<PushButton> mpButtonAutoColor; + VclPtr<PushButton> mpButtonNoneColor; VclPtr<PushButton> mpButtonPicker; VclPtr<FixedLine> mpAutomaticSeparator; OUString maCommand; - Link<const Color&, void> maSelectedLink; + Link<const NamedColor&, void> maSelectedLink; PaletteManager& mrPaletteManager; BorderColorStatus& mrBorderColorStatus; - std::function<void(const OUString&, const Color&)> maColorSelectFunction; + ColorSelectFunction maColorSelectFunction; DECL_LINK( SelectHdl, ValueSet*, void ); DECL_LINK( SelectPaletteHdl, ListBox&, void); DECL_LINK( AutoColorClickHdl, Button*, void ); DECL_LINK( OpenPickerClickHdl, Button*, void ); + static bool SelectValueSetEntry(SvxColorValueSet* pColorSet, const Color& rColor); + static NamedColor GetSelectEntryColor(ValueSet* pColorSet); + NamedColor GetAutoColor() const; + NamedColor GetNoneColor() const; + public: - SvxColorWindow( const OUString& rCommand, - PaletteManager& rPaletteManager, - BorderColorStatus& rBorderColorStatus, - sal_uInt16 nSlotId, - const css::uno::Reference< css::frame::XFrame >& rFrame, - vcl::Window* pParentWindow, - std::function<void(const OUString&, const Color&)> const & maColorSelectFunction); + SvxColorWindow(const OUString& rCommand, + PaletteManager& rPaletteManager, + BorderColorStatus& rBorderColorStatus, + sal_uInt16 nSlotId, + const css::uno::Reference< css::frame::XFrame >& rFrame, + vcl::Window* pParentWindow, + ColorSelectFunction const& rColorSelectFunction); virtual ~SvxColorWindow() override; virtual void dispose() override; + void ShowNoneButton(); void StartSelection(); + void SetNoSelection(); + bool IsNoSelection() const; + void SelectEntry(const NamedColor& rColor); + void SelectEntry(const Color& rColor); + NamedColor GetSelectEntryColor() const; virtual void KeyInput( const KeyEvent& rKEvt ) override; virtual void statusChanged( const css::frame::FeatureStateEvent& rEvent ) override; - void SetSelectedHdl( const Link<const Color&, void>& rLink ) { maSelectedLink = rLink; } + void SetSelectedHdl( const Link<const NamedColor&, void>& rLink ) { maSelectedLink = rLink; } }; #endif |