diff options
author | Mark Hung <marklh9@gmail.com> | 2022-03-19 21:18:54 +0800 |
---|---|---|
committer | Mark Hung <marklh9@gmail.com> | 2022-03-24 14:04:32 +0100 |
commit | 882045b934a3416cc48da2c4e30648892a419577 (patch) | |
tree | 073030ce55121119019d6a99162cf3effc51fc96 | |
parent | f5c2085e70c40370a790868d4683133a41e6599d (diff) |
tdf#141671 fix destroyed pargraph style in exported RTF in MSO.
Do not call MoveCharacterProperties() in RtfAttributeOutput
::EndParagraphProperties(). RtfAttributeOutput::ParagraphStyle() has
emited run associated properties defined in paragraph style.
Calling MoveCharacterProperties() again overwrites them.
As this bug is only visible in MS Word, no unit test case is
added.
Change-Id: I6e5bfd12e8afa7dc286ca54448c1ff022aade31d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131848
Tested-by: Jenkins
Reviewed-by: Mark Hung <marklh9@gmail.com>
-rw-r--r-- | sw/source/filter/ww8/rtfattributeoutput.cxx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sw/source/filter/ww8/rtfattributeoutput.cxx b/sw/source/filter/ww8/rtfattributeoutput.cxx index f22ec5a48c02..273d660237f6 100644 --- a/sw/source/filter/ww8/rtfattributeoutput.cxx +++ b/sw/source/filter/ww8/rtfattributeoutput.cxx @@ -384,7 +384,9 @@ void RtfAttributeOutput::EndParagraphProperties( const SwRedlineData* /*pRedlineParagraphMarkerDeleted*/, const SwRedlineData* /*pRedlineParagraphMarkerInserted*/) { - const OString aProperties = MoveCharacterProperties(true); + // Do not call MoveCharacterProperties(), + // Otherwise associate properties in the paragraph style are ruined. + const OString aProperties = m_aStyles.makeStringAndClear(); m_rExport.Strm().WriteOString(aProperties); } |