From dff02cee2d2410d81a55c59345fb38b5aac8a457 Mon Sep 17 00:00:00 2001 From: Dan Sinclair Date: Mon, 14 Aug 2017 10:26:59 -0400 Subject: Cleanup FDE_TTO{STYLE|ALIGNMENT} defines. This CL replaceds FDE_TTOSTYLE defines with a FDE_TextStyle struct which is used to set the needed flags. The FDE_TTOALIGNMENT defines are replaced with an enum class and unused members have been removed. Change-Id: Ib0e2818a82e7f1961de57f8d15703477f8235a03 Reviewed-on: https://pdfium-review.googlesource.com/10530 Reviewed-by: Henrique Nakashima Reviewed-by: Tom Sepez Commit-Queue: dsinclair --- xfa/fwl/cfwl_listbox.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'xfa/fwl/cfwl_listbox.cpp') diff --git a/xfa/fwl/cfwl_listbox.cpp b/xfa/fwl/cfwl_listbox.cpp index ddad4038f5..d0455ff650 100644 --- a/xfa/fwl/cfwl_listbox.cpp +++ b/xfa/fwl/cfwl_listbox.cpp @@ -32,8 +32,7 @@ CFWL_ListBox::CFWL_ListBox(const CFWL_App* app, std::unique_ptr properties, CFWL_Widget* pOuter) : CFWL_Widget(app, std::move(properties), pOuter), - m_dwTTOStyles(0), - m_iTTOAligns(0), + m_iTTOAligns(FDE_TextAlignment::kTopLeft), m_hAnchor(nullptr), m_fScorllBarWidth(0), m_bLButtonDown(false), @@ -57,20 +56,20 @@ void CFWL_ListBox::Update() { switch (m_pProperties->m_dwStyleExes & FWL_STYLEEXT_LTB_AlignMask) { case FWL_STYLEEXT_LTB_LeftAlign: { - m_iTTOAligns = FDE_TTOALIGNMENT_CenterLeft; + m_iTTOAligns = FDE_TextAlignment::kCenterLeft; break; } case FWL_STYLEEXT_LTB_RightAlign: { - m_iTTOAligns = FDE_TTOALIGNMENT_CenterRight; + m_iTTOAligns = FDE_TextAlignment::kCenterRight; break; } case FWL_STYLEEXT_LTB_CenterAlign: default: { - m_iTTOAligns = FDE_TTOALIGNMENT_Center; + m_iTTOAligns = FDE_TextAlignment::kCenter; break; } } - m_dwTTOStyles |= FDE_TTOSTYLE_SingleLine; + m_dwTTOStyles.single_line_ = true; m_fScorllBarWidth = GetScrollWidth(); CalcSize(false); } -- cgit v1.2.3