diff options
author | Zolnai Tamás <tamas.zolnai@collabora.com> | 2014-05-30 13:45:36 +0200 |
---|---|---|
committer | Zolnai Tamás <tamas.zolnai@collabora.com> | 2014-05-30 13:45:36 +0200 |
commit | 53c376d35b7223d53e8c9403390afe53d1f69089 (patch) | |
tree | 1c91c821cef7e0ef685403fdb4dd91993aadf1ec /sd | |
parent | 2b6f2beec6ceffbde287ebef295eb27bb7f35d00 (diff) |
bnc#870237: wrong text position in grouped list
In grouped list text area does not cover the whole
shape but just a part of it at the top.
To get the same visual effect modify text distance
attribute.
Change-Id: I32f30d0afbc1975f940c4562ec65f46596e97060
Diffstat (limited to 'sd')
-rw-r--r-- | sd/qa/unit/data/pptx/bnc870237.pptx | bin | 0 -> 40889 bytes | |||
-rw-r--r-- | sd/qa/unit/import-tests.cxx | 22 |
2 files changed, 22 insertions, 0 deletions
diff --git a/sd/qa/unit/data/pptx/bnc870237.pptx b/sd/qa/unit/data/pptx/bnc870237.pptx Binary files differnew file mode 100644 index 000000000000..245ef51f8036 --- /dev/null +++ b/sd/qa/unit/data/pptx/bnc870237.pptx diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx index 640c51f69673..ae5cdafb2bcd 100644 --- a/sd/qa/unit/import-tests.cxx +++ b/sd/qa/unit/import-tests.cxx @@ -73,6 +73,7 @@ public: void testN862510_4(); void testFdo71961(); void testMediaEmbedding(); + void testBnc870237(); CPPUNIT_TEST_SUITE(SdFiltersTest); CPPUNIT_TEST(testDocumentLayout); @@ -97,6 +98,7 @@ public: CPPUNIT_TEST(testN862510_4); CPPUNIT_TEST(testFdo71961); CPPUNIT_TEST(testMediaEmbedding); + CPPUNIT_TEST(testBnc870237); CPPUNIT_TEST_SUITE_END(); }; @@ -738,6 +740,26 @@ void SdFiltersTest::testMediaEmbedding() CPPUNIT_ASSERT_EQUAL( OUString( "application/vnd.sun.star.media" ), pMediaObj->getMediaProperties().getMimeType()); } +void SdFiltersTest::testBnc870237() +{ + ::sd::DrawDocShellRef xDocShRef = loadURL(getURLFromSrc("/sd/qa/unit/data/pptx/bnc870237.pptx")); + + SdDrawDocument *pDoc = xDocShRef->GetDoc(); + CPPUNIT_ASSERT_MESSAGE( "no document", pDoc != NULL ); + const SdrPage *pPage = pDoc->GetPage (1); + CPPUNIT_ASSERT_MESSAGE( "no page", pPage != NULL ); + + // Simulate a:ext inside dsp:txXfrm with changing the lower distance + const SdrObjGroup* pObj = dynamic_cast<SdrObjGroup*>( pPage->GetObj( 1 ) ); + CPPUNIT_ASSERT_MESSAGE( "no object", pObj != NULL); + CPPUNIT_ASSERT_EQUAL( sal_Int32(0), (static_cast< const SdrTextUpperDistItem& >(pObj->GetMergedItem(SDRATTR_TEXT_UPPERDIST))).GetValue()); + CPPUNIT_ASSERT_EQUAL( sal_Int32(9919), (static_cast< const SdrTextLowerDistItem& >(pObj->GetMergedItem(SDRATTR_TEXT_LOWERDIST))).GetValue()); + CPPUNIT_ASSERT_EQUAL( sal_Int32(0), (static_cast< const SdrTextRightDistItem& >(pObj->GetMergedItem(SDRATTR_TEXT_RIGHTDIST))).GetValue()); + CPPUNIT_ASSERT_EQUAL( sal_Int32(0), (static_cast< const SdrTextLeftDistItem& >(pObj->GetMergedItem(SDRATTR_TEXT_LEFTDIST))).GetValue()); + + xDocShRef->DoClose(); +} + CPPUNIT_TEST_SUITE_REGISTRATION(SdFiltersTest); CPPUNIT_PLUGIN_IMPLEMENT(); |