diff options
author | Matus Uzak <matus.uzak@gmail.com> | 2016-05-04 19:09:00 +0200 |
---|---|---|
committer | Thorsten Behrens <Thorsten.Behrens@CIB.de> | 2016-05-19 01:45:42 +0000 |
commit | bd3ed061de068a03a7c75f093c9a9bd7b6f3ba57 (patch) | |
tree | 56dfbd1f5d11c61c8849923da70f9e19e1127540 /sd/qa | |
parent | ac47f00f57ceee1d759393321b87477fa094b111 (diff) |
tdf#49561: PPT import: Avoid to override formatting from StyleTextPropAtom
Change-Id: Id874cb369b08eb7f8226413c6541fe6cd18eceaa
Reviewed-on: https://gerrit.libreoffice.org/24662
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Diffstat (limited to 'sd/qa')
-rw-r--r-- | sd/qa/unit/data/ppt/tdf49561.ppt | bin | 0 -> 14336 bytes | |||
-rw-r--r-- | sd/qa/unit/import-tests.cxx | 28 |
2 files changed, 28 insertions, 0 deletions
diff --git a/sd/qa/unit/data/ppt/tdf49561.ppt b/sd/qa/unit/data/ppt/tdf49561.ppt Binary files differnew file mode 100644 index 000000000000..c80bf1252fed --- /dev/null +++ b/sd/qa/unit/data/ppt/tdf49561.ppt diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx index e95cfecd1082..93dca4cff29a 100644 --- a/sd/qa/unit/import-tests.cxx +++ b/sd/qa/unit/import-tests.cxx @@ -121,6 +121,7 @@ public: void testTdf93868(); void testTdf95932(); void testTdf99030(); + void testTdf49561(); CPPUNIT_TEST_SUITE(SdImportTest); @@ -170,6 +171,7 @@ public: CPPUNIT_TEST(testTdf93868); CPPUNIT_TEST(testTdf95932); CPPUNIT_TEST(testTdf99030); + CPPUNIT_TEST(testTdf49561); CPPUNIT_TEST_SUITE_END(); }; @@ -1378,6 +1380,32 @@ void SdImportTest::testTdf99030() xDocShRef->DoClose(); } +void SdImportTest::testTdf49561() +{ + sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/ppt/tdf49561.ppt"), PPT); + + uno::Reference< drawing::XMasterPagesSupplier > xDoc( + xDocShRef->GetDoc()->getUnoModel(), uno::UNO_QUERY_THROW ); + uno::Reference< drawing::XDrawPage > xPage( + xDoc->getMasterPages()->getByIndex( 0 ), uno::UNO_QUERY_THROW ); + CPPUNIT_ASSERT_EQUAL( sal_Int32(5), xPage->getCount() ); + + uno::Reference< beans::XPropertySet > xShape( getShape( 3, xPage ) ); + uno::Reference<text::XTextRange> xParagraph( getParagraphFromShape( 0, xShape ) ); + uno::Reference<text::XTextRange> xRun( getRunFromParagraph (0, xParagraph ) ); + uno::Reference< beans::XPropertySet > xPropSet(xRun , uno::UNO_QUERY_THROW ); + + float fCharHeight = 0; + CPPUNIT_ASSERT(xPropSet->getPropertyValue("CharHeight") >>= fCharHeight); + CPPUNIT_ASSERT_EQUAL(12.f, fCharHeight); + + OUString aCharFontName; + CPPUNIT_ASSERT(xPropSet->getPropertyValue("CharFontName") >>= aCharFontName); + CPPUNIT_ASSERT_EQUAL(OUString("Stencil"), aCharFontName); + + xDocShRef->DoClose(); +} + CPPUNIT_TEST_SUITE_REGISTRATION(SdImportTest); CPPUNIT_PLUGIN_IMPLEMENT(); |