summaryrefslogtreecommitdiff
path: root/xmloff
diff options
context:
space:
mode:
Diffstat (limited to 'xmloff')
-rw-r--r--xmloff/source/forms/elementimport.cxx15
1 files changed, 10 insertions, 5 deletions
diff --git a/xmloff/source/forms/elementimport.cxx b/xmloff/source/forms/elementimport.cxx
index 1fac083e463c..42a151c9354b 100644
--- a/xmloff/source/forms/elementimport.cxx
+++ b/xmloff/source/forms/elementimport.cxx
@@ -356,16 +356,21 @@ namespace xmloff
if ( bValueIsSequence )
{
- OSL_ENSURE( eValueTypeClass == TypeClass_ANY,
+ Sequence< Any > aXMLValueList;
+ rPropValues.Value >>= aXMLValueList;
+ // just skip this part if empty sequence
+ if (!aXMLValueList.getLength())
+ continue;
+
+ Sequence< sal_Int16 > aPropertyValueList( aXMLValueList.getLength() );
+
+ SAL_WARN_IF( eValueTypeClass != TypeClass_ANY, "xmloff",
"OElementImport::implApplyGenericProperties: only ANYs should have been imported as generic list property!" );
// (OPropertyImport should produce only Sequencer< Any >, since it cannot know the real type
- OSL_ENSURE( ePropTypeClass == TypeClass_SHORT,
+ SAL_WARN_IF( ePropTypeClass != TypeClass_SHORT, "xmloff",
"OElementImport::implApplyGenericProperties: conversion to sequences other than 'sequence< short >' not implemented, yet!" );
- Sequence< Any > aXMLValueList;
- rPropValues.Value >>= aXMLValueList;
- Sequence< sal_Int16 > aPropertyValueList( aXMLValueList.getLength() );
std::transform(aXMLValueList.begin(), aXMLValueList.end(), aPropertyValueList.begin(),
[](const Any& rXMLValue) -> sal_Int16 {