sw/source/core/doc/docruby.cxx |    8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

New commits:
commit 0847c140a16ddc2d39ebfbacd432efb50f25d64c
Author:     Caolán McNamara <caolan.mcnam...@collabora.com>
AuthorDate: Thu Nov 14 09:29:10 2024 +0000
Commit:     Caolán McNamara <caolan.mcnam...@collabora.com>
CommitDate: Sat Nov 16 22:14:03 2024 +0100

    cid#1371295 avoid Missing move assignment operator
    
    Change-Id: I27cca1b737c441a9f31ed6aa0fc462190ca818da
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176682
    Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com>
    Tested-by: Jenkins

diff --git a/sw/source/core/doc/docruby.cxx b/sw/source/core/doc/docruby.cxx
index ccfa1b67fea7..13a9b2eefe9d 100644
--- a/sw/source/core/doc/docruby.cxx
+++ b/sw/source/core/doc/docruby.cxx
@@ -221,8 +221,12 @@ void SwDoc::SetRubyList(SwPaM& rPam, const SwRubyList& 
rList)
 
     // Expand selection to account for insertion
     rPam.Normalize();
-    // coverity[swapped_arguments : FALSE] - this is in the correct order
-    rPam = SwPaM{ *aOrigPam.GetPoint(), *rPam.GetMark() };
+
+    if( !rPam.HasMark() )
+        rPam.SetMark();
+    rPam.Exchange();
+    *rPam.GetMark() = *aOrigPam.GetPoint();
+
     if (*rPam.GetPoint() == *rPam.GetMark())
     {
         rPam.GetPoint()->AdjustContent(-nTotalContentGrowth);

Reply via email to