summaryrefslogtreecommitdiff
path: root/sw/source/core/doc/docruby.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2021-10-20 15:05:36 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-10-20 20:13:43 +0200
commit76513619c14ed131145f0f0440540221a00a8f39 (patch)
tree8b7aa5fe0c59a63a329192172839f796b494a974 /sw/source/core/doc/docruby.cxx
parent84304ee068b36c4f545e9e7e761ecde646b02db1 (diff)
make more use of SwPaM::End()
instead of open-coding the same thing Change-Id: I45ddc87317569c9ad6378eab1067ebea79c583f2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123894 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/source/core/doc/docruby.cxx')
-rw-r--r--sw/source/core/doc/docruby.cxx8
1 files changed, 2 insertions, 6 deletions
diff --git a/sw/source/core/doc/docruby.cxx b/sw/source/core/doc/docruby.cxx
index 122fd266e7ee..1a9f39c3aab7 100644
--- a/sw/source/core/doc/docruby.cxx
+++ b/sw/source/core/doc/docruby.cxx
@@ -52,9 +52,7 @@ sal_uInt16 SwDoc::FillRubyList( const SwPaM& rPam, SwRubyList& rList )
bool bCheckEmpty = &rPam != _pStartCursor;
do {
const SwPosition* pStt = _pStartCursor->Start(),
- * pEnd = pStt == _pStartCursor->GetPoint()
- ? _pStartCursor->GetMark()
- : _pStartCursor->GetPoint();
+ * pEnd = _pStartCursor->End();
if( !bCheckEmpty || ( pStt != pEnd && *pStt != *pEnd ))
{
SwPaM aPam( *pStt );
@@ -103,9 +101,7 @@ void SwDoc::SetRubyList( const SwPaM& rPam, const SwRubyList& rList )
bool bCheckEmpty = &rPam != _pStartCursor;
do {
const SwPosition* pStt = _pStartCursor->Start(),
- * pEnd = pStt == _pStartCursor->GetPoint()
- ? _pStartCursor->GetMark()
- : _pStartCursor->GetPoint();
+ * pEnd = _pStartCursor->End();
if( !bCheckEmpty || ( pStt != pEnd && *pStt != *pEnd ))
{