diff options
author | Takeshi Abe <tabe@fixedpoint.jp> | 2014-08-15 00:43:26 +0900 |
---|---|---|
committer | David Tardon <dtardon@redhat.com> | 2014-08-14 11:58:30 -0500 |
commit | 6a686b41eeefa815b2635724e0abe6522fe1661b (patch) | |
tree | ec9f9f528f54e91cbea38a60d9094db5bffa4e37 /sc | |
parent | 536e9ed46f021e99537d370879a6877fd93472ea (diff) |
fdo#75757: remove inheritance to std::vector
Change-Id: I07daec0ced64d0ca6ad2dd06fd19a1c7366e5c31
Reviewed-on: https://gerrit.libreoffice.org/10921
Reviewed-by: David Tardon <dtardon@redhat.com>
Tested-by: David Tardon <dtardon@redhat.com>
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/filter/excel/xiescher.cxx | 12 | ||||
-rw-r--r-- | sc/source/filter/inc/xiescher.hxx | 11 |
2 files changed, 15 insertions, 8 deletions
diff --git a/sc/source/filter/excel/xiescher.cxx b/sc/source/filter/excel/xiescher.cxx index a8569d5e143f..3f5a1f1a2818 100644 --- a/sc/source/filter/excel/xiescher.cxx +++ b/sc/source/filter/excel/xiescher.cxx @@ -965,17 +965,17 @@ void XclImpDrawObjBase::ImplReadObj8( XclImpStream& rStrm ) void XclImpDrawObjVector::InsertGrouped( XclImpDrawObjRef xDrawObj ) { - if( !empty() ) - if( XclImpGroupObj* pGroupObj = dynamic_cast< XclImpGroupObj* >( back().get() ) ) + if( !mObjs.empty() ) + if( XclImpGroupObj* pGroupObj = dynamic_cast< XclImpGroupObj* >( mObjs.back().get() ) ) if( pGroupObj->TryInsert( xDrawObj ) ) return; - push_back( xDrawObj ); + mObjs.push_back( xDrawObj ); } sal_Size XclImpDrawObjVector::GetProgressSize() const { sal_Size nProgressSize = 0; - for( const_iterator aIt = begin(), aEnd = end(); aIt != aEnd; ++aIt ) + for( ::std::vector< XclImpDrawObjRef >::const_iterator aIt = mObjs.begin(), aEnd = mObjs.end(); aIt != aEnd; ++aIt ) nProgressSize += (*aIt)->GetProgressSize(); return nProgressSize; } @@ -1036,7 +1036,7 @@ SdrObject* XclImpGroupObj::DoCreateSdrObj( XclImpDffConverter& rDffConv, const R TSdrObjectPtr< SdrObjGroup > xSdrObj( new SdrObjGroup ); // child objects in BIFF2-BIFF5 have absolute size, not needed to pass own anchor rectangle SdrObjList& rObjList = *xSdrObj->GetSubList(); // SdrObjGroup always returns existing sublist - for( XclImpDrawObjVector::const_iterator aIt = maChildren.begin(), aEnd = maChildren.end(); aIt != aEnd; ++aIt ) + for( ::std::vector< XclImpDrawObjRef >::const_iterator aIt = maChildren.begin(), aEnd = maChildren.end(); aIt != aEnd; ++aIt ) rDffConv.ProcessObject( rObjList, **aIt ); rDffConv.Progress(); return xSdrObj.release(); @@ -3299,7 +3299,7 @@ void XclImpDffConverter::ProcessObject( SdrObjList& rObjList, const XclImpDrawOb void XclImpDffConverter::ProcessDrawing( const XclImpDrawObjVector& rDrawObjs ) { SdrPage& rSdrPage = GetConvData().mrSdrPage; - for( XclImpDrawObjVector::const_iterator aIt = rDrawObjs.begin(), aEnd = rDrawObjs.end(); aIt != aEnd; ++aIt ) + for( ::std::vector< XclImpDrawObjRef >::const_iterator aIt = rDrawObjs.begin(), aEnd = rDrawObjs.end(); aIt != aEnd; ++aIt ) ProcessObject( rSdrPage, **aIt ); } diff --git a/sc/source/filter/inc/xiescher.hxx b/sc/source/filter/inc/xiescher.hxx index 76847ce5ea3c..d4da2dc557e7 100644 --- a/sc/source/filter/inc/xiescher.hxx +++ b/sc/source/filter/inc/xiescher.hxx @@ -202,10 +202,17 @@ private: bool mbCustomDff; /// true = Recreate SdrObject in DFF import. }; -class XclImpDrawObjVector : public ::std::vector< XclImpDrawObjRef > +class XclImpDrawObjVector { +private: + ::std::vector< XclImpDrawObjRef > mObjs; + public: - inline explicit XclImpDrawObjVector() {} + inline explicit XclImpDrawObjVector() : mObjs() {} + + ::std::vector< XclImpDrawObjRef >::const_iterator begin() const { return mObjs.begin(); } + ::std::vector< XclImpDrawObjRef >::const_iterator end() const { return mObjs.end(); } + void push_back(const XclImpDrawObjRef& rObj) { mObjs.push_back(rObj); } /** Tries to insert the passed object into the last group or appends it. */ void InsertGrouped( XclImpDrawObjRef xDrawObj ); |