Rename CFX_BreakPiece to CFGAS_BreakPiece. Same for CFX_TextPiece and CFX_BreakLine. Bug: pdfium:1567 Change-Id: If4a1f13176e8f632f15059d0c9b16316993d5a52 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/78710 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
diff --git a/xfa/fde/cfde_texteditengine.cpp b/xfa/fde/cfde_texteditengine.cpp index 07821ba..1b8bfe4 100644 --- a/xfa/fde/cfde_texteditengine.cpp +++ b/xfa/fde/cfde_texteditengine.cpp
@@ -1100,7 +1100,7 @@ continue; int32_t piece_count = text_break_.CountBreakPieces(); for (int32_t i = 0; i < piece_count; ++i) { - const CFX_BreakPiece* piece = text_break_.GetBreakPieceUnstable(i); + const CFGAS_BreakPiece* piece = text_break_.GetBreakPieceUnstable(i); FDE_TEXTEDITPIECE txtEdtPiece; txtEdtPiece.rtPiece.left = piece->m_iStartPos / 20000.0f;
diff --git a/xfa/fde/cfde_textout.cpp b/xfa/fde/cfde_textout.cpp index 38e38a4..39d5864 100644 --- a/xfa/fde/cfde_textout.cpp +++ b/xfa/fde/cfde_textout.cpp
@@ -254,7 +254,7 @@ float fLineStep = std::max(m_fLineSpace, m_fFontSize); float fLineWidth = 0.0f; for (int32_t i = 0; i < m_pTxtBreak->CountBreakPieces(); i++) { - const CFX_BreakPiece* pPiece = m_pTxtBreak->GetBreakPieceUnstable(i); + const CFGAS_BreakPiece* pPiece = m_pTxtBreak->GetBreakPieceUnstable(i); fLineWidth += static_cast<float>(pPiece->m_iWidth) / 20000.0f; *pStartPos = std::min(*pStartPos, static_cast<float>(pPiece->m_iStartPos) / 20000.0f); @@ -371,7 +371,7 @@ int32_t iLineWidth = FXSYS_roundf(rect.Width() * 20000.0f); int32_t iCount = m_pTxtBreak->CountBreakPieces(); for (int32_t i = 0; i < iCount; i++) { - const CFX_BreakPiece* pPiece = m_pTxtBreak->GetBreakPieceUnstable(i); + const CFGAS_BreakPiece* pPiece = m_pTxtBreak->GetBreakPieceUnstable(i); int32_t iPieceChars = pPiece->GetLength(); int32_t iChar = *pStartChar; int32_t iWidth = 0;
diff --git a/xfa/fgas/layout/BUILD.gn b/xfa/fgas/layout/BUILD.gn index 68b4445..5311383 100644 --- a/xfa/fgas/layout/BUILD.gn +++ b/xfa/fgas/layout/BUILD.gn
@@ -11,20 +11,20 @@ sources = [ "cfgas_break.cpp", "cfgas_break.h", + "cfgas_breakline.cpp", + "cfgas_breakline.h", + "cfgas_breakpiece.cpp", + "cfgas_breakpiece.h", "cfgas_char.cpp", "cfgas_char.h", "cfgas_rtfbreak.cpp", "cfgas_rtfbreak.h", + "cfgas_textpiece.cpp", + "cfgas_textpiece.h", "cfgas_txtbreak.cpp", "cfgas_txtbreak.h", - "cfx_breakline.cpp", - "cfx_breakline.h", - "cfx_breakpiece.cpp", - "cfx_breakpiece.h", "cfx_linkuserdata.cpp", "cfx_linkuserdata.h", - "cfx_textpiece.cpp", - "cfx_textpiece.h", "cfx_textuserdata.cpp", "cfx_textuserdata.h", "fx_arabic.cpp",
diff --git a/xfa/fgas/layout/cfgas_break.cpp b/xfa/fgas/layout/cfgas_break.cpp index efe11fc..13b3904 100644 --- a/xfa/fgas/layout/cfgas_break.cpp +++ b/xfa/fgas/layout/cfgas_break.cpp
@@ -23,7 +23,7 @@ void CFGAS_Break::Reset() { m_eCharType = FX_CHARTYPE::kUnknown; - for (CFX_BreakLine& line : m_Lines) + for (CFGAS_BreakLine& line : m_Lines) line.Clear(); } @@ -147,7 +147,8 @@ : 0; } -const CFX_BreakPiece* CFGAS_Break::GetBreakPieceUnstable(int32_t index) const { +const CFGAS_BreakPiece* CFGAS_Break::GetBreakPieceUnstable( + int32_t index) const { if (!HasLine()) return nullptr; if (!pdfium::IndexInBounds(m_Lines[m_iReadyLineIndex].m_LinePieces, index))
diff --git a/xfa/fgas/layout/cfgas_break.h b/xfa/fgas/layout/cfgas_break.h index bb7081f..ebab59e 100644 --- a/xfa/fgas/layout/cfgas_break.h +++ b/xfa/fgas/layout/cfgas_break.h
@@ -11,7 +11,7 @@ #include "core/fxcrt/retain_ptr.h" #include "core/fxcrt/unowned_ptr.h" -#include "xfa/fgas/layout/cfx_breakline.h" +#include "xfa/fgas/layout/cfgas_breakline.h" class CFGAS_GEFont; @@ -53,11 +53,11 @@ void SetParagraphBreakChar(wchar_t wch); int32_t CountBreakPieces() const; - const CFX_BreakPiece* GetBreakPieceUnstable(int32_t index) const; + const CFGAS_BreakPiece* GetBreakPieceUnstable(int32_t index) const; void ClearBreakPieces(); CFGAS_Char* GetLastChar(int32_t index, bool bOmitChar, bool bRichText) const; - const CFX_BreakLine* GetCurrentLineForTesting() const { + const CFGAS_BreakLine* GetCurrentLineForTesting() const { return m_pCurLine.Get(); } @@ -87,9 +87,9 @@ int32_t m_iTolerance = 0; int32_t m_iCharSpace = 0; RetainPtr<CFGAS_GEFont> m_pFont; - UnownedPtr<CFX_BreakLine> m_pCurLine; + UnownedPtr<CFGAS_BreakLine> m_pCurLine; int8_t m_iReadyLineIndex = -1; - CFX_BreakLine m_Lines[2]; + CFGAS_BreakLine m_Lines[2]; }; #endif // XFA_FGAS_LAYOUT_CFGAS_BREAK_H_
diff --git a/xfa/fgas/layout/cfx_breakline.cpp b/xfa/fgas/layout/cfgas_breakline.cpp similarity index 62% rename from xfa/fgas/layout/cfx_breakline.cpp rename to xfa/fgas/layout/cfgas_breakline.cpp index 350743a..effd109 100644 --- a/xfa/fgas/layout/cfx_breakline.cpp +++ b/xfa/fgas/layout/cfgas_breakline.cpp
@@ -4,36 +4,36 @@ // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com -#include "xfa/fgas/layout/cfx_breakline.h" +#include "xfa/fgas/layout/cfgas_breakline.h" #include "third_party/base/check.h" #include "third_party/base/stl_util.h" -CFX_BreakLine::CFX_BreakLine() = default; +CFGAS_BreakLine::CFGAS_BreakLine() = default; -CFX_BreakLine::~CFX_BreakLine() = default; +CFGAS_BreakLine::~CFGAS_BreakLine() = default; -CFGAS_Char* CFX_BreakLine::GetChar(int32_t index) { +CFGAS_Char* CFGAS_BreakLine::GetChar(int32_t index) { DCHECK(pdfium::IndexInBounds(m_LineChars, index)); return &m_LineChars[index]; } -int32_t CFX_BreakLine::GetLineEnd() const { +int32_t CFGAS_BreakLine::GetLineEnd() const { return m_iStart + m_iWidth; } -void CFX_BreakLine::Clear() { +void CFGAS_BreakLine::Clear() { m_LineChars.clear(); m_LinePieces.clear(); m_iWidth = 0; m_iArabicChars = 0; } -void CFX_BreakLine::IncrementArabicCharCount() { +void CFGAS_BreakLine::IncrementArabicCharCount() { ++m_iArabicChars; } -void CFX_BreakLine::DecrementArabicCharCount() { +void CFGAS_BreakLine::DecrementArabicCharCount() { DCHECK(m_iArabicChars > 0); --m_iArabicChars; }
diff --git a/xfa/fgas/layout/cfx_breakline.h b/xfa/fgas/layout/cfgas_breakline.h similarity index 69% rename from xfa/fgas/layout/cfx_breakline.h rename to xfa/fgas/layout/cfgas_breakline.h index 4b69322..e7d21c8 100644 --- a/xfa/fgas/layout/cfx_breakline.h +++ b/xfa/fgas/layout/cfgas_breakline.h
@@ -4,18 +4,18 @@ // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com -#ifndef XFA_FGAS_LAYOUT_CFX_BREAKLINE_H_ -#define XFA_FGAS_LAYOUT_CFX_BREAKLINE_H_ +#ifndef XFA_FGAS_LAYOUT_CFGAS_BREAKLINE_H_ +#define XFA_FGAS_LAYOUT_CFGAS_BREAKLINE_H_ #include <vector> +#include "xfa/fgas/layout/cfgas_breakpiece.h" #include "xfa/fgas/layout/cfgas_char.h" -#include "xfa/fgas/layout/cfx_breakpiece.h" -class CFX_BreakLine { +class CFGAS_BreakLine { public: - CFX_BreakLine(); - ~CFX_BreakLine(); + CFGAS_BreakLine(); + ~CFGAS_BreakLine(); CFGAS_Char* GetChar(int32_t index); int32_t GetLineEnd() const; @@ -27,7 +27,7 @@ bool HasArabicChar() const { return m_iArabicChars > 0; } std::vector<CFGAS_Char> m_LineChars; - std::vector<CFX_BreakPiece> m_LinePieces; + std::vector<CFGAS_BreakPiece> m_LinePieces; int32_t m_iStart = 0; int32_t m_iWidth = 0; @@ -35,4 +35,4 @@ int32_t m_iArabicChars = 0; }; -#endif // XFA_FGAS_LAYOUT_CFX_BREAKLINE_H_ +#endif // XFA_FGAS_LAYOUT_CFGAS_BREAKLINE_H_
diff --git a/xfa/fgas/layout/cfx_breakpiece.cpp b/xfa/fgas/layout/cfgas_breakpiece.cpp similarity index 67% rename from xfa/fgas/layout/cfx_breakpiece.cpp rename to xfa/fgas/layout/cfgas_breakpiece.cpp index a74c2e5..b5917bc 100644 --- a/xfa/fgas/layout/cfx_breakpiece.cpp +++ b/xfa/fgas/layout/cfgas_breakpiece.cpp
@@ -4,29 +4,29 @@ // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com -#include "xfa/fgas/layout/cfx_breakpiece.h" +#include "xfa/fgas/layout/cfgas_breakpiece.h" #include "third_party/base/check.h" #include "xfa/fgas/layout/cfx_textuserdata.h" -CFX_BreakPiece::CFX_BreakPiece() = default; +CFGAS_BreakPiece::CFGAS_BreakPiece() = default; -CFX_BreakPiece::CFX_BreakPiece(const CFX_BreakPiece& other) = default; +CFGAS_BreakPiece::CFGAS_BreakPiece(const CFGAS_BreakPiece& other) = default; -CFX_BreakPiece::~CFX_BreakPiece() = default; +CFGAS_BreakPiece::~CFGAS_BreakPiece() = default; -int32_t CFX_BreakPiece::GetEndPos() const { +int32_t CFGAS_BreakPiece::GetEndPos() const { return m_iWidth < 0 ? m_iStartPos : m_iStartPos + m_iWidth; } -CFGAS_Char* CFX_BreakPiece::GetChar(int32_t index) const { +CFGAS_Char* CFGAS_BreakPiece::GetChar(int32_t index) const { DCHECK(index >= 0); DCHECK(index < m_iCharCount); DCHECK(m_pChars); return &(*m_pChars)[m_iStartChar + index]; } -WideString CFX_BreakPiece::GetString() const { +WideString CFGAS_BreakPiece::GetString() const { WideString ret; ret.Reserve(m_iCharCount); for (int32_t i = m_iStartChar; i < m_iStartChar + m_iCharCount; i++) @@ -34,7 +34,7 @@ return ret; } -std::vector<int32_t> CFX_BreakPiece::GetWidths() const { +std::vector<int32_t> CFGAS_BreakPiece::GetWidths() const { std::vector<int32_t> ret; ret.reserve(m_iCharCount); for (int32_t i = m_iStartChar; i < m_iStartChar + m_iCharCount; i++)
diff --git a/xfa/fgas/layout/cfx_breakpiece.h b/xfa/fgas/layout/cfgas_breakpiece.h similarity index 81% rename from xfa/fgas/layout/cfx_breakpiece.h rename to xfa/fgas/layout/cfgas_breakpiece.h index 6dabc46..fd88b1b 100644 --- a/xfa/fgas/layout/cfx_breakpiece.h +++ b/xfa/fgas/layout/cfgas_breakpiece.h
@@ -4,8 +4,8 @@ // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com -#ifndef XFA_FGAS_LAYOUT_CFX_BREAKPIECE_H_ -#define XFA_FGAS_LAYOUT_CFX_BREAKPIECE_H_ +#ifndef XFA_FGAS_LAYOUT_CFGAS_BREAKPIECE_H_ +#define XFA_FGAS_LAYOUT_CFGAS_BREAKPIECE_H_ #include <vector> @@ -16,11 +16,11 @@ class CFX_TextUserData; -class CFX_BreakPiece { +class CFGAS_BreakPiece { public: - CFX_BreakPiece(); - CFX_BreakPiece(const CFX_BreakPiece& other); - ~CFX_BreakPiece(); + CFGAS_BreakPiece(); + CFGAS_BreakPiece(const CFGAS_BreakPiece& other); + ~CFGAS_BreakPiece(); int32_t GetEndPos() const; int32_t GetLength() const { return m_iCharCount; } @@ -45,4 +45,4 @@ RetainPtr<CFX_TextUserData> m_pUserData; }; -#endif // XFA_FGAS_LAYOUT_CFX_BREAKPIECE_H_ +#endif // XFA_FGAS_LAYOUT_CFGAS_BREAKPIECE_H_
diff --git a/xfa/fgas/layout/cfgas_rtfbreak.cpp b/xfa/fgas/layout/cfgas_rtfbreak.cpp index 8a48ab4..f208a57 100644 --- a/xfa/fgas/layout/cfgas_rtfbreak.cpp +++ b/xfa/fgas/layout/cfgas_rtfbreak.cpp
@@ -18,7 +18,7 @@ #include "third_party/base/stl_util.h" #include "xfa/fgas/font/cfgas_gefont.h" #include "xfa/fgas/layout/cfgas_char.h" -#include "xfa/fgas/layout/cfx_textpiece.h" +#include "xfa/fgas/layout/cfgas_textpiece.h" #include "xfa/fgas/layout/cfx_textuserdata.h" #include "xfa/fgas/layout/fx_arabic.h" #include "xfa/fgas/layout/fx_linebreak.h" @@ -329,7 +329,7 @@ return dwStatus; m_iReadyLineIndex = m_pCurLine == &m_Lines[0] ? 0 : 1; - CFX_BreakLine* pNextLine = &m_Lines[1 - m_iReadyLineIndex]; + CFGAS_BreakLine* pNextLine = &m_Lines[1 - m_iReadyLineIndex]; bool bAllChars = m_iAlignment == CFX_RTFLineAlignment::Justified || m_iAlignment == CFX_RTFLineAlignment::Distributed; @@ -347,7 +347,7 @@ return dwStatus; } -bool CFGAS_RTFBreak::EndBreak_SplitLine(CFX_BreakLine* pNextLine, +bool CFGAS_RTFBreak::EndBreak_SplitLine(CFGAS_BreakLine* pNextLine, bool bAllChars, CFGAS_Char::BreakType dwStatus) { bool bDone = false; @@ -375,7 +375,7 @@ } const CFGAS_Char* pCurChars = m_pCurLine->m_LineChars.data(); - CFX_BreakPiece tp; + CFGAS_BreakPiece tp; tp.m_pChars = &m_pCurLine->m_LineChars; bool bNew = true; uint32_t dwIdentity = static_cast<uint32_t>(-1); @@ -441,7 +441,7 @@ } } - CFX_BreakPiece tp; + CFGAS_BreakPiece tp; tp.m_dwStatus = CFGAS_Char::BreakType::kPiece; tp.m_iStartPos = m_pCurLine->m_iStart; tp.m_pChars = &chars; @@ -501,7 +501,7 @@ std::sort(tpos->begin(), tpos->end()); int32_t iStartPos = m_pCurLine->m_iStart; for (const auto& it : *tpos) { - CFX_BreakPiece& ttp = m_pCurLine->m_LinePieces[it.index]; + CFGAS_BreakPiece& ttp = m_pCurLine->m_LinePieces[it.index]; ttp.m_iStartPos = iStartPos; iStartPos += ttp.m_iWidth; } @@ -514,7 +514,7 @@ int32_t iGapChars = 0; bool bFind = false; for (const FX_TPO& pos : pdfium::base::Reversed(tpos)) { - const CFX_BreakPiece& ttp = m_pCurLine->m_LinePieces[pos.index]; + const CFGAS_BreakPiece& ttp = m_pCurLine->m_LinePieces[pos.index]; if (!bFind) iNetWidth = ttp.GetEndPos(); @@ -552,7 +552,7 @@ dwStatus != CFGAS_Char::BreakType::kParagraph))) { int32_t iStart = -1; for (const auto& tpo : tpos) { - CFX_BreakPiece& ttp = m_pCurLine->m_LinePieces[tpo.index]; + CFGAS_BreakPiece& ttp = m_pCurLine->m_LinePieces[tpo.index]; if (iStart < 0) iStart = ttp.m_iStartPos; else @@ -680,8 +680,8 @@ return 0; } -void CFGAS_RTFBreak::SplitTextLine(CFX_BreakLine* pCurLine, - CFX_BreakLine* pNextLine, +void CFGAS_RTFBreak::SplitTextLine(CFGAS_BreakLine* pCurLine, + CFGAS_BreakLine* pNextLine, bool bAllChars) { DCHECK(pCurLine); DCHECK(pNextLine); @@ -719,7 +719,7 @@ } } -size_t CFGAS_RTFBreak::GetDisplayPos(const CFX_TextPiece* pPiece, +size_t CFGAS_RTFBreak::GetDisplayPos(const CFGAS_TextPiece* pPiece, std::vector<TextCharPos>* pCharPos) const { if (pPiece->iChars == 0 || !pPiece->pFont) return 0;
diff --git a/xfa/fgas/layout/cfgas_rtfbreak.h b/xfa/fgas/layout/cfgas_rtfbreak.h index 685e167..be10d0c 100644 --- a/xfa/fgas/layout/cfgas_rtfbreak.h +++ b/xfa/fgas/layout/cfgas_rtfbreak.h
@@ -15,8 +15,8 @@ #include "core/fxcrt/retain_ptr.h" #include "xfa/fgas/layout/cfgas_break.h" +class CFGAS_TextPiece; class CFX_TextUserData; -class CFX_TextPiece; class TextCharPos; enum class CFX_RTFLineAlignment { @@ -41,7 +41,7 @@ CFGAS_Char::BreakType EndBreak(CFGAS_Char::BreakType dwStatus); - size_t GetDisplayPos(const CFX_TextPiece* pPiece, + size_t GetDisplayPos(const CFGAS_TextPiece* pPiece, std::vector<TextCharPos>* pCharPos) const; CFGAS_Char::BreakType AppendChar(wchar_t wch); @@ -58,10 +58,10 @@ bool bAllChars, bool bOnlyBrk, int32_t* pEndPos); - void SplitTextLine(CFX_BreakLine* pCurLine, - CFX_BreakLine* pNextLine, + void SplitTextLine(CFGAS_BreakLine* pCurLine, + CFGAS_BreakLine* pNextLine, bool bAllChars); - bool EndBreak_SplitLine(CFX_BreakLine* pNextLine, + bool EndBreak_SplitLine(CFGAS_BreakLine* pNextLine, bool bAllChars, CFGAS_Char::BreakType dwStatus); void EndBreak_BidiLine(std::deque<FX_TPO>* tpos,
diff --git a/xfa/fgas/layout/cfx_textpiece.cpp b/xfa/fgas/layout/cfgas_textpiece.cpp similarity index 67% rename from xfa/fgas/layout/cfx_textpiece.cpp rename to xfa/fgas/layout/cfgas_textpiece.cpp index 06f6cd6..55f9992 100644 --- a/xfa/fgas/layout/cfx_textpiece.cpp +++ b/xfa/fgas/layout/cfgas_textpiece.cpp
@@ -4,10 +4,10 @@ // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com -#include "xfa/fgas/layout/cfx_textpiece.h" +#include "xfa/fgas/layout/cfgas_textpiece.h" #include "xfa/fgas/font/cfgas_gefont.h" -CFX_TextPiece::CFX_TextPiece() = default; +CFGAS_TextPiece::CFGAS_TextPiece() = default; -CFX_TextPiece::~CFX_TextPiece() = default; +CFGAS_TextPiece::~CFGAS_TextPiece() = default;
diff --git a/xfa/fgas/layout/cfx_textpiece.h b/xfa/fgas/layout/cfgas_textpiece.h similarity index 75% rename from xfa/fgas/layout/cfx_textpiece.h rename to xfa/fgas/layout/cfgas_textpiece.h index 409d200..4eca7f7 100644 --- a/xfa/fgas/layout/cfx_textpiece.h +++ b/xfa/fgas/layout/cfgas_textpiece.h
@@ -4,8 +4,8 @@ // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com -#ifndef XFA_FGAS_LAYOUT_CFX_TEXTPIECE_H_ -#define XFA_FGAS_LAYOUT_CFX_TEXTPIECE_H_ +#ifndef XFA_FGAS_LAYOUT_CFGAS_TEXTPIECE_H_ +#define XFA_FGAS_LAYOUT_CFGAS_TEXTPIECE_H_ #include <vector> @@ -15,10 +15,10 @@ class CFGAS_GEFont; -class CFX_TextPiece { +class CFGAS_TextPiece { public: - CFX_TextPiece(); - ~CFX_TextPiece(); + CFGAS_TextPiece(); + ~CFGAS_TextPiece(); WideString szText; std::vector<int32_t> Widths; @@ -31,4 +31,4 @@ RetainPtr<CFGAS_GEFont> pFont; }; -#endif // XFA_FGAS_LAYOUT_CFX_TEXTPIECE_H_ +#endif // XFA_FGAS_LAYOUT_CFGAS_TEXTPIECE_H_
diff --git a/xfa/fgas/layout/cfgas_txtbreak.cpp b/xfa/fgas/layout/cfgas_txtbreak.cpp index db04859..5462784 100644 --- a/xfa/fgas/layout/cfgas_txtbreak.cpp +++ b/xfa/fgas/layout/cfgas_txtbreak.cpp
@@ -287,7 +287,7 @@ return std::max(dwRet1, dwRet2); } -void CFGAS_TxtBreak::EndBreak_SplitLine(CFX_BreakLine* pNextLine, +void CFGAS_TxtBreak::EndBreak_SplitLine(CFGAS_BreakLine* pNextLine, bool bAllChars) { bool bDone = false; CFGAS_Char* pTC; @@ -312,7 +312,7 @@ void CFGAS_TxtBreak::EndBreak_BidiLine(std::deque<FX_TPO>* tpos, CFGAS_Char::BreakType dwStatus) { - CFX_BreakPiece tp; + CFGAS_BreakPiece tp; FX_TPO tpo; CFGAS_Char* pTC; std::vector<CFGAS_Char>& chars = m_pCurLine->m_LineChars; @@ -403,7 +403,7 @@ int32_t iStartPos = 0; for (i = 0; i <= j; i++) { tpo = (*tpos)[i]; - CFX_BreakPiece& ttp = m_pCurLine->m_LinePieces[tpo.index]; + CFGAS_BreakPiece& ttp = m_pCurLine->m_LinePieces[tpo.index]; ttp.m_iStartPos = iStartPos; iStartPos += ttp.m_iWidth; } @@ -419,7 +419,7 @@ int32_t iGapChars = 0; bool bFind = false; for (const FX_TPO& pos : pdfium::base::Reversed(tpos)) { - const CFX_BreakPiece& ttp = m_pCurLine->m_LinePieces[pos.index]; + const CFGAS_BreakPiece& ttp = m_pCurLine->m_LinePieces[pos.index]; if (!bFind) iNetWidth = ttp.GetEndPos(); @@ -452,7 +452,7 @@ dwStatus != CFGAS_Char::BreakType::kParagraph) { int32_t iStart = -1; for (auto& tpo : tpos) { - CFX_BreakPiece& ttp = m_pCurLine->m_LinePieces[tpo.index]; + CFGAS_BreakPiece& ttp = m_pCurLine->m_LinePieces[tpo.index]; if (iStart < -1) iStart = ttp.m_iStartPos; else @@ -511,7 +511,7 @@ return dwStatus; m_iReadyLineIndex = m_pCurLine == &m_Lines[0] ? 0 : 1; - CFX_BreakLine* pNextLine = &m_Lines[1 - m_iReadyLineIndex]; + CFGAS_BreakLine* pNextLine = &m_Lines[1 - m_iReadyLineIndex]; bool bAllChars = m_iAlignment > CFX_TxtLineAlignment_Right; EndBreak_SplitLine(pNextLine, bAllChars); @@ -612,8 +612,8 @@ return 0; } -void CFGAS_TxtBreak::SplitTextLine(CFX_BreakLine* pCurLine, - CFX_BreakLine* pNextLine, +void CFGAS_TxtBreak::SplitTextLine(CFGAS_BreakLine* pCurLine, + CFGAS_BreakLine* pNextLine, bool bAllChars) { DCHECK(pCurLine); DCHECK(pNextLine);
diff --git a/xfa/fgas/layout/cfgas_txtbreak.h b/xfa/fgas/layout/cfgas_txtbreak.h index 1d410d6..d6fd1a7 100644 --- a/xfa/fgas/layout/cfgas_txtbreak.h +++ b/xfa/fgas/layout/cfgas_txtbreak.h
@@ -83,7 +83,7 @@ CFGAS_Char::BreakType AppendChar_Others(CFGAS_Char* pCurChar); void ResetContextCharStyles(); - void EndBreak_SplitLine(CFX_BreakLine* pNextLine, bool bAllChars); + void EndBreak_SplitLine(CFGAS_BreakLine* pNextLine, bool bAllChars); void EndBreak_BidiLine(std::deque<FX_TPO>* tpos, CFGAS_Char::BreakType dwStatus); void EndBreak_Alignment(const std::deque<FX_TPO>& tpos, @@ -93,8 +93,8 @@ bool bAllChars, bool bOnlyBrk, int32_t* pEndPos); - void SplitTextLine(CFX_BreakLine* pCurLine, - CFX_BreakLine* pNextLine, + void SplitTextLine(CFGAS_BreakLine* pCurLine, + CFGAS_BreakLine* pNextLine, bool bAllChars); int32_t m_iAlignment;
diff --git a/xfa/fxfa/cxfa_textlayout.cpp b/xfa/fxfa/cxfa_textlayout.cpp index d60a780..e4c3f52 100644 --- a/xfa/fxfa/cxfa_textlayout.cpp +++ b/xfa/fxfa/cxfa_textlayout.cpp
@@ -1027,7 +1027,7 @@ float fLineStep = 0, fBaseLine = 0; int32_t i = 0; for (i = 0; i < iPieces; i++) { - const CFX_BreakPiece* pPiece = m_pBreak->GetBreakPieceUnstable(i); + const CFGAS_BreakPiece* pPiece = m_pBreak->GetBreakPieceUnstable(i); CFX_TextUserData* pUserData = pPiece->m_pUserData.Get(); if (pUserData) pStyle = pUserData->m_pStyle; @@ -1082,7 +1082,7 @@ float fLineStep = 0; float fLineWidth = 0; for (int32_t i = 0; i < iPieces; i++) { - const CFX_BreakPiece* pPiece = m_pBreak->GetBreakPieceUnstable(i); + const CFGAS_BreakPiece* pPiece = m_pBreak->GetBreakPieceUnstable(i); CFX_TextUserData* pUserData = pPiece->m_pUserData.Get(); if (pUserData) pStyle = pUserData->m_pStyle;
diff --git a/xfa/fxfa/cxfa_textlayout.h b/xfa/fxfa/cxfa_textlayout.h index 58c8caa..0682a21 100644 --- a/xfa/fxfa/cxfa_textlayout.h +++ b/xfa/fxfa/cxfa_textlayout.h
@@ -21,7 +21,7 @@ #include "v8/include/cppgc/member.h" #include "v8/include/cppgc/visitor.h" #include "xfa/fgas/layout/cfgas_char.h" -#include "xfa/fgas/layout/cfx_textpiece.h" +#include "xfa/fgas/layout/cfgas_textpiece.h" #include "xfa/fxfa/fxfa_basic.h" class CFX_CSSComputedStyle; @@ -65,7 +65,7 @@ const wchar_t* GetLinkURLAtPoint(const CFX_PointF& point); private: - class TextPiece : public CFX_TextPiece { + class TextPiece : public CFGAS_TextPiece { public: TextPiece(); ~TextPiece();