diff options
author | Miklos Vajna <vmiklos@frugalware.org> | 2012-01-30 21:29:57 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@frugalware.org> | 2012-01-30 21:33:22 +0100 |
commit | 2aa3d43a3746c797391afb1a08c024d512976006 (patch) | |
tree | 25336b54e15d0a8480f3e46d9ae49ae0f04af282 | |
parent | 2b7083aef8b9508ca93c55c62448ce044ae1fc95 (diff) |
fdo#43965 fix RTF import of page break symbol
This was unnoticed so far as both Writer and Word output \pagebb instead
of \page when exporting page breaks.
-rw-r--r-- | writerfilter/source/rtftok/rtfdocumentimpl.cxx | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx index 805dd204eb54..faf3943bdace 100644 --- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx +++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx @@ -1317,6 +1317,8 @@ int RTFDocumentImpl::dispatchSymbol(RTFKeyword nKeyword) m_bWasInFrame = inFrame(); if (!m_bWasInFrame) m_bNeedPar = false; + // this has to be reset even without a pard, since it's a symbol in RTF terms + m_aStates.top().aParagraphSprms.erase(NS_sprm::LN_PFPageBreakBefore); } break; case RTF_SECT: @@ -1437,6 +1439,13 @@ int RTFDocumentImpl::dispatchSymbol(RTFKeyword nKeyword) case RTF_CHFTN: // Nothing to do, dmapper assumes this is the default. break; + case RTF_PAGE: + { + RTFValue::Pointer_t pValue(new RTFValue(1)); + dispatchSymbol(RTF_PAR); + m_aStates.top().aParagraphSprms->push_back(make_pair(NS_sprm::LN_PFPageBreakBefore, pValue)); + } + break; default: SAL_INFO("writerfilter", OSL_THIS_FUNC << ": TODO handle symbol '" << lcl_RtfToString(nKeyword) << "'"); aSkip.setParsed(false); |