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

fdo#38786 implement RTF_CHPGN

Change-Id: I0ae693193b4fc8ed155e2d71b06daa80d46da47c
üst c450ea69
......@@ -92,6 +92,7 @@ public:
void testFdo44211();
void testFdo48037();
void testFdo47764();
void testFdo38786();
CPPUNIT_TEST_SUITE(Test);
#if !defined(MACOSX) && !defined(WNT)
......@@ -122,6 +123,7 @@ public:
CPPUNIT_TEST(testFdo44211);
CPPUNIT_TEST(testFdo48037);
CPPUNIT_TEST(testFdo47764);
CPPUNIT_TEST(testFdo38786);
#endif
CPPUNIT_TEST_SUITE_END();
......@@ -676,6 +678,17 @@ void Test::testFdo47764()
CPPUNIT_ASSERT_EQUAL(sal_Int32(-1), nValue);
}
void Test::testFdo38786()
{
load("fdo38786.rtf");
uno::Reference<text::XTextFieldsSupplier> xTextFieldsSupplier(mxComponent, uno::UNO_QUERY);
uno::Reference<container::XEnumerationAccess> xFieldsAccess(xTextFieldsSupplier->getTextFields());
uno::Reference<container::XEnumeration> xFields(xFieldsAccess->createEnumeration());
// \chpgn was ignored, so exception was thrown
xFields->nextElement();
}
CPPUNIT_TEST_SUITE_REGISTRATION(Test);
CPPUNIT_PLUGIN_IMPLEMENT();
......
......@@ -1552,6 +1552,15 @@ int RTFDocumentImpl::dispatchSymbol(RTFKeyword nKeyword)
parBreak();
}
break;
case RTF_CHPGN:
{
OUString aStr("PAGE");
singleChar(0x13);
text(aStr);
singleChar(0x14);
singleChar(0x15);
}
break;
default:
SAL_INFO("writerfilter", OSL_THIS_FUNC << ": TODO handle symbol '" << lcl_RtfToString(nKeyword) << "'");
aSkip.setParsed(false);
......
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