summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2014-05-06 13:19:36 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2014-05-06 14:22:50 +0200
commitaa3a25ca74d3abd204051c2747907031f7557510 (patch)
treeb9811982904a9beb2e853a50969d956a5ecdcd10 /sw
parent5e80dd672fe64d44e05a2025e9569afdd62bb0d7 (diff)
oox custom shape preset data: fix typo in parsing awt::Size
Regression from commit f5ccbfdc561c68099872d1abe07ac72fcddedd35 (oox customshapepreset: switch to generated data -> code, 2014-04-17). Change-Id: I2106271e2f43e7936237628e47cd4e01ab34441c
Diffstat (limited to 'sw')
-rwxr-xr-xsw/qa/extras/ooxmlexport/data/preset-shape.docxbin0 -> 16054 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlsdrexport.cxx12
2 files changed, 12 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlexport/data/preset-shape.docx b/sw/qa/extras/ooxmlexport/data/preset-shape.docx
new file mode 100755
index 000000000000..922b906e25d4
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/preset-shape.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlsdrexport.cxx b/sw/qa/extras/ooxmlexport/ooxmlsdrexport.cxx
index 6ec9982a1c86..913a6111ab81 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlsdrexport.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlsdrexport.cxx
@@ -24,6 +24,7 @@
#include <com/sun/star/text/GraphicCrop.hpp>
#include <comphelper/sequenceashashmap.hxx>
+#include <comphelper/sequenceasvector.hxx>
class Test : public SwModelTestBase
{
@@ -1209,6 +1210,17 @@ DECLARE_OOXMLEXPORT_TEST(test77219, "test77219.docx")
assertXPath(pXmlDoc, "/w:document[1]/w:body[1]/w:p[6]/w:r[1]/mc:AlternateContent[1]/mc:Choice[1]/w:drawing[1]/wp:anchor[1]", "behindDoc", "1");
}
+DECLARE_OOXMLEXPORT_TEST(testPresetShape, "preset-shape.docx")
+{
+ // Document contains a flowChartMultidocument preset shape, our date for that shape wasn't correct.
+ uno::Reference<beans::XPropertySet> xPropertySet(getShape(1), uno::UNO_QUERY);
+ comphelper::SequenceAsHashMap aCustomShapeGeometry(xPropertySet->getPropertyValue("CustomShapeGeometry"));
+ comphelper::SequenceAsHashMap aPath(aCustomShapeGeometry["Path"]);
+ comphelper::SequenceAsVector<awt::Size> aSubViewSize(aPath["SubViewSize"]);
+ // This was 0.
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(21600), aSubViewSize[0].Height);
+}
+
#endif
CPPUNIT_PLUGIN_IMPLEMENT();