[Libreoffice] [PATCH] Remove commented code

2011-01-11 Thread Anders Jonsson
This patch removes unused code from filters. All code has been commented
out at least since 2005.

Anders Jonsson,
(LGPLv3+,MPL)
From 60c2f1e10f45fc0b584df713ff4b269978613580 Mon Sep 17 00:00:00 2001
From: Anders Jonsson anders.jons...@norsjonet.se
Date: Tue, 11 Jan 2011 11:20:36 +0100
Subject: Remove commented code

---
 binfilter/bf_sch/source/core/sch_chtmode7.cxx  |   80 ---
 binfilter/bf_sfx2/source/appl/sfx2_appbas.cxx  |   69 +--
 binfilter/bf_svtools/source/items1/svt_nranges.cxx |   57 -
 binfilter/bf_svx/source/unoedit/svx_unofield.cxx   |  248 
 binfilter/bf_sw/source/core/unocore/sw_unoobj2.cxx |  121 --
 binfilter/bf_sw/source/filter/excel/sw_excread.cxx |   91 ---
 .../bf_xmloff/source/draw/xmloff_ximp3dobject.cxx  |   60 -
 7 files changed, 1 insertions(+), 725 deletions(-)

diff --git a/binfilter/bf_sch/source/core/sch_chtmode7.cxx b/binfilter/bf_sch/source/core/sch_chtmode7.cxx
index 9bb0dee..66cc309 100644
--- a/binfilter/bf_sch/source/core/sch_chtmode7.cxx
+++ b/binfilter/bf_sch/source/core/sch_chtmode7.cxx
@@ -410,55 +410,6 @@ namespace binfilter {
 /*N*/ 	return pOutliner;
 /*N*/ }
 
-/*
-UINT32 ChartModel::ValFor mat () const
-{
-return nValFo rmat;
-}
-
-
-UINT32 ChartModel::ValForm at()
-{
-return nVal Format;
-}
-
-
-UINT32 ChartModel::PercentVa lFormat () const
-{
-return nPercentV alFormat;
-}
-
-
-UINT32 ChartModel::Per centValFormat ()
-{
-return nPercentValFo rmat;
-}
-
-
-UINT32 ChartModel::Des crFormat () const
-{
-return nDescrFor mat;
-}
-
-
-UINT32 ChartModel::Desc rFormat()
-{
-return nDes crFormat;
-}
-
-
-UINT32 ChartModel::PercentD escrFormat () const
-{
-return nPercentDescrFo rmat;
-}
-
-
-UINT32 ChartModel::Percent DescrF ormat ()
-{
-return nPercentDescr Format;
-}
-
-*/
 /*N*/ BOOL ChartModel::IsInitialized() const
 /*N*/ {
 /*N*/ 	return mbIsInitialized;
@@ -581,37 +532,6 @@ UINT32 ChartModel::Percent DescrF ormat ()
 /*N*/ 		case CHSTYLE_2D_PERCENTCOLUMN :
 /*N*/ 			return FALSE;
 
-//  		case CHSTYLE_2D_LINE :
-//  		case CHSTYLE_2D_STACKEDLINE :
-//  		case CHSTYLE_2D_PERCENTLINE :
-//  		case CHSTYLE_2D_LINESYMBOLS :
-//  		case CHSTYLE_2D_STACKEDLINESYM :
-//  		case CHSTYLE_2D_PERCENTLINESYM :
-//  		case CHSTYLE_2D_CUBIC_SPLINE :
-//  		case CHSTYLE_2D_CUBIC_SPLINE_SYMBOL :
-//  		case CHSTYLE_2D_B_SPLINE :
-//  		case CHSTYLE_2D_B_SPLINE_SYMBOL :
-
-//  		case CHSTYLE_2D_XY :
-//  		case CHSTYLE_2D_XYSYMBOLS :
-//  		case CHSTYLE_2D_XY_LINE :
-//  		case CHSTYLE_2D_CUBIC_SPLINE_XY :
-//  		case CHSTYLE_2D_CUBIC_SPLINE_SYMBOL_XY :
-//  		case CHSTYLE_2D_B_SPLINE_XY :
-//  		case CHSTYLE_2D_B_SPLINE_SYMBOL_XY :
-
-//  		case CHSTYLE_2D_BAR :
-//  		case CHSTYLE_2D_STACKEDBAR:
-//  		case CHSTYLE_2D_PERCENTBAR:
-
-//  		case CHSTYLE_2D_AREA :
-//  		case CHSTYLE_2D_PERCENTAREA :
-//  		case CHSTYLE_2D_STACKEDAREA :
-
-//  		case CHSTYLE_2D_STOCK_1:
-//  		case CHSTYLE_2D_STOCK_2:
-//  		case CHSTYLE_2D_STOCK_3:
-//  		case CHSTYLE_2D_STOCK_4:
 /*N*/ 		default :
 /*N*/ 			return TRUE;
 /*N*/ 	}
diff --git a/binfilter/bf_sfx2/source/appl/sfx2_appbas.cxx b/binfilter/bf_sfx2/source/appl/sfx2_appbas.cxx
index 2d1701d..0abf450 100644
--- a/binfilter/bf_sfx2/source/appl/sfx2_appbas.cxx
+++ b/binfilter/bf_sfx2/source/appl/sfx2_appbas.cxx
@@ -174,74 +174,7 @@ BasicManager* SfxApplication::GetBasicManager()
 /*N*/
 /*N*/ 		// zuerst das BASIC laden
 /*N*/ 		GetBasic();
-/*
-// als erstes SfxShellObject das SbxObject der SfxApplication erzeugen
-SbxObject *pSbx = GetSbxObject();
-DBG_ASSERT( pSbx, SfxShellObject: can't create SbxObject for SfxApplication );
-
-// die SbxObjects aller Module erzeugen
-SfxModuleArr_Impl rArr = GetModules_Impl();
-for ( sal_uInt16 n = 0; n  rArr.Count(); ++n )
-{
-SfxModule *pMod = rArr.GetObject(n);
-if ( pMod-IsLoaded() )
-{
-pSbx = pMod-GetSbxObject();
-DBG_ASSERT( pSbx, SfxModule: can't create SbxObject );
-}
-}
-
-// die SbxObjects aller Tasks erzeugen
-for ( SfxTask *pTask = SfxTask::GetFirst(); pTask; pTask = SfxTask::GetNext( *pTask ) )
-pTask-GetSbxObject();
-
-// die SbxObjects aller SfxObjectShells erzeugen (ggf. Frame-los!)
-for ( SfxObjectShell *pObjSh = SfxObjectShell::GetFirst( NULL, sal_False );
-  pObjSh;
-  pObjSh = SfxObjectShell::GetNext(*pObjSh, NULL, sal_False) )
-{
-// kein IP-Object oder wenn doch dann initialisiert?
-SvStorageRef aStorage;
-if ( !pObjSh-IsHandsOff() )
-aStorage = pObjSh-GetStorage();
-if ( !pObjSh-GetInPlaceObject() || aStorage.Is() )
-{
-DBG( DbgOutf( SfxShellObject: BASIC-on-demand for %s,
-  pObjSh-SfxShell::GetName().GetBuffer() ) );
-pSbx = 

[Libreoffice] [PATCH] Remove commented code

2011-01-10 Thread Anders Jonsson
This patch removes large comment blocks in libs-core. All code has been
commented out at least since 2005.

Anders Jonsson,
(LGPLv3+,MPL)
From 847f9b8633181e4d666ef7094362cf598bbddaaf Mon Sep 17 00:00:00 2001
From: Anders Jonsson anders.jons...@norsjonet.se
Date: Tue, 11 Jan 2011 00:44:39 +0100
Subject: Remove commented code

---
 avmedia/source/xine/window.cxx |  104 --
 .../source/uiconfiguration/moduleuicfgsupplier.cxx |  155 ---
 framework/test/test.cxx|   47 +-
 framework/test/typecfg/xml2xcd.cxx |   47 -
 idl/source/objects/types.cxx   |  203 
 idl/source/prj/svidl.cxx   |   76 
 sfx2/source/appl/appbas.cxx|   69 +---
 sfx2/source/control/macro.cxx  |  100 --
 ucb/source/cacher/cachedcontentresultsetstub.cxx   |   67 ---
 xmloff/source/draw/shapeimport.cxx |  192 +--
 xmloff/source/draw/ximp3dobject.cxx|   60 --
 11 files changed, 3 insertions(+), 1117 deletions(-)

diff --git a/avmedia/source/xine/window.cxx b/avmedia/source/xine/window.cxx
index 4634233..12caca6 100644
--- a/avmedia/source/xine/window.cxx
+++ b/avmedia/source/xine/window.cxx
@@ -57,110 +57,6 @@ static ::osl::Mutex ImplGetOwnStaticMutex()
 return *pMutex;
 }
 
-// ---
-// - WndProc -
-// ---
-
-/*
-LRESULT CALLBACK MediaPlayerWndProc( HWND hWnd,UINT nMsg, WPARAM nPar1, LPARAM nPar2 )
-{
-Window* pWindow = (Window*) ::GetWindowLong( hWnd, 0 );
-boolbProcessed = true;
-
-if( pWindow )
-{
-switch( nMsg )
-{
-case( WM_SETCURSOR ):
-pWindow-updatePointer();
-break;
-
-case( WM_GRAPHNOTIFY ):
-pWindow-processGraphEvent();
-break;
-
-case( WM_MOUSEMOVE ):
-case( WM_LBUTTONDOWN ):
-case( WM_MBUTTONDOWN ):
-case( WM_RBUTTONDOWN ):
-case( WM_LBUTTONUP ):
-case( WM_MBUTTONUP ):
-case( WM_RBUTTONUP ):
-{
-awt::MouseEvent aUNOEvt;
-POINT   aWinPoint;
-
-if( !::GetCursorPos( aWinPoint ) || !::ScreenToClient( hWnd, aWinPoint ) )
-{
-aWinPoint.x = GET_X_LPARAM( nPar2 ); 
-aWinPoint.y = GET_Y_LPARAM( nPar2 ); 
-}
-aUNOEvt.Modifiers = 0;
-aUNOEvt.Buttons = 0;
-aUNOEvt.X = aWinPoint.x;
-aUNOEvt.Y = aWinPoint.y;
-aUNOEvt.PopupTrigger = false;
-
-// Modifiers
-if( nPar1  MK_SHIFT )
-aUNOEvt.Modifiers |= awt::KeyModifier::SHIFT;
-
-if( nPar1  MK_CONTROL )
-aUNOEvt.Modifiers |= awt::KeyModifier::MOD1;
-
-// Buttons
-if( WM_LBUTTONDOWN == nMsg || WM_LBUTTONUP == nMsg )
-aUNOEvt.Buttons |= awt::MouseButton::LEFT;
-
-if( WM_MBUTTONDOWN == nMsg || WM_MBUTTONUP == nMsg )
-aUNOEvt.Buttons |= awt::MouseButton::MIDDLE;
-
-if( WM_RBUTTONDOWN == nMsg || WM_RBUTTONUP == nMsg )
-aUNOEvt.Buttons |= awt::MouseButton::RIGHT;
-
-// event type
-if( WM_LBUTTONDOWN == nMsg ||
-WM_MBUTTONDOWN == nMsg ||
-WM_RBUTTONDOWN == nMsg )
-{
-aUNOEvt.ClickCount = 1;
-pWindow-fireMousePressedEvent( aUNOEvt );
-}
-else if( WM_LBUTTONUP == nMsg ||
- WM_MBUTTONUP == nMsg ||
- WM_RBUTTONUP == nMsg )
-{
-aUNOEvt.ClickCount = 1;
-pWindow-fireMouseReleasedEvent( aUNOEvt );
-}
-else if( WM_MOUSEMOVE == nMsg )
-{
-aUNOEvt.ClickCount = 0;
-pWindow-fireMouseMovedEvent( aUNOEvt );
-pWindow-updatePointer();
-}
-}
-break;
-
-case( WM_SETFOCUS ):
-{
-const awt::FocusEvent aUNOEvt;
-pWindow-fireSetFocusEvent( aUNOEvt );
-}
-break;
-
-default:
-bProcessed = false;
-break;
-}
-}
-else
-bProcessed = false;
-
-return( bProcessed ? 0 : DefWindowProc( hWnd, nMsg, nPar1, nPar2 ) );
-}
-*/
-
 // ---
 // - Window -
 // ---
diff --git a/framework/source/uiconfiguration/moduleuicfgsupplier.cxx b/framework/source/uiconfiguration/moduleuicfgsupplier.cxx
index 4127bb6..db799fd 100644
--- 

[Libreoffice] [PATCH] Remove commented code

2011-01-08 Thread Anders Jonsson
These three patches remove large blocks of commented code in sdk,
components and libs-gui respectively. All code has been commented out at
least since 2005.

Anders Jonsson,
(LGPLv3+, MPL)
From bd135dcc65666baf7317d02ba2ed9eecb35d8b2e Mon Sep 17 00:00:00 2001
From: Anders Jonsson anders.jons...@norsjonet.se
Date: Sat, 8 Jan 2011 13:57:29 +0100
Subject: Remove block of commented code

---
 .../Components/CppComponent/service1_impl.cxx  |   64 
 1 files changed, 0 insertions(+), 64 deletions(-)

diff --git a/odk/examples/DevelopersGuide/Components/CppComponent/service1_impl.cxx b/odk/examples/DevelopersGuide/Components/CppComponent/service1_impl.cxx
index a6933ce..1c5e49a 100644
--- a/odk/examples/DevelopersGuide/Components/CppComponent/service1_impl.cxx
+++ b/odk/examples/DevelopersGuide/Components/CppComponent/service1_impl.cxx
@@ -244,68 +244,4 @@ Reference XInterface  SAL_CALL create_MyService2Impl(
 
 }
 
-/*
-extern C void SAL_CALL component_getImplementationEnvironment(
-sal_Char const ** ppEnvTypeName, uno_Environment ** )
-{
-*ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
-}
-
-extern C sal_Bool SAL_CALL component_writeInfo(
-lang::XMultiServiceFactory * xMgr, registry::XRegistryKey * xRegistry )
-{
-if (xRegistry)
-{
-try
-{
-// implementation of MyService1A
-Reference registry::XRegistryKey  xKey(
-xRegistry-createKey( OUString( RTL_CONSTASCII_USTRINGPARAM(
-my_module.my_sc_implementation.MyService1/UNO/SERVICES) ) ) );
-// subkeys denote implemented services of implementation
-xKey-createKey( OUString( RTL_CONSTASCII_USTRINGPARAM(
-my_module.MyService1) ) );
-// implementation of MyService1B
-xKey = xRegistry-createKey( OUString( RTL_CONSTASCII_USTRINGPARAM(
-my_module.my_sc_implementation.MyService2/UNO/SERVICES) ) );
-// subkeys denote implemented services of implementation
-xKey-createKey( OUString( RTL_CONSTASCII_USTRINGPARAM(
-my_module.MyService2) ) );
-return sal_True; // success
-}
-catch (registry::InvalidRegistryException )
-{
-// function fails if exception caught
-}
-}
-return sal_False;
-}
-extern C void * SAL_CALL component_getFactory(
-sal_Char const * implName, lang::XMultiServiceFactory * xMgr, void * )
-{
-Reference lang::XSingleComponentFactory  xFactory;
-if (0 == ::rtl_str_compare( implName, my_module.my_sc_implementation.MyService1 ))
-{
-// create component factory for MyService1 implementation
-OUString serviceName( RTL_CONSTASCII_USTRINGPARAM(my_module.MyService1) );
-xFactory = ::cppu::createSingleComponentFactory(
-::my_sc_impl::create_MyService1Impl,
-OUString( RTL_CONSTASCII_USTRINGPARAM(my_module.my_sc_implementation.MyService1) ),
-Sequence OUString ( serviceName, 1 ) );
-}
-else if (0 == ::rtl_str_compare( implName, my_module.my_sc_implementation.MyService2 ))
-{
-// create component factory for MyService12 implementation
-OUString serviceName( RTL_CONSTASCII_USTRINGPARAM(my_module.MyService2) );
-xFactory = ::cppu::createSingleComponentFactory(
-::my_sc_impl::create_MyService2Impl,
-OUString( RTL_CONSTASCII_USTRINGPARAM(my_module.my_sc_implementation.MyService2) ),
-Sequence OUString ( serviceName, 1 ) );
-}
-if (xFactory.is())
-xFactory-acquire();
-return xFactory.get(); // return acquired interface pointer or null
-}
-*/
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
-- 
1.7.1

From 16da339cefa87de0f1b5bb25da9e2abc222d9826 Mon Sep 17 00:00:00 2001
From: Anders Jonsson anders.jons...@norsjonet.se
Date: Sat, 8 Jan 2011 13:32:08 +0100
Subject: Remove commented code

---
 basctl/source/basicide/tbxctl.cxx   |   79 ---
 xmlsecurity/source/xmlsec/errorcallback.cxx |  137 ---
 2 files changed, 0 insertions(+), 216 deletions(-)

diff --git a/basctl/source/basicide/tbxctl.cxx b/basctl/source/basicide/tbxctl.cxx
index f7cb3ba..4dba82d 100644
--- a/basctl/source/basicide/tbxctl.cxx
+++ b/basctl/source/basicide/tbxctl.cxx
@@ -52,68 +52,6 @@ SFX_IMPL_TOOLBOX_CONTROL( TbxControls, SfxAllEnumItem )
 
 /*
 |*
-|* WorkWindow Alignment
-|*
-\/
-/*
-IMPL_LINK( PopupWindowTbx, SelectHdl, void*, EMPTYARG )
-{
-if ( IsInPopupMode() )
-EndPopupMode();
-
-aSelectLink.Call( aTbx.GetToolBox() );
-
-return 0;
-}
-
-PopupWindowTbx::PopupWindowTbx( USHORT nId, WindowAlign eAlign,
-ResId aRIdWin, ResId aRIdTbx,
-SfxBindings rBind ) :
- 

[Libreoffice] [PATCH]: Remove commented code

2010-12-16 Thread Anders Jonsson
Two more large heaps of code. These have been commented out since 2004
and 2007 respectively.


Anders Jonsson
(LGPLv3+,MPL)


0001-Remove-blocks-of-commented-code.patch
Description: application/mbox


0001-Remove-large-block-of-unused-code.patch
Description: application/mbox
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice