diff options
Diffstat (limited to 'sw/source/core/undo/undel.cxx')
-rw-r--r-- | sw/source/core/undo/undel.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sw/source/core/undo/undel.cxx b/sw/source/core/undo/undel.cxx index 6787c6a3125b..809b0848dcc5 100644 --- a/sw/source/core/undo/undel.cxx +++ b/sw/source/core/undo/undel.cxx @@ -376,7 +376,7 @@ bool SwUndoDelete::SaveContent( const SwPosition* pStt, const SwPosition* pEnd, pHistory->CopyFormatAttr( *pSttTextNd->GetpSwAttrSet(), nNdIdx ); // the length might have changed (!!Fields!!) - sal_Int32 nLen = ((bOneNode) + sal_Int32 nLen = (bOneNode ? pEnd->nContent.GetIndex() : pSttTextNd->GetText().getLength()) - pStt->nContent.GetIndex(); @@ -392,7 +392,7 @@ bool SwUndoDelete::SaveContent( const SwPosition* pStt, const SwPosition* pEnd, bool emptied( !m_pSttStr->isEmpty() && !pSttTextNd->Len() ); if (!bOneNode || emptied) // merging may overwrite xmlids... { - m_pMetadataUndoStart = (emptied) + m_pMetadataUndoStart = emptied ? pSttTextNd->CreateUndoForDelete() : pSttTextNd->CreateUndo(); } @@ -427,7 +427,7 @@ bool SwUndoDelete::SaveContent( const SwPosition* pStt, const SwPosition* pEnd, // METADATA: store bool emptied = !m_pEndStr->isEmpty() && !pEndTextNd->Len(); - m_pMetadataUndoEnd = (emptied) + m_pMetadataUndoEnd = emptied ? pEndTextNd->CreateUndoForDelete() : pEndTextNd->CreateUndo(); } |