summaryrefslogtreecommitdiff
path: root/xfa/fgas/layout/cfx_rtfbreak.cpp
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/fgas/layout/cfx_rtfbreak.cpp
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/fgas/layout/cfx_rtfbreak.cpp')
-rw-r--r--xfa/fgas/layout/cfx_rtfbreak.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/xfa/fgas/layout/cfx_rtfbreak.cpp b/xfa/fgas/layout/cfx_rtfbreak.cpp
index 9acc082d8e..3bc8860ab8 100644
--- a/xfa/fgas/layout/cfx_rtfbreak.cpp
+++ b/xfa/fgas/layout/cfx_rtfbreak.cpp
@@ -16,8 +16,7 @@
CFX_RTFBreak::CFX_RTFBreak(uint32_t dwLayoutStyles)
: CFX_Break(dwLayoutStyles),
m_bPagination(false),
- m_iAlignment(CFX_RTFLineAlignment::Left),
- m_pUserData(nullptr) {
+ m_iAlignment(CFX_RTFLineAlignment::Left) {
SetBreakStatus();
m_bPagination = !!(m_dwLayoutStyles & FX_LAYOUTSTYLE_Pagination);
}
@@ -41,7 +40,8 @@ void CFX_RTFBreak::AddPositionedTab(float fTabPos) {
m_PositionedTabs.insert(it, iTabPos);
}
-void CFX_RTFBreak::SetUserData(const CFX_RetainPtr<CFX_Retainable>& pUserData) {
+void CFX_RTFBreak::SetUserData(
+ const CFX_RetainPtr<CXFA_TextUserData>& pUserData) {
if (m_pUserData == pUserData)
return;
@@ -339,7 +339,7 @@ bool CFX_RTFBreak::EndBreak_SplitLine(CFX_BreakLine* pNextLine,
tp.m_iVerticalScale = pTC->m_iVerticalScale;
dwIdentity = pTC->m_dwIdentity;
tp.m_dwIdentity = dwIdentity;
- tp.m_pUserData = pTC->m_pUserData;
+ tp.m_pUserData = pTC->m_pUserData.As<CXFA_TextUserData>();
j = i;
bNew = false;
}
@@ -412,7 +412,7 @@ void CFX_RTFBreak::EndBreak_BidiLine(std::deque<FX_TPO>* tpos,
tp.m_iVerticalScale = pTC->m_iVerticalScale;
dwIdentity = pTC->m_dwIdentity;
tp.m_dwIdentity = dwIdentity;
- tp.m_pUserData = pTC->m_pUserData;
+ tp.m_pUserData = pTC->m_pUserData.As<CXFA_TextUserData>();
tp.m_dwStatus = CFX_BreakType::Piece;
++i;
} else if (iBidiLevel != pTC->m_iBidiLevel ||