Kaydet (Commit) 71061656 authored tarafından Miklos Vajna's avatar Miklos Vajna

fdo#57886 fix import of RTF_MLIMLOC

The RTF spec says control words are case sensitive, and page 252 of the
v1.9.1 spec defines \mlimloc, but earlier page 118 and 125 also defines
\mlimLoc, so let's accept both.
üst 6869aaa2
......@@ -71,16 +71,19 @@ $(eval $(call gb_CppunitTest_use_components,sw_subsequent_rtfimport,\
basic/util/sb \
comphelper/util/comphelp \
configmgr/source/configmgr \
embeddedobj/util/embobj \
fileaccess/source/fileacc \
filter/source/config/cache/filterconfig1 \
framework/util/fwk \
i18npool/util/i18npool \
linguistic/source/lng \
package/util/package2 \
package/source/xstor/xstor \
sax/source/expatwrap/expwrap \
sw/util/sw \
sw/util/swd \
sfx2/util/sfx \
starmath/util/sm \
svl/source/fsstor/fsstorage \
svtools/util/svt \
toolkit/util/tk \
......
{\rtf1
{\mmath
{\*\moMathPara
{\*\moMath
{\mnary
{\mnaryPr
{\mlimLoc undOvr}
}
{\msub
{\mr firstlower}
}
{\msup
{\mr firstupper}
}
{\me
{\mr firstbody}
}
}
}
}
}
\par
}
......@@ -129,6 +129,7 @@ public:
void testFdo57708();
void testFdo54473();
void testFdo49934();
void testFdo57886();
CPPUNIT_TEST_SUITE(Test);
#if !defined(MACOSX) && !defined(WNT)
......@@ -208,6 +209,7 @@ void Test::run()
{"fdo57708.rtf", &Test::testFdo57708},
{"fdo54473.rtf", &Test::testFdo54473},
{"fdo49934.rtf", &Test::testFdo49934},
{"fdo57886.rtf", &Test::testFdo57886},
};
header();
for (unsigned int i = 0; i < SAL_N_ELEMENTS(aMethods); ++i)
......@@ -960,6 +962,12 @@ void Test::testFdo49934()
CPPUNIT_ASSERT_EQUAL(2, getPages());
}
void Test::testFdo57886()
{
// Was 'int from <?> to <?> <?>'.
CPPUNIT_ASSERT_EQUAL(OUString("int from {firstlower} to {firstupper} {firstbody}"), getFormula(getRun(getParagraph(1), 1)));
}
CPPUNIT_TEST_SUITE_REGISTRATION(Test);
CPPUNIT_PLUGIN_IMPLEMENT();
......
......@@ -887,6 +887,7 @@ RTFSymbol aRTFControlWords[] = {
{"mjc", CONTROL_VALUE, RTF_MJC},
{"mlim", CONTROL_DESTINATION, RTF_MLIM},
{"mlimloc", CONTROL_DESTINATION, RTF_MLIMLOC},
{"mlimLoc", CONTROL_DESTINATION, RTF_MLIMLOC},
{"mlimlow", CONTROL_DESTINATION, RTF_MLIMLOW},
{"mlimLow", CONTROL_DESTINATION, RTF_MLIMLOW},
{"mlimlowPr", CONTROL_DESTINATION, RTF_MLIMLOWPR},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment