diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2015-11-11 08:57:31 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-11-13 15:25:40 +0000 |
commit | ca8cdb9afc886f3013a7c1d8707d4c5bef70a1c5 (patch) | |
tree | a16495127b802a4692575a07f9559cc82ac5ab7e /sw | |
parent | 45c6d948fbac77a8a6926f56579a4ceba981288f (diff) |
tdf#85232 WPG import: fix handling of line shapes
The missing convertMm100ToTwip() calls mispositioned the line shapes
inside the groupshape in case of using drawingML inside DOCX files.
(cherry picked from commit 11129d89b152db54c86bb2bda58c24b8abb6c5a8)
Conflicts:
sw/qa/extras/ooxmlimport/ooxmlimport.cxx
Change-Id: I0c9d652de43d779f9073a8bfe22866ce4f31d0fa
Reviewed-on: https://gerrit.libreoffice.org/19946
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/qa/extras/ooxmlimport/data/tdf85232.docx | bin | 0 -> 24373 bytes | |||
-rw-r--r-- | sw/qa/extras/ooxmlimport/ooxmlimport.cxx | 11 |
2 files changed, 11 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlimport/data/tdf85232.docx b/sw/qa/extras/ooxmlimport/data/tdf85232.docx Binary files differnew file mode 100644 index 000000000000..35e8a888148d --- /dev/null +++ b/sw/qa/extras/ooxmlimport/data/tdf85232.docx diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx index 42dc7362c1e7..d463bf4e9803 100644 --- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx +++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx @@ -2836,6 +2836,17 @@ DECLARE_OOXMLIMPORT_TEST(testTdf94374, "hello.docx") CPPUNIT_ASSERT(paste("tdf94374.docx", xEnd)); } +DECLARE_OOXMLIMPORT_TEST(testTdf85232, "tdf85232.docx") +{ + uno::Reference<drawing::XShapes> xShapes(getShapeByName("Group 219"), uno::UNO_QUERY); + uno::Reference<drawing::XShape> xShape(xShapes->getByIndex(1), uno::UNO_QUERY); + uno::Reference<drawing::XShapeDescriptor> xShapeDescriptor(xShape, uno::UNO_QUERY); + // Make sure we're not testing the ellipse child. + CPPUNIT_ASSERT_EQUAL(OUString("com.sun.star.drawing.LineShape"), xShapeDescriptor->getShapeType()); + // This was 2900: horizontal position of the line was incorrect, the 3 children were not connected visually. + CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(2267), xShape->getPosition().X); +} + #endif CPPUNIT_PLUGIN_IMPLEMENT(); |