Kaydet (Commit) 60272bb3 authored tarafından Miklos Vajna's avatar Miklos Vajna

CppunitTest_sw_ooxmlimport: remaining textbox porting

These are the remaining changes: with these, if we import "drawingML
shape with text in DOCX" as "shape with textbox", no testcase in this
suite fails.

Change-Id: Ic39cc204e3cfb662f14db1810f7138df0829eb27
üst 136cd0f3
......@@ -1635,15 +1635,13 @@ DECLARE_OOXMLIMPORT_TEST(lineRotation, "line-rotation.docx")
DECLARE_OOXMLIMPORT_TEST(textboxWpsOnly, "textbox-wps-only.docx")
{
uno::Reference<text::XTextFramesSupplier> xTextFramesSupplier(mxComponent, uno::UNO_QUERY);
uno::Reference<container::XIndexAccess> xIndexAccess(xTextFramesSupplier->getTextFrames(), uno::UNO_QUERY);
uno::Reference<text::XTextRange> xFrame(xIndexAccess->getByIndex(0), uno::UNO_QUERY);
uno::Reference<text::XTextRange> xFrame(getShape(1), uno::UNO_QUERY);
CPPUNIT_ASSERT_EQUAL(OUString("Hello world!"), xFrame->getString());
// Position wasn't horizontally centered.
CPPUNIT_ASSERT_EQUAL(text::HoriOrientation::CENTER, getProperty<sal_Int16>(xFrame, "HoriOrient"));
// Position was the default (hori center, vert top) for the textbox.
xFrame.set(xIndexAccess->getByIndex(1), uno::UNO_QUERY);
xFrame.set(getShape(2), uno::UNO_QUERY);
CPPUNIT_ASSERT_EQUAL(sal_Int32(2173), getProperty<sal_Int32>(xFrame, "HoriOrientPosition"));
CPPUNIT_ASSERT_EQUAL(sal_Int32(2805), getProperty<sal_Int32>(xFrame, "VertOrientPosition"));
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment