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

Side by Side Diff: fpdfsdk/cpdfsdk_widgethandler.cpp

Issue 2333413003: Rename CPDFDoc_Environment to CPDFSDK_Environment (Closed)
Patch Set: Review feedback 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/cpdfsdk_widget.cpp ('k') | fpdfsdk/cpdfsdk_xfawidgethandler.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 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/include/cpdfsdk_widgethandler.h" 7 #include "fpdfsdk/include/cpdfsdk_widgethandler.h"
8 8
9 #include <memory> 9 #include <memory>
10 #include <vector> 10 #include <vector>
11 11
12 #include "core/fpdfapi/fpdf_page/include/cpdf_page.h" 12 #include "core/fpdfapi/fpdf_page/include/cpdf_page.h"
13 #include "core/fpdfapi/fpdf_parser/include/cpdf_document.h" 13 #include "core/fpdfapi/fpdf_parser/include/cpdf_document.h"
14 #include "core/fpdfdoc/include/cpdf_interform.h" 14 #include "core/fpdfdoc/include/cpdf_interform.h"
15 #include "fpdfsdk/formfiller/cffl_formfiller.h" 15 #include "fpdfsdk/formfiller/cffl_formfiller.h"
16 #include "fpdfsdk/include/cpdfdoc_environment.h"
17 #include "fpdfsdk/include/cpdfsdk_annot.h" 16 #include "fpdfsdk/include/cpdfsdk_annot.h"
18 #include "fpdfsdk/include/cpdfsdk_document.h" 17 #include "fpdfsdk/include/cpdfsdk_document.h"
18 #include "fpdfsdk/include/cpdfsdk_environment.h"
19 #include "fpdfsdk/include/cpdfsdk_interform.h" 19 #include "fpdfsdk/include/cpdfsdk_interform.h"
20 #include "fpdfsdk/include/cpdfsdk_pageview.h" 20 #include "fpdfsdk/include/cpdfsdk_pageview.h"
21 #include "fpdfsdk/include/cpdfsdk_widget.h" 21 #include "fpdfsdk/include/cpdfsdk_widget.h"
22 22
23 #ifdef PDF_ENABLE_XFA 23 #ifdef PDF_ENABLE_XFA
24 #include "fpdfsdk/fpdfxfa/include/fpdfxfa_doc.h" 24 #include "fpdfsdk/fpdfxfa/include/fpdfxfa_doc.h"
25 #endif // PDF_ENABLE_XFA 25 #endif // PDF_ENABLE_XFA
26 26
27 CPDFSDK_WidgetHandler::CPDFSDK_WidgetHandler(CPDFDoc_Environment* pApp) 27 CPDFSDK_WidgetHandler::CPDFSDK_WidgetHandler(CPDFSDK_Environment* pApp)
28 : m_pApp(pApp), m_pFormFiller(nullptr) {} 28 : m_pApp(pApp), m_pFormFiller(nullptr) {}
29 29
30 CPDFSDK_WidgetHandler::~CPDFSDK_WidgetHandler() {} 30 CPDFSDK_WidgetHandler::~CPDFSDK_WidgetHandler() {}
31 31
32 FX_BOOL CPDFSDK_WidgetHandler::CanAnswer(CPDFSDK_Annot* pAnnot) { 32 FX_BOOL CPDFSDK_WidgetHandler::CanAnswer(CPDFSDK_Annot* pAnnot) {
33 ASSERT(pAnnot->GetAnnotSubtype() == CPDF_Annot::Subtype::WIDGET); 33 ASSERT(pAnnot->GetAnnotSubtype() == CPDF_Annot::Subtype::WIDGET);
34 if (pAnnot->IsSignatureWidget()) 34 if (pAnnot->IsSignatureWidget())
35 return FALSE; 35 return FALSE;
36 36
37 CPDFSDK_Widget* pWidget = static_cast<CPDFSDK_Widget*>(pAnnot); 37 CPDFSDK_Widget* pWidget = static_cast<CPDFSDK_Widget*>(pAnnot);
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after
293 293
294 FX_BOOL CPDFSDK_WidgetHandler::HitTest(CPDFSDK_PageView* pPageView, 294 FX_BOOL CPDFSDK_WidgetHandler::HitTest(CPDFSDK_PageView* pPageView,
295 CPDFSDK_Annot* pAnnot, 295 CPDFSDK_Annot* pAnnot,
296 const CFX_FloatPoint& point) { 296 const CFX_FloatPoint& point) {
297 ASSERT(pPageView); 297 ASSERT(pPageView);
298 ASSERT(pAnnot); 298 ASSERT(pAnnot);
299 299
300 CFX_FloatRect rect = GetViewBBox(pPageView, pAnnot); 300 CFX_FloatRect rect = GetViewBBox(pPageView, pAnnot);
301 return rect.Contains(point.x, point.y); 301 return rect.Contains(point.x, point.y);
302 } 302 }
OLDNEW
« no previous file with comments | « fpdfsdk/cpdfsdk_widget.cpp ('k') | fpdfsdk/cpdfsdk_xfawidgethandler.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698