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

Unified Diff: core/include/fpdfdoc/fpdf_doc.h

Issue 984783002: Merge to XFA: Make conversion between CPDF_Action and its dictionary explicit. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: Created 5 years, 10 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 | « no previous file | core/src/fpdfdoc/doc_action.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/include/fpdfdoc/fpdf_doc.h
diff --git a/core/include/fpdfdoc/fpdf_doc.h b/core/include/fpdfdoc/fpdf_doc.h
index fc34f1af4b75e7547340733b7fda71799d2dccda..a21063fedd42de1fc987ac1865ccbf19005a4105 100644
--- a/core/include/fpdfdoc/fpdf_doc.h
+++ b/core/include/fpdfdoc/fpdf_doc.h
@@ -264,17 +264,6 @@ public:
class CPDF_Action : public CFX_Object
{
public:
-
- CPDF_Action(CPDF_Dictionary* pDict = NULL)
- {
- m_pDict = pDict;
- }
-
- operator CPDF_Dictionary* () const
- {
- return m_pDict;
- }
-
enum ActionType {
Unknown = 0,
GoTo,
@@ -297,6 +286,13 @@ public:
GoTo3DView
};
+ CPDF_Action() : m_pDict(nullptr) { }
+ explicit CPDF_Action(CPDF_Dictionary* pDict) : m_pDict(pDict) { }
+
+ operator bool () const { return m_pDict != NULL; }
+
+ CPDF_Dictionary* GetDict() const { return m_pDict; }
+
CFX_ByteString GetTypeName() const
{
return m_pDict->GetString("S");
@@ -422,7 +418,7 @@ public:
CPDF_Action GetSubAction(FX_DWORD iIndex) const;
-
+protected:
CPDF_Dictionary* m_pDict;
};
class CPDF_AAction : public CFX_Object
« no previous file with comments | « no previous file | core/src/fpdfdoc/doc_action.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698