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=f84e0e6b1b0ec5f52ee963a62ac420cd872a771e

Regression from 3.4, due to not handling the \nosupersub RTF keyword.

I'm attaching a backport of the patch for -3-5 (plain cherry-pick won't
work as we have no testcases n -3-5).

Thanks,

Miklos
From f84e0e6b1b0ec5f52ee963a62ac420cd872a771e Mon Sep 17 00:00:00 2001
From: Miklos Vajna <vmiklos@suse.cz>
Date: Fri, 23 Mar 2012 12:47:41 +0100
Subject: [PATCH] fdo#47326 fix RTF import of mixed super/nonsuper text

In most cases \super has its own group, but it's valid to have mixed
super and non-super text in a single group, as long as \super and
\nosupersub keywords are used: handle this.
---
 writerfilter/source/rtftok/rtfdocumentimpl.cxx |    8 ++++++++
 3 files changed, 22 insertions(+), 0 deletions(-)

diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx 
b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
index 84267f3..d378694 100644
--- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx
+++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
@@ -1932,6 +1932,14 @@ int RTFDocumentImpl::dispatchFlag(RTFKeyword nKeyword)
                 
m_aStates.top().aCharacterSprms->push_back(make_pair(NS_ooxml::LN_EG_RPrBase_vertAlign, pValue));
             }
             break;
+        case RTF_NOSUPERSUB:
+            if (m_pCurrentBuffer == &m_aSuperBuffer)
+            {
+                replayBuffer(m_aSuperBuffer);
+                m_pCurrentBuffer = 0;
+            }
+            m_aStates.top().aCharacterSprms.erase(NS_ooxml::LN_EG_RPrBase_vertAlign);
+            break;
         case RTF_LINEPPAGE:
         case RTF_LINECONT:
             {
-- 
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.