summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2013-12-03 15:19:56 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2013-12-03 15:39:04 +0100
commit197ec9cf1b7f50e0221c12e05dbc3e0064a82352 (patch)
tree139487a2b4a56c9e6bb874417e15884613e70c26 /sw
parent57450afb768c085df0ba2344aa94b5f843060178 (diff)
DOCX drawingML groupshape import: fix relative position
Change-Id: Ice07f423707b48a013a9b6325b11f88206c38e60
Diffstat (limited to 'sw')
-rw-r--r--sw/qa/extras/ooxmlimport/data/textbox-wpg-only.docxbin0 -> 16526 bytes
-rw-r--r--sw/qa/extras/ooxmlimport/ooxmlimport.cxx8
2 files changed, 8 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlimport/data/textbox-wpg-only.docx b/sw/qa/extras/ooxmlimport/data/textbox-wpg-only.docx
new file mode 100644
index 000000000000..cd853f97d55f
--- /dev/null
+++ b/sw/qa/extras/ooxmlimport/data/textbox-wpg-only.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
index 853c3169a43e..b0903b68505d 100644
--- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
+++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
@@ -1555,6 +1555,14 @@ DECLARE_OOXMLIMPORT_TEST(testWpgOnly, "wpg-only.docx")
CPPUNIT_ASSERT_EQUAL(sal_Int32(EMU_TO_MM100(548005)), xShape->getPosition().X);
}
+DECLARE_OOXMLIMPORT_TEST(textboxWpgOnly, "textbox-wpg-only.docx")
+{
+ uno::Reference<drawing::XShape> xShape = getShape(1);
+ // The relativeFrom attribute was ignored for groupshapes, i.e. these were text::RelOrientation::FRAME.
+ CPPUNIT_ASSERT_EQUAL(text::RelOrientation::PAGE_FRAME, getProperty<sal_Int16>(xShape, "HoriOrientRelation"));
+ CPPUNIT_ASSERT_EQUAL(text::RelOrientation::PAGE_FRAME, getProperty<sal_Int16>(xShape, "VertOrientRelation"));
+}
+
DECLARE_OOXMLIMPORT_TEST(testFdo70457, "fdo70457.docx")
{
// The document contains a rotated bitmap