diff options
author | Miklos Vajna <vmiklos@suse.cz> | 2013-03-04 17:18:22 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@suse.cz> | 2013-03-04 18:08:44 +0100 |
commit | 4ae71885ec61f87c46285150ef4ca84192627b7a (patch) | |
tree | 454301683548d45cef59f62e2f15b75139156aca /sw/qa/extras | |
parent | de45e004399ff3634b89711990607909a66e3541 (diff) |
fdo#56272 SwAnchoredDrawObject::_SetPositioningAttr: fix position
This reverts a part of 51cfbf0cfaec395a99a00f2c20fcba96de9a4427, that is
no longer needed, but causes incorrect drawing objects position.
The problem was that a non-zero position doesn't mean the layout in a
later iteration doesn't change the position, but the referred commit
didn't allow later iterations to fine-tune the position.
Change-Id: Id91a4c6952d1b58e0c5bc0b1a60991a284c29ddc
Diffstat (limited to 'sw/qa/extras')
-rw-r--r-- | sw/qa/extras/odfimport/data/fdo56272.odt | bin | 0 -> 10522 bytes | |||
-rw-r--r-- | sw/qa/extras/odfimport/odfimport.cxx | 11 |
2 files changed, 11 insertions, 0 deletions
diff --git a/sw/qa/extras/odfimport/data/fdo56272.odt b/sw/qa/extras/odfimport/data/fdo56272.odt Binary files differnew file mode 100644 index 000000000000..57241d3a78a6 --- /dev/null +++ b/sw/qa/extras/odfimport/data/fdo56272.odt diff --git a/sw/qa/extras/odfimport/odfimport.cxx b/sw/qa/extras/odfimport/odfimport.cxx index cfeda28b4048..37da3176ba46 100644 --- a/sw/qa/extras/odfimport/odfimport.cxx +++ b/sw/qa/extras/odfimport/odfimport.cxx @@ -43,6 +43,7 @@ public: void testPageStyleLayoutDefault(); void testPageStyleLayoutRight(); void testFdo60842(); + void testFdo56272(); CPPUNIT_TEST_SUITE(Test); #if !defined(MACOSX) && !defined(WNT) @@ -63,6 +64,7 @@ void Test::run() {"hello.odt", &Test::testPageStyleLayoutDefault}, {"hello.odt", &Test::testPageStyleLayoutRight}, {"fdo60842.odt", &Test::testFdo60842}, + {"fdo56272.odt", &Test::testFdo56272}, }; header(); for (unsigned int i = 0; i < SAL_N_ELEMENTS(aMethods); ++i) @@ -303,6 +305,15 @@ void Test::testFdo60842() getCell(xTable, "E1", "01/04/2012"); } +void Test::testFdo56272() +{ + uno::Reference<drawing::XDrawPageSupplier> xDrawPageSupplier(mxComponent, uno::UNO_QUERY); + uno::Reference<container::XIndexAccess> xDraws(xDrawPageSupplier->getDrawPage(), uno::UNO_QUERY); + uno::Reference<drawing::XShape> xShape(xDraws->getByIndex(0), uno::UNO_QUERY); + // Vertical position was incorrect. + CPPUNIT_ASSERT_EQUAL(sal_Int32(422), xShape->getPosition().Y); // Was -2371 +} + CPPUNIT_TEST_SUITE_REGISTRATION(Test); CPPUNIT_PLUGIN_IMPLEMENT(); |