summaryrefslogtreecommitdiff
path: root/core/fpdfapi/page/cpdf_pageobjectholder.h
diff options
context:
space:
mode:
Diffstat (limited to 'core/fpdfapi/page/cpdf_pageobjectholder.h')
-rw-r--r--core/fpdfapi/page/cpdf_pageobjectholder.h21
1 files changed, 11 insertions, 10 deletions
diff --git a/core/fpdfapi/page/cpdf_pageobjectholder.h b/core/fpdfapi/page/cpdf_pageobjectholder.h
index 816a294149..79b2166d52 100644
--- a/core/fpdfapi/page/cpdf_pageobjectholder.h
+++ b/core/fpdfapi/page/cpdf_pageobjectholder.h
@@ -41,21 +41,22 @@ struct FontData {
class CPDF_PageObjectHolder {
public:
+ enum class ParseState : uint8_t { kNotParsed, kParsing, kParsed };
+
CPDF_PageObjectHolder(CPDF_Document* pDoc, CPDF_Dictionary* pFormDict);
virtual ~CPDF_PageObjectHolder();
virtual bool IsPage() const;
+ void StartParse(std::unique_ptr<CPDF_ContentParser> pParser);
void ContinueParse(PauseIndicatorIface* pPause);
- bool IsParsed() const { return m_ParseState == CONTENT_PARSED; }
+ ParseState GetParseState() const { return m_ParseState; }
- const CPDF_Document* GetDocument() const { return m_pDocument.Get(); }
- CPDF_Document* GetDocument() { return m_pDocument.Get(); }
+ CPDF_Document* GetDocument() const { return m_pDocument.Get(); }
// TODO(thestig): Can this return nullptr? If not, audit callers and simplify
// the ones that assume it can.
- const CPDF_Dictionary* GetFormDict() const { return m_pFormDict.Get(); }
- CPDF_Dictionary* GetFormDict() { return m_pFormDict.Get(); }
+ CPDF_Dictionary* GetFormDict() const { return m_pFormDict.Get(); }
const CPDF_PageObjectList* GetPageObjectList() const {
return &m_PageObjectList;
@@ -90,17 +91,17 @@ class CPDF_PageObjectHolder {
std::map<FontData, ByteString> m_FontsMap;
protected:
- enum ParseState { CONTENT_NOT_PARSED, CONTENT_PARSING, CONTENT_PARSED };
-
void LoadTransInfo();
- const UnownedPtr<CPDF_Dictionary> m_pFormDict;
- UnownedPtr<CPDF_Document> m_pDocument;
CFX_FloatRect m_BBox;
CPDF_Transparency m_Transparency;
+
+ private:
bool m_bBackgroundAlphaNeeded = false;
+ ParseState m_ParseState = ParseState::kNotParsed;
+ const UnownedPtr<CPDF_Dictionary> m_pFormDict;
+ UnownedPtr<CPDF_Document> m_pDocument;
std::vector<CFX_FloatRect> m_MaskBoundingBoxes;
- ParseState m_ParseState = CONTENT_NOT_PARSED;
std::unique_ptr<CPDF_ContentParser> m_pParser;
CPDF_PageObjectList m_PageObjectList;
CFX_Matrix m_LastCTM;