From a9e28433600816a20406709c5652ba91697bc387 Mon Sep 17 00:00:00 2001 From: Dan Sinclair Date: Wed, 5 Jul 2017 14:18:14 -0400 Subject: Cleanup some CPWL_Wnd defines This CL removes unused #define's and moves ones that are only used in a single .cpp class to that file. Change-Id: I6c503d5d4c031a870b7a1362086205a810d31478 Reviewed-on: https://pdfium-review.googlesource.com/7256 Reviewed-by: Tom Sepez Commit-Queue: dsinclair --- fpdfsdk/pdfwindow/cpwl_wnd.cpp | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) (limited to 'fpdfsdk/pdfwindow/cpwl_wnd.cpp') diff --git a/fpdfsdk/pdfwindow/cpwl_wnd.cpp b/fpdfsdk/pdfwindow/cpwl_wnd.cpp index 564c98c9e2..6e2e75c5a1 100644 --- a/fpdfsdk/pdfwindow/cpwl_wnd.cpp +++ b/fpdfsdk/pdfwindow/cpwl_wnd.cpp @@ -15,6 +15,13 @@ #include "third_party/base/ptr_util.h" #include "third_party/base/stl_util.h" +namespace { + +constexpr float kDefaultFontSize = 9.0f; +constexpr int kInvalidationInflate = 2; + +} // namespace + PWL_CREATEPARAM::PWL_CREATEPARAM() : rcRectWnd(0, 0, 0, 0), pSystemHandler(nullptr), @@ -29,7 +36,7 @@ PWL_CREATEPARAM::PWL_CREATEPARAM() sBorderColor(), sTextColor(), nTransparency(255), - fFontSize(PWL_DEFAULT_FONTSIZE), + fFontSize(kDefaultFontSize), sDash(3, 0, 0), pAttachedData(nullptr), pParentWnd(nullptr), @@ -326,10 +333,10 @@ void CPWL_Wnd::InvalidateRect(CFX_FloatRect* pRect) { } FX_RECT rcWin = PWLtoWnd(rcRefresh); - rcWin.left -= PWL_INVALIDATE_INFLATE; - rcWin.top -= PWL_INVALIDATE_INFLATE; - rcWin.right += PWL_INVALIDATE_INFLATE; - rcWin.bottom += PWL_INVALIDATE_INFLATE; + rcWin.left -= kInvalidationInflate; + rcWin.top -= kInvalidationInflate; + rcWin.right += kInvalidationInflate; + rcWin.bottom += kInvalidationInflate; if (CFX_SystemHandler* pSH = GetSystemHandler()) { if (CPDFSDK_Widget* widget = static_cast( -- cgit v1.2.3