From a6d9f0edce07194f551db4c38bb427fbf7d550cf Mon Sep 17 00:00:00 2001 From: Lei Zhang Date: Sat, 13 Jun 2015 00:48:38 -0700 Subject: Remove trailing whitespaces in fpdfsdk, XFA edition. Review URL: https://codereview.chromium.org/1185843005. --- fpdfsdk/include/formfiller/FFL_CBA_Fontmap.h | 4 +- fpdfsdk/include/formfiller/FFL_CheckBox.h | 2 +- fpdfsdk/include/formfiller/FFL_ComboBox.h | 36 ++++++------ fpdfsdk/include/formfiller/FFL_FormFiller.h | 28 ++++----- fpdfsdk/include/formfiller/FFL_ListBox.h | 4 +- fpdfsdk/include/formfiller/FFL_Notify.h | 14 ++--- fpdfsdk/include/formfiller/FFL_PushButton.h | 4 +- fpdfsdk/include/formfiller/FFL_RadioButton.h | 4 +- fpdfsdk/include/formfiller/FFL_TextField.h | 40 ++++++------- fpdfsdk/include/formfiller/FFL_Utils.h | 2 +- fpdfsdk/include/fsdk_actionhandler.h | 16 +++--- fpdfsdk/include/fsdk_annothandler.h | 56 +++++++++--------- fpdfsdk/include/fsdk_baseannot.h | 64 ++++++++++----------- fpdfsdk/include/fsdk_baseform.h | 58 +++++++++---------- fpdfsdk/include/fsdk_common.h | 2 +- fpdfsdk/include/fsdk_define.h | 24 ++++---- fpdfsdk/include/fsdk_rendercontext.h | 10 ++-- fpdfsdk/include/fx_systemhandler.h | 18 +++--- fpdfsdk/include/fxedit/fx_edit.h | 58 +++++++++---------- fpdfsdk/include/fxedit/fxet_edit.h | 54 +++++++++--------- fpdfsdk/include/javascript/Consts.h | 2 +- fpdfsdk/include/javascript/Document.h | 12 ++-- fpdfsdk/include/javascript/Field.h | 10 ++-- fpdfsdk/include/javascript/IJavaScript.h | 4 +- fpdfsdk/include/javascript/Icon.h | 2 +- fpdfsdk/include/javascript/JS_Context.h | 14 ++--- fpdfsdk/include/javascript/JS_Define.h | 2 +- fpdfsdk/include/javascript/JS_EventHandler.h | 10 ++-- fpdfsdk/include/javascript/JS_GlobalData.h | 8 +-- fpdfsdk/include/javascript/JS_Object.h | 4 +- fpdfsdk/include/javascript/JS_Runtime.h | 2 +- fpdfsdk/include/javascript/JS_Value.h | 2 +- fpdfsdk/include/javascript/PublicMethods.h | 8 +-- fpdfsdk/include/javascript/app.h | 36 ++++++------ fpdfsdk/include/javascript/color.h | 12 ++-- fpdfsdk/include/javascript/console.h | 4 +- fpdfsdk/include/javascript/event.h | 2 +- fpdfsdk/include/javascript/global.h | 6 +- fpdfsdk/include/javascript/report.h | 2 +- fpdfsdk/include/javascript/util.h | 2 +- fpdfsdk/include/pdfwindow/IPDFWindow.h | 2 +- fpdfsdk/include/pdfwindow/PWL_Button.h | 2 +- fpdfsdk/include/pdfwindow/PWL_Caret.h | 4 +- fpdfsdk/include/pdfwindow/PWL_ComboBox.h | 14 ++--- fpdfsdk/include/pdfwindow/PWL_Edit.h | 20 +++---- fpdfsdk/include/pdfwindow/PWL_EditCtrl.h | 26 ++++----- fpdfsdk/include/pdfwindow/PWL_FontMap.h | 6 +- fpdfsdk/include/pdfwindow/PWL_Icon.h | 6 +- fpdfsdk/include/pdfwindow/PWL_IconList.h | 6 +- fpdfsdk/include/pdfwindow/PWL_Label.h | 2 +- fpdfsdk/include/pdfwindow/PWL_ListCtrl.h | 2 +- fpdfsdk/include/pdfwindow/PWL_Note.h | 14 ++--- fpdfsdk/include/pdfwindow/PWL_ScrollBar.h | 18 +++--- fpdfsdk/include/pdfwindow/PWL_Signature.h | 2 +- fpdfsdk/include/pdfwindow/PWL_SpecialButton.h | 2 +- fpdfsdk/include/pdfwindow/PWL_Utils.h | 18 +++--- fpdfsdk/include/pdfwindow/PWL_Wnd.h | 82 +++++++++++++-------------- 57 files changed, 434 insertions(+), 434 deletions(-) (limited to 'fpdfsdk/include') diff --git a/fpdfsdk/include/formfiller/FFL_CBA_Fontmap.h b/fpdfsdk/include/formfiller/FFL_CBA_Fontmap.h index 687cd6f207..3be49fc2de 100644 --- a/fpdfsdk/include/formfiller/FFL_CBA_Fontmap.h +++ b/fpdfsdk/include/formfiller/FFL_CBA_Fontmap.h @@ -1,7 +1,7 @@ // Copyright 2014 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 FPDFSDK_INCLUDE_FORMFILLER_FFL_CBA_FONTMAP_H_ @@ -43,7 +43,7 @@ private: CPDF_Dictionary* m_pAnnotDict; CPDF_Font* m_pDefaultFont; CFX_ByteString m_sDefaultFontName; - + CFX_ByteString m_sAPType; }; diff --git a/fpdfsdk/include/formfiller/FFL_CheckBox.h b/fpdfsdk/include/formfiller/FFL_CheckBox.h index bac1b9394b..3deeae8aa7 100644 --- a/fpdfsdk/include/formfiller/FFL_CheckBox.h +++ b/fpdfsdk/include/formfiller/FFL_CheckBox.h @@ -1,7 +1,7 @@ // Copyright 2014 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 FPDFSDK_INCLUDE_FORMFILLER_FFL_CHECKBOX_H_ diff --git a/fpdfsdk/include/formfiller/FFL_ComboBox.h b/fpdfsdk/include/formfiller/FFL_ComboBox.h index 5f0aaa1440..0ade1bcdb0 100644 --- a/fpdfsdk/include/formfiller/FFL_ComboBox.h +++ b/fpdfsdk/include/formfiller/FFL_ComboBox.h @@ -1,7 +1,7 @@ // Copyright 2014 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 FPDFSDK_INCLUDE_FORMFILLER_FFL_COMBOBOX_H_ @@ -26,43 +26,43 @@ class CFFL_ComboBox : public CFFL_FormFiller, public IPWL_FocusHandler, public I public: CFFL_ComboBox(CPDFDoc_Environment* pApp, CPDFSDK_Annot* pWidget); virtual ~CFFL_ComboBox(); - + virtual PWL_CREATEPARAM GetCreateParam(); virtual CPWL_Wnd* NewPDFWindow(const PWL_CREATEPARAM& cp, CPDFSDK_PageView* pPageView); - + virtual FX_BOOL OnChar(CPDFSDK_Annot* pAnnot, FX_UINT nChar, FX_UINT nFlags); - + virtual FX_BOOL IsDataChanged(CPDFSDK_PageView* pPageView); virtual void SaveData(CPDFSDK_PageView* pPageView); - + virtual void GetActionData(CPDFSDK_PageView* pPageView, CPDF_AAction::AActionType type, PDFSDK_FieldAction& fa); virtual void SetActionData(CPDFSDK_PageView* pPageView, CPDF_AAction::AActionType type, const PDFSDK_FieldAction& fa); virtual FX_BOOL IsActionDataChanged(CPDF_AAction::AActionType type, const PDFSDK_FieldAction& faOld, const PDFSDK_FieldAction& faNew); virtual void SaveState(CPDFSDK_PageView* pPageView); virtual void RestoreState(CPDFSDK_PageView* pPageView); - + virtual CPWL_Wnd* ResetPDFWindow(CPDFSDK_PageView* pPageView, FX_BOOL bRestoreValue); virtual void OnKeyStroke(FX_BOOL bKeyDown, FX_UINT nFlag); - + virtual FX_BOOL IsFieldFull(CPDFSDK_PageView* pPageView); - + public: virtual void OnSetFocus(CPWL_Wnd* pWnd); virtual void OnKillFocus(CPWL_Wnd* pWnd); - + public: virtual void OnAddUndo(CPWL_Edit* pEdit); - + public: - virtual FX_BOOL CanCopy(CPDFSDK_Document* pDocument); - virtual FX_BOOL CanCut(CPDFSDK_Document* pDocument); - virtual FX_BOOL CanPaste(CPDFSDK_Document* pDocument); - - virtual void DoCopy(CPDFSDK_Document* pDocument); - virtual void DoCut(CPDFSDK_Document* pDocument); - virtual void DoPaste(CPDFSDK_Document* pDocument); - + virtual FX_BOOL CanCopy(CPDFSDK_Document* pDocument); + virtual FX_BOOL CanCut(CPDFSDK_Document* pDocument); + virtual FX_BOOL CanPaste(CPDFSDK_Document* pDocument); + + virtual void DoCopy(CPDFSDK_Document* pDocument); + virtual void DoCut(CPDFSDK_Document* pDocument); + virtual void DoPaste(CPDFSDK_Document* pDocument); + private: CFX_WideString GetSelectExportText(); diff --git a/fpdfsdk/include/formfiller/FFL_FormFiller.h b/fpdfsdk/include/formfiller/FFL_FormFiller.h index 08dd25b27f..226766ceed 100644 --- a/fpdfsdk/include/formfiller/FFL_FormFiller.h +++ b/fpdfsdk/include/formfiller/FFL_FormFiller.h @@ -1,7 +1,7 @@ // Copyright 2014 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 FPDFSDK_INCLUDE_FORMFILLER_FFL_FORMFILLER_H_ @@ -38,10 +38,10 @@ public: virtual ~CFFL_FormFiller(); virtual FX_RECT GetViewBBox(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot); - virtual void OnDraw(CPDFSDK_PageView *pPageView, /*HDC hDC,*/ CPDFSDK_Annot* pAnnot, + virtual void OnDraw(CPDFSDK_PageView *pPageView, /*HDC hDC,*/ CPDFSDK_Annot* pAnnot, CFX_RenderDevice* pDevice, CPDF_Matrix* pUser2Device, /*const CRect& rcWindow, */FX_DWORD dwFlags); - virtual void OnDrawDeactive(CPDFSDK_PageView *pPageView, /*HDC hDC,*/ CPDFSDK_Annot* pAnnot, + virtual void OnDrawDeactive(CPDFSDK_PageView *pPageView, /*HDC hDC,*/ CPDFSDK_Annot* pAnnot, CFX_RenderDevice* pDevice, CPDF_Matrix* pUser2Device, /*const CRect& rcWindow, */FX_DWORD dwFlags); @@ -70,13 +70,13 @@ public: virtual FX_BOOL OnSetFocus(CPDFSDK_Annot* pAnnot, FX_UINT nFlag); virtual FX_BOOL OnKillFocus(CPDFSDK_Annot* pAnnot, FX_UINT nFlag); - virtual FX_BOOL CanCopy(CPDFSDK_Document* pDocument); - virtual FX_BOOL CanCut(CPDFSDK_Document* pDocument); - virtual FX_BOOL CanPaste(CPDFSDK_Document* pDocument); + virtual FX_BOOL CanCopy(CPDFSDK_Document* pDocument); + virtual FX_BOOL CanCut(CPDFSDK_Document* pDocument); + virtual FX_BOOL CanPaste(CPDFSDK_Document* pDocument); - virtual void DoCopy(CPDFSDK_Document* pDocument); - virtual void DoCut(CPDFSDK_Document* pDocument); - virtual void DoPaste(CPDFSDK_Document* pDocument); + virtual void DoCopy(CPDFSDK_Document* pDocument); + virtual void DoCut(CPDFSDK_Document* pDocument); + virtual void DoPaste(CPDFSDK_Document* pDocument); public: //CPWL_TimerHandler virtual void TimerProc(); @@ -88,9 +88,9 @@ public: virtual void GetActionData(CPDFSDK_PageView* pPageView, CPDF_AAction::AActionType type, PDFSDK_FieldAction& fa); - virtual void SetActionData(CPDFSDK_PageView* pPageView, CPDF_AAction::AActionType type, + virtual void SetActionData(CPDFSDK_PageView* pPageView, CPDF_AAction::AActionType type, const PDFSDK_FieldAction& fa); - virtual FX_BOOL IsActionDataChanged(CPDF_AAction::AActionType type, const PDFSDK_FieldAction& faOld, + virtual FX_BOOL IsActionDataChanged(CPDF_AAction::AActionType type, const PDFSDK_FieldAction& faOld, const PDFSDK_FieldAction& faNew); virtual void SaveState(CPDFSDK_PageView* pPageView); @@ -140,7 +140,7 @@ public: virtual void InvalidateRect(double left, double top, double right, double bottom); CPDFDoc_Environment* GetApp(){return m_pApp;} - CPDFSDK_Annot* GetSDKAnnot() {return m_pAnnot;} + CPDFSDK_Annot* GetSDKAnnot() {return m_pAnnot;} protected: CPDFDoc_Environment* m_pApp; CPDFSDK_Widget* m_pWidget; @@ -162,11 +162,11 @@ public: virtual FX_BOOL OnLButtonDown(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot, FX_UINT nFlags, const CPDF_Point& point); virtual FX_BOOL OnLButtonUp(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot, FX_UINT nFlags, const CPDF_Point& point); virtual FX_BOOL OnMouseMove(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot, FX_UINT nFlags, const CPDF_Point& point); - virtual void OnDraw(CPDFSDK_PageView *pPageView/*, HDC hDC*/, CPDFSDK_Annot* pAnnot, + virtual void OnDraw(CPDFSDK_PageView *pPageView/*, HDC hDC*/, CPDFSDK_Annot* pAnnot, CFX_RenderDevice* pDevice, CPDF_Matrix* pUser2Device, /*const CRect& rcWindow,*/ FX_DWORD dwFlags); - virtual void OnDrawDeactive(CPDFSDK_PageView *pPageView, /*HDC hDC,*/ CPDFSDK_Annot* pAnnot, + virtual void OnDrawDeactive(CPDFSDK_PageView *pPageView, /*HDC hDC,*/ CPDFSDK_Annot* pAnnot, CFX_RenderDevice* pDevice, CPDF_Matrix* pUser2Device, /*const CRect& rcWindow, */FX_DWORD dwFlags); protected: diff --git a/fpdfsdk/include/formfiller/FFL_ListBox.h b/fpdfsdk/include/formfiller/FFL_ListBox.h index b95ad725c2..81abec1cad 100644 --- a/fpdfsdk/include/formfiller/FFL_ListBox.h +++ b/fpdfsdk/include/formfiller/FFL_ListBox.h @@ -1,7 +1,7 @@ // Copyright 2014 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 FPDFSDK_INCLUDE_FORMFILLER_FFL_LISTBOX_H_ @@ -27,7 +27,7 @@ public: virtual void GetActionData(CPDFSDK_PageView* pPageView, CPDF_AAction::AActionType type, PDFSDK_FieldAction& fa); - virtual void SetActionData(CPDFSDK_PageView* pPageView, CPDF_AAction::AActionType type, + virtual void SetActionData(CPDFSDK_PageView* pPageView, CPDF_AAction::AActionType type, const PDFSDK_FieldAction& fa); virtual void SaveState(CPDFSDK_PageView* pPageView); diff --git a/fpdfsdk/include/formfiller/FFL_Notify.h b/fpdfsdk/include/formfiller/FFL_Notify.h index ae7b3dcf9b..051a25069f 100644 --- a/fpdfsdk/include/formfiller/FFL_Notify.h +++ b/fpdfsdk/include/formfiller/FFL_Notify.h @@ -1,7 +1,7 @@ // Copyright 2014 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 FPDFSDK_INCLUDE_FORMFILLER_FFL_NOTIFY_H_ @@ -16,25 +16,25 @@ class CPDF_FormField; class CFFL_Notify { public: - CFFL_Notify(CFFL_FormFiller * pFormFiller); + CFFL_Notify(CFFL_FormFiller * pFormFiller); virtual ~CFFL_Notify(); public: FX_BOOL OnSetFocus(FX_BOOL & bExit); FX_BOOL OnMouseEnter(FX_BOOL & bExit); FX_BOOL OnMouseDown(FX_BOOL & bExit); - FX_BOOL OnMouseUp(FX_BOOL & bExit); - FX_BOOL OnMouseExit(FX_BOOL & bExit); + FX_BOOL OnMouseUp(FX_BOOL & bExit); + FX_BOOL OnMouseExit(FX_BOOL & bExit); FX_BOOL OnKillFocus(FX_BOOL & bExit); FX_BOOL OnCalculate(); FX_BOOL OnFormat(int iCommitKey); - FX_BOOL OnValidate(CPDF_FormField* pFormField, CFX_WideString& strValue, CFX_WideString & strChange, + FX_BOOL OnValidate(CPDF_FormField* pFormField, CFX_WideString& strValue, CFX_WideString & strChange, const CFX_WideString& strChangeEx, FX_BOOL bKeyDown, FX_BOOL bModifier, FX_BOOL bShift, FX_BOOL & bRC); - FX_BOOL OnKeyStroke(CPDF_FormField* pFormField, int nCommitKey, CFX_WideString& strValue, CFX_WideString& strChange, + FX_BOOL OnKeyStroke(CPDF_FormField* pFormField, int nCommitKey, CFX_WideString& strValue, CFX_WideString& strChange, const CFX_WideString& strChangeEx, FX_BOOL bKeyDown, FX_BOOL bModifier, - FX_BOOL bShift, FX_BOOL bWillCommit, FX_BOOL bFieldFull, + FX_BOOL bShift, FX_BOOL bWillCommit, FX_BOOL bFieldFull, int& nSelStart, int& nSelEnd, FX_BOOL& bRC); void BeforeNotify(); diff --git a/fpdfsdk/include/formfiller/FFL_PushButton.h b/fpdfsdk/include/formfiller/FFL_PushButton.h index 4cf61a82d0..3cfaefb9bd 100644 --- a/fpdfsdk/include/formfiller/FFL_PushButton.h +++ b/fpdfsdk/include/formfiller/FFL_PushButton.h @@ -1,7 +1,7 @@ // Copyright 2014 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 FPDFSDK_INCLUDE_FORMFILLER_FFL_PUSHBUTTON_H_ @@ -18,7 +18,7 @@ public: virtual CPWL_Wnd* NewPDFWindow(const PWL_CREATEPARAM& cp, CPDFSDK_PageView* pPageView); virtual FX_BOOL OnChar(CPDFSDK_Annot* pAnnot, FX_UINT nChar, FX_UINT nFlags); - virtual void OnDraw(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot, + virtual void OnDraw(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot, CFX_RenderDevice* pDevice, CPDF_Matrix* pUser2Device, FX_DWORD dwFlags); }; diff --git a/fpdfsdk/include/formfiller/FFL_RadioButton.h b/fpdfsdk/include/formfiller/FFL_RadioButton.h index 8dba93307a..46332e07fd 100644 --- a/fpdfsdk/include/formfiller/FFL_RadioButton.h +++ b/fpdfsdk/include/formfiller/FFL_RadioButton.h @@ -1,7 +1,7 @@ // Copyright 2014 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 FPDFSDK_INCLUDE_FORMFILLER_FFL_RADIOBUTTON_H_ @@ -14,7 +14,7 @@ class CFFL_RadioButton : public CFFL_Button public: CFFL_RadioButton(CPDFDoc_Environment* pApp, CPDFSDK_Annot* pAnnot); virtual ~CFFL_RadioButton(); - + virtual CPWL_Wnd* NewPDFWindow(const PWL_CREATEPARAM& cp, CPDFSDK_PageView* pPageView); virtual FX_BOOL OnKeyDown(CPDFSDK_Annot* pAnnot, FX_UINT nKeyCode, FX_UINT nFlags); virtual FX_BOOL OnChar(CPDFSDK_Annot* pAnnot, FX_UINT nChar, FX_UINT nFlags); diff --git a/fpdfsdk/include/formfiller/FFL_TextField.h b/fpdfsdk/include/formfiller/FFL_TextField.h index fc7a2f8f34..cb8df3f9c4 100644 --- a/fpdfsdk/include/formfiller/FFL_TextField.h +++ b/fpdfsdk/include/formfiller/FFL_TextField.h @@ -1,7 +1,7 @@ // Copyright 2014 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 FPDFSDK_INCLUDE_FORMFILLER_FFL_TEXTFIELD_H_ @@ -27,45 +27,45 @@ class CFFL_TextField : public CFFL_FormFiller, public IPWL_FocusHandler, public public: CFFL_TextField(CPDFDoc_Environment* pApp, CPDFSDK_Annot* pAnnot); virtual ~CFFL_TextField(); - + virtual PWL_CREATEPARAM GetCreateParam(); virtual CPWL_Wnd* NewPDFWindow(const PWL_CREATEPARAM& cp, CPDFSDK_PageView* pPageView); - + virtual FX_BOOL OnChar(CPDFSDK_Annot* pAnnot, FX_UINT nChar, FX_UINT nFlags); - + virtual FX_BOOL IsDataChanged(CPDFSDK_PageView* pPageView); virtual void SaveData(CPDFSDK_PageView* pPageView); - + virtual void GetActionData(CPDFSDK_PageView* pPageView, CPDF_AAction::AActionType type, PDFSDK_FieldAction& fa); - virtual void SetActionData(CPDFSDK_PageView* pPageView, CPDF_AAction::AActionType type, + virtual void SetActionData(CPDFSDK_PageView* pPageView, CPDF_AAction::AActionType type, const PDFSDK_FieldAction& fa); - virtual FX_BOOL IsActionDataChanged(CPDF_AAction::AActionType type, const PDFSDK_FieldAction& faOld, + virtual FX_BOOL IsActionDataChanged(CPDF_AAction::AActionType type, const PDFSDK_FieldAction& faOld, const PDFSDK_FieldAction& faNew); virtual void SaveState(CPDFSDK_PageView* pPageView); virtual void RestoreState(CPDFSDK_PageView* pPageView); - + virtual CPWL_Wnd* ResetPDFWindow(CPDFSDK_PageView* pPageView, FX_BOOL bRestoreValue); - + virtual FX_BOOL IsFieldFull(CPDFSDK_PageView* pPageView); - + public: virtual void OnSetFocus(CPWL_Wnd* pWnd); virtual void OnKillFocus(CPWL_Wnd* pWnd); - + public: virtual void OnAddUndo(CPWL_Edit* pEdit); - + public: - virtual FX_BOOL CanCopy(CPDFSDK_Document* pDocument); - virtual FX_BOOL CanCut(CPDFSDK_Document* pDocument); - virtual FX_BOOL CanPaste(CPDFSDK_Document* pDocument); - - virtual void DoCopy(CPDFSDK_Document* pDocument); - virtual void DoCut(CPDFSDK_Document* pDocument); - virtual void DoPaste(CPDFSDK_Document* pDocument); - + virtual FX_BOOL CanCopy(CPDFSDK_Document* pDocument); + virtual FX_BOOL CanCut(CPDFSDK_Document* pDocument); + virtual FX_BOOL CanPaste(CPDFSDK_Document* pDocument); + + virtual void DoCopy(CPDFSDK_Document* pDocument); + virtual void DoCut(CPDFSDK_Document* pDocument); + virtual void DoPaste(CPDFSDK_Document* pDocument); + private: CBA_FontMap* m_pFontMap; FFL_TextFieldState m_State; diff --git a/fpdfsdk/include/formfiller/FFL_Utils.h b/fpdfsdk/include/formfiller/FFL_Utils.h index ff06a347e8..de9afafb56 100644 --- a/fpdfsdk/include/formfiller/FFL_Utils.h +++ b/fpdfsdk/include/formfiller/FFL_Utils.h @@ -1,7 +1,7 @@ // Copyright 2014 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 FPDFSDK_INCLUDE_FORMFILLER_FFL_UTILS_H_ diff --git a/fpdfsdk/include/fsdk_actionhandler.h b/fpdfsdk/include/fsdk_actionhandler.h index 2b38a5d5f6..311380ec98 100644 --- a/fpdfsdk/include/fsdk_actionhandler.h +++ b/fpdfsdk/include/fsdk_actionhandler.h @@ -1,7 +1,7 @@ // Copyright 2014 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 FPDFSDK_INCLUDE_FSDK_ACTIONHANDLER_H_ @@ -41,13 +41,13 @@ class CPDFSDK_ActionHandler /*: public CReader_ActionHandler*/ public: CPDFSDK_ActionHandler(CPDFDoc_Environment* pEvi); virtual ~CPDFSDK_ActionHandler(); - + virtual void Destroy(); virtual FX_BOOL DoAction_DocOpen(const CPDF_Action& action, CPDFSDK_Document* pDocument/*, CPDFSDK_DocView *pDocView*/); virtual FX_BOOL DoAction_JavaScript(const CPDF_Action& JsAction,CFX_WideString csJSName, CPDFSDK_Document* pDocument/*, CReader_DocView *pDocView*/); virtual FX_BOOL DoAction_Page(const CPDF_Action& action, enum CPDF_AAction::AActionType eType, CPDFSDK_Document* pDocument/*, CReader_DocView *pDocView*/); virtual FX_BOOL DoAction_Document(const CPDF_Action& action, enum CPDF_AAction::AActionType eType, CPDFSDK_Document* pDocument/*, CReader_DocView *pDocView*/); - virtual FX_BOOL DoAction_BookMark(CPDF_Bookmark *pBookMark, const CPDF_Action& action, CPDF_AAction::AActionType type, CPDFSDK_Document* pDocument/*, CReader_DocView *pDocView*/); + virtual FX_BOOL DoAction_BookMark(CPDF_Bookmark *pBookMark, const CPDF_Action& action, CPDF_AAction::AActionType type, CPDFSDK_Document* pDocument/*, CReader_DocView *pDocView*/); virtual FX_BOOL DoAction_Screen(const CPDF_Action& action, CPDF_AAction::AActionType type, CPDFSDK_Document* pDocument,/* CReader_DocView *pDocView,*/ CPDFSDK_Annot* pScreen); virtual FX_BOOL DoAction_Link(const CPDF_Action& action, CPDFSDK_Document* pDocument/*, CReader_DocView *pDocView*/); virtual FX_BOOL DoAction_Field(const CPDF_Action& action, CPDF_AAction::AActionType type, CPDFSDK_Document* pDocument, /*CReader_DocView *pDocView,*/ CPDF_FormField* pFormField, PDFSDK_FieldAction& data); @@ -55,7 +55,7 @@ public: public: void SetFormActionHandler(CPDFSDK_FormActionHandler* pHandler); void SetMediaActionHandler(CPDFSDK_MediaActionHandler* pHandler); - + private: FX_BOOL ExecuteDocumentOpenAction(const CPDF_Action& action, CPDFSDK_Document* pDocument, /*CReader_DocView *pDocView,*/ CFX_PtrList& list); FX_BOOL ExecuteDocumentPageAction(const CPDF_Action& action, CPDF_AAction::AActionType type, CPDFSDK_Document* pDocument, /*CReader_DocView *pDocView,*/ CFX_PtrList& list); @@ -63,23 +63,23 @@ private: FX_BOOL ExecuteScreenAction(const CPDF_Action& action, CPDF_AAction::AActionType type, CPDFSDK_Document* pDocument, /*CReader_DocView* pDocView,*/ CPDFSDK_Annot* pScreen, CFX_PtrList& list); FX_BOOL ExecuteBookMark(const CPDF_Action& action, CPDFSDK_Document* pDocument, /*CReader_DocView* pDocView,*/ CPDF_Bookmark* pBookmark, CFX_PtrList& list); FX_BOOL ExecuteLinkAction(const CPDF_Action& action, CPDFSDK_Document* pDocument, /*CReader_DocView* pDocView,*/ CFX_PtrList& list); - + void DoAction_NoJs(const CPDF_Action& action, CPDFSDK_Document* pDocument/*, CReader_DocView* pDocView*/); void RunDocumentPageJavaScript(CPDFSDK_Document* pDocument, CPDF_AAction::AActionType type, const CFX_WideString& script); void RunDocumentOpenJavaScript(CPDFSDK_Document* pDocument, const CFX_WideString& sScriptName, const CFX_WideString& script); void RunFieldJavaScript(CPDFSDK_Document* pDocument, CPDF_FormField* pFormField, CPDF_AAction::AActionType type, PDFSDK_FieldAction& data, const CFX_WideString& script); - + private: FX_BOOL IsValidField(CPDFSDK_Document* pDocument, CPDF_Dictionary* pFieldDict); FX_BOOL IsValidDocView(CPDFSDK_Document* pDocument/*, CReader_DocView* pDocView*/); - + void DoAction_GoTo(CPDFSDK_Document* pDocument, /*CReader_DocView *pDocView,*/ const CPDF_Action& action); void DoAction_GoToR(CPDFSDK_Document* pDocument, const CPDF_Action& action); void DoAction_Launch(CPDFSDK_Document* pDocument, const CPDF_Action& action); void DoAction_URI(CPDFSDK_Document* pDocument, const CPDF_Action& action); void DoAction_Named(CPDFSDK_Document* pDocument, const CPDF_Action& action); void DoAction_SetOCGState(CPDFSDK_Document* pDocument, /*CReader_DocView* pDocView,*/ const CPDF_Action& action); - + private: CPDFSDK_FormActionHandler* m_pFormActionHandler; CPDFSDK_MediaActionHandler* m_pMediaActionHandler; diff --git a/fpdfsdk/include/fsdk_annothandler.h b/fpdfsdk/include/fsdk_annothandler.h index be7b4650e7..ce3c20d0e0 100644 --- a/fpdfsdk/include/fsdk_annothandler.h +++ b/fpdfsdk/include/fsdk_annothandler.h @@ -1,7 +1,7 @@ // Copyright 2014 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 FPDFSDK_INCLUDE_FSDK_ANNOTHANDLER_H_ @@ -32,7 +32,7 @@ public: virtual CFX_ByteString GetName() = 0; virtual FX_BOOL CanAnswer(CPDFSDK_Annot* pAnnot) = 0; - + virtual CPDFSDK_Annot* NewAnnot(CPDF_Annot* pAnnot, CPDFSDK_PageView* pPage) = 0; @@ -41,23 +41,23 @@ public: virtual void ReleaseAnnot(CPDFSDK_Annot* pAnnot) = 0; virtual void DeleteAnnot(CPDFSDK_Annot* pAnnot) = 0; - + virtual CPDF_Rect GetViewBBox(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot) = 0; - + virtual FX_BOOL HitTest(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot, const CPDF_Point& point) = 0; - - virtual void OnDraw(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot, + + virtual void OnDraw(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot, CFX_RenderDevice* pDevice, CPDF_Matrix* pUser2Device, FX_DWORD dwFlags) = 0; - - virtual void OnDrawSleep(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot, + + virtual void OnDrawSleep(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot, CFX_RenderDevice* pDevice, CPDF_Matrix* pUser2Device, const CPDF_Rect& rcWindow, FX_DWORD dwFlags) = 0; - - + + virtual void OnCreate(CPDFSDK_Annot* pAnnot) = 0; @@ -66,11 +66,11 @@ public: virtual void OnDelete(CPDFSDK_Annot* pAnnot) = 0; virtual void OnRelease(CPDFSDK_Annot* pAnnot) = 0; - + virtual void OnMouseEnter(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot, FX_DWORD nFlag) = 0; virtual void OnMouseExit(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot, FX_DWORD nFlag) = 0; - + virtual FX_BOOL OnLButtonDown(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot, FX_DWORD nFlags, const CPDF_Point& point) = 0; virtual FX_BOOL OnLButtonUp(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot, FX_DWORD nFlags, const CPDF_Point& point) = 0; @@ -105,7 +105,7 @@ public: virtual CFX_ByteString GetType() {return CFX_ByteString("Widget");} virtual CFX_ByteString GetName() {return CFX_ByteString("WidgetHandler");} - + virtual FX_BOOL CanAnswer(CPDFSDK_Annot* pAnnot); virtual CPDFSDK_Annot* NewAnnot(CPDF_Annot* pAnnot, CPDFSDK_PageView* pPage); @@ -115,21 +115,21 @@ public: virtual void ReleaseAnnot(CPDFSDK_Annot* pAnnot) ; virtual void DeleteAnnot(CPDFSDK_Annot* pAnnot) {} - + virtual CPDF_Rect GetViewBBox(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot) ; - + virtual FX_BOOL HitTest(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot, const CPDF_Point& point); - - virtual void OnDraw(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot, + + virtual void OnDraw(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot, CFX_RenderDevice* pDevice, CPDF_Matrix* pUser2Device, FX_DWORD dwFlags) ; - - virtual void OnDrawSleep(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot, + + virtual void OnDrawSleep(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot, CFX_RenderDevice* pDevice, CPDF_Matrix* pUser2Device, const CPDF_Rect& rcWindow, FX_DWORD dwFlags) {} - + virtual void OnCreate(CPDFSDK_Annot* pAnnot) ; @@ -138,11 +138,11 @@ public: virtual void OnDelete(CPDFSDK_Annot* pAnnot) {} virtual void OnRelease(CPDFSDK_Annot* pAnnot) {} - + virtual void OnMouseEnter(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot, FX_DWORD nFlag) ; virtual void OnMouseExit(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot, FX_DWORD nFlag) ; - + virtual FX_BOOL OnLButtonDown(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot, FX_DWORD nFlags, const CPDF_Point& point) ; virtual FX_BOOL OnLButtonUp(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot, FX_DWORD nFlags, const CPDF_Point& point) ; @@ -152,7 +152,7 @@ public: virtual FX_BOOL OnRButtonDown(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot, FX_DWORD nFlags, const CPDF_Point& point) ; virtual FX_BOOL OnRButtonUp(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot, FX_DWORD nFlags, const CPDF_Point& point) ; virtual FX_BOOL OnRButtonDblClk(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot, FX_DWORD nFlags, const CPDF_Point& point) {return FALSE;} - + //by wjm. virtual FX_BOOL OnChar(CPDFSDK_Annot* pAnnot, FX_DWORD nChar, FX_DWORD nFlags); virtual FX_BOOL OnKeyDown(CPDFSDK_Annot* pAnnot, int nKeyCode, int nFlag); @@ -201,11 +201,11 @@ public: virtual FX_BOOL HitTest(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot, const CPDF_Point& point); - virtual void OnDraw(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot, + virtual void OnDraw(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot, CFX_RenderDevice* pDevice, CPDF_Matrix* pUser2Device, FX_DWORD dwFlags); - virtual void OnDrawSleep(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot, + virtual void OnDrawSleep(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot, CFX_RenderDevice* pDevice, CPDF_Matrix* pUser2Device, const CPDF_Rect& rcWindow, FX_DWORD dwFlags) {} @@ -268,7 +268,7 @@ public: virtual CPDFSDK_Annot* NewAnnot(CPDF_Annot * pAnnot, CPDFSDK_PageView *pPageView); virtual CPDFSDK_Annot* NewAnnot(IXFA_Widget* pAnnot, CPDFSDK_PageView* pPageView); virtual void ReleaseAnnot(CPDFSDK_Annot * pAnnot); - + virtual void Annot_OnCreate(CPDFSDK_Annot* pAnnot); virtual void Annot_OnLoad(CPDFSDK_Annot* pAnnot); public: @@ -282,7 +282,7 @@ public: virtual FX_BOOL Annot_OnLButtonDown(CPDFSDK_PageView * pPageView, CPDFSDK_Annot* pAnnot, FX_DWORD nFlags, const CPDF_Point& point); virtual FX_BOOL Annot_OnLButtonUp(CPDFSDK_PageView * pPageView, CPDFSDK_Annot* pAnnot, FX_DWORD nFlags, const CPDF_Point& point); virtual FX_BOOL Annot_OnLButtonDblClk(CPDFSDK_PageView * pPageView, CPDFSDK_Annot* pAnnot, FX_DWORD nFlags, const CPDF_Point& point); - + virtual FX_BOOL Annot_OnMouseMove(CPDFSDK_PageView * pPageView, CPDFSDK_Annot* pAnnot, FX_DWORD nFlags, const CPDF_Point& point); virtual FX_BOOL Annot_OnMouseWheel(CPDFSDK_PageView * pPageView, CPDFSDK_Annot* pAnnot, FX_DWORD nFlags, short zDelta, const CPDF_Point& point); virtual FX_BOOL Annot_OnRButtonDown(CPDFSDK_PageView * pPageView, CPDFSDK_Annot* pAnnot, FX_DWORD nFlags, const CPDF_Point& point); @@ -321,7 +321,7 @@ public: virtual ~CPDFSDK_AnnotIterator() { } virtual CPDFSDK_Annot* Next (const CPDFSDK_Annot* pCurrent) ; - virtual CPDFSDK_Annot* Prev (const CPDFSDK_Annot* pCurrent) ; + virtual CPDFSDK_Annot* Prev (const CPDFSDK_Annot* pCurrent) ; virtual CPDFSDK_Annot* Next(int& index ) ; virtual CPDFSDK_Annot* Prev(int& index ) ; virtual int Count(){return m_pIteratorAnnotList.GetSize();} diff --git a/fpdfsdk/include/fsdk_baseannot.h b/fpdfsdk/include/fsdk_baseannot.h index 04b384d596..b71e128cfb 100644 --- a/fpdfsdk/include/fsdk_baseannot.h +++ b/fpdfsdk/include/fsdk_baseannot.h @@ -1,7 +1,7 @@ // Copyright 2014 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 FPDFSDK_INCLUDE_FSDK_BASEANNOT_H_ @@ -27,15 +27,15 @@ class CFX_RenderDevice; #define CFX_IntArray CFX_ArrayTemplate -class CPDFSDK_DateTime +class CPDFSDK_DateTime { public: CPDFSDK_DateTime(); CPDFSDK_DateTime(const CFX_ByteString& dtStr); CPDFSDK_DateTime(const CPDFSDK_DateTime& datetime); CPDFSDK_DateTime(const FX_SYSTEMTIME& st); - - + + CPDFSDK_DateTime& operator = (const CPDFSDK_DateTime& datetime); CPDFSDK_DateTime& operator = (const FX_SYSTEMTIME& st); FX_BOOL operator == (CPDFSDK_DateTime& datetime); @@ -43,9 +43,9 @@ public: FX_BOOL operator > (CPDFSDK_DateTime& datetime); FX_BOOL operator >= (CPDFSDK_DateTime& datetime); FX_BOOL operator < (CPDFSDK_DateTime& datetime); - FX_BOOL operator <= (CPDFSDK_DateTime& datetime); + FX_BOOL operator <= (CPDFSDK_DateTime& datetime); operator time_t(); - + CPDFSDK_DateTime& FromPDFDateTimeString(const CFX_ByteString& dtStr); CFX_ByteString ToCommonDateTimeString(); CFX_ByteString ToPDFDateTimeString(); @@ -53,9 +53,9 @@ public: CPDFSDK_DateTime ToGMT(); CPDFSDK_DateTime& AddDays(short days); CPDFSDK_DateTime& AddSeconds(int seconds); - + void ResetDateTime(); - + struct FX_DATETIME { int16_t year; @@ -84,7 +84,7 @@ public: virtual CPDF_Annot* GetPDFAnnot() { return NULL; } virtual IXFA_Widget* GetXFAWidget() { return NULL; } - + virtual CFX_ByteString GetType() const { return ""; } virtual CFX_ByteString GetSubType() const { return ""; } @@ -96,24 +96,24 @@ public: public: CPDF_Page* GetPDFPage(); CPDFXFA_Page* GetPDFXFAPage(); - + void SetPage(CPDFSDK_PageView* pPageView) { m_pPageView = pPageView; } CPDFSDK_PageView* GetPageView() { return m_pPageView; } - - // Tab Order + + // Tab Order int GetTabOrder(); void SetTabOrder(int iTabOrder); - + // Selection FX_BOOL IsSelected(); void SetSelected(FX_BOOL bSelected); - + protected: CPDF_Annot* m_pAnnot; CPDFSDK_PageView* m_pPageView; FX_BOOL m_bSelected; int m_nTabOrder; - + }; class CPDFSDK_BAAnnot : public CPDFSDK_Annot @@ -136,13 +136,13 @@ public: virtual void Annot_OnDraw(CFX_RenderDevice* pDevice, CPDF_Matrix* pUser2Device,CPDF_RenderOptions* pOptions); public: CPDF_Dictionary* GetAnnotDict() const; - + void SetContents(const CFX_WideString& sContents); CFX_WideString GetContents() const; - + void SetAnnotName(const CFX_WideString& sName); CFX_WideString GetAnnotName() const; - + void SetModifiedDate(const FX_SYSTEMTIME& st); FX_SYSTEMTIME GetModifiedDate() const; @@ -151,47 +151,47 @@ public: void SetAppState(const CFX_ByteString& str); CFX_ByteString GetAppState() const; - + void SetStructParent(int key); int GetStructParent() const; - + //border void SetBorderWidth(int nWidth); int GetBorderWidth() const; - + //BBS_SOLID //BBS_DASH //BBS_BEVELED //BBS_INSET //BBS_UNDERLINE - + void SetBorderStyle(int nStyle); int GetBorderStyle() const; - + void SetBorderDash(const CFX_IntArray& array); void GetBorderDash(CFX_IntArray& array) const; - + //The background of the annotation's icon when closed //The title bar of the annotation's pop-up window //The border of a link annotation - + void SetColor(FX_COLORREF color); void RemoveColor(); FX_BOOL GetColor(FX_COLORREF& color) const; - + FX_BOOL IsVisible() const; //action CPDF_Action GetAction() const; void SetAction(const CPDF_Action& a); void RemoveAction(); - + CPDF_AAction GetAAction() const; void SetAAction(const CPDF_AAction& aa); void RemoveAAction(); - + virtual CPDF_Action GetAAction(CPDF_AAction::AActionType eAAT); - + public: virtual FX_BOOL IsAppearanceValid(); virtual FX_BOOL IsAppearanceValid(CPDF_Annot::AppearanceMode mode); @@ -199,11 +199,11 @@ public: CPDF_Annot::AppearanceMode mode, const CPDF_RenderOptions* pOptions); void DrawBorder(CFX_RenderDevice* pDevice, const CPDF_Matrix* pUser2Device, const CPDF_RenderOptions* pOptions); - + void ClearCachedAP(); - + virtual void ResetAppearance(); - void WriteAppearance(const CFX_ByteString& sAPType, const CPDF_Rect& rcBBox, + void WriteAppearance(const CFX_ByteString& sAPType, const CPDF_Rect& rcBBox, const CPDF_Matrix& matrix, const CFX_ByteString& sContents, const CFX_ByteString& sAPState = ""); diff --git a/fpdfsdk/include/fsdk_baseform.h b/fpdfsdk/include/fsdk_baseform.h index 88b3b1d42e..7d9b01e587 100644 --- a/fpdfsdk/include/fsdk_baseform.h +++ b/fpdfsdk/include/fsdk_baseform.h @@ -1,7 +1,7 @@ // Copyright 2014 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 FPDFSDK_INCLUDE_FSDK_BASEFORM_H_ @@ -50,7 +50,7 @@ typedef struct _PDFSDK_FieldAction bFieldFull = FALSE; bRC = TRUE; } - + FX_BOOL bModifier; //in FX_BOOL bShift; //in int nCommitKey; //in @@ -78,9 +78,9 @@ public: void SynchronizeXFAValue(); void SynchronizeXFAItems(); - static void SynchronizeXFAValue(IXFA_DocView* pXFADocView, IXFA_Widget* hWidget, + static void SynchronizeXFAValue(IXFA_DocView* pXFADocView, IXFA_Widget* hWidget, CPDF_FormField* pFormField, CPDF_FormControl* pFormControl); - static void SynchronizeXFAItems(IXFA_DocView* pXFADocView, IXFA_Widget* hWidget, + static void SynchronizeXFAItems(IXFA_DocView* pXFADocView, IXFA_Widget* hWidget, CPDF_FormField* pFormField, CPDF_FormControl* pFormControl); public: @@ -88,7 +88,7 @@ public: virtual ~CPDFSDK_Widget(); virtual CFX_ByteString GetSubType() const; - + virtual CPDF_Action GetAAction(CPDF_AAction::AActionType eAAT); int GetFieldType() const; @@ -100,7 +100,7 @@ public: FIELDFLAG_REQUIRED FIELDFLAG_NOEXPORT */ - + int GetFieldFlags() const; int GetRotate() const; @@ -140,9 +140,9 @@ public: void ResetFieldAppearance(FX_BOOL bValueChanged); void UpdateField(); CFX_WideString OnFormat(FX_BOOL& bFormated); - + //Message. - FX_BOOL OnAAction(CPDF_AAction::AActionType type, PDFSDK_FieldAction& data, + FX_BOOL OnAAction(CPDF_AAction::AActionType type, PDFSDK_FieldAction& data, CPDFSDK_PageView* pPageView); CPDFSDK_InterForm* GetInterForm() const {return m_pInterForm;} @@ -151,14 +151,14 @@ public: static CPDF_FormControl* GetFormControl(CPDF_InterForm* pInterForm, CPDF_Dictionary* pAnnotDict); void DrawShadow(CFX_RenderDevice* pDevice, CPDFSDK_PageView* pPageView); - + void SetAppModified(); void ClearAppModified(); FX_BOOL IsAppModified() const; - + int32_t GetAppearanceAge() const; int32_t GetValueAge() const; - + private: void ResetAppearance_PushButton(); void ResetAppearance_CheckBox(); @@ -166,18 +166,18 @@ private: void ResetAppearance_ComboBox(const FX_WCHAR* sValue); void ResetAppearance_ListBox(); void ResetAppearance_TextField(const FX_WCHAR* sValue); - + CPDF_Rect GetClientRect() const; CPDF_Rect GetRotatedRect() const; - + CFX_ByteString GetBackgroundAppStream() const; CFX_ByteString GetBorderAppStream() const; CPDF_Matrix GetMatrix() const; - + CPWL_Color GetTextPWLColor() const; CPWL_Color GetBorderPWLColor() const; CPWL_Color GetFillPWLColor() const; - + void AddImageToAppearance(const CFX_ByteString& sAPType, CPDF_Stream* pImage); void RemoveAppearance(const CFX_ByteString& sAPType); public: @@ -228,26 +228,26 @@ class CPDFSDK_InterForm : public CPDF_FormNotify public: CPDFSDK_InterForm(CPDFSDK_Document* pDocument); virtual ~CPDFSDK_InterForm(); - + public: virtual void Destroy(); virtual CPDF_InterForm* GetInterForm(); - + CPDFSDK_Document* GetDocument(); FX_BOOL HighlightWidgets(); - + CPDFSDK_Widget* GetSibling(CPDFSDK_Widget* pWidget, FX_BOOL bNext) const; CPDFSDK_Widget* GetWidget(CPDF_FormControl* pControl) const; void GetWidgets(const CFX_WideString& sFieldName, CFX_PtrArray& widgets); void GetWidgets(CPDF_FormField* pField, CFX_PtrArray& widgets); - + void AddMap(CPDF_FormControl* pControl, CPDFSDK_Widget* pWidget); void RemoveMap(CPDF_FormControl* pControl); - + void AddXFAMap(IXFA_Widget* hWidget, CPDFSDK_XFAWidget* pWidget); void RemoveXFAMap(IXFA_Widget* hWidget); CPDFSDK_XFAWidget* GetXFAWidget(IXFA_Widget* hWidget); - + void EnableCalculate(FX_BOOL bEnabled); FX_BOOL IsCalculateEnabled() const; @@ -265,27 +265,27 @@ public: void OnValidate(CPDF_FormField* pFormField, CFX_WideString& csValue, FX_BOOL& bRC); void OnCalculate(CPDF_FormField* pFormField = NULL); CFX_WideString OnFormat(CPDF_FormField* pFormField, FX_BOOL& bFormated); - + void ResetFieldAppearance(CPDF_FormField* pFormField, const FX_WCHAR* sValue, FX_BOOL bValueChanged); void UpdateField(CPDF_FormField* pFormField); - + public: FX_BOOL DoAction_Hide(const CPDF_Action& action); FX_BOOL DoAction_SubmitForm(const CPDF_Action& action); FX_BOOL DoAction_ResetForm(const CPDF_Action& action); FX_BOOL DoAction_ImportData(const CPDF_Action& action); - + void GetFieldFromObjects(const CFX_PtrArray& objects, CFX_PtrArray& fields); FX_BOOL IsValidField(CPDF_Dictionary* pFieldDict); - FX_BOOL SubmitFields(const CFX_WideString& csDestination, const CFX_PtrArray& fields, + FX_BOOL SubmitFields(const CFX_WideString& csDestination, const CFX_PtrArray& fields, FX_BOOL bIncludeOrExclude, FX_BOOL bUrlEncoded); FX_BOOL SubmitForm(const CFX_WideString& sDestination, FX_BOOL bUrlEncoded); FX_BOOL ExportFormToFDFTextBuf(CFX_ByteTextBuf& textBuf); FX_BOOL ExportFieldsToFDFTextBuf(const CFX_PtrArray& fields,FX_BOOL bIncludeOrExclude, CFX_ByteTextBuf& textBuf); CFX_WideString GetTemporaryFileName(const CFX_WideString& sFileExt); - + void SynchronizeField(CPDF_FormField* pFormField, FX_BOOL bSynchronizeElse); - + private: virtual int BeforeValueChange(const CPDF_FormField* pField, CFX_WideString& csValue); virtual int AfterValueChange(const CPDF_FormField* pField); @@ -296,13 +296,13 @@ private: virtual int AfterFormReset(const CPDF_InterForm* pForm); virtual int BeforeFormImportData(const CPDF_InterForm* pForm); virtual int AfterFormImportData(const CPDF_InterForm* pForm); - + private: FX_BOOL FDFToURLEncodedData(CFX_WideString csFDFFile, CFX_WideString csTxtFile); FX_BOOL FDFToURLEncodedData(uint8_t*& pBuf, FX_STRSIZE& nBufSize); int GetPageIndexByAnnotDict(CPDF_Document* pDocument, CPDF_Dictionary* pAnnotDict) const; void DoFDFBuffer(CFX_ByteString sBuffer); - + private: CPDFSDK_Document* m_pDocument; CPDF_InterForm* m_pInterForm; diff --git a/fpdfsdk/include/fsdk_common.h b/fpdfsdk/include/fsdk_common.h index bc7cbcb711..b243cd4ab7 100644 --- a/fpdfsdk/include/fsdk_common.h +++ b/fpdfsdk/include/fsdk_common.h @@ -1,7 +1,7 @@ // Copyright 2014 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 FPDFSDK_INCLUDE_FSDK_COMMON_H_ diff --git a/fpdfsdk/include/fsdk_define.h b/fpdfsdk/include/fsdk_define.h index c21dd88ca9..5c0e88a44a 100644 --- a/fpdfsdk/include/fsdk_define.h +++ b/fpdfsdk/include/fsdk_define.h @@ -1,7 +1,7 @@ // Copyright 2014 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 FPDFSDK_INCLUDE_FSDK_DEFINE_H_ @@ -12,13 +12,13 @@ #include #endif -#include "../../core/include/fpdfapi/fpdf_parser.h" -#include "../../core/include/fpdfapi/fpdfapi.h" -#include "../../core/include/fpdfapi/fpdf_parser.h" -#include "../../core/include/fpdfapi/fpdf_module.h" -#include "../../core/include/fpdfapi/fpdf_render.h" -#include "../../core/include/fpdfapi/fpdf_pageobj.h" -#include "../../core/include/fpdfapi/fpdf_serial.h" +#include "../../core/include/fpdfapi/fpdf_parser.h" +#include "../../core/include/fpdfapi/fpdfapi.h" +#include "../../core/include/fpdfapi/fpdf_parser.h" +#include "../../core/include/fpdfapi/fpdf_module.h" +#include "../../core/include/fpdfapi/fpdf_render.h" +#include "../../core/include/fpdfapi/fpdf_pageobj.h" +#include "../../core/include/fpdfapi/fpdf_serial.h" #include "../../core/include/fpdftext/fpdf_text.h" @@ -27,10 +27,10 @@ #include "../../core/include/fxcodec/fx_codec.h" -#include "../../core/include/fpdfdoc/fpdf_doc.h" -#include "../../core/include/fpdfdoc/fpdf_vt.h" +#include "../../core/include/fpdfdoc/fpdf_doc.h" +#include "../../core/include/fpdfdoc/fpdf_vt.h" -#include "../../core/include/fxcrt/fx_xml.h" +#include "../../core/include/fxcrt/fx_xml.h" #include "../../xfa/include/fxbarcode/BC_BarCode.h" #include "../../xfa/include/fxjse/fxjse.h" #include "../../xfa/include/fxgraphics/fx_graphics.h" @@ -71,7 +71,7 @@ #define FX_COLORREFTOARGB(rgb) ((FX_DWORD)0xFF000000|(((FX_DWORD)rgb & 0x000000FF) << 16)|((FX_DWORD)rgb & 0x0000FF00)|(((FX_DWORD)rgb & 0x00FF0000) >> 16)) #endif -typedef unsigned int FX_UINT; +typedef unsigned int FX_UINT; #include "../../public/fpdfview.h" diff --git a/fpdfsdk/include/fsdk_rendercontext.h b/fpdfsdk/include/fsdk_rendercontext.h index fff7031b55..b2bc163b49 100644 --- a/fpdfsdk/include/fsdk_rendercontext.h +++ b/fpdfsdk/include/fsdk_rendercontext.h @@ -1,7 +1,7 @@ // Copyright 2014 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 FPDFSDK_INCLUDE_FSDK_RENDERCONTEXT_H_ @@ -11,14 +11,14 @@ #include "fsdk_define.h" // Everything about rendering is put here: for OOM recovery -class CRenderContext +class CRenderContext { public: CRenderContext() { Clear(); } ~CRenderContext(); - + void Clear(); - + CFX_RenderDevice* m_pDevice; CPDF_RenderContext* m_pContext; CPDF_ProgressiveRenderer* m_pRenderer; @@ -35,7 +35,7 @@ class IFSDK_PAUSE_Adapter : public IFX_Pause public: IFSDK_PAUSE_Adapter(IFSDK_PAUSE* IPause ); FX_BOOL NeedToPauseNow(); - + private: IFSDK_PAUSE* m_IPause; }; diff --git a/fpdfsdk/include/fx_systemhandler.h b/fpdfsdk/include/fx_systemhandler.h index e398f78b88..bf59e452ea 100644 --- a/fpdfsdk/include/fx_systemhandler.h +++ b/fpdfsdk/include/fx_systemhandler.h @@ -1,7 +1,7 @@ // Copyright 2014 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 FPDFSDK_INCLUDE_FX_SYSTEMHANDLER_H_ @@ -11,7 +11,7 @@ typedef void* FX_HWND; typedef void* FX_HMENU; typedef void (*TimerCallback)(int32_t idEvent); -typedef struct _FX_SYSTEMTIME +typedef struct _FX_SYSTEMTIME { _FX_SYSTEMTIME() : wYear(0), @@ -51,16 +51,16 @@ public: virtual CFX_WideString GetClipboardText(FX_HWND hWnd) = 0; virtual FX_BOOL SetClipboardText(FX_HWND hWnd, CFX_WideString string) = 0; - + virtual void ClientToScreen(FX_HWND hWnd, int32_t& x, int32_t& y) = 0; virtual void ScreenToClient(FX_HWND hWnd, int32_t& x, int32_t& y) = 0; /*cursor style - FXCT_ARROW - FXCT_NESW - FXCT_NWSE - FXCT_VBEAM - FXCT_HBEAM + FXCT_ARROW + FXCT_NESW + FXCT_NWSE + FXCT_VBEAM + FXCT_HBEAM FXCT_HAND */ virtual void SetCursor(int32_t nCursorType) = 0; @@ -86,7 +86,7 @@ public: virtual FX_SYSTEMTIME GetLocalTime() = 0; - virtual int32_t GetCharSet() = 0; + virtual int32_t GetCharSet() = 0; virtual void SetCharSet(int32_t nCharSet) = 0; }; diff --git a/fpdfsdk/include/fxedit/fx_edit.h b/fpdfsdk/include/fxedit/fx_edit.h index f710cddaa7..bf46e91819 100644 --- a/fpdfsdk/include/fxedit/fx_edit.h +++ b/fpdfsdk/include/fxedit/fx_edit.h @@ -1,7 +1,7 @@ // Copyright 2014 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 FPDFSDK_INCLUDE_FXEDIT_FX_EDIT_H_ @@ -58,7 +58,7 @@ struct CPVT_WordRange; #ifndef DEFAULT_CHARSET #define DEFAULT_CHARSET 1 -#endif +#endif class IFX_Edit_FontMap { @@ -81,12 +81,12 @@ class IFX_Edit_Notify public: virtual ~IFX_Edit_Notify() { } //set the horizontal scrollbar information. - virtual void IOnSetScrollInfoX(FX_FLOAT fPlateMin, FX_FLOAT fPlateMax, - FX_FLOAT fContentMin, FX_FLOAT fContentMax, + virtual void IOnSetScrollInfoX(FX_FLOAT fPlateMin, FX_FLOAT fPlateMax, + FX_FLOAT fContentMin, FX_FLOAT fContentMax, FX_FLOAT fSmallStep, FX_FLOAT fBigStep) = 0; //set the vertical scrollbar information. - virtual void IOnSetScrollInfoY(FX_FLOAT fPlateMin, FX_FLOAT fPlateMax, - FX_FLOAT fContentMin, FX_FLOAT fContentMax, + virtual void IOnSetScrollInfoY(FX_FLOAT fPlateMin, FX_FLOAT fPlateMax, + FX_FLOAT fContentMin, FX_FLOAT fContentMax, FX_FLOAT fSmallStep, FX_FLOAT fBigStep) = 0; //set the position of horizontal scrollbar. virtual void IOnSetScrollPosX(FX_FLOAT fx) = 0; @@ -134,14 +134,14 @@ public: virtual FX_BOOL NextWord() = 0; //move the current position to the next line. virtual FX_BOOL NextLine() = 0; - //move the current position to the next section. + //move the current position to the next section. virtual FX_BOOL NextSection() = 0; //move the current position to the previous word. virtual FX_BOOL PrevWord() = 0; //move the current position to the previous line. virtual FX_BOOL PrevLine() = 0; - //move the current position to the previous section. + //move the current position to the previous section. virtual FX_BOOL PrevSection() = 0; //get the information of the current word. @@ -217,7 +217,7 @@ public: virtual void SetLineLeading(FX_FLOAT fLineLeading, FX_BOOL bPaint = TRUE) = 0; //if set, CRLF is allowed. virtual void SetMultiLine(FX_BOOL bMultiLine = TRUE, FX_BOOL bPaint = TRUE) = 0; - //if set, all words auto fit the width of the bounding box. + //if set, all words auto fit the width of the bounding box. virtual void SetAutoReturn(FX_BOOL bAuto = TRUE, FX_BOOL bPaint = TRUE) = 0; //if set, a font size is calculated to full fit the bounding box. virtual void SetAutoFontSize(FX_BOOL bAuto = TRUE, FX_BOOL bPaint = TRUE) = 0; @@ -233,13 +233,13 @@ public: //set the edit is richedit. virtual void SetRichText(FX_BOOL bRichText = TRUE, FX_BOOL bPaint = TRUE) = 0; //set the fontsize of selected text. - virtual FX_BOOL SetRichFontSize(FX_FLOAT fFontSize) = 0; + virtual FX_BOOL SetRichFontSize(FX_FLOAT fFontSize) = 0; //set the fontindex of selected text, user can change the font of selected text. virtual FX_BOOL SetRichFontIndex(int32_t nFontIndex) = 0; //set the textcolor of selected text. virtual FX_BOOL SetRichTextColor(FX_COLORREF dwColor) = 0; //set the text script type of selected text. (0:normal 1:superscript 2:subscript) - virtual FX_BOOL SetRichTextScript(int32_t nScriptType) = 0; + virtual FX_BOOL SetRichTextScript(int32_t nScriptType) = 0; //set the bold font style of selected text. virtual FX_BOOL SetRichTextBold(FX_BOOL bBold = TRUE) = 0; //set the italic font style of selected text. @@ -267,7 +267,7 @@ public: //select all the text. virtual void SelectAll() = 0; //set text is not selected. - virtual void SelectNone() = 0; + virtual void SelectNone() = 0; //get the caret position. virtual int32_t GetCaret() const = 0; virtual CPVT_WordPlace GetCaretWordPlace() const = 0; @@ -276,7 +276,7 @@ public: //get the text conent virtual CFX_WideString GetText() const = 0; //query if any text is selected. - virtual FX_BOOL IsSelected() const = 0; + virtual FX_BOOL IsSelected() const = 0; //get the scroll origin virtual CPDF_Point GetScrollPos() const = 0; //get the bounding box of the text area. @@ -310,18 +310,18 @@ public: //put text into edit. virtual void SetText(const FX_WCHAR* text,int32_t charset = DEFAULT_CHARSET, - const CPVT_SecProps * pSecProps = NULL,const CPVT_WordProps * pWordProps = NULL) = 0; + const CPVT_SecProps * pSecProps = NULL,const CPVT_WordProps * pWordProps = NULL) = 0; //insert a word into the edit. virtual FX_BOOL InsertWord(FX_WORD word, int32_t charset = DEFAULT_CHARSET, const CPVT_WordProps * pWordProps = NULL) = 0; //insert a return into the edit. - virtual FX_BOOL InsertReturn(const CPVT_SecProps * pSecProps = NULL,const CPVT_WordProps * pWordProps = NULL) = 0; + virtual FX_BOOL InsertReturn(const CPVT_SecProps * pSecProps = NULL,const CPVT_WordProps * pWordProps = NULL) = 0; //insert text into the edit. virtual FX_BOOL InsertText(const FX_WCHAR* text, int32_t charset = DEFAULT_CHARSET, const CPVT_SecProps * pSecProps = NULL,const CPVT_WordProps * pWordProps = NULL) = 0; //do backspace operation. virtual FX_BOOL Backspace() = 0; //do delete operation. - virtual FX_BOOL Delete() = 0; + virtual FX_BOOL Delete() = 0; //delete the selected text. virtual FX_BOOL Clear() = 0; @@ -334,7 +334,7 @@ public: //arrange all words over again virtual void Paint() = 0; - + //allow to refresh screen? virtual void EnableRefresh(FX_BOOL bRefresh) = 0; @@ -392,15 +392,15 @@ public: virtual void AddUndoItem(IFX_Edit_UndoItem* pUndoItem) = 0; - static CFX_ByteString GetEditAppearanceStream(IFX_Edit* pEdit, const CPDF_Point & ptOffset, - const CPVT_WordRange* pRange = NULL, + static CFX_ByteString GetEditAppearanceStream(IFX_Edit* pEdit, const CPDF_Point & ptOffset, + const CPVT_WordRange* pRange = NULL, FX_BOOL bContinuous = TRUE, FX_WORD SubWord = 0); static CFX_ByteString GetSelectAppearanceStream(IFX_Edit* pEdit, const CPDF_Point & ptOffset, const CPVT_WordRange* pRange = NULL); static void DrawEdit(CFX_RenderDevice* pDevice, CPDF_Matrix* pUser2Device, IFX_Edit* pEdit, FX_COLORREF crTextFill, FX_COLORREF crTextStroke, const CPDF_Rect& rcClip, const CPDF_Point& ptOffset, const CPVT_WordRange* pRange, IFX_SystemHandler* pSystemHandler, void* pFFLData); static void DrawUnderline(CFX_RenderDevice* pDevice, CPDF_Matrix* pUser2Device, IFX_Edit* pEdit, FX_COLORREF color, const CPDF_Rect& rcClip, const CPDF_Point& ptOffset, const CPVT_WordRange* pRange); - static void DrawRichEdit(CFX_RenderDevice* pDevice, CPDF_Matrix* pUser2Device, IFX_Edit* pEdit, + static void DrawRichEdit(CFX_RenderDevice* pDevice, CPDF_Matrix* pUser2Device, IFX_Edit* pEdit, const CPDF_Rect& rcClip, const CPDF_Point& ptOffset, const CPVT_WordRange* pRange); static void GeneratePageObjects(CPDF_PageObjects* pPageObjects, IFX_Edit* pEdit, const CPDF_Point& ptOffset, const CPVT_WordRange* pRange, FX_COLORREF crText, CFX_ArrayTemplate& ObjArray); @@ -418,12 +418,12 @@ class IFX_List_Notify public: virtual ~IFX_List_Notify() { } //set the horizontal scrollbar information. - virtual void IOnSetScrollInfoX(FX_FLOAT fPlateMin, FX_FLOAT fPlateMax, - FX_FLOAT fContentMin, FX_FLOAT fContentMax, + virtual void IOnSetScrollInfoX(FX_FLOAT fPlateMin, FX_FLOAT fPlateMax, + FX_FLOAT fContentMin, FX_FLOAT fContentMax, FX_FLOAT fSmallStep, FX_FLOAT fBigStep) = 0; //set the vertical scrollbar information. - virtual void IOnSetScrollInfoY(FX_FLOAT fPlateMin, FX_FLOAT fPlateMax, - FX_FLOAT fContentMin, FX_FLOAT fContentMax, + virtual void IOnSetScrollInfoY(FX_FLOAT fPlateMin, FX_FLOAT fPlateMax, + FX_FLOAT fContentMin, FX_FLOAT fContentMax, FX_FLOAT fSmallStep, FX_FLOAT fBigStep) = 0; //set the position of horizontal scrollbar. virtual void IOnSetScrollPosX(FX_FLOAT fx) = 0; @@ -453,23 +453,23 @@ public: virtual int32_t GetCount() const = 0; virtual FX_BOOL IsItemSelected(int32_t nIndex) const = 0; virtual FX_FLOAT GetFirstHeight() const = 0; - + virtual void SetMultipleSel(FX_BOOL bMultiple) = 0; - virtual FX_BOOL IsMultipleSel() const = 0; + virtual FX_BOOL IsMultipleSel() const = 0; virtual FX_BOOL IsValid(int32_t nItemIndex) const = 0; - virtual int32_t FindNext(int32_t nIndex,FX_WCHAR nChar) const = 0; + virtual int32_t FindNext(int32_t nIndex,FX_WCHAR nChar) const = 0; virtual void SetScrollPos(const CPDF_Point & point) = 0; virtual void ScrollToListItem(int32_t nItemIndex) = 0; virtual CPDF_Rect GetItemRect(int32_t nIndex) const = 0; virtual int32_t GetCaret() const = 0; - virtual int32_t GetSelect() const = 0; + virtual int32_t GetSelect() const = 0; virtual int32_t GetTopItem() const = 0; virtual int32_t GetItemIndex(const CPDF_Point & point) const = 0; virtual int32_t GetFirstSelected() const = 0; virtual void AddString(const FX_WCHAR* string) = 0; - virtual void SetTopItem(int32_t nIndex) = 0; + virtual void SetTopItem(int32_t nIndex) = 0; virtual void Select(int32_t nItemIndex) = 0; virtual void SetCaret(int32_t nItemIndex) = 0; virtual void Empty() = 0; diff --git a/fpdfsdk/include/fxedit/fxet_edit.h b/fpdfsdk/include/fxedit/fxet_edit.h index d92f29067a..7a2742f0ee 100644 --- a/fpdfsdk/include/fxedit/fxet_edit.h +++ b/fpdfsdk/include/fxedit/fxet_edit.h @@ -1,7 +1,7 @@ // Copyright 2014 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 FPDFSDK_INCLUDE_FXEDIT_FXET_EDIT_H_ @@ -313,10 +313,10 @@ private: private: CFX_ArrayTemplate m_UndoItemStack; - + int32_t m_nCurUndoPos; int32_t m_nBufSize; - FX_BOOL m_bModified; + FX_BOOL m_bModified; FX_BOOL m_bVirgin; FX_BOOL m_bWorking; }; @@ -507,8 +507,8 @@ private: class CFXEU_SetSecProps : public CFX_Edit_UndoItem { public: - CFXEU_SetSecProps(CFX_Edit * pEdit, const CPVT_WordPlace & place, EDIT_PROPS_E ep, - const CPVT_SecProps & oldsecprops, const CPVT_WordProps & oldwordprops, + CFXEU_SetSecProps(CFX_Edit * pEdit, const CPVT_WordPlace & place, EDIT_PROPS_E ep, + const CPVT_SecProps & oldsecprops, const CPVT_WordProps & oldwordprops, const CPVT_SecProps & newsecprops, const CPVT_WordProps & newwordprops, const CPVT_WordRange & range); virtual ~CFXEU_SetSecProps(); @@ -524,13 +524,13 @@ private: CPVT_SecProps m_OldSecProps; CPVT_SecProps m_NewSecProps; CPVT_WordProps m_OldWordProps; - CPVT_WordProps m_NewWordProps; + CPVT_WordProps m_NewWordProps; }; class CFXEU_SetWordProps : public CFX_Edit_UndoItem { public: - CFXEU_SetWordProps(CFX_Edit * pEdit, const CPVT_WordPlace & place, EDIT_PROPS_E ep, + CFXEU_SetWordProps(CFX_Edit * pEdit, const CPVT_WordPlace & place, EDIT_PROPS_E ep, const CPVT_WordProps & oldprops, const CPVT_WordProps & newprops, const CPVT_WordRange & range); virtual ~CFXEU_SetWordProps(); @@ -542,9 +542,9 @@ private: CPVT_WordPlace m_wpPlace; CPVT_WordRange m_wrPlace; EDIT_PROPS_E m_eProps; - + CPVT_WordProps m_OldWordProps; - CPVT_WordProps m_NewWordProps; + CPVT_WordProps m_NewWordProps; }; /* ------------------------- CFX_Edit ---------------------------- */ @@ -559,14 +559,14 @@ class CFX_Edit : public IFX_Edit friend class CFXEU_Clear; friend class CFXEU_ClearRich; friend class CFXEU_SetSecProps; - friend class CFXEU_SetWordProps; + friend class CFXEU_SetWordProps; friend class CFXEU_InsertText; public: CFX_Edit(IPDF_VariableText * pVT); virtual ~CFX_Edit(); - void SetFontMap(IFX_Edit_FontMap * pFontMap); + void SetFontMap(IFX_Edit_FontMap * pFontMap); void SetVTProvider(IPDF_VariableText_Provider* pProvider); void SetNotify(IFX_Edit_Notify * pNotify); void SetOprNotify(IFX_Edit_OprNotify* pOprNotify); @@ -588,18 +588,18 @@ public: void SetLineLeading(FX_FLOAT fLineLeading, FX_BOOL bPaint = TRUE); void SetMultiLine(FX_BOOL bMultiLine = TRUE, FX_BOOL bPaint = TRUE); void SetAutoReturn(FX_BOOL bAuto = TRUE, FX_BOOL bPaint = TRUE); - void SetAutoFontSize(FX_BOOL bAuto = TRUE, FX_BOOL bPaint = TRUE); - void SetAutoScroll(FX_BOOL bAuto = TRUE, FX_BOOL bPaint = TRUE); + void SetAutoFontSize(FX_BOOL bAuto = TRUE, FX_BOOL bPaint = TRUE); + void SetAutoScroll(FX_BOOL bAuto = TRUE, FX_BOOL bPaint = TRUE); void SetFontSize(FX_FLOAT fFontSize, FX_BOOL bPaint = TRUE); void SetTextOverflow(FX_BOOL bAllowed = FALSE, FX_BOOL bPaint = TRUE); FX_BOOL IsRichText() const; void SetRichText(FX_BOOL bRichText = TRUE, FX_BOOL bPaint = TRUE); - FX_BOOL SetRichFontSize(FX_FLOAT fFontSize); + FX_BOOL SetRichFontSize(FX_FLOAT fFontSize); FX_BOOL SetRichFontIndex(int32_t nFontIndex); FX_BOOL SetRichTextColor(FX_COLORREF dwColor); FX_BOOL SetRichTextScript(int32_t nScriptType); - FX_BOOL SetRichTextBold(FX_BOOL bBold = TRUE); + FX_BOOL SetRichTextBold(FX_BOOL bBold = TRUE); FX_BOOL SetRichTextItalic(FX_BOOL bItalic = TRUE); FX_BOOL SetRichTextUnderline(FX_BOOL bUnderline = TRUE); FX_BOOL SetRichTextCrossout(FX_BOOL bCrossout = TRUE); @@ -619,23 +619,23 @@ public: void OnVK_END(FX_BOOL bShift,FX_BOOL bCtrl); void SetText(const FX_WCHAR* text,int32_t charset = DEFAULT_CHARSET, - const CPVT_SecProps * pSecProps = NULL,const CPVT_WordProps * pWordProps = NULL); + const CPVT_SecProps * pSecProps = NULL,const CPVT_WordProps * pWordProps = NULL); FX_BOOL InsertWord(FX_WORD word, int32_t charset = DEFAULT_CHARSET, const CPVT_WordProps * pWordProps = NULL); FX_BOOL InsertReturn(const CPVT_SecProps * pSecProps = NULL,const CPVT_WordProps * pWordProps = NULL); FX_BOOL Backspace(); - FX_BOOL Delete(); + FX_BOOL Delete(); FX_BOOL Clear(); FX_BOOL Empty(); FX_BOOL InsertText(const FX_WCHAR* text, int32_t charset = DEFAULT_CHARSET, const CPVT_SecProps * pSecProps = NULL,const CPVT_WordProps * pWordProps = NULL); FX_BOOL Redo(); - FX_BOOL Undo(); - CPVT_WordPlace DoInsertText(const CPVT_WordPlace& place, const FX_WCHAR* text, int32_t charset, + FX_BOOL Undo(); + CPVT_WordPlace DoInsertText(const CPVT_WordPlace& place, const FX_WCHAR* text, int32_t charset, const CPVT_SecProps * pSecProps, const CPVT_WordProps * pWordProps); int32_t GetCharSetFromUnicode(FX_WORD word, int32_t nOldCharset); int32_t WordPlaceToWordIndex(const CPVT_WordPlace & place) const; - CPVT_WordPlace WordIndexToWordPlace(int32_t index) const; + CPVT_WordPlace WordIndexToWordPlace(int32_t index) const; CPVT_WordPlace GetLineBeginPlace(const CPVT_WordPlace & place) const; CPVT_WordPlace GetLineEndPlace(const CPVT_WordPlace & place) const; @@ -680,19 +680,19 @@ private: void EnableNotify(FX_BOOL bNotify); void SetText(const FX_WCHAR* text,int32_t charset, - const CPVT_SecProps * pSecProps,const CPVT_WordProps * pWordProps,FX_BOOL bAddUndo, FX_BOOL bPaint); + const CPVT_SecProps * pSecProps,const CPVT_WordProps * pWordProps,FX_BOOL bAddUndo, FX_BOOL bPaint); FX_BOOL InsertWord(FX_WORD word, int32_t charset, const CPVT_WordProps * pWordProps,FX_BOOL bAddUndo, FX_BOOL bPaint); FX_BOOL InsertReturn(const CPVT_SecProps * pSecProps,const CPVT_WordProps * pWordProps,FX_BOOL bAddUndo, FX_BOOL bPaint); FX_BOOL Backspace(FX_BOOL bAddUndo, FX_BOOL bPaint); - FX_BOOL Delete(FX_BOOL bAddUndo, FX_BOOL bPaint); + FX_BOOL Delete(FX_BOOL bAddUndo, FX_BOOL bPaint); FX_BOOL Clear(FX_BOOL bAddUndo, FX_BOOL bPaint); FX_BOOL InsertText(const FX_WCHAR* text, int32_t charset, const CPVT_SecProps * pSecProps,const CPVT_WordProps * pWordProps,FX_BOOL bAddUndo, FX_BOOL bPaint); FX_BOOL SetRichTextProps(EDIT_PROPS_E eProps, const CPVT_SecProps * pSecProps, const CPVT_WordProps * pWordProps); - FX_BOOL SetSecProps(EDIT_PROPS_E eProps, const CPVT_WordPlace & place, + FX_BOOL SetSecProps(EDIT_PROPS_E eProps, const CPVT_WordPlace & place, const CPVT_SecProps * pSecProps, const CPVT_WordProps * pWordProps, const CPVT_WordRange & wr, FX_BOOL bAddUndo); - FX_BOOL SetWordProps(EDIT_PROPS_E eProps, const CPVT_WordPlace & place, + FX_BOOL SetWordProps(EDIT_PROPS_E eProps, const CPVT_WordPlace & place, const CPVT_WordProps * pWordProps, const CPVT_WordRange & wr, FX_BOOL bAddUndo); void PaintSetProps(EDIT_PROPS_E eProps, const CPVT_WordRange & wr); void PaintInsertText(const CPVT_WordPlace & wpOld, const CPVT_WordPlace & wpNew); @@ -739,7 +739,7 @@ private: FX_FLOAT GetLineTop(const CPVT_WordPlace& place) const; FX_FLOAT GetLineBottom(const CPVT_WordPlace& place) const; -private: +private: IPDF_VariableText* m_pVT; IFX_Edit_Notify* m_pNotify; IFX_Edit_OprNotify* m_pOprNotify; @@ -751,8 +751,8 @@ private: CPDF_Point m_ptScrollPos; CPDF_Point m_ptRefreshScrollPos; - FX_BOOL m_bEnableScroll; - IFX_Edit_Iterator * m_pIterator; + FX_BOOL m_bEnableScroll; + IFX_Edit_Iterator * m_pIterator; CFX_Edit_Refresh m_Refresh; CPDF_Point m_ptCaret; CFX_Edit_Undo m_Undo; diff --git a/fpdfsdk/include/javascript/Consts.h b/fpdfsdk/include/javascript/Consts.h index f7ddc5215b..d04cc6b54c 100644 --- a/fpdfsdk/include/javascript/Consts.h +++ b/fpdfsdk/include/javascript/Consts.h @@ -1,7 +1,7 @@ // Copyright 2014 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 FPDFSDK_INCLUDE_JAVASCRIPT_CONSTS_H_ diff --git a/fpdfsdk/include/javascript/Document.h b/fpdfsdk/include/javascript/Document.h index ab1ddb8633..b3725e77af 100644 --- a/fpdfsdk/include/javascript/Document.h +++ b/fpdfsdk/include/javascript/Document.h @@ -1,7 +1,7 @@ // Copyright 2014 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 FPDFSDK_INCLUDE_JAVASCRIPT_DOCUMENT_H_ @@ -14,7 +14,7 @@ class PrintParamsObj : public CJS_EmbedObj public: PrintParamsObj(CJS_Object* pJSObject); virtual ~PrintParamsObj(){} - + public: FX_BOOL bUI; int nStart; @@ -31,7 +31,7 @@ class CJS_PrintParamsObj : public CJS_Object public: CJS_PrintParamsObj(JSFXObject pObject) : CJS_Object(pObject) {} virtual ~CJS_PrintParamsObj(){} - + DECLARE_JS_CLASS(CJS_PrintParamsObj); }; @@ -158,7 +158,7 @@ public: FX_BOOL submitForm(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError); FX_BOOL mailDoc(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError); FX_BOOL removeIcon(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError); - + public: void AttachDoc(CPDFSDK_Document* pDoc); CPDFSDK_Document* GetReaderDoc(); @@ -169,7 +169,7 @@ public: void AddDelayAnnotData(CJS_AnnotObj *pData); void DoAnnotDelay(); void SetIsolate(v8::Isolate* isolate) {m_isolate = isolate;} - CJS_Document* GetCJSDoc() const; + CJS_Document* GetCJSDoc() const; private: CFX_WideString ReversalStr(CFX_WideString cbFrom); @@ -194,7 +194,7 @@ public: CJS_Document(JSFXObject pObject) : CJS_Object(pObject) {}; virtual ~CJS_Document(){}; - virtual FX_BOOL InitInstance(IFXJS_Context* cc); + virtual FX_BOOL InitInstance(IFXJS_Context* cc); DECLARE_JS_CLASS(CJS_Document); diff --git a/fpdfsdk/include/javascript/Field.h b/fpdfsdk/include/javascript/Field.h index 573fb392c0..70d1d39b48 100644 --- a/fpdfsdk/include/javascript/Field.h +++ b/fpdfsdk/include/javascript/Field.h @@ -1,7 +1,7 @@ // Copyright 2014 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 FPDFSDK_INCLUDE_JAVASCRIPT_FIELD_H_ @@ -100,7 +100,7 @@ struct CJS_DelayData class Field : public CJS_EmbedObj { public: - Field(CJS_Object* pJSObject); + Field(CJS_Object* pJSObject); virtual ~Field(void); FX_BOOL alignment(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); @@ -221,12 +221,12 @@ public: static void SetValue(CPDFSDK_Document* pDocument, const CFX_WideString& swFieldName, int nControlIndex, const CJS_WideStringArray& strArray); public: - static void AddField(CPDFSDK_Document* pDocument, int nPageIndex, int nFieldType, + static void AddField(CPDFSDK_Document* pDocument, int nPageIndex, int nFieldType, const CFX_WideString& sName, const CPDF_Rect& rcCoords); public: - static void UpdateFormField(CPDFSDK_Document* pDocument, CPDF_FormField* pFormField, + static void UpdateFormField(CPDFSDK_Document* pDocument, CPDF_FormField* pFormField, FX_BOOL bChangeMark, FX_BOOL bResetAP, FX_BOOL bRefresh); - static void UpdateFormControl(CPDFSDK_Document* pDocument, CPDF_FormControl* pFormControl, + static void UpdateFormControl(CPDFSDK_Document* pDocument, CPDF_FormControl* pFormControl, FX_BOOL bChangeMark, FX_BOOL bResetAP, FX_BOOL bRefresh); static CPDFSDK_Widget* GetWidget(CPDFSDK_Document* pDocument, CPDF_FormControl* pFormControl); diff --git a/fpdfsdk/include/javascript/IJavaScript.h b/fpdfsdk/include/javascript/IJavaScript.h index ddab4cfde7..a8bdd65468 100644 --- a/fpdfsdk/include/javascript/IJavaScript.h +++ b/fpdfsdk/include/javascript/IJavaScript.h @@ -1,7 +1,7 @@ // Copyright 2014 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 FPDFSDK_INCLUDE_JAVASCRIPT_IJAVASCRIPT_H_ @@ -47,7 +47,7 @@ public: virtual void OnField_Format(CPDF_FormField* pTarget, CFX_WideString& Value, FX_BOOL bWillCommit) = 0; virtual void OnField_Keystroke(CFX_WideString& strChange, const CFX_WideString& strChangeEx, FX_BOOL KeyDown, FX_BOOL bModifier, int &nSelEnd,int &nSelStart, FX_BOOL bShift, - CPDF_FormField* pTarget, CFX_WideString& Value, FX_BOOL bWillCommit, + CPDF_FormField* pTarget, CFX_WideString& Value, FX_BOOL bWillCommit, FX_BOOL bFieldFull, FX_BOOL &bRc) = 0; virtual void OnField_Validate(CFX_WideString& strChange, const CFX_WideString& strChangeEx, FX_BOOL bKeyDown, FX_BOOL bModifier, FX_BOOL bShift, CPDF_FormField* pTarget, CFX_WideString& Value, FX_BOOL& bRc) = 0; diff --git a/fpdfsdk/include/javascript/Icon.h b/fpdfsdk/include/javascript/Icon.h index 20a3bb8f68..0298005f00 100644 --- a/fpdfsdk/include/javascript/Icon.h +++ b/fpdfsdk/include/javascript/Icon.h @@ -1,7 +1,7 @@ // Copyright 2014 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 FPDFSDK_INCLUDE_JAVASCRIPT_ICON_H_ diff --git a/fpdfsdk/include/javascript/JS_Context.h b/fpdfsdk/include/javascript/JS_Context.h index f63b289992..060bb55937 100644 --- a/fpdfsdk/include/javascript/JS_Context.h +++ b/fpdfsdk/include/javascript/JS_Context.h @@ -1,7 +1,7 @@ // Copyright 2014 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 FPDFSDK_INCLUDE_JAVASCRIPT_JS_CONTEXT_H_ @@ -38,7 +38,7 @@ public: virtual void OnPage_Close(CPDFSDK_Document* pTarget); virtual void OnPage_InView(CPDFSDK_Document* pTarget); virtual void OnPage_OutView(CPDFSDK_Document* pTarget); - + virtual void OnField_MouseDown(FX_BOOL bModifier, FX_BOOL bShift, CPDF_FormField *pTarget); virtual void OnField_MouseEnter(FX_BOOL bModifier, FX_BOOL bShift, CPDF_FormField *pTarget); virtual void OnField_MouseExit(FX_BOOL bModifier, FX_BOOL bShift, CPDF_FormField *pTarget); @@ -50,7 +50,7 @@ public: virtual void OnField_Format(CPDF_FormField* pTarget, CFX_WideString& Value, FX_BOOL bWillCommit); virtual void OnField_Keystroke(CFX_WideString& strChange, const CFX_WideString& strChangeEx, FX_BOOL bKeyDown, FX_BOOL bModifier, int &nSelEnd,int &nSelStart, FX_BOOL bShift, - CPDF_FormField* pTarget, CFX_WideString& Value, FX_BOOL bWillCommit, + CPDF_FormField* pTarget, CFX_WideString& Value, FX_BOOL bWillCommit, FX_BOOL bFieldFull, FX_BOOL &bRc); virtual void OnField_Validate(CFX_WideString& strChange, const CFX_WideString& strChangeEx, FX_BOOL bKeyDown, FX_BOOL bModifier, FX_BOOL bShift, CPDF_FormField* pTarget, CFX_WideString& Value, FX_BOOL& bRc); @@ -83,14 +83,14 @@ public: FX_BOOL DoJob(int nMode, const CFX_WideString& script, CFX_WideString& info); - CJS_EventHandler* GetEventHandler(){return m_pEventHandler;}; + CJS_EventHandler* GetEventHandler(){return m_pEventHandler;}; CPDFSDK_Document* GetReaderDocument(); private: - CJS_Runtime* m_pRuntime; - CJS_EventHandler* m_pEventHandler; + CJS_Runtime* m_pRuntime; + CJS_EventHandler* m_pEventHandler; - FX_BOOL m_bBusy; + FX_BOOL m_bBusy; FX_BOOL m_bMsgBoxEnable; }; diff --git a/fpdfsdk/include/javascript/JS_Define.h b/fpdfsdk/include/javascript/JS_Define.h index 15f236d681..7ad7f57166 100644 --- a/fpdfsdk/include/javascript/JS_Define.h +++ b/fpdfsdk/include/javascript/JS_Define.h @@ -1,7 +1,7 @@ // Copyright 2014 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 FPDFSDK_INCLUDE_JAVASCRIPT_JS_DEFINE_H_ diff --git a/fpdfsdk/include/javascript/JS_EventHandler.h b/fpdfsdk/include/javascript/JS_EventHandler.h index 8389831970..62afb829e7 100644 --- a/fpdfsdk/include/javascript/JS_EventHandler.h +++ b/fpdfsdk/include/javascript/JS_EventHandler.h @@ -1,7 +1,7 @@ // Copyright 2014 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 FPDFSDK_INCLUDE_JAVASCRIPT_JS_EVENTHANDLER_H_ @@ -78,12 +78,12 @@ public: void OnPage_Close(CPDFSDK_Document* pDoc); void OnPage_InView(CPDFSDK_Document* pTarget); void OnPage_OutView(CPDFSDK_Document* pTarget); - + void OnField_Calculate(CPDF_FormField* pSource, CPDF_FormField* pTarget, CFX_WideString& Value, FX_BOOL& bRc); void OnField_Format(CPDF_FormField* pTarget, CFX_WideString& Value, FX_BOOL bWillCommit); void OnField_Keystroke(CFX_WideString& strChange, const CFX_WideString& strChangeEx, FX_BOOL KeyDown, FX_BOOL bModifier, int &nSelEnd,int &nSelStart, FX_BOOL bShift, - CPDF_FormField* pTarget, CFX_WideString& Value, FX_BOOL bWillCommit, + CPDF_FormField* pTarget, CFX_WideString& Value, FX_BOOL bWillCommit, FX_BOOL bFieldFull, FX_BOOL &bRc); void OnField_Validate(CFX_WideString& strChange, const CFX_WideString& strChangeEx, FX_BOOL bKeyDown, FX_BOOL bModifier, FX_BOOL bShift, CPDF_FormField* pTarget, CFX_WideString& Value, FX_BOOL& bRc); @@ -119,7 +119,7 @@ public: void Destroy(); FX_BOOL IsValid(); - + CFX_WideString& Change(); CFX_WideString ChangeEx(); int CommitKey(); @@ -138,7 +138,7 @@ public: FX_BOOL WillCommit(); CFX_WideString TargetName(); - JS_EVENT_T EventType() {return m_eEventType;}; + JS_EVENT_T EventType() {return m_eEventType;}; public: CJS_Context* m_pJSContext; diff --git a/fpdfsdk/include/javascript/JS_GlobalData.h b/fpdfsdk/include/javascript/JS_GlobalData.h index fea082d811..bbc0b12173 100644 --- a/fpdfsdk/include/javascript/JS_GlobalData.h +++ b/fpdfsdk/include/javascript/JS_GlobalData.h @@ -1,7 +1,7 @@ // Copyright 2014 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 FPDFSDK_INCLUDE_JAVASCRIPT_JS_GLOBALDATA_H_ @@ -74,15 +74,15 @@ public: FX_BOOL SetGlobalVariablePersistent(const FX_CHAR* propname, FX_BOOL bPersistent); FX_BOOL DeleteGlobalVariable(const FX_CHAR* propname); - + int32_t GetSize() const; CJS_GlobalData_Element* GetAt(int index) const; private: void LoadGlobalPersistentVariables(); void SaveGlobalPersisitentVariables(); - - CJS_GlobalData_Element* GetGlobalVariable(const FX_CHAR* propname); + + CJS_GlobalData_Element* GetGlobalVariable(const FX_CHAR* propname); int FindGlobalVariable(const FX_CHAR* propname); void LoadFileBuffer(const FX_WCHAR* sFilePath, uint8_t*& pBuffer, int32_t& nLength); diff --git a/fpdfsdk/include/javascript/JS_Object.h b/fpdfsdk/include/javascript/JS_Object.h index 803f6ba35e..abfc818079 100644 --- a/fpdfsdk/include/javascript/JS_Object.h +++ b/fpdfsdk/include/javascript/JS_Object.h @@ -17,7 +17,7 @@ class CJS_Object; class CJS_Timer; class CJS_Context; -class CJS_EmbedObj +class CJS_EmbedObj { public: CJS_EmbedObj(CJS_Object* pJSObject); @@ -39,7 +39,7 @@ protected: CJS_Object* m_pJSObject; }; -class CJS_Object +class CJS_Object { public: CJS_Object(JSFXObject pObject); diff --git a/fpdfsdk/include/javascript/JS_Runtime.h b/fpdfsdk/include/javascript/JS_Runtime.h index 950d43fa47..a5c98ee0dd 100644 --- a/fpdfsdk/include/javascript/JS_Runtime.h +++ b/fpdfsdk/include/javascript/JS_Runtime.h @@ -1,7 +1,7 @@ // Copyright 2014 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 FPDFSDK_INCLUDE_JAVASCRIPT_JS_RUNTIME_H_ diff --git a/fpdfsdk/include/javascript/JS_Value.h b/fpdfsdk/include/javascript/JS_Value.h index 4381bd55a6..6186817fa5 100644 --- a/fpdfsdk/include/javascript/JS_Value.h +++ b/fpdfsdk/include/javascript/JS_Value.h @@ -1,7 +1,7 @@ // Copyright 2014 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 FPDFSDK_INCLUDE_JAVASCRIPT_JS_VALUE_H_ diff --git a/fpdfsdk/include/javascript/PublicMethods.h b/fpdfsdk/include/javascript/PublicMethods.h index ba38503017..cff9e11479 100644 --- a/fpdfsdk/include/javascript/PublicMethods.h +++ b/fpdfsdk/include/javascript/PublicMethods.h @@ -1,7 +1,7 @@ // Copyright 2014 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 FPDFSDK_INCLUDE_JAVASCRIPT_PUBLICMETHODS_H_ @@ -35,7 +35,7 @@ public: static FX_BOOL AFMakeNumber(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError); static FX_BOOL AFSimple_Calculate(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError); static FX_BOOL AFRange_Validate(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError); - static FX_BOOL AFMergeChange(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError); + static FX_BOOL AFMergeChange(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError); static FX_BOOL AFParseDateEx(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError); static FX_BOOL AFExtractNums(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError); @@ -56,7 +56,7 @@ public: JS_STATIC_GLOBAL_FUN(AFSpecial_Keystroke); JS_STATIC_GLOBAL_FUN(AFSpecial_KeystrokeEx); JS_STATIC_GLOBAL_FUN(AFSimple); - JS_STATIC_GLOBAL_FUN(AFMakeNumber); + JS_STATIC_GLOBAL_FUN(AFMakeNumber); JS_STATIC_GLOBAL_FUN(AFSimple_Calculate); JS_STATIC_GLOBAL_FUN(AFRange_Validate); JS_STATIC_GLOBAL_FUN(AFMergeChange); @@ -64,7 +64,7 @@ public: JS_STATIC_GLOBAL_FUN(AFExtractNums); JS_STATIC_DECLARE_GLOBAL_FUN(); - + public: static int ParseStringInteger(const CFX_WideString & string,int nStart,int & nSkip, int nMaxStep); static CFX_WideString ParseStringString(const CFX_WideString& string, int nStart, int& nSkip); diff --git a/fpdfsdk/include/javascript/app.h b/fpdfsdk/include/javascript/app.h index 7e51f73135..ac90e62b0d 100644 --- a/fpdfsdk/include/javascript/app.h +++ b/fpdfsdk/include/javascript/app.h @@ -1,7 +1,7 @@ // Copyright 2014 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 FPDFSDK_INCLUDE_JAVASCRIPT_APP_H_ @@ -20,11 +20,11 @@ class TimerObj : public CJS_EmbedObj public: TimerObj(CJS_Object* pJSObject); virtual ~TimerObj(); - + public: void SetTimer(CJS_Timer* pTimer); CJS_Timer* GetTimer() const; - + private: CJS_Timer* m_pTimer; }; @@ -34,13 +34,13 @@ class CJS_TimerObj : public CJS_Object public: CJS_TimerObj(JSFXObject pObject) : CJS_Object(pObject) {} virtual ~CJS_TimerObj(){} - + DECLARE_JS_CLASS(CJS_TimerObj); }; // struct APP_MENUITEM_ARRAY; -// +// // struct APP_MENUITEM // { // APP_MENUITEM() : oSubMenu(NULL), cName(L""), cReturn(L""), bMarked(false), bEnabled(true) @@ -57,7 +57,7 @@ public: // { // APP_MENUITEM_ARRAY() : m_hMenu(NULL), pContents(NULL), nSize(0) // { -// +// // } // APP_MENUITEM * pContents; // HMENU m_hMenu; @@ -71,21 +71,21 @@ public: // pContent(NULL) // { // } -// +// // APP_MENU* pContent; // }; // struct APP_MENU // { -// APP_MENU():bSubMenu(false), +// APP_MENU():bSubMenu(false), // SubMenuItems(NULL), // cwMenuItemName(L""), // hMenu(NULL), // iSize(0) // { -// +// // } -// +// // APP_MENU(CFX_WideString &cwName): // cwMenuItemName(cwName), // bSubMenu(false), @@ -93,11 +93,11 @@ public: // hMenu(NULL), // iSize(0) // { -// +// // } -// +// // CFX_WideString cwMenuItemName; -// bool bSubMenu; +// bool bSubMenu; // APP_MENU_ARRAY* SubMenuItems; // int iSize; // HMENU hMenu; @@ -121,7 +121,7 @@ public: FX_BOOL runtimeHighlight(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); FX_BOOL viewerType(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); FX_BOOL viewerVariation(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); - FX_BOOL viewerVersion(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); + FX_BOOL viewerVersion(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); FX_BOOL alert(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError); @@ -147,7 +147,7 @@ public: FX_BOOL setTimeOut(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError); private: -// FX_DWORD AppGetTickCount(); +// FX_DWORD AppGetTickCount(); void TimerProc(CJS_Timer* pTimer); void RunJsScript(CJS_Runtime * pRuntime,const CFX_WideString & wsScript); // void ParsePopupMenuObj(APP_MENUITEM * ppMenuItem,JSObject * pObj); @@ -165,12 +165,12 @@ public: private: - bool m_bCalculate; + bool m_bCalculate; bool m_bRuntimeHighLight; CFX_ArrayTemplate m_aTimer; // APP_MENU* m_pMenuHead; - + public: // static CReader_App* s_App; }; @@ -194,7 +194,7 @@ public: JS_STATIC_PROP(runtimeHighlight, app); JS_STATIC_PROP(viewerType, app); JS_STATIC_PROP(viewerVariation, app); - JS_STATIC_PROP(viewerVersion, app); + JS_STATIC_PROP(viewerVersion, app); JS_STATIC_METHOD(alert, app); JS_STATIC_METHOD(beep, app); diff --git a/fpdfsdk/include/javascript/color.h b/fpdfsdk/include/javascript/color.h index 8aab76fffe..df863b552f 100644 --- a/fpdfsdk/include/javascript/color.h +++ b/fpdfsdk/include/javascript/color.h @@ -1,7 +1,7 @@ // Copyright 2014 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 FPDFSDK_INCLUDE_JAVASCRIPT_COLOR_H_ @@ -18,13 +18,13 @@ public: FX_BOOL black(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); FX_BOOL blue(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); - FX_BOOL cyan(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); + FX_BOOL cyan(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); FX_BOOL dkGray(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); FX_BOOL gray(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); FX_BOOL green(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); FX_BOOL ltGray(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); FX_BOOL magenta(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); - FX_BOOL red(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); + FX_BOOL red(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); FX_BOOL transparent(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); FX_BOOL white(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); FX_BOOL yellow(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); @@ -32,7 +32,7 @@ public: FX_BOOL convert(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError); FX_BOOL equal(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError); -public: +public: static void ConvertPWLColorToArray(const CPWL_Color& color, CJS_Array& array); static void ConvertArrayToPWLColor(CJS_Array& array, CPWL_Color& color); @@ -61,13 +61,13 @@ public: JS_STATIC_PROP(black, color); JS_STATIC_PROP(blue, color); - JS_STATIC_PROP(cyan, color); + JS_STATIC_PROP(cyan, color); JS_STATIC_PROP(dkGray, color); JS_STATIC_PROP(gray, color); JS_STATIC_PROP(green, color); JS_STATIC_PROP(ltGray, color); JS_STATIC_PROP(magenta, color); - JS_STATIC_PROP(red, color); + JS_STATIC_PROP(red, color); JS_STATIC_PROP(transparent, color); JS_STATIC_PROP(white, color); JS_STATIC_PROP(yellow, color); diff --git a/fpdfsdk/include/javascript/console.h b/fpdfsdk/include/javascript/console.h index d49ea418eb..0cbc291b44 100644 --- a/fpdfsdk/include/javascript/console.h +++ b/fpdfsdk/include/javascript/console.h @@ -1,7 +1,7 @@ // Copyright 2014 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 FPDFSDK_INCLUDE_JAVASCRIPT_CONSOLE_H_ @@ -22,7 +22,7 @@ public: FX_BOOL show(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError); }; -class CJS_Console : public CJS_Object +class CJS_Console : public CJS_Object { public: CJS_Console(JSFXObject pObject) : CJS_Object(pObject) {}; diff --git a/fpdfsdk/include/javascript/event.h b/fpdfsdk/include/javascript/event.h index f43def973a..91a38ba487 100644 --- a/fpdfsdk/include/javascript/event.h +++ b/fpdfsdk/include/javascript/event.h @@ -1,7 +1,7 @@ // Copyright 2014 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 FPDFSDK_INCLUDE_JAVASCRIPT_EVENT_H_ diff --git a/fpdfsdk/include/javascript/global.h b/fpdfsdk/include/javascript/global.h index 3c8972c67c..83e07f67c3 100644 --- a/fpdfsdk/include/javascript/global.h +++ b/fpdfsdk/include/javascript/global.h @@ -1,7 +1,7 @@ // Copyright 2014 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 FPDFSDK_INCLUDE_JAVASCRIPT_GLOBAL_H_ @@ -58,7 +58,7 @@ private: void UpdateGlobalPersistentVariables(); void CommitGlobalPersisitentVariables(); void DestroyGlobalPersisitentVariables(); - FX_BOOL SetGlobalVariables(const FX_CHAR* propname, int nType, + FX_BOOL SetGlobalVariables(const FX_CHAR* propname, int nType, double dData, bool bData, const CFX_ByteString& sData, JSObject pData, bool bDefaultPersistent); void ObjectToArray(v8::Local pObj, CJS_GlobalVariableArray& array); @@ -78,7 +78,7 @@ public: CJS_Global(JSFXObject pObject) : CJS_Object(pObject) {}; virtual ~CJS_Global(void){}; - virtual FX_BOOL InitInstance(IFXJS_Context* cc); + virtual FX_BOOL InitInstance(IFXJS_Context* cc); DECLARE_SPECIAL_JS_CLASS(CJS_Global); diff --git a/fpdfsdk/include/javascript/report.h b/fpdfsdk/include/javascript/report.h index 9705adac88..56f742ce08 100644 --- a/fpdfsdk/include/javascript/report.h +++ b/fpdfsdk/include/javascript/report.h @@ -1,7 +1,7 @@ // Copyright 2014 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 FPDFSDK_INCLUDE_JAVASCRIPT_REPORT_H_ diff --git a/fpdfsdk/include/javascript/util.h b/fpdfsdk/include/javascript/util.h index 07f52ab8ce..ca4db349da 100644 --- a/fpdfsdk/include/javascript/util.h +++ b/fpdfsdk/include/javascript/util.h @@ -1,7 +1,7 @@ // Copyright 2014 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 FPDFSDK_INCLUDE_JAVASCRIPT_UTIL_H_ diff --git a/fpdfsdk/include/pdfwindow/IPDFWindow.h b/fpdfsdk/include/pdfwindow/IPDFWindow.h index 0191cac639..2774f70e7c 100644 --- a/fpdfsdk/include/pdfwindow/IPDFWindow.h +++ b/fpdfsdk/include/pdfwindow/IPDFWindow.h @@ -1,7 +1,7 @@ // Copyright 2014 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 FPDFSDK_INCLUDE_PDFWINDOW_IPDFWINDOW_H_ diff --git a/fpdfsdk/include/pdfwindow/PWL_Button.h b/fpdfsdk/include/pdfwindow/PWL_Button.h index 9141cf047c..2bf2eea865 100644 --- a/fpdfsdk/include/pdfwindow/PWL_Button.h +++ b/fpdfsdk/include/pdfwindow/PWL_Button.h @@ -1,7 +1,7 @@ // Copyright 2014 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 FPDFSDK_INCLUDE_PDFWINDOW_PWL_BUTTON_H_ diff --git a/fpdfsdk/include/pdfwindow/PWL_Caret.h b/fpdfsdk/include/pdfwindow/PWL_Caret.h index 8efbf79341..6838bc49e7 100644 --- a/fpdfsdk/include/pdfwindow/PWL_Caret.h +++ b/fpdfsdk/include/pdfwindow/PWL_Caret.h @@ -1,7 +1,7 @@ // Copyright 2014 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 FPDFSDK_INCLUDE_PDFWINDOW_PWL_CARET_H_ @@ -34,7 +34,7 @@ public: virtual void InvalidateRect(CPDF_Rect * pRect = NULL); virtual void SetVisible(FX_BOOL bVisible) {} virtual void TimerProc(); - void SetCaret(FX_BOOL bVisible, const CPDF_Point & ptHead, const CPDF_Point & ptFoot); + void SetCaret(FX_BOOL bVisible, const CPDF_Point & ptHead, const CPDF_Point & ptFoot); CFX_ByteString GetCaretAppearanceStream(const CPDF_Point & ptOffset); void SetInvalidRect(CPDF_Rect rc) {m_rcInvalid = rc;} diff --git a/fpdfsdk/include/pdfwindow/PWL_ComboBox.h b/fpdfsdk/include/pdfwindow/PWL_ComboBox.h index b82330c6b9..3f8604fb62 100644 --- a/fpdfsdk/include/pdfwindow/PWL_ComboBox.h +++ b/fpdfsdk/include/pdfwindow/PWL_ComboBox.h @@ -1,7 +1,7 @@ // Copyright 2014 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 FPDFSDK_INCLUDE_PDFWINDOW_PWL_COMBOBOX_H_ @@ -48,7 +48,7 @@ public: }; -class PWL_CLASS CPWL_ComboBox : public CPWL_Wnd +class PWL_CLASS CPWL_ComboBox : public CPWL_Wnd { public: CPWL_ComboBox(); @@ -58,7 +58,7 @@ public: virtual CFX_ByteString GetClassName() const; virtual void OnCreate(PWL_CREATEPARAM & cp); - virtual FX_BOOL OnKeyDown(FX_WORD nChar, FX_DWORD nFlag); + virtual FX_BOOL OnKeyDown(FX_WORD nChar, FX_DWORD nFlag); virtual FX_BOOL OnChar(FX_WORD nChar, FX_DWORD nFlag); virtual void OnNotify(CPWL_Wnd* pWnd, FX_DWORD msg, intptr_t wParam = 0, intptr_t lParam = 0); @@ -67,13 +67,13 @@ public: virtual void RePosChildWnd(); virtual CPDF_Rect GetFocusRect() const; - + virtual void SetFocus(); virtual void KillFocus(); FX_BOOL IsModified() const; -public: +public: void SetFillerNotify(IPWL_Filler_Notify* pNotify); CFX_WideString GetText() const; @@ -91,13 +91,13 @@ public: void SetSelectText(); -private: +private: void CreateEdit(const PWL_CREATEPARAM & cp); void CreateButton(const PWL_CREATEPARAM & cp); void CreateListBox(const PWL_CREATEPARAM & cp); void SetPopup(FX_BOOL bPopup); - + private: CPWL_CBEdit* m_pEdit; CPWL_CBButton* m_pButton; diff --git a/fpdfsdk/include/pdfwindow/PWL_Edit.h b/fpdfsdk/include/pdfwindow/PWL_Edit.h index 81500e90ad..6b31b9230d 100644 --- a/fpdfsdk/include/pdfwindow/PWL_Edit.h +++ b/fpdfsdk/include/pdfwindow/PWL_Edit.h @@ -1,7 +1,7 @@ // Copyright 2014 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 FPDFSDK_INCLUDE_PDFWINDOW_PWL_EDIT_H_ @@ -19,10 +19,10 @@ class IPWL_Filler_Notify { public: virtual ~IPWL_Filler_Notify() { } - virtual void QueryWherePopup(void* pPrivateData, FX_FLOAT fPopupMin,FX_FLOAT fPopupMax, + virtual void QueryWherePopup(void* pPrivateData, FX_FLOAT fPopupMin,FX_FLOAT fPopupMax, int32_t & nRet, FX_FLOAT & fPopupRet) = 0; //nRet: (0:bottom 1:top) virtual void OnBeforeKeyStroke(FX_BOOL bEditOrList, void* pPrivateData, int32_t nKeyCode, - CFX_WideString & strChange, const CFX_WideString& strChangeEx, + CFX_WideString & strChange, const CFX_WideString& strChangeEx, int nSelStart, int nSelEnd, FX_BOOL bKeyDown, FX_BOOL & bRC, FX_BOOL & bExit, FX_DWORD nFlag) = 0; virtual void OnAfterKeyStroke(FX_BOOL bEditOrList, void* pPrivateData, FX_BOOL & bExit, FX_DWORD nFlag) = 0; @@ -57,8 +57,8 @@ public: virtual CPDF_Rect GetFocusRect() const; -public: - void SetAlignFormatH(PWL_EDIT_ALIGNFORMAT_H nFormat = PEAH_LEFT, FX_BOOL bPaint = TRUE); //0:left 1:right 2:middle +public: + void SetAlignFormatH(PWL_EDIT_ALIGNFORMAT_H nFormat = PEAH_LEFT, FX_BOOL bPaint = TRUE); //0:left 1:right 2:middle void SetAlignFormatV(PWL_EDIT_ALIGNFORMAT_V nFormat = PEAV_TOP, FX_BOOL bPaint = TRUE); //0:top 1:bottom 2:center void SetCharArray(int32_t nCharArray); @@ -85,18 +85,18 @@ public: void ReplaceSel(const FX_WCHAR* csText); CFX_ByteString GetTextAppearanceStream(const CPDF_Point & ptOffset) const; - CFX_ByteString GetCaretAppearanceStream(const CPDF_Point & ptOffset) const; + CFX_ByteString GetCaretAppearanceStream(const CPDF_Point & ptOffset) const; CFX_ByteString GetSelectAppearanceStream(const CPDF_Point & ptOffset) const; - FX_BOOL IsTextFull() const; + FX_BOOL IsTextFull() const; static FX_FLOAT GetCharArrayAutoFontSize(CPDF_Font* pFont, const CPDF_Rect& rcPlate, int32_t nCharArray); void SetFillerNotify(IPWL_Filler_Notify* pNotify) {m_pFillerNotify = pNotify;} - void GeneratePageObjects(CPDF_PageObjects* pPageObjects, + void GeneratePageObjects(CPDF_PageObjects* pPageObjects, const CPDF_Point& ptOffset, CFX_ArrayTemplate& ObjArray); - void GeneratePageObjects(CPDF_PageObjects* pPageObjects, + void GeneratePageObjects(CPDF_PageObjects* pPageObjects, const CPDF_Point& ptOffset); protected: @@ -113,7 +113,7 @@ protected: virtual void OnInsertText(const CPVT_WordPlace& place, const CPVT_WordPlace& oldplace); virtual void OnAddUndo(IFX_Edit_UndoItem* pUndoItem); -private: +private: CPVT_WordRange GetSelectWordRange() const; virtual void ShowVScrollBar(FX_BOOL bShow); FX_BOOL IsVScrollBarVisible() const; diff --git a/fpdfsdk/include/pdfwindow/PWL_EditCtrl.h b/fpdfsdk/include/pdfwindow/PWL_EditCtrl.h index bfa1868b9e..9b088b1162 100644 --- a/fpdfsdk/include/pdfwindow/PWL_EditCtrl.h +++ b/fpdfsdk/include/pdfwindow/PWL_EditCtrl.h @@ -1,7 +1,7 @@ // Copyright 2014 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 FPDFSDK_INCLUDE_PDFWINDOW_PWL_EDITCTRL_H_ @@ -70,16 +70,16 @@ public: virtual FX_BOOL OnKeyDown(FX_WORD nChar, FX_DWORD nFlag); virtual FX_BOOL OnChar(FX_WORD nChar, FX_DWORD nFlag); - virtual FX_BOOL OnLButtonDown(const CPDF_Point & point, FX_DWORD nFlag); - virtual FX_BOOL OnLButtonUp(const CPDF_Point & point, FX_DWORD nFlag); + virtual FX_BOOL OnLButtonDown(const CPDF_Point & point, FX_DWORD nFlag); + virtual FX_BOOL OnLButtonUp(const CPDF_Point & point, FX_DWORD nFlag); virtual FX_BOOL OnMouseMove(const CPDF_Point & point, FX_DWORD nFlag); virtual void OnNotify(CPWL_Wnd* pWnd, FX_DWORD msg, intptr_t wParam = 0, intptr_t lParam = 0); virtual void CreateChildWnd(const PWL_CREATEPARAM & cp); - virtual void RePosChildWnd(); + virtual void RePosChildWnd(); virtual void SetFontSize(FX_FLOAT fFontSize); virtual FX_FLOAT GetFontSize() const; - + public: virtual void SetText(const FX_WCHAR* csText); @@ -105,11 +105,11 @@ public: void Paint(); - void EnableRefresh(FX_BOOL bRefresh); + void EnableRefresh(FX_BOOL bRefresh); CPDF_Point GetScrollPos() const; void SetScrollPos(const CPDF_Point& point); - void SetEditNotify(IPWL_Edit_Notify* pNotify) {m_pEditNotify = pNotify;} + void SetEditNotify(IPWL_Edit_Notify* pNotify) {m_pEditNotify = pNotify;} void SetCharSet(uint8_t nCharSet){m_nCharSet = nCharSet;} int32_t GetCharSet() const; @@ -142,15 +142,15 @@ protected: protected: void GetCaretInfo(CPDF_Point & ptHead, CPDF_Point & ptFoot) const; void SetCaret(FX_BOOL bVisible, const CPDF_Point & ptHead, const CPDF_Point & ptFoot); - + void SetEditCaret(FX_BOOL bVisible); protected: - virtual void IOnSetScrollInfoX(FX_FLOAT fPlateMin, FX_FLOAT fPlateMax, - FX_FLOAT fContentMin, FX_FLOAT fContentMax, + virtual void IOnSetScrollInfoX(FX_FLOAT fPlateMin, FX_FLOAT fPlateMax, + FX_FLOAT fContentMin, FX_FLOAT fContentMax, FX_FLOAT fSmallStep, FX_FLOAT fBigStep){} - virtual void IOnSetScrollInfoY(FX_FLOAT fPlateMin, FX_FLOAT fPlateMax, - FX_FLOAT fContentMin, FX_FLOAT fContentMax, + virtual void IOnSetScrollInfoY(FX_FLOAT fPlateMin, FX_FLOAT fPlateMax, + FX_FLOAT fContentMin, FX_FLOAT fContentMax, FX_FLOAT fSmallStep, FX_FLOAT fBigStep); virtual void IOnSetScrollPosX(FX_FLOAT fx){} virtual void IOnSetScrollPosY(FX_FLOAT fy); @@ -166,7 +166,7 @@ protected: IFX_Edit* m_pEdit; CPWL_Caret* m_pEditCaret; FX_BOOL m_bMouseDown; - IPWL_Edit_Notify* m_pEditNotify; + IPWL_Edit_Notify* m_pEditNotify; private: int32_t m_nCharSet; diff --git a/fpdfsdk/include/pdfwindow/PWL_FontMap.h b/fpdfsdk/include/pdfwindow/PWL_FontMap.h index f83575b66f..d32cc93078 100644 --- a/fpdfsdk/include/pdfwindow/PWL_FontMap.h +++ b/fpdfsdk/include/pdfwindow/PWL_FontMap.h @@ -1,7 +1,7 @@ // Copyright 2014 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 FPDFSDK_INCLUDE_PDFWINDOW_PWL_FONTMAP_H_ @@ -85,9 +85,9 @@ public: static CFX_ByteString GetDefaultFontByCharset(int32_t nCharset); CPDF_Font* AddFontToDocument(CPDF_Document* pDoc, CFX_ByteString& sFontName, uint8_t nCharset); - static FX_BOOL IsStandardFont(const CFX_ByteString& sFontName); + static FX_BOOL IsStandardFont(const CFX_ByteString& sFontName); CPDF_Font* AddStandardFont(CPDF_Document* pDoc, CFX_ByteString& sFontName); - CPDF_Font* AddSystemFont(CPDF_Document* pDoc, CFX_ByteString& sFontName, + CPDF_Font* AddSystemFont(CPDF_Document* pDoc, CFX_ByteString& sFontName, uint8_t nCharset); protected: diff --git a/fpdfsdk/include/pdfwindow/PWL_Icon.h b/fpdfsdk/include/pdfwindow/PWL_Icon.h index 1a2adf6469..44a5c0cbaf 100644 --- a/fpdfsdk/include/pdfwindow/PWL_Icon.h +++ b/fpdfsdk/include/pdfwindow/PWL_Icon.h @@ -1,7 +1,7 @@ // Copyright 2014 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 FPDFSDK_INCLUDE_PDFWINDOW_PWL_ICON_H_ @@ -23,7 +23,7 @@ public: virtual CPDF_Stream * GetPDFStream(); public: - void SetPDFStream(CPDF_Stream* pStream); + void SetPDFStream(CPDF_Stream* pStream); void GetImageSize(FX_FLOAT & fWidth,FX_FLOAT & fHeight); CPDF_Matrix GetImageMatrix(); CFX_ByteString GetImageAlias(); @@ -34,7 +34,7 @@ protected: CFX_ByteString m_sImageAlias; }; -class PWL_CLASS CPWL_Icon : public CPWL_Image +class PWL_CLASS CPWL_Icon : public CPWL_Image { public: CPWL_Icon(); diff --git a/fpdfsdk/include/pdfwindow/PWL_IconList.h b/fpdfsdk/include/pdfwindow/PWL_IconList.h index 74438c2afd..2f6b323773 100644 --- a/fpdfsdk/include/pdfwindow/PWL_IconList.h +++ b/fpdfsdk/include/pdfwindow/PWL_IconList.h @@ -1,7 +1,7 @@ // Copyright 2014 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 FPDFSDK_INCLUDE_PDFWINDOW_PWL_ICONLIST_H_ @@ -86,7 +86,7 @@ private: CPWL_IconList_Item* GetListItem(int32_t nItemIndex) const; void SelectItem(int32_t nItemIndex, FX_BOOL bSelect); int32_t FindItemIndex(const CPDF_Point& point); - + FX_BOOL m_nSelectIndex; IPWL_IconList_Notify* m_pNotify; FX_BOOL m_bEnableNotify; @@ -117,7 +117,7 @@ protected: virtual void OnCreated(); virtual void RePosChildWnd(); virtual void CreateChildWnd(const PWL_CREATEPARAM & cp); - + virtual void OnNotify(CPWL_Wnd* pWnd, FX_DWORD msg, intptr_t wParam = 0, intptr_t lParam = 0); private: diff --git a/fpdfsdk/include/pdfwindow/PWL_Label.h b/fpdfsdk/include/pdfwindow/PWL_Label.h index 6d9754dd80..7f28189199 100644 --- a/fpdfsdk/include/pdfwindow/PWL_Label.h +++ b/fpdfsdk/include/pdfwindow/PWL_Label.h @@ -1,7 +1,7 @@ // Copyright 2014 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 FPDFSDK_INCLUDE_PDFWINDOW_PWL_LABEL_H_ diff --git a/fpdfsdk/include/pdfwindow/PWL_ListCtrl.h b/fpdfsdk/include/pdfwindow/PWL_ListCtrl.h index 56a1fbf919..c107a0cf5e 100644 --- a/fpdfsdk/include/pdfwindow/PWL_ListCtrl.h +++ b/fpdfsdk/include/pdfwindow/PWL_ListCtrl.h @@ -1,7 +1,7 @@ // Copyright 2014 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 FPDFSDK_INCLUDE_PDFWINDOW_PWL_LISTCTRL_H_ diff --git a/fpdfsdk/include/pdfwindow/PWL_Note.h b/fpdfsdk/include/pdfwindow/PWL_Note.h index ee6ec6ff02..a60eba30dd 100644 --- a/fpdfsdk/include/pdfwindow/PWL_Note.h +++ b/fpdfsdk/include/pdfwindow/PWL_Note.h @@ -1,7 +1,7 @@ // Copyright 2014 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 FPDFSDK_INCLUDE_PDFWINDOW_PWL_NOTE_H_ @@ -70,7 +70,7 @@ public: virtual IPWL_NoteItem* GetSubItems(int32_t index) const = 0; virtual void DeleteSubItem(IPWL_NoteItem* pNoteItem) = 0; virtual void SetFocus() = 0; - + virtual IPWL_NoteItem* GetParentItem() const = 0; virtual void* GetPrivateData() const = 0; virtual CFX_WideString GetAuthorName() const = 0; @@ -151,7 +151,7 @@ protected: virtual void OnNotify(CPWL_Wnd* pWnd, FX_DWORD msg, intptr_t wParam = 0, intptr_t lParam = 0); virtual void RePosChildWnd(); virtual void OnSetFocus(); - virtual void OnKillFocus(); + virtual void OnKillFocus(); private: FX_BOOL m_bEnableNotify; @@ -213,7 +213,7 @@ private: CPWL_Note_Edit* m_pEdit; }; -class PWL_CLASS CPWL_NoteItem : public CPWL_Wnd, public IPWL_NoteItem +class PWL_CLASS CPWL_NoteItem : public CPWL_Wnd, public IPWL_NoteItem { public: CPWL_NoteItem(); @@ -269,7 +269,7 @@ public: void SetNoteFocus(FX_BOOL bLast); void OnContentsValidate(); - + void OnCreateNoteItem(); protected: @@ -320,7 +320,7 @@ public: CFX_WideString GetReplyString() const; void SetReplyString(const CFX_WideString& string); - //0-normal / 1-caption / 2-leftbottom corner / 3-rightbottom corner / 4-close / 5-options + //0-normal / 1-caption / 2-leftbottom corner / 3-rightbottom corner / 4-close / 5-options int32_t NoteHitTest(const CPDF_Point& point) const; CPDF_Rect GetCaptionRect() const {return m_rcCaption;} IPopup_Note* GetPopupNote() const {return m_pPopupNote;} @@ -346,7 +346,7 @@ private: CPWL_Note_CloseBox* m_pCloseBox; CPWL_Note_LBBox* m_pLBBox; CPWL_Note_RBBox* m_pRBBox; - CPWL_ScrollBar* m_pContentsBar; + CPWL_ScrollBar* m_pContentsBar; CPWL_Note_Options* m_pOptions; IPWL_NoteNotify* m_pNoteNotify; FX_BOOL m_bResizing; diff --git a/fpdfsdk/include/pdfwindow/PWL_ScrollBar.h b/fpdfsdk/include/pdfwindow/PWL_ScrollBar.h index bf92399e88..0390222545 100644 --- a/fpdfsdk/include/pdfwindow/PWL_ScrollBar.h +++ b/fpdfsdk/include/pdfwindow/PWL_ScrollBar.h @@ -1,7 +1,7 @@ // Copyright 2014 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 FPDFSDK_INCLUDE_PDFWINDOW_PWL_SCROLLBAR_H_ @@ -19,8 +19,8 @@ public: { } FX_FLOAT fContentMin; - FX_FLOAT fContentMax; - FX_FLOAT fPlateWidth; + FX_FLOAT fContentMax; + FX_FLOAT fPlateWidth; FX_FLOAT fBigStep; FX_FLOAT fSmallStep; }; @@ -38,7 +38,7 @@ enum PWL_SBBUTTON_TYPE PSBT_POS }; -class CPWL_SBButton : public CPWL_Wnd +class CPWL_SBButton : public CPWL_Wnd { public: CPWL_SBButton(PWL_SCROLLBAR_TYPE eScrollBarType,PWL_SBBUTTON_TYPE eButtonType); @@ -97,7 +97,7 @@ public: FX_FLOAT fSmallStep; }; -class CPWL_ScrollBar : public CPWL_Wnd +class CPWL_ScrollBar : public CPWL_Wnd { public: CPWL_ScrollBar(PWL_SCROLLBAR_TYPE sbType = SBT_HSCROLL); @@ -115,13 +115,13 @@ public: virtual void OnNotify(CPWL_Wnd* pWnd, FX_DWORD msg, intptr_t wParam = 0, intptr_t lParam = 0); virtual void CreateChildWnd(const PWL_CREATEPARAM & cp); - - FX_FLOAT GetScrollBarWidth() const; + + FX_FLOAT GetScrollBarWidth() const; PWL_SCROLLBAR_TYPE GetScrollBarType() const {return m_sbType;}; void SetNotifyForever(FX_BOOL bForever) {m_bNotifyForever = bForever;} -protected: +protected: void SetScrollRange(FX_FLOAT fMin,FX_FLOAT fMax,FX_FLOAT fClientWidth); void SetScrollPos(FX_FLOAT fPos); void MovePosButton(FX_BOOL bRefresh); @@ -156,7 +156,7 @@ private: CPWL_SBButton* m_pMaxButton; CPWL_SBButton* m_pPosButton; PWL_SCROLL_PRIVATEDATA m_sData; - FX_BOOL m_bMouseDown; + FX_BOOL m_bMouseDown; FX_BOOL m_bMinOrMax; FX_BOOL m_bNotifyForever; FX_FLOAT m_nOldPos; diff --git a/fpdfsdk/include/pdfwindow/PWL_Signature.h b/fpdfsdk/include/pdfwindow/PWL_Signature.h index be5ec58d1f..c94527772e 100644 --- a/fpdfsdk/include/pdfwindow/PWL_Signature.h +++ b/fpdfsdk/include/pdfwindow/PWL_Signature.h @@ -1,7 +1,7 @@ // Copyright 2014 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 FPDFSDK_INCLUDE_PDFWINDOW_PWL_SIGNATURE_H_ diff --git a/fpdfsdk/include/pdfwindow/PWL_SpecialButton.h b/fpdfsdk/include/pdfwindow/PWL_SpecialButton.h index 9b4ffd2341..f6659dfb00 100644 --- a/fpdfsdk/include/pdfwindow/PWL_SpecialButton.h +++ b/fpdfsdk/include/pdfwindow/PWL_SpecialButton.h @@ -1,7 +1,7 @@ // Copyright 2014 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 FPDFSDK_INCLUDE_PDFWINDOW_PWL_SPECIALBUTTON_H_ diff --git a/fpdfsdk/include/pdfwindow/PWL_Utils.h b/fpdfsdk/include/pdfwindow/PWL_Utils.h index 9f121e80a8..2da0f42180 100644 --- a/fpdfsdk/include/pdfwindow/PWL_Utils.h +++ b/fpdfsdk/include/pdfwindow/PWL_Utils.h @@ -1,7 +1,7 @@ // Copyright 2014 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 FPDFSDK_INCLUDE_PDFWINDOW_PWL_UTILS_H_ @@ -21,7 +21,7 @@ template T PWL_MAX (const T & i, const T & j) { return ((i > j) ? i : j #define PWL_PDF2WIN(color) (uint8_t(color*255)) #define PWL_WIN2PDF(color) ((FX_FLOAT)((FX_FLOAT)color/255.0f)) -#define PWL_MAKEDWORD(low,high) ((FX_DWORD)((FX_WORD)(low) | (FX_DWORD)(((FX_WORD)(high))<<16))) +#define PWL_MAKEDWORD(low,high) ((FX_DWORD)((FX_WORD)(low) | (FX_DWORD)(((FX_WORD)(high))<<16))) #define PWL_GETLOWWORD(dword) ((FX_WORD)(dword)) #define PWL_GETHIGHWORD(dword) ((FX_WORD)(dword>>16)) @@ -137,7 +137,7 @@ public: IFX_Edit_FontMap * pFontMap, CPDF_Stream * pIconStream, CPDF_IconFit & IconFit, - const CFX_WideString & sLabel, + const CFX_WideString & sLabel, const CPWL_Color & crText, FX_FLOAT fFontSize, int32_t nLayOut); @@ -148,7 +148,7 @@ public: int32_t nStyle, const CPWL_Color & crText); - static CFX_ByteString GetEditAppStream(IFX_Edit* pEdit, const CPDF_Point & ptOffset, const CPVT_WordRange * pRange = NULL, + static CFX_ByteString GetEditAppStream(IFX_Edit* pEdit, const CPDF_Point & ptOffset, const CPVT_WordRange * pRange = NULL, FX_BOOL bContinuous = TRUE, FX_WORD SubWord = 0); static CFX_ByteString GetEditSelAppStream(IFX_Edit* pEdit, const CPDF_Point & ptOffset, const CPVT_WordRange * pRange = NULL); @@ -177,13 +177,13 @@ public: static void DrawShadow(CFX_RenderDevice* pDevice, CPDF_Matrix* pUser2Device, FX_BOOL bVertical, FX_BOOL bHorizontal, CPDF_Rect rect, int32_t nTransparancy, int32_t nStartGray, int32_t nEndGray); - static void DrawEditSpellCheck(CFX_RenderDevice* pDevice, CPDF_Matrix* pUser2Device, IFX_Edit* pEdit, - const CPDF_Rect& rcClip, const CPDF_Point& ptOffset, const CPVT_WordRange* pRange, + static void DrawEditSpellCheck(CFX_RenderDevice* pDevice, CPDF_Matrix* pUser2Device, IFX_Edit* pEdit, + const CPDF_Rect& rcClip, const CPDF_Point& ptOffset, const CPVT_WordRange* pRange, IPWL_SpellCheck* pSpellCheck); public: static void ConvertCMYK2RGB(FX_FLOAT dC,FX_FLOAT dM,FX_FLOAT dY,FX_FLOAT dK,FX_FLOAT &dR,FX_FLOAT &dG,FX_FLOAT &dB); static void ConvertRGB2CMYK(FX_FLOAT dR,FX_FLOAT dG,FX_FLOAT dB,FX_FLOAT &dC,FX_FLOAT &dM,FX_FLOAT &dY,FX_FLOAT &dK); - + static void ConvertRGB2GRAY(FX_FLOAT dR,FX_FLOAT dG,FX_FLOAT dB,FX_FLOAT &dGray); static void ConvertGRAY2RGB(FX_FLOAT dGray,FX_FLOAT &dR,FX_FLOAT &dG,FX_FLOAT &dB); @@ -193,10 +193,10 @@ public: static void PWLColorToARGB(const CPWL_Color& color, int32_t& alpha, FX_FLOAT& red, FX_FLOAT& green, FX_FLOAT& blue); public: - static CFX_ByteString GetIconAppStream(int32_t nType, const CPDF_Rect& rect, const CPWL_Color& crFill, + static CFX_ByteString GetIconAppStream(int32_t nType, const CPDF_Rect& rect, const CPWL_Color& crFill, const CPWL_Color& crStroke = PWL_DEFAULT_BLACKCOLOR); static void DrawIconAppStream(CFX_RenderDevice* pDevice, CPDF_Matrix* pUser2Device, - int32_t nType, const CPDF_Rect & rect, const CPWL_Color& crFill, + int32_t nType, const CPDF_Rect & rect, const CPWL_Color& crFill, const CPWL_Color& crStroke, const int32_t nTransparancy); private: diff --git a/fpdfsdk/include/pdfwindow/PWL_Wnd.h b/fpdfsdk/include/pdfwindow/PWL_Wnd.h index e74dc88c5c..3ef4e67620 100644 --- a/fpdfsdk/include/pdfwindow/PWL_Wnd.h +++ b/fpdfsdk/include/pdfwindow/PWL_Wnd.h @@ -1,7 +1,7 @@ // Copyright 2014 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 FPDFSDK_INCLUDE_PDFWINDOW_PWL_WND_H_ @@ -24,7 +24,7 @@ class IPWL_SpellCheck; #ifdef FX_READER_DLL #ifdef PWL_EXPORT #define PWL_CLASS __declspec(dllexport) - #define PWL_FUNCTION PWL_CLASS + #define PWL_FUNCTION PWL_CLASS #else #define PWL_CLASS #define PWL_FUNCTION @@ -124,7 +124,7 @@ struct PWL_CLASS CPWL_Color CPWL_Color(int32_t r, int32_t g, int32_t b) : nColorType(COLORTYPE_RGB), fColor1(r/255.0f), fColor2(g/255.0f), fColor3(b/255.0f), fColor4(0) {} - + void ConvertColorType(int32_t other_nColorType); /* @@ -133,13 +133,13 @@ struct PWL_CLASS CPWL_Color COLORTYPE_CMYK COLORTYPE_GRAY */ - int32_t nColorType; + int32_t nColorType; FX_FLOAT fColor1,fColor2,fColor3,fColor4; }; inline FX_BOOL operator == (const CPWL_Color &c1, const CPWL_Color &c2) { - return c1.nColorType == c2.nColorType && + return c1.nColorType == c2.nColorType && c1.fColor1 - c2.fColor1 < 0.0001 && c1.fColor1 - c2.fColor1 > -0.0001 && c1.fColor2 - c2.fColor2 < 0.0001 && c1.fColor2 - c2.fColor2 > -0.0001 && c1.fColor3 - c2.fColor3 < 0.0001 && c1.fColor3 - c2.fColor3 > -0.0001 && @@ -174,7 +174,7 @@ class IPWL_SpellCheck public: virtual ~IPWL_SpellCheck() { } virtual FX_BOOL CheckWord(const FX_CHAR* sWord) = 0; - virtual void SuggestWords(const FX_CHAR* sWord, CFX_ByteStringArray & sSuggest) = 0; + virtual void SuggestWords(const FX_CHAR* sWord, CFX_ByteStringArray & sSuggest) = 0; }; class IPWL_Provider @@ -224,7 +224,7 @@ public: sTextStrokeColor(), nTransparency(255), fFontSize(PWL_DEFAULT_FONTSIZE), - sDash(3,0,0), + sDash(3,0,0), pAttachedData(NULL), pParentWnd(NULL), pMsgControl(NULL), @@ -233,7 +233,7 @@ public: { } - CPDF_Rect rcRectWnd; //required + CPDF_Rect rcRectWnd; //required IFX_SystemHandler* pSystemHandler; //required IFX_Edit_FontMap* pFontMap; //required for text window IPWL_Provider* pProvider; //required for self coordinate @@ -268,7 +268,7 @@ public: static void TimerProc(int32_t idEvent); private: - int32_t m_nTimerID; + int32_t m_nTimerID; CPWL_TimerHandler* m_pAttached; IFX_SystemHandler* m_pSystemHandler; }; @@ -296,7 +296,7 @@ public: virtual ~CPWL_Wnd(); void Create(const PWL_CREATEPARAM & cp); - virtual CFX_ByteString GetClassName() const; + virtual CFX_ByteString GetClassName() const; void Destroy(); void Move(const CPDF_Rect & rcNew,FX_BOOL bReset,FX_BOOL bRefresh); virtual void InvalidateRect(CPDF_Rect* pRect = NULL); @@ -341,13 +341,13 @@ public: virtual FX_BOOL IsModified() const {return FALSE;} - virtual void SetFontSize(FX_FLOAT fFontSize); + virtual void SetFontSize(FX_FLOAT fFontSize); - void SetBackgroundColor(const CPWL_Color & color); + void SetBackgroundColor(const CPWL_Color & color); void SetBorderColor(const CPWL_Color & color); void SetBorderWidth(int32_t nBorderWidth); void SetClipRect(const CPDF_Rect & rect); - void SetBorderStyle(int32_t eBorderStyle); + void SetBorderStyle(int32_t eBorderStyle); void SetBorderDash(const CPWL_Dash & sDash); CPDF_Rect GetOriginWindowRect() const; @@ -355,18 +355,18 @@ public: virtual CPDF_Rect GetClientRect() const; CPDF_Point GetCenterPoint() const; CPDF_Rect GetClientCenterSquare() const; - CPDF_Rect GetWindowCenterSquare() const; - int32_t GetBorderWidth() const; - FX_BOOL IsVisible() const {return m_bVisible;} + CPDF_Rect GetWindowCenterSquare() const; + int32_t GetBorderWidth() const; + FX_BOOL IsVisible() const {return m_bVisible;} FX_BOOL HasFlag(FX_DWORD dwFlags) const; void AddFlag(FX_DWORD dwFlags); void RemoveFlag(FX_DWORD dwFlags); - CPDF_Rect GetClipRect() const; - CPWL_Wnd* GetParentWindow() const; - int32_t GetBorderStyle() const; + CPDF_Rect GetClipRect() const; + CPWL_Wnd* GetParentWindow() const; + int32_t GetBorderStyle() const; CPWL_Dash GetBorderDash() const; void* GetAttachedData() const; - + FX_BOOL WndHitTest(const CPDF_Point & point) const; FX_BOOL ClientHitTest(const CPDF_Point & point) const; FX_BOOL IsCaptureMouse() const; @@ -380,7 +380,7 @@ public: IPWL_Provider* GetProvider() const; virtual IFX_SystemHandler* GetSystemHandler() const; IPWL_FocusHandler* GetFocusHandler() const; - + int32_t GetTransparency(); void SetTransparency(int32_t nTransparency); @@ -395,15 +395,15 @@ public: virtual CPDF_Rect ParentToChild(const CPDF_Rect& rect) const; //those methods only implemented by listctrl item - virtual FX_FLOAT GetItemHeight(FX_FLOAT fLimitWidth) {return 0;} - virtual FX_FLOAT GetItemLeftMargin() {return 0;} - virtual FX_FLOAT GetItemRightMargin() {return 0;} + virtual FX_FLOAT GetItemHeight(FX_FLOAT fLimitWidth) {return 0;} + virtual FX_FLOAT GetItemLeftMargin() {return 0;} + virtual FX_FLOAT GetItemRightMargin() {return 0;} void EnableWindow(FX_BOOL bEnable); FX_BOOL IsEnabled(); virtual void SetCursor(); -protected: +protected: virtual void CreateChildWnd(const PWL_CREATEPARAM & cp); virtual void RePosChildWnd(); void GetAppearanceStream(CFX_ByteTextBuf & sAppStream); @@ -424,20 +424,20 @@ protected: virtual void OnDisabled(); void SetNotifyFlag(FX_BOOL bNotifying = TRUE){m_bNotifying = bNotifying;}; - + FX_BOOL IsValid() const; - PWL_CREATEPARAM GetCreationParam() const; - FX_BOOL IsNotifying() const {return m_bNotifying;} - + PWL_CREATEPARAM GetCreationParam() const; + FX_BOOL IsNotifying() const {return m_bNotifying;} + void InvalidateRectMove(const CPDF_Rect & rcOld, const CPDF_Rect & rcNew); void PWLtoWnd(const CPDF_Point & point, int32_t& x, int32_t& y) const; - FX_RECT PWLtoWnd(const CPDF_Rect & rect) const; + FX_RECT PWLtoWnd(const CPDF_Rect & rect) const; FX_HWND GetAttachedHWnd() const; - + FX_BOOL IsWndCaptureMouse(const CPWL_Wnd * pWnd) const; - FX_BOOL IsWndCaptureKeyboard(const CPWL_Wnd * pWnd) const; - const CPWL_Wnd* GetRootWnd() const; + FX_BOOL IsWndCaptureKeyboard(const CPWL_Wnd * pWnd) const; + const CPWL_Wnd* GetRootWnd() const; FX_BOOL IsCTRLpressed(FX_DWORD nFlag) const; FX_BOOL IsSHIFTpressed(FX_DWORD nFlag) const; @@ -449,28 +449,28 @@ private: void RemoveChild(CPWL_Wnd * pWnd); void CreateScrollBar(const PWL_CREATEPARAM & cp); - void CreateVScrollBar(const PWL_CREATEPARAM & cp); + void CreateVScrollBar(const PWL_CREATEPARAM & cp); - void AjustStyle(); + void AjustStyle(); void CreateMsgControl(); void DestroyMsgControl(); - - CPWL_MsgControl* GetMsgControl() const; - + + CPWL_MsgControl* GetMsgControl() const; + protected: CFX_ArrayTemplate m_aChildren; private: PWL_CREATEPARAM m_sPrivateParam; - + CPWL_ScrollBar* m_pVScrollBar; CPDF_Rect m_rcWindow; CPDF_Rect m_rcClip; - FX_BOOL m_bCreated; + FX_BOOL m_bCreated; FX_BOOL m_bVisible; - FX_BOOL m_bNotifying; + FX_BOOL m_bNotifying; FX_BOOL m_bEnabled; }; -- cgit v1.2.3