diff options
-rw-r--r-- | include/svx/bmpmask.hxx | 28 | ||||
-rw-r--r-- | include/svx/checklbx.hxx | 2 | ||||
-rw-r--r-- | include/svx/contdlg.hxx | 4 | ||||
-rw-r--r-- | include/svx/float3d.hxx | 4 | ||||
-rw-r--r-- | include/svx/fmdmod.hxx | 2 | ||||
-rw-r--r-- | include/svx/fmdpage.hxx | 2 | ||||
-rw-r--r-- | include/svx/fmmodel.hxx | 2 | ||||
-rw-r--r-- | include/svx/fmpage.hxx | 2 | ||||
-rw-r--r-- | include/svx/fmshell.hxx | 2 | ||||
-rw-r--r-- | include/svx/fmview.hxx | 2 | ||||
-rw-r--r-- | include/svx/fontwork.hxx | 2 | ||||
-rw-r--r-- | svx/source/dialog/_bmpmask.cxx | 38 | ||||
-rw-r--r-- | svx/source/dialog/_contdlg.cxx | 25 | ||||
-rw-r--r-- | svx/source/dialog/contimp.hxx | 18 |
14 files changed, 113 insertions, 20 deletions
diff --git a/include/svx/bmpmask.hxx b/include/svx/bmpmask.hxx index 28736c92b88b..5efdd861b2ba 100644 --- a/include/svx/bmpmask.hxx +++ b/include/svx/bmpmask.hxx @@ -31,6 +31,27 @@ /************************************************************************* |* +|* class SvxBmpMaskSelectItem +|* +\************************************************************************/ +class SvxBmpMask; + +class SvxBmpMaskSelectItem : public SfxControllerItem +{ +private: + SvxBmpMask &rBmpMask; + +protected: + virtual void StateChanged( sal_uInt16 nSID, SfxItemState eState, + const SfxPoolItem* pState ) SAL_OVERRIDE; + +public: + SvxBmpMaskSelectItem( sal_uInt16 nId, SvxBmpMask& rMask, + SfxBindings& rBindings ); +}; + +/************************************************************************* +|* |* Derivative from SfxChildWindow as 'container' for Float |* \************************************************************************/ @@ -90,11 +111,10 @@ class SVX_DLLPUBLIC SAL_WARN_UNUSED SvxBmpMask : public SfxDockingWindow XColorListRef pColLst; Color aPipetteColor; + SvxBmpMaskSelectItem aSelItem; virtual bool Close() SAL_OVERRIDE; -#ifdef BMPMASK_PRIVATE - sal_uInt16 InitColorArrays( Color* pSrcCols, Color* pDstCols, sal_uIntPtr* pTols ); @@ -111,8 +131,6 @@ class SVX_DLLPUBLIC SAL_WARN_UNUSED SvxBmpMask : public SfxDockingWindow GDIMetaFile ImpReplaceTransparency( const GDIMetaFile& rMtf, const Color& rColor ); -#endif // BMPMASK_PRIVATE - public: SvxBmpMask(SfxBindings *pBindinx, SfxChildWindow *pCW, vcl::Window* pParent); @@ -124,6 +142,8 @@ public: bool NeedsColorList() const; void SetColorList( const XColorListRef &pColorList ); + void SetExecState( bool bEnable ); + Graphic Mask( const Graphic& rGraphic ); bool IsEyedropping() const; diff --git a/include/svx/checklbx.hxx b/include/svx/checklbx.hxx index baeac1bae6e8..dd15c8a66c07 100644 --- a/include/svx/checklbx.hxx +++ b/include/svx/checklbx.hxx @@ -26,7 +26,7 @@ // class SvxCheckListBox ------------------------------------------------- -class SVX_DLLPUBLIC SAL_WARN_UNUSED SvxCheckListBox : public SvTreeListBox +class SVX_DLLPUBLIC SvxCheckListBox : public SvTreeListBox { using Window::GetText; diff --git a/include/svx/contdlg.hxx b/include/svx/contdlg.hxx index 94820eb2c442..57080eb7da0f 100644 --- a/include/svx/contdlg.hxx +++ b/include/svx/contdlg.hxx @@ -41,9 +41,6 @@ public: SFX_DECL_CHILDWINDOW_WITHID( SvxContourDlgChildWindow ); }; -#ifndef _REDUCED_ContourDlg_HXX_ -#define _REDUCED INCLUDED_SVX_CONTDLG_HXX - class SvxSuperContourDlg; class SVX_DLLPUBLIC SAL_WARN_UNUSED SvxContourDlg : public SfxFloatingWindow @@ -78,7 +75,6 @@ public: const sal_uIntPtr nFlags = 0L ); }; -#endif // _REDUCED INCLUDED_SVX_CONTDLG_HXX #endif // INCLUDED_SVX_CONTDLG_HXX /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/svx/float3d.hxx b/include/svx/float3d.hxx index e05f9d590c84..f538f7d53aed 100644 --- a/include/svx/float3d.hxx +++ b/include/svx/float3d.hxx @@ -237,7 +237,7 @@ public: |* \************************************************************************/ -class SAL_WARN_UNUSED Svx3DCtrlItem : public SfxControllerItem +class Svx3DCtrlItem : public SfxControllerItem { protected: virtual void StateChanged( sal_uInt16 nSId, SfxItemState eState, @@ -254,7 +254,7 @@ class SAL_WARN_UNUSED Svx3DCtrlItem : public SfxControllerItem |* \************************************************************************/ -class SAL_WARN_UNUSED SvxConvertTo3DItem : public SfxControllerItem +class SvxConvertTo3DItem : public SfxControllerItem { bool bState; diff --git a/include/svx/fmdmod.hxx b/include/svx/fmdmod.hxx index 86acf2258480..8a5a1676a646 100644 --- a/include/svx/fmdmod.hxx +++ b/include/svx/fmdmod.hxx @@ -22,7 +22,7 @@ #include <svx/unomod.hxx> #include <svx/svxdllapi.h> -class SVX_DLLPUBLIC SAL_WARN_UNUSED SvxFmMSFactory : public SvxUnoDrawMSFactory +class SVX_DLLPUBLIC SvxFmMSFactory : public SvxUnoDrawMSFactory { public: diff --git a/include/svx/fmdpage.hxx b/include/svx/fmdpage.hxx index d40d6f4e7b7f..ba7e8ef5a759 100644 --- a/include/svx/fmdpage.hxx +++ b/include/svx/fmdpage.hxx @@ -27,7 +27,7 @@ // SvxFmDrawPage -class SVX_DLLPUBLIC SAL_WARN_UNUSED SvxFmDrawPage :public SvxDrawPage +class SVX_DLLPUBLIC SvxFmDrawPage :public SvxDrawPage ,public ::com::sun::star::form::XFormsSupplier2 { protected: diff --git a/include/svx/fmmodel.hxx b/include/svx/fmmodel.hxx index a78bf15e4065..03f65dfe399b 100644 --- a/include/svx/fmmodel.hxx +++ b/include/svx/fmmodel.hxx @@ -32,7 +32,7 @@ class SbxArray; class SbxValue; struct FmFormModelImplData; -class SVX_DLLPUBLIC SAL_WARN_UNUSED FmFormModel : +class SVX_DLLPUBLIC FmFormModel : public SdrModel { private: diff --git a/include/svx/fmpage.hxx b/include/svx/fmpage.hxx index ccadf5b3332f..74d3ec11d5c6 100644 --- a/include/svx/fmpage.hxx +++ b/include/svx/fmpage.hxx @@ -38,7 +38,7 @@ namespace com { namespace sun { namespace star { class SdrView; class HelpEvent; -class SVX_DLLPUBLIC SAL_WARN_UNUSED FmFormPage : public SdrPage +class SVX_DLLPUBLIC FmFormPage : public SdrPage { FmFormPage& operator=(const FmFormPage&) SAL_DELETED_FUNCTION; diff --git a/include/svx/fmshell.hxx b/include/svx/fmshell.hxx index 713ff8085b7a..16dae1f78bf2 100644 --- a/include/svx/fmshell.hxx +++ b/include/svx/fmshell.hxx @@ -66,7 +66,7 @@ public: bool GetDesignMode() const { return m_bDesignMode; } }; -class SVX_DLLPUBLIC SAL_WARN_UNUSED FmFormShell : public SfxShell +class SVX_DLLPUBLIC FmFormShell : public SfxShell { friend class FmFormView; friend class FmXFormShell; diff --git a/include/svx/fmview.hxx b/include/svx/fmview.hxx index a633b0840b2e..76b88ab457c3 100644 --- a/include/svx/fmview.hxx +++ b/include/svx/fmview.hxx @@ -53,7 +53,7 @@ namespace com { namespace sun { namespace star { namespace form { } } } } } -class SVX_DLLPUBLIC SAL_WARN_UNUSED FmFormView : public E3dView +class SVX_DLLPUBLIC FmFormView : public E3dView { FmXFormView* pImpl; FmFormShell* pFormShell; diff --git a/include/svx/fontwork.hxx b/include/svx/fontwork.hxx index 988c3ab2ec29..6760ace56b0e 100644 --- a/include/svx/fontwork.hxx +++ b/include/svx/fontwork.hxx @@ -55,7 +55,7 @@ class XFormTextShadowYValItem; class SvxFontWorkDialog; -class SAL_WARN_UNUSED SvxFontWorkControllerItem : public SfxControllerItem +class SvxFontWorkControllerItem : public SfxControllerItem { SvxFontWorkDialog &rFontWorkDlg; diff --git a/svx/source/dialog/_bmpmask.cxx b/svx/source/dialog/_bmpmask.cxx index 0a621c300c12..bda7ae2b1c01 100644 --- a/svx/source/dialog/_bmpmask.cxx +++ b/svx/source/dialog/_bmpmask.cxx @@ -25,8 +25,6 @@ #include <sfx2/dispatch.hxx> #include <svtools/colrdlg.hxx> -#define BMPMASK_PRIVATE - #include <svx/dialmgr.hxx> #include <svx/bmpmask.hxx> #include <svx/dialogs.hrc> @@ -170,6 +168,8 @@ class MaskData public: MaskData( SvxBmpMask* pBmpMask, SfxBindings& rBind ); + bool IsCbxReady() const { return bIsReady; } + void SetExecState( bool bState ) { bExecState = bState; } bool IsExecReady() const { return bExecState; } DECL_LINK( PipetteHdl, ToolBox* pTbx ); @@ -335,6 +335,27 @@ void ColorWindow::Paint( const Rectangle &/*Rect*/ ) SetFillColor( rOldFillColor ); } +SvxBmpMaskSelectItem::SvxBmpMaskSelectItem( sal_uInt16 nId_, SvxBmpMask& rMask, + SfxBindings& rBindings ) : + SfxControllerItem ( nId_, rBindings ), + rBmpMask ( rMask) +{ +} + + + +void SvxBmpMaskSelectItem::StateChanged( sal_uInt16 nSID, SfxItemState /*eState*/, + const SfxPoolItem* pItem ) +{ + if ( ( nSID == SID_BMPMASK_EXEC ) && pItem ) + { + const SfxBoolItem* pStateItem = PTR_CAST( SfxBoolItem, pItem ); + assert(pStateItem); //SfxBoolItem erwartet + if (pStateItem) + rBmpMask.SetExecState( pStateItem->GetValue() ); + } +} + SvxBmpMaskChildWindow::SvxBmpMaskChildWindow(vcl::Window* pParent_, sal_uInt16 nId, SfxBindings* pBindings, SfxChildWinInfo* pInfo) @@ -354,6 +375,7 @@ SvxBmpMask::SvxBmpMask(SfxBindings *pBindinx, SfxChildWindow *pCW, vcl::Window* "svx/ui/dockingcolorreplace.ui" ) , pData(new MaskData(this, *pBindinx)) , aPipetteColor(COL_WHITE) + , aSelItem(SID_BMPMASK_EXEC, *this, *pBindinx) { get(m_pTbxPipette, "toolbar"); m_pTbxPipette->SetItemBits(m_pTbxPipette->GetItemId(0), @@ -565,6 +587,18 @@ void SvxBmpMask::PipetteClicked() pData->PipetteHdl(m_pTbxPipette); } +void SvxBmpMask::SetExecState( bool bEnable ) +{ + pData->SetExecState( bEnable ); + + if ( pData->IsExecReady() && pData->IsCbxReady() ) + m_pBtnExec->Enable(); + else + m_pBtnExec->Disable(); +} + + + sal_uInt16 SvxBmpMask::InitColorArrays( Color* pSrcCols, Color* pDstCols, sal_uIntPtr* pTols ) { sal_uInt16 nCount = 0; 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(); diff --git a/svx/source/dialog/contimp.hxx b/svx/source/dialog/contimp.hxx index 899998f849c4..c667544cbd46 100644 --- a/svx/source/dialog/contimp.hxx +++ b/svx/source/dialog/contimp.hxx @@ -27,6 +27,21 @@ #define CONT_RESID(nId) ResId( nId, DIALOG_MGR() ) +class SvxSuperContourDlg; + +class SvxContourDlgItem : public SfxControllerItem +{ + SvxSuperContourDlg& rDlg; + +protected: + + virtual void StateChanged( sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState ) SAL_OVERRIDE; + +public: + + SvxContourDlgItem( sal_uInt16 nId, SvxSuperContourDlg& rDlg, SfxBindings& rBindings ); +}; + class SvxSuperContourDlg : public SvxContourDlg { using SvxContourDlg::GetPolyPolygon; @@ -41,6 +56,7 @@ class SvxSuperContourDlg : public SvxContourDlg Size aLastSize; void* pUpdateEditingObject; void* pCheckObj; + SvxContourDlgItem aContourItem; ToolBox* m_pTbx1; MetricField* m_pMtfTolerance; ContourWindow* m_pContourWnd; @@ -84,6 +100,8 @@ public: vcl::Window* pParent); virtual ~SvxSuperContourDlg(); + void SetExecState( bool bEnable ); + void SetGraphic( const Graphic& rGraphic ); void SetGraphicLinked( bool bLinked ) { bGraphicLinked = bLinked; } const Graphic& GetGraphic() const { return aGraphic; } |