Rename CFX_Break to CFGAS_Break

Bug: pdfium:1567
Change-Id: I22e215d4585c7dbaa8b31c281ed5a521151fb83d
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/78672
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
diff --git a/xfa/fgas/layout/BUILD.gn b/xfa/fgas/layout/BUILD.gn
index 220751e..c586e13 100644
--- a/xfa/fgas/layout/BUILD.gn
+++ b/xfa/fgas/layout/BUILD.gn
@@ -9,10 +9,10 @@
 
 source_set("layout") {
   sources = [
+    "cfgas_break.cpp",
+    "cfgas_break.h",
     "cfgas_char.cpp",
     "cfgas_char.h",
-    "cfx_break.cpp",
-    "cfx_break.h",
     "cfx_breakline.cpp",
     "cfx_breakline.h",
     "cfx_breakpiece.cpp",
diff --git a/xfa/fgas/layout/cfx_break.cpp b/xfa/fgas/layout/cfgas_break.cpp
similarity index 72%
rename from xfa/fgas/layout/cfx_break.cpp
rename to xfa/fgas/layout/cfgas_break.cpp
index efe1060..efe11fc 100644
--- a/xfa/fgas/layout/cfx_break.cpp
+++ b/xfa/fgas/layout/cfgas_break.cpp
@@ -4,7 +4,7 @@
 
 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
 
-#include "xfa/fgas/layout/cfx_break.h"
+#include "xfa/fgas/layout/cfgas_break.h"
 
 #include <algorithm>
 #include <vector>
@@ -13,27 +13,27 @@
 #include "third_party/base/stl_util.h"
 #include "xfa/fgas/font/cfgas_gefont.h"
 
-const float CFX_Break::kConversionFactor = 20000.0f;
-const int CFX_Break::kMinimumTabWidth = 160000;
+const float CFGAS_Break::kConversionFactor = 20000.0f;
+const int CFGAS_Break::kMinimumTabWidth = 160000;
 
-CFX_Break::CFX_Break(uint32_t dwLayoutStyles)
+CFGAS_Break::CFGAS_Break(uint32_t dwLayoutStyles)
     : m_dwLayoutStyles(dwLayoutStyles), m_pCurLine(&m_Lines[0]) {}
 
-CFX_Break::~CFX_Break() = default;
+CFGAS_Break::~CFGAS_Break() = default;
 
-void CFX_Break::Reset() {
+void CFGAS_Break::Reset() {
   m_eCharType = FX_CHARTYPE::kUnknown;
   for (CFX_BreakLine& line : m_Lines)
     line.Clear();
 }
 
-void CFX_Break::SetLayoutStyles(uint32_t dwLayoutStyles) {
+void CFGAS_Break::SetLayoutStyles(uint32_t dwLayoutStyles) {
   m_dwLayoutStyles = dwLayoutStyles;
   m_bSingleLine = (m_dwLayoutStyles & FX_LAYOUTSTYLE_SingleLine) != 0;
   m_bCombText = (m_dwLayoutStyles & FX_LAYOUTSTYLE_CombText) != 0;
 }
 
-void CFX_Break::SetHorizontalScale(int32_t iScale) {
+void CFGAS_Break::SetHorizontalScale(int32_t iScale) {
   iScale = std::max(iScale, 0);
   if (m_iHorizontalScale == iScale)
     return;
@@ -42,7 +42,7 @@
   m_iHorizontalScale = iScale;
 }
 
-void CFX_Break::SetVerticalScale(int32_t iScale) {
+void CFGAS_Break::SetVerticalScale(int32_t iScale) {
   if (iScale < 0)
     iScale = 0;
   if (m_iVerticalScale == iScale)
@@ -52,7 +52,7 @@
   m_iVerticalScale = iScale;
 }
 
-void CFX_Break::SetFont(const RetainPtr<CFGAS_GEFont>& pFont) {
+void CFGAS_Break::SetFont(const RetainPtr<CFGAS_GEFont>& pFont) {
   if (!pFont || pFont == m_pFont)
     return;
 
@@ -60,7 +60,7 @@
   m_pFont = pFont;
 }
 
-void CFX_Break::SetFontSize(float fFontSize) {
+void CFGAS_Break::SetFontSize(float fFontSize) {
   int32_t iFontSize = FXSYS_roundf(fFontSize * 20.0f);
   if (m_iFontSize == iFontSize)
     return;
@@ -69,7 +69,7 @@
   m_iFontSize = iFontSize;
 }
 
-void CFX_Break::SetBreakStatus() {
+void CFGAS_Break::SetBreakStatus() {
   ++m_dwIdentity;
   if (m_pCurLine->m_LineChars.empty())
     return;
@@ -79,17 +79,17 @@
     tc->m_dwStatus = CFGAS_Char::BreakType::kPiece;
 }
 
-bool CFX_Break::IsGreaterThanLineWidth(int32_t width) const {
+bool CFGAS_Break::IsGreaterThanLineWidth(int32_t width) const {
   FX_SAFE_INT32 line_width = m_iLineWidth;
   line_width += m_iTolerance;
   return line_width.IsValid() && width > line_width.ValueOrDie();
 }
 
-FX_CHARTYPE CFX_Break::GetUnifiedCharType(FX_CHARTYPE chartype) const {
+FX_CHARTYPE CFGAS_Break::GetUnifiedCharType(FX_CHARTYPE chartype) const {
   return chartype >= FX_CHARTYPE::kArabicAlef ? FX_CHARTYPE::kArabic : chartype;
 }
 
-void CFX_Break::SetTabWidth(float fTabWidth) {
+void CFGAS_Break::SetTabWidth(float fTabWidth) {
   // Note, the use of max here was only done in the TxtBreak code. Leaving this
   // in for the RTFBreak code for consistency. If we see issues with tab widths
   // we may need to fix this.
@@ -97,21 +97,21 @@
       std::max(FXSYS_roundf(fTabWidth * kConversionFactor), kMinimumTabWidth);
 }
 
-void CFX_Break::SetParagraphBreakChar(wchar_t wch) {
+void CFGAS_Break::SetParagraphBreakChar(wchar_t wch) {
   if (wch != L'\r' && wch != L'\n')
     return;
   m_wParagraphBreakChar = wch;
 }
 
-void CFX_Break::SetLineBreakTolerance(float fTolerance) {
+void CFGAS_Break::SetLineBreakTolerance(float fTolerance) {
   m_iTolerance = FXSYS_roundf(fTolerance * kConversionFactor);
 }
 
-void CFX_Break::SetCharSpace(float fCharSpace) {
+void CFGAS_Break::SetCharSpace(float fCharSpace) {
   m_iCharSpace = FXSYS_roundf(fCharSpace * kConversionFactor);
 }
 
-void CFX_Break::SetLineBoundary(float fLineStart, float fLineEnd) {
+void CFGAS_Break::SetLineBoundary(float fLineStart, float fLineEnd) {
   if (fLineStart > fLineEnd)
     return;
 
@@ -121,9 +121,9 @@
   m_pCurLine->m_iStart = std::max(m_pCurLine->m_iStart, m_iLineStart);
 }
 
-CFGAS_Char* CFX_Break::GetLastChar(int32_t index,
-                                   bool bOmitChar,
-                                   bool bRichText) const {
+CFGAS_Char* CFGAS_Break::GetLastChar(int32_t index,
+                                     bool bOmitChar,
+                                     bool bRichText) const {
   std::vector<CFGAS_Char>& tca = m_pCurLine->m_LineChars;
   if (!pdfium::IndexInBounds(tca, index))
     return nullptr;
@@ -141,13 +141,13 @@
   return nullptr;
 }
 
-int32_t CFX_Break::CountBreakPieces() const {
+int32_t CFGAS_Break::CountBreakPieces() const {
   return HasLine() ? pdfium::CollectionSize<int32_t>(
                          m_Lines[m_iReadyLineIndex].m_LinePieces)
                    : 0;
 }
 
-const CFX_BreakPiece* CFX_Break::GetBreakPieceUnstable(int32_t index) const {
+const CFX_BreakPiece* CFGAS_Break::GetBreakPieceUnstable(int32_t index) const {
   if (!HasLine())
     return nullptr;
   if (!pdfium::IndexInBounds(m_Lines[m_iReadyLineIndex].m_LinePieces, index))
@@ -155,7 +155,7 @@
   return &m_Lines[m_iReadyLineIndex].m_LinePieces[index];
 }
 
-void CFX_Break::ClearBreakPieces() {
+void CFGAS_Break::ClearBreakPieces() {
   if (HasLine())
     m_Lines[m_iReadyLineIndex].Clear();
   m_iReadyLineIndex = -1;
diff --git a/xfa/fgas/layout/cfx_break.h b/xfa/fgas/layout/cfgas_break.h
similarity index 91%
rename from xfa/fgas/layout/cfx_break.h
rename to xfa/fgas/layout/cfgas_break.h
index 405f4ed..bb7081f 100644
--- a/xfa/fgas/layout/cfx_break.h
+++ b/xfa/fgas/layout/cfgas_break.h
@@ -4,8 +4,8 @@
 
 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
 
-#ifndef XFA_FGAS_LAYOUT_CFX_BREAK_H_
-#define XFA_FGAS_LAYOUT_CFX_BREAK_H_
+#ifndef XFA_FGAS_LAYOUT_CFGAS_BREAK_H_
+#define XFA_FGAS_LAYOUT_CFGAS_BREAK_H_
 
 #include <stdint.h>
 
@@ -30,9 +30,9 @@
   FX_LAYOUTSTYLE_CombText = 0x400
 };
 
-class CFX_Break {
+class CFGAS_Break {
  public:
-  virtual ~CFX_Break();
+  virtual ~CFGAS_Break();
 
   void Reset();
 
@@ -65,7 +65,7 @@
   static const int kMinimumTabWidth;
   static const float kConversionFactor;
 
-  explicit CFX_Break(uint32_t dwLayoutStyles);
+  explicit CFGAS_Break(uint32_t dwLayoutStyles);
 
   void SetBreakStatus();
   bool HasLine() const { return m_iReadyLineIndex >= 0; }
@@ -92,4 +92,4 @@
   CFX_BreakLine m_Lines[2];
 };
 
-#endif  // XFA_FGAS_LAYOUT_CFX_BREAK_H_
+#endif  // XFA_FGAS_LAYOUT_CFGAS_BREAK_H_
diff --git a/xfa/fgas/layout/cfx_rtfbreak.cpp b/xfa/fgas/layout/cfx_rtfbreak.cpp
index 85fc027..eaff441 100644
--- a/xfa/fgas/layout/cfx_rtfbreak.cpp
+++ b/xfa/fgas/layout/cfx_rtfbreak.cpp
@@ -24,7 +24,7 @@
 #include "xfa/fgas/layout/fx_linebreak.h"
 
 CFX_RTFBreak::CFX_RTFBreak(uint32_t dwLayoutStyles)
-    : CFX_Break(dwLayoutStyles),
+    : CFGAS_Break(dwLayoutStyles),
       m_bPagination(false),
       m_iAlignment(CFX_RTFLineAlignment::Left) {
   SetBreakStatus();
diff --git a/xfa/fgas/layout/cfx_rtfbreak.h b/xfa/fgas/layout/cfx_rtfbreak.h
index 07db8e2..6f7cd66 100644
--- a/xfa/fgas/layout/cfx_rtfbreak.h
+++ b/xfa/fgas/layout/cfx_rtfbreak.h
@@ -13,7 +13,7 @@
 #include "core/fxcrt/fx_coordinates.h"
 #include "core/fxcrt/fx_unicode.h"
 #include "core/fxcrt/retain_ptr.h"
-#include "xfa/fgas/layout/cfx_break.h"
+#include "xfa/fgas/layout/cfgas_break.h"
 
 class CFX_TextUserData;
 class CFX_TextPiece;
@@ -27,7 +27,7 @@
   Distributed
 };
 
-class CFX_RTFBreak final : public CFX_Break {
+class CFX_RTFBreak final : public CFGAS_Break {
  public:
   explicit CFX_RTFBreak(uint32_t dwLayoutStyles);
   ~CFX_RTFBreak() override;
diff --git a/xfa/fgas/layout/cfx_txtbreak.cpp b/xfa/fgas/layout/cfx_txtbreak.cpp
index 7d5bf9a..109eb12 100644
--- a/xfa/fgas/layout/cfx_txtbreak.cpp
+++ b/xfa/fgas/layout/cfx_txtbreak.cpp
@@ -30,7 +30,7 @@
 }  // namespace
 
 CFX_TxtBreak::CFX_TxtBreak()
-    : CFX_Break(FX_LAYOUTSTYLE_None),
+    : CFGAS_Break(FX_LAYOUTSTYLE_None),
       m_iAlignment(CFX_TxtLineAlignment_Left),
       m_iCombWidth(360000) {}
 
diff --git a/xfa/fgas/layout/cfx_txtbreak.h b/xfa/fgas/layout/cfx_txtbreak.h
index 6430f2b..6ae3167 100644
--- a/xfa/fgas/layout/cfx_txtbreak.h
+++ b/xfa/fgas/layout/cfx_txtbreak.h
@@ -11,8 +11,8 @@
 #include <vector>
 
 #include "core/fxcrt/fx_coordinates.h"
+#include "xfa/fgas/layout/cfgas_break.h"
 #include "xfa/fgas/layout/cfgas_char.h"
-#include "xfa/fgas/layout/cfx_break.h"
 
 class CFGAS_GEFont;
 class TextCharPos;
@@ -32,7 +32,7 @@
          type == CFGAS_Char::BreakType::kPiece;
 }
 
-class CFX_TxtBreak final : public CFX_Break {
+class CFX_TxtBreak final : public CFGAS_Break {
  public:
   class Engine {
    public: