diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2017-08-24 18:08:11 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2017-08-25 09:23:13 +0200 |
commit | 8d411f38badc7adc61fdfc5c08fdbda247bce37a (patch) | |
tree | b79afd41e8bd6b584f2eaf24228c721d5388d693 /writerperfect/source | |
parent | 2ea022ec2101703a7034dbb640553165eb0ff224 (diff) |
EPUB export: make sure that the mimetype stream is not compressed
Similar to ODF, the spec mandates this, and recent enough epubcheck
validator asserts this.
Also backport 2 libepubgen commits that fix other validator errors
around missing mimetypes / malformed URLs.
Change-Id: I29f0524465a30d26585cea92ec27bd336f6a17d8
Reviewed-on: https://gerrit.libreoffice.org/41526
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Diffstat (limited to 'writerperfect/source')
-rw-r--r-- | writerperfect/source/writer/EPUBPackage.cxx | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/writerperfect/source/writer/EPUBPackage.cxx b/writerperfect/source/writer/EPUBPackage.cxx index 3a33dedac3eb..0e34400171da 100644 --- a/writerperfect/source/writer/EPUBPackage.cxx +++ b/writerperfect/source/writer/EPUBPackage.cxx @@ -13,6 +13,7 @@ #include <com/sun/star/embed/XTransactedObject.hpp> #include <com/sun/star/io/XSeekable.hpp> #include <com/sun/star/xml/sax/Writer.hpp> +#include <com/sun/star/beans/XPropertySet.hpp> #include <comphelper/storagehelper.hxx> #include <unotools/mediadescriptor.hxx> @@ -39,6 +40,10 @@ EPUBPackage::EPUBPackage(const uno::Reference<uno::XComponentContext> &xContext, mxOutputStream->writeBytes(aData); uno::Reference<embed::XTransactedObject> xTransactedObject(mxOutputStream, uno::UNO_QUERY); xTransactedObject->commit(); + + // MIME type must be uncompressed. + uno::Reference<beans::XPropertySet> xPropertySet(mxOutputStream, uno::UNO_QUERY); + xPropertySet->setPropertyValue("Compressed", uno::makeAny(false)); mxOutputStream.clear(); } |