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 /xfa/fxfa/cxfa_textlayout.cpp | |
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>
Diffstat (limited to 'xfa/fxfa/cxfa_textlayout.cpp')
-rw-r--r-- | xfa/fxfa/cxfa_textlayout.cpp | 19 |
1 files changed, 11 insertions, 8 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) { |