Date: prev next · Thread: first prev next last
2012 Archives by date, by thread · List index


Hi,

See http://cgit.freedesktop.org/libreoffice/core/commit/?id=bf123ee

Regression from 3.4; backported patch attached.

Thanks,

Miklos
From dd1ca47b23fce64a7150fed7ad858a303166641c Mon Sep 17 00:00:00 2001
From: Miklos Vajna <vmiklos@suse.cz>
Date: Fri, 11 May 2012 14:45:59 +0200
Subject: [PATCH] fdo#45190 import of RTF_LI should reset inherited RTF_FI

Change-Id: I17c287fa4daa399876b34182c02d9cf928fe1b6f
---
 writerfilter/source/rtftok/rtfdocumentimpl.cxx |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

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


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.