diff options
author | Noel Grandin <noel@peralex.com> | 2016-09-22 15:08:42 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2016-09-22 18:56:58 +0000 |
commit | c4cd079b8f613084a99a83b95c3968b65cbd8900 (patch) | |
tree | 16051edcfd1f7109aefa08af6d71da0687b20f8a /sc/source/filter/oox | |
parent | ba3d6d8a39d31316923d2326059c07b0a7e3c05e (diff) |
loplugin:unusedmethods in sc..vcl
Change-Id: I70fcf95dfd3db05b4fd6e5cee37866f673d3afa8
Reviewed-on: https://gerrit.libreoffice.org/29183
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc/source/filter/oox')
-rw-r--r-- | sc/source/filter/oox/biffcodec.cxx | 11 | ||||
-rw-r--r-- | sc/source/filter/oox/drawingmanager.cxx | 13 | ||||
-rw-r--r-- | sc/source/filter/oox/excelhandlers.cxx | 8 | ||||
-rw-r--r-- | sc/source/filter/oox/formulabase.cxx | 37 | ||||
-rw-r--r-- | sc/source/filter/oox/numberformatsbuffer.cxx | 6 | ||||
-rw-r--r-- | sc/source/filter/oox/pivotcachefragment.cxx | 55 | ||||
-rw-r--r-- | sc/source/filter/oox/stylesbuffer.cxx | 46 | ||||
-rw-r--r-- | sc/source/filter/oox/workbookhelper.cxx | 16 | ||||
-rw-r--r-- | sc/source/filter/oox/worksheethelper.cxx | 1 |
9 files changed, 0 insertions, 193 deletions
diff --git a/sc/source/filter/oox/biffcodec.cxx b/sc/source/filter/oox/biffcodec.cxx index 65ce1f9139da..94a372a7a609 100644 --- a/sc/source/filter/oox/biffcodec.cxx +++ b/sc/source/filter/oox/biffcodec.cxx @@ -220,17 +220,6 @@ void BiffDecoder_RCF::implDecode( sal_uInt8* pnDestData, const sal_uInt8* pnSrcD } } -BiffCodecHelper::BiffCodecHelper( const WorkbookHelper& rHelper ) : - WorkbookHelper( rHelper ) -{ -} - -void BiffCodecHelper::cloneDecoder( BiffInputStream& rStrm ) -{ - if( mxDecoder.get() ) - rStrm.setDecoder( BiffDecoderRef( mxDecoder->clone() ) ); -} - } // namespace xls } // namespace oox diff --git a/sc/source/filter/oox/drawingmanager.cxx b/sc/source/filter/oox/drawingmanager.cxx index aabd92c804c0..5810996b3b36 100644 --- a/sc/source/filter/oox/drawingmanager.cxx +++ b/sc/source/filter/oox/drawingmanager.cxx @@ -50,19 +50,6 @@ BiffDrawingBase::BiffDrawingBase( const WorksheetHelper& rHelper, const Referenc { } -void BiffDrawingBase::finalizeImport() -{ - Reference< XShapes > xShapes( mxDrawPage, UNO_QUERY ); - OSL_ENSURE( xShapes.is(), "BiffDrawingBase::finalizeImport - no shapes container" ); - if( !xShapes.is() ) - return; -} - -BiffSheetDrawing::BiffSheetDrawing( const WorksheetHelper& rHelper ) : - BiffDrawingBase( rHelper, rHelper.getDrawPage() ) -{ -} - } // namespace xls } // namespace oox diff --git a/sc/source/filter/oox/excelhandlers.cxx b/sc/source/filter/oox/excelhandlers.cxx index b6d0c6e4bcf3..f41dc978323f 100644 --- a/sc/source/filter/oox/excelhandlers.cxx +++ b/sc/source/filter/oox/excelhandlers.cxx @@ -67,14 +67,6 @@ bool BiffFragmentHandler::skipFragment() return !mxBiffStrm->isEof() && (mxBiffStrm->getRecId() == BIFF_ID_EOF); } -BiffWorkbookFragmentBase::BiffWorkbookFragmentBase( const WorkbookHelper& rHelper, const OUString& rStrmName, bool bCloneDecoder ) : - BiffFragmentHandler( rHelper.getBaseFilter(), rStrmName ), - WorkbookHelper( rHelper ) -{ - if( bCloneDecoder ) - getCodecHelper().cloneDecoder( getInputStream() ); -} - } // namespace xls } // namespace oox diff --git a/sc/source/filter/oox/formulabase.cxx b/sc/source/filter/oox/formulabase.cxx index 957740dd994d..3e675a481b54 100644 --- a/sc/source/filter/oox/formulabase.cxx +++ b/sc/source/filter/oox/formulabase.cxx @@ -104,21 +104,6 @@ void BinSingleRef2d::readBiff12Data( SequenceInputStream& rStrm, bool bRelativeA setBiff12Data( nCol, nRow, bRelativeAsOffset ); } -void BinSingleRef2d::readBiff2Data( BiffInputStream& rStrm, bool bRelativeAsOffset ) -{ - sal_uInt16 nRow; - sal_uInt8 nCol; - rStrm >> nRow >> nCol; - setBiff2Data( nCol, nRow, bRelativeAsOffset ); -} - -void BinSingleRef2d::readBiff8Data( BiffInputStream& rStrm, bool bRelativeAsOffset ) -{ - sal_uInt16 nRow, nCol; - rStrm >> nRow >> nCol; - setBiff8Data( nCol, nRow, bRelativeAsOffset ); -} - void BinComplexRef2d::readBiff12Data( SequenceInputStream& rStrm, bool bRelativeAsOffset ) { sal_Int32 nRow1, nRow2; @@ -131,23 +116,6 @@ void BinComplexRef2d::readBiff12Data( SequenceInputStream& rStrm, bool bRelative maRef2.setBiff12Data( nCol2, nRow2, bRelativeAsOffset ); } -void BinComplexRef2d::readBiff2Data( BiffInputStream& rStrm, bool bRelativeAsOffset ) -{ - sal_uInt16 nRow1, nRow2; - sal_uInt8 nCol1, nCol2; - rStrm >> nRow1 >> nRow2 >> nCol1 >> nCol2; - maRef1.setBiff2Data( nCol1, nRow1, bRelativeAsOffset ); - maRef2.setBiff2Data( nCol2, nRow2, bRelativeAsOffset ); -} - -void BinComplexRef2d::readBiff8Data( BiffInputStream& rStrm, bool bRelativeAsOffset ) -{ - sal_uInt16 nRow1, nRow2, nCol1, nCol2; - rStrm >> nRow1 >> nRow2 >> nCol1 >> nCol2; - maRef1.setBiff8Data( nCol1, nRow1, bRelativeAsOffset ); - maRef2.setBiff8Data( nCol2, nRow2, bRelativeAsOffset ); -} - // token vector, sequence ===================================================== ApiTokenVector::ApiTokenVector() @@ -1134,11 +1102,6 @@ const FunctionInfo* FunctionProvider::getFuncInfoFromBiff12FuncId( sal_uInt16 nF return mxFuncImpl->maBiff12Funcs.get( nFuncId ).get(); } -const FunctionInfo* FunctionProvider::getFuncInfoFromBiffFuncId( sal_uInt16 nFuncId ) const -{ - return mxFuncImpl->maBiffFuncs.get( nFuncId ).get(); -} - const FunctionInfo* FunctionProvider::getFuncInfoFromMacroName( const OUString& rFuncName ) const { return mxFuncImpl->maMacroFuncs.get( rFuncName ).get(); diff --git a/sc/source/filter/oox/numberformatsbuffer.cxx b/sc/source/filter/oox/numberformatsbuffer.cxx index 278a61c82cd4..ac42d7459b8a 100644 --- a/sc/source/filter/oox/numberformatsbuffer.cxx +++ b/sc/source/filter/oox/numberformatsbuffer.cxx @@ -2032,12 +2032,6 @@ sal_uLong NumberFormatsBuffer::fillToItemSet( SfxItemSet& rItemSet, sal_Int32 nN return pNumFmt->fillToItemSet( rItemSet, bSkipPoolDefs); } -void NumberFormatsBuffer::writeToPropertyMap( PropertyMap& rPropMap, sal_Int32 nNumFmtId ) const -{ - if( const NumberFormat* pNumFmt = maNumFmts.get( nNumFmtId ).get() ) - pNumFmt->writeToPropertyMap( rPropMap ); -} - void NumberFormatsBuffer::insertBuiltinFormats() { // build a map containing pointers to all tables diff --git a/sc/source/filter/oox/pivotcachefragment.cxx b/sc/source/filter/oox/pivotcachefragment.cxx index cf230fa417da..4f4498d10ed4 100644 --- a/sc/source/filter/oox/pivotcachefragment.cxx +++ b/sc/source/filter/oox/pivotcachefragment.cxx @@ -323,61 +323,6 @@ void PivotCacheRecordsFragment::importPCRecordItem( sal_Int32 nRecId, SequenceIn } } -namespace { - -bool lclSeekToPCDField( BiffInputStream& rStrm ) -{ - sal_Int64 nRecHandle = rStrm.getRecHandle(); - while( rStrm.startNextRecord() ) - if( rStrm.getRecId() == BIFF_ID_PCDFIELD ) - return true; - rStrm.startRecordByHandle( nRecHandle ); - return false; -} - -} // namespace - -BiffPivotCacheFragment::BiffPivotCacheFragment( - const WorkbookHelper& rHelper, const OUString& rStrmName, PivotCache& rPivotCache ) : - BiffWorkbookFragmentBase( rHelper, rStrmName, true ), - mrPivotCache( rPivotCache ) -{ -} - -bool BiffPivotCacheFragment::importFragment() -{ - BiffInputStream& rStrm = getInputStream(); - if( rStrm.startNextRecord() && (rStrm.getRecId() == BIFF_ID_PCDEFINITION) ) - { - // read PCDEFINITION and optional PCDEFINITION2 records - mrPivotCache.importPCDefinition( rStrm ); - - // read cache fields as long as another PCDFIELD record can be found - while( lclSeekToPCDField( rStrm ) ) - mrPivotCache.createCacheField( true ).importPCDField( rStrm ); - - // finalize the cache (check source range etc.) - mrPivotCache.finalizeImport(); - - // load the cache records, if the cache is based on a deleted or an external worksheet - if( mrPivotCache.isValidDataSource() && mrPivotCache.isBasedOnDummySheet() ) - { - /* Last call of lclSeekToPCDField() failed and kept stream position - unchanged. Stream should point to source data table now. */ - sal_Int16 nSheet = mrPivotCache.getSourceRange().Sheet; - WorksheetGlobalsRef xSheetGlob = WorksheetHelper::constructGlobals( *this, ISegmentProgressBarRef(), SHEETTYPE_WORKSHEET, nSheet ); - if( xSheetGlob.get() ) - { - BiffPivotCacheRecordsContext aContext( *xSheetGlob, mrPivotCache ); - while( rStrm.startNextRecord() && (rStrm.getRecId() != BIFF_ID_EOF) ) - aContext.importRecord( rStrm ); - } - } - } - - return rStrm.getRecId() == BIFF_ID_EOF; -} - BiffPivotCacheRecordsContext::BiffPivotCacheRecordsContext( const WorksheetHelper& rHelper, const PivotCache& rPivotCache ) : BiffWorksheetContextBase( rHelper ), mrPivotCache( rPivotCache ), diff --git a/sc/source/filter/oox/stylesbuffer.cxx b/sc/source/filter/oox/stylesbuffer.cxx index 81ebec97223c..a00b0d56506c 100644 --- a/sc/source/filter/oox/stylesbuffer.cxx +++ b/sc/source/filter/oox/stylesbuffer.cxx @@ -1392,19 +1392,6 @@ bool ApiBorderData::hasAnyOuterBorder() const ( ( lcl_isBorder( maRight ) && maRight.OuterLineWidth > 0 ) ); } -bool operator==( const ApiBorderData& rLeft, const ApiBorderData& rRight ) -{ - return - (rLeft.maLeft == rRight.maLeft) && - (rLeft.maRight == rRight.maRight) && - (rLeft.maTop == rRight.maTop) && - (rLeft.maBottom == rRight.maBottom) && - (rLeft.maTLtoBR == rRight.maTLtoBR) && - (rLeft.maBLtoTR == rRight.maBLtoTR) && - (rLeft.mbBorderUsed == rRight.mbBorderUsed) && - (rLeft.mbDiagUsed == rRight.mbDiagUsed); -} - namespace { inline void lclSetBorderLineWidth( BorderLine& rBorderLine, @@ -1540,22 +1527,6 @@ void Border::fillToItemSet( SfxItemSet& rItemSet, bool bSkipPoolDefs ) const } } -void Border::writeToPropertyMap( PropertyMap& rPropMap ) const -{ - if( maApiData.mbBorderUsed ) - { - rPropMap.setProperty( PROP_LeftBorder, maApiData.maLeft); - rPropMap.setProperty( PROP_RightBorder, maApiData.maRight); - rPropMap.setProperty( PROP_TopBorder, maApiData.maTop); - rPropMap.setProperty( PROP_BottomBorder, maApiData.maBottom); - } - if( maApiData.mbDiagUsed ) - { - rPropMap.setProperty( PROP_DiagonalTLBR, maApiData.maTLtoBR); - rPropMap.setProperty( PROP_DiagonalBLTR, maApiData.maBLtoTR); - } -} - BorderLineModel* Border::getBorderLine( sal_Int32 nElement ) { switch( nElement ) @@ -1694,14 +1665,6 @@ ApiSolidFillData::ApiSolidFillData() : { } -bool operator==( const ApiSolidFillData& rLeft, const ApiSolidFillData& rRight ) -{ - return - (rLeft.mnColor == rRight.mnColor) && - (rLeft.mbTransparent == rRight.mbTransparent) && - (rLeft.mbUsed == rRight.mbUsed); -} - namespace { inline sal_Int32 lclGetMixedColorComp( sal_Int32 nPatt, sal_Int32 nFill, sal_Int32 nAlpha ) @@ -1939,15 +1902,6 @@ void Fill::fillToItemSet( SfxItemSet& rItemSet, bool bSkipPoolDefs ) const } } -void Fill::writeToPropertyMap( PropertyMap& rPropMap ) const -{ - if( maApiData.mbUsed ) - { - rPropMap.setProperty( PROP_CellBackColor, maApiData.mnColor); - rPropMap.setProperty( PROP_IsCellBackgroundTransparent, maApiData.mbTransparent); - } -} - XfModel::XfModel() : mnStyleXfId( -1 ), mnFontId( -1 ), diff --git a/sc/source/filter/oox/workbookhelper.cxx b/sc/source/filter/oox/workbookhelper.cxx index 4c3029646944..cc8bd240afa0 100644 --- a/sc/source/filter/oox/workbookhelper.cxx +++ b/sc/source/filter/oox/workbookhelper.cxx @@ -128,8 +128,6 @@ public: inline FilterBase& getBaseFilter() const { return mrBaseFilter; } /** Returns the filter progress bar. */ inline SegmentProgressBar& getProgressBar() const { return *mxProgressBar; } - /** Returns true, if the file is a multi-sheet document, or false if single-sheet. */ - inline bool isWorkbookFile() const { return mbWorkbook; } /** Returns the VBA project storage. */ const StorageRef& getVbaProjectStorage() const { return mxVbaPrjStrg; } /** Returns the index of the current Calc sheet, if filter currently processes a sheet. */ @@ -226,8 +224,6 @@ public: /** Returns the text encoding used to import/export byte strings. */ inline rtl_TextEncoding getTextEncoding() const { return meTextEnc; } - /** Returns the codec helper that stores the encoder/decoder object. */ - inline BiffCodecHelper& getCodecHelper() { return *mxCodecHelper; } private: /** Initializes some basic members and sets needed document properties. */ @@ -257,7 +253,6 @@ private: typedef ::std::unique_ptr< AddressConverter > AddressConvPtr; typedef ::std::unique_ptr< oox::drawingml::chart::ChartConverter > ExcelChartConvPtr; typedef ::std::unique_ptr< PageSettingsConverter > PageSettConvPtr; - typedef ::std::unique_ptr< BiffCodecHelper > BiffCodecHelperPtr; OUString maCellStyles; /// Style family name for cell styles. OUString maPageStyles; /// Style family name for page styles. @@ -300,7 +295,6 @@ private: XmlFilterBase* mpOoxFilter; /// Base OOXML/BIFF12 filter object. // BIFF2-BIFF8 specific - BiffCodecHelperPtr mxCodecHelper; /// Encoder/decoder helper. rtl_TextEncoding meTextEnc; /// BIFF byte string text encoding. ScDocument* mpDoc; ScDocShell* mpDocShell; @@ -664,11 +658,6 @@ SegmentProgressBar& WorkbookHelper::getProgressBar() const return mrBookGlob.getProgressBar(); } -bool WorkbookHelper::isWorkbookFile() const -{ - return mrBookGlob.isWorkbookFile(); -} - sal_Int16 WorkbookHelper::getCurrentSheetIndex() const { return mrBookGlob.getCurrentSheetIndex(); @@ -975,11 +964,6 @@ rtl_TextEncoding WorkbookHelper::getTextEncoding() const return mrBookGlob.getTextEncoding(); } -BiffCodecHelper& WorkbookHelper::getCodecHelper() const -{ - return mrBookGlob.getCodecHelper(); -} - } // namespace xls } // namespace oox diff --git a/sc/source/filter/oox/worksheethelper.cxx b/sc/source/filter/oox/worksheethelper.cxx index 43c8848fda1d..bd03be374b5a 100644 --- a/sc/source/filter/oox/worksheethelper.cxx +++ b/sc/source/filter/oox/worksheethelper.cxx @@ -374,7 +374,6 @@ private: private: typedef ::std::unique_ptr< VmlDrawing > VmlDrawingPtr; - typedef ::std::unique_ptr< BiffSheetDrawing > BiffSheetDrawingPtr; const OUString maSheetCellRanges; /// Service name for a SheetCellRanges object. const ScAddress& mrMaxApiPos; /// Reference to maximum Calc cell address from address converter. |