Fix spelling of "Formated" in several variables

Review-Url: https://codereview.chromium.org/2318423002
diff --git a/fpdfsdk/cpdfsdk_interform.cpp b/fpdfsdk/cpdfsdk_interform.cpp
index 345487a..a8e2663 100644
--- a/fpdfsdk/cpdfsdk_interform.cpp
+++ b/fpdfsdk/cpdfsdk_interform.cpp
@@ -276,12 +276,12 @@
 }
 
 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 @@
       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 @@
 
         if (bRet) {
           sValue = Value;
-          bFormated = TRUE;
+          bFormatted = TRUE;
         }
       }
     }
@@ -632,9 +632,9 @@
   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 2ddbccc..d518a56 100644
--- a/fpdfsdk/cpdfsdk_widget.cpp
+++ b/fpdfsdk/cpdfsdk_widget.cpp
@@ -737,9 +737,9 @@
   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 @@
   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 31f0cff..1a9bdac 100644
--- a/fpdfsdk/cpdfsdk_widgethandler.cpp
+++ b/fpdfsdk/cpdfsdk_widgethandler.cpp
@@ -238,9 +238,9 @@
 
   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 c832a96..db1f538 100644
--- a/fpdfsdk/formfiller/cffl_iformfiller.cpp
+++ b/fpdfsdk/formfiller/cffl_iformfiller.cpp
@@ -716,14 +716,14 @@
     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 2fd93f1..d900fe2 100644
--- a/fpdfsdk/include/cpdfsdk_interform.h
+++ b/fpdfsdk/include/cpdfsdk_interform.h
@@ -67,7 +67,7 @@
                             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 88692d5..bf033cc 100644
--- a/fpdfsdk/include/cpdfsdk_widget.h
+++ b/fpdfsdk/include/cpdfsdk_widget.h
@@ -111,7 +111,7 @@
   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 1f49482..a788fb2 100644
--- a/fpdfsdk/javascript/Field.cpp
+++ b/fpdfsdk/javascript/Field.cpp
@@ -317,9 +317,9 @@
       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 07f0ebb..561a5df 100644
--- a/xfa/fxfa/parser/cxfa_widgetdata.cpp
+++ b/xfa/fxfa/parser/cxfa_widgetdata.cpp
@@ -1739,8 +1739,8 @@
 }
 
 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 @@
         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 @@
         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 @@
       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 222b5be..51e8672 100644
--- a/xfa/fxfa/parser/cxfa_widgetdata.h
+++ b/xfa/fxfa/parser/cxfa_widgetdata.h
@@ -134,7 +134,7 @@
   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 11a44b9..ea2f316 100644
--- a/xfa/fxfa/parser/xfa_document_datamerger_imp.cpp
+++ b/xfa/fxfa/parser/xfa_document_datamerger_imp.cpp
@@ -125,7 +125,7 @@
   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 @@
         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 @@
                                                                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 @@
         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 @@
           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 @@
         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 @@
         if (wsValue.IsEmpty())
           break;
 
-        pWidgetData->GetFormatDataValue(wsValue, wsFormatedValue);
-        pDataNode->SetAttributeValue(wsValue, wsFormatedValue);
+        pWidgetData->GetFormatDataValue(wsValue, wsFormattedValue);
+        pDataNode->SetAttributeValue(wsValue, wsFormattedValue);
         break;
     }
     return;