diff options
Diffstat (limited to 'xfa/fxfa/parser/xfa_layout_itemlayout.h')
-rw-r--r-- | xfa/fxfa/parser/xfa_layout_itemlayout.h | 84 |
1 files changed, 41 insertions, 43 deletions
diff --git a/xfa/fxfa/parser/xfa_layout_itemlayout.h b/xfa/fxfa/parser/xfa_layout_itemlayout.h index 6da09cb3f7..0d114a4d5c 100644 --- a/xfa/fxfa/parser/xfa_layout_itemlayout.h +++ b/xfa/fxfa/parser/xfa_layout_itemlayout.h @@ -49,13 +49,13 @@ class CXFA_LayoutContext { CXFA_LayoutContext() : m_prgSpecifiedColumnWidths(nullptr), m_fCurColumnWidth(0), - m_bCurColumnWidthAvaiable(FALSE), + m_bCurColumnWidthAvaiable(false), m_pOverflowProcessor(nullptr), m_pOverflowNode(nullptr) {} ~CXFA_LayoutContext() { m_pOverflowProcessor = nullptr; } CFX_ArrayTemplate<FX_FLOAT>* m_prgSpecifiedColumnWidths; FX_FLOAT m_fCurColumnWidth; - FX_BOOL m_bCurColumnWidthAvaiable; + bool m_bCurColumnWidthAvaiable; CXFA_ItemLayoutProcessor* m_pOverflowProcessor; CXFA_Node* m_pOverflowNode; }; @@ -66,7 +66,7 @@ class CXFA_ItemLayoutProcessor { ~CXFA_ItemLayoutProcessor(); XFA_ItemLayoutProcessorResult DoLayout( - FX_BOOL bUseBreakControl, + bool bUseBreakControl, FX_FLOAT fHeightLimit, FX_FLOAT fRealHeight = XFA_LAYOUT_FLOAT_MAX, CXFA_LayoutContext* pContext = nullptr); @@ -79,32 +79,31 @@ class CXFA_ItemLayoutProcessor { void SetCurrentComponentSize(FX_FLOAT fWidth, FX_FLOAT fHeight); CXFA_Node* GetFormNode() { return m_pFormNode; } - FX_BOOL HasLayoutItem() { return !!m_pLayoutItem; } + bool HasLayoutItem() { return !!m_pLayoutItem; } CXFA_ContentLayoutItem* ExtractLayoutItem(); - static FX_BOOL IncrementRelayoutNode(CXFA_LayoutProcessor* pLayoutProcessor, - CXFA_Node* pNode, - CXFA_Node* pParentNode); + static bool IncrementRelayoutNode(CXFA_LayoutProcessor* pLayoutProcessor, + CXFA_Node* pNode, + CXFA_Node* pParentNode); static void CalculatePositionedContainerPos(CXFA_Node* pNode, FX_FLOAT fWidth, FX_FLOAT fHeight, FX_FLOAT& fAbsoluteX, FX_FLOAT& fAbsoluteY); - static FX_BOOL FindLayoutItemSplitPos(CXFA_ContentLayoutItem* pLayoutItem, - FX_FLOAT fCurVerticalOffset, - FX_FLOAT& fProposedSplitPos, - FX_BOOL& bAppChange, - FX_BOOL bCalculateMargin = TRUE); + static bool FindLayoutItemSplitPos(CXFA_ContentLayoutItem* pLayoutItem, + FX_FLOAT fCurVerticalOffset, + FX_FLOAT& fProposedSplitPos, + bool& bAppChange, + bool bCalculateMargin = true); FX_FLOAT FindSplitPos(FX_FLOAT fProposedSplitPos); void SplitLayoutItem(CXFA_ContentLayoutItem* pLayoutItem, CXFA_ContentLayoutItem* pSecondParent, FX_FLOAT fSplitPos); void SplitLayoutItem(FX_FLOAT fSplitPos); - FX_BOOL JudgePutNextPage( - CXFA_ContentLayoutItem* pParentLayoutItem, - FX_FLOAT fChildHeight, - CFX_ArrayTemplate<CXFA_ContentLayoutItem*>& pKeepItems); - FX_BOOL ProcessKeepForSplite( + bool JudgePutNextPage(CXFA_ContentLayoutItem* pParentLayoutItem, + FX_FLOAT fChildHeight, + CFX_ArrayTemplate<CXFA_ContentLayoutItem*>& pKeepItems); + bool ProcessKeepForSplite( CXFA_ItemLayoutProcessor* pParentProcessor, CXFA_ItemLayoutProcessor* pChildProcessor, XFA_ItemLayoutProcessorResult eRetValue, @@ -112,64 +111,63 @@ class CXFA_ItemLayoutProcessor { FX_FLOAT& fContentCurRowAvailWidth, FX_FLOAT& fContentCurRowHeight, FX_FLOAT& fContentCurRowY, - FX_BOOL& bAddedItemInRow, - FX_BOOL& bForceEndPage, + bool& bAddedItemInRow, + bool& bForceEndPage, XFA_ItemLayoutProcessorResult& result); FX_FLOAT InsertKeepLayoutItems(); void DoLayoutPageArea(CXFA_ContainerLayoutItem* pPageAreaLayoutItem); - FX_BOOL CalculateRowChildPosition( - CFX_ArrayTemplate<CXFA_ContentLayoutItem*>(&rgCurLineLayoutItems)[3], + bool CalculateRowChildPosition( + CFX_ArrayTemplate<CXFA_ContentLayoutItem*> (&rgCurLineLayoutItems)[3], XFA_ATTRIBUTEENUM eFlowStrategy, - FX_BOOL bContainerHeightAutoSize, - FX_BOOL bContainerWidthAutoSize, + bool bContainerHeightAutoSize, + bool bContainerWidthAutoSize, FX_FLOAT& fContentCalculatedWidth, FX_FLOAT& fContentCalculatedHeight, FX_FLOAT& fContentCurRowY, FX_FLOAT fContentCurRowHeight, FX_FLOAT fContentWidthLimit, - FX_BOOL bRootForceTb = FALSE); + bool bRootForceTb = false); void ProcessUnUseOverFlow(CXFA_Node* pLeaderNode, CXFA_Node* pTrailerNode, CXFA_ContentLayoutItem* pTrailerItem, CXFA_Node* pFormNode); void ProcessUnUseBinds(CXFA_Node* pFormNode); - FX_BOOL IsAddNewRowForTrailer(CXFA_ContentLayoutItem* pTrailerItem); - FX_BOOL JudgeLeaderOrTrailerForOccur(CXFA_Node* pFormNode); + bool IsAddNewRowForTrailer(CXFA_ContentLayoutItem* pTrailerItem); + bool JudgeLeaderOrTrailerForOccur(CXFA_Node* pFormNode); CXFA_ContentLayoutItem* CreateContentLayoutItem(CXFA_Node* pFormNode); protected: void DoLayoutPositionedContainer(CXFA_LayoutContext* pContext = nullptr); void DoLayoutTableContainer(CXFA_Node* pLayoutNode); XFA_ItemLayoutProcessorResult DoLayoutFlowedContainer( - FX_BOOL bUseBreakControl, + bool bUseBreakControl, XFA_ATTRIBUTEENUM eFlowStrategy, FX_FLOAT fHeightLimit, FX_FLOAT fRealHeight, CXFA_LayoutContext* pContext = nullptr, - FX_BOOL bRootForceTb = FALSE); + bool bRootForceTb = false); void DoLayoutField(); void XFA_ItemLayoutProcessor_GotoNextContainerNode( CXFA_Node*& pCurActionNode, XFA_ItemLayoutProcessorStages& nCurStage, CXFA_Node* pParentContainer, - FX_BOOL bUsePageBreak); + bool bUsePageBreak); - FX_BOOL ProcessKeepNodesForCheckNext(CXFA_Node*& pCurActionNode, - XFA_ItemLayoutProcessorStages& nCurStage, - CXFA_Node*& pNextContainer, - FX_BOOL& bLastKeepNode); + bool ProcessKeepNodesForCheckNext(CXFA_Node*& pCurActionNode, + XFA_ItemLayoutProcessorStages& nCurStage, + CXFA_Node*& pNextContainer, + bool& bLastKeepNode); - FX_BOOL ProcessKeepNodesForBreakBefore( - CXFA_Node*& pCurActionNode, - XFA_ItemLayoutProcessorStages& nCurStage, - CXFA_Node* pContainerNode); + bool ProcessKeepNodesForBreakBefore(CXFA_Node*& pCurActionNode, + XFA_ItemLayoutProcessorStages& nCurStage, + CXFA_Node* pContainerNode); CXFA_Node* GetSubformSetParent(CXFA_Node* pSubformSet); public: - FX_BOOL m_bKeepBreakFinish; - FX_BOOL m_bIsProcessKeep; + bool m_bKeepBreakFinish; + bool m_bIsProcessKeep; CXFA_Node* m_pKeepHeadNode; CXFA_Node* m_pKeepTailNode; CXFA_Node* m_pFormNode; @@ -181,17 +179,17 @@ class CXFA_ItemLayoutProcessor { FX_FLOAT m_fUsedSize; CXFA_LayoutPageMgr* m_pPageMgr; std::list<CXFA_Node*> m_PendingNodes; - FX_BOOL m_bBreakPending; + bool m_bBreakPending; CFX_ArrayTemplate<FX_FLOAT> m_rgSpecifiedColumnWidths; CFX_ArrayTemplate<CXFA_ContentLayoutItem*> m_arrayKeepItems; std::map<CXFA_Node*, int32_t> m_PendingNodesCount; FX_FLOAT m_fLastRowWidth; FX_FLOAT m_fLastRowY; FX_FLOAT m_fWidthLimite; - FX_BOOL m_bUseInheriated; + bool m_bUseInheriated; XFA_ItemLayoutProcessorResult m_ePreProcessRs; - FX_BOOL m_bHasAvailHeight; + bool m_bHasAvailHeight; }; -FX_BOOL XFA_ItemLayoutProcessor_IsTakingSpace(CXFA_Node* pNode); +bool XFA_ItemLayoutProcessor_IsTakingSpace(CXFA_Node* pNode); #endif // XFA_FXFA_PARSER_XFA_LAYOUT_ITEMLAYOUT_H_ |