summaryrefslogtreecommitdiff
path: root/include/svx
diff options
context:
space:
mode:
Diffstat (limited to 'include/svx')
-rw-r--r--include/svx/colorbox.hxx54
-rw-r--r--include/svx/colorwindow.hxx57
2 files changed, 0 insertions, 111 deletions
diff --git a/include/svx/colorbox.hxx b/include/svx/colorbox.hxx
index b703aa224bec..51fbc00d4b5f 100644
--- a/include/svx/colorbox.hxx
+++ b/include/svx/colorbox.hxx
@@ -11,65 +11,11 @@
#define INCLUDED_SVX_COLORBOX_HXX
#include <memory>
-#include <vcl/menubtn.hxx>
#include <vcl/weld.hxx>
#include <svx/colorwindow.hxx>
-class SvxColorListBox;
class ColorListBox;
-class SvxListBoxColorWrapper
-{
-public:
- SvxListBoxColorWrapper(SvxColorListBox* pControl);
- void operator()(const OUString& rCommand, const NamedColor& rColor);
- void dispose();
-private:
- VclPtr<SvxColorListBox> mxControl;
-};
-
-class SVXCORE_DLLPUBLIC SvxColorListBox : public MenuButton
-{
-private:
- friend class SvxListBoxColorWrapper;
- VclPtr<SvxColorWindow> m_xColorWindow;
- Link<SvxColorListBox&, void> m_aSelectedLink;
- SvxListBoxColorWrapper m_aColorWrapper;
- Color m_aAutoDisplayColor;
- NamedColor m_aSelectedColor;
- sal_uInt16 m_nSlotId;
- std::shared_ptr<PaletteManager> m_xPaletteManager;
- ColorStatus m_aColorStatus;
-
- DECL_LINK(MenuActivateHdl, MenuButton *, void);
- void Selected(const NamedColor& rNamedColor);
- void createColorWindow();
- void LockWidthRequest();
- VclPtr<SvxColorWindow> const & getColorWindow() const;
-public:
- SvxColorListBox(vcl::Window* pParent, WinBits nStyle = 0);
- virtual ~SvxColorListBox() override;
- virtual void dispose() override;
-
- void SetSelectHdl(const Link<SvxColorListBox&, void>& rLink)
- {
- m_aSelectedLink = rLink;
- }
-
- Color const & GetSelectEntryColor() const { return m_aSelectedColor.first; }
-
- void SelectEntry(const Color& rColor);
-
- void SetNoSelection() { getColorWindow()->SetNoSelection(); }
-
- void ShowPreview(const NamedColor &rColor);
- void EnsurePaletteManager();
-
- DECL_LINK(WindowEventListener, VclWindowEvent&, void);
-
- virtual boost::property_tree::ptree DumpAsPropertyTree() override;
-};
-
class ListBoxColorWrapper
{
public:
diff --git a/include/svx/colorwindow.hxx b/include/svx/colorwindow.hxx
index 2452a2ae5827..372470c63cc4 100644
--- a/include/svx/colorwindow.hxx
+++ b/include/svx/colorwindow.hxx
@@ -24,8 +24,6 @@
#include <rtl/ustring.hxx>
#include <svx/SvxColorValueSet.hxx>
#include <svx/Palette.hxx>
-#include <vcl/lstbox.hxx>
-#include <vcl/fixed.hxx>
#include <vcl/toolbox.hxx>
#include <functional>
@@ -51,61 +49,6 @@ typedef std::function<void(const OUString&, const NamedColor&)> ColorSelectFunct
#define COL_NONE_COLOR ::Color(0x80, 0xFF, 0xFF, 0xFF)
-class SVXCORE_DLLPUBLIC SvxColorWindow final : public svtools::ToolbarPopup
-{
-private:
- const sal_uInt16 theSlotId;
- VclPtr<SvxColorValueSet> mpColorSet;
- VclPtr<SvxColorValueSet> mpRecentColorSet;
-
- VclPtr<ListBox> mpPaletteListBox;
- VclPtr<PushButton> mpButtonAutoColor;
- VclPtr<PushButton> mpButtonNoneColor;
- VclPtr<PushButton> mpButtonPicker;
- VclPtr<FixedLine> mpAutomaticSeparator;
- OUString maCommand;
- Link<const NamedColor&, void> maSelectedLink;
-
- VclPtr<vcl::Window> mxParentWindow;
- std::shared_ptr<PaletteManager> mxPaletteManager;
- ColorStatus& mrColorStatus;
-
- ColorSelectFunction maColorSelectFunction;
- bool mbReuseParentForPicker;
-
- 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 const * pColorSet);
- NamedColor GetAutoColor() const;
-
-public:
- SvxColorWindow(const OUString& rCommand,
- std::shared_ptr<PaletteManager> const & rPaletteManager,
- ColorStatus& rColorStatus,
- sal_uInt16 nSlotId,
- const css::uno::Reference< css::frame::XFrame >& rFrame,
- vcl::Window* pParentWindow,
- // tdf#118251 When true, reuse pParentWindow as the parent of the color picker
- // that appears from the 'custom color' button. When false use the window of
- // rFrame. true is helpful when launched from a dialog, false for launched
- // from a toolbar
- bool bReuseParentForPicker,
- ColorSelectFunction const& rColorSelectFunction);
- virtual ~SvxColorWindow() override;
- virtual void dispose() override;
- void SetNoSelection();
- 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;
-};
-
class SvxColorToolBoxControl;
class SVXCORE_DLLPUBLIC MenuOrToolMenuButton