summaryrefslogtreecommitdiffstats
path: root/writerfilter
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@frugalware.org>2012-01-30 21:29:57 +0100
committerMiklos Vajna <vmiklos@frugalware.org>2012-01-30 21:33:22 +0100
commit2aa3d43a3746c797391afb1a08c024d512976006 (patch)
tree25336b54e15d0a8480f3e46d9ae49ae0f04af282 /writerfilter
parentWaE: more multi_array warnings (diff)
downloadcore-2aa3d43a3746c797391afb1a08c024d512976006.tar.gz
core-2aa3d43a3746c797391afb1a08c024d512976006.zip
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.
Diffstat (limited to 'writerfilter')
-rw-r--r--writerfilter/source/rtftok/rtfdocumentimpl.cxx9
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);