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

fdo#48335 testcase

Change-Id: I032ff9b65ec9c4d70a2247c7311c2c7292a411c7
üst a0389598
...@@ -69,7 +69,9 @@ $(eval $(call gb_CppunitTest_use_components,sw_subsequent_rtfexport,\ ...@@ -69,7 +69,9 @@ $(eval $(call gb_CppunitTest_use_components,sw_subsequent_rtfexport,\
filter/source/config/cache/filterconfig1 \ filter/source/config/cache/filterconfig1 \
framework/util/fwk \ framework/util/fwk \
i18npool/util/i18npool \ i18npool/util/i18npool \
package/source/xstor/xstor \
package/util/package2 \ package/util/package2 \
sax/source/expatwrap/expwrap \
sfx2/util/sfx \ sfx2/util/sfx \
svl/source/fsstor/fsstorage \ svl/source/fsstor/fsstorage \
svtools/util/svt \ svtools/util/svt \
......
...@@ -49,6 +49,7 @@ public: ...@@ -49,6 +49,7 @@ public:
void testFdo44174(); void testFdo44174();
void testFdo50087(); void testFdo50087();
void testFdo50831(); void testFdo50831();
void testFdo48335();
CPPUNIT_TEST_SUITE(Test); CPPUNIT_TEST_SUITE(Test);
#if !defined(MACOSX) && !defined(WNT) #if !defined(MACOSX) && !defined(WNT)
...@@ -58,6 +59,7 @@ public: ...@@ -58,6 +59,7 @@ public:
CPPUNIT_TEST(testFdo44174); CPPUNIT_TEST(testFdo44174);
CPPUNIT_TEST(testFdo50087); CPPUNIT_TEST(testFdo50087);
CPPUNIT_TEST(testFdo50831); CPPUNIT_TEST(testFdo50831);
CPPUNIT_TEST(testFdo48335);
#endif #endif
CPPUNIT_TEST_SUITE_END(); CPPUNIT_TEST_SUITE_END();
...@@ -144,6 +146,34 @@ void Test::testFdo50831() ...@@ -144,6 +146,34 @@ void Test::testFdo50831()
CPPUNIT_ASSERT_EQUAL(10.f, fValue); CPPUNIT_ASSERT_EQUAL(10.f, fValue);
} }
void Test::testFdo48335()
{
/*
* The problem was that we exported a fake pagebreak, make sure it's just a soft one now.
*
* oParas = ThisComponent.Text.createEnumeration
* oPara = oParas.nextElement
* oPara = oParas.nextElement
* oPara = oParas.nextElement
* oRuns = oPara.createEnumeration
* oRun = oRuns.nextElement
* xray oRun.TextPortionType 'was Text, should be SoftPageBreak
*/
roundtrip("fdo48335.odt");
uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY);
uno::Reference<container::XEnumerationAccess> xParaEnumAccess(xTextDocument->getText(), uno::UNO_QUERY);
uno::Reference<container::XEnumeration> xParaEnum = xParaEnumAccess->createEnumeration();
for (int i = 0; i < 2; i++)
xParaEnum->nextElement();
uno::Reference<container::XEnumerationAccess> xRunEnumAccess(xParaEnum->nextElement(), uno::UNO_QUERY);
uno::Reference<container::XEnumeration> xRunEnum = xRunEnumAccess->createEnumeration();
uno::Reference<beans::XPropertySet> xPropertySet(xRunEnum->nextElement(), uno::UNO_QUERY);
OUString aValue;
xPropertySet->getPropertyValue("TextPortionType") >>= aValue;
CPPUNIT_ASSERT_EQUAL(OUString("SoftPageBreak"), aValue);
}
CPPUNIT_TEST_SUITE_REGISTRATION(Test); CPPUNIT_TEST_SUITE_REGISTRATION(Test);
CPPUNIT_PLUGIN_IMPLEMENT(); CPPUNIT_PLUGIN_IMPLEMENT();
......
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