summaryrefslogtreecommitdiff
path: root/core/include
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2015-03-05 16:44:22 -0800
committerTom Sepez <tsepez@chromium.org>2015-03-05 16:44:22 -0800
commit7b5bc26e8267fec38bef9f95cd04d2bd731faff3 (patch)
tree9203aa0ff0d4a34616a5161b2ded34ce7e9ada24 /core/include
parent827a1722f70e7092270b5e0fdfba1e9c0b1ac50f (diff)
downloadpdfium-7b5bc26e8267fec38bef9f95cd04d2bd731faff3.tar.xz
Merge to XFA: Make conversion between CPDF_Action and its dictionary explicit.
Original Review URL: https://codereview.chromium.org/984773002 R=thestig@chromium.org TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/984783002
Diffstat (limited to 'core/include')
-rw-r--r--core/include/fpdfdoc/fpdf_doc.h20
1 files changed, 8 insertions, 12 deletions
diff --git a/core/include/fpdfdoc/fpdf_doc.h b/core/include/fpdfdoc/fpdf_doc.h
index fc34f1af4b..a21063fedd 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