summaryrefslogtreecommitdiff
path: root/core/fpdfdoc
diff options
context:
space:
mode:
authordan sinclair <dsinclair@chromium.org>2018-04-16 21:24:57 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-04-16 21:24:57 +0000
commit8b0cf76f00c6e89e8bb7bf4bcf2189b27baac31c (patch)
treeec18d4aa800ccd9d32f113f8ec41d89948479ab3 /core/fpdfdoc
parent262b496f25be27978abe7d98f20978820ecaeec8 (diff)
downloadpdfium-8b0cf76f00c6e89e8bb7bf4bcf2189b27baac31c.tar.xz
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 <dsinclair@chromium.org> Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Diffstat (limited to 'core/fpdfdoc')
-rw-r--r--core/fpdfdoc/cpdf_metadata.cpp8
1 files changed, 2 insertions, 6 deletions
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<UnsupportedFeature>* 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)