summaryrefslogtreecommitdiff
path: root/xfa/fgas/layout
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-03-09 16:58:55 -0500
committerChromium commit bot <commit-bot@chromium.org>2017-03-13 14:23:32 +0000
commit1c97fd137e03a22c69be6d0162197e2add6b81e0 (patch)
treee9e49e36fde5288b5b1bba0f554ea6c931f5cd87 /xfa/fgas/layout
parentc36fe07a4d800cab2bfbec95e8580ea2b0e406d2 (diff)
downloadpdfium-1c97fd137e03a22c69be6d0162197e2add6b81e0.tar.xz
Remove unused TextBreak methods
This Cl removes some CFX_TxtBreak methods which aren't called. Change-Id: Ic66a89fa9c99aefb78d8314e1a3ebee089ef83cf Reviewed-on: https://pdfium-review.googlesource.com/2940 Reviewed-by: Tom Sepez <tsepez@chromium.org> Reviewed-by: Nicolás Peña <npm@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'xfa/fgas/layout')
-rw-r--r--xfa/fgas/layout/fgas_textbreak.cpp24
-rw-r--r--xfa/fgas/layout/fgas_textbreak.h4
2 files changed, 2 insertions, 26 deletions
diff --git a/xfa/fgas/layout/fgas_textbreak.cpp b/xfa/fgas/layout/fgas_textbreak.cpp
index 832521dbee..4989a26e23 100644
--- a/xfa/fgas/layout/fgas_textbreak.cpp
+++ b/xfa/fgas/layout/fgas_textbreak.cpp
@@ -63,7 +63,6 @@ CFX_TxtBreak::CFX_TxtBreak()
m_iAlignment(FX_TXTLINEALIGNMENT_Left),
m_dwContextCharStyles(0),
m_iCombWidth(360000),
- m_pUserData(nullptr),
m_eCharType(FX_CHARTYPE_Unknown),
m_bArabicNumber(false),
m_bArabicComma(false),
@@ -85,13 +84,6 @@ void CFX_TxtBreak::SetLineWidth(FX_FLOAT fLineWidth) {
ASSERT(m_iLineWidth >= 20000);
}
-void CFX_TxtBreak::SetLinePos(FX_FLOAT fLinePos) {
- int32_t iLinePos =
- std::min(std::max(FXSYS_round(fLinePos * 20000.0f), 0), m_iLineWidth);
- m_pCurLine->m_iStart = iLinePos;
- m_pCurLine->m_iWidth += iLinePos;
-}
-
void CFX_TxtBreak::SetLayoutStyles(uint32_t dwLayoutStyles) {
m_dwLayoutStyles = dwLayoutStyles;
m_bVertical = (m_dwLayoutStyles & FX_TXTLAYOUTSTYLE_VerticalChars) != 0;
@@ -199,14 +191,6 @@ void CFX_TxtBreak::SetCombWidth(FX_FLOAT fCombWidth) {
m_iCombWidth = FXSYS_round(fCombWidth * 20000.0f);
}
-void CFX_TxtBreak::SetUserData(void* pUserData) {
- if (m_pUserData == pUserData)
- return;
-
- SetBreakStatus();
- m_pUserData = pUserData;
-}
-
void CFX_TxtBreak::SetBreakStatus() {
int32_t iCount = m_pCurLine->CountChars();
if (iCount < 1)
@@ -295,7 +279,6 @@ void CFX_TxtBreak::ResetArabicContext() {
void CFX_TxtBreak::AppendChar_PageLoad(CFX_TxtChar* pCurChar,
uint32_t dwProps) {
pCurChar->m_dwStatus = CFX_BreakType::None;
- pCurChar->m_pUserData = m_pUserData;
if (m_bArabicContext || m_bArabicShapes) {
int32_t iBidiCls = (dwProps & FX_BIDICLASSBITSMASK) >> FX_BIDICLASSBITS;
@@ -547,7 +530,7 @@ CFX_BreakType CFX_TxtBreak::AppendChar(FX_WCHAR wch) {
pCurChar->m_iBidiLevel = 0;
pCurChar->m_iBidiPos = 0;
pCurChar->m_iBidiOrder = 0;
- pCurChar->m_pUserData = nullptr;
+
AppendChar_PageLoad(pCurChar, dwProps);
CFX_BreakType dwRet1 = CFX_BreakType::None;
if (chartype != FX_CHARTYPE_Combination &&
@@ -693,7 +676,6 @@ void CFX_TxtBreak::EndBreak_BidiLine(std::deque<FX_TPO>* tpos,
tp.m_iBidiLevel = iBidiLevel;
tp.m_iBidiPos = pTC->m_iBidiOrder;
tp.m_dwCharStyles = pTC->m_dwCharStyles;
- tp.m_pUserData = pTC->m_pUserData;
tp.m_iHorizontalScale = pTC->m_iHorizontalScale;
tp.m_iVerticalScale = pTC->m_iVerticalScale;
tp.m_dwStatus = CFX_BreakType::Piece;
@@ -753,7 +735,6 @@ void CFX_TxtBreak::EndBreak_BidiLine(std::deque<FX_TPO>* tpos,
tp.m_iStartChar = 0;
tp.m_iChars = iCount;
tp.m_pChars = &m_pCurLine->m_LineChars;
- tp.m_pUserData = m_pUserData;
pTC = &chars[0];
tp.m_dwCharStyles = pTC->m_dwCharStyles;
tp.m_iHorizontalScale = pTC->m_iHorizontalScale;
@@ -1597,8 +1578,7 @@ CFX_TxtPiece::CFX_TxtPiece()
m_iHorizontalScale(100),
m_iVerticalScale(100),
m_dwCharStyles(0),
- m_pChars(nullptr),
- m_pUserData(nullptr) {}
+ m_pChars(nullptr) {}
CFX_TxtLine::CFX_TxtLine()
: m_LinePieces(16), m_iStart(0), m_iWidth(0), m_iArabicChars(0) {}
diff --git a/xfa/fgas/layout/fgas_textbreak.h b/xfa/fgas/layout/fgas_textbreak.h
index 75be69b520..e9c37ee5d9 100644
--- a/xfa/fgas/layout/fgas_textbreak.h
+++ b/xfa/fgas/layout/fgas_textbreak.h
@@ -145,7 +145,6 @@ class CFX_TxtPiece {
int32_t m_iVerticalScale;
uint32_t m_dwCharStyles;
std::vector<CFX_TxtChar>* m_pChars;
- void* m_pUserData;
};
typedef CFX_BaseArrayTemplate<CFX_TxtPiece> CFX_TxtPieceArray;
@@ -203,7 +202,6 @@ class CFX_TxtBreak {
~CFX_TxtBreak();
void SetLineWidth(FX_FLOAT fLineWidth);
- void SetLinePos(FX_FLOAT fLinePos);
uint32_t GetLayoutStyles() const { return m_dwLayoutStyles; }
void SetLayoutStyles(uint32_t dwLayoutStyles);
void SetFont(const CFX_RetainPtr<CFGAS_GEFont>& pFont);
@@ -217,7 +215,6 @@ class CFX_TxtBreak {
void SetCharSpace(FX_FLOAT fCharSpace);
void SetAlignment(int32_t iAlignment);
void SetCombWidth(FX_FLOAT fCombWidth);
- void SetUserData(void* pUserData);
CFX_BreakType EndBreak(CFX_BreakType dwStatus);
int32_t CountBreakPieces() const;
const CFX_TxtPiece* GetBreakPiece(int32_t index) const;
@@ -285,7 +282,6 @@ class CFX_TxtBreak {
int32_t m_iAlignment;
uint32_t m_dwContextCharStyles;
int32_t m_iCombWidth;
- void* m_pUserData;
FX_CHARTYPE m_eCharType;
bool m_bCurRTL;
int32_t m_iCurAlignment;