diff options
-rw-r--r-- | core/fxcrt/fx_ucd.h | 4 | ||||
-rw-r--r-- | xfa/fgas/layout/fgas_textbreak.cpp | 24 | ||||
-rw-r--r-- | xfa/fgas/layout/fgas_textbreak.h | 4 |
3 files changed, 3 insertions, 29 deletions
diff --git a/core/fxcrt/fx_ucd.h b/core/fxcrt/fx_ucd.h index 0fc0bb32eb..ebcf6bbf2b 100644 --- a/core/fxcrt/fx_ucd.h +++ b/core/fxcrt/fx_ucd.h @@ -159,8 +159,7 @@ class CFX_TxtChar : public CFX_Char { m_iBidiClass(0), m_iBidiLevel(0), m_iBidiPos(0), - m_iBidiOrder(0), - m_pUserData(nullptr) {} + m_iBidiOrder(0) {} int8_t m_nRotation; uint32_t m_dwCharStyles; @@ -168,7 +167,6 @@ class CFX_TxtChar : public CFX_Char { int16_t m_iBidiLevel; int16_t m_iBidiPos; int16_t m_iBidiOrder; - void* m_pUserData; }; class CFX_RTFChar : public CFX_Char { 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; |