summaryrefslogtreecommitdiff
path: root/xfa/fgas/layout/fgas_textbreak.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'xfa/fgas/layout/fgas_textbreak.cpp')
-rw-r--r--xfa/fgas/layout/fgas_textbreak.cpp38
1 files changed, 4 insertions, 34 deletions
diff --git a/xfa/fgas/layout/fgas_textbreak.cpp b/xfa/fgas/layout/fgas_textbreak.cpp
index ea07400c6d..fa38897eca 100644
--- a/xfa/fgas/layout/fgas_textbreak.cpp
+++ b/xfa/fgas/layout/fgas_textbreak.cpp
@@ -67,7 +67,6 @@ CFX_TxtBreak::CFX_TxtBreak(uint32_t dwPolicies)
m_iReady(0),
m_iTolerance(0),
m_iHorScale(100),
- m_iVerScale(100),
m_iCharSpace(0) {
m_bPagination = (m_dwPolicies & FX_TXTBREAKPOLICY_Pagination) != 0;
int32_t iSize = m_bPagination ? sizeof(CFX_Char) : sizeof(CFX_TxtChar);
@@ -207,19 +206,6 @@ void CFX_TxtBreak::ResetContextCharStyles() {
m_dwContextCharStyles |= (m_iArabicContext << 8);
}
-uint32_t CFX_TxtBreak::GetContextCharStyles() const {
- return m_dwContextCharStyles;
-}
-
-void CFX_TxtBreak::SetContextCharStyles(uint32_t dwCharStyles) {
- m_iCurAlignment = dwCharStyles & 0x0F;
- m_bArabicNumber = (dwCharStyles & FX_TXTCHARSTYLE_ArabicNumber) != 0;
- m_bArabicComma = (dwCharStyles & FX_TXTCHARSTYLE_ArabicComma) != 0;
- m_bCurRTL = (dwCharStyles & FX_TXTCHARSTYLE_RTLReadingOrder) != 0;
- m_iCurArabicContext = m_iArabicContext = ((dwCharStyles & 0x0300) >> 8);
- ResetContextCharStyles();
-}
-
void CFX_TxtBreak::SetCombWidth(FX_FLOAT fCombWidth) {
m_iCombWidth = FXSYS_round(fCombWidth * 20000.0f);
}
@@ -257,17 +243,6 @@ void CFX_TxtBreak::SetHorizontalScale(int32_t iScale) {
m_iHorScale = iScale;
}
-void CFX_TxtBreak::SetVerticalScale(int32_t iScale) {
- if (iScale < 0) {
- iScale = 0;
- }
- if (iScale == m_iHorScale) {
- return;
- }
- SetBreakStatus();
- m_iVerScale = iScale;
-}
-
void CFX_TxtBreak::SetCharSpace(FX_FLOAT fCharSpace) {
m_iCharSpace = FXSYS_round(fCharSpace * 20000.0f);
}
@@ -602,7 +577,7 @@ uint32_t CFX_TxtBreak::AppendChar(FX_WCHAR wch) {
pCurChar->m_dwCharStyles = 0;
pCurChar->m_iCharWidth = 0;
pCurChar->m_iHorizontalScale = m_iHorScale;
- pCurChar->m_iVertialScale = m_iVerScale;
+ pCurChar->m_iVerticalScale = 100;
pCurChar->m_dwStatus = 0;
pCurChar->m_iBidiClass = 0;
pCurChar->m_iBidiLevel = 0;
@@ -726,7 +701,7 @@ bool CFX_TxtBreak::EndBreak_SplitLine(CFX_TxtLine* pNextLine,
pTC = m_pCurLine->GetCharPtr(0);
tp.m_dwCharStyles = pTC->m_dwCharStyles;
tp.m_iHorizontalScale = pTC->m_iHorizontalScale;
- tp.m_iVerticalScale = pTC->m_iVertialScale;
+ tp.m_iVerticalScale = pTC->m_iVerticalScale;
pCurPieces->Add(tp);
m_pCurLine = pNextLine;
m_eCharType = FX_CHARTYPE_Unknown;
@@ -779,7 +754,7 @@ void CFX_TxtBreak::EndBreak_BidiLine(CFX_TPOArray& tpos, uint32_t dwStatus) {
tp.m_dwCharStyles = pTC->m_dwCharStyles;
tp.m_pUserData = pTC->m_pUserData;
tp.m_iHorizontalScale = pTC->m_iHorizontalScale;
- tp.m_iVerticalScale = pTC->m_iVertialScale;
+ tp.m_iVerticalScale = pTC->m_iVerticalScale;
tp.m_dwStatus = FX_TXTBREAK_PieceBreak;
}
if (iBidiLevel != pTC->m_iBidiLevel || pTC->m_dwStatus != 0) {
@@ -840,7 +815,7 @@ void CFX_TxtBreak::EndBreak_BidiLine(CFX_TPOArray& tpos, uint32_t dwStatus) {
pTC = &chars[0];
tp.m_dwCharStyles = pTC->m_dwCharStyles;
tp.m_iHorizontalScale = pTC->m_iHorizontalScale;
- tp.m_iVerticalScale = pTC->m_iVertialScale;
+ tp.m_iVerticalScale = pTC->m_iVerticalScale;
pCurPieces->Add(tp);
tpo.index = 0;
tpo.pos = 0;
@@ -1149,11 +1124,6 @@ void CFX_TxtBreak::SplitTextLine(CFX_TxtLine* pCurLine,
pNextLine->m_iWidth = iWidth;
}
-int32_t CFX_TxtBreak::CountBreakChars() const {
- CFX_TxtLine* pTxtLine = GetTxtLine(true);
- return pTxtLine ? pTxtLine->CountChars() : 0;
-}
-
int32_t CFX_TxtBreak::CountBreakPieces() const {
CFX_TxtPieceArray* pTxtPieces = GetTxtPieces(true);
return pTxtPieces ? pTxtPieces->GetSize() : 0;