summaryrefslogtreecommitdiff
path: root/xfa/fxfa
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-11-07 18:42:20 +0000
committerChromium commit bot <commit-bot@chromium.org>2017-11-07 18:42:20 +0000
commitf44cf89c0263708b7d475fb1aeba6ba42f54766f (patch)
tree34e9d3d2919bfbc1c251e1096c4911373f26adb3 /xfa/fxfa
parentcce8e2f46d0fb64c2558c24a2aa33ac929dfdad6 (diff)
downloadpdfium-f44cf89c0263708b7d475fb1aeba6ba42f54766f.tar.xz
Rename CXFA_Calculate to CXFA_CalculateData
This CL renames CXFA_Calculate to CXFA_CalculateData to make it clear it's part of the data hierarchy. Change-Id: I259b9816bde9cc6c70550944906fcafa954ef32e Reviewed-on: https://pdfium-review.googlesource.com/17976 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'xfa/fxfa')
-rw-r--r--xfa/fxfa/cxfa_ffdocview.cpp6
-rw-r--r--xfa/fxfa/cxfa_fffield.cpp10
-rw-r--r--xfa/fxfa/cxfa_ffwidgethandler.cpp10
-rw-r--r--xfa/fxfa/cxfa_widgetacc.cpp6
-rw-r--r--xfa/fxfa/parser/cxfa_calculatedata.cpp (renamed from xfa/fxfa/parser/cxfa_calculate.cpp)10
-rw-r--r--xfa/fxfa/parser/cxfa_calculatedata.h (renamed from xfa/fxfa/parser/cxfa_calculate.h)10
-rw-r--r--xfa/fxfa/parser/cxfa_widgetdata.cpp4
-rw-r--r--xfa/fxfa/parser/cxfa_widgetdata.h4
8 files changed, 30 insertions, 30 deletions
diff --git a/xfa/fxfa/cxfa_ffdocview.cpp b/xfa/fxfa/cxfa_ffdocview.cpp
index 3302e40f5d..ae277f05e4 100644
--- a/xfa/fxfa/cxfa_ffdocview.cpp
+++ b/xfa/fxfa/cxfa_ffdocview.cpp
@@ -412,13 +412,13 @@ static int32_t XFA_ProcessEvent(CXFA_FFDocView* pDocView,
}
return XFA_EVENTERROR_Disabled;
case XFA_EVENT_InitCalculate: {
- CXFA_Calculate calc = pWidgetAcc->GetCalculate();
- if (!calc)
+ CXFA_CalculateData calcData = pWidgetAcc->GetCalculateData();
+ if (!calcData)
return XFA_EVENTERROR_NotExist;
if (pWidgetAcc->GetNode()->IsUserInteractive())
return XFA_EVENTERROR_Disabled;
- CXFA_Script script = calc.GetScript();
+ CXFA_Script script = calcData.GetScript();
return pWidgetAcc->ExecuteScript(script, pParam);
}
default:
diff --git a/xfa/fxfa/cxfa_fffield.cpp b/xfa/fxfa/cxfa_fffield.cpp
index f6c21d9fd7..b1c8c32684 100644
--- a/xfa/fxfa/cxfa_fffield.cpp
+++ b/xfa/fxfa/cxfa_fffield.cpp
@@ -662,12 +662,12 @@ int32_t CXFA_FFField::CalculateOverride() {
}
int32_t CXFA_FFField::CalculateWidgetAcc(CXFA_WidgetAcc* pAcc) {
- CXFA_Calculate calc = pAcc->GetCalculate();
- if (!calc)
+ CXFA_CalculateData calcData = pAcc->GetCalculateData();
+ if (!calcData)
return 1;
XFA_VERSION version = pAcc->GetDoc()->GetXFADoc()->GetCurVersionMode();
- switch (calc.GetOverride()) {
+ switch (calcData.GetOverride()) {
case XFA_ATTRIBUTEENUM_Error: {
if (version <= XFA_VERSION_204)
return 1;
@@ -682,7 +682,7 @@ int32_t CXFA_FFField::CalculateWidgetAcc(CXFA_WidgetAcc* pAcc) {
}
case XFA_ATTRIBUTEENUM_Warning: {
if (version <= XFA_VERSION_204) {
- CXFA_Script script = calc.GetScript();
+ CXFA_Script script = calcData.GetScript();
if (!script)
return 1;
@@ -700,7 +700,7 @@ int32_t CXFA_FFField::CalculateWidgetAcc(CXFA_WidgetAcc* pAcc) {
return 0;
WideString wsMessage;
- calc.GetMessageText(wsMessage);
+ calcData.GetMessageText(wsMessage);
if (!wsMessage.IsEmpty())
wsMessage += L"\r\n";
diff --git a/xfa/fxfa/cxfa_ffwidgethandler.cpp b/xfa/fxfa/cxfa_ffwidgethandler.cpp
index e68b2192e9..7de7d27748 100644
--- a/xfa/fxfa/cxfa_ffwidgethandler.cpp
+++ b/xfa/fxfa/cxfa_ffwidgethandler.cpp
@@ -189,8 +189,8 @@ bool CXFA_FFWidgetHandler::HasEvent(CXFA_WidgetAcc* pWidgetAcc,
switch (eEventType) {
case XFA_EVENT_Calculate: {
- CXFA_Calculate calc = pWidgetAcc->GetCalculate();
- return calc && calc.GetScript();
+ CXFA_CalculateData calcData = pWidgetAcc->GetCalculateData();
+ return calcData && calcData.GetScript();
}
case XFA_EVENT_Validate: {
CXFA_Validate val = pWidgetAcc->GetValidate(false);
@@ -220,13 +220,13 @@ int32_t CXFA_FFWidgetHandler::ProcessEvent(CXFA_WidgetAcc* pWidgetAcc,
}
return XFA_EVENTERROR_Disabled;
case XFA_EVENT_InitCalculate: {
- CXFA_Calculate calc = pWidgetAcc->GetCalculate();
- if (!calc)
+ CXFA_CalculateData calcData = pWidgetAcc->GetCalculateData();
+ if (!calcData)
return XFA_EVENTERROR_NotExist;
if (pWidgetAcc->GetNode()->IsUserInteractive())
return XFA_EVENTERROR_Disabled;
- CXFA_Script script = calc.GetScript();
+ CXFA_Script script = calcData.GetScript();
return pWidgetAcc->ExecuteScript(script, pParam);
}
default:
diff --git a/xfa/fxfa/cxfa_widgetacc.cpp b/xfa/fxfa/cxfa_widgetacc.cpp
index c4ecd6db9e..59046d3313 100644
--- a/xfa/fxfa/cxfa_widgetacc.cpp
+++ b/xfa/fxfa/cxfa_widgetacc.cpp
@@ -319,15 +319,15 @@ int32_t CXFA_WidgetAcc::ProcessCalculate() {
if (GetElementType() == XFA_Element::Draw)
return XFA_EVENTERROR_NotExist;
- CXFA_Calculate calc = GetCalculate();
- if (!calc)
+ CXFA_CalculateData calcData = GetCalculateData();
+ if (!calcData)
return XFA_EVENTERROR_NotExist;
if (GetNode()->IsUserInteractive())
return XFA_EVENTERROR_Disabled;
CXFA_EventParam EventParam;
EventParam.m_eType = XFA_EVENT_Calculate;
- CXFA_Script script = calc.GetScript();
+ CXFA_Script script = calcData.GetScript();
int32_t iRet = ExecuteScript(script, &EventParam);
if (iRet != XFA_EVENTERROR_Success)
return iRet;
diff --git a/xfa/fxfa/parser/cxfa_calculate.cpp b/xfa/fxfa/parser/cxfa_calculatedata.cpp
index 6f5c8a664a..1db5779486 100644
--- a/xfa/fxfa/parser/cxfa_calculate.cpp
+++ b/xfa/fxfa/parser/cxfa_calculatedata.cpp
@@ -4,24 +4,24 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-#include "xfa/fxfa/parser/cxfa_calculate.h"
+#include "xfa/fxfa/parser/cxfa_calculatedata.h"
#include "xfa/fxfa/parser/cxfa_node.h"
#include "xfa/fxfa/parser/cxfa_text.h"
-CXFA_Calculate::CXFA_Calculate(CXFA_Node* pNode) : CXFA_Data(pNode) {}
+CXFA_CalculateData::CXFA_CalculateData(CXFA_Node* pNode) : CXFA_Data(pNode) {}
-int32_t CXFA_Calculate::GetOverride() {
+int32_t CXFA_CalculateData::GetOverride() {
XFA_ATTRIBUTEENUM eAtt = XFA_ATTRIBUTEENUM_Error;
m_pNode->JSNode()->TryEnum(XFA_ATTRIBUTE_Override, eAtt, false);
return eAtt;
}
-CXFA_Script CXFA_Calculate::GetScript() {
+CXFA_Script CXFA_CalculateData::GetScript() {
return CXFA_Script(m_pNode->GetChild(0, XFA_Element::Script, false));
}
-void CXFA_Calculate::GetMessageText(WideString& wsMessage) {
+void CXFA_CalculateData::GetMessageText(WideString& wsMessage) {
CXFA_Node* pNode = m_pNode->GetChild(0, XFA_Element::Message, false);
if (!pNode)
return;
diff --git a/xfa/fxfa/parser/cxfa_calculate.h b/xfa/fxfa/parser/cxfa_calculatedata.h
index b3a6ef2eaa..0c1a8220c1 100644
--- a/xfa/fxfa/parser/cxfa_calculate.h
+++ b/xfa/fxfa/parser/cxfa_calculatedata.h
@@ -4,8 +4,8 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-#ifndef XFA_FXFA_PARSER_CXFA_CALCULATE_H_
-#define XFA_FXFA_PARSER_CXFA_CALCULATE_H_
+#ifndef XFA_FXFA_PARSER_CXFA_CALCULATEDATA_H_
+#define XFA_FXFA_PARSER_CXFA_CALCULATEDATA_H_
#include "core/fxcrt/fx_string.h"
#include "xfa/fxfa/parser/cxfa_data.h"
@@ -13,13 +13,13 @@
class CXFA_Node;
-class CXFA_Calculate : public CXFA_Data {
+class CXFA_CalculateData : public CXFA_Data {
public:
- explicit CXFA_Calculate(CXFA_Node* pNode);
+ explicit CXFA_CalculateData(CXFA_Node* pNode);
int32_t GetOverride();
CXFA_Script GetScript();
void GetMessageText(WideString& wsMessage);
};
-#endif // XFA_FXFA_PARSER_CXFA_CALCULATE_H_
+#endif // XFA_FXFA_PARSER_CXFA_CALCULATEDATA_H_
diff --git a/xfa/fxfa/parser/cxfa_widgetdata.cpp b/xfa/fxfa/parser/cxfa_widgetdata.cpp
index ae857cb9c5..d8d5cfcc1d 100644
--- a/xfa/fxfa/parser/cxfa_widgetdata.cpp
+++ b/xfa/fxfa/parser/cxfa_widgetdata.cpp
@@ -343,8 +343,8 @@ CXFA_Value CXFA_WidgetData::GetFormValue() {
m_pNode->JSNode()->GetProperty(0, XFA_Element::Value, false));
}
-CXFA_Calculate CXFA_WidgetData::GetCalculate() {
- return CXFA_Calculate(
+CXFA_CalculateData CXFA_WidgetData::GetCalculateData() {
+ return CXFA_CalculateData(
m_pNode->JSNode()->GetProperty(0, XFA_Element::Calculate, false));
}
diff --git a/xfa/fxfa/parser/cxfa_widgetdata.h b/xfa/fxfa/parser/cxfa_widgetdata.h
index f741a33858..4689878e9f 100644
--- a/xfa/fxfa/parser/cxfa_widgetdata.h
+++ b/xfa/fxfa/parser/cxfa_widgetdata.h
@@ -15,7 +15,7 @@
#include "xfa/fxfa/parser/cxfa_assistdata.h"
#include "xfa/fxfa/parser/cxfa_binddata.h"
#include "xfa/fxfa/parser/cxfa_borderdata.h"
-#include "xfa/fxfa/parser/cxfa_calculate.h"
+#include "xfa/fxfa/parser/cxfa_calculatedata.h"
#include "xfa/fxfa/parser/cxfa_caption.h"
#include "xfa/fxfa/parser/cxfa_data.h"
#include "xfa/fxfa/parser/cxfa_font.h"
@@ -60,7 +60,7 @@ class CXFA_WidgetData : public CXFA_Data {
bool bIsFormReady);
CXFA_Value GetDefaultValue();
CXFA_Value GetFormValue();
- CXFA_Calculate GetCalculate();
+ CXFA_CalculateData GetCalculateData();
CXFA_Validate GetValidate(bool bModified);
bool GetWidth(float& fWidth);