[Libreoffice-commits] .: sc/source

Kohei Yoshida kohei at kemper.freedesktop.org
Mon Jun 13 21:07:57 PDT 2011


 sc/source/filter/xcl97/xcl97rec.cxx |    5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

New commits:
commit ac3e93af780d1105e3c7140b698ca8bb661c221e
Author: Kohei Yoshida <kyoshida at novell.com>
Date:   Tue Jun 14 00:07:36 2011 -0400

    Replaced manual loop with for_each.

diff --git a/sc/source/filter/xcl97/xcl97rec.cxx b/sc/source/filter/xcl97/xcl97rec.cxx
index ff72888..2187bdf 100644
--- a/sc/source/filter/xcl97/xcl97rec.cxx
+++ b/sc/source/filter/xcl97/xcl97rec.cxx
@@ -77,6 +77,7 @@
 #include "docoptio.hxx"
 #include "patattr.hxx"
 #include "tabprotection.hxx"
+#include "stlalgorithm.hxx"
 
 #include <com/sun/star/sheet/XCellAddressable.hpp>
 #include <com/sun/star/sheet/XCellRangeAddressable.hpp>
@@ -118,9 +119,7 @@ XclExpObjList::XclExpObjList( const XclExpRoot& rRoot, XclEscherEx& rEscherEx )
 
 XclExpObjList::~XclExpObjList()
 {
-    std::vector<XclObj*>::iterator pIter;
-    for ( pIter = maObjs.begin(); pIter != maObjs.end(); ++pIter )
-        delete *pIter;
+    ::std::for_each(maObjs.begin(), maObjs.end(), ScDeleteObjectByPtr<XclObj>());
     delete pMsodrawingPerSheet;
     delete pSolverContainer;
 }


More information about the Libreoffice-commits mailing list