sc/source/filter/inc/addressconverter.hxx | 10 ++++++++-- sc/source/filter/oox/addressconverter.cxx | 6 +++--- 2 files changed, 11 insertions(+), 5 deletions(-)
New commits: commit c45be916f63477e7cd8b0fe54fd6935acf1526e4 Author: Takeshi Abe <t...@fixedpoint.jp> Date: Mon Sep 8 19:05:35 2014 +0900 fdo#75757: remove inheritance to std::vector from BinRangeList. Change-Id: Ibfffceb583dc8a9c849aa4fd3eff56d73bcd5452 Reviewed-on: https://gerrit.libreoffice.org/11336 Reviewed-by: David Tardon <dtar...@redhat.com> Tested-by: David Tardon <dtar...@redhat.com> diff --git a/sc/source/filter/inc/addressconverter.hxx b/sc/source/filter/inc/addressconverter.hxx index d7919bc..5afec56 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 20f4f74..22e1632 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 ); } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits