Hi there, another patch removing unused code. Actually I need an advice this time. Is method oox::core::XmlFilterBase::getChartConverter() really unused / unwanted? As it's used in Shape::finalizeXShape (oox/source/drawingml/shape.cxx). So feel free to drop it if it's not valid.
Btw can we really rely on the tool which generates unusedcode.easy? Regards, Petr
>From 94f6485cdfd7e87af6c432708c16aed061a8c2cb Mon Sep 17 00:00:00 2001 From: Petr Vorel <petr.vo...@gmail.com> Date: Thu, 8 Mar 2012 16:11:03 +0100 Subject: [PATCH] remove unused code --- oox/inc/oox/core/xmlfilterbase.hxx | 4 ---- oox/inc/oox/ppt/dgmimport.hxx | 1 - oox/inc/oox/ppt/dgmlayout.hxx | 1 - oox/inc/oox/ppt/pptimport.hxx | 1 - oox/inc/oox/xls/excelfilter.hxx | 1 - oox/source/core/xmlfilterbase.cxx | 5 ----- oox/source/drawingml/shape.cxx | 2 -- oox/source/ppt/dgmimport.cxx | 5 ----- oox/source/ppt/dgmlayout.cxx | 5 ----- oox/source/ppt/pptimport.cxx | 5 ----- oox/source/shape/ShapeFilterBase.cxx | 5 ----- oox/source/shape/ShapeFilterBase.hxx | 2 -- oox/source/xls/excelfilter.cxx | 5 ----- sc/source/filter/excel/xestream.cxx | 6 ------ sc/source/filter/inc/xestream.hxx | 1 - sd/source/filter/eppt/epptooxml.hxx | 1 - sw/source/filter/ww8/docxexportfilter.hxx | 1 - unusedcode.easy | 1 - 18 files changed, 0 insertions(+), 52 deletions(-) diff --git a/oox/inc/oox/core/xmlfilterbase.hxx b/oox/inc/oox/core/xmlfilterbase.hxx index 0e015da..09c76ee 100644 --- a/oox/inc/oox/core/xmlfilterbase.hxx +++ b/oox/inc/oox/core/xmlfilterbase.hxx @@ -95,10 +95,6 @@ public: /** Has to be implemented by each filter to return the collection of VML shapes. */ virtual ::oox::vml::Drawing* getVmlDrawing() = 0; - /** Has to be implemented by each filter, returns a filter-specific chart - converter object, that should be global per imported document. */ - virtual ::oox::drawingml::chart::ChartConverter* getChartConverter() = 0; - /** Has to be implemented by each filter to return the table style list. */ virtual const ::oox::drawingml::table::TableStyleListPtr getTableStyles() = 0; diff --git a/oox/inc/oox/ppt/dgmimport.hxx b/oox/inc/oox/ppt/dgmimport.hxx index 74f8020..99332a8 100644 --- a/oox/inc/oox/ppt/dgmimport.hxx +++ b/oox/inc/oox/ppt/dgmimport.hxx @@ -57,7 +57,6 @@ public: virtual const oox::drawingml::table::TableStyleListPtr getTableStyles(); virtual oox::vml::Drawing* getVmlDrawing(); - virtual oox::drawingml::chart::ChartConverter* getChartConverter(); private: virtual ::rtl::OUString implGetImplementationName() const; diff --git a/oox/inc/oox/ppt/dgmlayout.hxx b/oox/inc/oox/ppt/dgmlayout.hxx index 35c0857..a263eed 100644 --- a/oox/inc/oox/ppt/dgmlayout.hxx +++ b/oox/inc/oox/ppt/dgmlayout.hxx @@ -57,7 +57,6 @@ public: virtual const oox::drawingml::table::TableStyleListPtr getTableStyles(); virtual ::oox::vml::Drawing* getVmlDrawing(); - virtual ::oox::drawingml::chart::ChartConverter* getChartConverter(); private: virtual ::rtl::OUString implGetImplementationName() const; diff --git a/oox/inc/oox/ppt/pptimport.hxx b/oox/inc/oox/ppt/pptimport.hxx index 79df421..ddb67a4 100644 --- a/oox/inc/oox/ppt/pptimport.hxx +++ b/oox/inc/oox/ppt/pptimport.hxx @@ -57,7 +57,6 @@ public: virtual const ::oox::drawingml::Theme* getCurrentTheme() const; virtual ::oox::vml::Drawing* getVmlDrawing(); virtual const oox::drawingml::table::TableStyleListPtr getTableStyles(); - virtual ::oox::drawingml::chart::ChartConverter* getChartConverter(); void setActualSlidePersist( SlidePersistPtr pActualSlidePersist ){ mpActualSlidePersist = pActualSlidePersist; }; std::map< rtl::OUString, oox::drawingml::ThemePtr >& getThemes(){ return maThemes; }; diff --git a/oox/inc/oox/xls/excelfilter.hxx b/oox/inc/oox/xls/excelfilter.hxx index c15b6cc..8585dc2 100644 --- a/oox/inc/oox/xls/excelfilter.hxx +++ b/oox/inc/oox/xls/excelfilter.hxx @@ -71,7 +71,6 @@ public: virtual const ::oox::drawingml::Theme* getCurrentTheme() const; virtual ::oox::vml::Drawing* getVmlDrawing(); virtual const ::oox::drawingml::table::TableStyleListPtr getTableStyles(); - virtual ::oox::drawingml::chart::ChartConverter* getChartConverter(); virtual sal_Bool SAL_CALL filter( const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& rDescriptor ) throw( ::com::sun::star::uno::RuntimeException ); diff --git a/oox/source/core/xmlfilterbase.cxx b/oox/source/core/xmlfilterbase.cxx index f5868bf..f1aebdd 100644 --- a/oox/source/core/xmlfilterbase.cxx +++ b/oox/source/core/xmlfilterbase.cxx @@ -672,11 +672,6 @@ XmlFilterBase& XmlFilterBase::exportDocumentProperties( Reference< XDocumentProp return *this; } -::oox::drawingml::chart::ChartConverter* XmlFilterBase::getChartConverter() -{ - return 0; -} - // protected ------------------------------------------------------------------ Reference< XInputStream > XmlFilterBase::implGetInputStream( MediaDescriptor& rMediaDesc ) const diff --git a/oox/source/drawingml/shape.cxx b/oox/source/drawingml/shape.cxx index a2e29c5..419b25f 100644 --- a/oox/source/drawingml/shape.cxx +++ b/oox/source/drawingml/shape.cxx @@ -680,8 +680,6 @@ void Shape::finalizeXShape( XmlFilterBase& rFilter, const Reference< XShapes >& Reference< drawing::XShapes > xExternalPage; if( !mxChartShapeInfo->mbEmbedShapes ) xExternalPage = rxShapes; - if( rFilter.getChartConverter() ) - rFilter.getChartConverter()->convertFromModel( rFilter, aModel, xChartDoc, xExternalPage, mxShape->getPosition(), mxShape->getSize() ); } catch( Exception& ) { diff --git a/oox/source/ppt/dgmimport.cxx b/oox/source/ppt/dgmimport.cxx index 004c09f..0026dd7 100644 --- a/oox/source/ppt/dgmimport.cxx +++ b/oox/source/ppt/dgmimport.cxx @@ -120,11 +120,6 @@ oox::vml::Drawing* QuickDiagrammingImport::getVmlDrawing() return 0; } -oox::drawingml::chart::ChartConverter* QuickDiagrammingImport::getChartConverter() -{ - return 0; -} - OUString QuickDiagrammingImport::implGetImplementationName() const { return QuickDiagrammingImport_getImplementationName(); diff --git a/oox/source/ppt/dgmlayout.cxx b/oox/source/ppt/dgmlayout.cxx index 62811d1..07465f6 100644 --- a/oox/source/ppt/dgmlayout.cxx +++ b/oox/source/ppt/dgmlayout.cxx @@ -178,11 +178,6 @@ const oox::drawingml::table::TableStyleListPtr QuickDiagrammingLayout::getTableS return 0; } -::oox::drawingml::chart::ChartConverter* QuickDiagrammingLayout::getChartConverter() -{ - return 0; -} - OUString QuickDiagrammingLayout::implGetImplementationName() const { return QuickDiagrammingLayout_getImplementationName(); diff --git a/oox/source/ppt/pptimport.cxx b/oox/source/ppt/pptimport.cxx index e64f89b..e4fadae 100644 --- a/oox/source/ppt/pptimport.cxx +++ b/oox/source/ppt/pptimport.cxx @@ -183,11 +183,6 @@ const oox::drawingml::table::TableStyleListPtr PowerPointImport::getTableStyles( return mpTableStyleList; } -::oox::drawingml::chart::ChartConverter* PowerPointImport::getChartConverter() -{ - return mxChartConv.get(); -} - namespace { class PptGraphicHelper : public GraphicHelper diff --git a/oox/source/shape/ShapeFilterBase.cxx b/oox/source/shape/ShapeFilterBase.cxx index ac010d4..5db50f1 100644 --- a/oox/source/shape/ShapeFilterBase.cxx +++ b/oox/source/shape/ShapeFilterBase.cxx @@ -60,11 +60,6 @@ const ::oox::drawingml::table::TableStyleListPtr ShapeFilterBase::getTableStyles return ::oox::drawingml::table::TableStyleListPtr(); } -::oox::drawingml::chart::ChartConverter* ShapeFilterBase::getChartConverter() -{ - return mxChartConv.get(); -} - ::oox::ole::VbaProject* ShapeFilterBase::implCreateVbaProject() const { return new ::oox::ole::VbaProject( getComponentContext(), getModel(), CREATE_OUSTRING( "Writer" ) ); diff --git a/oox/source/shape/ShapeFilterBase.hxx b/oox/source/shape/ShapeFilterBase.hxx index 360e810..c0155ac 100644 --- a/oox/source/shape/ShapeFilterBase.hxx +++ b/oox/source/shape/ShapeFilterBase.hxx @@ -60,8 +60,6 @@ public: /** Has to be implemented by each filter to return TableStyles. */ virtual const ::oox::drawingml::table::TableStyleListPtr getTableStyles(); - virtual ::oox::drawingml::chart::ChartConverter* getChartConverter(); - virtual bool importDocument() { return true; } virtual bool exportDocument() { return true; } diff --git a/oox/source/xls/excelfilter.cxx b/oox/source/xls/excelfilter.cxx index 9ac3cf3..678ddc1 100644 --- a/oox/source/xls/excelfilter.cxx +++ b/oox/source/xls/excelfilter.cxx @@ -158,11 +158,6 @@ const TableStyleListPtr ExcelFilter::getTableStyles() return TableStyleListPtr(); } -::oox::drawingml::chart::ChartConverter* ExcelFilter::getChartConverter() -{ - return WorkbookHelper( getWorkbookGlobals() ).getChartConverter(); -} - GraphicHelper* ExcelFilter::implCreateGraphicHelper() const { return new ExcelGraphicHelper( getWorkbookGlobals() ); diff --git a/sc/source/filter/excel/xestream.cxx b/sc/source/filter/excel/xestream.cxx index 5230ab8..7f179aa 100644 --- a/sc/source/filter/excel/xestream.cxx +++ b/sc/source/filter/excel/xestream.cxx @@ -1087,12 +1087,6 @@ const oox::drawingml::table::TableStyleListPtr XclExpXmlStream::getTableStyles() return oox::drawingml::table::TableStyleListPtr(); } -oox::drawingml::chart::ChartConverter* XclExpXmlStream::getChartConverter() -{ - // DO NOT CALL - return NULL; -} - ScDocShell* XclExpXmlStream::getDocShell() { Reference< XInterface > xModel( getModel(), UNO_QUERY ); diff --git a/sc/source/filter/inc/xestream.hxx b/sc/source/filter/inc/xestream.hxx index 7d4abbe..c07ab0a 100644 --- a/sc/source/filter/inc/xestream.hxx +++ b/sc/source/filter/inc/xestream.hxx @@ -339,7 +339,6 @@ public: virtual oox::vml::Drawing* getVmlDrawing(); virtual const oox::drawingml::Theme* getCurrentTheme() const; virtual const oox::drawingml::table::TableStyleListPtr getTableStyles(); - virtual oox::drawingml::chart::ChartConverter* getChartConverter(); private: virtual ::oox::ole::VbaProject* implCreateVbaProject() const; diff --git a/sd/source/filter/eppt/epptooxml.hxx b/sd/source/filter/eppt/epptooxml.hxx index 8182ed9..88aa7ab 100644 --- a/sd/source/filter/eppt/epptooxml.hxx +++ b/sd/source/filter/eppt/epptooxml.hxx @@ -88,7 +88,6 @@ public: virtual oox::vml::Drawing* getVmlDrawing() { return NULL; } virtual const oox::drawingml::Theme* getCurrentTheme() const { return NULL; } virtual const oox::drawingml::table::TableStyleListPtr getTableStyles() { return oox::drawingml::table::TableStyleListPtr(); } - virtual oox::drawingml::chart::ChartConverter* getChartConverter() { return NULL; } static const char* GetSideDirection( sal_uInt8 nDirection ); static const char* GetCornerDirection( sal_uInt8 nDirection ); diff --git a/sw/source/filter/ww8/docxexportfilter.hxx b/sw/source/filter/ww8/docxexportfilter.hxx index 0efa82c..99c549c 100644 --- a/sw/source/filter/ww8/docxexportfilter.hxx +++ b/sw/source/filter/ww8/docxexportfilter.hxx @@ -47,7 +47,6 @@ public: virtual const ::oox::drawingml::Theme* getCurrentTheme() const { return NULL; } virtual sal_Int32 getSchemeClr( sal_Int32 ) const { return 0; } virtual ::oox::vml::Drawing* getVmlDrawing() { return NULL; } - virtual ::oox::drawingml::chart::ChartConverter* getChartConverter() { return NULL; } virtual const ::oox::drawingml::table::TableStyleListPtr getTableStyles() { return ::oox::drawingml::table::TableStyleListPtr(); } // Actual export of the DOCX document diff --git a/unusedcode.easy b/unusedcode.easy index 7e8baf5..d30c35e 100755 --- a/unusedcode.easy +++ b/unusedcode.easy @@ -909,7 +909,6 @@ oox::AttributeConversion::decodeUnsignedHex(rtl::OUString const&) oox::ContainerHelper::insertByIndex(com::sun::star::uno::Reference<com::sun::star::container::XIndexContainer> const&, int, com::sun::star::uno::Any const&) oox::GraphicHelper::convertScreenPixelToHmm(com::sun::star::awt::Point const&) const oox::core::PowerPointExport::WriteTextStyle(boost::shared_ptr<sax_fastparser::FastSerializerHelper>, int, int) -oox::core::XmlFilterBase::getChartConverter() oox::drawingml::ChartExport::exportDataSeq(com::sun::star::uno::Reference<com::sun::star::chart2::data::XDataSequence> const&, int) oox::drawingml::ChartExport::exportXAxis(oox::drawingml::AxisIdPair) oox::drawingml::ChartExport::exportYAxis(oox::drawingml::AxisIdPair) -- 1.7.9
_______________________________________________ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice