summaryrefslogtreecommitdiff
path: root/sw/qa/extras
diff options
context:
space:
mode:
authorVictor Mireyev <victor@opennodecloud.com>2018-05-04 16:56:22 +0300
committerMiklos Vajna <vmiklos@collabora.co.uk>2018-05-10 14:14:06 +0200
commit9992338fbbf46bf381501df6c7763bf117d2ee25 (patch)
treeb5c2454ba67e916efb79e9f7ca37d3ee4856af24 /sw/qa/extras
parentc0965754df3309c39d316b76b2205af559bd28e3 (diff)
tdf#79315 Fix wp:effectExtent issue when exporting inline picture to DOCX.
Change-Id: I250bb365593c6a06f1d99f28b36e8bde183b16e6 Reviewed-on: https://gerrit.libreoffice.org/53679 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jacobo Aragunde PĂ©rez <jaragunde@igalia.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Diffstat (limited to 'sw/qa/extras')
-rw-r--r--sw/qa/extras/ooxmlexport/data/effect-extent-inline.docxbin0 -> 25805 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport.cxx14
2 files changed, 14 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlexport/data/effect-extent-inline.docx b/sw/qa/extras/ooxmlexport/data/effect-extent-inline.docx
new file mode 100644
index 000000000000..bb7db129aac9
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/effect-extent-inline.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
index bc831c024ec1..0442456cd8c8 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
@@ -558,6 +558,20 @@ DECLARE_OOXMLEXPORT_TEST(testEffectExtent, "effect-extent.docx")
assertXPath(pXmlDoc, "//wp:effectExtent", "l", "114300");
}
+DECLARE_OOXMLEXPORT_TEST(testEffectExtentInline, "effect-extent-inline.docx")
+{
+ // The problem was that in case there was inline rotated picture, we
+ // wrote a <wp:effectExtent> full or zeros.
+ if (xmlDocPtr pXmlDoc = parseExport("word/document.xml"))
+ {
+ // E.g. this was 0.
+ assertXPath(pXmlDoc, "//wp:effectExtent", "l", "609600");
+ assertXPath(pXmlDoc, "//wp:effectExtent", "r", "590550");
+ assertXPath(pXmlDoc, "//wp:effectExtent", "t", "590550");
+ assertXPath(pXmlDoc, "//wp:effectExtent", "b", "571500");
+ }
+}
+
DECLARE_OOXMLEXPORT_TEST(testEm, "em.docx")
{
// Test all possible <w:em> arguments.