diff options
author | J. Graeme Lingard <jgraeme+git@gmail.com> | 2010-09-30 23:05:03 +0100 |
---|---|---|
committer | Cédric Bosdonnat <cedricbosdo@openoffice.org> | 2010-10-01 11:11:27 +0200 |
commit | 8526951e75795a6ae0e659231708bb40687c0f5b (patch) | |
tree | 159f1b4c7c2fe5b0ddc5a31a9c981a00421c8a8e /cui/source/dialogs/cuigrfflt.cxx | |
parent | a4f3959e36610003c8e9de36a5657b2204d6f526 (diff) |
Remove commented out code from cuigrfflt.cxx
This section was probably commented out when code was copied from
libreoffice/libs-core/svx/source/dialog/grfflt.cxx during a code move.
Diffstat (limited to 'cui/source/dialogs/cuigrfflt.cxx')
-rw-r--r-- | cui/source/dialogs/cuigrfflt.cxx | 274 |
1 files changed, 0 insertions, 274 deletions
diff --git a/cui/source/dialogs/cuigrfflt.cxx b/cui/source/dialogs/cuigrfflt.cxx index 8bbbfb5f8df2..5bd87bd9b6fb 100644 --- a/cui/source/dialogs/cuigrfflt.cxx +++ b/cui/source/dialogs/cuigrfflt.cxx @@ -40,280 +40,6 @@ #include <cuires.hrc> #include <svx/dialogs.hrc> // RID_SVX_GRFFILTER_DLG_... -// -------------------- -// - SvxGraphicFilter - -// -------------------- -/* -ULONG SvxGraphicFilter::ExecuteGrfFilterSlot( SfxRequest& rReq, GraphicObject& rFilterObject ) -{ - const Graphic& rGraphic = rFilterObject.GetGraphic(); - ULONG nRet; - - if( rGraphic.GetType() == GRAPHIC_BITMAP ) - { - SfxViewFrame* pViewFrame = SfxViewFrame::Current(); - SfxObjectShell* pShell = pViewFrame ? pViewFrame->GetObjectShell() : NULL; - Window* pWindow = ( pViewFrame && pViewFrame->GetViewShell() ) ? pViewFrame->GetViewShell()->GetWindow() : NULL; - Graphic aGraphic; - - switch( rReq.GetSlot() ) - { - case( SID_GRFFILTER_INVERT ): - { - if( pShell ) - pShell->SetWaitCursor( TRUE ); - - if( rGraphic.IsAnimated() ) - { - Animation aAnimation( rGraphic.GetAnimation() ); - - if( aAnimation.Invert() ) - aGraphic = aAnimation; - } - else - { - BitmapEx aBmpEx( rGraphic.GetBitmapEx() ); - - if( aBmpEx.Invert() ) - aGraphic = aBmpEx; - } - - if( pShell ) - pShell->SetWaitCursor( FALSE ); - } - break; - - case( SID_GRFFILTER_SMOOTH ): - { - if( pShell ) - pShell->SetWaitCursor( TRUE ); - - if( rGraphic.IsAnimated() ) - { - Animation aAnimation( rGraphic.GetAnimation() ); - - if( aAnimation.Filter( BMP_FILTER_SMOOTH ) ) - aGraphic = aAnimation; - } - else - { - BitmapEx aBmpEx( rGraphic.GetBitmapEx() ); - - if( aBmpEx.Filter( BMP_FILTER_SMOOTH ) ) - aGraphic = aBmpEx; - } - - if( pShell ) - pShell->SetWaitCursor( FALSE ); - } - break; - - case( SID_GRFFILTER_SHARPEN ): - { - if( pShell ) - pShell->SetWaitCursor( TRUE ); - - if( rGraphic.IsAnimated() ) - { - Animation aAnimation( rGraphic.GetAnimation() ); - - if( aAnimation.Filter( BMP_FILTER_SHARPEN ) ) - aGraphic = aAnimation; - } - else - { - BitmapEx aBmpEx( rGraphic.GetBitmapEx() ); - - if( aBmpEx.Filter( BMP_FILTER_SHARPEN ) ) - aGraphic = aBmpEx; - } - - if( pShell ) - pShell->SetWaitCursor( FALSE ); - } - break; - - case( SID_GRFFILTER_REMOVENOISE ): - { - if( pShell ) - pShell->SetWaitCursor( TRUE ); - - if( rGraphic.IsAnimated() ) - { - Animation aAnimation( rGraphic.GetAnimation() ); - - if( aAnimation.Filter( BMP_FILTER_REMOVENOISE ) ) - aGraphic = aAnimation; - } - else - { - BitmapEx aBmpEx( rGraphic.GetBitmapEx() ); - - if( aBmpEx.Filter( BMP_FILTER_REMOVENOISE ) ) - aGraphic = aBmpEx; - } - - if( pShell ) - pShell->SetWaitCursor( FALSE ); - } - break; - - case( SID_GRFFILTER_SOBEL ): - { - if( pShell ) - pShell->SetWaitCursor( TRUE ); - - if( rGraphic.IsAnimated() ) - { - Animation aAnimation( rGraphic.GetAnimation() ); - - if( aAnimation.Filter( BMP_FILTER_SOBEL_GREY ) ) - aGraphic = aAnimation; - } - else - { - BitmapEx aBmpEx( rGraphic.GetBitmapEx() ); - - if( aBmpEx.Filter( BMP_FILTER_SOBEL_GREY ) ) - aGraphic = aBmpEx; - } - - if( pShell ) - pShell->SetWaitCursor( FALSE ); - } - break; - - case( SID_GRFFILTER_MOSAIC ): - { - GraphicFilterMosaic aDlg( pWindow, rGraphic, 4, 4, FALSE ); - - if( aDlg.Execute() == RET_OK ) - aGraphic = aDlg.GetFilteredGraphic( rGraphic, 1.0, 1.0 ); - } - break; - - case( SID_GRFFILTER_EMBOSS ): - { - GraphicFilterEmboss aDlg( pWindow, rGraphic, RP_MM ); - - if( aDlg.Execute() == RET_OK ) - aGraphic = aDlg.GetFilteredGraphic( rGraphic, 1.0, 1.0 ); - } - break; - - case( SID_GRFFILTER_POSTER ): - { - GraphicFilterPoster aDlg( pWindow, rGraphic, 16 ); - - if( aDlg.Execute() == RET_OK ) - aGraphic = aDlg.GetFilteredGraphic( rGraphic, 1.0, 1.0 ); - } - break; - - case( SID_GRFFILTER_POPART ): - { - if( pShell ) - pShell->SetWaitCursor( TRUE ); - - if( rGraphic.IsAnimated() ) - { - Animation aAnimation( rGraphic.GetAnimation() ); - - if( aAnimation.Filter( BMP_FILTER_POPART ) ) - aGraphic = aAnimation; - } - else - { - BitmapEx aBmpEx( rGraphic.GetBitmapEx() ); - - if( aBmpEx.Filter( BMP_FILTER_POPART ) ) - aGraphic = aBmpEx; - } - - if( pShell ) - pShell->SetWaitCursor( FALSE ); - } - break; - - case( SID_GRFFILTER_SEPIA ): - { - GraphicFilterSepia aDlg( pWindow, rGraphic, 10 ); - - if( aDlg.Execute() == RET_OK ) - aGraphic = aDlg.GetFilteredGraphic( rGraphic, 1.0, 1.0 ); - } - break; - - case( SID_GRFFILTER_SOLARIZE ): - { - GraphicFilterSolarize aDlg( pWindow, rGraphic, 128, FALSE ); - - if( aDlg.Execute() == RET_OK ) - aGraphic = aDlg.GetFilteredGraphic( rGraphic, 1.0, 1.0 ); - } - break; - - default: - { - DBG_ERROR( "SvxGraphicFilter: selected filter slot not yet implemented" ); - nRet = SVX_GRAPHICFILTER_UNSUPPORTED_SLOT; - } - break; - } - - if( aGraphic.GetType() != GRAPHIC_NONE ) - { - rFilterObject.SetGraphic( aGraphic ); - nRet = SVX_GRAPHICFILTER_ERRCODE_NONE; - } - } - else - nRet = SVX_GRAPHICFILTER_UNSUPPORTED_GRAPHICTYPE; - - return nRet; -} - -// ----------------------------------------------------------------------------- - -void SvxGraphicFilter::DisableGraphicFilterSlots( SfxItemSet& rSet ) -{ - if( SFX_ITEM_AVAILABLE <= rSet.GetItemState( SID_GRFFILTER ) ) - rSet.DisableItem( SID_GRFFILTER ); - - if( SFX_ITEM_AVAILABLE <= rSet.GetItemState( SID_GRFFILTER_INVERT ) ) - rSet.DisableItem( SID_GRFFILTER_INVERT ); - - if( SFX_ITEM_AVAILABLE <= rSet.GetItemState( SID_GRFFILTER_SMOOTH ) ) - rSet.DisableItem( SID_GRFFILTER_SMOOTH ); - - if( SFX_ITEM_AVAILABLE <= rSet.GetItemState( SID_GRFFILTER_SHARPEN ) ) - rSet.DisableItem( SID_GRFFILTER_SHARPEN ); - - if( SFX_ITEM_AVAILABLE <= rSet.GetItemState( SID_GRFFILTER_REMOVENOISE ) ) - rSet.DisableItem( SID_GRFFILTER_REMOVENOISE ); - - if( SFX_ITEM_AVAILABLE <= rSet.GetItemState( SID_GRFFILTER_SOBEL ) ) - rSet.DisableItem( SID_GRFFILTER_SOBEL ); - - if( SFX_ITEM_AVAILABLE <= rSet.GetItemState( SID_GRFFILTER_MOSAIC ) ) - rSet.DisableItem( SID_GRFFILTER_MOSAIC ); - - if( SFX_ITEM_AVAILABLE <= rSet.GetItemState( SID_GRFFILTER_EMBOSS ) ) - rSet.DisableItem( SID_GRFFILTER_EMBOSS ); - - if( SFX_ITEM_AVAILABLE <= rSet.GetItemState( SID_GRFFILTER_POSTER ) ) - rSet.DisableItem( SID_GRFFILTER_POSTER ); - - if( SFX_ITEM_AVAILABLE <= rSet.GetItemState( SID_GRFFILTER_POPART ) ) - rSet.DisableItem( SID_GRFFILTER_POPART ); - - if( SFX_ITEM_AVAILABLE <= rSet.GetItemState( SID_GRFFILTER_SEPIA ) ) - rSet.DisableItem( SID_GRFFILTER_SEPIA ); - - if( SFX_ITEM_AVAILABLE <= rSet.GetItemState( SID_GRFFILTER_SOLARIZE ) ) - rSet.DisableItem( SID_GRFFILTER_SOLARIZE ); -}; -*/ // -------------------------------------- // - GraphicFilterDialog::PreviewWindow - // -------------------------------------- |