summaryrefslogtreecommitdiffstats
path: root/comphelper/source/xml/ofopxmlhelper.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'comphelper/source/xml/ofopxmlhelper.cxx')
-rw-r--r--comphelper/source/xml/ofopxmlhelper.cxx13
1 files changed, 5 insertions, 8 deletions
diff --git a/comphelper/source/xml/ofopxmlhelper.cxx b/comphelper/source/xml/ofopxmlhelper.cxx
index 58e4a0fbc7a2..0d4e164a2f66 100644
--- a/comphelper/source/xml/ofopxmlhelper.cxx
+++ b/comphelper/source/xml/ofopxmlhelper.cxx
@@ -145,18 +145,15 @@ void WriteRelationsInfoSequence(
uno::Reference< css::xml::sax::XAttributeList > xAttrList( pAttrList );
for( sal_Int32 nSecInd = 0; nSecInd < aSequence[nInd].getLength(); nSecInd++ )
{
- if ( aSequence[nInd][nSecInd].First == "Id"
- || aSequence[nInd][nSecInd].First == "Type"
- || aSequence[nInd][nSecInd].First == "TargetMode"
- || aSequence[nInd][nSecInd].First == "Target" )
- {
- pAttrList->AddAttribute( aSequence[nInd][nSecInd].First, aCDATAString, aSequence[nInd][nSecInd].Second );
- }
- else
+ if ( !(aSequence[nInd][nSecInd].First == "Id"
+ || aSequence[nInd][nSecInd].First == "Type"
+ || aSequence[nInd][nSecInd].First == "TargetMode"
+ || aSequence[nInd][nSecInd].First == "Target") )
{
// TODO/LATER: should the extensions be allowed?
throw lang::IllegalArgumentException();
}
+ pAttrList->AddAttribute( aSequence[nInd][nSecInd].First, aCDATAString, aSequence[nInd][nSecInd].Second );
}
xWriter->startElement( aRelElement, xAttrList );