From 66331ed8f549cd9fad331b7d2a1d7dcf3498a553 Mon Sep 17 00:00:00 2001 From: Samuel Mehrbrodt Date: Wed, 15 Apr 2020 14:59:15 +0200 Subject: tdf#131936 Correctly detect OOXML variant on import Change-Id: I29a6b0454bf741ce8ad49078597b3412a83dedb9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92278 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt (cherry picked from commit ff93e4977cb1e23f355d248a77e8d0e56bb0f4b9) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92766 Reviewed-by: Thorsten Behrens --- include/oox/core/filterdetect.hxx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/oox/core/filterdetect.hxx b/include/oox/core/filterdetect.hxx index ac3194e81acd..f3f5f24d40b0 100644 --- a/include/oox/core/filterdetect.hxx +++ b/include/oox/core/filterdetect.hxx @@ -49,6 +49,12 @@ namespace oox { class AttributeList; } namespace oox { namespace core { +enum class OOXMLVariant { + ECMA_Transitional, + ISO_Transitional, + ISO_Strict +}; + /** Document handler specifically designed for detecting OOXML file formats. @@ -79,7 +85,7 @@ public: private: void parseRelationship( const AttributeList& rAttribs ); - static OUString getFilterNameFromContentType( const OUString& rContentType, const OUString& rFileName ); + OUString getFilterNameFromContentType( const OUString& rContentType, const OUString& rFileName ); void parseContentTypesDefault( const AttributeList& rAttribs ); void parseContentTypesOverride( const AttributeList& rAttribs ); @@ -90,6 +96,7 @@ private: OUString const maFileName; ContextVector maContextStack; OUString maTargetPath; + OOXMLVariant maOOXMLVariant; css::uno::Reference< css::uno::XComponentContext > mxContext; }; -- cgit v1.2.3