diff options
author | Petr Vorel <petr.vorel@gmail.com> | 2012-03-27 11:03:09 +0200 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2012-03-27 16:52:46 +0100 |
commit | 16410cdcb91b3d358ab2964deefe8d357cae613b (patch) | |
tree | 71a603da1ec9e74e1aadfc437f581ebd5b4f1c2f /sc/source | |
parent | 16244e7f241994fd0284b4ba77933d8fb2f25c1c (diff) |
remove unused code (oox, sc)
Diffstat (limited to 'sc/source')
-rw-r--r-- | sc/source/filter/inc/addressconverter.hxx | 1 | ||||
-rw-r--r-- | sc/source/filter/inc/biffoutputstream.hxx | 14 | ||||
-rw-r--r-- | sc/source/filter/inc/sheetdatabuffer.hxx | 10 | ||||
-rw-r--r-- | sc/source/filter/oox/addressconverter.cxx | 6 | ||||
-rw-r--r-- | sc/source/filter/oox/biffoutputstream.cxx | 23 | ||||
-rw-r--r-- | sc/source/filter/oox/sheetdatabuffer.cxx | 52 |
6 files changed, 1 insertions, 105 deletions
diff --git a/sc/source/filter/inc/addressconverter.hxx b/sc/source/filter/inc/addressconverter.hxx index e8108c76b375..3d2934deaec7 100644 --- a/sc/source/filter/inc/addressconverter.hxx +++ b/sc/source/filter/inc/addressconverter.hxx @@ -133,7 +133,6 @@ struct BinRange inline sal_Int32 getColCount() const { return maLast.mnCol - maFirst.mnCol + 1; } inline sal_Int32 getRowCount() const { return maLast.mnRow - maFirst.mnRow + 1; } - bool contains( const BinAddress& rAddr ) const; void read( SequenceInputStream& rStrm ); void read( BiffInputStream& rStrm, bool bCol16Bit = true, bool bRow32Bit = false ); diff --git a/sc/source/filter/inc/biffoutputstream.hxx b/sc/source/filter/inc/biffoutputstream.hxx index f7a64625dea9..7ea14a13aef2 100644 --- a/sc/source/filter/inc/biffoutputstream.hxx +++ b/sc/source/filter/inc/biffoutputstream.hxx @@ -46,10 +46,6 @@ namespace prv { class BiffOutputRecordBuffer { public: - explicit BiffOutputRecordBuffer( - BinaryOutputStream& rOutStrm, - sal_uInt16 nMaxRecSize ); - /** Returns the wrapped binary base stream. */ inline const BinaryOutputStream& getBaseStream() const { return mrOutStrm; } @@ -86,8 +82,6 @@ private: maximum size of BIFF record contents (e.g. 2080 bytes in BIFF2-BIFF5, or 8224 bytes in BIFF8). - To start writing a record, call startRecord() with the record identifier. - If some data exceeds the record size limit, a CONTINUE record will be started automatically and the new data will be written to this record. If specific data pieces must not be split into the current and a following @@ -100,17 +94,9 @@ class BiffOutputStream : public BinaryOutputStream public: // record control --------------------------------------------------------- - /** Starts a new record. */ - void startRecord( sal_uInt16 nRecId ); - /** Sets size of data portion in bytes. 0 or 1 means no portions are used. */ void setPortionSize( sal_uInt8 nSize ); - // BinaryStreamBase interface (seeking) ----------------------------------- - - /** Returns the absolute position in the wrapped binary stream. */ - sal_Int64 tellBase() const; - // BinaryOutputStream interface (stream write access) --------------------- /** Writes the passed data sequence. */ diff --git a/sc/source/filter/inc/sheetdatabuffer.hxx b/sc/source/filter/inc/sheetdatabuffer.hxx index ac7fc81a9f4b..05ccc19cbb60 100644 --- a/sc/source/filter/inc/sheetdatabuffer.hxx +++ b/sc/source/filter/inc/sheetdatabuffer.hxx @@ -95,14 +95,6 @@ struct DataTableModel class CellBlock : public WorksheetHelper { public: - explicit CellBlock( const WorksheetHelper& rHelper, const ValueRange& rColSpan, sal_Int32 nRow ); - - /** Returns true, if the end index of the passed colspan is greater than - the own column end index, or if the passed range has the same end index - but the start indexes do not match. */ - bool isBefore( const ValueRange& rColSpan ) const; - /** Returns true, if the cell block can be expanded with the passed colspan. */ - bool isExpandable( const ValueRange& rColSpan ) const; /** Returns true, if the own colspan contains the passed column. */ bool contains( sal_Int32 nCol ) const; @@ -114,8 +106,6 @@ public: const RichStringRef& rxString, const Font* pFirstPortionFont ); - /** Appends a new row to the cell buffer array. */ - void startNextRow(); /** Writes all buffered cells into the Calc sheet. */ void finalizeImport(); diff --git a/sc/source/filter/oox/addressconverter.cxx b/sc/source/filter/oox/addressconverter.cxx index 9f0c09c89f20..e566f07a33e7 100644 --- a/sc/source/filter/oox/addressconverter.cxx +++ b/sc/source/filter/oox/addressconverter.cxx @@ -148,12 +148,6 @@ void BinAddress::write( BiffOutputStream& rStrm, bool bCol16Bit, bool bRow32Bit // ============================================================================ -bool BinRange::contains( const BinAddress& rAddr ) const -{ - return (maFirst.mnCol <= rAddr.mnCol) && (rAddr.mnCol <= maLast.mnCol) && - (maFirst.mnRow <= rAddr.mnRow) && (rAddr.mnRow <= maLast.mnRow); -} - void BinRange::read( SequenceInputStream& rStrm ) { rStrm >> maFirst.mnRow >> maLast.mnRow >> maFirst.mnCol >> maLast.mnCol; diff --git a/sc/source/filter/oox/biffoutputstream.cxx b/sc/source/filter/oox/biffoutputstream.cxx index 0b2524cbef36..7fd233d4742e 100644 --- a/sc/source/filter/oox/biffoutputstream.cxx +++ b/sc/source/filter/oox/biffoutputstream.cxx @@ -35,16 +35,6 @@ namespace xls { namespace prv { -BiffOutputRecordBuffer::BiffOutputRecordBuffer( BinaryOutputStream& rOutStrm, sal_uInt16 nMaxRecSize ) : - mrOutStrm( rOutStrm ), - mnMaxRecSize( nMaxRecSize ), - mnRecId( BIFF_ID_UNKNOWN ), - mbInRec( false ) -{ - OSL_ENSURE( mrOutStrm.isSeekable(), "BiffOutputRecordBuffer::BiffOutputRecordBuffer - stream must be seekable" ); - maData.reserve( SAL_MAX_UINT16 ); -} - void BiffOutputRecordBuffer::startRecord( sal_uInt16 nRecId ) { OSL_ENSURE( !mbInRec, "BiffOutputRecordBuffer::startRecord - another record still open" ); @@ -87,12 +77,6 @@ void BiffOutputRecordBuffer::fill( sal_uInt8 nValue, sal_uInt16 nBytes ) // record control ------------------------------------------------------------- -void BiffOutputStream::startRecord( sal_uInt16 nRecId ) -{ - maRecBuffer.startRecord( nRecId ); - setPortionSize( 1 ); -} - void BiffOutputStream::setPortionSize( sal_uInt8 nSize ) { OSL_ENSURE( mnPortionPos == 0, "BiffOutputStream::setPortionSize - block operation inside portion" ); @@ -100,13 +84,6 @@ void BiffOutputStream::setPortionSize( sal_uInt8 nSize ) mnPortionPos = 0; } -// BinaryStreamBase interface (seeking) --------------------------------------- - -sal_Int64 BiffOutputStream::tellBase() const -{ - return maRecBuffer.getBaseStream().tell(); -} - // BinaryOutputStream interface (stream write access) ------------------------- void BiffOutputStream::writeData( const StreamDataSequence& rData, size_t nAtomSize ) diff --git a/sc/source/filter/oox/sheetdatabuffer.cxx b/sc/source/filter/oox/sheetdatabuffer.cxx index fbae5b15aa97..b0f778dc212b 100644 --- a/sc/source/filter/oox/sheetdatabuffer.cxx +++ b/sc/source/filter/oox/sheetdatabuffer.cxx @@ -117,28 +117,6 @@ const sal_Int32 CELLBLOCK_MAXROWS = 16; /// Number of rows in a cell block. } // namespace -CellBlock::CellBlock( const WorksheetHelper& rHelper, const ValueRange& rColSpan, sal_Int32 nRow ) : - WorksheetHelper( rHelper ), - maRange( rHelper.getSheetIndex(), rColSpan.mnFirst, nRow, rColSpan.mnLast, nRow ), - mnRowLength( rColSpan.mnLast - rColSpan.mnFirst + 1 ), - mnFirstFreeIndex( 0 ) -{ - maCellArray.realloc( 1 ); - maCellArray[ 0 ].realloc( mnRowLength ); - mpCurrCellRow = maCellArray[ 0 ].getArray(); -} - -bool CellBlock::isExpandable( const ValueRange& rColSpan ) const -{ - return (maRange.StartColumn == rColSpan.mnFirst) && (maRange.EndColumn == rColSpan.mnLast); -} - -bool CellBlock::isBefore( const ValueRange& rColSpan ) const -{ - return (maRange.EndColumn < rColSpan.mnLast) || - ((maRange.EndColumn == rColSpan.mnLast) && (maRange.StartColumn != rColSpan.mnFirst)); -} - bool CellBlock::contains( sal_Int32 nCol ) const { return (maRange.StartColumn <= nCol) && (nCol <= maRange.EndColumn); @@ -149,30 +127,6 @@ void CellBlock::insertRichString( const CellAddress& rAddress, const RichStringR maRichStrings.push_back( RichStringCell( rAddress, rxString, pFirstPortionFont ) ); } -void CellBlock::startNextRow() -{ - // fill last cells in current row with empty strings (placeholder for empty cells) - fillUnusedCells( mnRowLength ); - // flush if the cell block reaches maximum size - if( maCellArray.getLength() == CELLBLOCK_MAXROWS ) - { - finalizeImport(); - maRange.StartRow = ++maRange.EndRow; - maCellArray.realloc( 1 ); - mpCurrCellRow = maCellArray[ 0 ].getArray(); - } - else - { - // prepare next row - ++maRange.EndRow; - sal_Int32 nRowCount = maCellArray.getLength(); - maCellArray.realloc( nRowCount + 1 ); - maCellArray[ nRowCount ].realloc( mnRowLength ); - mpCurrCellRow = maCellArray[ nRowCount ].getArray(); - } - mnFirstFreeIndex = 0; -} - Any& CellBlock::getCellAny( sal_Int32 nCol ) { OSL_ENSURE( contains( nCol ), "CellBlock::getCellAny - invalid column" ); @@ -275,11 +229,7 @@ CellBlock* CellBlockBuffer::getCellBlock( const CellAddress& rCellAddr ) { const ValueRange& rColSpan = *aVIt; /* Finalize and remove all cell blocks up to end of the column - range (cell blocks are keyed by end column index). - CellBlock::isBefore() returns true, if the end index of the - passed colspan is greater than the column end index of the - cell block, or if the passed range has the same end index - but the start indexes do not match. */ + range (cell blocks are keyed by end column index). */ while( (aMIt != maCellBlocks.end()) && aMIt->second->isBefore( rColSpan ) ) { aMIt->second->finalizeImport(); |