[Libreoffice-commits] .: 9 commits - writerfilter/source

Miklos Vajna vmiklos at kemper.freedesktop.org
Tue Jul 24 08:21:29 PDT 2012


 writerfilter/source/rtftok/rtfcontrolwords.cxx |    2 
 writerfilter/source/rtftok/rtfdocumentimpl.cxx |  263 ++++++++++++-------------
 writerfilter/source/rtftok/rtfdocumentimpl.hxx |   30 ++
 3 files changed, 161 insertions(+), 134 deletions(-)

New commits:
commit 2e5fcf43328cefc099b6766d9d06169756d25761
Author: Miklos Vajna <vmiklos at suse.cz>
Date:   Tue Jul 24 17:17:18 2012 +0200

    import RTF_MTYPE
    
    Change-Id: I9414c9af69aa721a84e08fd323bc1efd5bd6c887

diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
index 8b1977a..6e2a886 100644
--- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx
+++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
@@ -965,6 +965,7 @@ void RTFDocumentImpl::text(OUString& rString)
         case DESTINATION_MENDCHR:
         case DESTINATION_MSUBHIDE:
         case DESTINATION_MSUPHIDE:
+        case DESTINATION_MTYPE:
             m_aStates.top().aDestinationText.append(rString);
             break;
         case DESTINATION_EQINSTRUCTION:
@@ -1422,6 +1423,7 @@ int RTFDocumentImpl::dispatchDestination(RTFKeyword nKeyword)
         case RTF_MVERTJC: m_aStates.top().nDestinationState = DESTINATION_MVERTJC; break;
         case RTF_MSTRIKEH: m_aStates.top().nDestinationState = DESTINATION_MSTRIKEH; break;
         case RTF_MDEGHIDE: m_aStates.top().nDestinationState = DESTINATION_MDEGHIDE; break;
+        case RTF_MTYPE: m_aStates.top().nDestinationState = DESTINATION_MTYPE; break;
         case RTF_MHIDETOP:
         case RTF_MHIDEBOT:
         case RTF_MHIDELEFT:
@@ -3628,6 +3630,7 @@ int RTFDocumentImpl::popState()
     case DESTINATION_MENDCHR: if (!nMathToken) nMathToken = M_TOKEN(endChr);
     case DESTINATION_MSUBHIDE: if (!nMathToken) nMathToken = M_TOKEN(subHide);
     case DESTINATION_MSUPHIDE: if (!nMathToken) nMathToken = M_TOKEN(supHide);
+    case DESTINATION_MTYPE: if (!nMathToken) nMathToken = M_TOKEN(type);
     {
         oox::formulaimport::XmlStream::AttributeList aAttribs;
         aAttribs[M_TOKEN(val)] = m_aStates.top().aDestinationText.makeStringAndClear();
diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.hxx b/writerfilter/source/rtftok/rtfdocumentimpl.hxx
index 52c40f7..e5164e5 100644
--- a/writerfilter/source/rtftok/rtfdocumentimpl.hxx
+++ b/writerfilter/source/rtftok/rtfdocumentimpl.hxx
@@ -173,6 +173,7 @@ namespace writerfilter {
             DESTINATION_MSSUBSUPPR,
             DESTINATION_MSPRE,
             DESTINATION_MSPREPR,
+            DESTINATION_MTYPE,
         };
 
         enum RTFBorderState
commit 5debe1aa463ca74851f68457957803624bd083ac
Author: Miklos Vajna <vmiklos at suse.cz>
Date:   Tue Jul 24 17:04:41 2012 +0200

    RTFDocumentImpl::popState: clean up duplicated list of DESTINATION_M* cases
    
    Change-Id: I7806a9dc897c0187fd523d480e6366925676287b

diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
index 0f5e0a0..8b1977a 100644
--- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx
+++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
@@ -3217,6 +3217,7 @@ int RTFDocumentImpl::popState()
     bool bFaltEnd = false;
     bool bPopFrame = false;
     RTFParserState aState(m_aStates.top());
+    sal_Int32 nMathToken = 0;
 
     switch (m_aStates.top().nDestinationState)
     {
@@ -3618,34 +3619,20 @@ int RTFDocumentImpl::popState()
     case DESTINATION_MDEN: m_aMathBuffer.appendClosingTag(M_TOKEN(den)); break;
     case DESTINATION_MACC: m_aMathBuffer.appendClosingTag(M_TOKEN(acc)); break;
     case DESTINATION_MACCPR: m_aMathBuffer.appendClosingTag(M_TOKEN(accPr)); break;
-    case DESTINATION_MCHR:
-    case DESTINATION_MPOS:
-    case DESTINATION_MVERTJC:
-    case DESTINATION_MSTRIKEH:
-    case DESTINATION_MDEGHIDE:
-    case DESTINATION_MBEGCHR:
-    case DESTINATION_MENDCHR:
-    case DESTINATION_MSUBHIDE:
-    case DESTINATION_MSUPHIDE:
+    case DESTINATION_MCHR: if (!nMathToken) nMathToken = M_TOKEN(chr);
+    case DESTINATION_MPOS: if (!nMathToken) nMathToken = M_TOKEN(pos);
+    case DESTINATION_MVERTJC: if (!nMathToken) nMathToken = M_TOKEN(vertJc);
+    case DESTINATION_MSTRIKEH: if (!nMathToken) nMathToken = M_TOKEN(strikeH);
+    case DESTINATION_MDEGHIDE: if (!nMathToken) nMathToken = M_TOKEN(degHide);
+    case DESTINATION_MBEGCHR: if (!nMathToken) nMathToken = M_TOKEN(begChr);
+    case DESTINATION_MENDCHR: if (!nMathToken) nMathToken = M_TOKEN(endChr);
+    case DESTINATION_MSUBHIDE: if (!nMathToken) nMathToken = M_TOKEN(subHide);
+    case DESTINATION_MSUPHIDE: if (!nMathToken) nMathToken = M_TOKEN(supHide);
     {
         oox::formulaimport::XmlStream::AttributeList aAttribs;
         aAttribs[M_TOKEN(val)] = m_aStates.top().aDestinationText.makeStringAndClear();
-        sal_Int32 nToken = 0;
-        switch (m_aStates.top().nDestinationState)
-        {
-            case DESTINATION_MCHR: nToken = M_TOKEN(chr); break;
-            case DESTINATION_MPOS: nToken = M_TOKEN(pos); break;
-            case DESTINATION_MSTRIKEH: nToken = M_TOKEN(strikeH); break;
-            case DESTINATION_MDEGHIDE: nToken = M_TOKEN(degHide); break;
-            case DESTINATION_MVERTJC: nToken = M_TOKEN(pos); break;
-            case DESTINATION_MBEGCHR: nToken = M_TOKEN(begChr); break;
-            case DESTINATION_MENDCHR: nToken = M_TOKEN(endChr); break;
-            case DESTINATION_MSUBHIDE: nToken = M_TOKEN(subHide); break;
-            case DESTINATION_MSUPHIDE: nToken = M_TOKEN(supHide); break;
-            default: break;
-        }
-        m_aMathBuffer.appendOpeningTag(nToken, aAttribs);
-        m_aMathBuffer.appendClosingTag(nToken);
+        m_aMathBuffer.appendOpeningTag(nMathToken, aAttribs);
+        m_aMathBuffer.appendClosingTag(nMathToken);
     }
     break;
     case DESTINATION_ME: m_aMathBuffer.appendClosingTag(M_TOKEN(e)); break;
commit febb2406cb8584b11b8cf0f2a1b0f0b384c1233d
Author: Miklos Vajna <vmiklos at suse.cz>
Date:   Tue Jul 24 16:59:05 2012 +0200

    import RTF_M{SSUB,SSUBPR,SSUP,SSUPPR,SSUBSUP,SSUBSUPPR,SPRE,SPREPR}
    
    Change-Id: I8148e870ec86f282f05102757f0f8bfc53561c00

diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
index 18329b6..0f5e0a0 100644
--- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx
+++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
@@ -1468,6 +1468,14 @@ int RTFDocumentImpl::dispatchDestination(RTFKeyword nKeyword)
         OPEN_M_TOKEN(RAD, rad);
         OPEN_M_TOKEN(RADPR, radPr);
         OPEN_M_TOKEN(DEG, deg);
+        OPEN_M_TOKEN(SSUB, sSub);
+        OPEN_M_TOKEN(SSUBPR, sSubPr);
+        OPEN_M_TOKEN(SSUP, sSup);
+        OPEN_M_TOKEN(SSUPPR, sSupPr);
+        OPEN_M_TOKEN(SSUBSUP, sSubSup);
+        OPEN_M_TOKEN(SSUBSUPPR, sSubSupPr);
+        OPEN_M_TOKEN(SPRE, sPre);
+        OPEN_M_TOKEN(SPREPR, sPrePr);
         default:
             SAL_INFO("writerfilter", OSL_THIS_FUNC << ": TODO handle destination '" << lcl_RtfToString(nKeyword) << "'");
             // Make sure we skip destinations (even without \*) till we don't handle them
@@ -3667,6 +3675,14 @@ int RTFDocumentImpl::popState()
     case DESTINATION_MRAD: m_aMathBuffer.appendClosingTag(M_TOKEN(rad)); break;
     case DESTINATION_MRADPR: m_aMathBuffer.appendClosingTag(M_TOKEN(radPr)); break;
     case DESTINATION_MDEG: m_aMathBuffer.appendClosingTag(M_TOKEN(deg)); break;
+    case DESTINATION_MSSUB: m_aMathBuffer.appendClosingTag(M_TOKEN(sSub)); break;
+    case DESTINATION_MSSUBPR: m_aMathBuffer.appendClosingTag(M_TOKEN(sSubPr)); break;
+    case DESTINATION_MSSUP: m_aMathBuffer.appendClosingTag(M_TOKEN(sSup)); break;
+    case DESTINATION_MSSUPPR: m_aMathBuffer.appendClosingTag(M_TOKEN(sSupPr)); break;
+    case DESTINATION_MSSUBSUP: m_aMathBuffer.appendClosingTag(M_TOKEN(sSubSup)); break;
+    case DESTINATION_MSSUBSUPPR: m_aMathBuffer.appendClosingTag(M_TOKEN(sSubSupPr)); break;
+    case DESTINATION_MSPRE: m_aMathBuffer.appendClosingTag(M_TOKEN(sPre)); break;
+    case DESTINATION_MSPREPR: m_aMathBuffer.appendClosingTag(M_TOKEN(sPrePr)); break;
     default: break;
     }
 
diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.hxx b/writerfilter/source/rtftok/rtfdocumentimpl.hxx
index 99a9493..52c40f7 100644
--- a/writerfilter/source/rtftok/rtfdocumentimpl.hxx
+++ b/writerfilter/source/rtftok/rtfdocumentimpl.hxx
@@ -164,7 +164,15 @@ namespace writerfilter {
             DESTINATION_MBORDERBOXPR,
             DESTINATION_MRAD,
             DESTINATION_MRADPR,
-            DESTINATION_MDEG
+            DESTINATION_MDEG,
+            DESTINATION_MSSUB,
+            DESTINATION_MSSUBPR,
+            DESTINATION_MSSUP,
+            DESTINATION_MSSUPPR,
+            DESTINATION_MSSUBSUP,
+            DESTINATION_MSSUBSUPPR,
+            DESTINATION_MSPRE,
+            DESTINATION_MSPREPR,
         };
 
         enum RTFBorderState
commit 0a4fbf535439b07bb9acdf265e2234310c41b40b
Author: Miklos Vajna <vmiklos at suse.cz>
Date:   Tue Jul 24 16:33:06 2012 +0200

    implement import of RTF_M{RAD,RADPR,DEG}
    
    Change-Id: I6779cf105d792c5a59ec43a21f8693e6d8895bfd

diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
index f7462b2..18329b6 100644
--- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx
+++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
@@ -960,6 +960,7 @@ void RTFDocumentImpl::text(OUString& rString)
         case DESTINATION_MPOS:
         case DESTINATION_MVERTJC:
         case DESTINATION_MSTRIKEH:
+        case DESTINATION_MDEGHIDE:
         case DESTINATION_MBEGCHR:
         case DESTINATION_MENDCHR:
         case DESTINATION_MSUBHIDE:
@@ -1420,6 +1421,7 @@ int RTFDocumentImpl::dispatchDestination(RTFKeyword nKeyword)
         case RTF_MPOS: m_aStates.top().nDestinationState = DESTINATION_MPOS; break;
         case RTF_MVERTJC: m_aStates.top().nDestinationState = DESTINATION_MVERTJC; break;
         case RTF_MSTRIKEH: m_aStates.top().nDestinationState = DESTINATION_MSTRIKEH; break;
+        case RTF_MDEGHIDE: m_aStates.top().nDestinationState = DESTINATION_MDEGHIDE; break;
         case RTF_MHIDETOP:
         case RTF_MHIDEBOT:
         case RTF_MHIDELEFT:
@@ -1463,6 +1465,9 @@ int RTFDocumentImpl::dispatchDestination(RTFKeyword nKeyword)
         OPEN_M_TOKEN(GROUPCHRPR, groupChrPr);
         OPEN_M_TOKEN(BORDERBOX, borderBox);
         OPEN_M_TOKEN(BORDERBOXPR, borderBoxPr);
+        OPEN_M_TOKEN(RAD, rad);
+        OPEN_M_TOKEN(RADPR, radPr);
+        OPEN_M_TOKEN(DEG, deg);
         default:
             SAL_INFO("writerfilter", OSL_THIS_FUNC << ": TODO handle destination '" << lcl_RtfToString(nKeyword) << "'");
             // Make sure we skip destinations (even without \*) till we don't handle them
@@ -3130,6 +3135,7 @@ int RTFDocumentImpl::pushState()
     case DESTINATION_MLIM:
     case DESTINATION_MSUB:
     case DESTINATION_MSUP:
+    case DESTINATION_MDEG:
         m_aStates.top().nDestinationState = DESTINATION_NORMAL;
     break;
     case DESTINATION_FIELDINSTRUCTION:
@@ -3608,6 +3614,7 @@ int RTFDocumentImpl::popState()
     case DESTINATION_MPOS:
     case DESTINATION_MVERTJC:
     case DESTINATION_MSTRIKEH:
+    case DESTINATION_MDEGHIDE:
     case DESTINATION_MBEGCHR:
     case DESTINATION_MENDCHR:
     case DESTINATION_MSUBHIDE:
@@ -3621,6 +3628,7 @@ int RTFDocumentImpl::popState()
             case DESTINATION_MCHR: nToken = M_TOKEN(chr); break;
             case DESTINATION_MPOS: nToken = M_TOKEN(pos); break;
             case DESTINATION_MSTRIKEH: nToken = M_TOKEN(strikeH); break;
+            case DESTINATION_MDEGHIDE: nToken = M_TOKEN(degHide); break;
             case DESTINATION_MVERTJC: nToken = M_TOKEN(pos); break;
             case DESTINATION_MBEGCHR: nToken = M_TOKEN(begChr); break;
             case DESTINATION_MENDCHR: nToken = M_TOKEN(endChr); break;
@@ -3656,6 +3664,9 @@ int RTFDocumentImpl::popState()
     case DESTINATION_MGROUPCHRPR: m_aMathBuffer.appendClosingTag(M_TOKEN(groupChrPr)); break;
     case DESTINATION_MBORDERBOX: m_aMathBuffer.appendClosingTag(M_TOKEN(borderBox)); break;
     case DESTINATION_MBORDERBOXPR: m_aMathBuffer.appendClosingTag(M_TOKEN(borderBoxPr)); break;
+    case DESTINATION_MRAD: m_aMathBuffer.appendClosingTag(M_TOKEN(rad)); break;
+    case DESTINATION_MRADPR: m_aMathBuffer.appendClosingTag(M_TOKEN(radPr)); break;
+    case DESTINATION_MDEG: m_aMathBuffer.appendClosingTag(M_TOKEN(deg)); break;
     default: break;
     }
 
diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.hxx b/writerfilter/source/rtftok/rtfdocumentimpl.hxx
index 1289a82..99a9493 100644
--- a/writerfilter/source/rtftok/rtfdocumentimpl.hxx
+++ b/writerfilter/source/rtftok/rtfdocumentimpl.hxx
@@ -133,6 +133,7 @@ namespace writerfilter {
             DESTINATION_MPOS,
             DESTINATION_MVERTJC,
             DESTINATION_MSTRIKEH,
+            DESTINATION_MDEGHIDE,
             DESTINATION_ME,
             DESTINATION_MBAR,
             DESTINATION_MBARPR,
@@ -160,7 +161,10 @@ namespace writerfilter {
             DESTINATION_MGROUPCHR,
             DESTINATION_MGROUPCHRPR,
             DESTINATION_MBORDERBOX,
-            DESTINATION_MBORDERBOXPR
+            DESTINATION_MBORDERBOXPR,
+            DESTINATION_MRAD,
+            DESTINATION_MRADPR,
+            DESTINATION_MDEG
         };
 
         enum RTFBorderState
commit 95aaf200aa6337834a6ea18e595a41c1f131a01c
Author: Miklos Vajna <vmiklos at suse.cz>
Date:   Tue Jul 24 16:14:28 2012 +0200

    rtftok: add OPEN_M_TOKEN to avoid code duplication
    
    Change-Id: I95b2ee34fef0c075040af808de276e0b745bf830

diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
index b9badd1..f7462b2 100644
--- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx
+++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
@@ -69,6 +69,11 @@
 
 #define TWIP_TO_MM100(TWIP)     ((TWIP) >= 0 ? (((TWIP)*127L+36L)/72L) : (((TWIP)*127L-36L)/72L))
 #define M_TOKEN(token) OOX_TOKEN(officeMath, token)
+#define OPEN_M_TOKEN( rtftok, ooxtok ) \
+        case RTF_M##rtftok: \
+            m_aMathBuffer.appendOpeningTag(M_TOKEN(ooxtok)); \
+            m_aStates.top().nDestinationState = DESTINATION_M##rtftok; \
+            break
 
 using std::make_pair;
 using rtl::OString;
@@ -1410,61 +1415,11 @@ int RTFDocumentImpl::dispatchDestination(RTFKeyword nKeyword)
         case RTF_MOMATHPARA:
             // Nothing to do here (just enter the destination) till RTF_MMATHPR is implemented.
             break;
-        case RTF_MOMATH:
-            m_aMathBuffer.appendOpeningTag(M_TOKEN(oMath));
-            m_aStates.top().nDestinationState = DESTINATION_MOMATH;
-            break;
-        case RTF_MR:
-            m_aStates.top().nDestinationState = DESTINATION_MR;
-            break;
-        case RTF_MF:
-            m_aMathBuffer.appendOpeningTag(M_TOKEN(f));
-            m_aStates.top().nDestinationState = DESTINATION_MF;
-            break;
-        case RTF_MFPR:
-            m_aMathBuffer.appendOpeningTag(M_TOKEN(fPr));
-            m_aStates.top().nDestinationState = DESTINATION_MFPR;
-            break;
-        case RTF_MCTRLPR:
-            m_aMathBuffer.appendOpeningTag(M_TOKEN(ctrlPr));
-            m_aStates.top().nDestinationState = DESTINATION_MCTRLPR;
-            break;
-        case RTF_MNUM:
-            m_aMathBuffer.appendOpeningTag(M_TOKEN(num));
-            m_aStates.top().nDestinationState = DESTINATION_MNUM;
-            break;
-        case RTF_MDEN:
-            m_aMathBuffer.appendOpeningTag(M_TOKEN(den));
-            m_aStates.top().nDestinationState = DESTINATION_MDEN;
-            break;
-        case RTF_MACC:
-            m_aMathBuffer.appendOpeningTag(M_TOKEN(acc));
-            m_aStates.top().nDestinationState = DESTINATION_MACC;
-            break;
-        case RTF_MACCPR:
-            m_aMathBuffer.appendOpeningTag(M_TOKEN(accPr));
-            m_aStates.top().nDestinationState = DESTINATION_MACCPR;
-            break;
-        case RTF_MBAR:
-            m_aMathBuffer.appendOpeningTag(M_TOKEN(bar));
-            m_aStates.top().nDestinationState = DESTINATION_MBAR;
-            break;
-        case RTF_MBARPR:
-            m_aMathBuffer.appendOpeningTag(M_TOKEN(barPr));
-            m_aStates.top().nDestinationState = DESTINATION_MBARPR;
-            break;
-        case RTF_MCHR:
-            m_aStates.top().nDestinationState = DESTINATION_MCHR;
-            break;
-        case RTF_MPOS:
-            m_aStates.top().nDestinationState = DESTINATION_MPOS;
-            break;
-        case RTF_MVERTJC:
-            m_aStates.top().nDestinationState = DESTINATION_MVERTJC;
-            break;
-        case RTF_MSTRIKEH:
-            m_aStates.top().nDestinationState = DESTINATION_MSTRIKEH;
-            break;
+        case RTF_MR: m_aStates.top().nDestinationState = DESTINATION_MR; break;
+        case RTF_MCHR: m_aStates.top().nDestinationState = DESTINATION_MCHR; break;
+        case RTF_MPOS: m_aStates.top().nDestinationState = DESTINATION_MPOS; break;
+        case RTF_MVERTJC: m_aStates.top().nDestinationState = DESTINATION_MVERTJC; break;
+        case RTF_MSTRIKEH: m_aStates.top().nDestinationState = DESTINATION_MSTRIKEH; break;
         case RTF_MHIDETOP:
         case RTF_MHIDEBOT:
         case RTF_MHIDELEFT:
@@ -1472,106 +1427,42 @@ int RTFDocumentImpl::dispatchDestination(RTFKeyword nKeyword)
             // SmOoxmlImport::handleBorderBox will ignore these anyway, so silently ignore for now.
             m_aStates.top().nDestinationState = DESTINATION_SKIP;
             break;
-        case RTF_MSUBHIDE:
-            m_aStates.top().nDestinationState = DESTINATION_MSUBHIDE;
-            break;
-        case RTF_MSUPHIDE:
-            m_aStates.top().nDestinationState = DESTINATION_MSUPHIDE;
-            break;
-        case RTF_MBEGCHR:
-            m_aStates.top().nDestinationState = DESTINATION_MBEGCHR;
-            break;
-        case RTF_MENDCHR:
-            m_aStates.top().nDestinationState = DESTINATION_MENDCHR;
-            break;
-        case RTF_ME:
-            m_aMathBuffer.appendOpeningTag(M_TOKEN(e));
-            m_aStates.top().nDestinationState = DESTINATION_ME;
-            break;
-        case RTF_MD:
-            m_aMathBuffer.appendOpeningTag(M_TOKEN(d));
-            m_aStates.top().nDestinationState = DESTINATION_MD;
-            break;
-        case RTF_MDPR:
-            m_aMathBuffer.appendOpeningTag(M_TOKEN(dPr));
-            m_aStates.top().nDestinationState = DESTINATION_MDPR;
-            break;
-        case RTF_MFUNC:
-            m_aMathBuffer.appendOpeningTag(M_TOKEN(func));
-            m_aStates.top().nDestinationState = DESTINATION_MFUNC;
-            break;
-        case RTF_MFUNCPR:
-            m_aMathBuffer.appendOpeningTag(M_TOKEN(funcPr));
-            m_aStates.top().nDestinationState = DESTINATION_MFUNCPR;
-            break;
-        case RTF_MFNAME:
-            m_aMathBuffer.appendOpeningTag(M_TOKEN(fName));
-            m_aStates.top().nDestinationState = DESTINATION_MFNAME;
-            break;
-        case RTF_MLIMLOW:
-            m_aMathBuffer.appendOpeningTag(M_TOKEN(limLow));
-            m_aStates.top().nDestinationState = DESTINATION_MLIMLOW;
-            break;
-        case RTF_MLIMLOWPR:
-            m_aMathBuffer.appendOpeningTag(M_TOKEN(limLowPr));
-            m_aStates.top().nDestinationState = DESTINATION_MLIMLOWPR;
-            break;
-        case RTF_MLIM:
-            m_aMathBuffer.appendOpeningTag(M_TOKEN(lim));
-            m_aStates.top().nDestinationState = DESTINATION_MLIM;
-            break;
-        case RTF_MM:
-            m_aMathBuffer.appendOpeningTag(M_TOKEN(m));
-            m_aStates.top().nDestinationState = DESTINATION_MM;
-            break;
-        case RTF_MMPR:
-            m_aMathBuffer.appendOpeningTag(M_TOKEN(mPr));
-            m_aStates.top().nDestinationState = DESTINATION_MMPR;
-            break;
-        case RTF_MMR:
-            m_aMathBuffer.appendOpeningTag(M_TOKEN(mr));
-            m_aStates.top().nDestinationState = DESTINATION_MMR;
-            break;
-        case RTF_MNARY:
-            m_aMathBuffer.appendOpeningTag(M_TOKEN(nary));
-            m_aStates.top().nDestinationState = DESTINATION_MNARY;
-            break;
-        case RTF_MNARYPR:
-            m_aMathBuffer.appendOpeningTag(M_TOKEN(naryPr));
-            m_aStates.top().nDestinationState = DESTINATION_MNARYPR;
-            break;
-        case RTF_MSUB:
-            m_aMathBuffer.appendOpeningTag(M_TOKEN(sub));
-            m_aStates.top().nDestinationState = DESTINATION_MSUB;
-            break;
-        case RTF_MSUP:
-            m_aMathBuffer.appendOpeningTag(M_TOKEN(sup));
-            m_aStates.top().nDestinationState = DESTINATION_MSUP;
-            break;
-        case RTF_MLIMUPP:
-            m_aMathBuffer.appendOpeningTag(M_TOKEN(limUpp));
-            m_aStates.top().nDestinationState = DESTINATION_MLIMUPP;
-            break;
-        case RTF_MLIMUPPPR:
-            m_aMathBuffer.appendOpeningTag(M_TOKEN(limUppPr));
-            m_aStates.top().nDestinationState = DESTINATION_MLIMUPPPR;
-            break;
-        case RTF_MGROUPCHR:
-            m_aMathBuffer.appendOpeningTag(M_TOKEN(groupChr));
-            m_aStates.top().nDestinationState = DESTINATION_MGROUPCHR;
-            break;
-        case RTF_MGROUPCHRPR:
-            m_aMathBuffer.appendOpeningTag(M_TOKEN(groupChrPr));
-            m_aStates.top().nDestinationState = DESTINATION_MGROUPCHRPR;
-            break;
-        case RTF_MBORDERBOX:
-            m_aMathBuffer.appendOpeningTag(M_TOKEN(borderBox));
-            m_aStates.top().nDestinationState = DESTINATION_MBORDERBOX;
-            break;
-        case RTF_MBORDERBOXPR:
-            m_aMathBuffer.appendOpeningTag(M_TOKEN(borderBoxPr));
-            m_aStates.top().nDestinationState = DESTINATION_MBORDERBOXPR;
-            break;
+        case RTF_MSUBHIDE: m_aStates.top().nDestinationState = DESTINATION_MSUBHIDE; break;
+        case RTF_MSUPHIDE: m_aStates.top().nDestinationState = DESTINATION_MSUPHIDE; break;
+        case RTF_MBEGCHR: m_aStates.top().nDestinationState = DESTINATION_MBEGCHR; break;
+        case RTF_MENDCHR: m_aStates.top().nDestinationState = DESTINATION_MENDCHR; break;
+        OPEN_M_TOKEN(OMATH, oMath);
+        OPEN_M_TOKEN(F, f);
+        OPEN_M_TOKEN(FPR, fPr);
+        OPEN_M_TOKEN(CTRLPR, ctrlPr);
+        OPEN_M_TOKEN(NUM, num);
+        OPEN_M_TOKEN(DEN, den);
+        OPEN_M_TOKEN(ACC, acc);
+        OPEN_M_TOKEN(ACCPR, accPr);
+        OPEN_M_TOKEN(BAR, bar);
+        OPEN_M_TOKEN(BARPR, barPr);
+        OPEN_M_TOKEN(E, e);
+        OPEN_M_TOKEN(D, d);
+        OPEN_M_TOKEN(DPR, dPr);
+        OPEN_M_TOKEN(FUNC, func);
+        OPEN_M_TOKEN(FUNCPR, funcPr);
+        OPEN_M_TOKEN(FNAME, fName);
+        OPEN_M_TOKEN(LIMLOW, limLow);
+        OPEN_M_TOKEN(LIMLOWPR, limLowPr);
+        OPEN_M_TOKEN(LIM, lim);
+        OPEN_M_TOKEN(M, m);
+        OPEN_M_TOKEN(MPR, mPr);
+        OPEN_M_TOKEN(MR, mr);
+        OPEN_M_TOKEN(NARY, nary);
+        OPEN_M_TOKEN(NARYPR, naryPr);
+        OPEN_M_TOKEN(SUB, sub);
+        OPEN_M_TOKEN(SUP, sup);
+        OPEN_M_TOKEN(LIMUPP, limUpp);
+        OPEN_M_TOKEN(LIMUPPPR, limUppPr);
+        OPEN_M_TOKEN(GROUPCHR, groupChr);
+        OPEN_M_TOKEN(GROUPCHRPR, groupChrPr);
+        OPEN_M_TOKEN(BORDERBOX, borderBox);
+        OPEN_M_TOKEN(BORDERBOXPR, borderBoxPr);
         default:
             SAL_INFO("writerfilter", OSL_THIS_FUNC << ": TODO handle destination '" << lcl_RtfToString(nKeyword) << "'");
             // Make sure we skip destinations (even without \*) till we don't handle them
commit bbb04f6e81c0c5f62637ddb2fbde5175db18b29f
Author: Miklos Vajna <vmiklos at suse.cz>
Date:   Tue Jul 24 15:53:48 2012 +0200

    implement import of RTF_M{STRIKEH,BORDERBOX,BORDERBOXPR}
    
    Change-Id: I3249b6a2cb5d8c100e8045f650997cea3f1d2e30

diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
index 71831f7..b9badd1 100644
--- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx
+++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
@@ -954,6 +954,7 @@ void RTFDocumentImpl::text(OUString& rString)
         case DESTINATION_MCHR:
         case DESTINATION_MPOS:
         case DESTINATION_MVERTJC:
+        case DESTINATION_MSTRIKEH:
         case DESTINATION_MBEGCHR:
         case DESTINATION_MENDCHR:
         case DESTINATION_MSUBHIDE:
@@ -1461,6 +1462,16 @@ int RTFDocumentImpl::dispatchDestination(RTFKeyword nKeyword)
         case RTF_MVERTJC:
             m_aStates.top().nDestinationState = DESTINATION_MVERTJC;
             break;
+        case RTF_MSTRIKEH:
+            m_aStates.top().nDestinationState = DESTINATION_MSTRIKEH;
+            break;
+        case RTF_MHIDETOP:
+        case RTF_MHIDEBOT:
+        case RTF_MHIDELEFT:
+        case RTF_MHIDERIGHT:
+            // SmOoxmlImport::handleBorderBox will ignore these anyway, so silently ignore for now.
+            m_aStates.top().nDestinationState = DESTINATION_SKIP;
+            break;
         case RTF_MSUBHIDE:
             m_aStates.top().nDestinationState = DESTINATION_MSUBHIDE;
             break;
@@ -1553,6 +1564,14 @@ int RTFDocumentImpl::dispatchDestination(RTFKeyword nKeyword)
             m_aMathBuffer.appendOpeningTag(M_TOKEN(groupChrPr));
             m_aStates.top().nDestinationState = DESTINATION_MGROUPCHRPR;
             break;
+        case RTF_MBORDERBOX:
+            m_aMathBuffer.appendOpeningTag(M_TOKEN(borderBox));
+            m_aStates.top().nDestinationState = DESTINATION_MBORDERBOX;
+            break;
+        case RTF_MBORDERBOXPR:
+            m_aMathBuffer.appendOpeningTag(M_TOKEN(borderBoxPr));
+            m_aStates.top().nDestinationState = DESTINATION_MBORDERBOXPR;
+            break;
         default:
             SAL_INFO("writerfilter", OSL_THIS_FUNC << ": TODO handle destination '" << lcl_RtfToString(nKeyword) << "'");
             // Make sure we skip destinations (even without \*) till we don't handle them
@@ -3697,6 +3716,7 @@ int RTFDocumentImpl::popState()
     case DESTINATION_MCHR:
     case DESTINATION_MPOS:
     case DESTINATION_MVERTJC:
+    case DESTINATION_MSTRIKEH:
     case DESTINATION_MBEGCHR:
     case DESTINATION_MENDCHR:
     case DESTINATION_MSUBHIDE:
@@ -3709,6 +3729,7 @@ int RTFDocumentImpl::popState()
         {
             case DESTINATION_MCHR: nToken = M_TOKEN(chr); break;
             case DESTINATION_MPOS: nToken = M_TOKEN(pos); break;
+            case DESTINATION_MSTRIKEH: nToken = M_TOKEN(strikeH); break;
             case DESTINATION_MVERTJC: nToken = M_TOKEN(pos); break;
             case DESTINATION_MBEGCHR: nToken = M_TOKEN(begChr); break;
             case DESTINATION_MENDCHR: nToken = M_TOKEN(endChr); break;
@@ -3742,6 +3763,8 @@ int RTFDocumentImpl::popState()
     case DESTINATION_MLIMUPPPR: m_aMathBuffer.appendClosingTag(M_TOKEN(limUppPr)); break;
     case DESTINATION_MGROUPCHR: m_aMathBuffer.appendClosingTag(M_TOKEN(groupChr)); break;
     case DESTINATION_MGROUPCHRPR: m_aMathBuffer.appendClosingTag(M_TOKEN(groupChrPr)); break;
+    case DESTINATION_MBORDERBOX: m_aMathBuffer.appendClosingTag(M_TOKEN(borderBox)); break;
+    case DESTINATION_MBORDERBOXPR: m_aMathBuffer.appendClosingTag(M_TOKEN(borderBoxPr)); break;
     default: break;
     }
 
diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.hxx b/writerfilter/source/rtftok/rtfdocumentimpl.hxx
index 32c60a0..1289a82 100644
--- a/writerfilter/source/rtftok/rtfdocumentimpl.hxx
+++ b/writerfilter/source/rtftok/rtfdocumentimpl.hxx
@@ -132,6 +132,7 @@ namespace writerfilter {
             DESTINATION_MCHR,
             DESTINATION_MPOS,
             DESTINATION_MVERTJC,
+            DESTINATION_MSTRIKEH,
             DESTINATION_ME,
             DESTINATION_MBAR,
             DESTINATION_MBARPR,
@@ -157,7 +158,9 @@ namespace writerfilter {
             DESTINATION_MLIMUPP,
             DESTINATION_MLIMUPPPR,
             DESTINATION_MGROUPCHR,
-            DESTINATION_MGROUPCHRPR
+            DESTINATION_MGROUPCHRPR,
+            DESTINATION_MBORDERBOX,
+            DESTINATION_MBORDERBOXPR
         };
 
         enum RTFBorderState
commit 6f5f97b5583b93c821f9f9608ab41107bdff2c32
Author: Miklos Vajna <vmiklos at suse.cz>
Date:   Tue Jul 24 15:35:13 2012 +0200

    implement import of RTF_M{POS,VERTJC,LIMUPP,LIMUPPPR,GROUPCHR,GROUPCHRPR}
    
    Change-Id: I40406bd4220a918507b2ae90733f3d1d5df949d5

diff --git a/writerfilter/source/rtftok/rtfcontrolwords.cxx b/writerfilter/source/rtftok/rtfcontrolwords.cxx
index 77697a5..0952805 100644
--- a/writerfilter/source/rtftok/rtfcontrolwords.cxx
+++ b/writerfilter/source/rtftok/rtfcontrolwords.cxx
@@ -891,7 +891,9 @@ RTFSymbol aRTFControlWords[] = {
     {"mlimlowPr", CONTROL_DESTINATION, RTF_MLIMLOWPR},
     {"mlimLowPr", CONTROL_DESTINATION, RTF_MLIMLOWPR},
     {"mlimupp", CONTROL_DESTINATION, RTF_MLIMUPP},
+    {"mlimUpp", CONTROL_DESTINATION, RTF_MLIMUPP},
     {"mlimuppPr", CONTROL_DESTINATION, RTF_MLIMUPPPR},
+    {"mlimUppPr", CONTROL_DESTINATION, RTF_MLIMUPPPR},
     {"mlit", CONTROL_FLAG, RTF_MLIT},
     {"mlMargin", CONTROL_VALUE, RTF_MLMARGIN},
     {"mm", CONTROL_DESTINATION, RTF_MM},
diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
index 523a909..71831f7 100644
--- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx
+++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
@@ -952,6 +952,8 @@ void RTFDocumentImpl::text(OUString& rString)
         case DESTINATION_ATNID:
         case DESTINATION_MR:
         case DESTINATION_MCHR:
+        case DESTINATION_MPOS:
+        case DESTINATION_MVERTJC:
         case DESTINATION_MBEGCHR:
         case DESTINATION_MENDCHR:
         case DESTINATION_MSUBHIDE:
@@ -1453,6 +1455,12 @@ int RTFDocumentImpl::dispatchDestination(RTFKeyword nKeyword)
         case RTF_MCHR:
             m_aStates.top().nDestinationState = DESTINATION_MCHR;
             break;
+        case RTF_MPOS:
+            m_aStates.top().nDestinationState = DESTINATION_MPOS;
+            break;
+        case RTF_MVERTJC:
+            m_aStates.top().nDestinationState = DESTINATION_MVERTJC;
+            break;
         case RTF_MSUBHIDE:
             m_aStates.top().nDestinationState = DESTINATION_MSUBHIDE;
             break;
@@ -1529,6 +1537,22 @@ int RTFDocumentImpl::dispatchDestination(RTFKeyword nKeyword)
             m_aMathBuffer.appendOpeningTag(M_TOKEN(sup));
             m_aStates.top().nDestinationState = DESTINATION_MSUP;
             break;
+        case RTF_MLIMUPP:
+            m_aMathBuffer.appendOpeningTag(M_TOKEN(limUpp));
+            m_aStates.top().nDestinationState = DESTINATION_MLIMUPP;
+            break;
+        case RTF_MLIMUPPPR:
+            m_aMathBuffer.appendOpeningTag(M_TOKEN(limUppPr));
+            m_aStates.top().nDestinationState = DESTINATION_MLIMUPPPR;
+            break;
+        case RTF_MGROUPCHR:
+            m_aMathBuffer.appendOpeningTag(M_TOKEN(groupChr));
+            m_aStates.top().nDestinationState = DESTINATION_MGROUPCHR;
+            break;
+        case RTF_MGROUPCHRPR:
+            m_aMathBuffer.appendOpeningTag(M_TOKEN(groupChrPr));
+            m_aStates.top().nDestinationState = DESTINATION_MGROUPCHRPR;
+            break;
         default:
             SAL_INFO("writerfilter", OSL_THIS_FUNC << ": TODO handle destination '" << lcl_RtfToString(nKeyword) << "'");
             // Make sure we skip destinations (even without \*) till we don't handle them
@@ -3671,6 +3695,8 @@ int RTFDocumentImpl::popState()
     case DESTINATION_MACC: m_aMathBuffer.appendClosingTag(M_TOKEN(acc)); break;
     case DESTINATION_MACCPR: m_aMathBuffer.appendClosingTag(M_TOKEN(accPr)); break;
     case DESTINATION_MCHR:
+    case DESTINATION_MPOS:
+    case DESTINATION_MVERTJC:
     case DESTINATION_MBEGCHR:
     case DESTINATION_MENDCHR:
     case DESTINATION_MSUBHIDE:
@@ -3682,6 +3708,8 @@ int RTFDocumentImpl::popState()
         switch (m_aStates.top().nDestinationState)
         {
             case DESTINATION_MCHR: nToken = M_TOKEN(chr); break;
+            case DESTINATION_MPOS: nToken = M_TOKEN(pos); break;
+            case DESTINATION_MVERTJC: nToken = M_TOKEN(pos); break;
             case DESTINATION_MBEGCHR: nToken = M_TOKEN(begChr); break;
             case DESTINATION_MENDCHR: nToken = M_TOKEN(endChr); break;
             case DESTINATION_MSUBHIDE: nToken = M_TOKEN(subHide); break;
@@ -3710,6 +3738,10 @@ int RTFDocumentImpl::popState()
     case DESTINATION_MNARYPR: m_aMathBuffer.appendClosingTag(M_TOKEN(naryPr)); break;
     case DESTINATION_MSUB: m_aMathBuffer.appendClosingTag(M_TOKEN(sub)); break;
     case DESTINATION_MSUP: m_aMathBuffer.appendClosingTag(M_TOKEN(sup)); break;
+    case DESTINATION_MLIMUPP: m_aMathBuffer.appendClosingTag(M_TOKEN(limUpp)); break;
+    case DESTINATION_MLIMUPPPR: m_aMathBuffer.appendClosingTag(M_TOKEN(limUppPr)); break;
+    case DESTINATION_MGROUPCHR: m_aMathBuffer.appendClosingTag(M_TOKEN(groupChr)); break;
+    case DESTINATION_MGROUPCHRPR: m_aMathBuffer.appendClosingTag(M_TOKEN(groupChrPr)); break;
     default: break;
     }
 
diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.hxx b/writerfilter/source/rtftok/rtfdocumentimpl.hxx
index 2de0a0b..32c60a0 100644
--- a/writerfilter/source/rtftok/rtfdocumentimpl.hxx
+++ b/writerfilter/source/rtftok/rtfdocumentimpl.hxx
@@ -130,6 +130,8 @@ namespace writerfilter {
             DESTINATION_MACC,
             DESTINATION_MACCPR,
             DESTINATION_MCHR,
+            DESTINATION_MPOS,
+            DESTINATION_MVERTJC,
             DESTINATION_ME,
             DESTINATION_MBAR,
             DESTINATION_MBARPR,
@@ -151,7 +153,11 @@ namespace writerfilter {
             DESTINATION_MSUB,
             DESTINATION_MSUP,
             DESTINATION_MSUBHIDE,
-            DESTINATION_MSUPHIDE
+            DESTINATION_MSUPHIDE,
+            DESTINATION_MLIMUPP,
+            DESTINATION_MLIMUPPPR,
+            DESTINATION_MGROUPCHR,
+            DESTINATION_MGROUPCHRPR
         };
 
         enum RTFBorderState
commit 79a56a87e7485e0da6f5bc271012932f2642a662
Author: Miklos Vajna <vmiklos at suse.cz>
Date:   Tue Jul 24 15:13:49 2012 +0200

    RTFDocumentImpl::pushState: use switch here as well
    
    Change-Id: Ibb1c68612159fcdbfd92dc6b4cd3719d4db240f3

diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
index b221f44..523a909 100644
--- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx
+++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
@@ -3181,30 +3181,30 @@ int RTFDocumentImpl::pushState()
 
     m_nGroup++;
 
-    if (m_aStates.top().nDestinationState == DESTINATION_FONTTABLE)
-        m_aStates.top().nDestinationState = DESTINATION_FONTENTRY;
-    else if (m_aStates.top().nDestinationState == DESTINATION_STYLESHEET)
-        m_aStates.top().nDestinationState = DESTINATION_STYLEENTRY;
-    else if (m_aStates.top().nDestinationState == DESTINATION_FIELDRESULT ||
-            m_aStates.top().nDestinationState == DESTINATION_SHAPETEXT ||
-            m_aStates.top().nDestinationState == DESTINATION_FORMFIELD ||
-            (m_aStates.top().nDestinationState == DESTINATION_FIELDINSTRUCTION && !m_bEq) ||
-            m_aStates.top().nDestinationState == DESTINATION_MNUM ||
-            m_aStates.top().nDestinationState == DESTINATION_MDEN ||
-            m_aStates.top().nDestinationState == DESTINATION_ME ||
-            m_aStates.top().nDestinationState == DESTINATION_MFNAME ||
-            m_aStates.top().nDestinationState == DESTINATION_MLIM ||
-            m_aStates.top().nDestinationState == DESTINATION_MSUB ||
-            m_aStates.top().nDestinationState == DESTINATION_MSUP)
-        m_aStates.top().nDestinationState = DESTINATION_NORMAL;
-    else if (m_aStates.top().nDestinationState == DESTINATION_FIELDINSTRUCTION && m_bEq)
-        m_aStates.top().nDestinationState = DESTINATION_EQINSTRUCTION;
-    else if (m_aStates.top().nDestinationState == DESTINATION_REVISIONTABLE)
-        m_aStates.top().nDestinationState = DESTINATION_REVISIONENTRY;
-    else if (m_aStates.top().nDestinationState == DESTINATION_EQINSTRUCTION)
+    switch (m_aStates.top().nDestinationState)
+    {
+    case DESTINATION_FONTTABLE: m_aStates.top().nDestinationState = DESTINATION_FONTENTRY; break;
+    case DESTINATION_STYLESHEET: m_aStates.top().nDestinationState = DESTINATION_STYLEENTRY; break;
+    case DESTINATION_FIELDRESULT:
+    case DESTINATION_SHAPETEXT:
+    case DESTINATION_FORMFIELD:
+    case DESTINATION_EQINSTRUCTION:
+    case DESTINATION_MNUM:
+    case DESTINATION_MDEN:
+    case DESTINATION_ME:
+    case DESTINATION_MFNAME:
+    case DESTINATION_MLIM:
+    case DESTINATION_MSUB:
+    case DESTINATION_MSUP:
         m_aStates.top().nDestinationState = DESTINATION_NORMAL;
-    else if (m_aStates.top().nDestinationState == DESTINATION_MOMATH)
-        m_aStates.top().nDestinationState = DESTINATION_MR;
+    break;
+    case DESTINATION_FIELDINSTRUCTION:
+        m_aStates.top().nDestinationState = !m_bEq ? DESTINATION_NORMAL : DESTINATION_EQINSTRUCTION;
+    break;
+    case DESTINATION_REVISIONTABLE: m_aStates.top().nDestinationState = DESTINATION_REVISIONENTRY; break;
+    case DESTINATION_MOMATH: m_aStates.top().nDestinationState = DESTINATION_MR; break;
+    default: break;
+    }
 
     return 0;
 }
commit 0a5bd26f9d21506f71951a383d8d0d8e5abf3f77
Author: Miklos Vajna <vmiklos at suse.cz>
Date:   Tue Jul 24 15:04:54 2012 +0200

    implement import of RTF_{MMR,MNARY,MNARYPR,MSUB,MSUP,MSUBHIDE,MSUPHIDE}
    
    Change-Id: Ic975c7c1653fd10ef0a22ecbbbd740adac0789e0

diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
index 5957194..b221f44 100644
--- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx
+++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
@@ -954,6 +954,8 @@ void RTFDocumentImpl::text(OUString& rString)
         case DESTINATION_MCHR:
         case DESTINATION_MBEGCHR:
         case DESTINATION_MENDCHR:
+        case DESTINATION_MSUBHIDE:
+        case DESTINATION_MSUPHIDE:
             m_aStates.top().aDestinationText.append(rString);
             break;
         case DESTINATION_EQINSTRUCTION:
@@ -1451,6 +1453,12 @@ int RTFDocumentImpl::dispatchDestination(RTFKeyword nKeyword)
         case RTF_MCHR:
             m_aStates.top().nDestinationState = DESTINATION_MCHR;
             break;
+        case RTF_MSUBHIDE:
+            m_aStates.top().nDestinationState = DESTINATION_MSUBHIDE;
+            break;
+        case RTF_MSUPHIDE:
+            m_aStates.top().nDestinationState = DESTINATION_MSUPHIDE;
+            break;
         case RTF_MBEGCHR:
             m_aStates.top().nDestinationState = DESTINATION_MBEGCHR;
             break;
@@ -1505,6 +1513,22 @@ int RTFDocumentImpl::dispatchDestination(RTFKeyword nKeyword)
             m_aMathBuffer.appendOpeningTag(M_TOKEN(mr));
             m_aStates.top().nDestinationState = DESTINATION_MMR;
             break;
+        case RTF_MNARY:
+            m_aMathBuffer.appendOpeningTag(M_TOKEN(nary));
+            m_aStates.top().nDestinationState = DESTINATION_MNARY;
+            break;
+        case RTF_MNARYPR:
+            m_aMathBuffer.appendOpeningTag(M_TOKEN(naryPr));
+            m_aStates.top().nDestinationState = DESTINATION_MNARYPR;
+            break;
+        case RTF_MSUB:
+            m_aMathBuffer.appendOpeningTag(M_TOKEN(sub));
+            m_aStates.top().nDestinationState = DESTINATION_MSUB;
+            break;
+        case RTF_MSUP:
+            m_aMathBuffer.appendOpeningTag(M_TOKEN(sup));
+            m_aStates.top().nDestinationState = DESTINATION_MSUP;
+            break;
         default:
             SAL_INFO("writerfilter", OSL_THIS_FUNC << ": TODO handle destination '" << lcl_RtfToString(nKeyword) << "'");
             // Make sure we skip destinations (even without \*) till we don't handle them
@@ -3169,7 +3193,9 @@ int RTFDocumentImpl::pushState()
             m_aStates.top().nDestinationState == DESTINATION_MDEN ||
             m_aStates.top().nDestinationState == DESTINATION_ME ||
             m_aStates.top().nDestinationState == DESTINATION_MFNAME ||
-            m_aStates.top().nDestinationState == DESTINATION_MLIM)
+            m_aStates.top().nDestinationState == DESTINATION_MLIM ||
+            m_aStates.top().nDestinationState == DESTINATION_MSUB ||
+            m_aStates.top().nDestinationState == DESTINATION_MSUP)
         m_aStates.top().nDestinationState = DESTINATION_NORMAL;
     else if (m_aStates.top().nDestinationState == DESTINATION_FIELDINSTRUCTION && m_bEq)
         m_aStates.top().nDestinationState = DESTINATION_EQINSTRUCTION;
@@ -3647,6 +3673,8 @@ int RTFDocumentImpl::popState()
     case DESTINATION_MCHR:
     case DESTINATION_MBEGCHR:
     case DESTINATION_MENDCHR:
+    case DESTINATION_MSUBHIDE:
+    case DESTINATION_MSUPHIDE:
     {
         oox::formulaimport::XmlStream::AttributeList aAttribs;
         aAttribs[M_TOKEN(val)] = m_aStates.top().aDestinationText.makeStringAndClear();
@@ -3656,6 +3684,8 @@ int RTFDocumentImpl::popState()
             case DESTINATION_MCHR: nToken = M_TOKEN(chr); break;
             case DESTINATION_MBEGCHR: nToken = M_TOKEN(begChr); break;
             case DESTINATION_MENDCHR: nToken = M_TOKEN(endChr); break;
+            case DESTINATION_MSUBHIDE: nToken = M_TOKEN(subHide); break;
+            case DESTINATION_MSUPHIDE: nToken = M_TOKEN(supHide); break;
             default: break;
         }
         m_aMathBuffer.appendOpeningTag(nToken, aAttribs);
@@ -3676,6 +3706,10 @@ int RTFDocumentImpl::popState()
     case DESTINATION_MM: m_aMathBuffer.appendClosingTag(M_TOKEN(m)); break;
     case DESTINATION_MMPR: m_aMathBuffer.appendClosingTag(M_TOKEN(mPr)); break;
     case DESTINATION_MMR: m_aMathBuffer.appendClosingTag(M_TOKEN(mr)); break;
+    case DESTINATION_MNARY: m_aMathBuffer.appendClosingTag(M_TOKEN(nary)); break;
+    case DESTINATION_MNARYPR: m_aMathBuffer.appendClosingTag(M_TOKEN(naryPr)); break;
+    case DESTINATION_MSUB: m_aMathBuffer.appendClosingTag(M_TOKEN(sub)); break;
+    case DESTINATION_MSUP: m_aMathBuffer.appendClosingTag(M_TOKEN(sup)); break;
     default: break;
     }
 
diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.hxx b/writerfilter/source/rtftok/rtfdocumentimpl.hxx
index 06f7f05..2de0a0b 100644
--- a/writerfilter/source/rtftok/rtfdocumentimpl.hxx
+++ b/writerfilter/source/rtftok/rtfdocumentimpl.hxx
@@ -145,7 +145,13 @@ namespace writerfilter {
             DESTINATION_MLIM,
             DESTINATION_MM,
             DESTINATION_MMPR,
-            DESTINATION_MMR
+            DESTINATION_MMR,
+            DESTINATION_MNARY,
+            DESTINATION_MNARYPR,
+            DESTINATION_MSUB,
+            DESTINATION_MSUP,
+            DESTINATION_MSUBHIDE,
+            DESTINATION_MSUPHIDE
         };
 
         enum RTFBorderState


More information about the Libreoffice-commits mailing list