summaryrefslogtreecommitdiff
path: root/xfa/fxfa/parser
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-11-07 21:44:00 +0000
committerChromium commit bot <commit-bot@chromium.org>2017-11-07 21:44:00 +0000
commit58629a0e49e4ebfb0a0171a4203d2fab4af63165 (patch)
treee25f5af0a5b3993dcc7ae0ed730f8c5c1fb1445c /xfa/fxfa/parser
parent255e61ed20e42917e0055710fb5be56b2ad40afc (diff)
downloadpdfium-58629a0e49e4ebfb0a0171a4203d2fab4af63165.tar.xz
Rename CXFA_Value to CXFA_ValueDatachromium/3262
This CL renames CXFA_Value to CXFA_ValueData to show it's part of the data hierarchy. Change-Id: I4693234f503903a2c11d76a56dbbb6de5f0c3718 Reviewed-on: https://pdfium-review.googlesource.com/18018 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'xfa/fxfa/parser')
-rw-r--r--xfa/fxfa/parser/cxfa_captiondata.cpp6
-rw-r--r--xfa/fxfa/parser/cxfa_captiondata.h4
-rw-r--r--xfa/fxfa/parser/cxfa_valuedata.cpp (renamed from xfa/fxfa/parser/cxfa_value.cpp)18
-rw-r--r--xfa/fxfa/parser/cxfa_valuedata.h (renamed from xfa/fxfa/parser/cxfa_value.h)10
-rw-r--r--xfa/fxfa/parser/cxfa_widgetdata.cpp16
-rw-r--r--xfa/fxfa/parser/cxfa_widgetdata.h4
-rw-r--r--xfa/fxfa/parser/xfa_document_datamerger_imp.cpp33
7 files changed, 45 insertions, 46 deletions
diff --git a/xfa/fxfa/parser/cxfa_captiondata.cpp b/xfa/fxfa/parser/cxfa_captiondata.cpp
index dfaba57313..b82fb98754 100644
--- a/xfa/fxfa/parser/cxfa_captiondata.cpp
+++ b/xfa/fxfa/parser/cxfa_captiondata.cpp
@@ -39,7 +39,7 @@ CXFA_FontData CXFA_CaptionData::GetFontData() {
: nullptr);
}
-CXFA_Value CXFA_CaptionData::GetValue() {
- return CXFA_Value(m_pNode ? m_pNode->GetChild(0, XFA_Element::Value, false)
- : nullptr);
+CXFA_ValueData CXFA_CaptionData::GetValueData() {
+ return CXFA_ValueData(
+ m_pNode ? m_pNode->GetChild(0, XFA_Element::Value, false) : nullptr);
}
diff --git a/xfa/fxfa/parser/cxfa_captiondata.h b/xfa/fxfa/parser/cxfa_captiondata.h
index 6c4837fbd1..d7fe0ba53b 100644
--- a/xfa/fxfa/parser/cxfa_captiondata.h
+++ b/xfa/fxfa/parser/cxfa_captiondata.h
@@ -10,7 +10,7 @@
#include "xfa/fxfa/parser/cxfa_data.h"
#include "xfa/fxfa/parser/cxfa_fontdata.h"
#include "xfa/fxfa/parser/cxfa_margindata.h"
-#include "xfa/fxfa/parser/cxfa_value.h"
+#include "xfa/fxfa/parser/cxfa_valuedata.h"
class CXFA_Node;
@@ -23,7 +23,7 @@ class CXFA_CaptionData : public CXFA_Data {
float GetReserve();
CXFA_MarginData GetMarginData();
CXFA_FontData GetFontData();
- CXFA_Value GetValue();
+ CXFA_ValueData GetValueData();
};
#endif // XFA_FXFA_PARSER_CXFA_CAPTIONDATA_H_
diff --git a/xfa/fxfa/parser/cxfa_value.cpp b/xfa/fxfa/parser/cxfa_valuedata.cpp
index ca3f4fd680..f99689728c 100644
--- a/xfa/fxfa/parser/cxfa_value.cpp
+++ b/xfa/fxfa/parser/cxfa_valuedata.cpp
@@ -4,11 +4,11 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-#include "xfa/fxfa/parser/cxfa_value.h"
+#include "xfa/fxfa/parser/cxfa_valuedata.h"
#include "xfa/fxfa/parser/cxfa_node.h"
-XFA_Element CXFA_Value::GetChildValueClassID() {
+XFA_Element CXFA_ValueData::GetChildValueClassID() {
if (!m_pNode)
return XFA_Element::Unknown;
if (CXFA_Node* pNode = m_pNode->GetNodeItem(XFA_NODEITEM_FirstChild))
@@ -16,7 +16,7 @@ XFA_Element CXFA_Value::GetChildValueClassID() {
return XFA_Element::Unknown;
}
-bool CXFA_Value::GetChildValueContent(WideString& wsContent) {
+bool CXFA_ValueData::GetChildValueContent(WideString& wsContent) {
if (!m_pNode)
return false;
if (CXFA_Node* pNode = m_pNode->GetNodeItem(XFA_NODEITEM_FirstChild))
@@ -24,32 +24,32 @@ bool CXFA_Value::GetChildValueContent(WideString& wsContent) {
return false;
}
-CXFA_ArcData CXFA_Value::GetArcData() {
+CXFA_ArcData CXFA_ValueData::GetArcData() {
return CXFA_ArcData(m_pNode ? m_pNode->GetNodeItem(XFA_NODEITEM_FirstChild)
: nullptr);
}
-CXFA_LineData CXFA_Value::GetLineData() {
+CXFA_LineData CXFA_ValueData::GetLineData() {
return CXFA_LineData(m_pNode ? m_pNode->GetNodeItem(XFA_NODEITEM_FirstChild)
: nullptr);
}
-CXFA_RectangleData CXFA_Value::GetRectangleData() {
+CXFA_RectangleData CXFA_ValueData::GetRectangleData() {
return CXFA_RectangleData(
m_pNode ? m_pNode->GetNodeItem(XFA_NODEITEM_FirstChild) : nullptr);
}
-CXFA_TextData CXFA_Value::GetTextData() {
+CXFA_TextData CXFA_ValueData::GetTextData() {
return CXFA_TextData(m_pNode ? m_pNode->GetNodeItem(XFA_NODEITEM_FirstChild)
: nullptr);
}
-CXFA_ExData CXFA_Value::GetExData() {
+CXFA_ExData CXFA_ValueData::GetExData() {
return CXFA_ExData(m_pNode ? m_pNode->GetNodeItem(XFA_NODEITEM_FirstChild)
: nullptr);
}
-CXFA_ImageData CXFA_Value::GetImageData() {
+CXFA_ImageData CXFA_ValueData::GetImageData() {
return CXFA_ImageData(
m_pNode ? (m_pNode->GetNodeItem(XFA_NODEITEM_FirstChild)) : nullptr,
true);
diff --git a/xfa/fxfa/parser/cxfa_value.h b/xfa/fxfa/parser/cxfa_valuedata.h
index 193cc09cb7..a1f1e410c0 100644
--- a/xfa/fxfa/parser/cxfa_value.h
+++ b/xfa/fxfa/parser/cxfa_valuedata.h
@@ -4,8 +4,8 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-#ifndef XFA_FXFA_PARSER_CXFA_VALUE_H_
-#define XFA_FXFA_PARSER_CXFA_VALUE_H_
+#ifndef XFA_FXFA_PARSER_CXFA_VALUEDATA_H_
+#define XFA_FXFA_PARSER_CXFA_VALUEDATA_H_
#include "core/fxcrt/fx_string.h"
#include "xfa/fxfa/parser/cxfa_arcdata.h"
@@ -18,9 +18,9 @@
class CXFA_Node;
-class CXFA_Value : public CXFA_Data {
+class CXFA_ValueData : public CXFA_Data {
public:
- explicit CXFA_Value(CXFA_Node* pNode) : CXFA_Data(pNode) {}
+ explicit CXFA_ValueData(CXFA_Node* pNode) : CXFA_Data(pNode) {}
XFA_Element GetChildValueClassID();
bool GetChildValueContent(WideString& wsContent);
@@ -32,4 +32,4 @@ class CXFA_Value : public CXFA_Data {
CXFA_ImageData GetImageData();
};
-#endif // XFA_FXFA_PARSER_CXFA_VALUE_H_
+#endif // XFA_FXFA_PARSER_CXFA_VALUEDATA_H_
diff --git a/xfa/fxfa/parser/cxfa_widgetdata.cpp b/xfa/fxfa/parser/cxfa_widgetdata.cpp
index d5b1609aea..56335305ef 100644
--- a/xfa/fxfa/parser/cxfa_widgetdata.cpp
+++ b/xfa/fxfa/parser/cxfa_widgetdata.cpp
@@ -69,9 +69,9 @@ CXFA_Node* CreateUIChild(CXFA_Node* pNode, XFA_Element& eWidgetType) {
eWidgetType = XFA_Element::Unknown;
XFA_Element eUIType = XFA_Element::Unknown;
- CXFA_Value defValue(
+ CXFA_ValueData defValueData(
pNode->JSNode()->GetProperty(0, XFA_Element::Value, true));
- XFA_Element eValueType = defValue.GetChildValueClassID();
+ XFA_Element eValueType = defValueData.GetChildValueClassID();
switch (eValueType) {
case XFA_Element::Boolean:
eUIType = XFA_Element::CheckButton;
@@ -151,7 +151,7 @@ CXFA_Node* CreateUIChild(CXFA_Node* pNode, XFA_Element& eWidgetType) {
if (!pUIChild) {
if (eUIType == XFA_Element::Unknown) {
eUIType = XFA_Element::TextEdit;
- defValue.GetNode()->JSNode()->GetProperty(0, XFA_Element::Text, true);
+ defValueData.GetNode()->JSNode()->GetProperty(0, XFA_Element::Text, true);
}
return pUI->JSNode()->GetProperty(0, eUIType, true);
}
@@ -193,7 +193,7 @@ CXFA_Node* CreateUIChild(CXFA_Node* pNode, XFA_Element& eWidgetType) {
eValueType = XFA_Element::Text;
break;
}
- defValue.GetNode()->JSNode()->GetProperty(0, eValueType, true);
+ defValueData.GetNode()->JSNode()->GetProperty(0, eValueType, true);
return pUIChild;
}
@@ -332,15 +332,15 @@ std::vector<CXFA_Node*> CXFA_WidgetData::GetEventByActivity(int32_t iActivity,
return events;
}
-CXFA_Value CXFA_WidgetData::GetDefaultValue() {
+CXFA_ValueData CXFA_WidgetData::GetDefaultValueData() {
CXFA_Node* pTemNode = m_pNode->GetTemplateNode();
- return CXFA_Value(
+ return CXFA_ValueData(
pTemNode ? pTemNode->JSNode()->GetProperty(0, XFA_Element::Value, false)
: nullptr);
}
-CXFA_Value CXFA_WidgetData::GetFormValue() {
- return CXFA_Value(
+CXFA_ValueData CXFA_WidgetData::GetFormValueData() {
+ return CXFA_ValueData(
m_pNode->JSNode()->GetProperty(0, XFA_Element::Value, false));
}
diff --git a/xfa/fxfa/parser/cxfa_widgetdata.h b/xfa/fxfa/parser/cxfa_widgetdata.h
index 40ee92d299..6de00edea1 100644
--- a/xfa/fxfa/parser/cxfa_widgetdata.h
+++ b/xfa/fxfa/parser/cxfa_widgetdata.h
@@ -58,8 +58,8 @@ class CXFA_WidgetData : public CXFA_Data {
std::vector<CXFA_Node*> GetEventList();
std::vector<CXFA_Node*> GetEventByActivity(int32_t iActivity,
bool bIsFormReady);
- CXFA_Value GetDefaultValue();
- CXFA_Value GetFormValue();
+ CXFA_ValueData GetDefaultValueData();
+ CXFA_ValueData GetFormValueData();
CXFA_CalculateData GetCalculateData();
CXFA_ValidateData GetValidateData(bool bModified);
diff --git a/xfa/fxfa/parser/xfa_document_datamerger_imp.cpp b/xfa/fxfa/parser/xfa_document_datamerger_imp.cpp
index 64d38bf0da..58ce5301cb 100644
--- a/xfa/fxfa/parser/xfa_document_datamerger_imp.cpp
+++ b/xfa/fxfa/parser/xfa_document_datamerger_imp.cpp
@@ -128,14 +128,14 @@ void CreateDataBinding(CXFA_Node* pFormNode,
CXFA_WidgetData* pWidgetData = pFormNode->GetWidgetData();
ASSERT(pWidgetData);
XFA_Element eUIType = pWidgetData->GetUIType();
- CXFA_Value defValue(
+ CXFA_ValueData defValueData(
pFormNode->JSNode()->GetProperty(0, XFA_Element::Value, true));
if (!bDataToForm) {
WideString wsValue;
WideString wsFormattedValue;
switch (eUIType) {
case XFA_Element::ImageEdit: {
- CXFA_ImageData imageData = defValue.GetImageData();
+ CXFA_ImageData imageData = defValueData.GetImageData();
WideString wsContentType;
WideString wsHref;
if (imageData) {
@@ -157,7 +157,7 @@ void CreateDataBinding(CXFA_Node* pFormNode,
break;
}
case XFA_Element::ChoiceList:
- defValue.GetChildValueContent(wsValue);
+ defValueData.GetChildValueContent(wsValue);
if (pWidgetData->GetChoiceListOpen() == XFA_ATTRIBUTEENUM_MultiSelect) {
std::vector<WideString> wsSelTextArray =
pWidgetData->GetSelectedItemsValue();
@@ -185,7 +185,7 @@ void CreateDataBinding(CXFA_Node* pFormNode,
}
break;
case XFA_Element::CheckButton:
- defValue.GetChildValueContent(wsValue);
+ defValueData.GetChildValueContent(wsValue);
if (wsValue.IsEmpty())
break;
@@ -204,8 +204,7 @@ void CreateDataBinding(CXFA_Node* pFormNode,
if (!pValue)
continue;
- CXFA_Value valueChild(pValue);
- valueChild.GetChildValueContent(wsValue);
+ CXFA_ValueData(pValue).GetChildValueContent(wsValue);
if (wsValue.IsEmpty())
continue;
@@ -256,7 +255,7 @@ void CreateDataBinding(CXFA_Node* pFormNode,
break;
}
case XFA_Element::NumericEdit: {
- defValue.GetChildValueContent(wsValue);
+ defValueData.GetChildValueContent(wsValue);
if (wsValue.IsEmpty())
break;
@@ -272,7 +271,7 @@ void CreateDataBinding(CXFA_Node* pFormNode,
break;
}
default:
- defValue.GetChildValueContent(wsValue);
+ defValueData.GetChildValueContent(wsValue);
if (wsValue.IsEmpty())
break;
@@ -292,9 +291,9 @@ void CreateDataBinding(CXFA_Node* pFormNode,
false);
switch (eUIType) {
case XFA_Element::ImageEdit: {
- FormValueNode_SetChildContent(defValue.GetNode(), wsNormalizeValue,
+ FormValueNode_SetChildContent(defValueData.GetNode(), wsNormalizeValue,
XFA_Element::Image);
- CXFA_ImageData imageData = defValue.GetImageData();
+ CXFA_ImageData imageData = defValueData.GetImageData();
if (imageData) {
CFX_XMLElement* pXMLDataElement =
static_cast<CFX_XMLElement*>(pDataNode->GetXMLMappingNode());
@@ -328,19 +327,19 @@ void CreateDataBinding(CXFA_Node* pFormNode,
wsItem = single ? wsItem : wsItem + L"\n";
wsNormalizeValue += wsItem;
}
- CXFA_ExData exData = defValue.GetExData();
+ CXFA_ExData exData = defValueData.GetExData();
ASSERT(exData);
exData.SetContentType(single ? L"text/plain" : L"text/xml");
}
- FormValueNode_SetChildContent(defValue.GetNode(), wsNormalizeValue,
+ FormValueNode_SetChildContent(defValueData.GetNode(), wsNormalizeValue,
XFA_Element::ExData);
} else {
- FormValueNode_SetChildContent(defValue.GetNode(), wsNormalizeValue,
+ FormValueNode_SetChildContent(defValueData.GetNode(), wsNormalizeValue,
XFA_Element::Text);
}
break;
case XFA_Element::CheckButton:
- FormValueNode_SetChildContent(defValue.GetNode(), wsNormalizeValue,
+ FormValueNode_SetChildContent(defValueData.GetNode(), wsNormalizeValue,
XFA_Element::Text);
break;
case XFA_Element::ExclGroup: {
@@ -349,7 +348,7 @@ void CreateDataBinding(CXFA_Node* pFormNode,
break;
}
case XFA_Element::DateTimeEdit:
- FormValueNode_SetChildContent(defValue.GetNode(), wsNormalizeValue,
+ FormValueNode_SetChildContent(defValueData.GetNode(), wsNormalizeValue,
XFA_Element::DateTime);
break;
case XFA_Element::NumericEdit: {
@@ -360,7 +359,7 @@ void CreateDataBinding(CXFA_Node* pFormNode,
pWidgetData->NormalizeNumStr(wsNormalizeValue, wsOutput);
wsNormalizeValue = wsOutput;
}
- FormValueNode_SetChildContent(defValue.GetNode(), wsNormalizeValue,
+ FormValueNode_SetChildContent(defValueData.GetNode(), wsNormalizeValue,
XFA_Element::Float);
break;
}
@@ -370,7 +369,7 @@ void CreateDataBinding(CXFA_Node* pFormNode,
case XFA_Element::Signature:
case XFA_Element::TextEdit:
default:
- FormValueNode_SetChildContent(defValue.GetNode(), wsNormalizeValue,
+ FormValueNode_SetChildContent(defValueData.GetNode(), wsNormalizeValue,
XFA_Element::Text);
break;
}