summaryrefslogtreecommitdiff
path: root/sw/source
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-09-19 12:38:21 +0100
committerCaolán McNamara <caolanm@redhat.com>2014-09-19 17:05:29 +0100
commitb9b6e413f06d10b1a8dc5a25a45d7d8a26ff60ff (patch)
tree779ca0c99d51e193962f3d3c1f8dcc561b86c797 /sw/source
parent5e2492b9c4715e286c92c84ffb18333c94e25710 (diff)
refactor IsRedlineAtEnd
should be no logic change, just added a comment as to what is going on here and ready for extension Change-Id: Ibf1a3893ece9a09ad342bb06f39e119c1340e0db
Diffstat (limited to 'sw/source')
-rw-r--r--sw/source/filter/ww8/wrtw8nds.cxx20
1 files changed, 12 insertions, 8 deletions
diff --git a/sw/source/filter/ww8/wrtw8nds.cxx b/sw/source/filter/ww8/wrtw8nds.cxx
index e000918604c1..fbd1d54ae8a6 100644
--- a/sw/source/filter/ww8/wrtw8nds.cxx
+++ b/sw/source/filter/ww8/wrtw8nds.cxx
@@ -1258,16 +1258,20 @@ bool SwWW8AttrIter::IsRedlineAtEnd( sal_Int32 nEnd ) const
for( sal_uInt16 nPos = nCurRedlinePos;
nPos < m_rExport.pDoc->getIDocumentRedlineAccess().GetRedlineTbl().size(); ++nPos )
{
- const SwPosition* pEnd = m_rExport.pDoc->getIDocumentRedlineAccess().GetRedlineTbl()[ nPos ]->End();
- if( pEnd->nNode != rNd )
- {
- break;
- }
-
- if( pEnd->nContent.GetIndex() == nEnd )
+ const SwRangeRedline *pRange = m_rExport.pDoc->getIDocumentRedlineAccess().GetRedlineTbl()[nPos];
+ const SwPosition* pEnd = pRange->End();
+ if (pEnd->nNode == rNd)
{
- return true;
+ // In word the paragraph end marker is a real character, in writer it is not.
+ if (pEnd->nContent.GetIndex() == nEnd)
+ {
+ // This condition detects if the pseudo-char we will export is affected
+ // by redlining
+ return true;
+ }
}
+ else
+ break;
}
return false;
}