diff options
author | weili <weili@chromium.org> | 2016-06-15 11:21:33 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-06-15 11:21:33 -0700 |
commit | 625ad667d0c0c17d5bc11d505f04861d90b45078 (patch) | |
tree | efd014e752072adf726a0e34383555399342dcb2 /xfa/fxfa/include | |
parent | 29b8ad0b130ec6ed4f72ebd0c0a4f9e6a5b03467 (diff) | |
download | pdfium-625ad667d0c0c17d5bc11d505f04861d90b45078.tar.xz |
Make code compile with clang_use_chrome_plugin (part IV)
This change mainly contains files in fpdfsdk/ directory.
This is part of the efforts to make PDFium code compilable
by Clang chromium style plugins.
The changes are mainly the following:
-- move inline constructor/destructor of complex class/struct out-of-line;
-- add constructor/destructor of complex class/struct if not
explicitly defined;
-- add explicit out-of-line copy constructor when needed;
-- move inline virtual functions out-of-line;
-- Properly mark virtual functions with 'override';
-- some minor cleanups plus removing an unused file and splitting
cxfa_eventparam out from fxfa.h
BUG=pdfium:469
Review-Url: https://codereview.chromium.org/2062313002
Diffstat (limited to 'xfa/fxfa/include')
-rw-r--r-- | xfa/fxfa/include/cxfa_eventparam.h | 79 | ||||
-rw-r--r-- | xfa/fxfa/include/fxfa.h | 84 | ||||
-rw-r--r-- | xfa/fxfa/include/xfa_ffdocview.h | 1 | ||||
-rw-r--r-- | xfa/fxfa/include/xfa_ffwidgethandler.h | 1 |
4 files changed, 81 insertions, 84 deletions
diff --git a/xfa/fxfa/include/cxfa_eventparam.h b/xfa/fxfa/include/cxfa_eventparam.h new file mode 100644 index 0000000000..9bc46fdc66 --- /dev/null +++ b/xfa/fxfa/include/cxfa_eventparam.h @@ -0,0 +1,79 @@ +// Copyright 2016 PDFium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com + +#ifndef XFA_FXFA_INCLUDE_CXFA_EVENTPARAM_H_ +#define XFA_FXFA_INCLUDE_CXFA_EVENTPARAM_H_ + +#include "xfa/fxfa/include/fxfa_basic.h" + +class CXFA_WidgetAcc; + +enum XFA_EVENTTYPE { + XFA_EVENT_Click, + XFA_EVENT_Change, + XFA_EVENT_DocClose, + XFA_EVENT_DocReady, + XFA_EVENT_Enter, + XFA_EVENT_Exit, + XFA_EVENT_Full, + XFA_EVENT_IndexChange, + XFA_EVENT_Initialize, + XFA_EVENT_MouseDown, + XFA_EVENT_MouseEnter, + XFA_EVENT_MouseExit, + XFA_EVENT_MouseUp, + XFA_EVENT_PostExecute, + XFA_EVENT_PostOpen, + XFA_EVENT_PostPrint, + XFA_EVENT_PostSave, + XFA_EVENT_PostSign, + XFA_EVENT_PostSubmit, + XFA_EVENT_PreExecute, + XFA_EVENT_PreOpen, + XFA_EVENT_PrePrint, + XFA_EVENT_PreSave, + XFA_EVENT_PreSign, + XFA_EVENT_PreSubmit, + XFA_EVENT_Ready, + XFA_EVENT_InitCalculate, + XFA_EVENT_InitVariables, + XFA_EVENT_Calculate, + XFA_EVENT_Validate, + XFA_EVENT_Unknown, +}; + +class CXFA_EventParam { + public: + CXFA_EventParam(); + ~CXFA_EventParam(); + CXFA_EventParam(const CXFA_EventParam& other); + + void Reset(); + + CXFA_WidgetAcc* m_pTarget; + XFA_EVENTTYPE m_eType; + CFX_WideString m_wsResult; + FX_BOOL m_bCancelAction; + int32_t m_iCommitKey; + FX_BOOL m_bKeyDown; + FX_BOOL m_bModifier; + FX_BOOL m_bReenter; + int32_t m_iSelEnd; + int32_t m_iSelStart; + FX_BOOL m_bShift; + CFX_WideString m_wsChange; + CFX_WideString m_wsFullText; + CFX_WideString m_wsNewContentType; + CFX_WideString m_wsNewText; + CFX_WideString m_wsPrevContentType; + CFX_WideString m_wsPrevText; + CFX_WideString m_wsSoapFaultCode; + CFX_WideString m_wsSoapFaultString; + FX_BOOL m_bIsFormReady; + int32_t m_iValidateActivities; +}; + +#endif // XFA_FXFA_INCLUDE_CXFA_EVENTPARAM_H_ diff --git a/xfa/fxfa/include/fxfa.h b/xfa/fxfa/include/fxfa.h index 981fcabffc..c62e916a97 100644 --- a/xfa/fxfa/include/fxfa.h +++ b/xfa/fxfa/include/fxfa.h @@ -143,40 +143,6 @@ enum XFA_WidgetStatus { XFA_WidgetStatus_Visible = 1 << 9 }; -enum XFA_EVENTTYPE { - XFA_EVENT_Click, - XFA_EVENT_Change, - XFA_EVENT_DocClose, - XFA_EVENT_DocReady, - XFA_EVENT_Enter, - XFA_EVENT_Exit, - XFA_EVENT_Full, - XFA_EVENT_IndexChange, - XFA_EVENT_Initialize, - XFA_EVENT_MouseDown, - XFA_EVENT_MouseEnter, - XFA_EVENT_MouseExit, - XFA_EVENT_MouseUp, - XFA_EVENT_PostExecute, - XFA_EVENT_PostOpen, - XFA_EVENT_PostPrint, - XFA_EVENT_PostSave, - XFA_EVENT_PostSign, - XFA_EVENT_PostSubmit, - XFA_EVENT_PreExecute, - XFA_EVENT_PreOpen, - XFA_EVENT_PrePrint, - XFA_EVENT_PreSave, - XFA_EVENT_PreSign, - XFA_EVENT_PreSubmit, - XFA_EVENT_Ready, - XFA_EVENT_InitCalculate, - XFA_EVENT_InitVariables, - XFA_EVENT_Calculate, - XFA_EVENT_Validate, - XFA_EVENT_Unknown, -}; - enum XFA_WIDGETORDER { XFA_WIDGETORDER_PreOrder, }; @@ -434,56 +400,6 @@ class IXFA_DocProvider { const CFX_WideString& wsLink) = 0; }; -class CXFA_EventParam { - public: - CXFA_EventParam() { - m_pTarget = NULL; - m_eType = XFA_EVENT_Unknown; - m_wsResult.clear(); - Reset(); - } - void Reset() { - m_wsChange.clear(); - m_iCommitKey = 0; - m_wsFullText.clear(); - m_bKeyDown = FALSE; - m_bModifier = FALSE; - m_wsNewContentType.clear(); - m_wsNewText.clear(); - m_wsPrevContentType.clear(); - m_wsPrevText.clear(); - m_bReenter = FALSE; - m_iSelEnd = 0; - m_iSelStart = 0; - m_bShift = FALSE; - m_wsSoapFaultCode.clear(); - m_wsSoapFaultString.clear(); - m_bIsFormReady = FALSE; - m_iValidateActivities = XFA_VALIDATE_preSubmit; - } - CXFA_WidgetAcc* m_pTarget; - XFA_EVENTTYPE m_eType; - CFX_WideString m_wsResult; - FX_BOOL m_bCancelAction; - int32_t m_iCommitKey; - FX_BOOL m_bKeyDown; - FX_BOOL m_bModifier; - FX_BOOL m_bReenter; - int32_t m_iSelEnd; - int32_t m_iSelStart; - FX_BOOL m_bShift; - CFX_WideString m_wsChange; - CFX_WideString m_wsFullText; - CFX_WideString m_wsNewContentType; - CFX_WideString m_wsNewText; - CFX_WideString m_wsPrevContentType; - CFX_WideString m_wsPrevText; - CFX_WideString m_wsSoapFaultCode; - CFX_WideString m_wsSoapFaultString; - FX_BOOL m_bIsFormReady; - int32_t m_iValidateActivities; -}; - class CXFA_RenderOptions { public: CXFA_RenderOptions() : m_bPrint(FALSE), m_bHighlight(TRUE) {} diff --git a/xfa/fxfa/include/xfa_ffdocview.h b/xfa/fxfa/include/xfa_ffdocview.h index b8ff562940..bc2373d155 100644 --- a/xfa/fxfa/include/xfa_ffdocview.h +++ b/xfa/fxfa/include/xfa_ffdocview.h @@ -10,6 +10,7 @@ #include <map> #include <memory> +#include "xfa/fxfa/include/cxfa_eventparam.h" #include "xfa/fxfa/include/xfa_ffdoc.h" class CXFA_FFWidgetHandler; diff --git a/xfa/fxfa/include/xfa_ffwidgethandler.h b/xfa/fxfa/include/xfa_ffwidgethandler.h index 8159d87cf0..4a6687e8c7 100644 --- a/xfa/fxfa/include/xfa_ffwidgethandler.h +++ b/xfa/fxfa/include/xfa_ffwidgethandler.h @@ -9,6 +9,7 @@ #include <vector> +#include "xfa/fxfa/include/cxfa_eventparam.h" #include "xfa/fxfa/include/fxfa.h" #include "xfa/fxfa/parser/xfa_document.h" |