[Libreoffice-commits] core.git: sw/source
László Németh (via logerrit)
logerrit at kemper.freedesktop.org
Fri May 24 13:10:38 UTC 2019
sw/source/core/doc/DocumentRedlineManager.cxx | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
New commits:
commit cbd894925e6b9869baedcd6476484c14d3a3df87
Author: László Németh <nemeth at numbertext.org>
AuthorDate: Wed May 22 16:30:02 2019 +0200
Commit: László Németh <nemeth at 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 <nemeth at 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 );
+ }
+ }
}
}
More information about the Libreoffice-commits
mailing list