Kaydet (Commit) cbd89492 authored tarafından László Németh's avatar László Németh

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: 's avatarLászló Németh <nemeth@numbertext.org>
üst e0a5f073
......@@ -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 );
}
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment