diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2013-11-26 16:54:05 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2013-11-26 17:15:53 +0100 |
commit | 4932775dae4642bd1157495927c7fcda2589ca15 (patch) | |
tree | 037677fb4d6229b630ea6dc794863e0d5badba45 /sw | |
parent | a6dab58bd3542ff7a64af3d4080c89d419dd0fce (diff) |
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
Diffstat (limited to 'sw')
-rw-r--r-- | sw/qa/extras/ooxmlimport/ooxmlimport.cxx | 2 |
1 files changed, 2 insertions, 0 deletions
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<container::XIndexAccess> xIndexAccess(xTextFramesSupplier->getTextFrames(), uno::UNO_QUERY); uno::Reference<text::XTextRange> 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<sal_Int16>(xFrame, "HoriOrient")); // Position was the default (hori center, vert top) for the textbox. xFrame.set(xIndexAccess->getByIndex(1), uno::UNO_QUERY); |