From 4932775dae4642bd1157495927c7fcda2589ca15 Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Tue, 26 Nov 2013 16:54:05 +0100 Subject: DOCX drawingML shape import: handle wp:align for wps:txbx positioning I.e. previously only absolutely positioned textboxes were handled, with this, centered textboxes are fine as well. Given that the drawingml picture import code already supported this, refactor common code to a common method. Change-Id: I56e0dbfa0ffc7e27a70a0e8fb8477681389a51cf --- sw/qa/extras/ooxmlimport/ooxmlimport.cxx | 2 ++ 1 file changed, 2 insertions(+) (limited to 'sw') diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx index 551d743e927f..69beb44e2055 100644 --- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx +++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx @@ -1539,6 +1539,8 @@ DECLARE_OOXMLIMPORT_TEST(textboxWpsOnly, "textbox-wps-only.docx") uno::Reference xIndexAccess(xTextFramesSupplier->getTextFrames(), uno::UNO_QUERY); uno::Reference xFrame(xIndexAccess->getByIndex(0), uno::UNO_QUERY); CPPUNIT_ASSERT_EQUAL(OUString("Hello world!"), xFrame->getString()); + // Position wasn't horizontally centered. + CPPUNIT_ASSERT_EQUAL(text::HoriOrientation::CENTER, getProperty(xFrame, "HoriOrient")); // Position was the default (hori center, vert top) for the textbox. xFrame.set(xIndexAccess->getByIndex(1), uno::UNO_QUERY); -- cgit