From b7381c519794b4959b1993e98ecb11e2ab0d518a Mon Sep 17 00:00:00 2001 From: Markus Mohrhard Date: Sat, 1 Mar 2014 19:06:15 +0100 Subject: make more places aware of OOXML strict relations Change-Id: I292217537eb592cbad9af11f87402baa9f4cc442 --- oox/source/docprop/ooxmldocpropimport.cxx | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'oox/source/docprop') diff --git a/oox/source/docprop/ooxmldocpropimport.cxx b/oox/source/docprop/ooxmldocpropimport.cxx index 1e5a392fffd0..51bd6d5c3925 100644 --- a/oox/source/docprop/ooxmldocpropimport.cxx +++ b/oox/source/docprop/ooxmldocpropimport.cxx @@ -131,12 +131,21 @@ void SAL_CALL DocumentPropertiesImport::importProperties( throw IllegalArgumentException(); Sequence< InputSource > aCoreStreams = lclGetRelatedStreams( rxSource, CREATE_OFFICEDOC_RELATION_TYPE( "metadata/core-properties" ) ); + // OOXML strict + if( !aCoreStreams.hasElements() ) + aCoreStreams = lclGetRelatedStreams( rxSource, CREATE_OFFICEDOC_RELATION_TYPE_STRICT( "metadata/core-properties" ) ); // MS Office seems to have a bug, so we have to do similar handling if( !aCoreStreams.hasElements() ) aCoreStreams = lclGetRelatedStreams( rxSource, CREATE_PACKAGE_RELATION_TYPE( "metadata/core-properties" ) ); Sequence< InputSource > aExtStreams = lclGetRelatedStreams( rxSource, CREATE_OFFICEDOC_RELATION_TYPE( "extended-properties" ) ); + // OOXML strict + if( !aExtStreams.hasElements() ) + aExtStreams = lclGetRelatedStreams( rxSource, CREATE_OFFICEDOC_RELATION_TYPE_STRICT( "extended-properties" ) ); Sequence< InputSource > aCustomStreams = lclGetRelatedStreams( rxSource, CREATE_OFFICEDOC_RELATION_TYPE( "custom-properties" ) ); + // OOXML strict + if( !aCustomStreams.hasElements() ) + aCustomStreams = lclGetRelatedStreams( rxSource, CREATE_OFFICEDOC_RELATION_TYPE_STRICT( "custom-properties" ) ); if( aCoreStreams.hasElements() || aExtStreams.hasElements() || aCustomStreams.hasElements() ) { -- cgit