diff options
author | Tom Sepez <tsepez@chromium.org> | 2018-08-17 01:11:28 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-08-17 01:11:28 +0000 |
commit | 9faabc5fc37171d9411dc2eb7f7eab4d444066a0 (patch) | |
tree | ecad3d8c2c229a2447e96c0ae86dd50ac8ed3c6d | |
parent | 136342d950c91cb1266b2a200e9dee5ade99535b (diff) | |
download | pdfium-9faabc5fc37171d9411dc2eb7f7eab4d444066a0.tar.xz |
Remove optionals from CXFA_TextLayout methods.
Change-Id: I832b694dea58de354ef115bacc11f92e072abe80
Reviewed-on: https://pdfium-review.googlesource.com/40430
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
-rw-r--r-- | xfa/fxfa/cxfa_textlayout.cpp | 19 | ||||
-rw-r--r-- | xfa/fxfa/cxfa_textlayout.h | 12 |
2 files changed, 16 insertions, 15 deletions
diff --git a/xfa/fxfa/cxfa_textlayout.cpp b/xfa/fxfa/cxfa_textlayout.cpp index 4463a34097..346a316781 100644 --- a/xfa/fxfa/cxfa_textlayout.cpp +++ b/xfa/fxfa/cxfa_textlayout.cpp @@ -464,7 +464,8 @@ bool CXFA_TextLayout::Layout(int32_t iBlock) { CFX_XMLNode* pSaveXMLNode = pXMLNode; for (; pXMLNode; pXMLNode = pXMLNode->GetNextSibling()) { if (!LoadRichText(pXMLNode, szText.width, &fLinePos, - m_pLoader->m_pParentStyle, true, nullptr)) { + m_pLoader->m_pParentStyle, true, nullptr, true, false, + 0)) { break; } } @@ -473,7 +474,8 @@ bool CXFA_TextLayout::Layout(int32_t iBlock) { if (pXMLNode == pContainerNode) break; if (!LoadRichText(pXMLNode, szText.width, &fLinePos, - m_pLoader->m_pParentStyle, true, nullptr, false)) { + m_pLoader->m_pParentStyle, true, nullptr, false, + false, 0)) { break; } pSaveXMLNode = pXMLNode; @@ -482,7 +484,8 @@ bool CXFA_TextLayout::Layout(int32_t iBlock) { continue; for (; pXMLNode; pXMLNode = pXMLNode->GetNextSibling()) { if (!LoadRichText(pXMLNode, szText.width, &fLinePos, - m_pLoader->m_pParentStyle, true, nullptr)) { + m_pLoader->m_pParentStyle, true, nullptr, true, + false, 0)) { break; } } @@ -636,7 +639,7 @@ bool CXFA_TextLayout::Loader(float textWidth, auto pRootStyle = m_textParser.CreateRootStyle(m_pTextProvider); LoadRichText(pXMLContainer, textWidth, pLinePos, pRootStyle, bSavePieces, - nullptr); + nullptr, true, false, 0); } } else { LoadText(m_pTextDataNode, textWidth, pLinePos, bSavePieces); @@ -881,7 +884,7 @@ bool CXFA_TextLayout::AppendChar(const WideString& wsText, dwStatus = m_pBreak->AppendChar(wch); if (dwStatus != CFX_BreakType::None && dwStatus != CFX_BreakType::Piece) { - AppendTextLine(dwStatus, pLinePos, bSavePieces); + AppendTextLine(dwStatus, pLinePos, bSavePieces, false); if (IsEnd(bSavePieces)) { if (m_pLoader) m_pLoader->m_iChar = i; @@ -1259,15 +1262,15 @@ void CXFA_TextLayout::RenderPath(CFX_RenderDevice* pDevice, } int32_t CXFA_TextLayout::GetDisplayPos(const CXFA_TextPiece* pPiece, - FXTEXT_CHARPOS* pCharPos, - bool bCharCode) { + FXTEXT_CHARPOS* pCharPos) { if (!pPiece) return 0; FX_RTFTEXTOBJ tr; if (!ToRun(pPiece, &tr)) return 0; - return m_pBreak->GetDisplayPos(&tr, pCharPos, bCharCode); + + return m_pBreak->GetDisplayPos(&tr, pCharPos, false); } bool CXFA_TextLayout::ToRun(const CXFA_TextPiece* pPiece, FX_RTFTEXTOBJ* tr) { diff --git a/xfa/fxfa/cxfa_textlayout.h b/xfa/fxfa/cxfa_textlayout.h index 25c73874a8..e8c56fd1fc 100644 --- a/xfa/fxfa/cxfa_textlayout.h +++ b/xfa/fxfa/cxfa_textlayout.h @@ -78,9 +78,9 @@ class CXFA_TextLayout { const RetainPtr<CFX_CSSComputedStyle>& pParentStyle, bool bSavePieces, RetainPtr<CXFA_LinkUserData> pLinkData, - bool bEndBreak = true, - bool bIsOl = false, - int32_t iLiCount = 0); + bool bEndBreak, + bool bIsOl, + int32_t iLiCount); bool AppendChar(const WideString& wsText, float* pLinePos, float fSpaceAbove, @@ -88,7 +88,7 @@ class CXFA_TextLayout { void AppendTextLine(CFX_BreakType dwStatus, float* pLinePos, bool bSavePieces, - bool bEndBreak = false); + bool bEndBreak); void EndBreak(CFX_BreakType dwStatus, float* pLinePos, bool bDefault); bool IsEnd(bool bSavePieces); void ProcessText(WideString& wsText); @@ -103,9 +103,7 @@ class CXFA_TextLayout { int32_t iPiece, FXTEXT_CHARPOS* pCharPos, const CFX_Matrix& tmDoc2Device); - int32_t GetDisplayPos(const CXFA_TextPiece* pPiece, - FXTEXT_CHARPOS* pCharPos, - bool bCharCode = false); + int32_t GetDisplayPos(const CXFA_TextPiece* pPiece, FXTEXT_CHARPOS* pCharPos); bool ToRun(const CXFA_TextPiece* pPiece, FX_RTFTEXTOBJ* tr); void DoTabstops(CFX_CSSComputedStyle* pStyle, CXFA_PieceLine* pPieceLine); bool Layout(int32_t iBlock); |