[Libreoffice-commits] core.git: sc/source

Takeshi Abe tabe at fixedpoint.jp
Thu Aug 14 09:58:55 PDT 2014


 sc/source/filter/excel/xiescher.cxx |   12 ++++++------
 sc/source/filter/inc/xiescher.hxx   |   11 +++++++++--
 2 files changed, 15 insertions(+), 8 deletions(-)

New commits:
commit 6a686b41eeefa815b2635724e0abe6522fe1661b
Author: Takeshi Abe <tabe at fixedpoint.jp>
Date:   Fri Aug 15 00:43:26 2014 +0900

    fdo#75757: remove inheritance to std::vector
    
    Change-Id: I07daec0ced64d0ca6ad2dd06fd19a1c7366e5c31
    Reviewed-on: https://gerrit.libreoffice.org/10921
    Reviewed-by: David Tardon <dtardon at redhat.com>
    Tested-by: David Tardon <dtardon at redhat.com>

diff --git a/sc/source/filter/excel/xiescher.cxx b/sc/source/filter/excel/xiescher.cxx
index a8569d5..3f5a1f1 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 76847ce..d4da2dc 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 );


More information about the Libreoffice-commits mailing list