diff options
author | jaepark <jaepark@google.com> | 2016-08-25 13:33:34 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-08-25 13:33:34 -0700 |
commit | a1d2111945acb35cb3403226e68a1920910fa23e (patch) | |
tree | f8e0dafb97832a0cad15adc50c9b55c0d5b0c48a /fpdfsdk/formfiller | |
parent | d99a833da49272ee487293177f62274f58762033 (diff) | |
download | pdfium-a1d2111945acb35cb3403226e68a1920910fa23e.tar.xz |
CPDF_Annot::GetRect() should return CFX_FloatRect.
Avoid using reference argument and return CFX_FloatRect instead.
Review-Url: https://codereview.chromium.org/2278153005
Diffstat (limited to 'fpdfsdk/formfiller')
-rw-r--r-- | fpdfsdk/formfiller/cffl_formfiller.cpp | 6 | ||||
-rw-r--r-- | fpdfsdk/formfiller/cffl_iformfiller.cpp | 5 |
2 files changed, 3 insertions, 8 deletions
diff --git a/fpdfsdk/formfiller/cffl_formfiller.cpp b/fpdfsdk/formfiller/cffl_formfiller.cpp index 92e9282a74..0779f261a7 100644 --- a/fpdfsdk/formfiller/cffl_formfiller.cpp +++ b/fpdfsdk/formfiller/cffl_formfiller.cpp @@ -419,8 +419,7 @@ CFX_Matrix CFFL_FormFiller::GetWindowMatrix(void* pAttachedData) { CFX_Matrix CFFL_FormFiller::GetCurMatrix() { CFX_Matrix mt; - CFX_FloatRect rcDA; - m_pWidget->GetPDFAnnot()->GetRect(rcDA); + CFX_FloatRect rcDA = m_pWidget->GetPDFAnnot()->GetRect(); switch (m_pWidget->GetRotate()) { default: @@ -451,8 +450,7 @@ CFX_WideString CFFL_FormFiller::LoadPopupMenuString(int nIndex) { } CFX_FloatRect CFFL_FormFiller::GetPDFWindowRect() const { - CFX_FloatRect rectAnnot; - m_pWidget->GetPDFAnnot()->GetRect(rectAnnot); + CFX_FloatRect rectAnnot = m_pWidget->GetPDFAnnot()->GetRect(); FX_FLOAT fWidth = rectAnnot.right - rectAnnot.left; FX_FLOAT fHeight = rectAnnot.top - rectAnnot.bottom; diff --git a/fpdfsdk/formfiller/cffl_iformfiller.cpp b/fpdfsdk/formfiller/cffl_iformfiller.cpp index 9e252cbd41..1f638444af 100644 --- a/fpdfsdk/formfiller/cffl_iformfiller.cpp +++ b/fpdfsdk/formfiller/cffl_iformfiller.cpp @@ -45,10 +45,7 @@ FX_RECT CFFL_IFormFiller::GetViewBBox(CPDFSDK_PageView* pPageView, ASSERT(pPageView); CPDF_Annot* pPDFAnnot = pAnnot->GetPDFAnnot(); - CFX_FloatRect rcAnnot; - pPDFAnnot->GetRect(rcAnnot); - - CFX_FloatRect rcWin = CPWL_Utils::InflateRect(rcAnnot, 1); + CFX_FloatRect rcWin = CPWL_Utils::InflateRect(pPDFAnnot->GetRect(), 1); return rcWin.GetOuterRect(); } |