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.
This commit is contained in:
Miklos Vajna 2012-01-30 21:29:57 +01:00
parent 2b7083aef8
commit 2aa3d43a37

View file

@ -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);