summaryrefslogtreecommitdiff
path: root/core/include
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2015-03-06 12:28:34 -0800
committerTom Sepez <tsepez@chromium.org>2015-03-06 12:28:34 -0800
commit0700106e13b84781c86398bb5e2b5dd3ed894007 (patch)
tree4037c37f3bfb07279ec7547a009641a3e4754eb3 /core/include
parent8842c6214cf70fa4237d17684cc9f609536c0240 (diff)
downloadpdfium-0700106e13b84781c86398bb5e2b5dd3ed894007.tar.xz
Make conversions for CPDF_Link explicit.
Precursor to taking a second shot at cleaning up the FPDF_* APIs. A FPDF_LINK is a CPDF_Dictionary, and a CPDF_Link is a structure holding a FPDF_LINK. This goes against the convention that FPDF_ types get cast to CPDF_* types, so we want to make it clear where objects are getting constructed. R=thestig@chromium.org Review URL: https://codereview.chromium.org/985503005
Diffstat (limited to 'core/include')
-rw-r--r--core/include/fpdfdoc/fpdf_doc.h18
1 files changed, 4 insertions, 14 deletions
diff --git a/core/include/fpdfdoc/fpdf_doc.h b/core/include/fpdfdoc/fpdf_doc.h
index dac215e711..002f7ea1f4 100644
--- a/core/include/fpdfdoc/fpdf_doc.h
+++ b/core/include/fpdfdoc/fpdf_doc.h
@@ -545,26 +545,16 @@ protected:
class CPDF_Link : public CFX_Object
{
public:
+ CPDF_Link() : m_pDict(nullptr) { }
+ explicit CPDF_Link(CPDF_Dictionary* pDict) : m_pDict(pDict) { }
- CPDF_Link(CPDF_Dictionary* pDict = NULL)
- {
- m_pDict = pDict;
- }
-
- operator CPDF_Dictionary*() const
- {
- return m_pDict;
- }
+ CPDF_Dictionary* GetDict() const { return m_pDict; }
CFX_FloatRect GetRect();
-
-
-
CPDF_Dest GetDest(CPDF_Document* pDoc);
-
CPDF_Action GetAction();
-
+protected:
CPDF_Dictionary* m_pDict;
};
#define ANNOTFLAG_INVISIBLE 1