diff options
author | Miklos Vajna <vmiklos@suse.cz> | 2012-06-26 16:39:17 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@suse.cz> | 2012-06-26 17:55:09 +0200 |
commit | 5d505e5b1edee7f709e4baff70a971cb3fe851c2 (patch) | |
tree | 5e40921485f723201cb5d36a61d238e887959e08 | |
parent | 7db0ac29c0962932bbcd8b460dc51c9e5009dbfa (diff) |
fdo#48335 RTF export: don't try to end not started runs
Change-Id: I022556acd0891cf24963d667d34f366496453630
-rw-r--r-- | sw/source/filter/ww8/rtfattributeoutput.cxx | 7 | ||||
-rw-r--r-- | sw/source/filter/ww8/rtfattributeoutput.hxx | 2 |
2 files changed, 7 insertions, 2 deletions
diff --git a/sw/source/filter/ww8/rtfattributeoutput.cxx b/sw/source/filter/ww8/rtfattributeoutput.cxx index 3bb8b60c3e0b..681095025470 100644 --- a/sw/source/filter/ww8/rtfattributeoutput.cxx +++ b/sw/source/filter/ww8/rtfattributeoutput.cxx @@ -383,6 +383,7 @@ void RtfAttributeOutput::StartRun( const SwRedlineData* pRedlineData, bool bSing { SAL_INFO("sw.rtf", OSL_THIS_FUNC); + m_bInRun = true; m_bSingleEmptyRun = bSingleEmptyRun; if (!m_bSingleEmptyRun) m_aRun->append('{'); @@ -398,8 +399,9 @@ void RtfAttributeOutput::EndRun() SAL_INFO("sw.rtf", OSL_THIS_FUNC); m_aRun->append(m_rExport.sNewLine); m_aRun.appendAndClear(m_aRunText); - if (!m_bSingleEmptyRun) + if (!m_bSingleEmptyRun && m_bInRun) m_aRun->append('}'); + m_bInRun = false; } void RtfAttributeOutput::StartRunProperties() @@ -3028,7 +3030,8 @@ RtfAttributeOutput::RtfAttributeOutput( RtfExport &rExport ) m_bHadFieldResult( false ), m_bTableRowEnded( false ), m_aCells(), - m_bSingleEmptyRun(false) + m_bSingleEmptyRun(false), + m_bInRun(false) { SAL_INFO("sw.rtf", OSL_THIS_FUNC); } diff --git a/sw/source/filter/ww8/rtfattributeoutput.hxx b/sw/source/filter/ww8/rtfattributeoutput.hxx index a6430f17414b..56c31b61b057 100644 --- a/sw/source/filter/ww8/rtfattributeoutput.hxx +++ b/sw/source/filter/ww8/rtfattributeoutput.hxx @@ -543,6 +543,8 @@ private: /// If we're in a paragraph that has a single empty run only. bool m_bSingleEmptyRun; + + bool m_bInRun; public: RtfAttributeOutput( RtfExport &rExport ); |