summaryrefslogtreecommitdiff
path: root/core/src/fpdfapi/fpdf_page/pageint.h
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2016-01-08 14:52:29 -0800
committerTom Sepez <tsepez@chromium.org>2016-01-08 14:52:29 -0800
commit111d8db83ac04d15bd8d879e7dad4651ee8e27e9 (patch)
tree50a8c4d31e89b4f4936367b3c94d147956148c66 /core/src/fpdfapi/fpdf_page/pageint.h
parent8e3f8931c5dfb22ab3e0cf98821e2cca9369d69e (diff)
downloadpdfium-111d8db83ac04d15bd8d879e7dad4651ee8e27e9.tar.xz
Merge to XFA: Use unique_ptr in fpdf_page/.
Original Review URL: https://codereview.chromium.org/1568373003 . (cherry picked from commit a893a05a5c8e1f666cbf7cf9043f5687bd06d084)e5ae7226fc3f Includes the fix from e5ae7226fc3f. TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1565143004 .
Diffstat (limited to 'core/src/fpdfapi/fpdf_page/pageint.h')
-rw-r--r--core/src/fpdfapi/fpdf_page/pageint.h20
1 files changed, 13 insertions, 7 deletions
diff --git a/core/src/fpdfapi/fpdf_page/pageint.h b/core/src/fpdfapi/fpdf_page/pageint.h
index 69f06881f9..863cac88b5 100644
--- a/core/src/fpdfapi/fpdf_page/pageint.h
+++ b/core/src/fpdfapi/fpdf_page/pageint.h
@@ -9,6 +9,7 @@
#include <map>
#include <memory>
+#include <vector>
#include "core/include/fpdfapi/fpdf_page.h"
#include "core/include/fpdfapi/fpdf_pageobj.h"
@@ -268,7 +269,7 @@ class CPDF_StreamContentParser {
FX_BOOL m_bColored;
FX_FLOAT m_Type3Data[6];
FX_BOOL m_bResourceMissing;
- CFX_ArrayTemplate<CPDF_AllStates*> m_StateStack;
+ std::vector<std::unique_ptr<CPDF_AllStates>> m_StateStack;
};
class CPDF_ContentParser {
public:
@@ -287,21 +288,26 @@ class CPDF_ContentParser {
int level);
void Continue(IFX_Pause* pPause);
- protected:
- void Clear();
+ private:
+ enum InternalStage {
+ STAGE_GETCONTENT = 1,
+ STAGE_PARSE,
+ STAGE_CHECKCLIP,
+ };
+
ParseStatus m_Status;
+ InternalStage m_InternalStage;
CPDF_PageObjects* m_pObjects;
FX_BOOL m_bForm;
CPDF_ParseOptions m_Options;
CPDF_Type3Char* m_pType3Char;
- int m_InternalStage;
- CPDF_StreamAcc* m_pSingleStream;
- CPDF_StreamAcc** m_pStreamArray;
FX_DWORD m_nStreams;
+ std::unique_ptr<CPDF_StreamAcc> m_pSingleStream;
+ std::vector<std::unique_ptr<CPDF_StreamAcc>> m_StreamArray;
uint8_t* m_pData;
FX_DWORD m_Size;
- class CPDF_StreamContentParser* m_pParser;
FX_DWORD m_CurrentOffset;
+ std::unique_ptr<CPDF_StreamContentParser> m_pParser;
};
class CPDF_AllStates : public CPDF_GraphicStates {
public: