summaryrefslogtreecommitdiff
path: root/svx/source/dialog/_contdlg.cxx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2015-04-22 09:37:11 +0100
committerCaolán McNamara <caolanm@redhat.com>2015-04-22 10:00:53 +0100
commit95c04e218782cb198f7851a1d9536058f98cff2a (patch)
treef4b1b5475ab7e1af6c921070d79a55f8f47a0811 /svx/source/dialog/_contdlg.cxx
parentdd7778a76915685d9b334e1f0718f556f6309687 (diff)
SfxControllerItems shouldn't be SAL_WARN_UNUSED
unwind some removals and some other cleanup Change-Id: I81a734ed07a05a5922c31003928c493c2df1652f
Diffstat (limited to 'svx/source/dialog/_contdlg.cxx')
-rw-r--r--svx/source/dialog/_contdlg.cxx25
1 files changed, 25 insertions, 0 deletions
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();