30#include <osl/diagnose.h>
32#include <svx/svxids.hrc>
41 if( rGraphic.
GetType() == GraphicType::Bitmap )
50 case SID_GRFFILTER_INVERT:
60 aGraphic = aAnimation;
75 case SID_GRFFILTER_SMOOTH:
79 if( aDlg->Execute() ==
RET_OK )
80 aGraphic = aDlg->GetFilteredGraphic( rGraphic, 1.0, 1.0 );
84 case SID_GRFFILTER_SHARPEN:
94 aGraphic = aAnimation;
109 case SID_GRFFILTER_REMOVENOISE:
119 aGraphic = aAnimation;
134 case SID_GRFFILTER_SOBEL:
144 aGraphic = aAnimation;
159 case SID_GRFFILTER_MOSAIC:
163 if( aDlg->Execute() ==
RET_OK )
164 aGraphic = aDlg->GetFilteredGraphic( rGraphic, 1.0, 1.0 );
168 case SID_GRFFILTER_EMBOSS:
172 if( aDlg->Execute() ==
RET_OK )
173 aGraphic = aDlg->GetFilteredGraphic( rGraphic, 1.0, 1.0 );
177 case SID_GRFFILTER_POSTER:
181 if( aDlg->Execute() ==
RET_OK )
182 aGraphic = aDlg->GetFilteredGraphic( rGraphic, 1.0, 1.0 );
186 case SID_GRFFILTER_POPART:
196 aGraphic = aAnimation;
211 case SID_GRFFILTER_SEPIA:
215 if( aDlg->Execute() ==
RET_OK )
216 aGraphic = aDlg->GetFilteredGraphic( rGraphic, 1.0, 1.0 );
220 case SID_GRFFILTER_SOLARIZE:
224 if( aDlg->Execute() ==
RET_OK )
225 aGraphic = aDlg->GetFilteredGraphic( rGraphic, 1.0, 1.0 );
238 OSL_FAIL(
"SvxGraphicFilter: selected filter slot not yet implemented" );
244 if( aGraphic.
GetType() != GraphicType::NONE )
269 if( SfxItemState::DEFAULT <=
rSet.
GetItemState( SID_GRFFILTER_REMOVENOISE ) )
static bool Filter(BitmapEx &rBmpEx, BitmapFilter const &rFilter)
void SetGraphic(const Graphic &rGraphic)
const Graphic & GetGraphic() const
Animation GetAnimation() const
GraphicType GetType() const
BitmapEx GetBitmapEx(const GraphicConversionParameters &rParameters=GraphicConversionParameters()) const
SfxItemState GetItemState(sal_uInt16 nWhich, bool bSrchInParent=true, const SfxPoolItem **ppItem=nullptr) const
void DisableItem(sal_uInt16 nWhich)
void SetWaitCursor(bool bSet) const
sal_uInt16 GetSlot() const
SfxViewShell * GetViewShell() const
static SAL_WARN_UNUSED_RESULT SfxViewFrame * Current()
virtual SfxObjectShell * GetObjectShell() override
weld::Window * GetFrameWeld() const
virtual VclPtr< AbstractGraphicFilterDialog > CreateGraphicFilterSmooth(weld::Window *pParent, const Graphic &rGraphic, double nRadius)=0
virtual VclPtr< AbstractGraphicFilterDialog > CreateGraphicFilterPoster(weld::Window *pParent, const Graphic &rGraphic)=0
virtual VclPtr< AbstractGraphicFilterDialog > CreateGraphicFilterMosaic(weld::Window *pParent, const Graphic &rGraphic)=0
virtual VclPtr< AbstractGraphicFilterDialog > CreateGraphicFilterSolarize(weld::Window *pParent, const Graphic &rGraphic)=0
virtual VclPtr< AbstractGraphicFilterDialog > CreateGraphicFilterEmboss(weld::Window *pParent, const Graphic &rGraphic)=0
static SvxAbstractDialogFactory * Create()
virtual VclPtr< AbstractGraphicFilterDialog > CreateGraphicFilterSepia(weld::Window *pParent, const Graphic &rGraphic)=0
static SvxGraphicFilterResult ExecuteGrfFilterSlot(SfxRequest const &rReq, GraphicObject &rFilterObject)
static void DisableGraphicFilterSlots(SfxItemSet &rSet)