diff options
author | Maxim Monastirsky <momonasmon@gmail.com> | 2014-05-18 08:38:16 +0300 |
---|---|---|
committer | Maxim Monastirsky <momonasmon@gmail.com> | 2014-05-18 14:50:58 +0300 |
commit | e4ce7d286a5039e5a65ba994bd1b168679d4a7c3 (patch) | |
tree | 5dc981f557619c068214d7945e4d9d22c77f9070 /include | |
parent | 205801782d51861d9cee6fa342367af92bb1d845 (diff) |
fdo#46839 Convert line color picker to split button
Change-Id: I4987cc9ffba675009f2d2ae9f6b12ed4ee02fe13
Diffstat (limited to 'include')
-rw-r--r-- | include/svx/dialogs.hrc | 1 | ||||
-rw-r--r-- | include/svx/linectrl.hxx | 18 | ||||
-rw-r--r-- | include/svx/tbcontrl.hxx | 25 |
3 files changed, 26 insertions, 18 deletions
diff --git a/include/svx/dialogs.hrc b/include/svx/dialogs.hrc index 09a122df6ff9..f35a97f1ed96 100644 --- a/include/svx/dialogs.hrc +++ b/include/svx/dialogs.hrc @@ -260,6 +260,7 @@ #define RID_SVXSTR_MORE (RID_SVX_START + 198) #define RID_SVXSTR_CHARFONTNAME_NOTAVAILABLE (RID_SVX_START + 199) #define RID_SVXSTR_CHARFONTNAME (RID_SVX_START + 200) +#define RID_SVXSTR_LINECOLOR (RID_SVX_START + 201) // Strings for insert/overwrite mode #define RID_SVXSTR_INSERT_HELPTEXT (RID_SVX_START + 210) diff --git a/include/svx/linectrl.hxx b/include/svx/linectrl.hxx index 1419b653a814..4beb9bde5fce 100644 --- a/include/svx/linectrl.hxx +++ b/include/svx/linectrl.hxx @@ -30,7 +30,6 @@ class XLineStyleItem; class XLineDashItem; class SvxLineBox; class SvxMetricField; -class SvxColorBox; // SvxLineStyleController: @@ -74,23 +73,6 @@ public: }; -// SvxLineColorController: - - -class SVX_DLLPUBLIC SvxLineColorToolBoxControl : public SfxToolBoxControl -{ -public: - SFX_DECL_TOOLBOX_CONTROL(); - - SvxLineColorToolBoxControl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx ); - virtual ~SvxLineColorToolBoxControl(); - - virtual void StateChanged( sal_uInt16 nSID, SfxItemState eState, - const SfxPoolItem* pState ) SAL_OVERRIDE; - void Update( const SfxPoolItem* pState ); - virtual Window* CreateItemWindow( Window *pParent ) SAL_OVERRIDE; -}; - // class SvxLineEndWindow diff --git a/include/svx/tbcontrl.hxx b/include/svx/tbcontrl.hxx index e086b0ed274f..1694d13b4ab2 100644 --- a/include/svx/tbcontrl.hxx +++ b/include/svx/tbcontrl.hxx @@ -66,6 +66,11 @@ for 3D extrusion Execute-Id SID_EXTRUSION_3D_COLOR + SvxLineColorToolBoxControl + -------------------------- + Item type: XLineColorItem + Execute-Id SID_ATTR_LINE_COLOR + SvxPatternToolBoxControl ------------------------ Item type: SvxBrushItem @@ -230,6 +235,26 @@ public: }; +// class SvxLineColorToolBoxControl -------------------------------------- + +class SVX_DLLPUBLIC SvxLineColorToolBoxControl : public SfxToolBoxControl +{ + ::boost::scoped_ptr< ::svx::ToolboxButtonColorUpdater > pBtnUpdater; + Color mLastColor; + DECL_LINK( SelectedHdl, Color* ); +public: + SFX_DECL_TOOLBOX_CONTROL(); + SvxLineColorToolBoxControl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx ); + virtual ~SvxLineColorToolBoxControl(); + + virtual void StateChanged( sal_uInt16 nSID, SfxItemState eState, + const SfxPoolItem* pState ) SAL_OVERRIDE; + virtual SfxPopupWindowType GetPopupWindowType() const SAL_OVERRIDE; + virtual SfxPopupWindow* CreatePopupWindow() SAL_OVERRIDE; + virtual void Select(sal_uInt16 nSelectModifier) SAL_OVERRIDE; +}; + + // class SvxFrameToolBoxControl ------------------------------------------ class SVX_DLLPUBLIC SvxFrameToolBoxControl : public SfxToolBoxControl |