summaryrefslogtreecommitdiff
path: root/svx/source/tbxctrls/extrusioncontrols.cxx
diff options
context:
space:
mode:
authorMaxim Monastirsky <momonasmon@gmail.com>2014-05-11 02:21:23 +0300
committerMaxim Monastirsky <momonasmon@gmail.com>2014-05-14 12:39:42 +0300
commit584b415924bba22db23a4258062e54973de0ed7c (patch)
tree6c1ee8bbbca7f20c61193710a99a6d4399d26d90 /svx/source/tbxctrls/extrusioncontrols.cxx
parent2a98a03904895b6dce7ec53042b0204dbb379d5b (diff)
Keep only one class for toolbox color controls
instead of 5 (mostly identical) classes. Also the following bugs were fixed: * All pickers now use split buttons. (fdo#45671) * Color palette now indicates the current color. (fdo#73891) (Previous changes related to that bug are reverted as part of this commit.) * Selecting a color from a float panel now updates the button. (fdo#77683) * For Font color/background color in Writer, the color that is shown on the button, is always the one that's actually used. (Can be a different color after hiding the toolbar.) * For Font color/background color in Writer, the button now indicates when we're in the format paintbrush mode. (Removed in 085e8a07e61ef2d3a82e11094d8773ab17cfdb3c for some reason.) Change-Id: Idb4829552240c52fb0882aca627c8177bbe2f839
Diffstat (limited to 'svx/source/tbxctrls/extrusioncontrols.cxx')
-rw-r--r--svx/source/tbxctrls/extrusioncontrols.cxx70
1 files changed, 0 insertions, 70 deletions
diff --git a/svx/source/tbxctrls/extrusioncontrols.cxx b/svx/source/tbxctrls/extrusioncontrols.cxx
index a4ac4362c87e..42dfaa55c440 100644
--- a/svx/source/tbxctrls/extrusioncontrols.cxx
+++ b/svx/source/tbxctrls/extrusioncontrols.cxx
@@ -36,7 +36,6 @@
#include <svx/svdtrans.hxx>
#include <svx/sdasitm.hxx>
#include <svx/dialmgr.hxx>
-#include "svx/extrusioncolorcontrol.hxx"
#include "coreservices.hxx"
#include "helpid.hrc"
@@ -956,75 +955,6 @@ Sequence< OUString > SAL_CALL ExtrusionSurfaceControl::getSupportedServiceNames(
return ExtrusionSurfaceControl_getSupportedServiceNames();
}
-
-
-SFX_IMPL_TOOLBOX_CONTROL( ExtrusionColorControl, SvxColorItem );
-
-ExtrusionColorControl::ExtrusionColorControl(
- sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx )
-: SfxToolBoxControl ( nSlotId, nId, rTbx ),
- mLastColor( COL_AUTO )
-{
- rTbx.SetItemBits( nId, TIB_DROPDOWNONLY | rTbx.GetItemBits( nId ) );
- mpBtnUpdater = new ToolboxButtonColorUpdater( nSlotId, nId, &GetToolBox() );
-}
-
-
-
-ExtrusionColorControl::~ExtrusionColorControl()
-{
- delete mpBtnUpdater;
-}
-
-
-
-SfxPopupWindowType ExtrusionColorControl::GetPopupWindowType() const
-{
- return SFX_POPUPWINDOW_ONCLICK;
-}
-
-
-
-SfxPopupWindow* ExtrusionColorControl::CreatePopupWindow()
-{
- SvxColorWindow_Impl* pColorWin = new SvxColorWindow_Impl(
- OUString( ".uno:Extrusion3DColor" ),
- SID_EXTRUSION_3D_COLOR,
- m_xFrame,
- SVX_RESSTR( RID_SVXSTR_EXTRUSION_COLOR ),
- &GetToolBox(),
- mLastColor );
- pColorWin->StartPopupMode( &GetToolBox(), FLOATWIN_POPUPMODE_GRABFOCUS|FLOATWIN_POPUPMODE_ALLOWTEAROFF );
- pColorWin->StartSelection();
- SetPopupWindow( pColorWin );
- return pColorWin;
-}
-
-
-
-void ExtrusionColorControl::StateChanged( sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState )
-{
- sal_uInt16 nId = GetId();
- ToolBox& rTbx = GetToolBox();
-
- if( nSID == SID_EXTRUSION_3D_COLOR )
- {
- const SvxColorItem* pItem = 0;
-
- if( SFX_ITEM_DONTCARE != eState )
- pItem = PTR_CAST( SvxColorItem, pState );
-
- if ( pItem )
- {
- mpBtnUpdater->Update( pItem->GetValue());
- mLastColor = pItem->GetValue();
- }
- }
-
- rTbx.EnableItem( nId, SFX_ITEM_DISABLED != eState );
- rTbx.SetItemState( nId, ( SFX_ITEM_DONTCARE == eState ) ? TRISTATE_INDET : TRISTATE_FALSE );
-}
-
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */