From d24236a926deeb8b9589c330c27dbd300b7f8c9d Mon Sep 17 00:00:00 2001 From: Lei Zhang Date: Thu, 29 Jun 2017 18:28:58 -0700 Subject: Remove pointless CFX_FloatRect construction. Also just call CFX_FloatRect() instead of explicitly writing out all zeros. Change-Id: I7574e64791d0c9ba613b14d0a613737dfbf39b12 Reviewed-on: https://pdfium-review.googlesource.com/7172 Reviewed-by: Ryan Harrison Commit-Queue: Lei Zhang --- fpdfsdk/formfiller/cffl_formfiller.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'fpdfsdk/formfiller') diff --git a/fpdfsdk/formfiller/cffl_formfiller.cpp b/fpdfsdk/formfiller/cffl_formfiller.cpp index 80f725ba1a..281f0d74a7 100644 --- a/fpdfsdk/formfiller/cffl_formfiller.cpp +++ b/fpdfsdk/formfiller/cffl_formfiller.cpp @@ -6,6 +6,8 @@ #include "fpdfsdk/formfiller/cffl_formfiller.h" +#include + #include "core/fpdfapi/page/cpdf_page.h" #include "core/fxge/cfx_renderdevice.h" #include "fpdfsdk/cpdfsdk_formfillenvironment.h" @@ -54,8 +56,7 @@ CFX_FloatRect CFFL_FormFiller::GetWindowRect(CPDFSDK_PageView* pPageView) { if (CPWL_Wnd* pWnd = GetPDFWindow(pPageView, false)) { return pWnd->GetWindowRect(); } - - return CFX_FloatRect(0, 0, 0, 0); + return CFX_FloatRect(); } FX_RECT CFFL_FormFiller::GetViewBBox(CPDFSDK_PageView* pPageView, @@ -433,8 +434,7 @@ CFX_FloatRect CFFL_FormFiller::GetPDFWindowRect() const { float fWidth = rectAnnot.right - rectAnnot.left; float fHeight = rectAnnot.top - rectAnnot.bottom; if ((m_pWidget->GetRotate() / 90) & 0x01) - return CFX_FloatRect(0, 0, fHeight, fWidth); - + std::swap(fWidth, fHeight); return CFX_FloatRect(0, 0, fWidth, fHeight); } @@ -450,7 +450,7 @@ CFX_FloatRect CFFL_FormFiller::GetFocusBox(CPDFSDK_PageView* pPageView) { if (rcPage.Contains(rcFocus)) return rcFocus; } - return CFX_FloatRect(0, 0, 0, 0); + return CFX_FloatRect(); } CFX_FloatRect CFFL_FormFiller::FFLtoPWL(const CFX_FloatRect& rect) { -- cgit v1.2.3