Rename CFX_BreakPiece::m_iChars to m_iCharCount

There is also an m_pChars member which would conflict with m_iChars
were we to covert m_pPdfiumStyle members to chromium_style_ (since
they differ only in the Hungarian part of the name).

Change-Id: Ib4a734772e3c26c2b105d61035aed7a7467f3913
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/69590
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
diff --git a/xfa/fgas/layout/cfx_breakpiece.cpp b/xfa/fgas/layout/cfx_breakpiece.cpp
index dbdcf6e..dd32a24 100644
--- a/xfa/fgas/layout/cfx_breakpiece.cpp
+++ b/xfa/fgas/layout/cfx_breakpiece.cpp
@@ -20,23 +20,23 @@
 
 CFX_Char* CFX_BreakPiece::GetChar(int32_t index) const {
   ASSERT(index >= 0);
-  ASSERT(index < m_iChars);
+  ASSERT(index < m_iCharCount);
   ASSERT(m_pChars);
   return &(*m_pChars)[m_iStartChar + index];
 }
 
 WideString CFX_BreakPiece::GetString() const {
   WideString ret;
-  ret.Reserve(m_iChars);
-  for (int32_t i = m_iStartChar; i < m_iStartChar + m_iChars; i++)
+  ret.Reserve(m_iCharCount);
+  for (int32_t i = m_iStartChar; i < m_iStartChar + m_iCharCount; i++)
     ret += static_cast<wchar_t>((*m_pChars)[i].char_code());
   return ret;
 }
 
 std::vector<int32_t> CFX_BreakPiece::GetWidths() const {
   std::vector<int32_t> ret;
-  ret.reserve(m_iChars);
-  for (int32_t i = m_iStartChar; i < m_iStartChar + m_iChars; i++)
+  ret.reserve(m_iCharCount);
+  for (int32_t i = m_iStartChar; i < m_iStartChar + m_iCharCount; i++)
     ret.push_back((*m_pChars)[i].m_iCharWidth);
   return ret;
 }
diff --git a/xfa/fgas/layout/cfx_breakpiece.h b/xfa/fgas/layout/cfx_breakpiece.h
index 303b5db..febb16c 100644
--- a/xfa/fgas/layout/cfx_breakpiece.h
+++ b/xfa/fgas/layout/cfx_breakpiece.h
@@ -23,7 +23,7 @@
   ~CFX_BreakPiece();
 
   int32_t GetEndPos() const;
-  int32_t GetLength() const { return m_iChars; }
+  int32_t GetLength() const { return m_iCharCount; }
 
   CFX_Char* GetChar(int32_t index) const;
   WideString GetString() const;
@@ -33,7 +33,7 @@
   int32_t m_iStartPos = 0;
   int32_t m_iWidth = -1;
   int32_t m_iStartChar = 0;
-  int32_t m_iChars = 0;
+  int32_t m_iCharCount = 0;
   int32_t m_iBidiLevel = 0;
   int32_t m_iBidiPos = 0;
   int32_t m_iFontSize = 0;
diff --git a/xfa/fgas/layout/cfx_rtfbreak.cpp b/xfa/fgas/layout/cfx_rtfbreak.cpp
index 78d723b..d77da9a 100644
--- a/xfa/fgas/layout/cfx_rtfbreak.cpp
+++ b/xfa/fgas/layout/cfx_rtfbreak.cpp
@@ -397,11 +397,11 @@
 
     if (i == iLast || pTC->m_dwStatus != CFX_BreakType::None ||
         pTC->m_dwIdentity != dwIdentity) {
-      tp.m_iChars = i - j;
+      tp.m_iCharCount = i - j;
       if (pTC->m_dwIdentity == dwIdentity) {
         tp.m_dwStatus = pTC->m_dwStatus;
         tp.m_iWidth += pTC->m_iCharWidth;
-        tp.m_iChars += 1;
+        tp.m_iCharCount += 1;
         ++i;
       }
       m_pCurLine->m_LinePieces.push_back(tp);
@@ -468,7 +468,7 @@
       ++i;
     } else if (iBidiLevel != pTC->m_iBidiLevel ||
                pTC->m_dwIdentity != dwIdentity) {
-      tp.m_iChars = i - tp.m_iStartChar;
+      tp.m_iCharCount = i - tp.m_iStartChar;
       m_pCurLine->m_LinePieces.push_back(tp);
 
       tp.m_iStartPos += tp.m_iWidth;
@@ -487,7 +487,7 @@
 
   if (i > tp.m_iStartChar) {
     tp.m_dwStatus = dwStatus;
-    tp.m_iChars = i - tp.m_iStartChar;
+    tp.m_iCharCount = i - tp.m_iStartChar;
     m_pCurLine->m_LinePieces.push_back(tp);
 
     tpo.index = j;
@@ -516,8 +516,8 @@
       iNetWidth = ttp.GetEndPos();
 
     bool bArabic = FX_IsOdd(ttp.m_iBidiLevel);
-    int32_t j = bArabic ? 0 : ttp.m_iChars - 1;
-    while (j > -1 && j < ttp.m_iChars) {
+    int32_t j = bArabic ? 0 : ttp.m_iCharCount - 1;
+    while (j > -1 && j < ttp.m_iCharCount) {
       const CFX_Char* tc = ttp.GetChar(j);
       if (tc->m_eLineBreakType == FX_LINEBREAKTYPE::kDIRECT_BRK)
         ++iGapChars;
@@ -555,7 +555,7 @@
       else
         ttp.m_iStartPos = iStart;
 
-      for (int32_t j = 0; j < ttp.m_iChars; ++j) {
+      for (int32_t j = 0; j < ttp.m_iCharCount; ++j) {
         CFX_Char* tc = ttp.GetChar(j);
         if (tc->m_eLineBreakType != FX_LINEBREAKTYPE::kDIRECT_BRK ||
             tc->m_iCharWidth < 0) {
diff --git a/xfa/fgas/layout/cfx_txtbreak.cpp b/xfa/fgas/layout/cfx_txtbreak.cpp
index d210088..c48e76f 100644
--- a/xfa/fgas/layout/cfx_txtbreak.cpp
+++ b/xfa/fgas/layout/cfx_txtbreak.cpp
@@ -318,7 +318,7 @@
     tp.m_iStartPos = m_pCurLine->m_iStart;
     tp.m_iWidth = m_pCurLine->m_iWidth;
     tp.m_iStartChar = 0;
-    tp.m_iChars = m_pCurLine->m_LineChars.size();
+    tp.m_iCharCount = m_pCurLine->m_LineChars.size();
     tp.m_pChars = &m_pCurLine->m_LineChars;
     pTC = &chars[0];
     tp.m_dwCharStyles = pTC->m_dwCharStyles;
@@ -370,7 +370,7 @@
 
         i++;
       }
-      tp.m_iChars = i - tp.m_iStartChar;
+      tp.m_iCharCount = i - tp.m_iStartChar;
       m_pCurLine->m_LinePieces.push_back(tp);
       tp.m_iStartPos += tp.m_iWidth;
       tp.m_iStartChar = i;
@@ -388,7 +388,7 @@
   }
   if (i > tp.m_iStartChar) {
     tp.m_dwStatus = dwStatus;
-    tp.m_iChars = i - tp.m_iStartChar;
+    tp.m_iCharCount = i - tp.m_iStartChar;
     m_pCurLine->m_LinePieces.push_back(tp);
     tpo.index = ++j;
     tpo.pos = tp.m_iBidiPos;
@@ -421,8 +421,8 @@
       iNetWidth = ttp.GetEndPos();
 
     bool bArabic = FX_IsOdd(ttp.m_iBidiLevel);
-    int32_t j = bArabic ? 0 : ttp.m_iChars - 1;
-    while (j > -1 && j < ttp.m_iChars) {
+    int32_t j = bArabic ? 0 : ttp.m_iCharCount - 1;
+    while (j > -1 && j < ttp.m_iCharCount) {
       const CFX_Char* pTC = ttp.GetChar(j);
       if (pTC->m_eLineBreakType == FX_LINEBREAKTYPE::kDIRECT_BRK)
         iGapChars++;
@@ -455,7 +455,8 @@
       else
         ttp.m_iStartPos = iStart;
 
-      for (int32_t j = 0; j < ttp.m_iChars && iGapChars > 0; j++, iGapChars--) {
+      for (int32_t j = 0; j < ttp.m_iCharCount && iGapChars > 0;
+           j++, iGapChars--) {
         CFX_Char* pTC = ttp.GetChar(j);
         if (pTC->m_eLineBreakType != FX_LINEBREAKTYPE::kDIRECT_BRK ||
             pTC->m_iCharWidth < 0) {
diff --git a/xfa/fxfa/cxfa_textlayout.cpp b/xfa/fxfa/cxfa_textlayout.cpp
index 45f682c..f95ebdc 100644
--- a/xfa/fxfa/cxfa_textlayout.cpp
+++ b/xfa/fxfa/cxfa_textlayout.cpp
@@ -1002,7 +1002,7 @@
       float fVerScale = pPiece->m_iVerticalScale / 100.0f;
 
       auto pTP = pdfium::MakeUnique<CXFA_TextPiece>();
-      pTP->iChars = pPiece->m_iChars;
+      pTP->iChars = pPiece->m_iCharCount;
       pTP->szText = pPiece->GetString();
       pTP->Widths = pPiece->GetWidths();
       pTP->iBidiLevel = pPiece->m_iBidiLevel;