summaryrefslogtreecommitdiff
path: root/xfa/fxfa
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2017-05-09 10:12:39 -0700
committerChromium commit bot <commit-bot@chromium.org>2017-05-09 17:43:04 +0000
commite02b2bc896b0872ce1a9d0997946b07dc76b9f7b (patch)
tree9b4fb6e9e64fc4bdc208042943e5e59f7a148eb4 /xfa/fxfa
parentefd4f944deaf4687911d39dbceb4c92f728e68a0 (diff)
downloadpdfium-e02b2bc896b0872ce1a9d0997946b07dc76b9f7b.tar.xz
Use CXFA_TextUserData in place of CFX_Retainable where possible.
Layering prevents the (newly-moved) CFX_Char from knowing about this class, so some casting is still required. Change-Id: I5b7556fdfa80d09e5116b171b01ab5e707763bf0 Reviewed-on: https://pdfium-review.googlesource.com/5172 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'xfa/fxfa')
-rw-r--r--xfa/fxfa/app/cxfa_textlayout.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/xfa/fxfa/app/cxfa_textlayout.cpp b/xfa/fxfa/app/cxfa_textlayout.cpp
index 69f5f53db3..686ad4ee0d 100644
--- a/xfa/fxfa/app/cxfa_textlayout.cpp
+++ b/xfa/fxfa/app/cxfa_textlayout.cpp
@@ -1027,8 +1027,7 @@ void CXFA_TextLayout::AppendTextLine(CFX_BreakType dwStatus,
int32_t i = 0;
for (i = 0; i < iPieces; i++) {
const CFX_BreakPiece* pPiece = m_pBreak->GetBreakPieceUnstable(i);
- CXFA_TextUserData* pUserData =
- static_cast<CXFA_TextUserData*>(pPiece->m_pUserData.Get());
+ CXFA_TextUserData* pUserData = pPiece->m_pUserData.Get();
if (pUserData)
pStyle = pUserData->m_pStyle;
float fVerScale = pPiece->m_iVerticalScale / 100.0f;
@@ -1082,8 +1081,7 @@ void CXFA_TextLayout::AppendTextLine(CFX_BreakType dwStatus,
float fLineWidth = 0;
for (int32_t i = 0; i < iPieces; i++) {
const CFX_BreakPiece* pPiece = m_pBreak->GetBreakPieceUnstable(i);
- CXFA_TextUserData* pUserData =
- static_cast<CXFA_TextUserData*>(pPiece->m_pUserData.Get());
+ CXFA_TextUserData* pUserData = pPiece->m_pUserData.Get();
if (pUserData)
pStyle = pUserData->m_pStyle;
float fVerScale = pPiece->m_iVerticalScale / 100.0f;