summaryrefslogtreecommitdiff
path: root/sw/source/filter
diff options
context:
space:
mode:
authorLuke Deller <luke@deller.id.au>2016-04-27 02:09:48 +1000
committerMiklos Vajna <vmiklos@collabora.co.uk>2016-04-27 15:17:22 +0000
commit817c3b17fa57a7c4c4f80569bc00a21001fb6807 (patch)
treee0f3a1604313624c4688df2626be897f9bbff577 /sw/source/filter
parent99ea437f7570ab59f186583f368398919db67c3a (diff)
tdf#99474 close direct char fmt at end of para
When exporting to doc, ensure that the FKP entry for direct character formatting is closed at the end of a paragraph, so that any direct character formatting in the next paragraph does not apply to the end-of-paragraph marker (CR). Also revert the changes for i#119650 and tdf#87437 which targetted more specific examples of this problem, as those issues should now be covered by this fix. Add a test case for the example from tdf#99474 Change-Id: I2cb482adb39a84f152707dafcb18f289ca0bd550 Reviewed-on: https://gerrit.libreoffice.org/24402 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Diffstat (limited to 'sw/source/filter')
-rw-r--r--sw/source/filter/ww8/wrtw8nds.cxx16
-rw-r--r--sw/source/filter/ww8/ww8atr.cxx2
2 files changed, 6 insertions, 12 deletions
diff --git a/sw/source/filter/ww8/wrtw8nds.cxx b/sw/source/filter/ww8/wrtw8nds.cxx
index 0ca94150f4e1..3bbb73381ee7 100644
--- a/sw/source/filter/ww8/wrtw8nds.cxx
+++ b/sw/source/filter/ww8/wrtw8nds.cxx
@@ -2111,7 +2111,6 @@ void MSWordExportBase::OutputTextNode( const SwTextNode& rNode )
sal_Int32 nAktPos = 0;
sal_Int32 const nEnd = aStr.getLength();
- bool bIsEndOfCell = false;
bool bIncludeEndOfParaCRInRedlineProperties = false;
sal_Int32 nOpenAttrWithRange = 0;
OUString aStringForImage("\001");
@@ -2120,9 +2119,6 @@ void MSWordExportBase::OutputTextNode( const SwTextNode& rNode )
if ( pTextNodeInfo.get() != nullptr )
{
pTextNodeInfoInner = pTextNodeInfo->getFirstInner();
- if ( pTextNodeInfoInner && pTextNodeInfoInner->isEndOfCell() ) {
- bIsEndOfCell = true;
- }
}
do {
@@ -2332,11 +2328,6 @@ void MSWordExportBase::OutputTextNode( const SwTextNode& rNode )
}
WriteCR( pTextNodeInfoInner );
-
- if ( (0 != nEnd) && bIsEndOfCell )
- {
- AttrOutput().OutputFKP(true);
- }
}
}
}
@@ -2364,7 +2355,12 @@ void MSWordExportBase::OutputTextNode( const SwTextNode& rNode )
"odd to see this happening, expected 0");
}
- AttrOutput().OutputFKP();
+ // !bIncludeEndOfParaCRInRedlineProperties implies we have just
+ // emitted a CR, in which case we want to pass force=true to
+ // OutputFKP to ensure that an FKP entry for direct character
+ // formatting is written even if empty, so that the next one will
+ // start after the CR.
+ AttrOutput().OutputFKP(!bIncludeEndOfParaCRInRedlineProperties);
if (bTextAtr || bAttrWithRange || bIncludeEndOfParaCRInRedlineProperties)
{
diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx
index cf98b68152b0..e6f139ee2f6c 100644
--- a/sw/source/filter/ww8/ww8atr.cxx
+++ b/sw/source/filter/ww8/ww8atr.cxx
@@ -951,8 +951,6 @@ void WW8AttributeOutput::EndParagraph( ww8::WW8TableNodeInfoInner::Pointer_t pTe
TableInfoRow( pTextNodeInfoInner );
m_rWW8Export.m_pPapPlc->AppendFkpEntry( m_rWW8Export.Strm().Tell(), m_rWW8Export.pO->size(), m_rWW8Export.pO->data());
m_rWW8Export.pO->clear();
- //For Bug 119650, should break the properties of CHP PLC after a paragraph end.
- m_rWW8Export.m_pChpPlc->AppendFkpEntry( m_rWW8Export.Strm().Tell(), m_rWW8Export.pO->size(), m_rWW8Export.pO->data());
}
}
}