diff options
Diffstat (limited to 'sw/source/core/edit')
-rw-r--r-- | sw/source/core/edit/edattr.cxx | 3 | ||||
-rw-r--r-- | sw/source/core/edit/edlingu.cxx | 3 | ||||
-rw-r--r-- | sw/source/core/edit/edsect.cxx | 6 | ||||
-rw-r--r-- | sw/source/core/edit/edtox.cxx | 3 |
4 files changed, 5 insertions, 10 deletions
diff --git a/sw/source/core/edit/edattr.cxx b/sw/source/core/edit/edattr.cxx index 9818a621b049..dbb4bfa67edf 100644 --- a/sw/source/core/edit/edattr.cxx +++ b/sw/source/core/edit/edattr.cxx @@ -666,8 +666,7 @@ SvtScriptType SwEditShell::GetScriptType() const { for(SwPaM& rPaM : GetCursor()->GetRingContainer()) { - const SwPosition *pStt = rPaM.Start(), - *pEnd = rPaM.End(); + auto [pStt, pEnd] = rPaM.StartEnd(); // SwPosition* if( pStt == pEnd || *pStt == *pEnd ) { const SwTextNode* pTNd = pStt->nNode.GetNode().GetTextNode(); diff --git a/sw/source/core/edit/edlingu.cxx b/sw/source/core/edit/edlingu.cxx index 1c946b2d4592..1e611653420a 100644 --- a/sw/source/core/edit/edlingu.cxx +++ b/sw/source/core/edit/edlingu.cxx @@ -550,8 +550,7 @@ void SwHyphIter::InsertSoftHyph( const sal_Int32 nHyphPos ) return; SwPaM *pCursor = pMySh->GetCursor(); - SwPosition* pSttPos = pCursor->Start(); - SwPosition* pEndPos = pCursor->End(); + auto [pSttPos, pEndPos] = pCursor->StartEnd(); // SwPosition* const sal_Int32 nLastHyphLen = GetEnd()->nContent.GetIndex() - pSttPos->nContent.GetIndex(); diff --git a/sw/source/core/edit/edsect.cxx b/sw/source/core/edit/edsect.cxx index 71541b4de96d..2ea498dfd4f3 100644 --- a/sw/source/core/edit/edsect.cxx +++ b/sw/source/core/edit/edsect.cxx @@ -179,8 +179,7 @@ void SwEditShell::SetSectionAttr( const SfxItemSet& rSet, for(SwPaM& rPaM : GetCursor()->GetRingContainer()) { - const SwPosition* pStt = rPaM.Start(), - * pEnd = rPaM.End(); + auto [pStt, pEnd] = rPaM.StartEnd(); // SwPosition* SwSectionNode* pSttSectNd = pStt->nNode.GetNode().FindSectionNode(), * pEndSectNd = pEnd->nNode.GetNode().FindSectionNode(); @@ -250,8 +249,7 @@ sal_uInt16 SwEditShell::GetFullSelectedSectionCount() const for(SwPaM& rPaM : GetCursor()->GetRingContainer()) { - const SwPosition* pStt = rPaM.Start(), - * pEnd = rPaM.End(); + auto [pStt, pEnd] = rPaM.StartEnd(); // SwPosition* const SwContentNode* pCNd; // check the selection, if Start at Node begin and End at Node end if( pStt->nContent.GetIndex() || diff --git a/sw/source/core/edit/edtox.cxx b/sw/source/core/edit/edtox.cxx index 38c9e7dd82be..655a6dfd0174 100644 --- a/sw/source/core/edit/edtox.cxx +++ b/sw/source/core/edit/edtox.cxx @@ -57,8 +57,7 @@ void SwEditShell::Insert(const SwTOXMark& rMark) StartAllAction(); for(SwPaM& rPaM : GetCursor()->GetRingContainer()) { - const SwPosition *pStt = rPaM.Start(), - *pEnd = rPaM.End(); + auto [pStt, pEnd] = rPaM.StartEnd(); // SwPosition* if( bInsAtPos ) { SwPaM aTmp( *pStt ); |