diff options
author | Ashod Nakashian <ashod.nakashian@collabora.co.uk> | 2018-03-06 22:43:34 -0500 |
---|---|---|
committer | Jan Holesovsky <kendy@collabora.com> | 2018-03-08 12:40:19 +0100 |
commit | 8f79f22a8d4b1c2d209c55cd618c24428960088f (patch) | |
tree | 0447e43cdca126688699ffd76665c130247b7384 /package/source | |
parent | 4de1c0223ceb76556ff1c20000b4ea95bfc1d2a0 (diff) |
oox: preserve the ContentType of custom files
Generic logic to preserve custom files with
their correct ContentType. Standard default
file extensions with respective ContentType
preserved in [Content_Types].xml.
Change-Id: I651ed691e9a4745cd2cb4b3c4d4c5fd7287b66c2
Reviewed-on: https://gerrit.libreoffice.org/50856
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Diffstat (limited to 'package/source')
-rw-r--r-- | package/source/zippackage/ZipPackage.cxx | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/package/source/zippackage/ZipPackage.cxx b/package/source/zippackage/ZipPackage.cxx index cddda58e68a5..a04580dcaeae 100644 --- a/package/source/zippackage/ZipPackage.cxx +++ b/package/source/zippackage/ZipPackage.cxx @@ -1088,10 +1088,16 @@ void ZipPackage::WriteContentTypes( ZipOutputStream& aZipOut, const vector< uno: // Convert vector into a uno::Sequence // TODO/LATER: use Default entries in future - uno::Sequence< beans::StringPair > aDefaultsSequence(1); - // Add at least the application/xml default entry. + uno::Sequence< beans::StringPair > aDefaultsSequence(4); + // Add at least the standard default entries. aDefaultsSequence[0].First = "xml"; aDefaultsSequence[0].Second= "application/xml"; + aDefaultsSequence[1].First = "rels"; + aDefaultsSequence[1].Second= "application/vnd.openxmlformats-package.relationships+xml"; + aDefaultsSequence[2].First = "png"; + aDefaultsSequence[2].Second= "image/png"; + aDefaultsSequence[3].First = "jpeg"; + aDefaultsSequence[3].Second= "image/jpeg"; uno::Sequence< beans::StringPair > aOverridesSequence(aManList.size()); sal_Int32 nOverSeqLength = 0; |