From 267d2a862fd9ec7bc722533914e8e5af8a19df26 Mon Sep 17 00:00:00 2001 From: Nicolas Pena Date: Fri, 10 Nov 2017 19:22:24 +0000 Subject: Cleanup public methods of CXFA_TextLayout MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I532c3d7b76b650bbc262925b6a4a26f596a16814 Reviewed-on: https://pdfium-review.googlesource.com/18331 Reviewed-by: Ryan Harrison Commit-Queue: Nicolás Peña Moreno --- xfa/fxfa/cxfa_textlayout.h | 28 ++++++++++++---------------- 1 file changed, 12 insertions(+), 16 deletions(-) (limited to 'xfa/fxfa/cxfa_textlayout.h') diff --git a/xfa/fxfa/cxfa_textlayout.h b/xfa/fxfa/cxfa_textlayout.h index 1811d964be..070a2bd87d 100644 --- a/xfa/fxfa/cxfa_textlayout.h +++ b/xfa/fxfa/cxfa_textlayout.h @@ -34,21 +34,19 @@ class CXFA_TextLayout { ~CXFA_TextLayout(); float GetLayoutHeight(); - float StartLayout(float fWidth = -1); - bool DoLayout(int32_t iBlockIndex, - float& fCalcHeight, - float fContentAreaHeight = -1, - float fTextHeight = -1); + float StartLayout(float fWidth); + float DoLayout(int32_t iBlockIndex, + float fCalcHeight, + float fContentAreaHeight, + float fTextHeight); + float Layout(const CFX_SizeF& size); - bool CalcSize(const CFX_SizeF& minSize, - const CFX_SizeF& maxSize, - CFX_SizeF& defaultSize); - bool Layout(const CFX_SizeF& size, float* fHeight = nullptr); + CFX_SizeF CalcSize(const CFX_SizeF& minSize, const CFX_SizeF& maxSize); void ItemBlocks(const CFX_RectF& rtText, int32_t iBlockIndex); bool DrawString(CFX_RenderDevice* pFxDevice, const CFX_Matrix& tmDoc2Device, const CFX_RectF& rtClip, - int32_t iBlock = 0); + int32_t iBlock); bool IsLoaded() const { return !m_pieceLines.empty(); } void Unload(); const std::vector>* GetPieceLines() const { @@ -67,16 +65,14 @@ class CXFA_TextLayout { CFX_CSSDisplay eDisplay, float fLineWidth, CFX_XMLNode* pXMLNode, - CFX_CSSComputedStyle* pParentStyle = nullptr); - bool Loader(const CFX_SizeF& szText, - float& fLinePos, - bool bSavePieces = true); + CFX_CSSComputedStyle* pParentStyle); + bool Loader(float textWidth, float& fLinePos, bool bSavePieces); void LoadText(CXFA_Node* pNode, - const CFX_SizeF& szText, + float textWidth, float& fLinePos, bool bSavePieces); bool LoadRichText(CFX_XMLNode* pXMLNode, - const CFX_SizeF& szText, + float textWidth, float& fLinePos, const RetainPtr& pParentStyle, bool bSavePieces, -- cgit v1.2.3