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

Mike Kaganski (via logerrit) logerrit at kemper.freedesktop.org
Wed Jul 21 19:36:12 UTC 2021


 editeng/source/editeng/impedit4.cxx |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 1c7a9ac8594f12329dcba0516071e9562ee8df70
Author:     Mike Kaganski <mike.kaganski at collabora.com>
AuthorDate: Wed Jul 21 15:56:04 2021 +0300
Commit:     Mike Kaganski <mike.kaganski at collabora.com>
CommitDate: Wed Jul 21 21:35:37 2021 +0200

    Use Append here instead of Insert
    
    The containers are filled after resetting them.
    
    Change-Id: I6cd17fd47a84e755788a3b58fe72b451d6267e99
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119323
    Tested-by: Jenkins
    Reviewed-by: Mike Kaganski <mike.kaganski at collabora.com>

diff --git a/editeng/source/editeng/impedit4.cxx b/editeng/source/editeng/impedit4.cxx
index bda54e123304..962939fa1914 100644
--- a/editeng/source/editeng/impedit4.cxx
+++ b/editeng/source/editeng/impedit4.cxx
@@ -1304,7 +1304,7 @@ EditSelection ImpEditEngine::InsertTextObject( const EditTextObject& rTextObject
                 {
                     const TextPortion& rTextPortion = rXP.aTextPortions[_n];
                     TextPortion* pNew = new TextPortion( rTextPortion );
-                    rParaPortion.GetTextPortions().Insert(_n, pNew);
+                    rParaPortion.GetTextPortions().Append(pNew);
                 }
 
                 // The lines
@@ -1315,7 +1315,7 @@ EditSelection ImpEditEngine::InsertTextObject( const EditTextObject& rTextObject
                     const EditLine& rLine = rXP.aLines[m];
                     EditLine* pNew = rLine.Clone();
                     pNew->SetInvalid(); // Paint again!
-                    rParaPortion.GetLines().Insert(m, pNew);
+                    rParaPortion.GetLines().Append(pNew);
                 }
 #ifdef DBG_UTIL
                 sal_uInt16 nTest;


More information about the Libreoffice-commits mailing list