diff options
author | Dan Sinclair <dsinclair@chromium.org> | 2018-01-31 20:13:44 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-01-31 20:13:44 +0000 |
commit | 405f17ae3f297d28917370d013d95adc31e7c4a1 (patch) | |
tree | 0afaaaa4f8652903dfd49a381dd871c1da8a017b /xfa/fxfa/parser/cxfa_itemlayoutprocessor.h | |
parent | 990c09373b733346a06b03167ca43252cb93e986 (diff) | |
download | pdfium-405f17ae3f297d28917370d013d95adc31e7c4a1.tar.xz |
Cleanup visibility in CXFA_ItemLayoutProcessor
This CL moves anonymous namespace methods in CXFA_ItemLayoutProcessor to
be private methods and then fixes the visibility on most of the
methods/data to be private.
Change-Id: Idfccbc53b94628b18bc3576e4466391b0f704b44
Reviewed-on: https://pdfium-review.googlesource.com/24851
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'xfa/fxfa/parser/cxfa_itemlayoutprocessor.h')
-rw-r--r-- | xfa/fxfa/parser/cxfa_itemlayoutprocessor.h | 72 |
1 files changed, 47 insertions, 25 deletions
diff --git a/xfa/fxfa/parser/cxfa_itemlayoutprocessor.h b/xfa/fxfa/parser/cxfa_itemlayoutprocessor.h index 7dbc754ec6..fdca14285f 100644 --- a/xfa/fxfa/parser/cxfa_itemlayoutprocessor.h +++ b/xfa/fxfa/parser/cxfa_itemlayoutprocessor.h @@ -48,10 +48,6 @@ enum class XFA_ItemLayoutProcessorStages { class CXFA_ItemLayoutProcessor { public: - static bool IncrementRelayoutNode(CXFA_LayoutProcessor* pLayoutProcessor, - CXFA_Node* pNode, - CXFA_Node* pParentNode); - CXFA_ItemLayoutProcessor(CXFA_Node* pNode, CXFA_LayoutPageMgr* pPageMgr); ~CXFA_ItemLayoutProcessor(); @@ -61,16 +57,17 @@ class CXFA_ItemLayoutProcessor { CXFA_LayoutContext* pContext); void DoLayoutPageArea(CXFA_ContainerLayoutItem* pPageAreaLayoutItem); - CFX_SizeF GetCurrentComponentSize(); CXFA_Node* GetFormNode() { return m_pFormNode; } - bool HasLayoutItem() const { return !!m_pLayoutItem; } CXFA_ContentLayoutItem* ExtractLayoutItem(); + + private: + CFX_SizeF GetCurrentComponentSize(); + bool HasLayoutItem() const { return !!m_pLayoutItem; } void SplitLayoutItem(float fSplitPos); float FindSplitPos(float fProposedSplitPos); bool ProcessKeepForSplit( - CXFA_ItemLayoutProcessor* pParentProcessor, CXFA_ItemLayoutProcessor* pChildProcessor, XFA_ItemLayoutProcessorResult eRetValue, std::vector<CXFA_ContentLayoutItem*>* rgCurLineLayoutItem, @@ -89,21 +86,6 @@ class CXFA_ItemLayoutProcessor { CXFA_ContentLayoutItem* CreateContentLayoutItem(CXFA_Node* pFormNode); - CXFA_Node* m_pFormNode; - CXFA_ContentLayoutItem* m_pLayoutItem; - CXFA_Node* m_pCurChildNode; - float m_fUsedSize; - CXFA_LayoutPageMgr* m_pPageMgr; - std::list<CXFA_Node*> m_PendingNodes; - bool m_bBreakPending; - std::vector<float> m_rgSpecifiedColumnWidths; - std::vector<CXFA_ContentLayoutItem*> m_arrayKeepItems; - float m_fLastRowWidth; - float m_fLastRowY; - bool m_bUseInheriated; - XFA_ItemLayoutProcessorResult m_ePreProcessRs; - - private: void SetCurrentComponentPos(const CFX_PointF& pos); void SetCurrentComponentSize(const CFX_SizeF& size); @@ -139,21 +121,61 @@ class CXFA_ItemLayoutProcessor { void DoLayoutField(); void GotoNextContainerNode(CXFA_Node*& pCurActionNode, - XFA_ItemLayoutProcessorStages& nCurStage, + XFA_ItemLayoutProcessorStages* nCurStage, CXFA_Node* pParentContainer, bool bUsePageBreak); bool ProcessKeepNodesForCheckNext(CXFA_Node*& pCurActionNode, - XFA_ItemLayoutProcessorStages& nCurStage, + XFA_ItemLayoutProcessorStages* nCurStage, CXFA_Node*& pNextContainer, bool& bLastKeepNode); bool ProcessKeepNodesForBreakBefore(CXFA_Node*& pCurActionNode, - XFA_ItemLayoutProcessorStages& nCurStage, + XFA_ItemLayoutProcessorStages* nCurStage, CXFA_Node* pContainerNode); CXFA_Node* GetSubformSetParent(CXFA_Node* pSubformSet); + void UpdatePendingItemLayout(CXFA_ContentLayoutItem* pLayoutItem); + void AddTrailerBeforeSplit(float fSplitPos, + CXFA_ContentLayoutItem* pTrailerLayoutItem, + bool bUseInherited); + void AddLeaderAfterSplit(CXFA_ContentLayoutItem* pLeaderLayoutItem); + void AddPendingNode(CXFA_Node* pPendingNode, bool bBreakPending); + float InsertPendingItems(CXFA_Node* pCurChildNode); + XFA_ItemLayoutProcessorResult InsertFlowedItem( + CXFA_ItemLayoutProcessor* pProcessor, + bool bContainerWidthAutoSize, + bool bContainerHeightAutoSize, + float fContainerHeight, + XFA_AttributeEnum eFlowStrategy, + uint8_t* uCurHAlignState, + std::vector<CXFA_ContentLayoutItem*> (&rgCurLineLayoutItems)[3], + bool bUseBreakControl, + float fAvailHeight, + float fRealHeight, + float fContentWidthLimit, + float* fContentCurRowY, + float* fContentCurRowAvailWidth, + float* fContentCurRowHeight, + bool* bAddedItemInRow, + bool* bForceEndPage, + CXFA_LayoutContext* pLayoutContext, + bool bNewRow); + + CXFA_Node* m_pFormNode; + CXFA_ContentLayoutItem* m_pLayoutItem; + CXFA_Node* m_pCurChildNode; + float m_fUsedSize; + CXFA_LayoutPageMgr* m_pPageMgr; + std::list<CXFA_Node*> m_PendingNodes; + bool m_bBreakPending; + std::vector<float> m_rgSpecifiedColumnWidths; + std::vector<CXFA_ContentLayoutItem*> m_arrayKeepItems; + float m_fLastRowWidth; + float m_fLastRowY; + bool m_bUseInheriated; + XFA_ItemLayoutProcessorResult m_ePreProcessRs; bool m_bKeepBreakFinish; bool m_bIsProcessKeep; CXFA_Node* m_pKeepHeadNode; |