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-07 14:55:43 +0100 |
commit | 98af842308727765050a6e03cdb0b25b5694bd27 (patch) | |
tree | c07161555561946bc140634c8d28cc4b85a7c337 /include | |
parent | a8f92371317d0056212063d473bb518cfbdbf874 (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/50896
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Tested-by: Jan Holesovsky <kendy@collabora.com>
Diffstat (limited to 'include')
-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 3f03a39c5301..0c8183115206 100644 --- a/include/comphelper/ofopxmlhelper.hxx +++ b/include/comphelper/ofopxmlhelper.hxx @@ -56,6 +56,18 @@ namespace OFOPXMLHelper { const css::uno::Reference< css::uno::XComponentContext >& rContext ) throw( css::uno::Exception ); + // 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" |