diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2014-12-19 19:41:52 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2014-12-19 22:54:28 +0100 |
commit | 97952280f0adbe195e6a2e0bab8a21a7e352a721 (patch) | |
tree | e97bee8c8d7248da3bce5ba48b2bd274fbd99c15 /sw/qa | |
parent | cdb8d7a53e587819044f2b5ea43c6416909686b1 (diff) |
fdo#86963 SwXShape: don't ask SwTextBoxHelper for ZOrder of child shapes
Regression from commit 01fc08c0b5c57fef8ad3755672f4266d85e849a5
(fdo#85554 SwXShape: fix getting ZOrder property when doc contains
TextBoxes, 2014-11-20), the problem was that we returned wrong ZOrder of
shapes inside group shapes.
In SwXShape::getPropertyValue(), pObj points to the Writer-interfacing
outermost group shape in case of shapes contained by group shapes, while
GetSvxShape() gives access to the real shape. Given that TextBoxes are
only possible at the highest level (and not inside group shapes), just
check if the two pointers are the same: when not, then no need to
convert anything.
With this, child shapes get back their original ZOrder -- before in case
the group shape had ZOrder=0, all its child shapes had ZOrder=0 as well.
Change-Id: I9c4097154130cd04f6ab2f2082abafc1d4333872
Diffstat (limited to 'sw/qa')
-rw-r--r-- | sw/qa/extras/odfexport/data/fdo86963.odt | bin | 0 -> 39845 bytes | |||
-rw-r--r-- | sw/qa/extras/odfexport/odfexport.cxx | 8 |
2 files changed, 8 insertions, 0 deletions
diff --git a/sw/qa/extras/odfexport/data/fdo86963.odt b/sw/qa/extras/odfexport/data/fdo86963.odt Binary files differnew file mode 100644 index 000000000000..72896e13995b --- /dev/null +++ b/sw/qa/extras/odfexport/data/fdo86963.odt diff --git a/sw/qa/extras/odfexport/odfexport.cxx b/sw/qa/extras/odfexport/odfexport.cxx index 9c2200c026e4..41c4ed9d4e0e 100644 --- a/sw/qa/extras/odfexport/odfexport.cxx +++ b/sw/qa/extras/odfexport/odfexport.cxx @@ -402,6 +402,14 @@ DECLARE_ODFEXPORT_TEST(testTextboxRoundedCorners, "textbox-rounded-corners.odt") CPPUNIT_ASSERT_EQUAL(OUString("a"), xCell->getString()); } +DECLARE_ODFEXPORT_TEST(testFdo86963, "fdo86963.odt") +{ + // Export of this document failed with beans::UnknownPropertyException. + uno::Reference<drawing::XDrawPageSupplier> xDrawPageSupplier(mxComponent, uno::UNO_QUERY); + uno::Reference<drawing::XDrawPage> xDrawPage = xDrawPageSupplier->getDrawPage(); + CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xDrawPage->getCount()); +} + #endif CPPUNIT_PLUGIN_IMPLEMENT(); |