Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(193)

Side by Side Diff: fpdfsdk/formfiller/cffl_iformfiller.cpp

Issue 2278153005: CPDF_Annot::GetRect() should return CFX_FloatRect. (Closed)
Patch Set: Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « fpdfsdk/formfiller/cffl_formfiller.cpp ('k') | fpdfsdk/fpdfeditpage.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 PDFium Authors. All rights reserved. 1 // Copyright 2014 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6 6
7 #include "fpdfsdk/formfiller/cffl_iformfiller.h" 7 #include "fpdfsdk/formfiller/cffl_iformfiller.h"
8 8
9 #include "core/fpdfapi/fpdf_page/include/cpdf_page.h" 9 #include "core/fpdfapi/fpdf_page/include/cpdf_page.h"
10 #include "core/fpdfapi/fpdf_parser/include/cpdf_document.h" 10 #include "core/fpdfapi/fpdf_parser/include/cpdf_document.h"
(...skipping 27 matching lines...) Expand all
38 } 38 }
39 39
40 FX_RECT CFFL_IFormFiller::GetViewBBox(CPDFSDK_PageView* pPageView, 40 FX_RECT CFFL_IFormFiller::GetViewBBox(CPDFSDK_PageView* pPageView,
41 CPDFSDK_Annot* pAnnot) { 41 CPDFSDK_Annot* pAnnot) {
42 if (CFFL_FormFiller* pFormFiller = GetFormFiller(pAnnot, FALSE)) 42 if (CFFL_FormFiller* pFormFiller = GetFormFiller(pAnnot, FALSE))
43 return pFormFiller->GetViewBBox(pPageView, pAnnot); 43 return pFormFiller->GetViewBBox(pPageView, pAnnot);
44 44
45 ASSERT(pPageView); 45 ASSERT(pPageView);
46 46
47 CPDF_Annot* pPDFAnnot = pAnnot->GetPDFAnnot(); 47 CPDF_Annot* pPDFAnnot = pAnnot->GetPDFAnnot();
48 CFX_FloatRect rcAnnot; 48 CFX_FloatRect rcWin = CPWL_Utils::InflateRect(pPDFAnnot->GetRect(), 1);
49 pPDFAnnot->GetRect(rcAnnot);
50
51 CFX_FloatRect rcWin = CPWL_Utils::InflateRect(rcAnnot, 1);
52 return rcWin.GetOuterRect(); 49 return rcWin.GetOuterRect();
53 } 50 }
54 51
55 void CFFL_IFormFiller::OnDraw(CPDFSDK_PageView* pPageView, 52 void CFFL_IFormFiller::OnDraw(CPDFSDK_PageView* pPageView,
56 CPDFSDK_Annot* pAnnot, 53 CPDFSDK_Annot* pAnnot,
57 CFX_RenderDevice* pDevice, 54 CFX_RenderDevice* pDevice,
58 CFX_Matrix* pUser2Device, 55 CFX_Matrix* pUser2Device,
59 uint32_t dwFlags) { 56 uint32_t dwFlags) {
60 ASSERT(pPageView); 57 ASSERT(pPageView);
61 CPDFSDK_Widget* pWidget = (CPDFSDK_Widget*)pAnnot; 58 CPDFSDK_Widget* pWidget = (CPDFSDK_Widget*)pAnnot;
(...skipping 940 matching lines...) Expand 10 before | Expand all | Expand 10 after
1002 bExit = TRUE; 999 bExit = TRUE;
1003 m_bNotifying = FALSE; 1000 m_bNotifying = FALSE;
1004 return; 1001 return;
1005 } 1002 }
1006 } 1003 }
1007 1004
1008 m_bNotifying = FALSE; 1005 m_bNotifying = FALSE;
1009 } 1006 }
1010 } 1007 }
1011 } 1008 }
OLDNEW
« no previous file with comments | « fpdfsdk/formfiller/cffl_formfiller.cpp ('k') | fpdfsdk/fpdfeditpage.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698