summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortsepez <tsepez@chromium.org>2016-09-07 15:29:11 -0700
committerCommit bot <commit-bot@chromium.org>2016-09-07 15:29:11 -0700
commit8c2a8cda1bdb9f57513af5a21a5d0ce32614e52b (patch)
tree46e47faf042784025bc584b5f138b75127adf3be
parent7b68f616e49235267eeac8db51aadade6d60e243 (diff)
downloadpdfium-chromium/2854.tar.xz
Fix spelling of "Formated" in several variableschromium/2854
Review-Url: https://codereview.chromium.org/2318423002
-rw-r--r--fpdfsdk/cpdfsdk_interform.cpp14
-rw-r--r--fpdfsdk/cpdfsdk_widget.cpp10
-rw-r--r--fpdfsdk/cpdfsdk_widgethandler.cpp6
-rw-r--r--fpdfsdk/formfiller/cffl_iformfiller.cpp6
-rw-r--r--fpdfsdk/include/cpdfsdk_interform.h2
-rw-r--r--fpdfsdk/include/cpdfsdk_widget.h2
-rw-r--r--fpdfsdk/javascript/Field.cpp6
-rw-r--r--xfa/fxfa/parser/cxfa_widgetdata.cpp10
-rw-r--r--xfa/fxfa/parser/cxfa_widgetdata.h2
-rw-r--r--xfa/fxfa/parser/xfa_document_datamerger_imp.cpp26
10 files changed, 42 insertions, 42 deletions
diff --git a/fpdfsdk/cpdfsdk_interform.cpp b/fpdfsdk/cpdfsdk_interform.cpp
index 345487ad49..a8e2663a9b 100644
--- a/fpdfsdk/cpdfsdk_interform.cpp
+++ b/fpdfsdk/cpdfsdk_interform.cpp
@@ -276,12 +276,12 @@ void CPDFSDK_InterForm::OnCalculate(CPDF_FormField* pFormField) {
}
CFX_WideString CPDFSDK_InterForm::OnFormat(CPDF_FormField* pFormField,
- FX_BOOL& bFormated) {
+ FX_BOOL& bFormatted) {
CFX_WideString sValue = pFormField->GetValue();
CPDFDoc_Environment* pEnv = m_pDocument->GetEnv();
ASSERT(pEnv);
if (!pEnv->IsJSInitiated()) {
- bFormated = FALSE;
+ bFormatted = FALSE;
return sValue;
}
@@ -295,7 +295,7 @@ CFX_WideString CPDFSDK_InterForm::OnFormat(CPDF_FormField* pFormField,
sValue = pFormField->GetOptionLabel(index);
}
- bFormated = FALSE;
+ bFormatted = FALSE;
CPDF_AAction aAction = pFormField->GetAdditionalAction();
if (aAction.GetDict() && aAction.ActionExist(CPDF_AAction::Format)) {
@@ -313,7 +313,7 @@ CFX_WideString CPDFSDK_InterForm::OnFormat(CPDF_FormField* pFormField,
if (bRet) {
sValue = Value;
- bFormated = TRUE;
+ bFormatted = TRUE;
}
}
}
@@ -632,9 +632,9 @@ void CPDFSDK_InterForm::AfterValueChange(CPDF_FormField* pField) {
int nType = pField->GetFieldType();
if (nType == FIELDTYPE_COMBOBOX || nType == FIELDTYPE_TEXTFIELD) {
OnCalculate(pField);
- FX_BOOL bFormated = FALSE;
- CFX_WideString sValue = OnFormat(pField, bFormated);
- ResetFieldAppearance(pField, bFormated ? sValue.c_str() : nullptr, TRUE);
+ FX_BOOL bFormatted = FALSE;
+ CFX_WideString sValue = OnFormat(pField, bFormatted);
+ ResetFieldAppearance(pField, bFormatted ? sValue.c_str() : nullptr, TRUE);
UpdateField(pField);
}
}
diff --git a/fpdfsdk/cpdfsdk_widget.cpp b/fpdfsdk/cpdfsdk_widget.cpp
index 2ddbccc28c..d518a56109 100644
--- a/fpdfsdk/cpdfsdk_widget.cpp
+++ b/fpdfsdk/cpdfsdk_widget.cpp
@@ -737,9 +737,9 @@ void CPDFSDK_Widget::ResetAppearance(FX_BOOL bValueChanged) {
switch (GetFieldType()) {
case FIELDTYPE_TEXTFIELD:
case FIELDTYPE_COMBOBOX: {
- FX_BOOL bFormated = FALSE;
- CFX_WideString sValue = OnFormat(bFormated);
- ResetAppearance(bFormated ? sValue.c_str() : nullptr, TRUE);
+ FX_BOOL bFormatted = FALSE;
+ CFX_WideString sValue = OnFormat(bFormatted);
+ ResetAppearance(bFormatted ? sValue.c_str() : nullptr, TRUE);
break;
}
default:
@@ -785,10 +785,10 @@ void CPDFSDK_Widget::ResetAppearance(const FX_WCHAR* sValue,
m_pAnnot->ClearCachedAP();
}
-CFX_WideString CPDFSDK_Widget::OnFormat(FX_BOOL& bFormated) {
+CFX_WideString CPDFSDK_Widget::OnFormat(FX_BOOL& bFormatted) {
CPDF_FormField* pFormField = GetFormField();
ASSERT(pFormField);
- return m_pInterForm->OnFormat(pFormField, bFormated);
+ return m_pInterForm->OnFormat(pFormField, bFormatted);
}
void CPDFSDK_Widget::ResetFieldAppearance(FX_BOOL bValueChanged) {
diff --git a/fpdfsdk/cpdfsdk_widgethandler.cpp b/fpdfsdk/cpdfsdk_widgethandler.cpp
index 31f0cffcc8..1a9bdacf24 100644
--- a/fpdfsdk/cpdfsdk_widgethandler.cpp
+++ b/fpdfsdk/cpdfsdk_widgethandler.cpp
@@ -238,9 +238,9 @@ void CPDFSDK_WidgetHandler::OnLoad(CPDFSDK_Annot* pAnnot) {
int nFieldType = pWidget->GetFieldType();
if (nFieldType == FIELDTYPE_TEXTFIELD || nFieldType == FIELDTYPE_COMBOBOX) {
- FX_BOOL bFormated = FALSE;
- CFX_WideString sValue = pWidget->OnFormat(bFormated);
- if (bFormated && nFieldType == FIELDTYPE_COMBOBOX)
+ FX_BOOL bFormatted = FALSE;
+ CFX_WideString sValue = pWidget->OnFormat(bFormatted);
+ if (bFormatted && nFieldType == FIELDTYPE_COMBOBOX)
pWidget->ResetAppearance(sValue.c_str(), FALSE);
}
diff --git a/fpdfsdk/formfiller/cffl_iformfiller.cpp b/fpdfsdk/formfiller/cffl_iformfiller.cpp
index c832a96b1e..db1f538e9d 100644
--- a/fpdfsdk/formfiller/cffl_iformfiller.cpp
+++ b/fpdfsdk/formfiller/cffl_iformfiller.cpp
@@ -716,14 +716,14 @@ void CFFL_IFormFiller::OnFormat(CPDFSDK_Widget* pWidget,
CPDFSDK_Document* pDocument = pPageView->GetSDKDocument();
CPDFSDK_InterForm* pInterForm = pDocument->GetInterForm();
- FX_BOOL bFormated = FALSE;
+ FX_BOOL bFormatted = FALSE;
CFX_WideString sValue =
- pInterForm->OnFormat(pWidget->GetFormField(), bFormated);
+ pInterForm->OnFormat(pWidget->GetFormField(), bFormatted);
if (bExit)
return;
- if (bFormated) {
+ if (bFormatted) {
pInterForm->ResetFieldAppearance(pWidget->GetFormField(), sValue.c_str(),
TRUE);
pInterForm->UpdateField(pWidget->GetFormField());
diff --git a/fpdfsdk/include/cpdfsdk_interform.h b/fpdfsdk/include/cpdfsdk_interform.h
index 2fd93f1d5d..d900fe2ae8 100644
--- a/fpdfsdk/include/cpdfsdk_interform.h
+++ b/fpdfsdk/include/cpdfsdk_interform.h
@@ -67,7 +67,7 @@ class CPDFSDK_InterForm : public IPDF_FormNotify {
const CFX_WideString& csValue);
FX_BOOL OnValidate(CPDF_FormField* pFormField, const CFX_WideString& csValue);
void OnCalculate(CPDF_FormField* pFormField = nullptr);
- CFX_WideString OnFormat(CPDF_FormField* pFormField, FX_BOOL& bFormated);
+ CFX_WideString OnFormat(CPDF_FormField* pFormField, FX_BOOL& bFormatted);
void ResetFieldAppearance(CPDF_FormField* pFormField,
const FX_WCHAR* sValue,
diff --git a/fpdfsdk/include/cpdfsdk_widget.h b/fpdfsdk/include/cpdfsdk_widget.h
index 88692d553e..bf033ccc3a 100644
--- a/fpdfsdk/include/cpdfsdk_widget.h
+++ b/fpdfsdk/include/cpdfsdk_widget.h
@@ -111,7 +111,7 @@ class CPDFSDK_Widget : public CPDFSDK_BAAnnot {
void ResetAppearance(const FX_WCHAR* sValue, FX_BOOL bValueChanged);
void ResetFieldAppearance(FX_BOOL bValueChanged);
void UpdateField();
- CFX_WideString OnFormat(FX_BOOL& bFormated);
+ CFX_WideString OnFormat(FX_BOOL& bFormatted);
FX_BOOL OnAAction(CPDF_AAction::AActionType type,
PDFSDK_FieldAction& data,
diff --git a/fpdfsdk/javascript/Field.cpp b/fpdfsdk/javascript/Field.cpp
index 1f49482375..a788fb203b 100644
--- a/fpdfsdk/javascript/Field.cpp
+++ b/fpdfsdk/javascript/Field.cpp
@@ -317,9 +317,9 @@ void Field::UpdateFormControl(CPDFSDK_Document* pDocument,
int nFieldType = pWidget->GetFieldType();
if (nFieldType == FIELDTYPE_COMBOBOX ||
nFieldType == FIELDTYPE_TEXTFIELD) {
- FX_BOOL bFormated = FALSE;
- CFX_WideString sValue = pWidget->OnFormat(bFormated);
- if (bFormated)
+ FX_BOOL bFormatted = FALSE;
+ CFX_WideString sValue = pWidget->OnFormat(bFormatted);
+ if (bFormatted)
pWidget->ResetAppearance(sValue.c_str(), FALSE);
else
pWidget->ResetAppearance(nullptr, FALSE);
diff --git a/xfa/fxfa/parser/cxfa_widgetdata.cpp b/xfa/fxfa/parser/cxfa_widgetdata.cpp
index 07f0ebb04d..561a5df92d 100644
--- a/xfa/fxfa/parser/cxfa_widgetdata.cpp
+++ b/xfa/fxfa/parser/cxfa_widgetdata.cpp
@@ -1739,8 +1739,8 @@ FX_BOOL CXFA_WidgetData::GetNormalizeDataValue(
}
FX_BOOL CXFA_WidgetData::GetFormatDataValue(const CFX_WideString& wsValue,
- CFX_WideString& wsFormatedValue) {
- wsFormatedValue = wsValue;
+ CFX_WideString& wsFormattedValue) {
+ wsFormattedValue = wsValue;
if (wsValue.IsEmpty())
return TRUE;
@@ -1796,7 +1796,7 @@ FX_BOOL CXFA_WidgetData::GetFormatDataValue(const CFX_WideString& wsValue,
CFX_WideString wsDate, wsTime;
if (SplitDateTime(wsValue, wsDate, wsTime)) {
CXFA_LocaleValue date(XFA_VT_DATE, wsDate, pLocalMgr);
- if (date.FormatPatterns(wsFormatedValue, wsPicture, pLocale,
+ if (date.FormatPatterns(wsFormattedValue, wsPicture, pLocale,
XFA_VALUEPICTURE_DataBind)) {
return TRUE;
}
@@ -1807,7 +1807,7 @@ FX_BOOL CXFA_WidgetData::GetFormatDataValue(const CFX_WideString& wsValue,
CFX_WideString wsDate, wsTime;
if (SplitDateTime(wsValue, wsDate, wsTime)) {
CXFA_LocaleValue time(XFA_VT_TIME, wsTime, pLocalMgr);
- if (time.FormatPatterns(wsFormatedValue, wsPicture, pLocale,
+ if (time.FormatPatterns(wsFormattedValue, wsPicture, pLocale,
XFA_VALUEPICTURE_DataBind)) {
return TRUE;
}
@@ -1817,7 +1817,7 @@ FX_BOOL CXFA_WidgetData::GetFormatDataValue(const CFX_WideString& wsValue,
default:
break;
}
- widgetValue.FormatPatterns(wsFormatedValue, wsPicture, pLocale,
+ widgetValue.FormatPatterns(wsFormattedValue, wsPicture, pLocale,
XFA_VALUEPICTURE_DataBind);
}
return FALSE;
diff --git a/xfa/fxfa/parser/cxfa_widgetdata.h b/xfa/fxfa/parser/cxfa_widgetdata.h
index 222b5bed4a..51e8672e39 100644
--- a/xfa/fxfa/parser/cxfa_widgetdata.h
+++ b/xfa/fxfa/parser/cxfa_widgetdata.h
@@ -134,7 +134,7 @@ class CXFA_WidgetData : public CXFA_Data {
FX_BOOL GetNormalizeDataValue(const CFX_WideString& wsValue,
CFX_WideString& wsNormalizeValue);
FX_BOOL GetFormatDataValue(const CFX_WideString& wsValue,
- CFX_WideString& wsFormatedValue);
+ CFX_WideString& wsFormattedValue);
void NormalizeNumStr(const CFX_WideString& wsValue, CFX_WideString& wsOutput);
CFX_WideString GetBarcodeType();
FX_BOOL GetBarcodeAttribute_CharEncoding(int32_t& val);
diff --git a/xfa/fxfa/parser/xfa_document_datamerger_imp.cpp b/xfa/fxfa/parser/xfa_document_datamerger_imp.cpp
index 11a44b917d..ea2f31671f 100644
--- a/xfa/fxfa/parser/xfa_document_datamerger_imp.cpp
+++ b/xfa/fxfa/parser/xfa_document_datamerger_imp.cpp
@@ -125,7 +125,7 @@ void CreateDataBinding(CXFA_Node* pFormNode,
CXFA_Value defValue(pFormNode->GetProperty(0, XFA_Element::Value));
if (!bDataToForm) {
CFX_WideString wsValue;
- CFX_WideString wsFormatedValue;
+ CFX_WideString wsFormattedValue;
switch (eUIType) {
case XFA_Element::ImageEdit: {
CXFA_Image image = defValue.GetImage();
@@ -139,8 +139,8 @@ void CreateDataBinding(CXFA_Node* pFormNode,
CFDE_XMLElement* pXMLDataElement =
static_cast<CFDE_XMLElement*>(pDataNode->GetXMLMappingNode());
ASSERT(pXMLDataElement);
- pWidgetData->GetFormatDataValue(wsValue, wsFormatedValue);
- pDataNode->SetAttributeValue(wsValue, wsFormatedValue);
+ pWidgetData->GetFormatDataValue(wsValue, wsFormattedValue);
+ pDataNode->SetAttributeValue(wsValue, wsFormattedValue);
pDataNode->SetCData(XFA_ATTRIBUTE_ContentType, wsContentType);
if (!wsHref.IsEmpty())
pXMLDataElement->SetString(L"href", wsHref);
@@ -169,8 +169,8 @@ void CreateDataBinding(CXFA_Node* pFormNode,
L"dataGroup");
}
} else if (!wsValue.IsEmpty()) {
- pWidgetData->GetFormatDataValue(wsValue, wsFormatedValue);
- pDataNode->SetAttributeValue(wsValue, wsFormatedValue);
+ pWidgetData->GetFormatDataValue(wsValue, wsFormattedValue);
+ pDataNode->SetAttributeValue(wsValue, wsFormattedValue);
}
break;
case XFA_Element::CheckButton:
@@ -178,8 +178,8 @@ void CreateDataBinding(CXFA_Node* pFormNode,
if (wsValue.IsEmpty())
break;
- pWidgetData->GetFormatDataValue(wsValue, wsFormatedValue);
- pDataNode->SetAttributeValue(wsValue, wsFormatedValue);
+ pWidgetData->GetFormatDataValue(wsValue, wsFormattedValue);
+ pDataNode->SetAttributeValue(wsValue, wsFormattedValue);
break;
case XFA_Element::ExclGroup: {
CXFA_Node* pChecked = nullptr;
@@ -208,8 +208,8 @@ void CreateDataBinding(CXFA_Node* pFormNode,
CFX_WideString wsContent;
if (pText->TryContent(wsContent) && (wsContent == wsValue)) {
pChecked = pChild;
- wsFormatedValue = wsValue;
- pDataNode->SetAttributeValue(wsValue, wsFormatedValue);
+ wsFormattedValue = wsValue;
+ pDataNode->SetAttributeValue(wsValue, wsFormattedValue);
pFormNode->SetCData(XFA_ATTRIBUTE_Value, wsContent);
break;
}
@@ -247,8 +247,8 @@ void CreateDataBinding(CXFA_Node* pFormNode,
CFX_WideString wsOutput;
pWidgetData->NormalizeNumStr(wsValue, wsOutput);
wsValue = wsOutput;
- pWidgetData->GetFormatDataValue(wsValue, wsFormatedValue);
- pDataNode->SetAttributeValue(wsValue, wsFormatedValue);
+ pWidgetData->GetFormatDataValue(wsValue, wsFormattedValue);
+ pDataNode->SetAttributeValue(wsValue, wsFormattedValue);
CXFA_Node* pValue = pFormNode->GetProperty(0, XFA_Element::Value);
FormValueNode_SetChildContent(pValue, wsValue, XFA_Element::Float);
break;
@@ -258,8 +258,8 @@ void CreateDataBinding(CXFA_Node* pFormNode,
if (wsValue.IsEmpty())
break;
- pWidgetData->GetFormatDataValue(wsValue, wsFormatedValue);
- pDataNode->SetAttributeValue(wsValue, wsFormatedValue);
+ pWidgetData->GetFormatDataValue(wsValue, wsFormattedValue);
+ pDataNode->SetAttributeValue(wsValue, wsFormattedValue);
break;
}
return;