summaryrefslogtreecommitdiff
path: root/sw/source/core/access
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2022-07-29 12:08:28 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2022-07-29 13:20:56 +0200
commit3df5be9210ec0a057567f7f68aac445a77facb71 (patch)
treeec1bb8621366296d10bfaabdcf64ff0c04ecac34 /sw/source/core/access
parentaf65e892dcf729a4b65198379d2155163460bf5e (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/access')
-rw-r--r--sw/source/core/access/accmap.cxx3
1 files changed, 1 insertions, 2 deletions
diff --git a/sw/source/core/access/accmap.cxx b/sw/source/core/access/accmap.cxx
index d5c30b9d9be0..acd5c3fc7d9b 100644
--- a/sw/source/core/access/accmap.cxx
+++ b/sw/source/core/access/accmap.cxx
@@ -3277,8 +3277,7 @@ std::unique_ptr<SwAccessibleSelectedParas_Impl> SwAccessibleMap::BuildSelectedPa
pCursor->GetPoint()->nNode.GetNode().IsTextNode() &&
pCursor->GetMark()->nNode.GetNode().IsTextNode() )
{
- SwPosition* pStartPos = pCursor->Start();
- SwPosition* pEndPos = pCursor->End();
+ auto [pStartPos, pEndPos] = pCursor->StartEnd(); // SwPosition*
// loop on all text nodes inside the selection
SwNodeIndex aIdx( pStartPos->nNode );
for ( ; aIdx.GetIndex() <= pEndPos->nNode.GetIndex(); ++aIdx )