summaryrefslogtreecommitdiff
path: root/xfa/fde/cfde_txtedtengine.cpp
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-03-16 11:47:20 -0400
committerChromium commit bot <commit-bot@chromium.org>2017-03-16 18:21:03 +0000
commite533b93601c7e9eb328619681a78c188d1a89191 (patch)
tree0e3741cec1296a39e478c67eeac3ecc9c000fc24 /xfa/fde/cfde_txtedtengine.cpp
parentc9819a972830e9d1210d9d8f5c81d9f03f7c90a9 (diff)
downloadpdfium-e533b93601c7e9eb328619681a78c188d1a89191.tar.xz
Create common base class for TxtBreak and RTFBreak.
This CL starts extracting common members between the two break classes into a common base class. This also normalizes some of the member names to be the same across classes. Change-Id: I7f4e5065f2dac79eb4ebba397458236cc0609d38 Reviewed-on: https://pdfium-review.googlesource.com/3058 Reviewed-by: Nicolás Peña <npm@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'xfa/fde/cfde_txtedtengine.cpp')
-rw-r--r--xfa/fde/cfde_txtedtengine.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/xfa/fde/cfde_txtedtengine.cpp b/xfa/fde/cfde_txtedtengine.cpp
index 380948e899..7c2ba5c50f 100644
--- a/xfa/fde/cfde_txtedtengine.cpp
+++ b/xfa/fde/cfde_txtedtengine.cpp
@@ -37,7 +37,6 @@ FDE_TXTEDTPARAMS::FDE_TXTEDTPARAMS()
dwFontColor(0xff000000),
fLineSpace(10.0f),
fTabWidth(36),
- bTabEquidistant(false),
wDefChar(0xFEFF),
wLineBreakChar('\n'),
nLineEnd(0),
@@ -1001,14 +1000,14 @@ void CFDE_TxtEdtEngine::UpdatePages() {
void CFDE_TxtEdtEngine::UpdateTxtBreak() {
uint32_t dwStyle = m_pTextBreak->GetLayoutStyles();
if (m_Param.dwMode & FDE_TEXTEDITMODE_MultiLines)
- dwStyle &= ~FX_TXTLAYOUTSTYLE_SingleLine;
+ dwStyle &= ~FX_LAYOUTSTYLE_SingleLine;
else
- dwStyle |= FX_TXTLAYOUTSTYLE_SingleLine;
+ dwStyle |= FX_LAYOUTSTYLE_SingleLine;
if (m_Param.dwLayoutStyles & FDE_TEXTEDITLAYOUT_CombText)
- dwStyle |= FX_TXTLAYOUTSTYLE_CombText;
+ dwStyle |= FX_LAYOUTSTYLE_CombText;
else
- dwStyle &= ~FX_TXTLAYOUTSTYLE_CombText;
+ dwStyle &= ~FX_LAYOUTSTYLE_CombText;
m_pTextBreak->SetLayoutStyles(dwStyle);
uint32_t dwAligment = 0;
@@ -1037,7 +1036,7 @@ void CFDE_TxtEdtEngine::UpdateTxtBreak() {
}
m_pTextBreak->SetFont(m_Param.pFont);
m_pTextBreak->SetFontSize(m_Param.fFontSize);
- m_pTextBreak->SetTabWidth(m_Param.fTabWidth, m_Param.bTabEquidistant);
+ m_pTextBreak->SetTabWidth(m_Param.fTabWidth);
m_pTextBreak->SetDefaultChar(m_Param.wDefChar);
m_pTextBreak->SetParagraphBreakChar(m_Param.wLineBreakChar);
m_pTextBreak->SetLineBreakTolerance(m_Param.fFontSize * 0.2f);