[Libreoffice-commits] .: writerfilter/source
Miklos Vajna
vmiklos at kemper.freedesktop.org
Mon Jan 30 12:33:46 PST 2012
writerfilter/source/rtftok/rtfdocumentimpl.cxx | 9 +++++++++
1 file changed, 9 insertions(+)
New commits:
commit 2aa3d43a3746c797391afb1a08c024d512976006
Author: Miklos Vajna <vmiklos at frugalware.org>
Date: Mon Jan 30 21:29:57 2012 +0100
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.
diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
index 805dd20..faf3943 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);
More information about the Libreoffice-commits
mailing list