blanket license statement
All of my past future contributions to LibreOffice may be licensed under the MPL/LGPLv3+ dual license. Regards, Anders Jonsson ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
[Libreoffice] [PATCH] Remove commented code
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 = pObjSh
[Libreoffice] [PATCH] Remove unused code
Some more commented code, this time in calc. All code has been commented out at least since 2005. Anders Jonsson, (LGPLv3+,MPL) From 732c13e33612b80ce4e4479698e0710f791de2c4 Mon Sep 17 00:00:00 2001 From: Anders Jonsson anders.jons...@norsjonet.se Date: Tue, 11 Jan 2011 22:17:44 +0100 Subject: Remove commented code --- sc/source/filter/xml/xmlexprt.cxx | 99 - sc/source/ui/drawfunc/futext.cxx | 67 - sc/source/ui/optdlg/opredlin.cxx | 48 -- 3 files changed, 0 insertions(+), 214 deletions(-) diff --git a/sc/source/filter/xml/xmlexprt.cxx b/sc/source/filter/xml/xmlexprt.cxx index 1c62691..9799058 100644 --- a/sc/source/filter/xml/xmlexprt.cxx +++ b/sc/source/filter/xml/xmlexprt.cxx @@ -1967,10 +1967,6 @@ void ScXMLExport::_ExportStyles( sal_Bool bUsed ) if (pSharedData-HasShapes()) { GetShapeExport()-ExportGraphicDefaults(); -/*xInterface = xMultiServiceFactory-createInstance(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(com.sun.star.drawing.Defaults))); -uno::Reference beans::XPropertySet xDrawProperties(xInterface, uno::UNO_QUERY); -if (xDrawProperties.is()) -aStylesExp.exportDefaultStyle(xDrawProperties, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(XML_STYLE_FAMILY_SD_GRAPHICS_NAME)), GetShapeExport()-CreateShapePropMapper(*this));*/ } } uno::Reference style::XStyleFamiliesSupplier xStyleFamiliesSupplier (GetModel(), uno::UNO_QUERY); @@ -2849,44 +2845,6 @@ sal_Bool ScXMLExport::IsMatrix (const ScAddress aCell, } return sal_False; - -/* uno::Reference sheet::XArrayFormulaRange xArrayFormulaRange (xCell, uno::UNO_QUERY); -if (xArrayFormulaRange.is()) -{ -rtl::OUString sArrayFormula(xArrayFormulaRange-getArrayFormula()); -if (sArrayFormula.getLength()) -{ -uno::Referencesheet::XSheetCellRange xMatrixSheetCellRange (xCell, uno::UNO_QUERY); -if (xMatrixSheetCellRange.is()) -{ -uno::Referencesheet::XSheetCellCursor xMatrixSheetCursor(xTable-createCursorByRange(xMatrixSheetCellRange)); -if (xMatrixSheetCursor.is()) -{ -xMatrixSheetCursor-collapseToCurrentArray(); -uno::Referencesheet::XCellRangeAddressable xMatrixCellAddress (xMatrixSheetCursor, uno::UNO_QUERY); -if (xMatrixCellAddress.is()) -{ -aCellAddress = xMatrixCellAddress-getRangeAddress(); -if ((aCellAddress.StartColumn == nCol aCellAddress.StartRow == nRow) -(aCellAddress.EndColumn nCol || aCellAddress.EndRow nRow)) -{ -bIsFirst = sal_True; -return sal_True; -} -else if (aCellAddress.StartColumn != nCol || aCellAddress.StartRow != nRow || -aCellAddress.EndColumn != nCol || aCellAddress.EndRow != nRow) -return sal_True; -else -{ -bIsFirst = sal_True; -return sal_True; -} -} -} -} -} -} -return sal_False;*/ } sal_Bool ScXMLExport::GetCellText (ScMyCell rMyCell, const ScAddress aPos) const @@ -2895,17 +2853,9 @@ sal_Bool ScXMLExport::GetCellText (ScMyCell rMyCell, const ScAddress aPos) con return sal_True; else { -/* if (!rMyCell.bHasXText) -{ -rMyCell.xText.set(xCurrentTableCellRange-getCellByPosition(rMyCell.aCellAddress.Column, rMyCell.aCellAddress.Row), uno::UNO_QUERY); -rMyCell.bHasXText = sal_True; -}*/ -// if (rMyCell.xText.is()) -// { rMyCell.sStringValue = ScCellObj::GetOutputString_Impl(pDoc, aPos); rMyCell.bHasStringValue = sal_True; return sal_True; -// } } } @@ -3199,15 +3149,6 @@ void ScXMLExport::ExportShape(const uno::Reference drawing::XShape xShape, //BM } //BM } -/* SchMemChart* pMemChart = pDoc-FindChartData(sName); -if (pMemChart pMemChart-GetSeriesAddresses().getLength()) -{ -bMemChart = sal_True; -rtl::OUString sRanges(pMemChart-getXMLStringForChartRange()); -if (sRanges.getLength()) -AddAttribute(XML_NAMESPACE_DRAW, XML_NOTIFY_ON_UPDATE_OF_RANGES, sRanges); -GetShapeExport()-exportShape(xShape, SEF_EXPORT_NO_CHART_DATA | SEF_DEFAULT, pPoint); -}*/ } } } @@ -3403,46 +3344,6 @@ void ScXMLExport::WriteAnnotation(ScMyCell
[Libreoffice] [PATCH] Remove commented code
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 --- a/framework
[Libreoffice] [PATCH] Remove commented code
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 unused code
Some more blocks of unused code in libs-gui and libs-core. All have been commented out since at least 2006. Anders Jonsson (LGPLv3+,MPL) 0001-Remove-large-blocks-of-commented-code.patch Description: application/mbox 0002-Remove-large-blocks-of-commented-code.patch Description: application/mbox ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
[Libreoffice] [PATCH]: Remove commented code
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