diff options
author | Takeshi Abe <tabe@fixedpoint.jp> | 2014-09-08 19:05:35 +0900 |
---|---|---|
committer | David Tardon <dtardon@redhat.com> | 2014-09-09 08:30:25 +0000 |
commit | c45be916f63477e7cd8b0fe54fd6935acf1526e4 (patch) | |
tree | ff37f7368f68086341b6ed5c46d0581f3af9ab8f /sc/source | |
parent | 9195fd3819197c14f6fc018483075c4be5bf85fd (diff) |
fdo#75757: remove inheritance to std::vector
from BinRangeList.
Change-Id: Ibfffceb583dc8a9c849aa4fd3eff56d73bcd5452
Reviewed-on: https://gerrit.libreoffice.org/11336
Reviewed-by: David Tardon <dtardon@redhat.com>
Tested-by: David Tardon <dtardon@redhat.com>
Diffstat (limited to 'sc/source')
-rw-r--r-- | sc/source/filter/inc/addressconverter.hxx | 10 | ||||
-rw-r--r-- | sc/source/filter/oox/addressconverter.cxx | 6 |
2 files changed, 11 insertions, 5 deletions
diff --git a/sc/source/filter/inc/addressconverter.hxx b/sc/source/filter/inc/addressconverter.hxx index d7919bc361bc..5afec562dc09 100644 --- a/sc/source/filter/inc/addressconverter.hxx +++ b/sc/source/filter/inc/addressconverter.hxx @@ -135,12 +135,18 @@ inline BiffInputStream& operator>>( BiffInputStream& rStrm, BinRange& orRange ) } /** A 2D cell range address list for binary filters. */ -class BinRangeList : public ::std::vector< BinRange > +class BinRangeList { public: - inline explicit BinRangeList() {} + inline explicit BinRangeList() : mvRanges() {} + + ::std::vector< BinRange >::const_iterator begin() const { return mvRanges.begin(); } + ::std::vector< BinRange >::const_iterator end() const { return mvRanges.end(); } void read( SequenceInputStream& rStrm ); + +private: + ::std::vector< BinRange > mvRanges; }; inline SequenceInputStream& operator>>( SequenceInputStream& rStrm, BinRangeList& orRanges ) diff --git a/sc/source/filter/oox/addressconverter.cxx b/sc/source/filter/oox/addressconverter.cxx index 20f4f74e2099..22e163250f95 100644 --- a/sc/source/filter/oox/addressconverter.cxx +++ b/sc/source/filter/oox/addressconverter.cxx @@ -101,8 +101,8 @@ void BinRange::read( BiffInputStream& rStrm, bool bCol16Bit, bool bRow32Bit ) void BinRangeList::read( SequenceInputStream& rStrm ) { sal_Int32 nCount = rStrm.readInt32(); - resize( getLimitedValue< size_t, sal_Int64 >( nCount, 0, rStrm.getRemaining() / 16 ) ); - for( iterator aIt = begin(), aEnd = end(); aIt != aEnd; ++aIt ) + mvRanges.resize( getLimitedValue< size_t, sal_Int64 >( nCount, 0, rStrm.getRemaining() / 16 ) ); + for( ::std::vector< BinRange >::iterator aIt = mvRanges.begin(), aEnd = mvRanges.end(); aIt != aEnd; ++aIt ) aIt->read( rStrm ); } @@ -478,7 +478,7 @@ void AddressConverter::convertToCellRangeList( ApiCellRangeList& orRanges, const BinRangeList& rBinRanges, sal_Int16 nSheet, bool bTrackOverflow ) { CellRangeAddress aRange; - for( BinRangeList::const_iterator aIt = rBinRanges.begin(), aEnd = rBinRanges.end(); aIt != aEnd; ++aIt ) + for( ::std::vector< BinRange >::const_iterator aIt = rBinRanges.begin(), aEnd = rBinRanges.end(); aIt != aEnd; ++aIt ) if( convertToCellRange( aRange, *aIt, nSheet, true, bTrackOverflow ) ) orRanges.push_back( aRange ); } |