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_checkbox.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'xfa/fwl/cfwl_checkbox.cpp') diff --git a/xfa/fwl/cfwl_checkbox.cpp b/xfa/fwl/cfwl_checkbox.cpp index eed201ba34..bc45e5a792 100644 --- a/xfa/fwl/cfwl_checkbox.cpp +++ b/xfa/fwl/cfwl_checkbox.cpp @@ -31,10 +31,10 @@ const int kCaptionMargin = 5; CFWL_CheckBox::CFWL_CheckBox(const CFWL_App* app) : CFWL_Widget(app, pdfium::MakeUnique(), nullptr), - m_dwTTOStyles(FDE_TTOSTYLE_SingleLine), - m_iTTOAlign(FDE_TTOALIGNMENT_Center), + m_iTTOAlign(FDE_TextAlignment::kCenter), m_bBtnDown(false), m_fBoxHeight(16.0f) { + m_dwTTOStyles.single_line_ = true; m_rtClient.Reset(); m_rtBox.Reset(); m_rtCaption.Reset(); @@ -170,9 +170,10 @@ uint32_t CFWL_CheckBox::GetPartStates() const { } void CFWL_CheckBox::UpdateTextOutStyles() { - m_iTTOAlign = FDE_TTOALIGNMENT_TopLeft; - m_dwTTOStyles = 0; - m_dwTTOStyles |= FDE_TTOSTYLE_SingleLine; + m_iTTOAlign = FDE_TextAlignment::kTopLeft; + + m_dwTTOStyles.Reset(); + m_dwTTOStyles.single_line_ = true; } void CFWL_CheckBox::NextStates() { -- cgit v1.2.3