summaryrefslogtreecommitdiff
path: root/xfa/fxfa/parser
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2018-01-08 15:53:54 -0500
committerChromium commit bot <commit-bot@chromium.org>2018-01-08 21:10:54 +0000
commit64204f591bc27976a7123ec5a88558542486bb3f (patch)
tree3f62e83d718287b0be4d9a0999ddd8371027f192 /xfa/fxfa/parser
parent88c8e2fe2076fa4b5088b912dd92c3b2a56bb3ec (diff)
downloadpdfium-64204f591bc27976a7123ec5a88558542486bb3f.tar.xz
Convert XFA_GetLocaleValue to accept a CXFA_Node
This CL changes XFA_GetLocaleValue to accept a CXFA_Node instead of a CXFA_WidgetAcc. Change-Id: Id304fd8dafcc6e644058230289e497525702fa79 Reviewed-on: https://pdfium-review.googlesource.com/22470 Reviewed-by: Ryan Harrison <rharrison@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'xfa/fxfa/parser')
-rw-r--r--xfa/fxfa/parser/xfa_utils.cpp11
-rw-r--r--xfa/fxfa/parser/xfa_utils.h2
2 files changed, 6 insertions, 7 deletions
diff --git a/xfa/fxfa/parser/xfa_utils.cpp b/xfa/fxfa/parser/xfa_utils.cpp
index 3342776adb..bc181b5947 100644
--- a/xfa/fxfa/parser/xfa_utils.cpp
+++ b/xfa/fxfa/parser/xfa_utils.cpp
@@ -144,8 +144,7 @@ bool ContentNodeNeedtoExport(CXFA_Node* pContentNode) {
if (pGrandParentNode->GetBindData())
return false;
- CXFA_WidgetAcc* pWidgetAcc = pGrandParentNode->GetWidgetAcc();
- XFA_Element eUIType = pWidgetAcc->GetUIType();
+ XFA_Element eUIType = pGrandParentNode->GetWidgetAcc()->GetUIType();
if (eUIType == XFA_Element::PasswordEdit)
return false;
return true;
@@ -417,9 +416,9 @@ int XFA_GetMaxFractionalScale() {
return FX_ArraySize(fraction_scales);
}
-CXFA_LocaleValue XFA_GetLocaleValue(CXFA_WidgetAcc* pWidgetAcc) {
+CXFA_LocaleValue XFA_GetLocaleValue(CXFA_Node* pNode) {
CXFA_Value* pNodeValue =
- pWidgetAcc->GetNode()->GetChild<CXFA_Value>(0, XFA_Element::Value, false);
+ pNode->GetChild<CXFA_Value>(0, XFA_Element::Value, false);
if (!pNodeValue)
return CXFA_LocaleValue();
@@ -457,8 +456,8 @@ CXFA_LocaleValue XFA_GetLocaleValue(CXFA_WidgetAcc* pWidgetAcc) {
iVTType = XFA_VT_NULL;
break;
}
- return CXFA_LocaleValue(iVTType, pWidgetAcc->GetNode()->GetRawValue(),
- pWidgetAcc->GetNode()->GetDocument()->GetLocalMgr());
+ return CXFA_LocaleValue(iVTType, pNode->GetRawValue(),
+ pNode->GetDocument()->GetLocalMgr());
}
bool XFA_FDEExtension_ResolveNamespaceQualifier(CFX_XMLElement* pNode,
diff --git a/xfa/fxfa/parser/xfa_utils.h b/xfa/fxfa/parser/xfa_utils.h
index 9317a783c4..9308157b1f 100644
--- a/xfa/fxfa/parser/xfa_utils.h
+++ b/xfa/fxfa/parser/xfa_utils.h
@@ -23,7 +23,7 @@ bool XFA_FDEExtension_ResolveNamespaceQualifier(CFX_XMLElement* pNode,
const WideString& wsQualifier,
WideString* wsNamespaceURI);
-CXFA_LocaleValue XFA_GetLocaleValue(CXFA_WidgetAcc* pWidgetAcc);
+CXFA_LocaleValue XFA_GetLocaleValue(CXFA_Node* pNode);
int32_t XFA_MapRotation(int32_t nRotation);
bool XFA_RecognizeRichText(CFX_XMLElement* pRichTextXMLNode);