summaryrefslogtreecommitdiff
path: root/xfa/fxfa/parser/xfa_utils.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'xfa/fxfa/parser/xfa_utils.cpp')
-rw-r--r--xfa/fxfa/parser/xfa_utils.cpp66
1 files changed, 0 insertions, 66 deletions
diff --git a/xfa/fxfa/parser/xfa_utils.cpp b/xfa/fxfa/parser/xfa_utils.cpp
index 588246fc55..b17a7535eb 100644
--- a/xfa/fxfa/parser/xfa_utils.cpp
+++ b/xfa/fxfa/parser/xfa_utils.cpp
@@ -243,72 +243,6 @@ const XFA_NOTSUREATTRIBUTE* XFA_GetNotsureAttribute(XFA_Element eElement,
return nullptr;
}
-const XFA_PROPERTY* XFA_GetPropertyOfElement(XFA_Element eElement,
- XFA_Element eProperty,
- uint32_t dwPacket) {
- int32_t iCount = 0;
- const XFA_PROPERTY* pProperties = XFA_GetElementProperties(eElement, iCount);
- if (!pProperties || iCount < 1)
- return nullptr;
-
- auto* it = std::find_if(pProperties, pProperties + iCount,
- [eProperty](const XFA_PROPERTY& prop) {
- return prop.eName == eProperty;
- });
- if (it == pProperties + iCount)
- return nullptr;
-
- const XFA_ELEMENTINFO* pInfo = XFA_GetElementByID(eProperty);
- ASSERT(pInfo);
- if (dwPacket != XFA_XDPPACKET_UNKNOWN && !(dwPacket & pInfo->dwPackets))
- return nullptr;
- return it;
-}
-
-const XFA_PROPERTY* XFA_GetElementProperties(XFA_Element eElement,
- int32_t& iCount) {
- if (eElement == XFA_Element::Unknown)
- return nullptr;
-
- const XFA_ELEMENTHIERARCHY* pElement =
- g_XFAElementPropertyIndex + static_cast<int32_t>(eElement);
- iCount = pElement->wCount;
- return g_XFAElementPropertyData + pElement->wStart;
-}
-
-const XFA_Attribute* XFA_GetElementAttributes(XFA_Element eElement,
- int32_t& iCount) {
- if (eElement == XFA_Element::Unknown)
- return nullptr;
-
- const XFA_ELEMENTHIERARCHY* pElement =
- g_XFAElementAttributeIndex + static_cast<int32_t>(eElement);
- iCount = pElement->wCount;
- return g_XFAElementAttributeData + pElement->wStart;
-}
-
-const XFA_ELEMENTINFO* XFA_GetElementByID(XFA_Element eName) {
- return eName != XFA_Element::Unknown
- ? g_XFAElementData + static_cast<int32_t>(eName)
- : nullptr;
-}
-
-XFA_Element XFA_GetElementTypeForName(const WideStringView& wsName) {
- if (wsName.IsEmpty())
- return XFA_Element::Unknown;
-
- uint32_t uHash = FX_HashCode_GetW(wsName, false);
- const XFA_ELEMENTINFO* pEnd = g_XFAElementData + g_iXFAElementCount;
- auto* pInfo =
- std::lower_bound(g_XFAElementData, pEnd, uHash,
- [](const XFA_ELEMENTINFO& info, uint32_t hash) {
- return info.uHash < hash;
- });
- if (pInfo < pEnd && pInfo->uHash == uHash)
- return pInfo->eName;
- return XFA_Element::Unknown;
-}
-
bool XFA_GetAttributeDefaultValue(void*& pValue,
XFA_Element eElement,
XFA_Attribute eAttribute,