summaryrefslogtreecommitdiff
path: root/xfa/fde
diff options
context:
space:
mode:
Diffstat (limited to 'xfa/fde')
-rw-r--r--xfa/fde/cfde_txtedtengine.cpp36
-rw-r--r--xfa/fde/tto/fde_textout.cpp6
2 files changed, 20 insertions, 22 deletions
diff --git a/xfa/fde/cfde_txtedtengine.cpp b/xfa/fde/cfde_txtedtengine.cpp
index fbc5e159ed..9d9fed5ab1 100644
--- a/xfa/fde/cfde_txtedtengine.cpp
+++ b/xfa/fde/cfde_txtedtengine.cpp
@@ -1001,20 +1001,19 @@ void CFDE_TxtEdtEngine::UpdatePages() {
void CFDE_TxtEdtEngine::UpdateTxtBreak() {
uint32_t dwStyle = m_pTextBreak->GetLayoutStyles();
- if (m_Param.dwMode & FDE_TEXTEDITMODE_MultiLines) {
+ if (m_Param.dwMode & FDE_TEXTEDITMODE_MultiLines)
dwStyle &= ~FX_TXTLAYOUTSTYLE_SingleLine;
- } else {
+ else
dwStyle |= FX_TXTLAYOUTSTYLE_SingleLine;
- }
+
dwStyle &= ~FX_TXTLAYOUTSTYLE_VerticalLayout;
dwStyle &= ~FX_TXTLAYOUTSTYLE_ReverseLine;
dwStyle &= ~FX_TXTLAYOUTSTYLE_RTLReadingOrder;
- if (m_Param.dwLayoutStyles & FDE_TEXTEDITLAYOUT_CombText) {
+ if (m_Param.dwLayoutStyles & FDE_TEXTEDITLAYOUT_CombText)
dwStyle |= FX_TXTLAYOUTSTYLE_CombText;
- } else {
+ else
dwStyle &= ~FX_TXTLAYOUTSTYLE_CombText;
- }
dwStyle &= ~FX_TXTLAYOUTSTYLE_VerticalChars;
dwStyle &= ~FX_TXTLAYOUTSTYLE_ExpandTab;
@@ -1023,28 +1022,27 @@ void CFDE_TxtEdtEngine::UpdateTxtBreak() {
m_pTextBreak->SetLayoutStyles(dwStyle);
uint32_t dwAligment = 0;
- if (m_Param.dwAlignment & FDE_TEXTEDITALIGN_Justified) {
- dwAligment |= FX_TXTLINEALIGNMENT_Justified;
- }
- if (m_Param.dwAlignment & FDE_TEXTEDITALIGN_Center) {
- dwAligment |= FX_TXTLINEALIGNMENT_Center;
- } else if (m_Param.dwAlignment & FDE_TEXTEDITALIGN_Right) {
- dwAligment |= FX_TXTLINEALIGNMENT_Right;
- }
+ if (m_Param.dwAlignment & FDE_TEXTEDITALIGN_Justified)
+ dwAligment |= CFX_TxtLineAlignment_Justified;
+
+ if (m_Param.dwAlignment & FDE_TEXTEDITALIGN_Center)
+ dwAligment |= CFX_TxtLineAlignment_Center;
+ else if (m_Param.dwAlignment & FDE_TEXTEDITALIGN_Right)
+ dwAligment |= CFX_TxtLineAlignment_Right;
+
m_pTextBreak->SetAlignment(dwAligment);
- if (m_Param.dwMode & FDE_TEXTEDITMODE_AutoLineWrap) {
+ if (m_Param.dwMode & FDE_TEXTEDITMODE_AutoLineWrap)
m_pTextBreak->SetLineWidth(m_Param.fPlateWidth);
- } else {
+ else
m_pTextBreak->SetLineWidth(kPageWidthMax);
- }
m_nPageLineCount = m_Param.nLineCount;
if (m_Param.dwLayoutStyles & FDE_TEXTEDITLAYOUT_CombText) {
FX_FLOAT fCombWidth = m_Param.fPlateWidth;
- if (m_nLimit > 0) {
+ if (m_nLimit > 0)
fCombWidth /= m_nLimit;
- }
+
m_pTextBreak->SetCombWidth(fCombWidth);
}
m_pTextBreak->SetFont(m_Param.pFont);
diff --git a/xfa/fde/tto/fde_textout.cpp b/xfa/fde/tto/fde_textout.cpp
index 93be50d34a..0a92bd53d7 100644
--- a/xfa/fde/tto/fde_textout.cpp
+++ b/xfa/fde/tto/fde_textout.cpp
@@ -107,15 +107,15 @@ void CFDE_TextOut::SetAlignment(int32_t iAlignment) {
case FDE_TTOALIGNMENT_TopCenter:
case FDE_TTOALIGNMENT_Center:
case FDE_TTOALIGNMENT_BottomCenter:
- m_iTxtBkAlignment = FX_TXTLINEALIGNMENT_Center;
+ m_iTxtBkAlignment = CFX_TxtLineAlignment_Center;
break;
case FDE_TTOALIGNMENT_TopRight:
case FDE_TTOALIGNMENT_CenterRight:
case FDE_TTOALIGNMENT_BottomRight:
- m_iTxtBkAlignment = FX_TXTLINEALIGNMENT_Right;
+ m_iTxtBkAlignment = CFX_TxtLineAlignment_Right;
break;
default:
- m_iTxtBkAlignment = FX_TXTLINEALIGNMENT_Left;
+ m_iTxtBkAlignment = CFX_TxtLineAlignment_Left;
break;
}
m_pTxtBreak->SetAlignment(m_iTxtBkAlignment);