diff options
author | Dan Sinclair <dsinclair@chromium.org> | 2017-03-14 14:43:42 -0400 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-03-14 19:05:58 +0000 |
commit | 05df075154a832fcb476e1dfcfb865722d0ea898 (patch) | |
tree | b8b771b62adae74d5d5ee561db75d10de3a848bf /fpdfsdk/pdfwindow/PWL_Edit.cpp | |
parent | 6b94f01d1c8ad386d497428c7397b1a99614aeba (diff) | |
download | pdfium-05df075154a832fcb476e1dfcfb865722d0ea898.tar.xz |
Replace FX_FLOAT with underlying float type.
Change-Id: I158b7d80b0ec28b742a9f2d5a96f3dde7fb3ab56
Reviewed-on: https://pdfium-review.googlesource.com/3031
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Nicolás Peña <npm@chromium.org>
Diffstat (limited to 'fpdfsdk/pdfwindow/PWL_Edit.cpp')
-rw-r--r-- | fpdfsdk/pdfwindow/PWL_Edit.cpp | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/fpdfsdk/pdfwindow/PWL_Edit.cpp b/fpdfsdk/pdfwindow/PWL_Edit.cpp index b77aad9ab0..f84c38e23b 100644 --- a/fpdfsdk/pdfwindow/PWL_Edit.cpp +++ b/fpdfsdk/pdfwindow/PWL_Edit.cpp @@ -101,7 +101,7 @@ void CPWL_Edit::RePosChildWnd() { CFX_FloatRect CPWL_Edit::GetClientRect() const { CFX_FloatRect rcClient = CPWL_Utils::DeflateRect( - GetWindowRect(), (FX_FLOAT)(GetBorderWidth() + GetInnerBorderWidth())); + GetWindowRect(), (float)(GetBorderWidth() + GetInnerBorderWidth())); if (CPWL_ScrollBar* pVSB = GetVScrollBar()) { if (pVSB->IsVisible()) { @@ -329,7 +329,7 @@ void CPWL_Edit::DrawThisAppearance(CFX_RenderDevice* pDevice, switch (GetBorderStyle()) { case BorderStyle::SOLID: { CFX_GraphStateData gsd; - gsd.m_LineWidth = (FX_FLOAT)GetBorderWidth(); + gsd.m_LineWidth = (float)GetBorderWidth(); CFX_PathData path; @@ -355,12 +355,12 @@ void CPWL_Edit::DrawThisAppearance(CFX_RenderDevice* pDevice, } case BorderStyle::DASH: { CFX_GraphStateData gsd; - gsd.m_LineWidth = (FX_FLOAT)GetBorderWidth(); + gsd.m_LineWidth = (float)GetBorderWidth(); gsd.SetDashCount(2); - gsd.m_DashArray[0] = (FX_FLOAT)GetBorderDash().nDash; - gsd.m_DashArray[1] = (FX_FLOAT)GetBorderDash().nGap; - gsd.m_DashPhase = (FX_FLOAT)GetBorderDash().nPhase; + gsd.m_DashArray[0] = (float)GetBorderDash().nDash; + gsd.m_DashArray[1] = (float)GetBorderDash().nGap; + gsd.m_DashPhase = (float)GetBorderDash().nPhase; CFX_PathData path; for (int32_t i = 0; i < nCharArray - 1; i++) { @@ -463,7 +463,7 @@ void CPWL_Edit::OnKillFocus() { m_bFocus = false; } -void CPWL_Edit::SetCharSpace(FX_FLOAT fCharSpace) { +void CPWL_Edit::SetCharSpace(float fCharSpace) { m_pEdit->SetCharSpace(fCharSpace); } @@ -527,16 +527,16 @@ bool CPWL_Edit::IsTextFull() const { return m_pEdit->IsTextFull(); } -FX_FLOAT CPWL_Edit::GetCharArrayAutoFontSize(CPDF_Font* pFont, - const CFX_FloatRect& rcPlate, - int32_t nCharArray) { +float CPWL_Edit::GetCharArrayAutoFontSize(CPDF_Font* pFont, + const CFX_FloatRect& rcPlate, + int32_t nCharArray) { if (pFont && !pFont->IsStandardFont()) { FX_RECT rcBBox; pFont->GetFontBBox(rcBBox); CFX_FloatRect rcCell = rcPlate; - FX_FLOAT xdiv = rcCell.Width() / nCharArray * 1000.0f / rcBBox.Width(); - FX_FLOAT ydiv = -rcCell.Height() * 1000.0f / rcBBox.Height(); + float xdiv = rcCell.Width() / nCharArray * 1000.0f / rcBBox.Width(); + float ydiv = -rcCell.Height() * 1000.0f / rcBBox.Height(); return xdiv < ydiv ? xdiv : ydiv; } @@ -551,8 +551,8 @@ void CPWL_Edit::SetCharArray(int32_t nCharArray) { if (HasFlag(PWS_AUTOFONTSIZE)) { if (IPVT_FontMap* pFontMap = GetFontMap()) { - FX_FLOAT fFontSize = GetCharArrayAutoFontSize( - pFontMap->GetPDFFont(0), GetClientRect(), nCharArray); + float fFontSize = GetCharArrayAutoFontSize(pFontMap->GetPDFFont(0), + GetClientRect(), nCharArray); if (fFontSize > 0.0f) { m_pEdit->SetAutoFontSize(false, true); m_pEdit->SetFontSize(fFontSize); |