From 3df5be9210ec0a057567f7f68aac445a77facb71 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Fri, 29 Jul 2022 12:08:28 +0200 Subject: 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 --- sw/source/filter/ww8/wrtw8nds.cxx | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'sw/source/filter/ww8/wrtw8nds.cxx') diff --git a/sw/source/filter/ww8/wrtw8nds.cxx b/sw/source/filter/ww8/wrtw8nds.cxx index 7366750d894b..cd48428cadb0 100644 --- a/sw/source/filter/ww8/wrtw8nds.cxx +++ b/sw/source/filter/ww8/wrtw8nds.cxx @@ -308,8 +308,7 @@ sal_Int32 SwWW8AttrIter::SearchNext( sal_Int32 nStartPos ) { const SwRangeRedline* pRedl = m_rExport.m_rDoc.getIDocumentRedlineAccess().GetRedlineTable()[ nRedLinePos ]; - const SwPosition* pStt = pRedl->Start(); - const SwPosition* pEnd = pRedl->End(); + auto [pStt, pEnd] = pRedl->StartEnd(); // SwPosition* if( pStt->nNode == m_rNode ) { @@ -1595,8 +1594,7 @@ const SwRedlineData* SwWW8AttrIter::GetRunLevelRedline( sal_Int32 nPos ) { const SwRangeRedline* pRedl = m_rExport.m_rDoc.getIDocumentRedlineAccess().GetRedlineTable()[ m_nCurRedlinePos ]; - const SwPosition* pStt = pRedl->Start(); - const SwPosition* pEnd = pRedl->End(); + auto [pStt, pEnd] = pRedl->StartEnd(); // SwPosition* if( pStt->nNode == m_rNode ) { @@ -1852,8 +1850,7 @@ static SwTextFormatColl& lcl_getFormatCollection( MSWordExportBase& rExport, con while( nPos < nMax ) { const SwRangeRedline* pRedl = rExport.m_rDoc.getIDocumentRedlineAccess().GetRedlineTable()[ nPos++ ]; - const SwPosition* pStt = pRedl->Start(); - const SwPosition* pEnd = pRedl->End(); + auto [pStt, pEnd] = pRedl->StartEnd(); // SwPosition* // Looking for deletions, which ends in current pTextNode if( RedlineType::Delete == pRedl->GetRedlineData().GetType() && pEnd->nNode == *pTextNode && pStt->nNode != *pTextNode && -- cgit v1.2.3