summaryrefslogtreecommitdiff
path: root/include/svx
diff options
context:
space:
mode:
authorNorbert Thiebaud <nthiebaud@gmail.com>2016-11-05 13:28:17 -0500
committerNorbert Thiebaud <nthiebaud@gmail.com>2016-11-05 13:42:40 -0500
commitdb380aab1063e8a5e40111c40ee9f7921aa82601 (patch)
treef5057dfb205a7d7409251742888dfeaf4bfbee61 /include/svx
parentee2144aafc5b4be14630f723be9a2bb674671412 (diff)
Reverts a commit series that cripple windows ci.
Revert "SvxShadowTabPage::Construct was removed" f9a2c1c12ecad833c63b894c89d6008907477eb5. Revert "replace OColorPopup with SvxColorWindow" f300754bb1c6a347c92bb9548be7a65237176542. Revert "drop AutoColorInvalid/SID_ATTR_AUTO_COLOR_INVALID" 347c2c334589b18cc62af292674bb3df1dd54b71. Revert "replace last ColorLB use with a listbox of colors" 604b35bf55351751a396e34dcca3f85e75860fd5. Revert "simplify, its just a vector of colors" 351a97ce6bda3075677b59fa1387ba3d1ab17d7a. Revert "replace user draw with an Image of the color" df738e0f8ceedb4bad756960be14d9c41adc165d. Revert "strip down to the used pieces" commit 08d6cd788f2584ce10ab8fa10665245e953c59d9. Revert "move now combined ColorLB to location of last user" a19b18ad7c9eb0197c10e6d7e451ec4542e4bc9e. Revert "fold ColorListBox and ColorLB together" a989a0b1f2b425f05b58d0e44ce2de31c842ed65. Revert "move ColorListBox beside sole thing that uses it" 760a198e697f3070a5e0e029e4eff7be220eb9cd. Revert "extensions leaks out details of Color Selector, patch it up" 8bea644d6117a49405e6426dc97214220fc869d1. Revert "inherit FillAttrLB from ListBox not ColorListBox" d2ce812f1d3a7a2aad89ca0bd11948b63d2db7b0. Revert "unify color selectors" 43bc3031483d172eccd72c3804e2d4fc2ef37de4.
Diffstat (limited to 'include/svx')
-rw-r--r--include/svx/PaletteManager.hxx11
-rw-r--r--include/svx/bmpmask.hxx15
-rw-r--r--include/svx/colorbox.hxx94
-rw-r--r--include/svx/colorwindow.hxx48
-rw-r--r--include/svx/dialogs.hrc7
-rw-r--r--include/svx/dlgctrl.hxx16
-rw-r--r--include/svx/float3d.hxx34
-rw-r--r--include/svx/fontwork.hxx9
-rw-r--r--include/svx/sidebar/AreaPropertyPanelBase.hxx6
-rw-r--r--include/svx/svxids.hrc6
-rw-r--r--include/svx/tbcontrl.hxx16
11 files changed, 85 insertions, 177 deletions
diff --git a/include/svx/PaletteManager.hxx b/include/svx/PaletteManager.hxx
index 2347f0f65ef5..c527b85f0f88 100644
--- a/include/svx/PaletteManager.hxx
+++ b/include/svx/PaletteManager.hxx
@@ -48,10 +48,11 @@ class SVX_DLLPUBLIC PaletteManager
XColorListRef pColorList;
Color mLastColor;
- std::deque<NamedColor> maRecentColors;
+ typedef std::pair<Color, OUString> color_and_name;
+ std::deque<color_and_name> maRecentColors;
std::vector<std::unique_ptr<Palette>> m_Palettes;
- std::function<void(const OUString&, const NamedColor&)> maColorSelectFunction;
+ std::function<void(const OUString&, const Color&)> maColorSelectFunction;
css::uno::Reference < css::uno::XComponentContext > m_context;
public:
PaletteManager();
@@ -73,14 +74,14 @@ public:
const Color& GetLastColor();
void SetLastColor(const Color& rLastColor);
- void AddRecentColor(const Color& rRecentColor, const OUString& rColorName, bool bFront = true);
+ void AddRecentColor(const Color& rRecentColor, const OUString& rColorName);
void SetBtnUpdater(svx::ToolboxButtonColorUpdater* pBtnUpdater);
void PopupColorPicker(const OUString& aCommand);
- void SetColorSelectFunction(const std::function<void(const OUString&, const NamedColor&)>& aColorSelectFunction);
+ void SetColorSelectFunction(const std::function<void(const OUString&, const Color&)>& aColorSelectFunction);
- static void DispatchColorCommand(const OUString& aCommand, const NamedColor& rColor);
+ static void DispatchColorCommand(const OUString& aCommand, const Color& rColor);
};
#endif // INCLUDED_SVX_PALETTEMANAGER_HXX
diff --git a/include/svx/bmpmask.hxx b/include/svx/bmpmask.hxx
index 6705b1c5fe5b..1f66ee5ef7b5 100644
--- a/include/svx/bmpmask.hxx
+++ b/include/svx/bmpmask.hxx
@@ -75,7 +75,6 @@ class SAL_WARN_UNUSED SVX_DLLPUBLIC SvxBmpMaskChildWindow : public SfxChildWindo
class MaskData;
class MaskSet;
class ColorWindow;
-class SvxColorListBox;
class SAL_WARN_UNUSED SVX_DLLPUBLIC SvxBmpMask : public SfxDockingWindow
{
@@ -89,27 +88,28 @@ class SAL_WARN_UNUSED SVX_DLLPUBLIC SvxBmpMask : public SfxDockingWindow
VclPtr<CheckBox> m_pCbx1;
VclPtr<MaskSet> m_pQSet1;
VclPtr<MetricField> m_pSp1;
- VclPtr<SvxColorListBox> m_pLbColor1;
+ VclPtr<ColorLB> m_pLbColor1;
VclPtr<CheckBox> m_pCbx2;
VclPtr<MaskSet> m_pQSet2;
VclPtr<MetricField> m_pSp2;
- VclPtr<SvxColorListBox> m_pLbColor2;
+ VclPtr<ColorLB> m_pLbColor2;
VclPtr<CheckBox> m_pCbx3;
VclPtr<MaskSet> m_pQSet3;
VclPtr<MetricField> m_pSp3;
- VclPtr<SvxColorListBox> m_pLbColor3;
+ VclPtr<ColorLB> m_pLbColor3;
VclPtr<CheckBox> m_pCbx4;
VclPtr<MaskSet> m_pQSet4;
VclPtr<MetricField> m_pSp4;
- VclPtr<SvxColorListBox> m_pLbColor4;
+ VclPtr<ColorLB> m_pLbColor4;
MaskData* pData;
VclPtr<CheckBox> m_pCbxTrans;
- VclPtr<SvxColorListBox> m_pLbColorTrans;
+ VclPtr<ColorLB> m_pLbColorTrans;
+ XColorListRef pColLst;
Color aPipetteColor;
SvxBmpMaskSelectItem aSelItem;
@@ -140,6 +140,9 @@ public:
void SetColor( const Color& rColor );
void PipetteClicked();
+ bool NeedsColorList() const;
+ void SetColorList( const XColorListRef &pColorList );
+
void SetExecState( bool bEnable );
Graphic Mask( const Graphic& rGraphic );
diff --git a/include/svx/colorbox.hxx b/include/svx/colorbox.hxx
deleted file mode 100644
index 4b7f2513a984..000000000000
--- a/include/svx/colorbox.hxx
+++ /dev/null
@@ -1,94 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- */
-
-#ifndef INCLUDED_SVX_COLORBOX_HXX
-#define INCLUDED_SVX_COLORBOX_HXX
-
-#include <vcl/menubtn.hxx>
-#include <svx/colorwindow.hxx>
-#include <sfx2/controlwrapper.hxx>
-
-class SvxColorListBox;
-
-class SvxListBoxColorWrapper
-{
-public:
- SvxListBoxColorWrapper(SvxColorListBox* pControl);
- void operator()(const OUString& rCommand, const NamedColor& rColor);
- void dispose();
-private:
- VclPtr<SvxColorListBox> mxControl;
-};
-
-class SVX_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;
- bool m_bShowNoneButton;
- PaletteManager m_aPaletteManager;
- BorderColorStatus m_aBorderColorStatus;
-
- DECL_LINK(MenuActivateHdl, MenuButton *, void);
- void Selected(const NamedColor& rNamedColor);
- void createColorWindow();
- void LockWidthRequest();
- VclPtr<SvxColorWindow> 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;
- }
-
- void SetSlotId(sal_uInt16 nSlotId, bool bShowNoneButton = false);
-
- NamedColor GetSelectEntry() const;
- Color GetSelectEntryColor() const;
-
- void SelectEntry(const NamedColor& rColor);
- void SelectEntry(const Color& rColor);
-
- void SetNoSelection() { getColorWindow()->SetNoSelection(); }
- bool IsNoSelection() const { return getColorWindow()->IsNoSelection(); }
-
- void SetAutoDisplayColor(const Color &rColor) { m_aAutoDisplayColor = rColor; }
- void ShowPreview(const NamedColor &rColor);
-};
-
-/** A wrapper for SvxColorListBox. */
-class SVX_DLLPUBLIC SvxColorListBoxWrapper
- : public sfx::SingleControlWrapper<SvxColorListBox, Color>
-{
- /* Note: cannot use 'const Color&' as template argument, because the
- SvxColorListBox returns the color by value and not by reference,
- therefore GetControlValue() must return a temporary object too. */
-public:
- explicit SvxColorListBoxWrapper(SvxColorListBox& rListBox);
-
- virtual ~SvxColorListBoxWrapper() override;
-
- virtual bool IsControlDontKnow() const override;
- virtual void SetControlDontKnow( bool bSet ) override;
-
- virtual Color GetControlValue() const override;
- virtual void SetControlValue( Color aColor ) override;
-};
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/colorwindow.hxx b/include/svx/colorwindow.hxx
index 1e417130effb..8b185d952de3 100644
--- a/include/svx/colorwindow.hxx
+++ b/include/svx/colorwindow.hxx
@@ -31,22 +31,8 @@
#include <functional>
-class SVX_DLLPUBLIC BorderColorStatus
-{
- Color maColor;
- Color maTLBRColor;
- Color maBLTRColor;
-public:
- BorderColorStatus();
- ~BorderColorStatus();
- bool statusChanged( const css::frame::FeatureStateEvent& rEvent );
- Color GetColor();
-};
-
+class BorderColorStatus;
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
{
@@ -57,49 +43,37 @@ private:
VclPtr<ListBox> mpPaletteListBox;
VclPtr<PushButton> mpButtonAutoColor;
- VclPtr<PushButton> mpButtonNoneColor;
VclPtr<PushButton> mpButtonPicker;
VclPtr<FixedLine> mpAutomaticSeparator;
OUString maCommand;
- Link<const NamedColor&, void> maSelectedLink;
+ Link<const Color&, void> maSelectedLink;
PaletteManager& mrPaletteManager;
BorderColorStatus& mrBorderColorStatus;
- ColorSelectFunction maColorSelectFunction;
+ std::function<void(const OUString&, const Color&)> 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,
- ColorSelectFunction const& rColorSelectFunction);
+ 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);
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 NamedColor&, void>& rLink ) { maSelectedLink = rLink; }
+ void SetSelectedHdl( const Link<const Color&, void>& rLink ) { maSelectedLink = rLink; }
};
#endif
diff --git a/include/svx/dialogs.hrc b/include/svx/dialogs.hrc
index 589b6a8a7413..3ccea55d2a4a 100644
--- a/include/svx/dialogs.hrc
+++ b/include/svx/dialogs.hrc
@@ -31,10 +31,8 @@
// some strings also used in CUI
#define RID_SVXERRCTX (RID_SVX_START + 351)
#define RID_SVXSTR_COLOR (RID_SVX_START + 179)
-#define RID_SVXSTR_NOFILL (RID_SVX_START + 190)
+#define RID_SVXSTR_TRANSPARENT (RID_SVX_START + 190)
#define RID_SVXSTR_AUTOMATIC (RID_SVX_START + 841)
-#define RID_SVXSTR_BY_AUTHOR (RID_SVX_START + 842)
-#define RID_SVXSTR_TRANSPARENT (RID_SVX_START + 843)
#define RID_SVXSTR_INVISIBLE (RID_SVX_START + 178)
#define RID_SVXSTR_NONE (RID_SVX_START + 183)
#define RID_SVXSTR_SOLID (RID_SVX_START + 160)
@@ -149,6 +147,9 @@
#define RID_SVXIMAGE_COLORDLG (RID_SVX_START + 214)
#define RID_SVXFLOAT3D_FAVORITE (RID_SVX_START + 73)
+#define RID_SVXFLOAT3D_FIX_X (RID_SVX_START + 74)
+#define RID_SVXFLOAT3D_FIX_Y (RID_SVX_START + 75)
+#define RID_SVXFLOAT3D_FIX_Z (RID_SVX_START + 76)
#define RID_SVXFLOAT3D_FIX_R (RID_SVX_START + 77)
#define RID_SVXFLOAT3D_FIX_G (RID_SVX_START + 78)
#define RID_SVXFLOAT3D_FIX_B (RID_SVX_START + 84)
diff --git a/include/svx/dlgctrl.hxx b/include/svx/dlgctrl.hxx
index 39cc688b4ded..fbf9369eb608 100644
--- a/include/svx/dlgctrl.hxx
+++ b/include/svx/dlgctrl.hxx
@@ -207,6 +207,20 @@ public:
/************************************************************************/
+class SAL_WARN_UNUSED SVX_DLLPUBLIC ColorLB : public ColorListBox
+{
+
+public:
+ ColorLB( vcl::Window* pParent, WinBits aWB ) : ColorListBox( pParent, aWB ) {}
+
+ void Fill( const XColorListRef &pTab );
+
+ void Append( const XColorEntry& rEntry );
+ void Modify( const XColorEntry& rEntry, sal_Int32 nPos );
+};
+
+/************************************************************************/
+
class SAL_WARN_UNUSED SVX_DLLPUBLIC HatchingLB : public ListBox
{
public:
@@ -231,7 +245,7 @@ public:
/************************************************************************/
-class SAL_WARN_UNUSED SVX_DLLPUBLIC FillAttrLB : public ListBox
+class SAL_WARN_UNUSED SVX_DLLPUBLIC FillAttrLB : public ColorListBox
{
private:
BitmapEx maBitmapEx;
diff --git a/include/svx/float3d.hxx b/include/svx/float3d.hxx
index 396d104a9f53..c9a9f957701c 100644
--- a/include/svx/float3d.hxx
+++ b/include/svx/float3d.hxx
@@ -41,13 +41,14 @@ enum class ViewType3D
Material
};
+class SdrModel;
class FmFormModel;
class VirtualDevice;
class E3dView;
class SdrPageView;
class Svx3DCtrlItem;
class SvxConvertTo3DItem;
-class SvxColorListBox;
+
struct Svx3DWinImpl;
@@ -112,16 +113,16 @@ private:
VclPtr<PushButton> m_pBtnLight6;
VclPtr<PushButton> m_pBtnLight7;
VclPtr<PushButton> m_pBtnLight8;
- VclPtr<SvxColorListBox> m_pLbLight1;
- VclPtr<SvxColorListBox> m_pLbLight2;
- VclPtr<SvxColorListBox> m_pLbLight3;
- VclPtr<SvxColorListBox> m_pLbLight4;
- VclPtr<SvxColorListBox> m_pLbLight5;
- VclPtr<SvxColorListBox> m_pLbLight6;
- VclPtr<SvxColorListBox> m_pLbLight7;
- VclPtr<SvxColorListBox> m_pLbLight8;
+ VclPtr<ColorLB> m_pLbLight1;
+ VclPtr<ColorLB> m_pLbLight2;
+ VclPtr<ColorLB> m_pLbLight3;
+ VclPtr<ColorLB> m_pLbLight4;
+ VclPtr<ColorLB> m_pLbLight5;
+ VclPtr<ColorLB> m_pLbLight6;
+ VclPtr<ColorLB> m_pLbLight7;
+ VclPtr<ColorLB> m_pLbLight8;
VclPtr<PushButton> m_pBtnLightColor;
- VclPtr<SvxColorListBox> m_pLbAmbientlight; // ListBox
+ VclPtr<ColorLB> m_pLbAmbientlight; // ListBox
VclPtr<PushButton> m_pBtnAmbientColor; // color button
// Textures
@@ -143,13 +144,13 @@ private:
// material editor
VclPtr<VclContainer> m_pFLMaterial;
VclPtr<ListBox> m_pLbMatFavorites;
- VclPtr<SvxColorListBox> m_pLbMatColor;
+ VclPtr<ColorLB> m_pLbMatColor;
VclPtr<PushButton> m_pBtnMatColor;
- VclPtr<SvxColorListBox> m_pLbMatEmission;
+ VclPtr<ColorLB> m_pLbMatEmission;
VclPtr<PushButton> m_pBtnEmissionColor;
VclPtr<VclContainer> m_pFLMatSpecular;
- VclPtr<SvxColorListBox> m_pLbMatSpecular;
+ VclPtr<ColorLB> m_pLbMatSpecular;
VclPtr<PushButton> m_pBtnSpecularColor;
VclPtr<MetricField> m_pMtrMatSpecularIntensity;
@@ -190,7 +191,6 @@ private:
DECL_LINK( ClickHdl, Button*, void );
DECL_LINK( ClickColorHdl, Button*, void );
DECL_LINK( SelectHdl, ListBox&, void );
- DECL_LINK( SelectColorHdl, SvxColorListBox&, void );
DECL_LINK( ModifyHdl, Edit&, void );
void ClickLight(PushButton &rBtn);
@@ -199,9 +199,9 @@ private:
SVX_DLLPRIVATE void Construct();
SVX_DLLPRIVATE void Reset();
- SVX_DLLPRIVATE static void LBSelectColor( SvxColorListBox* pLb, const Color& rColor );
+ SVX_DLLPRIVATE static bool LBSelectColor( ColorLB* pLb, const Color& rColor );
SVX_DLLPRIVATE sal_uInt16 GetLightSource( const PushButton* pBtn );
- SVX_DLLPRIVATE SvxColorListBox* GetLbByButton( const PushButton* pBtn = nullptr );
+ SVX_DLLPRIVATE ColorLB* GetLbByButton( const PushButton* pBtn = nullptr );
SVX_DLLPRIVATE bool GetUILightState( const PushButton& rBtn ) const;
SVX_DLLPRIVATE void SetUILightState( PushButton& aBtn, bool bState );
@@ -215,7 +215,7 @@ public:
virtual ~Svx3DWin() override;
virtual void dispose() override;
- void InitColorLB();
+ void InitColorLB( const SdrModel* pDoc );
bool IsUpdateMode() const { return bUpdate; }
void Update( SfxItemSet& rSet );
diff --git a/include/svx/fontwork.hxx b/include/svx/fontwork.hxx
index 83d1f3c11ec3..5fe6ad0f7eb3 100644
--- a/include/svx/fontwork.hxx
+++ b/include/svx/fontwork.hxx
@@ -35,7 +35,6 @@
class SdrView;
class SdrPageView;
class SdrObject;
-class SvxColorListBox;
class XFormTextAdjustItem;
class XFormTextDistanceItem;
@@ -108,7 +107,7 @@ class SAL_WARN_UNUSED SVX_DLLPUBLIC SvxFontWorkDialog : public SfxDockingWindow
VclPtr<FixedImage> m_pFbShadowY;
VclPtr<MetricField> m_pMtrFldShadowY;
- VclPtr<SvxColorListBox> m_pShadowColorLB;
+ VclPtr<ColorLB> m_pShadowColorLB;
SfxBindings& rBindings;
Idle aInputIdle;
@@ -139,6 +138,8 @@ class SAL_WARN_UNUSED SVX_DLLPUBLIC SvxFontWorkDialog : public SfxDockingWindow
long nSaveShadowAngle;
long nSaveShadowSize;
+ XColorListRef pColorList;
+
friend class SvxFontWorkChildWindow;
friend class SvxFontWorkControllerItem;
@@ -149,7 +150,7 @@ class SAL_WARN_UNUSED SVX_DLLPUBLIC SvxFontWorkDialog : public SfxDockingWindow
DECL_LINK( ModifyInputHdl_Impl, Edit&, void );
DECL_LINK( InputTimoutHdl_Impl, Idle *, void );
- DECL_LINK( ColorSelectHdl_Impl, SvxColorListBox&, void );
+ DECL_LINK( ColorSelectHdl_Impl, ListBox&, void );
void SetStyle_Impl(const XFormTextStyleItem*);
void SetAdjust_Impl(const XFormTextAdjustItem*);
@@ -174,6 +175,8 @@ class SAL_WARN_UNUSED SVX_DLLPUBLIC SvxFontWorkDialog : public SfxDockingWindow
vcl::Window* pParent);
virtual ~SvxFontWorkDialog() override;
virtual void dispose() override;
+
+ void SetColorList(const XColorListRef &pTable);
};
#endif // INCLUDED_SVX_FONTWORK_HXX
diff --git a/include/svx/sidebar/AreaPropertyPanelBase.hxx b/include/svx/sidebar/AreaPropertyPanelBase.hxx
index 372d216f68ba..9d7e62199f3e 100644
--- a/include/svx/sidebar/AreaPropertyPanelBase.hxx
+++ b/include/svx/sidebar/AreaPropertyPanelBase.hxx
@@ -25,7 +25,6 @@
#include <sfx2/sidebar/ControllerItem.hxx>
#include <sfx2/sidebar/SidebarController.hxx>
#include <sfx2/sidebar/SidebarToolBox.hxx>
-#include <svx/colorbox.hxx>
#include <svx/xgrad.hxx>
#include <svx/itemwin.hxx>
#include <svx/xfillit0.hxx>
@@ -125,8 +124,8 @@ protected:
VclPtr<FixedText> mpColorTextFT;
VclPtr<SvxFillTypeBox> mpLbFillType;
VclPtr<SvxFillAttrBox> mpLbFillAttr;
- VclPtr<SvxColorListBox> mpLbFillGradFrom;
- VclPtr<SvxColorListBox> mpLbFillGradTo;
+ VclPtr<ColorLB> mpLbFillGradFrom;
+ VclPtr<ColorLB> mpLbFillGradTo;
VclPtr<sfx2::sidebar::SidebarToolBox> mpToolBoxColor; // for new color picker
VclPtr<FixedText> mpTrspTextFT;
VclPtr<ListBox> mpLBTransType;
@@ -157,7 +156,6 @@ protected:
DECL_LINK(SelectFillTypeHdl, ListBox&, void );
DECL_LINK(SelectFillAttrHdl, ListBox&, void );
- DECL_LINK(SelectFillColorHdl, SvxColorListBox&, void);
DECL_LINK(ChangeGradientAngle, Edit&, void);
DECL_LINK(ChangeTrgrTypeHdl_Impl, ListBox&, void);
DECL_LINK(ModifyTransparentHdl_Impl, Edit&, void);
diff --git a/include/svx/svxids.hrc b/include/svx/svxids.hrc
index 8a7f7c5fc4c5..f2a301c63797 100644
--- a/include/svx/svxids.hrc
+++ b/include/svx/svxids.hrc
@@ -750,7 +750,7 @@
#define SID_READONLY_MODE ( SID_SVX_START + 930 )
#define SID_ATTR_ALIGN_HYPHENATION ( SID_SVX_START + 931 )
#define SID_ATTR_NUMBERFORMAT_SOURCE ( SID_SVX_START + 932 )
-
+#define SID_ATTR_AUTO_COLOR_INVALID ( SID_SVX_START + 933 )
#define SID_RULER_BORDER_DISTANCE ( SID_SVX_START + 935 )
#define SID_INSERT_DATEFIELD ( SID_SVX_START + 936 )
#define SID_INSERT_TIMEFIELD ( SID_SVX_START + 937 )
@@ -999,11 +999,9 @@
#define SID_LINE_ARROW_START ( SID_SVX_START + 1165 )
#define SID_LINE_ARROW_END ( SID_SVX_START + 1166 )
#define SID_DRAW_MEASURELINE ( SID_SVX_START + 1167 )
-#define SID_AUTHOR_COLOR ( SID_SVX_START + 1168 )
-#define SID_BMPMASK_COLOR ( SID_SVX_START + 1169 )
// IMPORTANT NOTE: adjust SID_SVX_FIRSTFREE, when adding new slot id
-#define SID_SVX_FIRSTFREE ( SID_BMPMASK_COLOR + 1 )
+#define SID_SVX_FIRSTFREE ( SID_DRAW_MEASURELINE + 1 )
// Overflow check for slot IDs
diff --git a/include/svx/tbcontrl.hxx b/include/svx/tbcontrl.hxx
index bf808381c6ac..dfa129a7c00b 100644
--- a/include/svx/tbcontrl.hxx
+++ b/include/svx/tbcontrl.hxx
@@ -136,7 +136,6 @@
#include <svx/strarray.hxx>
#include <svx/svxdllapi.h>
#include <com/sun/star/awt/FontDescriptor.hpp>
-#include <svx/colorwindow.hxx>
#include <svx/PaletteManager.hxx>
#include <memory>
@@ -204,8 +203,19 @@ friend class SfxStyleControllerItem_Impl;
SVX_DLLPRIVATE SfxStyleFamily GetActFamily();
};
-typedef std::function<void(const OUString&, const NamedColor&)> ColorSelectFunction;
+class BorderColorStatus
+{
+ Color maColor;
+ Color maTLBRColor;
+ Color maBLTRColor;
+public:
+ BorderColorStatus();
+ ~BorderColorStatus();
+ bool statusChanged( const css::frame::FeatureStateEvent& rEvent );
+ Color GetColor();
+};
+typedef std::function<void(const OUString&, const Color&)> ColorSelectFunction;
class SVX_DLLPUBLIC SvxColorToolBoxControl : public SfxToolBoxControl
{
std::unique_ptr<svx::ToolboxButtonColorUpdater> m_xBtnUpdater;
@@ -213,7 +223,7 @@ class SVX_DLLPUBLIC SvxColorToolBoxControl : public SfxToolBoxControl
BorderColorStatus m_aBorderColorStatus;
bool m_bSplitButton;
ColorSelectFunction m_aColorSelectFunction;
- DECL_LINK(SelectedHdl, const NamedColor&, void);
+ DECL_LINK(SelectedHdl, const Color&, void);
public:
SFX_DECL_TOOLBOX_CONTROL();
SvxColorToolBoxControl(sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rToolBox);