diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2014-01-20 15:05:50 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2014-01-20 16:22:05 +0100 |
commit | 305077c6c382aee1c5509b5b7809d8d73d65c674 (patch) | |
tree | 0f9483a6b633b0a9eb17dc9d76f3fadba3ee6e40 /sw | |
parent | 24ea8a7c5070fd48a7b162c2e5c092a0f29093ff (diff) |
drawingML export: zero rotation shouldn't alter the shape position
I'm not exactly sure why existing code didn't do this implicitly, but at
least this improves the situation.
Change-Id: Id2bb169c513827b7ef48640dc88fad90a83d2bee
Diffstat (limited to 'sw')
-rw-r--r-- | sw/qa/extras/ooxmlexport/data/dml-textshape.docx | bin | 16129 -> 16496 bytes | |||
-rw-r--r-- | sw/qa/extras/ooxmlexport/ooxmlexport.cxx | 8 |
2 files changed, 8 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlexport/data/dml-textshape.docx b/sw/qa/extras/ooxmlexport/data/dml-textshape.docx Binary files differindex e5be42cd8c5a..b98eea79c054 100644 --- a/sw/qa/extras/ooxmlexport/data/dml-textshape.docx +++ b/sw/qa/extras/ooxmlexport/data/dml-textshape.docx diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx index 8d019306601b..ae4ab8cd6f70 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx @@ -43,6 +43,7 @@ #include <unotools/tempfile.hxx> #include <unotools/ucbstreamhelper.hxx> #include <rtl/strbuf.hxx> +#include <comphelper/sequenceashashmap.hxx> #include <com/sun/star/text/XDocumentIndex.hpp> #include <libxml/xpathInternals.h> @@ -2483,6 +2484,13 @@ DECLARE_OOXMLEXPORT_TEST(testDmlTextshape, "dml-textshape.docx") return; // This was wrap="none". assertXPath(pXmlDocument, "/w:document/w:body/w:p[2]/w:r/mc:AlternateContent/mc:Choice/w:drawing/wp:inline/a:graphic/a:graphicData/wpg:wgp/wps:wsp[2]/wps:bodyPr", "wrap", "square"); + + xShape.set(xGroup->getByIndex(3), uno::UNO_QUERY); + OUString aType = comphelper::SequenceAsHashMap(getProperty<beans::PropertyValues>(xShape, "CustomShapeGeometry"))["Type"].get<OUString>(); + CPPUNIT_ASSERT_EQUAL(OUString("ooxml-bentConnector3"), aType); + // Connector was incorrectly shifted towards the top left corner, X was 552, Y was 0. + CPPUNIT_ASSERT_EQUAL(sal_Int32(4018), xShape->getPosition().X); + CPPUNIT_ASSERT_EQUAL(sal_Int32(1256), xShape->getPosition().Y); } DECLARE_OOXMLEXPORT_TEST(testShapeThemePreservation, "shape-theme-preservation.docx") |