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

Side by Side Diff: fpdfsdk/cpdfsdk_baannothandler.cpp

Issue 2469813004: Rename CPDFXFA_Document to CPDFXFA_Context (Closed)
Patch Set: Merge to master Created 4 years, 1 month 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/cpdfsdk_annot.cpp ('k') | fpdfsdk/cpdfsdk_formfillenvironment.h » ('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 2016 PDFium Authors. All rights reserved. 1 // Copyright 2016 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/cpdfsdk_baannothandler.h" 7 #include "fpdfsdk/cpdfsdk_baannothandler.h"
8 8
9 #include <memory> 9 #include <memory>
10 #include <vector> 10 #include <vector>
11 11
12 #include "core/fpdfapi/page/cpdf_page.h" 12 #include "core/fpdfapi/page/cpdf_page.h"
13 #include "core/fpdfapi/parser/cpdf_document.h" 13 #include "core/fpdfapi/parser/cpdf_document.h"
14 #include "core/fpdfdoc/cpdf_interform.h" 14 #include "core/fpdfdoc/cpdf_interform.h"
15 #include "fpdfsdk/cpdfsdk_annot.h" 15 #include "fpdfsdk/cpdfsdk_annot.h"
16 #include "fpdfsdk/cpdfsdk_baannot.h" 16 #include "fpdfsdk/cpdfsdk_baannot.h"
17 #include "fpdfsdk/cpdfsdk_pageview.h" 17 #include "fpdfsdk/cpdfsdk_pageview.h"
18 #include "fpdfsdk/formfiller/cffl_formfiller.h" 18 #include "fpdfsdk/formfiller/cffl_formfiller.h"
19 19
20 #ifdef PDF_ENABLE_XFA 20 #ifdef PDF_ENABLE_XFA
21 #include "fpdfsdk/fpdfxfa/cpdfxfa_document.h" 21 #include "fpdfsdk/fpdfxfa/cpdfxfa_context.h"
22 #endif // PDF_ENABLE_XFA 22 #endif // PDF_ENABLE_XFA
23 23
24 namespace { 24 namespace {
25 25
26 void UpdateAnnotRects(CPDFSDK_PageView* pPageView, CPDFSDK_BAAnnot* pBAAnnot) { 26 void UpdateAnnotRects(CPDFSDK_PageView* pPageView, CPDFSDK_BAAnnot* pBAAnnot) {
27 std::vector<CFX_FloatRect> rects; 27 std::vector<CFX_FloatRect> rects;
28 rects.push_back(pBAAnnot->GetRect()); 28 rects.push_back(pBAAnnot->GetRect());
29 if (CPDF_Annot* pPopupAnnot = pBAAnnot->GetPDFPopupAnnot()) 29 if (CPDF_Annot* pPopupAnnot = pBAAnnot->GetPDFPopupAnnot())
30 rects.push_back(pPopupAnnot->GetRect()); 30 rects.push_back(pPopupAnnot->GetRect());
31 pPageView->UpdateRects(rects); 31 pPageView->UpdateRects(rects);
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 194
195 FX_BOOL CPDFSDK_BAAnnotHandler::HitTest(CPDFSDK_PageView* pPageView, 195 FX_BOOL CPDFSDK_BAAnnotHandler::HitTest(CPDFSDK_PageView* pPageView,
196 CPDFSDK_Annot* pAnnot, 196 CPDFSDK_Annot* pAnnot,
197 const CFX_FloatPoint& point) { 197 const CFX_FloatPoint& point) {
198 ASSERT(pPageView); 198 ASSERT(pPageView);
199 ASSERT(pAnnot); 199 ASSERT(pAnnot);
200 200
201 CFX_FloatRect rect = GetViewBBox(pPageView, pAnnot); 201 CFX_FloatRect rect = GetViewBBox(pPageView, pAnnot);
202 return rect.Contains(point.x, point.y); 202 return rect.Contains(point.x, point.y);
203 } 203 }
OLDNEW
« no previous file with comments | « fpdfsdk/cpdfsdk_annot.cpp ('k') | fpdfsdk/cpdfsdk_formfillenvironment.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698