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 <[email protected]>
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

_______________________________________________
LibreOffice mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/libreoffice

Reply via email to