From 8b0cf76f00c6e89e8bb7bf4bcf2189b27baac31c Mon Sep 17 00:00:00 2001 From: dan sinclair Date: Mon, 16 Apr 2018 21:24:57 +0000 Subject: Merge CFX_XMLElement and CFX_XMLAttributeNode CFX_XMLElement is the only subclass of CFX_XMLAttributeNode. This CL merges the two classes together. The {Set|Get}String method has been renamed to {Set|Get}Attribute to make it clearer what you're retrieving. Change-Id: I158c961d4d8c5f563d937a3e7a35321a33622562 Reviewed-on: https://pdfium-review.googlesource.com/30710 Commit-Queue: dsinclair Reviewed-by: Henrique Nakashima --- core/fpdfdoc/cpdf_metadata.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'core/fpdfdoc') diff --git a/core/fpdfdoc/cpdf_metadata.cpp b/core/fpdfdoc/cpdf_metadata.cpp index 972569a25d..56f8c64c0e 100644 --- a/core/fpdfdoc/cpdf_metadata.cpp +++ b/core/fpdfdoc/cpdf_metadata.cpp @@ -16,12 +16,8 @@ namespace { void CheckForSharedFormInternal(CFX_XMLElement* element, std::vector* unsupported) { - for (const auto& pair : element->GetAttributes()) { - if (pair.first != L"xmlns:adhocwf" || - pair.second != L"http://ns.adobe.com/AcrobatAdhocWorkflow/1.0/") { - continue; - } - + WideString attr = element->GetAttribute(L"xmlns:adhocwf"); + if (attr == L"http://ns.adobe.com/AcrobatAdhocWorkflow/1.0/") { for (const auto* child = element->GetFirstChild(); child; child = child->GetNextSibling()) { if (child->GetType() != FX_XMLNODE_Element) -- cgit v1.2.3