editeng/source/editeng/editdoc.cxx |    5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

New commits:
commit 89b9302ccf870c4fdbc1071751536b80429a7d27
Author:     Tomaž Vajngerl <tomaz.vajng...@collabora.co.uk>
AuthorDate: Fri Jan 5 11:59:46 2024 +0900
Commit:     Tomaž Vajngerl <qui...@gmail.com>
CommitDate: Wed Jan 10 03:40:40 2024 +0100

    editeng: move for loop to range based
    
    Change-Id: I6d997d6315f8d5043de33fe43b6aaabf5bef7cdd
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161820
    Tested-by: Jenkins
    Reviewed-by: Tomaž Vajngerl <qui...@gmail.com>

diff --git a/editeng/source/editeng/editdoc.cxx 
b/editeng/source/editeng/editdoc.cxx
index efc95b944833..7dbee3890a6c 100644
--- a/editeng/source/editeng/editdoc.cxx
+++ b/editeng/source/editeng/editdoc.cxx
@@ -892,11 +892,10 @@ void EditDoc::CreateDefFont( bool bUseStyles )
     maDefFont.SetVertical( IsEffectivelyVertical() );
     maDefFont.SetOrientation( Degree10(IsEffectivelyVertical() ? 
(IsTopToBottom() ? 2700 : 900) : 0) );
 
-    for ( sal_Int32 nNode = 0; nNode < Count(); nNode++ )
+    for (std::unique_ptr<ContentNode>& pNode : maContents)
     {
-        ContentNode* pNode = GetObject( nNode );
         pNode->GetCharAttribs().GetDefFont() = maDefFont;
-        if ( bUseStyles )
+        if (bUseStyles)
             pNode->CreateDefFont();
     }
 }

Reply via email to