oox/source/drawingml/textbodypropertiescontext.cxx | 4 ++++ sd/qa/unit/data/pptx/n778859.pptx |binary sd/qa/unit/filters-test.cxx | 20 ++++++++++++++++++++ 3 files changed, 24 insertions(+)
New commits: commit 3a25a6503dea6dcbcca676f2d9ae741b8ed1696f Author: Muthu Subramanian <sumu...@suse.com> Date: Mon Sep 10 18:28:58 2012 +0530 n#778859: Add unit test case. diff --git a/sd/qa/unit/data/pptx/n778859.pptx b/sd/qa/unit/data/pptx/n778859.pptx new file mode 100644 index 0000000..034cfc5 Binary files /dev/null and b/sd/qa/unit/data/pptx/n778859.pptx differ diff --git a/sd/qa/unit/filters-test.cxx b/sd/qa/unit/filters-test.cxx index 2b474bc..b5ae803 100644 --- a/sd/qa/unit/filters-test.cxx +++ b/sd/qa/unit/filters-test.cxx @@ -70,9 +70,11 @@ public: void test(); // Ensure CVEs remain unbroken void testCVEs(); + void testN778859(); CPPUNIT_TEST_SUITE(SdFiltersTest); CPPUNIT_TEST(test); + CPPUNIT_TEST(testN778859); CPPUNIT_TEST(testCVEs); CPPUNIT_TEST_SUITE_END(); @@ -158,6 +160,24 @@ void SdFiltersTest::test() xDocShRef->DoClose(); } +void SdFiltersTest::testN778859() +{ + ::sd::DrawDocShellRef xDocShRef = loadURL(getURLFromSrc("/sd/qa/unit/data/pptx/n778859.pptx")); + CPPUNIT_ASSERT_MESSAGE( "failed to load", xDocShRef.Is() ); + CPPUNIT_ASSERT_MESSAGE( "not in destruction", !xDocShRef->IsInDestruction() ); + + SdDrawDocument *pDoc = xDocShRef->GetDoc(); + CPPUNIT_ASSERT_MESSAGE( "no document", pDoc != NULL ); + const SdrPage *pPage = pDoc->GetPage(1); + CPPUNIT_ASSERT_MESSAGE( "no page", pPage != NULL ); + { + // Get the object + SdrObject *pObj = pPage->GetObj(1); + SdrTextObj *pTxtObj = dynamic_cast<SdrTextObj *>( pObj ); + CPPUNIT_ASSERT(!pTxtObj->IsAutoFit()); + } +} + bool SdFiltersTest::load(const rtl::OUString &rFilter, const rtl::OUString &rURL, const rtl::OUString &rUserData) { commit 5b75c17f207d2156e17430ef3e31b5784804b9f7 Author: Muthu Subramanian <sumu...@suse.com> Date: Mon Sep 10 18:26:13 2012 +0530 n#778859: Non autofit text are imported as autofit. Push default values if <bodyPr> exists. diff --git a/oox/source/drawingml/textbodypropertiescontext.cxx b/oox/source/drawingml/textbodypropertiescontext.cxx index 5bae9f0..e3c0e1b 100644 --- a/oox/source/drawingml/textbodypropertiescontext.cxx +++ b/oox/source/drawingml/textbodypropertiescontext.cxx @@ -113,6 +113,10 @@ TextBodyPropertiesContext::TextBodyPropertiesContext( ContextHandler& rParent, } mrTextBodyProp.maPropertyMap[ PROP_TextVerticalAdjust ] <<= mrTextBodyProp.meVA; } + + // Push defaults + mrTextBodyProp.maPropertyMap[ PROP_TextAutoGrowHeight ] <<= false; + mrTextBodyProp.maPropertyMap[ PROP_TextFitToSize ] <<= drawing::TextFitToSizeType_NONE; } // -------------------------------------------------------------------- _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits