summaryrefslogtreecommitdiff
path: root/core/include/fpdfdoc
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2015-03-06 10:52:05 -0800
committerTom Sepez <tsepez@chromium.org>2015-03-06 10:52:05 -0800
commitac8d1e75645d783cc72d2cfd57554e48e3ed2999 (patch)
treef9a81ec2955e3510e2f5000951770b56abb7194a /core/include/fpdfdoc
parent934c277e262e1402a87581ab7dcef4a7733ddf08 (diff)
downloadpdfium-ac8d1e75645d783cc72d2cfd57554e48e3ed2999.tar.xz
Merge to XFA: Make conversion between CPDF_Dest and its object explicit.
Original Review URL: https://codereview.chromium.org/984703004 TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/984143002
Diffstat (limited to 'core/include/fpdfdoc')
-rw-r--r--core/include/fpdfdoc/fpdf_doc.h19
1 files changed, 5 insertions, 14 deletions
diff --git a/core/include/fpdfdoc/fpdf_doc.h b/core/include/fpdfdoc/fpdf_doc.h
index a21063fedd..5e3e11acab 100644
--- a/core/include/fpdfdoc/fpdf_doc.h
+++ b/core/include/fpdfdoc/fpdf_doc.h
@@ -124,28 +124,19 @@ public:
class CPDF_Dest : public CFX_Object
{
public:
+ CPDF_Dest() : m_pObj(nullptr) { }
+ explicit CPDF_Dest(CPDF_Object* pObj) : m_pObj(pObj) { }
- CPDF_Dest(CPDF_Object* pObj = NULL)
- {
- m_pObj = pObj;
- }
-
- operator CPDF_Object* () const
- {
- return m_pObj;
- }
+ operator bool () const { return m_pObj != NULL; }
+ CPDF_Object* GetObject() const { return m_pObj; }
CFX_ByteString GetRemoteName();
-
int GetPageIndex(CPDF_Document* pDoc);
-
FX_DWORD GetPageObjNum();
-
int GetZoomMode();
-
FX_FLOAT GetParam(int index);
-
+protected:
CPDF_Object* m_pObj;
};
class CPDF_OCContext : public CFX_Object, public IPDF_OCContext