sw/source/core/doc/DocumentRedlineManager.cxx | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-)
New commits: commit cbd894925e6b9869baedcd6476484c14d3a3df87 Author: László Németh <nem...@numbertext.org> AuthorDate: Wed May 22 16:30:02 2019 +0200 Commit: László Németh <nem...@numbertext.org> CommitDate: Fri May 24 15:09:00 2019 +0200 tdf#125319 DOCX track changes: don't change numbering of a paragraph after a tracked deletion in Hide Changes mode (including hiding the numbering completely). We add the numbering of the paragraph to the first node of the deletion, so Hide Changes mode will show the actual text content correctly. Note: file saving already makes the same changes in the deletion without this workaround, too. Change-Id: I09d3ad2c05bfd6c7f9f65cfe21a4bade2ac18a14 Reviewed-on: https://gerrit.libreoffice.org/72784 Tested-by: Jenkins Reviewed-by: László Németh <nem...@numbertext.org> diff --git a/sw/source/core/doc/DocumentRedlineManager.cxx b/sw/source/core/doc/DocumentRedlineManager.cxx index 47fc8db4db05..93f8f0b972e7 100644 --- a/sw/source/core/doc/DocumentRedlineManager.cxx +++ b/sw/source/core/doc/DocumentRedlineManager.cxx @@ -3032,14 +3032,21 @@ void DocumentRedlineManager::FinalizeImport() ? pRedl->GetMark() : pRedl->GetPoint(); SwTextNode* pDelNode = pStt->nNode.GetNode().GetTextNode(); SwTextNode* pTextNode = pEnd->nNode.GetNode().GetTextNode(); - // remove numbering of the first deleted list item - // to avoid of incorrect numbering after the deletion + // avoid of incorrect numbering after the deletion if ( pDelNode->GetNumRule() && !pTextNode->GetNumRule() ) { + // remove numbering of the first deleted list item const SwPaM aPam( *pStt, *pStt ); m_rDoc.DelNumRules( aPam ); } - } + else if ( pDelNode->GetNumRule() != pTextNode->GetNumRule() ) + { + // copy numbering to the first deleted list item + const SwPaM aPam( *pStt, *pStt ); + SwNumRule *pRule = pTextNode->GetNumRule(); + m_rDoc.SetNumRule( aPam, *pRule, false ); + } + } } } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits