diff options
author | Caolán McNamara <caolan.mcnamara@collabora.com> | 2024-11-14 09:29:10 +0000 |
---|---|---|
committer | Caolán McNamara <caolan.mcnamara@collabora.com> | 2024-11-16 22:14:03 +0100 |
commit | 0847c140a16ddc2d39ebfbacd432efb50f25d64c (patch) | |
tree | 65d01e5ee81963f29b8001ce33d2dc9d89d4efa1 /sw/source | |
parent | f0019607e2e39843d7bde7fae31728fd70922254 (diff) |
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.mcnamara@collabora.com>
Tested-by: Jenkins
Diffstat (limited to 'sw/source')
-rw-r--r-- | sw/source/core/doc/docruby.cxx | 8 |
1 files changed, 6 insertions, 2 deletions
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); |