summaryrefslogtreecommitdiff
path: root/xfa/fxfa/cxfa_textlayout.h
diff options
context:
space:
mode:
authorNicolas Pena <npm@chromium.org>2017-11-10 19:22:24 +0000
committerChromium commit bot <commit-bot@chromium.org>2017-11-10 19:22:24 +0000
commit267d2a862fd9ec7bc722533914e8e5af8a19df26 (patch)
tree1b913d9b1f0c6ab4c3ce7436477a009b7f429f73 /xfa/fxfa/cxfa_textlayout.h
parentc7056ca0027eb34ed9abf31338c4cd2ffff40528 (diff)
downloadpdfium-267d2a862fd9ec7bc722533914e8e5af8a19df26.tar.xz
Cleanup public methods of CXFA_TextLayout
Change-Id: I532c3d7b76b650bbc262925b6a4a26f596a16814 Reviewed-on: https://pdfium-review.googlesource.com/18331 Reviewed-by: Ryan Harrison <rharrison@chromium.org> Commit-Queue: Nicolás Peña Moreno <npm@chromium.org>
Diffstat (limited to 'xfa/fxfa/cxfa_textlayout.h')
-rw-r--r--xfa/fxfa/cxfa_textlayout.h28
1 files changed, 12 insertions, 16 deletions
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<std::unique_ptr<CXFA_PieceLine>>* 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<CFX_CSSComputedStyle>& pParentStyle,
bool bSavePieces,