diff options
author | jp <jp@openoffice.org> | 2000-11-24 17:02:44 +0000 |
---|---|---|
committer | jp <jp@openoffice.org> | 2000-11-24 17:02:44 +0000 |
commit | 458c8120863a13a161d838888e573ed0387cbbe3 (patch) | |
tree | 54b79b924b64a1f091ab3c191440d93807abb62b | |
parent | 330a5d5c9b36d9043abcfeb9be3d994ec2191129 (diff) |
Task #80752#: control for imagefilter
-rw-r--r-- | sw/source/ui/app/swmodule.cxx | 116 | ||||
-rw-r--r-- | sw/source/ui/shells/grfsh.cxx | 52 | ||||
-rw-r--r-- | sw/source/ui/shells/shells.src | 10 |
3 files changed, 146 insertions, 32 deletions
diff --git a/sw/source/ui/app/swmodule.cxx b/sw/source/ui/app/swmodule.cxx index 4b0039509d2e..41c2eaf56fca 100644 --- a/sw/source/ui/app/swmodule.cxx +++ b/sw/source/ui/app/swmodule.cxx @@ -2,9 +2,9 @@ * * $RCSfile: swmodule.cxx,v $ * - * $Revision: 1.8 $ + * $Revision: 1.9 $ * - * last change: $Author: tbe $ $Date: 2000-11-10 15:40:03 $ + * last change: $Author: jp $ $Date: 2000-11-24 18:02:44 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -65,9 +65,15 @@ #pragma hdrstop -#include "hintids.hxx" -#include "uiparam.hxx" -#include "swerror.h" +#ifndef _HINTIDS_HXX +#include <hintids.hxx> +#endif +#ifndef _UIPARAM_HXX +#include <uiparam.hxx> +#endif +#ifndef _SWERROR_H +#include <swerror.h> +#endif #ifndef _SV_WRKWIN_HXX //autogen #include <vcl/wrkwin.hxx> @@ -155,14 +161,30 @@ #ifndef _COMPHELPER_PROCESSFACTORY_HXX_ #include <comphelper/processfactory.hxx> #endif -#include "docsh.hxx" -#include "swmodule.hxx" +#ifndef _DOCSH_HXX +#include <docsh.hxx> +#endif +#ifndef _SWMODULE_HXX +#include <swmodule.hxx> +#endif +#ifndef _SWTYPES_HXX #include <swtypes.hxx> +#endif +#ifndef _SWEVENT_HXX #include <swevent.hxx> +#endif +#ifndef _SWACORR_HXX #include <swacorr.hxx> -#include "cmdid.h" +#endif +#ifndef _CMDID_H +#include <cmdid.h> +#endif +#ifndef _DOBJFAC_HXX #include <dobjfac.hxx> +#endif +#ifndef _INIT_HXX #include <init.hxx> +#endif #ifndef _SWPVIEW_HXX //autogen #include <pview.hxx> #endif @@ -211,12 +233,24 @@ #ifndef _SWWFRMSH_HXX //autogen #include <wfrmsh.hxx> #endif -#include "drformsh.hxx" -#include "wgrfsh.hxx" -#include "wolesh.hxx" -#include "wlistsh.hxx" -#include "wtabsh.hxx" -#include "wdrwbase.hxx" +#ifndef _DRFORMSH_HXX +#include <drformsh.hxx> +#endif +#ifndef _WGRFSH_HXX +#include <wgrfsh.hxx> +#endif +#ifndef _WOLESH_HXX +#include <wolesh.hxx> +#endif +#ifndef _WLISTSH_HXX +#include <wlistsh.hxx> +#endif +#ifndef _WTABSH_HXX +#include <wtabsh.hxx> +#endif +#ifndef _WDRWBASE_HXX +#include <wdrwbase.hxx> +#endif #ifndef _NAVIPI_HXX //autogen #include <navipi.hxx> #endif @@ -238,17 +272,39 @@ #ifndef _PRTOPT_HXX //autogen #include <prtopt.hxx> #endif -#include "bookctrl.hxx" -#include "tmplctrl.hxx" -#include "tblctrl.hxx" -#include "zoomctrl.hxx" -#include "swstbctl.hxx" -#include "workctrl.hxx" -#include "numctrl.hxx" -#include "tbxanchr.hxx" -#include "fldwrap.hxx" -#include "redlndlg.hxx" -#include "syncbtn.hxx" +#ifndef _BOOKCTRL_HXX +#include <bookctrl.hxx> +#endif +#ifndef _TMPLCTRL_HXX +#include <tmplctrl.hxx> +#endif +#ifndef _TBLCTRL_HXX +#include <tblctrl.hxx> +#endif +#ifndef _ZOOMCTRL_HXX +#include <zoomctrl.hxx> +#endif +#ifndef _SWSTBCTL_HXX +#include <swstbctl.hxx> +#endif +#ifndef _WORKCTRL_HXX +#include <workctrl.hxx> +#endif +#ifndef _NUMCTRL_HXX +#include <numctrl.hxx> +#endif +#ifndef _TBXANCHR_HXX +#include <tbxanchr.hxx> +#endif +#ifndef _FLDWRAP_HXX +#include <fldwrap.hxx> +#endif +#ifndef _REDLNDLG_HXX +#include <redlndlg.hxx> +#endif +#ifndef _SYNCBTN_HXX +#include <syncbtn.hxx> +#endif #ifndef _HDFTCTRL_HXX #include <hdftctrl.hxx> #endif @@ -271,13 +327,14 @@ #include <swatrset.hxx> #endif #ifndef _IDXMRK_HXX -#include "idxmrk.hxx" +#include <idxmrk.hxx> #endif #ifndef _DLELSTNR_HXX_ #include <dlelstnr.hxx> #endif - -#include "barcfg.hxx" +#ifndef _BARCFG_HXX +#include <barcfg.hxx> +#endif #include <app.hrc> @@ -541,6 +598,9 @@ void SwDLL::RegisterControls() SvxGrafGammaToolBoxControl::RegisterControl( SID_ATTR_GRAF_GAMMA, pMod ); SvxGrafTransparenceToolBoxControl::RegisterControl( SID_ATTR_GRAF_TRANSPARENCE, pMod ); SvxGrafModeToolBoxControl::RegisterControl( SID_ATTR_GRAF_MODE, pMod ); + + SvxGrafFilterToolBoxControl::RegisterControl( SID_GRFFILTER, pMod ); + GalleryChildWindow::RegisterChildWindow(0, pMod); } diff --git a/sw/source/ui/shells/grfsh.cxx b/sw/source/ui/shells/grfsh.cxx index 7d44f4ad4d4a..faf611f97e2c 100644 --- a/sw/source/ui/shells/grfsh.cxx +++ b/sw/source/ui/shells/grfsh.cxx @@ -2,9 +2,9 @@ * * $RCSfile: grfsh.cxx,v $ * - * $Revision: 1.4 $ + * $Revision: 1.5 $ * - * last change: $Author: jp $ $Date: 2000-10-20 13:41:56 $ + * last change: $Author: jp $ $Date: 2000-11-24 18:01:42 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -133,6 +133,9 @@ #ifndef _SVX_BRSHITEM_HXX //autogen #include <svx/brshitem.hxx> #endif +#ifndef _SVX_GRFFLT_HXX //autogen +#include <svx/grfflt.hxx> +#endif #ifndef _FMTURL_HXX //autogen #include <fmturl.hxx> @@ -548,6 +551,29 @@ void SwGrfShell::ExecAttr( SfxRequest &rReq ) ((SfxUInt16Item*)pItem)->GetValue() )); break; + case SID_GRFFILTER: + case SID_GRFFILTER_INVERT: + case SID_GRFFILTER_SMOOTH: + case SID_GRFFILTER_SHARPEN: + case SID_GRFFILTER_REMOVENOISE: + case SID_GRFFILTER_SOBEL: + case SID_GRFFILTER_MOSAIC: + case SID_GRFFILTER_EMBOSS: + case SID_GRFFILTER_POSTER: + case SID_GRFFILTER_POPART: + case SID_GRFFILTER_SEPIA: + case SID_GRFFILTER_SOLARIZE: + if( GRAPHIC_BITMAP == nGrfType ) + { + GraphicObject aFilterObj( GetShell().GetGraphicObj() ); + + if( SVX_GRAPHICFILTER_ERRCODE_NONE == + SvxGraphicFilter::ExecuteGrfFilterSlot( rReq, aFilterObj )) + GetShell().ReRead( aEmptyStr, aEmptyStr, + &aFilterObj.GetGraphic() ); + } + break; + default: ASSERT(!this, falscher Dispatcher); } @@ -565,6 +591,9 @@ void SwGrfShell::GetAttrState(SfxItemSet &rSet) BOOL bParentCntProt = 0 != rSh.IsSelObjProtected( (FlyProtectType)(FLYPROTECT_CONTENT|FLYPROTECT_PARENT) ); + USHORT nGrfType = CNT_GRF == GetShell().GetCntType() + ? GetShell().GetGraphicType() : 0; + SfxWhichIter aIter( rSet ); USHORT nWhich = aIter.FirstWhich(); while( nWhich ) @@ -653,6 +682,22 @@ void SwGrfShell::GetAttrState(SfxItemSet &rSet) aCoreSet.Get(RES_GRFATR_DRAWMODE)).GetValue() )); break; + case SID_GRFFILTER: + case SID_GRFFILTER_INVERT: + case SID_GRFFILTER_SMOOTH: + case SID_GRFFILTER_SHARPEN: + case SID_GRFFILTER_REMOVENOISE: + case SID_GRFFILTER_SOBEL: + case SID_GRFFILTER_MOSAIC: + case SID_GRFFILTER_EMBOSS: + case SID_GRFFILTER_POSTER: + case SID_GRFFILTER_POPART: + case SID_GRFFILTER_SEPIA: + case SID_GRFFILTER_SOLARIZE: + if( !bParentCntProt && GRAPHIC_BITMAP == nGrfType ) + bDisable = FALSE; + break; + default: bDisable = FALSE; } @@ -916,6 +961,9 @@ IMPL_LINK( SwTextShell, InitGraphicFrame, Button *, pButton ) /*------------------------------------------------------------------------ $Log: not supported by cvs2svn $ + Revision 1.4 2000/10/20 13:41:56 jp + use correct INetURL-Decode enum + Revision 1.3 2000/10/06 13:36:37 jp should changes: don't use IniManager diff --git a/sw/source/ui/shells/shells.src b/sw/source/ui/shells/shells.src index 504f49178fc3..a4c063da9bea 100644 --- a/sw/source/ui/shells/shells.src +++ b/sw/source/ui/shells/shells.src @@ -2,9 +2,9 @@ * * $RCSfile: shells.src,v $ * - * $Revision: 1.5 $ + * $Revision: 1.6 $ * - * last change: $Author: kz $ $Date: 2000-11-09 13:04:40 $ + * last change: $Author: jp $ $Date: 2000-11-24 18:01:12 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -1133,6 +1133,12 @@ ToolBox RID_GRAFIK_TOOLBOX HelpID = FN_FLIP_HORZ_GRAFIC ; }; ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; }; + ToolBoxItem + { + Identifier = SID_GRFFILTER; + HelpID = SID_GRFFILTER; + }; + ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; }; MN_ATTRIBUTES_GRAFIK }; Scroll = TRUE ; |