diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-07-29 12:08:28 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-07-29 13:20:56 +0200 |
commit | 3df5be9210ec0a057567f7f68aac445a77facb71 (patch) | |
tree | ec1bb8621366296d10bfaabdcf64ff0c04ecac34 /sw/source/core/doc/docruby.cxx | |
parent | af65e892dcf729a4b65198379d2155163460bf5e (diff) |
use more SwPaM::StartEnd
which is more efficient than calling Start() and End() separately
Change-Id: I41c99527bcb37728bb9a87f63ed654e0be3d1f0b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137614
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.cxx | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/sw/source/core/doc/docruby.cxx b/sw/source/core/doc/docruby.cxx index e0296697b281..2e5e084faeea 100644 --- a/sw/source/core/doc/docruby.cxx +++ b/sw/source/core/doc/docruby.cxx @@ -51,8 +51,7 @@ sal_uInt16 SwDoc::FillRubyList( const SwPaM& rPam, SwRubyList& rList ) *_pStartCursor2 = _pStartCursor; bool bCheckEmpty = &rPam != _pStartCursor; do { - const SwPosition* pStt = _pStartCursor->Start(), - * pEnd = _pStartCursor->End(); + auto [pStt, pEnd] = _pStartCursor->StartEnd(); // SwPosition* if( !bCheckEmpty || ( pStt != pEnd && *pStt != *pEnd )) { SwPaM aPam( *pStt ); @@ -100,8 +99,7 @@ void SwDoc::SetRubyList( const SwPaM& rPam, const SwRubyList& rList ) *_pStartCursor2 = _pStartCursor; bool bCheckEmpty = &rPam != _pStartCursor; do { - const SwPosition* pStt = _pStartCursor->Start(), - * pEnd = _pStartCursor->End(); + auto [pStt, pEnd] = _pStartCursor->StartEnd(); // SwPosition* if( !bCheckEmpty || ( pStt != pEnd && *pStt != *pEnd )) { |