sw/source/filter/ww8/rtfattributeoutput.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
New commits: commit 0c1894acda828c02c76c97c25149187cb04ae91f Author: Mark Hung <mark...@gmail.com> AuthorDate: Sat Mar 19 21:18:54 2022 +0800 Commit: Xisco Fauli <xiscofa...@libreoffice.org> CommitDate: Mon Mar 28 20:53:46 2022 +0200 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 <mark...@gmail.com> (cherry picked from commit 882045b934a3416cc48da2c4e30648892a419577) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132175 Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org> diff --git a/sw/source/filter/ww8/rtfattributeoutput.cxx b/sw/source/filter/ww8/rtfattributeoutput.cxx index cc7d61c80d75..ca43274da2c7 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); }