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 /include/comphelper | |
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 'include/comphelper')
-rw-r--r-- | include/comphelper/ofopxmlhelper.hxx | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/comphelper/ofopxmlhelper.hxx b/include/comphelper/ofopxmlhelper.hxx index c0215a0d21d3..8c3b62be3956 100644 --- a/include/comphelper/ofopxmlhelper.hxx +++ b/include/comphelper/ofopxmlhelper.hxx @@ -56,6 +56,18 @@ namespace OFOPXMLHelper { const css::uno::Reference< css::io::XInputStream >& xInStream, const css::uno::Reference< css::uno::XComponentContext >& rContext ); + // returns the ContentType for the given name, or empty when not found. + // rContentTypes is a sequence containing two entries of type sequence<StringPair> + // the first sequence describes "Default" elements, where each element is described + // by StringPair object ( First - Extension, Second - ContentType ) + // the second sequence describes "Override" elements, where each element is described + // by StringPair object ( First - PartName, Second - ContentType ) + // The "Override" sequence is searched first before falling back on "Default". + COMPHELPER_DLLPUBLIC + OUString + GetContentTypeByName(const css::uno::Sequence<css::uno::Sequence<css::beans::StringPair>>& rContentTypes, + const OUString& rFilename); + // writes sequence of elements, where each element is described by sequence of tags, // where each tag is described by StringPair ( First - name, Second - value ) // the first tag of each element sequence must be "Id" |