summaryrefslogtreecommitdiff
path: root/xfa/fde/cfde_txtedtpage.h
diff options
context:
space:
mode:
authorweili <weili@chromium.org>2016-08-04 15:43:59 -0700
committerCommit bot <commit-bot@chromium.org>2016-08-04 15:43:59 -0700
commitcddf8253692d3beaa97a502c8b60c1d18f81664a (patch)
treebaa5b2456a1bdfec97fa97be2ef07eb3295a82d7 /xfa/fde/cfde_txtedtpage.h
parent32e693fe13105fab5baf81b334e932fce62d89b5 (diff)
downloadpdfium-cddf8253692d3beaa97a502c8b60c1d18f81664a.tar.xz
Use smart pointers for class owned pointers under xfa/fde
Use smart pointer to replace raw pointer type for class owned member variables so that memory management will be easier. BUG=pdfium:518 Review-Url: https://codereview.chromium.org/2208423002
Diffstat (limited to 'xfa/fde/cfde_txtedtpage.h')
-rw-r--r--xfa/fde/cfde_txtedtpage.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/xfa/fde/cfde_txtedtpage.h b/xfa/fde/cfde_txtedtpage.h
index 9adaee1fdc..777f82929e 100644
--- a/xfa/fde/cfde_txtedtpage.h
+++ b/xfa/fde/cfde_txtedtpage.h
@@ -7,6 +7,9 @@
#ifndef XFA_FDE_CFDE_TXTEDTPAGE_H_
#define XFA_FDE_CFDE_TXTEDTPAGE_H_
+#include <memory>
+#include <vector>
+
#include "xfa/fde/ifde_txtedtpage.h"
#include "xfa/fde/ifx_chariter.h"
@@ -60,8 +63,8 @@ class CFDE_TxtEdtPage : public IFDE_TxtEdtPage {
FX_FLOAT fTolerance) const;
std::unique_ptr<IFX_CharIter> m_pIter;
- CFDE_TxtEdtTextSet* m_pTextSet;
- CFDE_TxtEdtEngine* m_pEditEngine;
+ std::unique_ptr<CFDE_TxtEdtTextSet> m_pTextSet;
+ CFDE_TxtEdtEngine* const m_pEditEngine;
CFX_MassArrayTemplate<FDE_TEXTEDITPIECE> m_PieceMassArr;
CFDE_TxtEdtParag* m_pBgnParag;
CFDE_TxtEdtParag* m_pEndParag;
@@ -74,7 +77,7 @@ class CFDE_TxtEdtPage : public IFDE_TxtEdtPage {
CFX_RectF m_rtPageMargin;
CFX_RectF m_rtPageContents;
CFX_RectF m_rtPageCanvas;
- int32_t* m_pCharWidth;
+ std::vector<int32_t> m_CharWidths;
};
#endif // XFA_FDE_CFDE_TXTEDTPAGE_H_