Rename core/fpdfdoc/CFoo to CPVT_Foo.

Make the class names consistent with other classes in the same
directory.

Change-Id: Iadfa5c8ab17a4696335f818db727000aaacf0102
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/79032
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
diff --git a/core/fpdfdoc/BUILD.gn b/core/fpdfdoc/BUILD.gn
index 4d6e96f..ffd75fd 100644
--- a/core/fpdfdoc/BUILD.gn
+++ b/core/fpdfdoc/BUILD.gn
@@ -68,15 +68,15 @@
     "cpvt_generateap.h",
     "cpvt_line.h",
     "cpvt_lineinfo.h",
+    "cpvt_section.cpp",
+    "cpvt_section.h",
+    "cpvt_typeset.cpp",
+    "cpvt_typeset.h",
     "cpvt_word.h",
     "cpvt_wordinfo.cpp",
     "cpvt_wordinfo.h",
     "cpvt_wordplace.h",
     "cpvt_wordrange.h",
-    "csection.cpp",
-    "csection.h",
-    "ctypeset.cpp",
-    "ctypeset.h",
     "ipvt_fontmap.h",
   ]
   configs += [ "../../:pdfium_core_config" ]
diff --git a/core/fpdfdoc/cpdf_variabletext.cpp b/core/fpdfdoc/cpdf_variabletext.cpp
index 26753b0..2774905 100644
--- a/core/fpdfdoc/cpdf_variabletext.cpp
+++ b/core/fpdfdoc/cpdf_variabletext.cpp
@@ -10,9 +10,9 @@
 #include <utility>
 
 #include "core/fpdfapi/font/cpdf_font.h"
+#include "core/fpdfdoc/cpvt_section.h"
 #include "core/fpdfdoc/cpvt_word.h"
 #include "core/fpdfdoc/cpvt_wordinfo.h"
-#include "core/fpdfdoc/csection.h"
 #include "core/fpdfdoc/ipvt_fontmap.h"
 #include "core/fxcrt/fx_codepage.h"
 #include "third_party/base/check.h"
@@ -117,7 +117,7 @@
   if (!pdfium::IndexInBounds(m_pVT->m_SectionArray, m_CurPos.nSecIndex))
     return false;
 
-  CSection* pSection = m_pVT->m_SectionArray[m_CurPos.nSecIndex].get();
+  CPVT_Section* pSection = m_pVT->m_SectionArray[m_CurPos.nSecIndex].get();
   if (m_CurPos.nLineIndex <
       pdfium::CollectionSize<int32_t>(pSection->m_LineArray) - 1) {
     m_CurPos = CPVT_WordPlace(m_CurPos.nSecIndex, m_CurPos.nLineIndex + 1, -1);
@@ -136,7 +136,7 @@
   if (!pdfium::IndexInBounds(m_pVT->m_SectionArray, m_CurPos.nSecIndex))
     return false;
 
-  CSection* pSection = m_pVT->m_SectionArray[m_CurPos.nSecIndex].get();
+  CPVT_Section* pSection = m_pVT->m_SectionArray[m_CurPos.nSecIndex].get();
   if (!pdfium::IndexInBounds(pSection->m_LineArray, m_CurPos.nLineIndex) ||
       !pdfium::IndexInBounds(pSection->m_WordArray, m_CurPos.nWordIndex)) {
     return false;
@@ -162,11 +162,11 @@
   if (!pdfium::IndexInBounds(m_pVT->m_SectionArray, m_CurPos.nSecIndex))
     return false;
 
-  CSection* pSection = m_pVT->m_SectionArray[m_CurPos.nSecIndex].get();
+  CPVT_Section* pSection = m_pVT->m_SectionArray[m_CurPos.nSecIndex].get();
   if (!pdfium::IndexInBounds(pSection->m_LineArray, m_CurPos.nLineIndex))
     return false;
 
-  CSection::Line* pLine = pSection->m_LineArray[m_CurPos.nLineIndex].get();
+  CPVT_Section::Line* pLine = pSection->m_LineArray[m_CurPos.nLineIndex].get();
   line.ptLine = m_pVT->InToOut(
       CFX_PointF(pLine->m_LineInfo.fLineX + pSection->m_Rect.left,
                  pLine->m_LineInfo.fLineY + pSection->m_Rect.top));
@@ -231,12 +231,12 @@
   if (!pdfium::IndexInBounds(m_SectionArray, wordplace.nSecIndex))
     return place;
 
-  CSection* pSection = m_SectionArray[wordplace.nSecIndex].get();
+  CPVT_Section* pSection = m_SectionArray[wordplace.nSecIndex].get();
   CPVT_WordPlace NewPlace(wordplace.nSecIndex + 1, 0, -1);
   AddSection(NewPlace);
   CPVT_WordPlace result = NewPlace;
   if (pdfium::IndexInBounds(m_SectionArray, NewPlace.nSecIndex)) {
-    CSection* pNewSection = m_SectionArray[NewPlace.nSecIndex].get();
+    CPVT_Section* pNewSection = m_SectionArray[NewPlace.nSecIndex].get();
     for (int32_t w = wordplace.nWordIndex + 1;
          w < pdfium::CollectionSize<int32_t>(pSection->m_WordArray); ++w) {
       NewPlace.nWordIndex++;
@@ -333,7 +333,7 @@
   int32_t sz = 0;
   for (i = 0, sz = pdfium::CollectionSize<int32_t>(m_SectionArray);
        i < sz && i < newplace.nSecIndex; i++) {
-    CSection* pSection = m_SectionArray[i].get();
+    CPVT_Section* pSection = m_SectionArray[i].get();
     nIndex += pdfium::CollectionSize<int32_t>(pSection->m_WordArray);
     if (i != sz - 1)
       nIndex += kReturnLength;
@@ -350,7 +350,7 @@
   bool bFound = false;
   for (int32_t i = 0, sz = pdfium::CollectionSize<int32_t>(m_SectionArray);
        i < sz; i++) {
-    CSection* pSection = m_SectionArray[i].get();
+    CPVT_Section* pSection = m_SectionArray[i].get();
     nIndex += pdfium::CollectionSize<int32_t>(pSection->m_WordArray);
     if (nIndex == index) {
       place = pSection->GetEndWordPlace();
@@ -390,7 +390,7 @@
   if (place.nSecIndex >= pdfium::CollectionSize<int32_t>(m_SectionArray))
     return GetEndWordPlace();
 
-  CSection* pSection = m_SectionArray[place.nSecIndex].get();
+  CPVT_Section* pSection = m_SectionArray[place.nSecIndex].get();
   if (place > pSection->GetBeginWordPlace())
     return pSection->GetPrevWordPlace(place);
   if (!pdfium::IndexInBounds(m_SectionArray, place.nSecIndex - 1))
@@ -405,7 +405,7 @@
   if (place.nSecIndex >= pdfium::CollectionSize<int32_t>(m_SectionArray))
     return GetEndWordPlace();
 
-  CSection* pSection = m_SectionArray[place.nSecIndex].get();
+  CPVT_Section* pSection = m_SectionArray[place.nSecIndex].get();
   if (place < pSection->GetEndWordPlace())
     return pSection->GetNextWordPlace(place);
   if (!pdfium::IndexInBounds(m_SectionArray, place.nSecIndex + 1))
@@ -425,7 +425,7 @@
   while (nLeft <= nRight) {
     if (!pdfium::IndexInBounds(m_SectionArray, nMid))
       break;
-    CSection* pSection = m_SectionArray[nMid].get();
+    CPVT_Section* pSection = m_SectionArray[nMid].get();
     if (IsFloatBigger(pt.y, pSection->m_Rect.top))
       bUp = false;
     if (IsFloatBigger(pSection->m_Rect.bottom, pt.y))
@@ -458,7 +458,7 @@
   if (!pdfium::IndexInBounds(m_SectionArray, place.nSecIndex))
     return place;
 
-  CSection* pSection = m_SectionArray[place.nSecIndex].get();
+  CPVT_Section* pSection = m_SectionArray[place.nSecIndex].get();
   CPVT_WordPlace temp = place;
   CFX_PointF pt = OutToIn(point);
   if (temp.nLineIndex-- > 0) {
@@ -466,7 +466,7 @@
   }
   if (temp.nSecIndex-- > 0) {
     if (pdfium::IndexInBounds(m_SectionArray, temp.nSecIndex)) {
-      CSection* pLastSection = m_SectionArray[temp.nSecIndex].get();
+      CPVT_Section* pLastSection = m_SectionArray[temp.nSecIndex].get();
       temp.nLineIndex =
           pdfium::CollectionSize<int32_t>(pLastSection->m_LineArray) - 1;
       return pLastSection->SearchWordPlace(pt.x - pLastSection->m_Rect.left,
@@ -482,7 +482,7 @@
   if (!pdfium::IndexInBounds(m_SectionArray, place.nSecIndex))
     return place;
 
-  CSection* pSection = m_SectionArray[place.nSecIndex].get();
+  CPVT_Section* pSection = m_SectionArray[place.nSecIndex].get();
   CPVT_WordPlace temp = place;
   CFX_PointF pt = OutToIn(point);
   if (temp.nLineIndex++ <
@@ -507,7 +507,7 @@
   if (!pdfium::IndexInBounds(m_SectionArray, place.nSecIndex))
     return place;
 
-  CSection* pSection = m_SectionArray[place.nSecIndex].get();
+  CPVT_Section* pSection = m_SectionArray[place.nSecIndex].get();
   if (!pdfium::IndexInBounds(pSection->m_LineArray, place.nLineIndex))
     return place;
 
@@ -543,7 +543,7 @@
   int32_t nSecIndex = pdfium::clamp(
       place.nSecIndex, 0, pdfium::CollectionSize<int32_t>(m_SectionArray));
 
-  auto pSection = std::make_unique<CSection>(this);
+  auto pSection = std::make_unique<CPVT_Section>(this);
   pSection->m_Rect = CPVT_FloatRect();
   pSection->SecPlace.nSecIndex = nSecIndex;
   m_SectionArray.insert(m_SectionArray.begin() + nSecIndex,
@@ -657,7 +657,7 @@
   if (!pdfium::IndexInBounds(m_SectionArray, place.nSecIndex))
     return;
 
-  CSection* pSection = m_SectionArray[place.nSecIndex].get();
+  CPVT_Section* pSection = m_SectionArray[place.nSecIndex].get();
   if (!pdfium::IndexInBounds(pSection->m_WordArray, wordplace.nWordIndex + 1))
     return;
 
@@ -701,9 +701,9 @@
   if (!pdfium::IndexInBounds(m_SectionArray, place.nSecIndex + 1))
     return;
 
-  CSection* pNextSection = m_SectionArray[place.nSecIndex + 1].get();
+  CPVT_Section* pNextSection = m_SectionArray[place.nSecIndex + 1].get();
   if (pdfium::IndexInBounds(m_SectionArray, oldplace.nSecIndex)) {
-    CSection* pSection = m_SectionArray[oldplace.nSecIndex].get();
+    CPVT_Section* pSection = m_SectionArray[oldplace.nSecIndex].get();
     for (auto& pWord : pNextSection->m_WordArray) {
       oldplace.nWordIndex++;
       pSection->AddWord(oldplace, *pWord);
@@ -727,7 +727,7 @@
   if (!pdfium::IndexInBounds(m_SectionArray, place.nSecIndex))
     return place;
 
-  CSection* pSection = m_SectionArray[place.nSecIndex].get();
+  CPVT_Section* pSection = m_SectionArray[place.nSecIndex].get();
   CPVT_WordPlace leftplace = GetPrevWordPlace(place);
   if (leftplace == place)
     return place;
@@ -747,7 +747,7 @@
   if (!pdfium::IndexInBounds(m_SectionArray, place.nSecIndex))
     return place;
 
-  CSection* pSection = m_SectionArray[place.nSecIndex].get();
+  CPVT_Section* pSection = m_SectionArray[place.nSecIndex].get();
   CPVT_WordPlace rightplace = AdjustLineHeader(GetNextWordPlace(place), false);
   if (rightplace == place)
     return place;
@@ -829,7 +829,7 @@
   for (int32_t s = 0, sz = pdfium::CollectionSize<int32_t>(m_SectionArray);
        s < sz; s++) {
     place.nSecIndex = s;
-    CSection* pSection = m_SectionArray[s].get();
+    CPVT_Section* pSection = m_SectionArray[s].get();
     pSection->SecPlace = place;
     CPVT_FloatRect rcSec = pSection->m_Rect;
     if (s >= nSSecIndex) {
diff --git a/core/fpdfdoc/cpdf_variabletext.h b/core/fpdfdoc/cpdf_variabletext.h
index 6e371ec..85dcd46 100644
--- a/core/fpdfdoc/cpdf_variabletext.h
+++ b/core/fpdfdoc/cpdf_variabletext.h
@@ -20,8 +20,8 @@
 #include "core/fxcrt/fx_system.h"
 #include "core/fxcrt/unowned_ptr.h"
 
+class CPVT_Section;
 class CPVT_Word;
-class CSection;
 class IPVT_FontMap;
 struct CPVT_WordInfo;
 
@@ -201,7 +201,7 @@
   float m_fLineLeading = 0.0f;
   float m_fCharSpace = 0.0f;
   float m_fFontSize = 0.0f;
-  std::vector<std::unique_ptr<CSection>> m_SectionArray;
+  std::vector<std::unique_ptr<CPVT_Section>> m_SectionArray;
   UnownedPtr<CPDF_VariableText::Provider> m_pVTProvider;
   std::unique_ptr<CPDF_VariableText::Iterator> m_pVTIterator;
   CFX_FloatRect m_rcPlate;
diff --git a/core/fpdfdoc/csection.cpp b/core/fpdfdoc/cpvt_section.cpp
similarity index 79%
rename from core/fpdfdoc/csection.cpp
rename to core/fpdfdoc/cpvt_section.cpp
index c9ac6f0..656e326 100644
--- a/core/fpdfdoc/csection.cpp
+++ b/core/fpdfdoc/cpvt_section.cpp
@@ -4,7 +4,7 @@
 
 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
 
-#include "core/fpdfdoc/csection.h"
+#include "core/fpdfdoc/cpvt_section.h"
 
 #include <algorithm>
 
@@ -13,20 +13,21 @@
 #include "third_party/base/check.h"
 #include "third_party/base/stl_util.h"
 
-CSection::Line::Line(const CPVT_LineInfo& lineinfo) : m_LineInfo(lineinfo) {}
+CPVT_Section::Line::Line(const CPVT_LineInfo& lineinfo)
+    : m_LineInfo(lineinfo) {}
 
-CSection::Line::~Line() = default;
+CPVT_Section::Line::~Line() = default;
 
-CPVT_WordPlace CSection::Line::GetBeginWordPlace() const {
+CPVT_WordPlace CPVT_Section::Line::GetBeginWordPlace() const {
   return CPVT_WordPlace(LinePlace.nSecIndex, LinePlace.nLineIndex, -1);
 }
 
-CPVT_WordPlace CSection::Line::GetEndWordPlace() const {
+CPVT_WordPlace CPVT_Section::Line::GetEndWordPlace() const {
   return CPVT_WordPlace(LinePlace.nSecIndex, LinePlace.nLineIndex,
                         m_LineInfo.nEndWordIndex);
 }
 
-CPVT_WordPlace CSection::Line::GetPrevWordPlace(
+CPVT_WordPlace CPVT_Section::Line::GetPrevWordPlace(
     const CPVT_WordPlace& place) const {
   if (place.nWordIndex > m_LineInfo.nEndWordIndex) {
     return CPVT_WordPlace(place.nSecIndex, place.nLineIndex,
@@ -36,7 +37,7 @@
                         place.nWordIndex - 1);
 }
 
-CPVT_WordPlace CSection::Line::GetNextWordPlace(
+CPVT_WordPlace CPVT_Section::Line::GetNextWordPlace(
     const CPVT_WordPlace& place) const {
   if (place.nWordIndex < m_LineInfo.nBeginWordIndex) {
     return CPVT_WordPlace(place.nSecIndex, place.nLineIndex,
@@ -46,13 +47,13 @@
                         place.nWordIndex + 1);
 }
 
-CSection::CSection(CPDF_VariableText* pVT) : m_pVT(pVT) {
+CPVT_Section::CPVT_Section(CPDF_VariableText* pVT) : m_pVT(pVT) {
   DCHECK(m_pVT);
 }
 
-CSection::~CSection() = default;
+CPVT_Section::~CPVT_Section() = default;
 
-void CSection::ResetLinePlace() {
+void CPVT_Section::ResetLinePlace() {
   int32_t i = 0;
   for (auto& pLine : m_LineArray) {
     pLine->LinePlace = CPVT_WordPlace(SecPlace.nSecIndex, i, -1);
@@ -60,8 +61,8 @@
   }
 }
 
-CPVT_WordPlace CSection::AddWord(const CPVT_WordPlace& place,
-                                 const CPVT_WordInfo& wordinfo) {
+CPVT_WordPlace CPVT_Section::AddWord(const CPVT_WordPlace& place,
+                                     const CPVT_WordInfo& wordinfo) {
   int32_t nWordIndex = pdfium::clamp(
       place.nWordIndex, 0, pdfium::CollectionSize<int32_t>(m_WordArray));
   m_WordArray.insert(m_WordArray.begin() + nWordIndex,
@@ -69,34 +70,35 @@
   return place;
 }
 
-CPVT_WordPlace CSection::AddLine(const CPVT_LineInfo& lineinfo) {
+CPVT_WordPlace CPVT_Section::AddLine(const CPVT_LineInfo& lineinfo) {
   m_LineArray.push_back(std::make_unique<Line>(lineinfo));
   return CPVT_WordPlace(SecPlace.nSecIndex, m_LineArray.size() - 1, -1);
 }
 
-CPVT_FloatRect CSection::Rearrange() {
+CPVT_FloatRect CPVT_Section::Rearrange() {
   if (m_pVT->GetCharArray() > 0)
-    return CTypeset(this).CharArray();
-  return CTypeset(this).Typeset();
+    return CPVT_Typeset(this).CharArray();
+  return CPVT_Typeset(this).Typeset();
 }
 
-CFX_SizeF CSection::GetSectionSize(float fFontSize) {
-  return CTypeset(this).GetEditSize(fFontSize);
+CFX_SizeF CPVT_Section::GetSectionSize(float fFontSize) {
+  return CPVT_Typeset(this).GetEditSize(fFontSize);
 }
 
-CPVT_WordPlace CSection::GetBeginWordPlace() const {
+CPVT_WordPlace CPVT_Section::GetBeginWordPlace() const {
   if (m_LineArray.empty())
     return SecPlace;
   return m_LineArray.front()->GetBeginWordPlace();
 }
 
-CPVT_WordPlace CSection::GetEndWordPlace() const {
+CPVT_WordPlace CPVT_Section::GetEndWordPlace() const {
   if (m_LineArray.empty())
     return SecPlace;
   return m_LineArray.back()->GetEndWordPlace();
 }
 
-CPVT_WordPlace CSection::GetPrevWordPlace(const CPVT_WordPlace& place) const {
+CPVT_WordPlace CPVT_Section::GetPrevWordPlace(
+    const CPVT_WordPlace& place) const {
   if (place.nLineIndex < 0)
     return GetBeginWordPlace();
 
@@ -116,7 +118,8 @@
   return m_LineArray[place.nLineIndex - 1]->GetEndWordPlace();
 }
 
-CPVT_WordPlace CSection::GetNextWordPlace(const CPVT_WordPlace& place) const {
+CPVT_WordPlace CPVT_Section::GetNextWordPlace(
+    const CPVT_WordPlace& place) const {
   if (place.nLineIndex < 0)
     return GetBeginWordPlace();
 
@@ -133,7 +136,7 @@
   return m_LineArray[place.nLineIndex + 1]->GetBeginWordPlace();
 }
 
-void CSection::UpdateWordPlace(CPVT_WordPlace& place) const {
+void CPVT_Section::UpdateWordPlace(CPVT_WordPlace& place) const {
   int32_t nLeft = 0;
   int32_t nRight = pdfium::CollectionSize<int32_t>(m_LineArray) - 1;
   int32_t nMid = (nLeft + nRight) / 2;
@@ -152,7 +155,7 @@
   }
 }
 
-CPVT_WordPlace CSection::SearchWordPlace(const CFX_PointF& point) const {
+CPVT_WordPlace CPVT_Section::SearchWordPlace(const CFX_PointF& point) const {
   CPVT_WordPlace place = GetBeginWordPlace();
   bool bUp = true;
   bool bDown = true;
@@ -192,7 +195,7 @@
   return place;
 }
 
-CPVT_WordPlace CSection::SearchWordPlace(
+CPVT_WordPlace CPVT_Section::SearchWordPlace(
     float fx,
     const CPVT_WordPlace& lineplace) const {
   if (!pdfium::IndexInBounds(m_LineArray, lineplace.nLineIndex))
@@ -205,8 +208,9 @@
                      pLine->GetEndWordPlace()));
 }
 
-CPVT_WordPlace CSection::SearchWordPlace(float fx,
-                                         const CPVT_WordRange& range) const {
+CPVT_WordPlace CPVT_Section::SearchWordPlace(
+    float fx,
+    const CPVT_WordRange& range) const {
   CPVT_WordPlace wordplace = range.BeginPos;
   wordplace.nWordIndex = -1;
 
@@ -239,14 +243,14 @@
   return wordplace;
 }
 
-void CSection::ClearLeftWords(int32_t nWordIndex) {
+void CPVT_Section::ClearLeftWords(int32_t nWordIndex) {
   for (int32_t i = nWordIndex; i >= 0; i--) {
     if (pdfium::IndexInBounds(m_WordArray, i))
       m_WordArray.erase(m_WordArray.begin() + i);
   }
 }
 
-void CSection::ClearRightWords(int32_t nWordIndex) {
+void CPVT_Section::ClearRightWords(int32_t nWordIndex) {
   int32_t sz = pdfium::CollectionSize<int32_t>(m_WordArray);
   for (int32_t i = sz - 1; i > nWordIndex; i--) {
     if (pdfium::IndexInBounds(m_WordArray, i))
@@ -254,14 +258,14 @@
   }
 }
 
-void CSection::ClearMidWords(int32_t nBeginIndex, int32_t nEndIndex) {
+void CPVT_Section::ClearMidWords(int32_t nBeginIndex, int32_t nEndIndex) {
   for (int32_t i = nEndIndex; i > nBeginIndex; i--) {
     if (pdfium::IndexInBounds(m_WordArray, i))
       m_WordArray.erase(m_WordArray.begin() + i);
   }
 }
 
-void CSection::ClearWords(const CPVT_WordRange& PlaceRange) {
+void CPVT_Section::ClearWords(const CPVT_WordRange& PlaceRange) {
   CPVT_WordPlace SecBeginPos = GetBeginWordPlace();
   CPVT_WordPlace SecEndPos = GetEndWordPlace();
   if (PlaceRange.BeginPos >= SecBeginPos) {
@@ -278,7 +282,7 @@
   }
 }
 
-void CSection::ClearWord(const CPVT_WordPlace& place) {
+void CPVT_Section::ClearWord(const CPVT_WordPlace& place) {
   if (pdfium::IndexInBounds(m_WordArray, place.nWordIndex))
     m_WordArray.erase(m_WordArray.begin() + place.nWordIndex);
 }
diff --git a/core/fpdfdoc/csection.h b/core/fpdfdoc/cpvt_section.h
similarity index 89%
rename from core/fpdfdoc/csection.h
rename to core/fpdfdoc/cpvt_section.h
index 16a5bc9..415cabb 100644
--- a/core/fpdfdoc/csection.h
+++ b/core/fpdfdoc/cpvt_section.h
@@ -4,16 +4,16 @@
 
 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
 
-#ifndef CORE_FPDFDOC_CSECTION_H_
-#define CORE_FPDFDOC_CSECTION_H_
+#ifndef CORE_FPDFDOC_CPVT_SECTION_H_
+#define CORE_FPDFDOC_CPVT_SECTION_H_
 
 #include <memory>
 #include <vector>
 
 #include "core/fpdfdoc/cpvt_lineinfo.h"
+#include "core/fpdfdoc/cpvt_typeset.h"
 #include "core/fpdfdoc/cpvt_wordinfo.h"
 #include "core/fpdfdoc/cpvt_wordrange.h"
-#include "core/fpdfdoc/ctypeset.h"
 #include "core/fxcrt/fx_coordinates.h"
 #include "core/fxcrt/fx_system.h"
 #include "core/fxcrt/unowned_ptr.h"
@@ -23,7 +23,7 @@
 struct CPVT_WordLine;
 struct CPVT_WordPlace;
 
-class CSection final {
+class CPVT_Section final {
  public:
   class Line {
    public:
@@ -38,8 +38,8 @@
     CPVT_LineInfo m_LineInfo;
   };
 
-  explicit CSection(CPDF_VariableText* pVT);
-  ~CSection();
+  explicit CPVT_Section(CPDF_VariableText* pVT);
+  ~CPVT_Section();
 
   void ResetLinePlace();
   CPVT_WordPlace AddWord(const CPVT_WordPlace& place,
@@ -65,7 +65,7 @@
   std::vector<std::unique_ptr<CPVT_WordInfo>> m_WordArray;
 
  private:
-  friend class CTypeset;
+  friend class CPVT_Typeset;
 
   void ClearLeftWords(int32_t nWordIndex);
   void ClearRightWords(int32_t nWordIndex);
@@ -74,4 +74,4 @@
   UnownedPtr<CPDF_VariableText> const m_pVT;
 };
 
-#endif  // CORE_FPDFDOC_CSECTION_H_
+#endif  // CORE_FPDFDOC_CPVT_SECTION_H_
diff --git a/core/fpdfdoc/ctypeset.cpp b/core/fpdfdoc/cpvt_typeset.cpp
similarity index 96%
rename from core/fpdfdoc/ctypeset.cpp
rename to core/fpdfdoc/cpvt_typeset.cpp
index b5c9663..c22bff8 100644
--- a/core/fpdfdoc/ctypeset.cpp
+++ b/core/fpdfdoc/cpvt_typeset.cpp
@@ -4,13 +4,13 @@
 
 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
 
-#include "core/fpdfdoc/ctypeset.h"
+#include "core/fpdfdoc/cpvt_typeset.h"
 
 #include <algorithm>
 
 #include "core/fpdfdoc/cpdf_variabletext.h"
+#include "core/fpdfdoc/cpvt_section.h"
 #include "core/fpdfdoc/cpvt_wordinfo.h"
-#include "core/fpdfdoc/csection.h"
 #include "third_party/base/check.h"
 #include "third_party/base/stl_util.h"
 
@@ -173,12 +173,12 @@
 
 }  // namespace
 
-CTypeset::CTypeset(CSection* pSection)
+CPVT_Typeset::CPVT_Typeset(CPVT_Section* pSection)
     : m_pVT(pSection->m_pVT), m_pSection(pSection) {}
 
-CTypeset::~CTypeset() = default;
+CPVT_Typeset::~CPVT_Typeset() = default;
 
-CPVT_FloatRect CTypeset::CharArray() {
+CPVT_FloatRect CPVT_Typeset::CharArray() {
   m_rcRet = CPVT_FloatRect();
   if (m_pSection->m_LineArray.empty())
     return m_rcRet;
@@ -192,7 +192,7 @@
   float x = 0.0f;
   float y = m_pVT->GetLineLeading() + fLineAscent;
   int32_t nStart = 0;
-  CSection::Line* pLine = m_pSection->m_LineArray.front().get();
+  CPVT_Section::Line* pLine = m_pSection->m_LineArray.front().get();
   switch (m_pVT->GetAlignment()) {
     case 0:
       pLine->m_LineInfo.fLineX = fNodeWidth * VARIABLETEXT_HALF;
@@ -258,14 +258,14 @@
   return m_rcRet;
 }
 
-CFX_SizeF CTypeset::GetEditSize(float fFontSize) {
+CFX_SizeF CPVT_Typeset::GetEditSize(float fFontSize) {
   DCHECK(m_pSection);
   DCHECK(m_pVT);
   SplitLines(false, fFontSize);
   return CFX_SizeF(m_rcRet.Width(), m_rcRet.Height());
 }
 
-CPVT_FloatRect CTypeset::Typeset() {
+CPVT_FloatRect CPVT_Typeset::Typeset() {
   DCHECK(m_pVT);
   m_pSection->m_LineArray.clear();
   SplitLines(true, 0.0f);
@@ -273,7 +273,7 @@
   return m_rcRet;
 }
 
-void CTypeset::SplitLines(bool bTypeset, float fFontSize) {
+void CPVT_Typeset::SplitLines(bool bTypeset, float fFontSize) {
   DCHECK(m_pVT);
   DCHECK(m_pSection);
 
@@ -426,7 +426,7 @@
   m_rcRet = CPVT_FloatRect(0, 0, fMaxX, fMaxY);
 }
 
-void CTypeset::OutputLines() {
+void CPVT_Typeset::OutputLines() {
   DCHECK(m_pVT);
   DCHECK(m_pSection);
   float fMinX;
@@ -453,7 +453,7 @@
     float fPosX = 0.0f;
     float fPosY = 0.0f;
     for (int32_t l = 0; l < nTotalLines; l++) {
-      CSection::Line* pLine = m_pSection->m_LineArray[l].get();
+      CPVT_Section::Line* pLine = m_pSection->m_LineArray[l].get();
       switch (m_pVT->GetAlignment()) {
         default:
         case 0:
diff --git a/core/fpdfdoc/ctypeset.h b/core/fpdfdoc/cpvt_typeset.h
similarity index 70%
rename from core/fpdfdoc/ctypeset.h
rename to core/fpdfdoc/cpvt_typeset.h
index 5f5f8d1..1b10c36 100644
--- a/core/fpdfdoc/ctypeset.h
+++ b/core/fpdfdoc/cpvt_typeset.h
@@ -4,20 +4,20 @@
 
 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
 
-#ifndef CORE_FPDFDOC_CTYPESET_H_
-#define CORE_FPDFDOC_CTYPESET_H_
+#ifndef CORE_FPDFDOC_CPVT_TYPESET_H_
+#define CORE_FPDFDOC_CPVT_TYPESET_H_
 
 #include "core/fpdfdoc/cpvt_floatrect.h"
 #include "core/fxcrt/fx_system.h"
 #include "core/fxcrt/unowned_ptr.h"
 
 class CPDF_VariableText;
-class CSection;
+class CPVT_Section;
 
-class CTypeset final {
+class CPVT_Typeset final {
  public:
-  explicit CTypeset(CSection* pSection);
-  ~CTypeset();
+  explicit CPVT_Typeset(CPVT_Section* pSection);
+  ~CPVT_Typeset();
 
   CFX_SizeF GetEditSize(float fFontSize);
   CPVT_FloatRect Typeset();
@@ -29,7 +29,7 @@
 
   CPVT_FloatRect m_rcRet;
   UnownedPtr<CPDF_VariableText> const m_pVT;
-  UnownedPtr<CSection> const m_pSection;
+  UnownedPtr<CPVT_Section> const m_pSection;
 };
 
-#endif  // CORE_FPDFDOC_CTYPESET_H_
+#endif  // CORE_FPDFDOC_CPVT_TYPESET_H_