diff options
author | Miklos Vajna <vmiklos@suse.cz> | 2012-05-09 16:07:12 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@suse.cz> | 2012-05-09 16:50:59 +0200 |
commit | 6092b332b99541bfdb9fd4bb14d0baa7dcf63e6a (patch) | |
tree | 38dabe4e430ac17beec6d41bb8aa288a1595281b /writerfilter/source/rtftok | |
parent | 9520dbf59f6bd6c86791954e082488556a610adc (diff) |
fdo#49271 rtftok: make sure we send char props if there are no runs
Change-Id: Id900b06fc1aad1d0f50ff92e3c12616dfbc1a81e
Diffstat (limited to 'writerfilter/source/rtftok')
-rw-r--r-- | writerfilter/source/rtftok/rtfdocumentimpl.cxx | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx index 93b2812bfdc6..1fd3d4dce577 100644 --- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx +++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx @@ -1416,7 +1416,23 @@ int RTFDocumentImpl::dispatchSymbol(RTFKeyword nKeyword) case RTF_PAR: { checkFirstRun(); + bool bNeedPap = m_bNeedPap; checkNeedPap(); + if (bNeedPap) + { + if (!m_pCurrentBuffer) + { + writerfilter::Reference<Properties>::Pointer_t const pProperties( + new RTFReferenceProperties(m_aStates.top().aCharacterAttributes, m_aStates.top().aCharacterSprms) + ); + Mapper().props(pProperties); + } + else + { + RTFValue::Pointer_t pValue(new RTFValue(m_aStates.top().aCharacterAttributes, m_aStates.top().aCharacterSprms)); + m_pCurrentBuffer->push_back(make_pair(BUFFER_PROPS, pValue)); + } + } if (!m_pCurrentBuffer) parBreak(); else if (m_aStates.top().nDestinationState != DESTINATION_SHAPETEXT) |