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

Side by Side Diff: fpdfsdk/cpdfsdk_xfawidgethandler.cpp

Issue 2295953002: Use enum class for subtypes of CPDF_Annot. (Closed)
Patch Set: Use enum class for subtypes of CPDF_Annot. 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_xfawidget.cpp ('k') | fpdfsdk/formfiller/cffl_formfiller.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_xfawidgethandler.h" 7 #include "fpdfsdk/include/cpdfsdk_xfawidgethandler.h"
8 8
9 #include "core/fpdfdoc/include/cpdf_interform.h" 9 #include "core/fpdfdoc/include/cpdf_interform.h"
10 #include "fpdfsdk/fpdfxfa/include/fpdfxfa_doc.h" 10 #include "fpdfsdk/fpdfxfa/include/fpdfxfa_doc.h"
11 #include "fpdfsdk/include/cpdfsdk_annot.h" 11 #include "fpdfsdk/include/cpdfsdk_annot.h"
12 #include "fpdfsdk/include/cpdfsdk_interform.h" 12 #include "fpdfsdk/include/cpdfsdk_interform.h"
13 #include "fpdfsdk/include/cpdfsdk_xfawidget.h" 13 #include "fpdfsdk/include/cpdfsdk_xfawidget.h"
14 #include "fpdfsdk/include/fsdk_mgr.h" 14 #include "fpdfsdk/include/fsdk_mgr.h"
15 #include "xfa/fxfa/include/fxfa_basic.h" 15 #include "xfa/fxfa/include/fxfa_basic.h"
16 #include "xfa/fxfa/include/xfa_ffdocview.h" 16 #include "xfa/fxfa/include/xfa_ffdocview.h"
17 #include "xfa/fxfa/include/xfa_ffpageview.h" 17 #include "xfa/fxfa/include/xfa_ffpageview.h"
18 #include "xfa/fxfa/include/xfa_ffwidget.h" 18 #include "xfa/fxfa/include/xfa_ffwidget.h"
19 #include "xfa/fxfa/include/xfa_ffwidgethandler.h" 19 #include "xfa/fxfa/include/xfa_ffwidgethandler.h"
20 #include "xfa/fxgraphics/include/cfx_graphics.h" 20 #include "xfa/fxgraphics/include/cfx_graphics.h"
21 #include "xfa/fwl/core/include/fwl_widgethit.h" 21 #include "xfa/fwl/core/include/fwl_widgethit.h"
22 22
23 CPDFSDK_XFAWidgetHandler::CPDFSDK_XFAWidgetHandler(CPDFDoc_Environment* pApp) 23 CPDFSDK_XFAWidgetHandler::CPDFSDK_XFAWidgetHandler(CPDFDoc_Environment* pApp)
24 : m_pApp(pApp) {} 24 : m_pApp(pApp) {}
25 25
26 CPDFSDK_XFAWidgetHandler::~CPDFSDK_XFAWidgetHandler() {} 26 CPDFSDK_XFAWidgetHandler::~CPDFSDK_XFAWidgetHandler() {}
27 27
28 CFX_ByteString CPDFSDK_XFAWidgetHandler::GetType() {
29 return FSDK_XFAWIDGET_TYPENAME;
30 }
31
32 FX_BOOL CPDFSDK_XFAWidgetHandler::CanAnswer(CPDFSDK_Annot* pAnnot) { 28 FX_BOOL CPDFSDK_XFAWidgetHandler::CanAnswer(CPDFSDK_Annot* pAnnot) {
33 return !!pAnnot->GetXFAWidget(); 29 return !!pAnnot->GetXFAWidget();
34 } 30 }
35 31
36 CPDFSDK_Annot* CPDFSDK_XFAWidgetHandler::NewAnnot(CPDF_Annot* pAnnot, 32 CPDFSDK_Annot* CPDFSDK_XFAWidgetHandler::NewAnnot(CPDF_Annot* pAnnot,
37 CPDFSDK_PageView* pPage) { 33 CPDFSDK_PageView* pPage) {
38 return nullptr; 34 return nullptr;
39 } 35 }
40 36
41 CPDFSDK_Annot* CPDFSDK_XFAWidgetHandler::NewAnnot(CXFA_FFWidget* pAnnot, 37 CPDFSDK_Annot* CPDFSDK_XFAWidgetHandler::NewAnnot(CXFA_FFWidget* pAnnot,
(...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after
377 dwFWLFlag |= FWL_KEYFLAG_MButton; 373 dwFWLFlag |= FWL_KEYFLAG_MButton;
378 if (dwFlag & FWL_EVENTFLAG_RightButtonDown) 374 if (dwFlag & FWL_EVENTFLAG_RightButtonDown)
379 dwFWLFlag |= FWL_KEYFLAG_RButton; 375 dwFWLFlag |= FWL_KEYFLAG_RButton;
380 if (dwFlag & FWL_EVENTFLAG_ShiftKey) 376 if (dwFlag & FWL_EVENTFLAG_ShiftKey)
381 dwFWLFlag |= FWL_KEYFLAG_Shift; 377 dwFWLFlag |= FWL_KEYFLAG_Shift;
382 if (dwFlag & FWL_EVENTFLAG_AltKey) 378 if (dwFlag & FWL_EVENTFLAG_AltKey)
383 dwFWLFlag |= FWL_KEYFLAG_Alt; 379 dwFWLFlag |= FWL_KEYFLAG_Alt;
384 380
385 return dwFWLFlag; 381 return dwFWLFlag;
386 } 382 }
OLDNEW
« no previous file with comments | « fpdfsdk/cpdfsdk_xfawidget.cpp ('k') | fpdfsdk/formfiller/cffl_formfiller.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698