| OLD | NEW |
| 1 // Copyright 2014 PDFium Authors. All rights reserved. | 1 // Copyright 2014 PDFium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com |
| 6 | 6 |
| 7 #ifndef XFA_FXFA_PARSER_XFA_SCRIPT_LAYOUTPSEUDOMODEL_H_ | 7 #ifndef XFA_FXFA_PARSER_XFA_SCRIPT_LAYOUTPSEUDOMODEL_H_ |
| 8 #define XFA_FXFA_PARSER_XFA_SCRIPT_LAYOUTPSEUDOMODEL_H_ | 8 #define XFA_FXFA_PARSER_XFA_SCRIPT_LAYOUTPSEUDOMODEL_H_ |
| 9 | 9 |
| 10 #include "fxjse/include/cfxjse_arguments.h" | 10 #include "fxjse/include/cfxjse_arguments.h" |
| 11 #include "xfa/fxfa/parser/xfa_doclayout.h" | 11 #include "xfa/fxfa/parser/xfa_doclayout.h" |
| 12 #include "xfa/fxfa/parser/xfa_object.h" | 12 #include "xfa/fxfa/parser/xfa_object.h" |
| 13 | 13 |
| 14 enum XFA_LAYOUTMODEL_HWXY { | 14 enum XFA_LAYOUTMODEL_HWXY { |
| 15 XFA_LAYOUTMODEL_H, | 15 XFA_LAYOUTMODEL_H, |
| 16 XFA_LAYOUTMODEL_W, | 16 XFA_LAYOUTMODEL_W, |
| 17 XFA_LAYOUTMODEL_X, | 17 XFA_LAYOUTMODEL_X, |
| 18 XFA_LAYOUTMODEL_Y | 18 XFA_LAYOUTMODEL_Y |
| 19 }; | 19 }; |
| 20 | 20 |
| 21 class CScript_LayoutPseudoModel : public CXFA_Object { | 21 class CScript_LayoutPseudoModel : public CXFA_Object { |
| 22 public: | 22 public: |
| 23 explicit CScript_LayoutPseudoModel(CXFA_Document* pDocument); | 23 explicit CScript_LayoutPseudoModel(CXFA_Document* pDocument); |
| 24 ~CScript_LayoutPseudoModel() override; | 24 ~CScript_LayoutPseudoModel() override; |
| 25 | 25 |
| 26 void Script_LayoutPseudoModel_Ready(CFXJSE_Value* pValue, | 26 void Ready(CFXJSE_Value* pValue, FX_BOOL bSetting, XFA_ATTRIBUTE eAttribute); |
| 27 FX_BOOL bSetting, | |
| 28 XFA_ATTRIBUTE eAttribute); | |
| 29 | 27 |
| 30 void Script_LayoutPseudoModel_HWXY(CFXJSE_Arguments* pArguments, | 28 void HWXY(CFXJSE_Arguments* pArguments, XFA_LAYOUTMODEL_HWXY layoutModel); |
| 31 XFA_LAYOUTMODEL_HWXY layoutModel); | 29 void H(CFXJSE_Arguments* pArguments); |
| 32 void Script_LayoutPseudoModel_H(CFXJSE_Arguments* pArguments); | 30 void W(CFXJSE_Arguments* pArguments); |
| 33 void Script_LayoutPseudoModel_W(CFXJSE_Arguments* pArguments); | 31 void X(CFXJSE_Arguments* pArguments); |
| 34 void Script_LayoutPseudoModel_X(CFXJSE_Arguments* pArguments); | 32 void Y(CFXJSE_Arguments* pArguments); |
| 35 void Script_LayoutPseudoModel_Y(CFXJSE_Arguments* pArguments); | 33 void NumberedPageCount(CFXJSE_Arguments* pArguments, FX_BOOL bNumbered); |
| 36 void Script_LayoutPseudoModel_NumberedPageCount(CFXJSE_Arguments* pArguments, | 34 void PageCount(CFXJSE_Arguments* pArguments); |
| 37 FX_BOOL bNumbered); | 35 void PageSpan(CFXJSE_Arguments* pArguments); |
| 38 void Script_LayoutPseudoModel_PageCount(CFXJSE_Arguments* pArguments); | 36 void Page(CFXJSE_Arguments* pArguments); |
| 39 void Script_LayoutPseudoModel_PageSpan(CFXJSE_Arguments* pArguments); | 37 void PageContent(CFXJSE_Arguments* pArguments); |
| 40 void Script_LayoutPseudoModel_Page(CFXJSE_Arguments* pArguments); | 38 void AbsPageCount(CFXJSE_Arguments* pArguments); |
| 41 void Script_LayoutPseudoModel_PageContent(CFXJSE_Arguments* pArguments); | 39 void AbsPageCountInBatch(CFXJSE_Arguments* pArguments); |
| 42 void Script_LayoutPseudoModel_AbsPageCount(CFXJSE_Arguments* pArguments); | 40 void SheetCountInBatch(CFXJSE_Arguments* pArguments); |
| 43 void Script_LayoutPseudoModel_AbsPageCountInBatch( | 41 void Relayout(CFXJSE_Arguments* pArguments); |
| 44 CFXJSE_Arguments* pArguments); | 42 void AbsPageSpan(CFXJSE_Arguments* pArguments); |
| 45 void Script_LayoutPseudoModel_SheetCountInBatch(CFXJSE_Arguments* pArguments); | 43 void AbsPageInBatch(CFXJSE_Arguments* pArguments); |
| 46 void Script_LayoutPseudoModel_Relayout(CFXJSE_Arguments* pArguments); | 44 void SheetInBatch(CFXJSE_Arguments* pArguments); |
| 47 void Script_LayoutPseudoModel_AbsPageSpan(CFXJSE_Arguments* pArguments); | 45 void Sheet(CFXJSE_Arguments* pArguments); |
| 48 void Script_LayoutPseudoModel_AbsPageInBatch(CFXJSE_Arguments* pArguments); | 46 void RelayoutPageArea(CFXJSE_Arguments* pArguments); |
| 49 void Script_LayoutPseudoModel_SheetInBatch(CFXJSE_Arguments* pArguments); | 47 void SheetCount(CFXJSE_Arguments* pArguments); |
| 50 void Script_LayoutPseudoModel_Sheet(CFXJSE_Arguments* pArguments); | 48 void AbsPage(CFXJSE_Arguments* pArguments); |
| 51 void Script_LayoutPseudoModel_RelayoutPageArea(CFXJSE_Arguments* pArguments); | |
| 52 void Script_LayoutPseudoModel_SheetCount(CFXJSE_Arguments* pArguments); | |
| 53 void Script_LayoutPseudoModel_AbsPage(CFXJSE_Arguments* pArguments); | |
| 54 | 49 |
| 55 protected: | 50 protected: |
| 56 void Script_LayoutPseudoModel_GetObjArray(CXFA_LayoutProcessor* pDocLayout, | 51 void GetObjArray(CXFA_LayoutProcessor* pDocLayout, |
| 57 int32_t iPageNo, | 52 int32_t iPageNo, |
| 58 const CFX_WideString& wsType, | 53 const CFX_WideString& wsType, |
| 59 FX_BOOL bOnPageArea, | 54 FX_BOOL bOnPageArea, |
| 60 CXFA_NodeArray& retArray); | 55 CXFA_NodeArray& retArray); |
| 61 void Script_LayoutPseudoModel_PageImp(CFXJSE_Arguments* pArguments, | 56 void PageImp(CFXJSE_Arguments* pArguments, FX_BOOL bAbsPage); |
| 62 FX_BOOL bAbsPage); | |
| 63 }; | 57 }; |
| 64 | 58 |
| 65 #endif // XFA_FXFA_PARSER_XFA_SCRIPT_LAYOUTPSEUDOMODEL_H_ | 59 #endif // XFA_FXFA_PARSER_XFA_SCRIPT_LAYOUTPSEUDOMODEL_H_ |
| OLD | NEW |