From b58bf90755050e1bb6c5d33c329cdaf6cdde36ae Mon Sep 17 00:00:00 2001 From: Dan Sinclair Date: Thu, 30 Nov 2017 20:33:20 +0000 Subject: Rename GetAttributeEnumById to CXFA_Node::AttributeEnumToName This is more consistent with the attribute and element to name methods. Change-Id: I3a7f9246d6fbaffa27a0068d8f93e717f5801d2a Reviewed-on: https://pdfium-review.googlesource.com/19851 Reviewed-by: Henrique Nakashima Commit-Queue: dsinclair --- xfa/fxfa/parser/cxfa_node.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'xfa/fxfa/parser/cxfa_node.cpp') diff --git a/xfa/fxfa/parser/cxfa_node.cpp b/xfa/fxfa/parser/cxfa_node.cpp index 4d9e9966cb..99f0eea5a8 100644 --- a/xfa/fxfa/parser/cxfa_node.cpp +++ b/xfa/fxfa/parser/cxfa_node.cpp @@ -134,8 +134,11 @@ void ReorderDataNodes(const std::set& sSet1, } // namespace -const XFA_ATTRIBUTEENUMINFO* GetAttributeEnumByID(XFA_ATTRIBUTEENUM eName) { - return g_XFAEnumData + eName; +// static +WideString CXFA_Node::AttributeEnumToName(XFA_ATTRIBUTEENUM item) { + if (item >= g_iXFAEnumCount) + return L""; + return g_XFAEnumData[static_cast(item)].pName; } CXFA_Node::CXFA_Node(CXFA_Document* pDoc, -- cgit v1.2.3