diff options
author | Zolnai Tamás <tamas.zolnai@collabora.com> | 2014-05-30 14:35:09 +0200 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2014-05-31 10:43:12 +0000 |
commit | 1f29a3435b11bd6bfc60343953d8b072c7470746 (patch) | |
tree | 18cacb814cfe07f1e57d8b34b2d8eb81469ad890 /sd | |
parent | 2d89b1a029514935b60fbd3f7f7c5341a329bfc8 (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.
(cherry picked from commit 53c376d35b7223d53e8c9403390afe53d1f69089)
Conflicts:
sd/qa/unit/import-tests.cxx
Change-Id: I32f30d0afbc1975f940c4562ec65f46596e97060
Reviewed-on: https://gerrit.libreoffice.org/9569
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Tested-by: Andras Timar <andras.timar@collabora.com>
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 7fddb392f049..8e81c7d2089c 100644 --- a/sd/qa/unit/import-tests.cxx +++ b/sd/qa/unit/import-tests.cxx @@ -54,6 +54,7 @@ public: void testFdo71075(); void testN828390(); void testFdo71961(); + void testBnc870237(); CPPUNIT_TEST_SUITE(SdFiltersTest); CPPUNIT_TEST(testDocumentLayout); @@ -65,6 +66,7 @@ public: CPPUNIT_TEST(testFdo71075); CPPUNIT_TEST(testN828390); CPPUNIT_TEST(testFdo71961); + CPPUNIT_TEST(testBnc870237); CPPUNIT_TEST_SUITE_END(); }; @@ -400,6 +402,26 @@ void SdFiltersTest::testFdo71961() CPPUNIT_ASSERT_EQUAL( true, (static_cast<const SdrTextWordWrapItem&>(pTxtObj->GetMergedItem(SDRATTR_TEXT_WORDWRAP))).GetValue()); } +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(); |