From 5c529e6318d46121a5ea38d3edb42c8d9f580fe8 Mon Sep 17 00:00:00 2001 From: Dan Sinclair Date: Tue, 21 Mar 2017 11:31:25 -0400 Subject: Combine more RTF and TXT Break code MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This Cl conbines several more methods from RTFBreak and TXTBreak into the common Break baseclass. Change-Id: Ibe2236eb4fd30faab239e7c9c8b578164014eb39 Reviewed-on: https://pdfium-review.googlesource.com/3108 Reviewed-by: Nicolás Peña Commit-Queue: dsinclair --- xfa/fde/tto/fde_textout.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'xfa/fde/tto') diff --git a/xfa/fde/tto/fde_textout.cpp b/xfa/fde/tto/fde_textout.cpp index 6808ff0c6c..6d56ec70c8 100644 --- a/xfa/fde/tto/fde_textout.cpp +++ b/xfa/fde/tto/fde_textout.cpp @@ -244,7 +244,7 @@ bool CFDE_TextOut::RetrieveLineWidth(CFX_BreakType dwBreakStatus, float fLineWidth = 0.0f; int32_t iCount = m_pTxtBreak->CountBreakPieces(); for (int32_t i = 0; i < iCount; i++) { - const CFX_BreakPiece* pPiece = m_pTxtBreak->GetBreakPiece(i); + const CFX_BreakPiece* pPiece = m_pTxtBreak->GetBreakPieceUnstable(i); fLineWidth += static_cast(pPiece->m_iWidth) / 20000.0f; fStartPos = std::min(fStartPos, static_cast(pPiece->m_iStartPos) / 20000.0f); @@ -386,7 +386,7 @@ void CFDE_TextOut::RetrieveEllPieces(std::vector* pCharWidths) { int32_t iCount = m_pTxtBreak->CountBreakPieces(); int32_t iCharIndex = 0; for (int32_t i = 0; i < iCount; i++) { - const CFX_BreakPiece* pPiece = m_pTxtBreak->GetBreakPiece(i); + const CFX_BreakPiece* pPiece = m_pTxtBreak->GetBreakPieceUnstable(i); int32_t iPieceChars = pPiece->GetLength(); for (int32_t j = 0; j < iPieceChars; j++) { (*pCharWidths)[iCharIndex] = @@ -466,7 +466,7 @@ bool CFDE_TextOut::RetrievePieces(CFX_BreakType dwBreakStatus, int32_t iLineWidth = FXSYS_round(fLineWidth * 20000.0f); int32_t iCount = m_pTxtBreak->CountBreakPieces(); for (int32_t i = 0; i < iCount; i++) { - const CFX_BreakPiece* pPiece = m_pTxtBreak->GetBreakPiece(i); + const CFX_BreakPiece* pPiece = m_pTxtBreak->GetBreakPieceUnstable(i); int32_t iPieceChars = pPiece->GetLength(); int32_t iChar = iStartChar; int32_t iWidth = 0; -- cgit v1.2.3