summaryrefslogtreecommitdiff
path: root/xfa/fgas/layout/fgas_rtfbreak.h
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2017-01-24 14:24:36 -0800
committerChromium commit bot <commit-bot@chromium.org>2017-01-25 15:37:27 +0000
commit03de88464cc818ac4353de3e7ec49b98166bcdc5 (patch)
tree4b28fac20a0202a67d54514686d36df74122e3b9 /xfa/fgas/layout/fgas_rtfbreak.h
parentd198e406d13b831ffd4b1a2bfdf12522dea31205 (diff)
downloadpdfium-03de88464cc818ac4353de3e7ec49b98166bcdc5.tar.xz
Remove last usage of IFX_Retainable.chromium/2993
Change-Id: Id2ece818c80e8cce4748b9a237871131a7acd6d1 Reviewed-on: https://pdfium-review.googlesource.com/2354 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'xfa/fgas/layout/fgas_rtfbreak.h')
-rw-r--r--xfa/fgas/layout/fgas_rtfbreak.h13
1 files changed, 4 insertions, 9 deletions
diff --git a/xfa/fgas/layout/fgas_rtfbreak.h b/xfa/fgas/layout/fgas_rtfbreak.h
index 613156a3e0..15fdbb807a 100644
--- a/xfa/fgas/layout/fgas_rtfbreak.h
+++ b/xfa/fgas/layout/fgas_rtfbreak.h
@@ -9,6 +9,7 @@
#include <vector>
+#include "core/fxcrt/cfx_retain_ptr.h"
#include "core/fxcrt/fx_basic.h"
#include "core/fxcrt/fx_ucd.h"
#include "xfa/fgas/crt/fgas_utils.h"
@@ -163,7 +164,7 @@ class CFX_RTFPiece {
uint32_t m_dwLayoutStyles;
uint32_t m_dwIdentity;
std::vector<CFX_RTFChar>* m_pChars; // not owned.
- IFX_Retainable* m_pUserData;
+ CFX_RetainPtr<CFX_Retainable> m_pUserData;
};
typedef CFX_BaseArrayTemplate<CFX_RTFPiece> CFX_RTFPieceArray;
@@ -195,12 +196,6 @@ class CFX_RTFLine {
}
int32_t GetLineEnd() const { return m_iStart + m_iWidth; }
void RemoveAll(bool bLeaveMemory = false) {
- int32_t iCount = pdfium::CollectionSize<int32_t>(m_LineChars);
- for (int32_t i = 0; i < iCount; i++) {
- CFX_RTFChar* pChar = &m_LineChars[i];
- if (pChar->m_pUserData)
- pChar->m_pUserData->Release();
- }
m_LineChars.clear();
m_LinePieces.RemoveAll(bLeaveMemory);
m_iWidth = 0;
@@ -241,7 +236,7 @@ class CFX_RTFBreak {
void SetWordSpace(bool bDefault, FX_FLOAT fWordSpace);
void SetReadingOrder(bool bRTL = false);
void SetAlignment(int32_t iAlignment = FX_RTFLINEALIGNMENT_Left);
- void SetUserData(IFX_Retainable* pUserData);
+ void SetUserData(const CFX_RetainPtr<CFX_Retainable>& pUserData);
uint32_t AppendChar(FX_WCHAR wch);
uint32_t EndBreak(uint32_t dwStatus = FX_RTFBREAK_PieceBreak);
int32_t CountBreakPieces() const;
@@ -316,7 +311,7 @@ class CFX_RTFBreak {
int32_t m_iWordSpace;
bool m_bRTL;
int32_t m_iAlignment;
- IFX_Retainable* m_pUserData;
+ CFX_RetainPtr<CFX_Retainable> m_pUserData;
FX_CHARTYPE m_eCharType;
uint32_t m_dwIdentity;
CFX_RTFLine m_RTFLine1;