diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2017-12-18 17:28:53 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2017-12-19 09:02:11 +0100 |
commit | fadd9d449719a97dc8d99d96b0ee663ae92759f8 (patch) | |
tree | bc8f201f8646ac8d2796939a4ae49941e9db8124 /writerperfect/qa | |
parent | 87ada8fe44c6caf21f1fd9a0f78aa2c26f1607f2 (diff) |
EPUB export, fixed layout: fix mm size of SVG pages
The preferred map unit was pixel, but SVGExport::writeMtf() expects the
map unit is always a logical one, given that it calls
OutputDevice::LogicToLogic() for it.
Change-Id: Id1f311eb14423a76a82886ca848c90ab48c6eb49
Reviewed-on: https://gerrit.libreoffice.org/46733
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
Diffstat (limited to 'writerperfect/qa')
-rw-r--r-- | writerperfect/qa/unit/EPUBExportTest.cxx | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/writerperfect/qa/unit/EPUBExportTest.cxx b/writerperfect/qa/unit/EPUBExportTest.cxx index 178041d9c0da..1cdd80040d2c 100644 --- a/writerperfect/qa/unit/EPUBExportTest.cxx +++ b/writerperfect/qa/unit/EPUBExportTest.cxx @@ -171,6 +171,7 @@ void EPUBExportTest::registerNamespaces(xmlXPathContextPtr &pXmlXpathCtx) xmlXPathRegisterNs(pXmlXpathCtx, BAD_CAST("dc"), BAD_CAST("http://purl.org/dc/elements/1.1/")); xmlXPathRegisterNs(pXmlXpathCtx, BAD_CAST("opf"), BAD_CAST("http://www.idpf.org/2007/opf")); xmlXPathRegisterNs(pXmlXpathCtx, BAD_CAST("xhtml"), BAD_CAST("http://www.w3.org/1999/xhtml")); + xmlXPathRegisterNs(pXmlXpathCtx, BAD_CAST("svg"), BAD_CAST("http://www.w3.org/2000/svg")); } void EPUBExportTest::createDoc(const OUString &rFile, const uno::Sequence<beans::PropertyValue> &rFilterData) @@ -813,6 +814,12 @@ void EPUBExportTest::testPageSize() mpXmlDoc = parseExport("OEBPS/sections/section0001.xhtml"); // 21,59cm x 27.94cm (letter). assertXPath(mpXmlDoc, "/xhtml:html/xhtml:head/xhtml:meta[@name='viewport']", "content", "width=816, height=1056"); + + xmlFreeDoc(mpXmlDoc); + mpXmlDoc = parseExport("OEBPS/images/image0001.svg"); + // This was 288mm, logic->logic conversion input was a pixel value. + assertXPath(mpXmlDoc, "/svg:svg", "width", "216mm"); + assertXPath(mpXmlDoc, "/svg:svg", "height", "279mm"); } void EPUBExportTest::testSVG() |