diff options
Diffstat (limited to 'sw/qa/core/doc/doc.cxx')
-rw-r--r-- | sw/qa/core/doc/doc.cxx | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/sw/qa/core/doc/doc.cxx b/sw/qa/core/doc/doc.cxx index 72895861f713..381e873ed7b9 100644 --- a/sw/qa/core/doc/doc.cxx +++ b/sw/qa/core/doc/doc.cxx @@ -82,6 +82,22 @@ CPPUNIT_TEST_FIXTURE(SwCoreDocTest, testTextboxTextRotateAngle) ErrorRegistry::Reset(); } +CPPUNIT_TEST_FIXTURE(SwCoreDocTest, testTextBoxZOrder) +{ + SwDoc* pDoc = createDoc("textbox-zorder.docx"); + SwFrameFormats& rFormats = *pDoc->GetSpzFrameFormats(); + CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(3), rFormats.size()); + const SwFrameFormat* pEllipse = rFormats[2]; + const SdrObject* pEllipseShape = pEllipse->FindRealSdrObject(); + // Make sure we test the right shape. + CPPUNIT_ASSERT_EQUAL(OUString("Shape3"), pEllipseShape->GetName()); + // Without the accompanying fix in place, this test would have failed with: + // - Expected: 2 + // - Actual : 1 + // i.e. the ellipse was under the frame of the shape-frame pair, not on top of it. + CPPUNIT_ASSERT_EQUAL(static_cast<sal_uInt32>(2), pEllipseShape->GetOrdNum()); +} + CPPUNIT_PLUGIN_IMPLEMENT(); /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |