Replace calls to deprecated CFX_{Wide,Byte}String::Empty()

Use the more standard name "clear()" instead.

Review URL: https://codereview.chromium.org/1888103002
diff --git a/core/fpdftext/fpdf_text_int.cpp b/core/fpdftext/fpdf_text_int.cpp
index a1e3fda..8de65cb 100644
--- a/core/fpdftext/fpdf_text_int.cpp
+++ b/core/fpdftext/fpdf_text_int.cpp
@@ -2185,7 +2185,7 @@
         }
         m_csFindWhatArray.push_back(curStr);
         if (pos == csWord.GetLength() - 1) {
-          csWord.Empty();
+          csWord.clear();
           break;
         }
         csWord = csWord.Right(csWord.GetLength() - pos - 1);
@@ -2258,7 +2258,7 @@
   while (iSubString--) {
     lpszFullString = FXSYS_wcschr(lpszFullString, chSep);
     if (!lpszFullString) {
-      rString.Empty();
+      rString.clear();
       return FALSE;
     }
     lpszFullString++;
@@ -2278,7 +2278,7 @@
 
 CFX_WideString CPDF_TextPageFind::MakeReverse(const CFX_WideString& str) {
   CFX_WideString str2;
-  str2.Empty();
+  str2.clear();
   int nlen = str.GetLength();
   for (int i = nlen - 1; i >= 0; i--) {
     str2 += str.GetAt(i);
diff --git a/core/fxcodec/codec/fx_codec_gif.cpp b/core/fxcodec/codec/fx_codec_gif.cpp
index b7362ca..1357641 100644
--- a/core/fxcodec/codec/fx_codec_gif.cpp
+++ b/core/fxcodec/codec/fx_codec_gif.cpp
@@ -160,7 +160,7 @@
           if (size) {
             pAttribute->m_strAuthor = CFX_ByteString(buf, size);
           } else {
-            pAttribute->m_strAuthor.Empty();
+            pAttribute->m_strAuthor.clear();
           }
           buf += size;
           size = *buf++;
diff --git a/core/fxcodec/lgif/fx_gif.cpp b/core/fxcodec/lgif/fx_gif.cpp
index 059fa9a..53298c8 100644
--- a/core/fxcodec/lgif/fx_gif.cpp
+++ b/core/fxcodec/lgif/fx_gif.cpp
@@ -647,7 +647,7 @@
         gif_ptr->skip_size = skip_size_org;
         return 2;
       }
-      gif_ptr->cmt_data_ptr->Empty();
+      gif_ptr->cmt_data_ptr->clear();
       while (*data_size_ptr != GIF_BLOCK_TERMINAL) {
         uint8_t data_size = *data_size_ptr;
         if (gif_read_data(gif_ptr, &data_ptr, *data_size_ptr) == NULL ||
diff --git a/core/fxcrt/fx_basic_buffer.cpp b/core/fxcrt/fx_basic_buffer.cpp
index 7f85c95..1e5d055 100644
--- a/core/fxcrt/fx_basic_buffer.cpp
+++ b/core/fxcrt/fx_basic_buffer.cpp
@@ -290,7 +290,7 @@
   }
   int len;
   operator>>(len);
-  str.Empty();
+  str.clear();
   if (len <= 0 || m_LoadingPos + len > m_LoadingSize) {
     return *this;
   }
diff --git a/core/fxcrt/include/fx_string.h b/core/fxcrt/include/fx_string.h
index 9d7d667..7024691 100644
--- a/core/fxcrt/include/fx_string.h
+++ b/core/fxcrt/include/fx_string.h
@@ -159,8 +159,6 @@
 
   ~CFX_ByteString();
 
-  // Deprecated -- use clear().
-  void Empty() { m_pData.Reset(); }
   void clear() { m_pData.Reset(); }
 
   static CFX_ByteString FromUnicode(const FX_WCHAR* ptr, FX_STRSIZE len = -1);
@@ -503,8 +501,6 @@
     return CFX_WideStringC(c_str(), GetLength());
   }
 
-  // Deprecated -- use clear().
-  void Empty() { m_pData.Reset(); }
   void clear() { m_pData.Reset(); }
 
   FX_STRSIZE GetLength() const { return m_pData ? m_pData->m_nDataLength : 0; }
diff --git a/fpdfsdk/pdfwindow/PWL_Edit.cpp b/fpdfsdk/pdfwindow/PWL_Edit.cpp
index f75aa53..6208381 100644
--- a/fpdfsdk/pdfwindow/PWL_Edit.cpp
+++ b/fpdfsdk/pdfwindow/PWL_Edit.cpp
@@ -46,7 +46,7 @@
       int32_t nCount = pXML->CountChildren();
       FX_BOOL bFirst = TRUE;
 
-      swText.Empty();
+      swText.clear();
 
       for (int32_t i = 0; i < nCount; i++) {
         if (CXML_Element* pSubElement = pXML->GetElement(i)) {
diff --git a/xfa/fde/tto/fde_textout.cpp b/xfa/fde/tto/fde_textout.cpp
index 8e9c30e..fe4e019 100644
--- a/xfa/fde/tto/fde_textout.cpp
+++ b/xfa/fde/tto/fde_textout.cpp
@@ -571,7 +571,7 @@
   }
   m_pTxtBreak->SetLineWidth(fLineWidth);
   m_ttoLines.RemoveAll(TRUE);
-  m_wsText.Empty();
+  m_wsText.clear();
   LoadText(pwsStr, iLength, rect);
   if (m_dwStyles & FDE_TTOSTYLE_Ellipsis) {
     ReplaceWidthEllipsis();
diff --git a/xfa/fde/xml/fde_xml_imp.cpp b/xfa/fde/xml/fde_xml_imp.cpp
index f678cf5..16fc962 100644
--- a/xfa/fde/xml/fde_xml_imp.cpp
+++ b/xfa/fde/xml/fde_xml_imp.cpp
@@ -681,7 +681,7 @@
 void CFDE_XMLElement::GetNamespacePrefix(CFX_WideString& wsPrefix) const {
   FX_STRSIZE iFind = m_wsTag.Find(L':', 0);
   if (iFind < 0) {
-    wsPrefix.Empty();
+    wsPrefix.clear();
   } else {
     wsPrefix = m_wsTag.Left(iFind);
   }
@@ -693,7 +693,7 @@
     wsAttri += L":";
     wsAttri += wsPrefix;
   }
-  wsNamespace.Empty();
+  wsNamespace.clear();
   CFDE_XMLNode* pNode = (CFDE_XMLNode*)this;
   while (pNode != NULL) {
     if (pNode->GetType() != FDE_XMLNODE_Element) {
@@ -1086,8 +1086,8 @@
 }
 CFDE_XMLDOMParser::~CFDE_XMLDOMParser() {
   m_NodeStack.RemoveAll();
-  m_ws1.Empty();
-  m_ws2.Empty();
+  m_ws1.clear();
+  m_ws2.clear();
 }
 
 int32_t CFDE_XMLDOMParser::DoParser(IFX_Pause* pPause) {
@@ -1132,7 +1132,7 @@
         m_pParser->GetTargetName(m_ws1);
         m_pChild = new CFDE_XMLInstruction(m_ws1);
         m_pParent->InsertChildNode(m_pChild);
-        m_ws1.Empty();
+        m_ws1.clear();
         break;
       case FDE_XmlSyntaxResult::TagName:
         m_pParser->GetTagName(m_ws1);
@@ -1155,7 +1155,7 @@
         } else if (m_pChild->GetType() == FDE_XMLNODE_Instruction) {
           ((CFDE_XMLInstruction*)m_pChild)->SetString(m_ws1, m_ws2);
         }
-        m_ws1.Empty();
+        m_ws1.clear();
         break;
       case FDE_XmlSyntaxResult::Text:
         m_pParser->GetTextData(m_ws1);
@@ -1180,7 +1180,7 @@
         }
         m_pParser->GetTargetData(m_ws1);
         ((CFDE_XMLInstruction*)m_pChild)->AppendData(m_ws1);
-        m_ws1.Empty();
+        m_ws1.clear();
         break;
       default:
         break;
@@ -1205,8 +1205,8 @@
       m_ws2() {}
 CFDE_XMLSAXParser::~CFDE_XMLSAXParser() {
   m_TagStack.RemoveAll();
-  m_ws1.Empty();
-  m_ws2.Empty();
+  m_ws1.clear();
+  m_ws2.clear();
 }
 int32_t CFDE_XMLSAXParser::DoParser(IFX_Pause* pPause) {
   FDE_XmlSyntaxResult syntaxParserResult;
@@ -1247,7 +1247,7 @@
         Push(xmlTag);
         m_pHandler->OnTagEnter(m_pHandler, FDE_XMLNODE_Instruction,
                                m_pTagTop->wsTagName);
-        m_ws1.Empty();
+        m_ws1.clear();
       } break;
       case FDE_XmlSyntaxResult::TagName: {
         m_pParser->GetTargetName(m_ws1);
@@ -1270,7 +1270,7 @@
         if (m_pTagTop->eType == FDE_XMLNODE_Element) {
           m_pHandler->OnAttribute(m_pHandler, m_ws1, m_ws2);
         }
-        m_ws1.Empty();
+        m_ws1.clear();
         break;
       case FDE_XmlSyntaxResult::CData:
         m_pParser->GetTextData(m_ws1);
@@ -1283,7 +1283,7 @@
       case FDE_XmlSyntaxResult::TargetData:
         m_pParser->GetTargetData(m_ws1);
         m_pHandler->OnData(m_pHandler, FDE_XMLNODE_Instruction, m_ws1);
-        m_ws1.Empty();
+        m_ws1.clear();
         break;
       default:
         break;
@@ -1380,7 +1380,7 @@
 void CFDE_BlockBuffer::GetTextData(CFX_WideString& wsTextData,
                                    int32_t iStart,
                                    int32_t iLength) const {
-  wsTextData.Empty();
+  wsTextData.clear();
   int32_t iMaybeDataLength = m_iBufferSize - 1 - m_iStartPosition;
   if (iStart < 0 || iStart > iMaybeDataLength) {
     return;
diff --git a/xfa/fgas/font/fgas_stdfontmgr.cpp b/xfa/fgas/font/fgas_stdfontmgr.cpp
index 6e707bf..9e8c824 100644
--- a/xfa/fgas/font/fgas_stdfontmgr.cpp
+++ b/xfa/fgas/font/fgas_stdfontmgr.cpp
@@ -1380,7 +1380,7 @@
     uint16_t nPlatformID = GetUInt16(lpNameRecord + j * 12 + 0);
     uint16_t nNameLength = GetUInt16(lpNameRecord + j * 12 + 8);
     uint16_t nNameOffset = GetUInt16(lpNameRecord + j * 12 + 10);
-    wsFamily.Empty();
+    wsFamily.clear();
     if (nPlatformID != 1) {
       for (uint16_t k = 0; k < nNameLength / 2; k++) {
         FX_WCHAR wcTemp = GetUInt16(lpStr + nNameOffset + k * 2);
diff --git a/xfa/fgas/localization/fgas_locale.cpp b/xfa/fgas/localization/fgas_locale.cpp
index dc4b3d2..6e0add1 100644
--- a/xfa/fgas/localization/fgas_locale.cpp
+++ b/xfa/fgas/localization/fgas_locale.cpp
@@ -765,7 +765,7 @@
               break;
             }
           }
-          wsSubCategory.Empty();
+          wsSubCategory.clear();
           if (!pLocale) {
             pLocale = m_pLocaleMgr->GetDefLocale();
           }
@@ -838,7 +838,7 @@
 FX_BOOL CFX_FormatString::ParseText(const CFX_WideString& wsSrcText,
                                     const CFX_WideString& wsPattern,
                                     CFX_WideString& wsValue) {
-  wsValue.Empty();
+  wsValue.clear();
   if (wsSrcText.IsEmpty() || wsPattern.IsEmpty()) {
     return FALSE;
   }
@@ -1663,7 +1663,7 @@
 FX_BOOL CFX_FormatString::ParseNum(const CFX_WideString& wsSrcNum,
                                    const CFX_WideString& wsPattern,
                                    CFX_WideString& wsValue) {
-  wsValue.Empty();
+  wsValue.clear();
   if (wsSrcNum.IsEmpty() || wsPattern.IsEmpty()) {
     return FALSE;
   }
@@ -2242,7 +2242,7 @@
             default:
               break;
           }
-          wsTempPattern.Empty();
+          wsTempPattern.clear();
           continue;
         }
         ccf++;
@@ -2255,7 +2255,7 @@
         } else if (eCategory == FX_LOCALECATEGORY_Date) {
           wsDatePattern = wsTempPattern;
         }
-        wsTempPattern.Empty();
+        wsTempPattern.clear();
       }
     } else {
       wsTempPattern += pStr[ccf];
@@ -2273,7 +2273,7 @@
     pLocale = m_pLocaleMgr->GetDefLocale();
   }
   if (!iFindCategory) {
-    wsTimePattern.Empty();
+    wsTimePattern.clear();
     wsDatePattern = wsPattern;
   }
   return (FX_DATETIMETYPE)iFindCategory;
@@ -3123,7 +3123,7 @@
   }
   if (cc >= 0) {
     int nPos = dot_index % 3;
-    wsOutput.Empty();
+    wsOutput.clear();
     for (int32_t i = 0; i < dot_index; i++) {
       if (i % 3 == nPos && i != 0) {
         wsOutput += wsGroupSymbol;
@@ -3540,7 +3540,7 @@
   }
   if (cc >= 0) {
     int nPos = dot_index % 3;
-    wsOutput.Empty();
+    wsOutput.clear();
     for (int32_t i = 0; i < dot_index; i++) {
       if (i % 3 == nPos && i != 0) {
         wsOutput += wsGroupSymbol;
@@ -4254,7 +4254,7 @@
   if (eCategory == FX_DATETIMETYPE_Unknown) {
     if (eDateTimeType == FX_DATETIMETYPE_Time) {
       wsTimePattern = wsDatePattern;
-      wsDatePattern.Empty();
+      wsDatePattern.clear();
     }
     eCategory = eDateTimeType;
   }
diff --git a/xfa/fwl/basewidget/fwl_editimp.cpp b/xfa/fwl/basewidget/fwl_editimp.cpp
index 95cf273..1bc876f 100644
--- a/xfa/fwl/basewidget/fwl_editimp.cpp
+++ b/xfa/fwl/basewidget/fwl_editimp.cpp
@@ -459,7 +459,7 @@
         AddSpellCheckObj(pathSpell, nStart, sLatinWord.GetLength(), fOffSetX,
                          fOffSetY);
       }
-      sLatinWord.Empty();
+      sLatinWord.clear();
     }
   }
   checkWordEvent.bsWord = sLatinWord;
@@ -661,14 +661,14 @@
   if (nCount == 0) {
     return FALSE;
   }
-  wsCopy.Empty();
+  wsCopy.clear();
   CFX_WideString wsTemp;
   int32_t nStart, nLength;
   for (int32_t i = 0; i < nCount; i++) {
     nLength = m_pEdtEngine->GetSelRange(i, nStart);
     m_pEdtEngine->GetText(wsTemp, nStart, nLength);
     wsCopy += wsTemp;
-    wsTemp.Empty();
+    wsTemp.clear();
   }
   return TRUE;
 }
@@ -679,14 +679,14 @@
   if (nCount == 0) {
     return FALSE;
   }
-  wsCut.Empty();
+  wsCut.clear();
   CFX_WideString wsTemp;
   int32_t nStart, nLength;
   for (int32_t i = 0; i < nCount; i++) {
     nLength = m_pEdtEngine->GetSelRange(i, nStart);
     m_pEdtEngine->GetText(wsTemp, nStart, nLength);
     wsCut += wsTemp;
-    wsTemp.Empty();
+    wsTemp.clear();
   }
   m_pEdtEngine->Delete(0);
   return TRUE;
diff --git a/xfa/fwl/core/fwl_targetimp.cpp b/xfa/fwl/core/fwl_targetimp.cpp
index e3e7680..1e63efe 100644
--- a/xfa/fwl/core/fwl_targetimp.cpp
+++ b/xfa/fwl/core/fwl_targetimp.cpp
@@ -27,7 +27,7 @@
 CFWL_TargetImp::CFWL_TargetImp() {}
 CFWL_TargetImp::~CFWL_TargetImp() {}
 FWL_ERR CFWL_TargetImp::GetClassName(CFX_WideString& wsClass) const {
-  wsClass.Empty();
+  wsClass.clear();
   return FWL_ERR_Succeeded;
 }
 uint32_t CFWL_TargetImp::GetClassID() const {
diff --git a/xfa/fxfa/app/xfa_checksum.cpp b/xfa/fxfa/app/xfa_checksum.cpp
index 69cb835..56b0c88 100644
--- a/xfa/fxfa/app/xfa_checksum.cpp
+++ b/xfa/fxfa/app/xfa_checksum.cpp
@@ -134,7 +134,7 @@
   FinishChecksum();
   m_pByteContext = FX_Alloc(uint8_t, 128);
   CRYPT_SHA1Start(m_pByteContext);
-  m_bsChecksum.Empty();
+  m_bsChecksum.clear();
   m_pSAXReader = FX_SAXReader_Create();
   return m_pSAXReader != NULL;
 }
diff --git a/xfa/fxfa/app/xfa_fwltheme.cpp b/xfa/fxfa/app/xfa_fwltheme.cpp
index 42d0835..2d1f8ac 100644
--- a/xfa/fxfa/app/xfa_fwltheme.cpp
+++ b/xfa/fxfa/app/xfa_fwltheme.cpp
@@ -268,7 +268,7 @@
     if (CXFA_FFWidget* pWidget =
             XFA_ThemeGetOuterWidget(pThemePart->m_pWidget)) {
       IXFA_AppProvider* pAppProvider = pWidget->GetAppProvider();
-      m_wsResource.Empty();
+      m_wsResource.clear();
       pAppProvider->LoadString(
           XFA_IDS_StringWeekDay_Sun + dwCapacity - FWL_WGTCAPACITY_MAX - 5,
           m_wsResource);
diff --git a/xfa/fxfa/app/xfa_textlayout.cpp b/xfa/fxfa/app/xfa_textlayout.cpp
index ce1ce70..80342a3 100644
--- a/xfa/fxfa/app/xfa_textlayout.cpp
+++ b/xfa/fxfa/app/xfa_textlayout.cpp
@@ -517,7 +517,7 @@
 FX_BOOL CXFA_TextParser::GetEmbbedObj(CXFA_TextProvider* pTextProvider,
                                       CFDE_XMLNode* pXMLNode,
                                       CFX_WideString& wsValue) {
-  wsValue.Empty();
+  wsValue.clear();
   if (pXMLNode == NULL) {
     return FALSE;
   }
@@ -543,7 +543,7 @@
     if (!bURI && ws != FX_WSTRC(L"som")) {
       return FALSE;
     }
-    ws.Empty();
+    ws.clear();
     pElement->GetString(FX_WSTRC(L"xfa:embedMode").c_str(), ws);
     if (ws.IsEmpty()) {
       ws = L"formatted";
@@ -645,7 +645,7 @@
           CXFA_Measurement ms(CFX_WideStringC(pTabStops + iLast, iCur - iLast));
           FX_FLOAT fPos = ms.ToUnit(XFA_UNIT_Pt);
           pTabstopContext->Append(dwHashCode, fPos);
-          wsAlign.Empty();
+          wsAlign.clear();
           eStatus = XFA_TABSTOPSSTATUS_None;
         }
         iCur++;
@@ -888,7 +888,7 @@
 }
 int32_t CXFA_TextLayout::GetText(CFX_WideString& wsText) {
   GetTextDataNode();
-  wsText.Empty();
+  wsText.clear();
   if (m_bRichText) {
   } else {
     wsText = m_pTextDataNode->GetContent();
diff --git a/xfa/fxfa/fm2js/xfa_fm2jsapi.cpp b/xfa/fxfa/fm2js/xfa_fm2jsapi.cpp
index 38e5f23..147869d 100644
--- a/xfa/fxfa/fm2js/xfa_fm2jsapi.cpp
+++ b/xfa/fxfa/fm2js/xfa_fm2jsapi.cpp
@@ -20,7 +20,7 @@
                             CFX_WideString& wsError) {
   if (wsFormcalc.IsEmpty()) {
     wsJavascript.Clear();
-    wsError.Empty();
+    wsError.clear();
     return 0;
   }
   int32_t status = 0;
diff --git a/xfa/fxfa/fm2js/xfa_fm2jscontext.cpp b/xfa/fxfa/fm2js/xfa_fm2jscontext.cpp
index ee7e622..cc148c7 100644
--- a/xfa/fxfa/fm2js/xfa_fm2jscontext.cpp
+++ b/xfa/fxfa/fm2js/xfa_fm2jscontext.cpp
@@ -4127,7 +4127,7 @@
   CFX_WideString htmlReserve;
   while (i < iLen) {
     ch = *(pData + i);
-    htmlReserve.Empty();
+    htmlReserve.clear();
     if (HTMLCode2STR(ch, htmlReserve)) {
       wsResultBuf.AppendChar(L'&');
       wsResultBuf << htmlReserve;
diff --git a/xfa/fxfa/include/fxfa.h b/xfa/fxfa/include/fxfa.h
index eb99e59..1f2b00b 100644
--- a/xfa/fxfa/include/fxfa.h
+++ b/xfa/fxfa/include/fxfa.h
@@ -150,7 +150,7 @@
   virtual void GetAppType(CFX_WideString& wsAppType) = 0;
   virtual void SetFoxitAppType(const CFX_WideStringC& wsFoxitAppType) {}
   virtual void GetFoxitAppType(CFX_WideString& wsFoxitAppType) {
-    wsFoxitAppType.Empty();
+    wsFoxitAppType.clear();
   }
 
   /**
@@ -174,7 +174,7 @@
    */
   virtual void GetVersion(CFX_WideString& wsVersion) = 0;
   virtual void GetFoxitVersion(CFX_WideString& wsFoxitVersion) {
-    wsFoxitVersion.Empty();
+    wsFoxitVersion.clear();
   }
 
   /**
@@ -182,7 +182,7 @@
    */
   virtual void GetAppName(CFX_WideString& wsName) = 0;
   virtual void GetFoxitAppName(CFX_WideString& wsFoxitName) {
-    wsFoxitName.Empty();
+    wsFoxitName.clear();
   }
 
   /**
@@ -436,25 +436,25 @@
   CXFA_EventParam() {
     m_pTarget = NULL;
     m_eType = XFA_EVENT_Unknown;
-    m_wsResult.Empty();
+    m_wsResult.clear();
     Reset();
   }
   void Reset() {
-    m_wsChange.Empty();
+    m_wsChange.clear();
     m_iCommitKey = 0;
-    m_wsFullText.Empty();
+    m_wsFullText.clear();
     m_bKeyDown = FALSE;
     m_bModifier = FALSE;
-    m_wsNewContentType.Empty();
-    m_wsNewText.Empty();
-    m_wsPrevContentType.Empty();
-    m_wsPrevText.Empty();
+    m_wsNewContentType.clear();
+    m_wsNewText.clear();
+    m_wsPrevContentType.clear();
+    m_wsPrevText.clear();
     m_bReenter = FALSE;
     m_iSelEnd = 0;
     m_iSelStart = 0;
     m_bShift = FALSE;
-    m_wsSoapFaultCode.Empty();
-    m_wsSoapFaultString.Empty();
+    m_wsSoapFaultCode.clear();
+    m_wsSoapFaultString.clear();
     m_bIsFormReady = FALSE;
     m_iValidateActivities = XFA_VALIDATE_preSubmit;
   }
diff --git a/xfa/fxfa/parser/cxfa_widgetdata.cpp b/xfa/fxfa/parser/cxfa_widgetdata.cpp
index 681516d..1638001 100644
--- a/xfa/fxfa/parser/cxfa_widgetdata.cpp
+++ b/xfa/fxfa/parser/cxfa_widgetdata.cpp
@@ -413,7 +413,7 @@
         if (pItemchild)
           wsChildValue = pItemchild->GetContent();
         else
-          wsChildValue.Empty();
+          wsChildValue.clear();
       }
       CXFA_WidgetData ch(pChild);
       ch.SyncValue(wsChildValue, bNotify);
@@ -504,7 +504,7 @@
       if (pItemchild)
         wsChildValue = pItemchild->GetContent();
       else
-        wsChildValue.Empty();
+        wsChildValue.clear();
     } else {
       wsExclGroup = wsValue;
     }
@@ -606,7 +606,7 @@
 FX_BOOL CXFA_WidgetData::GetChoiceListItem(CFX_WideString& wsText,
                                            int32_t nIndex,
                                            FX_BOOL bSaveValue) {
-  wsText.Empty();
+  wsText.clear();
   CXFA_NodeArray pItemsArray;
   CXFA_Node* pItems = NULL;
   int32_t iCount = 0;
@@ -1507,7 +1507,7 @@
         int32_t iSelItemIndex = GetSelectedItem(0);
         if (iSelItemIndex >= 0) {
           GetChoiceListItem(wsValue, iSelItemIndex);
-          wsPicture.Empty();
+          wsPicture.clear();
         }
       }
     } break;
@@ -1709,7 +1709,7 @@
   int32_t cc = dot_index - 1;
   if (cc >= 0) {
     int nPos = dot_index % 3;
-    wsOutput.Empty();
+    wsOutput.clear();
     for (int32_t i = 0; i < dot_index; i++) {
       if (i % 3 == nPos && i != 0)
         wsOutput += wsGroupSymbol;
diff --git a/xfa/fxfa/parser/xfa_document_datamerger_imp.cpp b/xfa/fxfa/parser/xfa_document_datamerger_imp.cpp
index a75a8ea..a271b10 100644
--- a/xfa/fxfa/parser/xfa_document_datamerger_imp.cpp
+++ b/xfa/fxfa/parser/xfa_document_datamerger_imp.cpp
@@ -290,7 +290,7 @@
           pDataNode->GetNodeList(items);
           int32_t iCounts = items.GetSize();
           if (iCounts > 0) {
-            wsNormailizeValue.Empty();
+            wsNormailizeValue.clear();
             CFX_WideString wsItem;
             for (int32_t i = 0; i < iCounts; i++) {
               items[i]->TryContent(wsItem);
diff --git a/xfa/fxfa/parser/xfa_document_serialize.cpp b/xfa/fxfa/parser/xfa_document_serialize.cpp
index 4c826b6..87707d8 100644
--- a/xfa/fxfa/parser/xfa_document_serialize.cpp
+++ b/xfa/fxfa/parser/xfa_document_serialize.cpp
@@ -189,7 +189,7 @@
 static void XFA_DataExporter_RecognizeXFAVersionNumber(
     CXFA_Node* pTemplateRoot,
     CFX_WideString& wsVersionNumber) {
-  wsVersionNumber.Empty();
+  wsVersionNumber.clear();
   if (!pTemplateRoot) {
     return;
   }
@@ -336,7 +336,7 @@
       }
       if (!bSaveXML && !wsChildren.IsEmpty() &&
           pNode->GetClassID() == XFA_ELEMENT_Items) {
-        wsChildren.Empty();
+        wsChildren.clear();
         bSaveXML = TRUE;
         CXFA_Node* pChildNode = pNode->GetNodeItem(XFA_NODEITEM_FirstChild);
         while (pChildNode) {
diff --git a/xfa/fxfa/parser/xfa_localemgr.cpp b/xfa/fxfa/parser/xfa_localemgr.cpp
index f2b3f1f..9b605b0 100644
--- a/xfa/fxfa/parser/xfa_localemgr.cpp
+++ b/xfa/fxfa/parser/xfa_localemgr.cpp
@@ -1247,7 +1247,7 @@
 }
 CFX_WideStringC CXFA_LocaleMgr::GetConfigLocaleName(CXFA_Node* pConfig) {
   if (!(m_dwLocaleFlags & 0x01)) {
-    m_wsConfigLocale.Empty();
+    m_wsConfigLocale.clear();
     if (pConfig) {
       CXFA_Node* pChildfConfig =
           pConfig->GetFirstChildByClass(XFA_ELEMENT_Acrobat);
diff --git a/xfa/fxfa/parser/xfa_localevalue.cpp b/xfa/fxfa/parser/xfa_localevalue.cpp
index e36595d..6dd8377 100644
--- a/xfa/fxfa/parser/xfa_localevalue.cpp
+++ b/xfa/fxfa/parser/xfa_localevalue.cpp
@@ -142,7 +142,7 @@
       }
       case FX_LOCALECATEGORY_Text:
         bRet = pFormat->ParseText(wsValue, wsFormat, wsOutput);
-        wsOutput.Empty();
+        wsOutput.clear();
         if (!bRet) {
           bRet = pFormat->FormatText(wsValue, wsFormat, wsOutput);
         }
@@ -464,7 +464,7 @@
                                          const CFX_WideString& wsFormat,
                                          IFX_Locale* pLocale,
                                          XFA_VALUEPICTURE eValueType) const {
-  wsResult.Empty();
+  wsResult.clear();
   FX_BOOL bRet = FALSE;
 
   CFX_FormatString* pFormat = nullptr;
@@ -492,7 +492,7 @@
   if (pLocale) {
     m_pLocaleMgr->SetDefLocale(pLocale);
   }
-  wsResult.Empty();
+  wsResult.clear();
   FX_BOOL bRet = FALSE;
 
   CFX_FormatString* pFormat = nullptr;
@@ -822,7 +822,7 @@
       case FX_LOCALECATEGORY_Null:
         bRet = pFormat->ParseNull(wsValue, wsFormat);
         if (bRet) {
-          m_wsValue.Empty();
+          m_wsValue.clear();
         }
         break;
       case FX_LOCALECATEGORY_Zero:
diff --git a/xfa/fxfa/parser/xfa_object_imp.cpp b/xfa/fxfa/parser/xfa_object_imp.cpp
index 87941af..2979e37 100644
--- a/xfa/fxfa/parser/xfa_object_imp.cpp
+++ b/xfa/fxfa/parser/xfa_object_imp.cpp
@@ -4468,7 +4468,7 @@
   }
 }
 FX_BOOL CXFA_Node::TryNamespace(CFX_WideString& wsNamespace) {
-  wsNamespace.Empty();
+  wsNamespace.clear();
   if (GetObjectType() == XFA_OBJECTTYPE_ModelNode ||
       GetClassID() == XFA_ELEMENT_Packet) {
     CFDE_XMLNode* pXMLNode = GetXMLMappingNode();
diff --git a/xfa/fxfa/parser/xfa_parser_imp.cpp b/xfa/fxfa/parser/xfa_parser_imp.cpp
index 4bb47dd..002197c 100644
--- a/xfa/fxfa/parser/xfa_parser_imp.cpp
+++ b/xfa/fxfa/parser/xfa_parser_imp.cpp
@@ -217,7 +217,7 @@
       return TRUE;
     }
   }
-  wsNamespaceURI.Empty();
+  wsNamespaceURI.clear();
   return bRet;
 }
 static inline void XFA_FDEExtension_GetElementTagNamespaceURI(
@@ -227,7 +227,7 @@
   pElement->GetNamespacePrefix(wsNodeStr);
   if (!XFA_FDEExtension_ResolveNamespaceQualifier(
           pElement, wsNodeStr.AsStringC(), wsNamespaceURI)) {
-    wsNamespaceURI.Empty();
+    wsNamespaceURI.clear();
   }
 }
 static FX_BOOL XFA_FDEExtension_MatchNodeName(
@@ -285,7 +285,7 @@
   }
   if (!XFA_FDEExtension_ResolveNamespaceQualifier(
           pElement, wsNSPrefix.AsStringC(), wsNamespaceURI)) {
-    wsNamespaceURI.Empty();
+    wsNamespaceURI.clear();
     return FALSE;
   }
   return TRUE;
@@ -1318,7 +1318,7 @@
     if (pXMLInstruction->GetData(0, wsData) &&
         (pXFANode->GetDocument()->RecognizeXFAVersionNumber(wsData) !=
          XFA_VERSION_UNKNOWN)) {
-      wsData.Empty();
+      wsData.clear();
       if (pXMLInstruction->GetData(1, wsData) &&
           wsData == FX_WSTRC(L"v2.7-scripting:1")) {
         pXFANode->GetDocument()->SetFlag(XFA_DOCFLAG_Scripting, TRUE);
@@ -1419,8 +1419,8 @@
     m_pParser->Release();
   }
   m_NodeStack.RemoveAll();
-  m_ws1.Empty();
-  m_ws2.Empty();
+  m_ws1.clear();
+  m_ws2.clear();
 }
 int32_t CXFA_XMLParser::DoParser(IFX_Pause* pPause) {
   if (m_syntaxParserResult == FDE_XmlSyntaxResult::Error)
@@ -1485,7 +1485,7 @@
         } else {
           m_pChild = NULL;
         }
-        m_ws1.Empty();
+        m_ws1.clear();
         break;
       case FDE_XmlSyntaxResult::TagName:
         m_pParser->GetTagName(m_ws1);
@@ -1520,7 +1520,7 @@
             static_cast<CFDE_XMLElement*>(m_pChild)->SetString(m_ws1, m_ws2);
           }
         }
-        m_ws1.Empty();
+        m_ws1.clear();
         break;
       case FDE_XmlSyntaxResult::Text:
         m_pParser->GetTextData(m_ws1);
@@ -1546,7 +1546,7 @@
           m_pParser->GetTargetData(m_ws1);
           static_cast<CFDE_XMLInstruction*>(m_pChild)->AppendData(m_ws1);
         }
-        m_ws1.Empty();
+        m_ws1.clear();
         break;
       default:
         break;
diff --git a/xfa/fxfa/parser/xfa_script_nodehelper.cpp b/xfa/fxfa/parser/xfa_script_nodehelper.cpp
index 1b79ad9..bb722c6 100644
--- a/xfa/fxfa/parser/xfa_script_nodehelper.cpp
+++ b/xfa/fxfa/parser/xfa_script_nodehelper.cpp
@@ -261,7 +261,7 @@
                                             CFX_WideString& wsName,
                                             FX_BOOL bIsAllPath,
                                             XFA_LOGIC_TYPE eLogicType) {
-  wsName.Empty();
+  wsName.clear();
   if (bIsAllPath) {
     XFA_GetNameExpression(refNode, wsName, FALSE, eLogicType);
     CFX_WideString wsParent;
diff --git a/xfa/fxfa/parser/xfa_script_resolveprocessor.cpp b/xfa/fxfa/parser/xfa_script_resolveprocessor.cpp
index 09f5137..38271da 100644
--- a/xfa/fxfa/parser/xfa_script_resolveprocessor.cpp
+++ b/xfa/fxfa/parser/xfa_script_resolveprocessor.cpp
@@ -262,7 +262,7 @@
       rndFind.m_CurNode = pVariablesNode;
       XFA_ResolveNodes_SetStylesForChild(dwStyles, rndFind);
       CFX_WideString wsSaveCondition = rndFind.m_wsCondition;
-      rndFind.m_wsCondition.Empty();
+      rndFind.m_wsCondition.clear();
       XFA_ResolveNodes_Normal(rndFind);
       rndFind.m_wsCondition = wsSaveCondition;
       if (rndFind.m_Nodes.GetSize() > 0) {
@@ -300,7 +300,7 @@
         }
         rndFind.m_CurNode = child;
         CFX_WideString wsSaveCondition = rndFind.m_wsCondition;
-        rndFind.m_wsCondition.Empty();
+        rndFind.m_wsCondition.clear();
         XFA_ResolveNodes_Normal(rndFind);
         rndFind.m_wsCondition = wsSaveCondition;
         if (rndFind.m_Nodes.GetSize() > 0) {
@@ -444,7 +444,7 @@
       if (bInnerSearch) {
         rndFind.m_CurNode = child;
         CFX_WideString wsOriginCondition = rndFind.m_wsCondition;
-        rndFind.m_wsCondition.Empty();
+        rndFind.m_wsCondition.clear();
         uint32_t dwOriginStyle = rndFind.m_dwStyles;
         rndFind.m_dwStyles = dwOriginStyle | XFA_RESOLVENODE_ALL;
         XFA_ResolveNodes_Normal(rndFind);