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

Side by Side Diff: xfa/src/fxfa/src/parser/xfa_layout_pagemgr_new.h

Issue 1172793002: Merge to XFA: Use stdint.h types throughout PDFium. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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_LAYOUT_PAGEMGR_H_ 7 #ifndef _XFA_LAYOUT_PAGEMGR_H_
8 #define _XFA_LAYOUT_PAGEMGR_H_ 8 #define _XFA_LAYOUT_PAGEMGR_H_
9 class CXFA_ContainerRecord 9 class CXFA_ContainerRecord
10 { 10 {
(...skipping 11 matching lines...) Expand all
22 public: 22 public:
23 CXFA_LayoutPageMgr(CXFA_LayoutProcessor* pLayoutProcessor); 23 CXFA_LayoutPageMgr(CXFA_LayoutProcessor* pLayoutProcessor);
24 ~CXFA_LayoutPageMgr(); 24 ~CXFA_LayoutPageMgr();
25 FX_BOOL InitLayoutPage(CXFA_Node* pFormNode); 25 FX_BOOL InitLayoutPage(CXFA_Node* pFormNode);
26 FX_BOOL PrepareFirstPage(CXFA_Node* pRootSubform); 26 FX_BOOL PrepareFirstPage(CXFA_Node* pRootSubform);
27 FX_FLOAT GetAvailHeight(); 27 FX_FLOAT GetAvailHeight();
28 FX_BOOL GetNextAvailContentHeight(FX_FLOAT fChildHeight); 28 FX_BOOL GetNextAvailContentHeight(FX_FLOAT fChildHeight);
29 void SubmitContentItem(CXFA_ContentLayoutItemImpl* pContentLa youtItem, XFA_ItemLayoutProcessorResult eStatus); 29 void SubmitContentItem(CXFA_ContentLayoutItemImpl* pContentLa youtItem, XFA_ItemLayoutProcessorResult eStatus);
30 void FinishPaginatedPageSets(); 30 void FinishPaginatedPageSets();
31 void SyncLayoutData(); 31 void SyncLayoutData();
32 FX_INT32» » » GetPageCount() const; 32 int32_t» » » GetPageCount() const;
33 IXFA_LayoutPage*» GetPage(FX_INT32 index) const; 33 IXFA_LayoutPage*» GetPage(int32_t index) const;
34 FX_INT32» » » GetPageIndex(IXFA_LayoutPage* pPage) const; 34 int32_t» » » GetPageIndex(IXFA_LayoutPage* pPage) const;
35 inline CXFA_ContainerLayoutItemImpl* GetRootLayoutItem() const 35 inline CXFA_ContainerLayoutItemImpl* GetRootLayoutItem() const
36 { 36 {
37 return m_pPageSetLayoutItemRoot; 37 return m_pPageSetLayoutItemRoot;
38 } 38 }
39 FX_BOOL ProcessBreakBeforeOrAfter(CXFA_Node* pBreakNode, FX_BOOL bBefore, CXFA_Node* &pBreakLeaderNode, CXFA_Node* &pBreakTrailerNode, FX_BOOL& bCreatePage); 39 FX_BOOL ProcessBreakBeforeOrAfter(CXFA_Node* pBreakNode, FX_BOOL bBefore, CXFA_Node* &pBreakLeaderNode, CXFA_Node* &pBreakTrailerNode, FX_BOOL& bCreatePage);
40 FX_BOOL ProcessOverflow(CXFA_Node* pFormNode, CXFA_Node* &pLeade rNode, CXFA_Node* &pTrailerNode, FX_BOOL bDataMerge = FALSE, FX_BOOL bCreatePage = TRUE); 40 FX_BOOL ProcessOverflow(CXFA_Node* pFormNode, CXFA_Node* &pLeade rNode, CXFA_Node* &pTrailerNode, FX_BOOL bDataMerge = FALSE, FX_BOOL bCreatePage = TRUE);
41 CXFA_Node* QueryOverflow(CXFA_Node* pFormNode, CXFA_LayoutContext* pLayoutC ontext = NULL); 41 CXFA_Node* QueryOverflow(CXFA_Node* pFormNode, CXFA_LayoutContext* pLayoutC ontext = NULL);
42 FX_BOOL ProcessBookendLeaderOrTrailer(CXFA_Node* pBookendNode, F X_BOOL bLeader, CXFA_Node* &pBookendAppendNode); 42 FX_BOOL ProcessBookendLeaderOrTrailer(CXFA_Node* pBookendNode, F X_BOOL bLeader, CXFA_Node* &pBookendAppendNode);
43 CXFA_LayoutItemImpl* FindOrCreateLayoutItem(CXFA_Node* pFormNode); 43 CXFA_LayoutItemImpl* FindOrCreateLayoutItem(CXFA_Node* pFormNode);
44 protected: 44 protected:
45 FX_BOOL AppendNewPage(FX_BOOL bFirstTemPage = FALSE); 45 FX_BOOL AppendNewPage(FX_BOOL bFirstTemPage = FALSE);
46 void ReorderPendingLayoutRecordToTail(CXFA_ContainerRecord* p NewRecord, CXFA_ContainerRecord* pPrevRecord); 46 void ReorderPendingLayoutRecordToTail(CXFA_ContainerRecord* p NewRecord, CXFA_ContainerRecord* pPrevRecord);
47 void RemoveLayoutRecord(CXFA_ContainerRecord* pNewRecord, CXF A_ContainerRecord* pPrevRecord); 47 void RemoveLayoutRecord(CXFA_ContainerRecord* pNewRecord, CXF A_ContainerRecord* pPrevRecord);
48 inline CXFA_ContainerRecord* GetCurrentContainerRecord() 48 inline CXFA_ContainerRecord* GetCurrentContainerRecord()
49 { 49 {
50 CXFA_ContainerRecord* result = ((CXFA_ContainerRecord*)m_rgProposedConta inerRecord.GetAt(m_pCurrentContainerRecord)); 50 CXFA_ContainerRecord* result = ((CXFA_ContainerRecord*)m_rgProposedConta inerRecord.GetAt(m_pCurrentContainerRecord));
51 ASSERT(result); 51 ASSERT(result);
52 return result; 52 return result;
53 } 53 }
54 CXFA_ContainerRecord* CreateContainerRecord(CXFA_Node* pPageNode = NULL, FX_ BOOL bCreateNew = FALSE); 54 CXFA_ContainerRecord* CreateContainerRecord(CXFA_Node* pPageNode = NULL, FX_ BOOL bCreateNew = FALSE);
55 void AddPageAreaLayoutItem(CXFA_ContainerRecord* pNewRecord, CXFA_Node* pNewPageArea); 55 void AddPageAreaLayoutItem(CXFA_ContainerRecord* pNewRecord, CXFA_Node* pNewPageArea);
56 void AddContentAreaLayoutItem(CXFA_ContainerRecord* pNewRecor d, CXFA_Node* pContentArea); 56 void AddContentAreaLayoutItem(CXFA_ContainerRecord* pNewRecor d, CXFA_Node* pContentArea);
57 FX_BOOL RunBreak(XFA_ELEMENT eBreakType, XFA_ATTRIBUTEENUM eTarg etType, CXFA_Node* pTarget, FX_BOOL bStartNew); 57 FX_BOOL RunBreak(XFA_ELEMENT eBreakType, XFA_ATTRIBUTEENUM eTarg etType, CXFA_Node* pTarget, FX_BOOL bStartNew);
58 CXFA_Node* BreakOverflow(CXFA_Node* pOverflowNode, CXFA_Node*& pLeaderTempl ate, CXFA_Node*& pTrailerTemplate, FX_BOOL bCreatePage = TRUE); 58 CXFA_Node* BreakOverflow(CXFA_Node* pOverflowNode, CXFA_Node*& pLeaderTempl ate, CXFA_Node*& pTrailerTemplate, FX_BOOL bCreatePage = TRUE);
59 FX_BOOL ResolveBookendLeaderOrTrailer(CXFA_Node* pBookendNode, F X_BOOL bLeader, CXFA_Node* &pBookendAppendTemplate); 59 FX_BOOL ResolveBookendLeaderOrTrailer(CXFA_Node* pBookendNode, F X_BOOL bLeader, CXFA_Node* &pBookendAppendTemplate);
60 FX_BOOL ExecuteBreakBeforeOrAfter(CXFA_Node* pCurNode, FX_BOOL b Before, CXFA_Node* &pBreakLeaderTemplate, CXFA_Node* &pBreakTrailerTemplate); 60 FX_BOOL ExecuteBreakBeforeOrAfter(CXFA_Node* pCurNode, FX_BOOL b Before, CXFA_Node* &pBreakLeaderTemplate, CXFA_Node* &pBreakTrailerTemplate);
61 61
62 FX_INT32» CreateMinPageRecord(CXFA_Node* pPageArea, FX_BOOL bTargetPageAre a, FX_BOOL bCreateLast = FALSE); 62 int32_t» CreateMinPageRecord(CXFA_Node* pPageArea, FX_BOOL bTargetPageAre a, FX_BOOL bCreateLast = FALSE);
63 void CreateMinPageSetRecord(CXFA_Node* pPageSet, FX_BOOL bCre ateAll = FALSE); 63 void CreateMinPageSetRecord(CXFA_Node* pPageSet, FX_BOOL bCre ateAll = FALSE);
64 void CreateNextMinRecord(CXFA_Node* pRecordNode); 64 void CreateNextMinRecord(CXFA_Node* pRecordNode);
65 FX_BOOL FindPageAreaFromPageSet(CXFA_Node* pPageSet, CXFA_Node* pStartChild, CXFA_Node* pTargetPageArea = NULL, CXFA_Node* pTargetContentArea = NULL, FX_BOOL bNewPage = FALSE, FX_BOOL bQuery = FALSE); 65 FX_BOOL FindPageAreaFromPageSet(CXFA_Node* pPageSet, CXFA_Node* pStartChild, CXFA_Node* pTargetPageArea = NULL, CXFA_Node* pTargetContentArea = NULL, FX_BOOL bNewPage = FALSE, FX_BOOL bQuery = FALSE);
66 FX_BOOL FindPageAreaFromPageSet_Ordered(CXFA_Node* pPageSet, CXF A_Node* pStartChild, CXFA_Node* pTargetPageArea = NULL, CXFA_Node* pTargetConten tArea = NULL, FX_BOOL bNewPage = FALSE, FX_BOOL bQuery = FALSE); 66 FX_BOOL FindPageAreaFromPageSet_Ordered(CXFA_Node* pPageSet, CXF A_Node* pStartChild, CXFA_Node* pTargetPageArea = NULL, CXFA_Node* pTargetConten tArea = NULL, FX_BOOL bNewPage = FALSE, FX_BOOL bQuery = FALSE);
67 FX_BOOL FindPageAreaFromPageSet_SimplexDuplex(CXFA_Node* pPageSe t, CXFA_Node* pStartChild, CXFA_Node* pTargetPageArea = NULL, CXFA_Node* pTarget ContentArea = NULL, FX_BOOL bNewPage = FALSE, FX_BOOL bQuery = FALSE, XFA_ATTRIB UTEENUM ePreferredPosition = XFA_ATTRIBUTEENUM_First); 67 FX_BOOL FindPageAreaFromPageSet_SimplexDuplex(CXFA_Node* pPageSe t, CXFA_Node* pStartChild, CXFA_Node* pTargetPageArea = NULL, CXFA_Node* pTarget ContentArea = NULL, FX_BOOL bNewPage = FALSE, FX_BOOL bQuery = FALSE, XFA_ATTRIB UTEENUM ePreferredPosition = XFA_ATTRIBUTEENUM_First);
68 FX_BOOL MatchPageAreaOddOrEven(CXFA_Node* pPageArea, FX_BOOL bLa stMatch); 68 FX_BOOL MatchPageAreaOddOrEven(CXFA_Node* pPageArea, FX_BOOL bLa stMatch);
69 CXFA_Node* GetNextAvailPageArea(CXFA_Node* pTargetPageArea, CXFA_Node* pTar getContentArea = NULL, FX_BOOL bNewPage = FALSE, FX_BOOL bQuery = FALSE); 69 CXFA_Node* GetNextAvailPageArea(CXFA_Node* pTargetPageArea, CXFA_Node* pTar getContentArea = NULL, FX_BOOL bNewPage = FALSE, FX_BOOL bQuery = FALSE);
70 FX_BOOL GetNextContentArea(CXFA_Node* pTargetContentArea); 70 FX_BOOL GetNextContentArea(CXFA_Node* pTargetContentArea);
71 void InitPageSetMap(); 71 void InitPageSetMap();
72 void ProcessLastPageSet(); 72 void ProcessLastPageSet();
73 inline FX_BOOL IsPageSetRootOrderedOccurrence() 73 inline FX_BOOL IsPageSetRootOrderedOccurrence()
74 { 74 {
75 return m_ePageSetMode == XFA_ATTRIBUTEENUM_OrderedOccurrence; 75 return m_ePageSetMode == XFA_ATTRIBUTEENUM_OrderedOccurrence;
76 } 76 }
77 void ClearData(); 77 void ClearData();
78 void ClearRecordList(); 78 void ClearRecordList();
79 void MergePageSetContents(); 79 void MergePageSetContents();
80 void LayoutPageSetContents(); 80 void LayoutPageSetContents();
81 void PrepareLayout(); 81 void PrepareLayout();
82 CXFA_LayoutProcessor* m_pLayoutProcessor; 82 CXFA_LayoutProcessor* m_pLayoutProcessor;
83 CXFA_Node* m_pTemplatePageS etRoot; 83 CXFA_Node* m_pTemplatePageS etRoot;
84 CXFA_ContainerLayoutItemImpl* m_pPageSetLayoutItemRoot; 84 CXFA_ContainerLayoutItemImpl* m_pPageSetLayoutItemRoot;
85 CXFA_ContainerLayoutItemImpl* m_pPageSetCurRoot; 85 CXFA_ContainerLayoutItemImpl* m_pPageSetCurRoot;
86 FX_POSITION m_pCurrentContai nerRecord; 86 FX_POSITION m_pCurrentContai nerRecord;
87 CFX_PtrList m_rgProposedCont ainerRecord; 87 CFX_PtrList m_rgProposedCont ainerRecord;
88 CXFA_Node* m_pCurPageArea; 88 CXFA_Node* m_pCurPageArea;
89 FX_INT32» » » » » » » m_nAvailPages; 89 int32_t» » » » » » » m_nAvailPages;
90 FX_INT32» » » » » » » m_nCurPageCount; 90 int32_t» » » » » » » m_nCurPageCount;
91 XFA_ATTRIBUTEENUM m_ePageSetMode; 91 XFA_ATTRIBUTEENUM m_ePageSetMode;
92 FX_BOOL m_bCreat eOverFlowPage; 92 FX_BOOL m_bCreat eOverFlowPage;
93 CFX_MapPtrTemplate<CXFA_Node*, FX_INT32> m_pPageSetMap; 93 CFX_MapPtrTemplate<CXFA_Node*, int32_t> m_pPageSetMap;
94 #ifdef _XFA_LAYOUTITEM_MAPCACHE_ 94 #ifdef _XFA_LAYOUTITEM_MAPCACHE_
95 void SaveLayoutItem(CXFA_Layo utItemImpl* pParentLayoutItem); 95 void SaveLayoutItem(CXFA_Layo utItemImpl* pParentLayoutItem);
96 CFX_MapPtrToPtr m_NodeToContent; 96 CFX_MapPtrToPtr m_NodeToContent;
97 #elif defined(_XFA_LAYOUTITEM_ProcessCACHE_) 97 #elif defined(_XFA_LAYOUTITEM_ProcessCACHE_)
98 void SaveLayoutItem(CXFA_Layo utItemImpl* pParentLayoutItem); 98 void SaveLayoutItem(CXFA_Layo utItemImpl* pParentLayoutItem);
99 #endif 99 #endif
100 CFX_ArrayTemplate<CXFA_ContainerLayoutItemImpl*> m_PageArray; 100 CFX_ArrayTemplate<CXFA_ContainerLayoutItemImpl*> m_PageArray;
101 }; 101 };
102 #endif 102 #endif
OLDNEW
« no previous file with comments | « xfa/src/fxfa/src/parser/xfa_layout_itemlayout.cpp ('k') | xfa/src/fxfa/src/parser/xfa_layout_pagemgr_new.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698