diff options
author | Winfried Donkers <osc@dci-electronics.nl> | 2012-03-08 12:56:57 +0100 |
---|---|---|
committer | Tor Lillqvist <tlillqvist@suse.com> | 2012-03-08 14:08:48 +0200 |
commit | df0644161bf9b8e476eb138726f38ba5f11b19b7 (patch) | |
tree | aeed05e976b518a36ff4ef4a3879321b3d6e49cf | |
parent | 6b84f0d0c408cbe8cac1509b5d9807ccc9634186 (diff) |
fdo#45682 split button for writer table line color
-rw-r--r-- | svx/source/tbxctrls/tbcontrl.cxx | 30 | ||||
-rw-r--r-- | sw/source/ui/app/swmodule.cxx | 2 |
2 files changed, 31 insertions, 1 deletions
diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx index 2a20d4a33660..b434e0062250 100644 --- a/svx/source/tbxctrls/tbcontrl.cxx +++ b/svx/source/tbxctrls/tbcontrl.cxx @@ -2261,6 +2261,11 @@ SvxColorExtToolBoxControl::SvxColorExtToolBoxControl( addStatusListener( OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:CharBackgroundExt" ))); nMode = TBX_UPDATER_MODE_CHAR_COLOR_NEW; break; + + case SID_FRAME_LINECOLOR: + addStatusListener( OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:FrameLineColor" ))); + nMode = 0; + break; } pBtnUpdater = new ::svx::ToolboxButtonColorUpdater( nSlotId, nId, &GetToolBox(), nMode ); @@ -2302,6 +2307,10 @@ SfxPopupWindow* SvxColorExtToolBoxControl::CreatePopupWindow() case SID_BACKGROUND_COLOR : pColorWin->SetText( SVX_RESSTR( RID_SVXSTR_BACKGROUND ) ); break; + + case SID_FRAME_LINECOLOR: + pColorWin->SetText( SVX_RESSTR( RID_SVXSTR_FRAME_COLOR ) ); + break; } pColorWin->StartPopupMode( &GetToolBox(), @@ -2338,6 +2347,22 @@ void SvxColorExtToolBoxControl::StateChanged( mLastColor = pItem->GetValue(); } break; + + case SID_FRAME_LINECOLOR : + ToolBox& rTbx = GetToolBox(); + rTbx.EnableItem( nSID, SFX_ITEM_DISABLED != eState ); + rTbx.SetItemState( nSID, ( SFX_ITEM_DONTCARE == eState ) ? STATE_DONTKNOW : STATE_NOCHECK ); + + if ( SFX_ITEM_DONTCARE != eState ) + { + pItem = PTR_CAST( SvxColorItem, pState ); + if ( pItem ) + { + pBtnUpdater->Update( pItem->GetValue()); + mLastColor = pItem->GetValue(); + } + } + break; } } } @@ -2373,6 +2398,11 @@ void SvxColorExtToolBoxControl::Select( sal_Bool ) aCommand = OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:CharBackgroundExt" )); aParamName = OUString( RTL_CONSTASCII_USTRINGPARAM( "CharBackgroundExt" )); break; + + case SID_FRAME_LINECOLOR : + aCommand = OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:FrameLineColor" )); + aParamName = OUString( RTL_CONSTASCII_USTRINGPARAM( "FrameLineColor" )); + break; } Sequence< PropertyValue > aArgs( 1 ); diff --git a/sw/source/ui/app/swmodule.cxx b/sw/source/ui/app/swmodule.cxx index ab747375c747..03bb5a2bb5e7 100644 --- a/sw/source/ui/app/swmodule.cxx +++ b/sw/source/ui/app/swmodule.cxx @@ -355,7 +355,7 @@ void SwDLL::RegisterControls() SvxColorExtToolBoxControl::RegisterControl( SID_BACKGROUND_COLOR, pMod ); SvxFrameToolBoxControl::RegisterControl(SID_ATTR_BORDER, pMod ); SvxFrameLineStyleToolBoxControl::RegisterControl(SID_FRAME_LINESTYLE, pMod ); - SvxFrameLineColorToolBoxControl::RegisterControl(SID_FRAME_LINECOLOR, pMod ); + SvxColorExtToolBoxControl::RegisterControl(SID_FRAME_LINECOLOR, pMod ); SvxColumnsToolBoxControl::RegisterControl(FN_INSERT_FRAME_INTERACT, pMod ); SvxColumnsToolBoxControl::RegisterControl(FN_INSERT_FRAME, pMod ); |