diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2014-10-09 11:09:48 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2014-10-09 13:20:50 +0200 |
commit | e16b01a9e4e111b1267c4eec1f5d168e5c2b8e53 (patch) | |
tree | 017ccb40916fa3fb549e27de936c5c435c3a4c33 /sw/qa | |
parent | 9defb89ede306b81a0c31a1afad9e71c95a30d32 (diff) |
drawingML export: fix <a:srcRect> if graphic's map mode is pixels
Change-Id: Idbe399648c60e39c61e2be09a77b0648f57d3347
Diffstat (limited to 'sw/qa')
-rw-r--r-- | sw/qa/extras/ooxmlexport/data/crop-pixel.docx | bin | 0 -> 28063 bytes | |||
-rw-r--r-- | sw/qa/extras/ooxmlexport/ooxmlexport.cxx | 10 |
2 files changed, 10 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlexport/data/crop-pixel.docx b/sw/qa/extras/ooxmlexport/data/crop-pixel.docx Binary files differnew file mode 100644 index 000000000000..1ddb2efb93e4 --- /dev/null +++ b/sw/qa/extras/ooxmlexport/data/crop-pixel.docx diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx index 279be0030435..3c0a59200207 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx @@ -435,6 +435,16 @@ DECLARE_OOXMLEXPORT_TEST(testTextboxTable, "textbox-table.docx") CPPUNIT_ASSERT_EQUAL(sal_Int32(2), xTables->getCount()); } +DECLARE_OOXMLEXPORT_TEST(testCropPixel, "crop-pixel.docx") +{ + // If map mode of the graphic is in pixels, then we used to handle original + // size of the graphic as mm100, but it was in pixels. + if (xmlDocPtr pXmlDoc = parseExport("word/document.xml")) + // This is 17667 in the original document (i.e. should be < 20000), but + // was 504666, so the image become invisible. + assertXPath(pXmlDoc, "//a:srcRect", "l", "19072"); +} + CPPUNIT_PLUGIN_IMPLEMENT(); /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |