Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(270)

Unified Diff: xfa/fxfa/parser/xfa_basic_imp.cpp

Issue 1841173002: Rename GetElementValue() to GetDirectObject{By,At}(). (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Use "At" for arrays. Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: xfa/fxfa/parser/xfa_basic_imp.cpp
diff --git a/xfa/fxfa/parser/xfa_basic_imp.cpp b/xfa/fxfa/parser/xfa_basic_imp.cpp
index a126cd6d1ff4503950e70a0954974127c075f809..5065d0ad773e6abe83c847656924b3fc90fdcc2e 100644
--- a/xfa/fxfa/parser/xfa_basic_imp.cpp
+++ b/xfa/fxfa/parser/xfa_basic_imp.cpp
@@ -187,10 +187,10 @@ CXFA_Measurement XFA_GetAttributeDefaultValue_Measure(XFA_ELEMENT eElement,
}
return CXFA_Measurement();
}
-int32_t XFA_GetElementCount() {
+int32_t XFA_GetObjectByCount() {
dsinclair 2016/03/29 20:45:25 nit: Don't think we want a By here?
Tom Sepez 2016/03/29 20:58:13 Reverted this entire file.
return g_iXFAElementCount;
}
-const XFA_ELEMENTINFO* XFA_GetElementByName(const CFX_WideStringC& wsName) {
+const XFA_ELEMENTINFO* XFA_GetObjectByByName(const CFX_WideStringC& wsName) {
dsinclair 2016/03/29 20:45:25 nit: GetObjectByName
int32_t iLength = wsName.GetLength();
if (iLength == 0) {
return NULL;
@@ -210,10 +210,10 @@ const XFA_ELEMENTINFO* XFA_GetElementByName(const CFX_WideStringC& wsName) {
} while (iStart <= iEnd);
return NULL;
}
-const XFA_ELEMENTINFO* XFA_GetElementByID(XFA_ELEMENT eName) {
+const XFA_ELEMENTINFO* XFA_GetObjectByByID(XFA_ELEMENT eName) {
dsinclair 2016/03/29 20:45:25 nit: ByBy
return (eName < g_iXFAElementCount) ? (g_XFAElementData + eName) : NULL;
}
-const uint16_t* XFA_GetElementChildren(XFA_ELEMENT eElement, int32_t& iCount) {
+const uint16_t* XFA_GetObjectByChildren(XFA_ELEMENT eElement, int32_t& iCount) {
dsinclair 2016/03/29 20:45:25 nit: Do we want By here?
if (eElement >= g_iXFAElementCount) {
return NULL;
}
@@ -221,7 +221,8 @@ const uint16_t* XFA_GetElementChildren(XFA_ELEMENT eElement, int32_t& iCount) {
iCount = pElement->wCount;
return g_XFAElementChildrenData + pElement->wStart;
}
-const uint8_t* XFA_GetElementAttributes(XFA_ELEMENT eElement, int32_t& iCount) {
+const uint8_t* XFA_GetObjectByAttributes(XFA_ELEMENT eElement,
dsinclair 2016/03/29 20:45:25 ditto
+ int32_t& iCount) {
if (eElement >= g_iXFAElementCount) {
return NULL;
}
@@ -233,7 +234,7 @@ const XFA_ATTRIBUTEINFO* XFA_GetAttributeOfElement(XFA_ELEMENT eElement,
XFA_ATTRIBUTE eAttribute,
uint32_t dwPacket) {
int32_t iCount = 0;
- const uint8_t* pAttr = XFA_GetElementAttributes(eElement, iCount);
+ const uint8_t* pAttr = XFA_GetObjectByAttributes(eElement, iCount);
if (pAttr == NULL || iCount < 1) {
return NULL;
}
@@ -252,7 +253,7 @@ const XFA_ELEMENTINFO* XFA_GetChildOfElement(XFA_ELEMENT eElement,
XFA_ELEMENT eChild,
uint32_t dwPacket) {
int32_t iCount = 0;
- const uint16_t* pChild = XFA_GetElementChildren(eElement, iCount);
+ const uint16_t* pChild = XFA_GetObjectByChildren(eElement, iCount);
if (pChild == NULL || iCount < 1) {
return NULL;
}
@@ -261,14 +262,14 @@ const XFA_ELEMENTINFO* XFA_GetChildOfElement(XFA_ELEMENT eElement,
if (index < 0) {
return NULL;
}
- const XFA_ELEMENTINFO* pInfo = XFA_GetElementByID(eChild);
+ const XFA_ELEMENTINFO* pInfo = XFA_GetObjectByByID(eChild);
ASSERT(pInfo);
if (dwPacket == XFA_XDPPACKET_UNKNOWN)
return pInfo;
return (dwPacket & pInfo->dwPackets) ? pInfo : NULL;
}
-const XFA_PROPERTY* XFA_GetElementProperties(XFA_ELEMENT eElement,
- int32_t& iCount) {
+const XFA_PROPERTY* XFA_GetObjectByProperties(XFA_ELEMENT eElement,
+ int32_t& iCount) {
if (eElement >= g_iXFAElementCount) {
return NULL;
}
@@ -280,7 +281,7 @@ const XFA_PROPERTY* XFA_GetPropertyOfElement(XFA_ELEMENT eElement,
XFA_ELEMENT eProperty,
uint32_t dwPacket) {
int32_t iCount = 0;
- const XFA_PROPERTY* pProperty = XFA_GetElementProperties(eElement, iCount);
+ const XFA_PROPERTY* pProperty = XFA_GetObjectByProperties(eElement, iCount);
if (pProperty == NULL || iCount < 1) {
return NULL;
}
@@ -299,7 +300,7 @@ const XFA_PROPERTY* XFA_GetPropertyOfElement(XFA_ELEMENT eElement,
if (iStart > iEnd) {
return NULL;
}
- const XFA_ELEMENTINFO* pInfo = XFA_GetElementByID(eProperty);
+ const XFA_ELEMENTINFO* pInfo = XFA_GetObjectByByID(eProperty);
ASSERT(pInfo);
if (dwPacket == XFA_XDPPACKET_UNKNOWN)
return pProperty + iMid;

Powered by Google App Engine
This is Rietveld 408576698