Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(848)

Unified Diff: core/fpdfapi/fpdf_page/include/cpdf_clippath.h

Issue 1998583002: Fix leak in CPDF_StreamContentParser::AddTextObject(). (Closed) Base URL: https://pdfium.googlesource.com/pdfium@master
Patch Set: CollectionSize Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « core/fpdfapi/fpdf_page/fpdf_page_parser.cpp ('k') | core/fpdfapi/fpdf_page/pageint.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/fpdfapi/fpdf_page/include/cpdf_clippath.h
diff --git a/core/fpdfapi/fpdf_page/include/cpdf_clippath.h b/core/fpdfapi/fpdf_page/include/cpdf_clippath.h
index 6f239e661f760b6d011cb3ee83866170eebec187..1daacf55d07d751336edcdc9a9b034bb47c52a16 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);
};
« no previous file with comments | « core/fpdfapi/fpdf_page/fpdf_page_parser.cpp ('k') | core/fpdfapi/fpdf_page/pageint.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698