summaryrefslogtreecommitdiff
path: root/core/fpdfapi/fpdf_page/include
diff options
context:
space:
mode:
authorthestig <thestig@chromium.org>2016-05-19 14:36:00 -0700
committerCommit bot <commit-bot@chromium.org>2016-05-19 14:36:00 -0700
commit80f25a5a8135933a405349ffc798d13273b3d690 (patch)
treedb15a1e0c751f6fc0a648a991d744bc14e7bfadd /core/fpdfapi/fpdf_page/include
parentc7600f99490f83e544e37feb77d3b9e8428b0f68 (diff)
downloadpdfium-80f25a5a8135933a405349ffc798d13273b3d690.tar.xz
Fix leak in CPDF_StreamContentParser::AddTextObject().
... by using STL containers in more places. Remove dead / duplicate code as well. BUG=603904 Review-Url: https://codereview.chromium.org/1998583002
Diffstat (limited to 'core/fpdfapi/fpdf_page/include')
-rw-r--r--core/fpdfapi/fpdf_page/include/cpdf_clippath.h17
1 files changed, 7 insertions, 10 deletions
diff --git a/core/fpdfapi/fpdf_page/include/cpdf_clippath.h b/core/fpdfapi/fpdf_page/include/cpdf_clippath.h
index 6f239e661f..1daacf55d0 100644
--- a/core/fpdfapi/fpdf_page/include/cpdf_clippath.h
+++ b/core/fpdfapi/fpdf_page/include/cpdf_clippath.h
@@ -17,17 +17,14 @@ class CPDF_TextObject;
class CPDF_ClipPath : public CFX_CountRef<CPDF_ClipPathData> {
public:
- uint32_t GetPathCount() const { return m_pObject->m_PathCount; }
- CPDF_Path GetPath(int i) const { return m_pObject->m_pPathList[i]; }
- int GetClipType(int i) const { return m_pObject->m_pTypeList[i]; }
- uint32_t GetTextCount() const { return m_pObject->m_TextCount; }
- CPDF_TextObject* GetText(int i) const { return m_pObject->m_pTextList[i]; }
+ uint32_t GetPathCount() const;
+ CPDF_Path GetPath(size_t i) const;
+ uint8_t GetClipType(size_t i) const;
+ uint32_t GetTextCount() const;
+ CPDF_TextObject* GetText(size_t i) const;
CFX_FloatRect GetClipBox() const;
-
- void AppendPath(CPDF_Path path, int type, FX_BOOL bAutoMerge);
- void DeletePath(int layer_index);
-
- void AppendTexts(CPDF_TextObject** pTexts, int count);
+ void AppendPath(CPDF_Path path, uint8_t type, bool bAutoMerge);
+ void AppendTexts(std::vector<std::unique_ptr<CPDF_TextObject>>* pTexts);
void Transform(const CFX_Matrix& matrix);
};