summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sw/source/core/doc/docruby.cxx8
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);