Another patch to remove redundant code.
Graeme
From 4170594184268e221746f18544fd4ba01a017b68 Mon Sep 17 00:00:00 2001
From: J. Graeme Lingard <jgraeme+git@gmail.com>
Date: Thu, 30 Sep 2010 23:05:03 +0100
Subject: [PATCH] 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.
---
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 bffdd35..aed927a 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 -
// --------------------------------------
--
1.7.1
Context
- [Libreoffice] [PATCH] Remove commented out code from cuigrfflt.cxx · jgraeme
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.