summaryrefslogtreecommitdiff
path: root/sw/source/core/undo
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/core/undo')
-rw-r--r--sw/source/core/undo/undel.cxx6
-rw-r--r--sw/source/core/undo/undobj.cxx3
-rw-r--r--sw/source/core/undo/unins.cxx3
-rw-r--r--sw/source/core/undo/unredln.cxx6
4 files changed, 6 insertions, 12 deletions
diff --git a/sw/source/core/undo/undel.cxx b/sw/source/core/undo/undel.cxx
index 0ccb11526bb6..884aab114253 100644
--- a/sw/source/core/undo/undel.cxx
+++ b/sw/source/core/undo/undel.cxx
@@ -215,8 +215,7 @@ SwUndoDelete::SwUndoDelete(
m_pHistory.reset( new SwHistory );
// delete all footnotes for now
- const SwPosition *pStt = rPam.Start(),
- *pEnd = rPam.End();
+ auto [pStt, pEnd] = rPam.StartEnd(); // SwPosition*
// Step 1. deletion/record of content indices
if( m_bDelFullPara )
@@ -531,8 +530,7 @@ bool SwUndoDelete::CanGrouping( SwDoc& rDoc, const SwPaM& rDelPam )
if( m_nSttNode != m_nEndNode || ( !m_bGroup && m_nSttContent+1 != m_nEndContent ))
return false;
- const SwPosition *pStt = rDelPam.Start(),
- *pEnd = rDelPam.End();
+ auto [pStt, pEnd] = rDelPam.StartEnd(); // SwPosition*
if( pStt->nNode != pEnd->nNode ||
pStt->nContent.GetIndex()+1 != pEnd->nContent.GetIndex() ||
diff --git a/sw/source/core/undo/undobj.cxx b/sw/source/core/undo/undobj.cxx
index 401dab1ec648..03a3c056ad2d 100644
--- a/sw/source/core/undo/undobj.cxx
+++ b/sw/source/core/undo/undobj.cxx
@@ -1423,8 +1423,7 @@ bool SwUndo::FillSaveData(
{
rSData.clear();
- const SwPosition* pStt = rRange.Start();
- const SwPosition* pEnd = rRange.End();
+ auto [pStt, pEnd] = rRange.StartEnd(); // SwPosition*
const SwRedlineTable& rTable = rRange.GetDoc().getIDocumentRedlineAccess().GetRedlineTable();
SwRedlineTable::size_type n = 0;
rRange.GetDoc().getIDocumentRedlineAccess().GetRedline( *pStt, &n );
diff --git a/sw/source/core/undo/unins.cxx b/sw/source/core/undo/unins.cxx
index 8338bfe44de2..762a2c12d5b2 100644
--- a/sw/source/core/undo/unins.cxx
+++ b/sw/source/core/undo/unins.cxx
@@ -587,8 +587,7 @@ SwUndoReplace::Impl::Impl(
, m_bRegExp(bRegExp)
{
- const SwPosition * pStt( rPam.Start() );
- const SwPosition * pEnd( rPam.End() );
+ auto [pStt, pEnd] = rPam.StartEnd(); // SwPosition*
m_nSttNd = m_nEndNd = pStt->nNode.GetIndex();
m_nSttCnt = pStt->nContent.GetIndex();
diff --git a/sw/source/core/undo/unredln.cxx b/sw/source/core/undo/unredln.cxx
index 1970eff02aeb..7203479b150e 100644
--- a/sw/source/core/undo/unredln.cxx
+++ b/sw/source/core/undo/unredln.cxx
@@ -333,8 +333,7 @@ void SwUndoRedlineSort::UndoRedlineImpl(SwDoc & rDoc, SwPaM & rPam)
// rPam contains the sorted range
// aSaveRange contains copied (i.e. original) range
- SwPosition *const pStart = rPam.Start();
- SwPosition *const pEnd = rPam.End();
+ auto [pStart, pEnd] = rPam.StartEnd(); // SwPosition*
SwNodeIndex aPrevIdx( pStart->nNode, -1 );
SwNodeOffset nOffsetTemp = pEnd->nNode.GetIndex() - pStart->nNode.GetIndex();
@@ -383,8 +382,7 @@ void SwUndoRedlineSort::UndoRedlineImpl(SwDoc & rDoc, SwPaM & rPam)
void SwUndoRedlineSort::RedoRedlineImpl(SwDoc & rDoc, SwPaM & rPam)
{
SwPaM* pPam = &rPam;
- SwPosition* pStart = pPam->Start();
- SwPosition* pEnd = pPam->End();
+ auto [pStart, pEnd] = pPam->StartEnd(); // SwPosition*
SwNodeIndex aPrevIdx( pStart->nNode, -1 );
SwNodeOffset nOffsetTemp = pEnd->nNode.GetIndex() - pStart->nNode.GetIndex();