diff options
author | Hubert Figuiere <hub@figuiere.net> | 2010-07-03 18:47:03 -0700 |
---|---|---|
committer | Hubert Figuiere <hub@figuiere.net> | 2010-07-03 18:47:03 -0700 |
commit | 42dbac60f15e038270d6e0c7285caba8256e86f1 (patch) | |
tree | 20e9475cdbac75d325bdab92fea34068d93536f6 /source/XMPCore/ParseRDF.cpp | |
parent | 88af812fde414aca8f9add90bc800ea3d8e9a281 (diff) |
Update to XMP SDK 5.1.2
Diffstat (limited to 'source/XMPCore/ParseRDF.cpp')
-rw-r--r-- | source/XMPCore/ParseRDF.cpp | 77 |
1 files changed, 38 insertions, 39 deletions
diff --git a/source/XMPCore/ParseRDF.cpp b/source/XMPCore/ParseRDF.cpp index 31fb2b9..9931194 100644 --- a/source/XMPCore/ParseRDF.cpp +++ b/source/XMPCore/ParseRDF.cpp @@ -1,5 +1,5 @@ // ================================================================================================= -// Copyright 2002-2008 Adobe Systems Incorporated +// Copyright 2004 Adobe Systems Incorporated // All Rights Reserved. // // NOTICE: Adobe permits you to use, modify, and distribute this file in accordance with the terms @@ -490,30 +490,30 @@ AddQualifierNode ( XMP_Node * xmpParent, const XMP_VarString & name, const XMP_V XMP_Node * newQual = 0; - newQual = new XMP_Node ( xmpParent, name, value, kXMP_PropIsQualifier ); + newQual = new XMP_Node ( xmpParent, name, value, kXMP_PropIsQualifier ); - if ( ! (isLang | isType) ) { + if ( ! (isLang | isType) ) { + xmpParent->qualifiers.push_back ( newQual ); + } else if ( isLang ) { + if ( xmpParent->qualifiers.empty() ) { xmpParent->qualifiers.push_back ( newQual ); - } else if ( isLang ) { - if ( xmpParent->qualifiers.empty() ) { - xmpParent->qualifiers.push_back ( newQual ); - } else { - xmpParent->qualifiers.insert ( xmpParent->qualifiers.begin(), newQual ); - } - xmpParent->options |= kXMP_PropHasLang; } else { - XMP_Assert ( isType ); - if ( xmpParent->qualifiers.empty() ) { - xmpParent->qualifiers.push_back ( newQual ); - } else { - size_t offset = 0; - if ( XMP_PropHasLang ( xmpParent->options ) ) offset = 1; - xmpParent->qualifiers.insert ( xmpParent->qualifiers.begin()+offset, newQual ); - } - xmpParent->options |= kXMP_PropHasType; + xmpParent->qualifiers.insert ( xmpParent->qualifiers.begin(), newQual ); } + xmpParent->options |= kXMP_PropHasLang; + } else { + XMP_Assert ( isType ); + if ( xmpParent->qualifiers.empty() ) { + xmpParent->qualifiers.push_back ( newQual ); + } else { + size_t offset = 0; + if ( XMP_PropHasLang ( xmpParent->options ) ) offset = 1; + xmpParent->qualifiers.insert ( xmpParent->qualifiers.begin()+offset, newQual ); + } + xmpParent->options |= kXMP_PropHasType; + } - xmpParent->options |= kXMP_PropHasQualifiers; + xmpParent->options |= kXMP_PropHasQualifiers; return newQual; @@ -608,26 +608,25 @@ FixupQualifiedNode ( XMP_Node * xmpParent ) for ( childNum = 1, childLim = xmpParent->children.size(); childNum != childLim; ++childNum ) { XMP_Node * currQual = xmpParent->children[childNum]; - - bool isLang = (currQual->name == "xml:lang"); - - currQual->options |= kXMP_PropIsQualifier; - currQual->parent = xmpParent; - - if ( isLang ) { - if ( xmpParent->options & kXMP_PropHasLang ) XMP_Throw ( "Duplicate xml:lang qualifier", kXMPErr_BadXMP ); - xmpParent->options |= kXMP_PropHasLang; - } else if ( currQual->name == "rdf:type" ) { - xmpParent->options |= kXMP_PropHasType; - } - - if ( (! isLang) || xmpParent->qualifiers.empty() ) { - xmpParent->qualifiers.push_back ( currQual ); - } else { - xmpParent->qualifiers.insert ( xmpParent->qualifiers.begin(), currQual ); - } - xmpParent->children[childNum] = 0; // We just moved it to the qualifers. + bool isLang = (currQual->name == "xml:lang"); + currQual->options |= kXMP_PropIsQualifier; + currQual->parent = xmpParent; + + if ( isLang ) { + if ( xmpParent->options & kXMP_PropHasLang ) XMP_Throw ( "Duplicate xml:lang qualifier", kXMPErr_BadXMP ); + xmpParent->options |= kXMP_PropHasLang; + } else if ( currQual->name == "rdf:type" ) { + xmpParent->options |= kXMP_PropHasType; + } + + if ( (! isLang) || xmpParent->qualifiers.empty() ) { + xmpParent->qualifiers.push_back ( currQual ); + } else { + xmpParent->qualifiers.insert ( xmpParent->qualifiers.begin(), currQual ); + } + xmpParent->children[childNum] = 0; // We just moved it to the qualifers. + } if ( ! xmpParent->qualifiers.empty() ) xmpParent->options |= kXMP_PropHasQualifiers; |