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

Julien Nabet serval2412 at yahoo.fr
Sun Dec 10 13:49:08 UTC 2017


 sw/source/uibase/lingu/sdrhhcwrap.cxx |    9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

New commits:
commit 01b64e5f5e3658810c7e66c6577705764ef7e288
Author: Julien Nabet <serval2412 at yahoo.fr>
Date:   Sun Dec 10 13:21:01 2017 +0100

    Use for range loop in sdrhhcwrap (sw)
    
    Change-Id: I806dc071ab825fb689bdcee97f2db82518165245
    Reviewed-on: https://gerrit.libreoffice.org/46186
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Julien Nabet <serval2412 at yahoo.fr>

diff --git a/sw/source/uibase/lingu/sdrhhcwrap.cxx b/sw/source/uibase/lingu/sdrhhcwrap.cxx
index 6aae8d3aa34c..eab365ffaeb2 100644
--- a/sw/source/uibase/lingu/sdrhhcwrap.cxx
+++ b/sw/source/uibase/lingu/sdrhhcwrap.cxx
@@ -125,15 +125,14 @@ bool SdrHHCWrapper::ConvertNextDocument()
 
     std::list<SdrTextObj*> aTextObjs;
     SwDrawContact::GetTextObjectsFromFormat( aTextObjs, pView->GetDocShell()->GetDoc() );
-    for ( std::list<SdrTextObj*>::iterator aIt = aTextObjs.begin(); aIt != aTextObjs.end(); ++aIt )
+    for (auto const& textObj : aTextObjs)
     {
-        pTextObj = (*aIt);
-        if ( pTextObj )
+        if (textObj)
         {
-            OutlinerParaObject* pParaObj = pTextObj->GetOutlinerParaObject();
+            OutlinerParaObject* pParaObj = textObj->GetOutlinerParaObject();
             if ( pParaObj )
             {
-                SetPaperSize( pTextObj->GetLogicRect().GetSize() );
+                SetPaperSize( textObj->GetLogicRect().GetSize() );
                 SetText( *pParaObj );
 
                 ClearModifyFlag();


More information about the Libreoffice-commits mailing list