Kaydet (Commit) 2aa3d43a authored tarafından Miklos Vajna's avatar Miklos Vajna

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.
üst 2b7083ae
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment