writerfilter/source/rtftok/rtfdocumentimpl.cxx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
New commits: commit 6e7657eb87cf97df3aa40cb662963d6d85816ad5 Author: Miklos Vajna <[email protected]> Date: Fri May 11 14:45:59 2012 +0200 fdo#45190 import of RTF_LI should reset inherited RTF_FI Change-Id: I17c287fa4daa399876b34182c02d9cf928fe1b6f Signed-off-by: Caolán McNamara <[email protected]> diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx index 1250855..063d94b 100644 --- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx +++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx @@ -2232,7 +2232,6 @@ int RTFDocumentImpl::dispatchValue(RTFKeyword nKeyword, int nParam) switch (nKeyword) { case RTF_FI: nSprm = NS_sprm::LN_PDxaLeft1; break; - case RTF_LI: nSprm = NS_sprm::LN_PDxaLeft; break; case RTF_LIN: nSprm = 0x845e; break; case RTF_RI: nSprm = NS_sprm::LN_PDxaRight; break; case RTF_RIN: nSprm = 0x845d; break; @@ -2847,6 +2846,13 @@ int RTFDocumentImpl::dispatchValue(RTFKeyword nKeyword, int nParam) m_aStates.top().nInternalState = INTERNAL_BIN; m_aStates.top().nBinaryToRead = nParam; break; + case RTF_LI: + m_aStates.top().aParagraphSprms->push_back(make_pair(NS_sprm::LN_PDxaLeft, pIntValue)); + // It turns out \li should reset the \fi inherited from the stylesheet. + // So set the direct formatting to zero, if we don't have such direct formatting yet. + if (!m_aStates.top().aParagraphSprms.find(NS_sprm::LN_PDxaLeft1).get()) + m_aStates.top().aParagraphSprms->push_back(make_pair(NS_sprm::LN_PDxaLeft1, RTFValue::Pointer_t(new RTFValue(0)))); + break; default: #if OSL_DEBUG_LEVEL > 1 OSL_TRACE("%s: TODO handle value '%s'", OSL_THIS_FUNC, lcl_RtfToString(nKeyword));
_______________________________________________ Libreoffice-commits mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
