From 95c04e218782cb198f7851a1d9536058f98cff2a Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Wed, 22 Apr 2015 09:37:11 +0100 Subject: SfxControllerItems shouldn't be SAL_WARN_UNUSED unwind some removals and some other cleanup Change-Id: I81a734ed07a05a5922c31003928c493c2df1652f --- svx/source/dialog/_contdlg.cxx | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'svx/source/dialog/_contdlg.cxx') diff --git a/svx/source/dialog/_contdlg.cxx b/svx/source/dialog/_contdlg.cxx index 157c88d6ad40..c94ed569173f 100644 --- a/svx/source/dialog/_contdlg.cxx +++ b/svx/source/dialog/_contdlg.cxx @@ -46,6 +46,23 @@ SFX_IMPL_FLOATINGWINDOW_WITHID( SvxContourDlgChildWindow, SID_CONTOUR_DLG ); +SvxContourDlgItem::SvxContourDlgItem( sal_uInt16 _nId, SvxSuperContourDlg& rContourDlg, SfxBindings& rBindings ) : + SfxControllerItem ( _nId, rBindings ), + rDlg ( rContourDlg ) +{ +} + +void SvxContourDlgItem::StateChanged( sal_uInt16 nSID, SfxItemState /*eState*/, const SfxPoolItem* pItem ) +{ + if ( pItem && ( SID_CONTOUR_EXEC == nSID ) ) + { + const SfxBoolItem* pStateItem = PTR_CAST( SfxBoolItem, pItem ); + assert(pStateItem); //SfxBoolItem expected + if (pStateItem) + rDlg.SetExecState(!pStateItem->GetValue()); + } +} + SvxContourDlgChildWindow::SvxContourDlgChildWindow( vcl::Window* _pParent, sal_uInt16 nId, SfxBindings* pBindings, SfxChildWinInfo* pInfo ) : SfxChildWindow( _pParent, nId ) @@ -186,6 +203,7 @@ SvxSuperContourDlg::SvxSuperContourDlg(SfxBindings *_pBindings, SfxChildWindow * SvxContourDlg ( _pBindings, pCW, _pParent ), pUpdateEditingObject( NULL ), pCheckObj ( NULL ), + aContourItem ( SID_CONTOUR_EXEC, *this, *_pBindings ), nGrfChanged ( 0UL ), bExecState ( false ), bUpdateGraphicLinked( false ), @@ -291,6 +309,13 @@ bool SvxSuperContourDlg::Close() return( bRet ? SfxFloatingWindow::Close() : sal_False ); } +// Enabled or disabled all Controls + +void SvxSuperContourDlg::SetExecState( bool bEnable ) +{ + bExecState = bEnable; +} + void SvxSuperContourDlg::SetGraphic( const Graphic& rGraphic ) { aUndoGraphic = aRedoGraphic = Graphic(); -- cgit v1.2.3