summaryrefslogtreecommitdiff
path: root/sw/source
diff options
context:
space:
mode:
authorLászló Németh <nemeth@numbertext.org>2019-08-29 18:24:47 +0200
committerLászló Németh <nemeth@numbertext.org>2019-09-02 07:47:29 +0200
commit00b3c2240bb2f86299e3ddeea75a16e8e9877489 (patch)
tree86efa4376f98b836d7f7df76a2bb4e40858d6182 /sw/source
parent41cd3e8e817c8c33a13608e62eeb06ce2c6977e4 (diff)
tdf#124491 DOCX: import tracked changes of empty paragraphs
Formatting changes of empty paragraphs weren't imported. Change-Id: Ife7c83d52549563ab4c3a00a3daff4d8f4fa8386 Reviewed-on: https://gerrit.libreoffice.org/78233 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org>
Diffstat (limited to 'sw/source')
-rw-r--r--sw/source/core/doc/docredln.cxx21
1 files changed, 17 insertions, 4 deletions
diff --git a/sw/source/core/doc/docredln.cxx b/sw/source/core/doc/docredln.cxx
index 2585b1208751..8eb527eb519f 100644
--- a/sw/source/core/doc/docredln.cxx
+++ b/sw/source/core/doc/docredln.cxx
@@ -784,12 +784,25 @@ void SwRedlineExtraData_FormatColl::Reject( SwPaM& rPam ) const
SwPaM aPam( *rPam.GetMark(), *rPam.GetPoint() );
- if ( !m_bFormatAll )
+ const SwPosition* pStt = rPam.Start(),
+ * pEnd = pStt == rPam.GetPoint() ? rPam.GetMark()
+ : rPam.GetPoint();
+
+ if ( !m_bFormatAll || pEnd->nContent == 0 )
{
// don't reject the format of the next paragraph (that is handled by the next redline)
- aPam.GetPoint()->nNode--;
- SwContentNode* pNode = aPam.GetPoint()->nNode.GetNode().GetContentNode();
- aPam.GetPoint()->nContent.Assign( pNode, pNode->Len() );
+ if (aPam.GetPoint()->nNode > aPam.GetMark()->nNode)
+ {
+ aPam.GetPoint()->nNode--;
+ SwContentNode* pNode = aPam.GetPoint()->nNode.GetNode().GetContentNode();
+ aPam.GetPoint()->nContent.Assign( pNode, pNode->Len() );
+ }
+ else if (aPam.GetPoint()->nNode < aPam.GetMark()->nNode)
+ {
+ aPam.GetMark()->nNode--;
+ SwContentNode* pNode = aPam.GetMark()->nNode.GetNode().GetContentNode();
+ aPam.GetMark()->nContent.Assign( pNode, pNode->Len() );
+ }
}
if( pColl )