diff options
author | Lei Zhang <thestig@chromium.org> | 2018-08-23 20:27:21 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-08-23 20:27:21 +0000 |
commit | e919ec18fc0b008241e5e5371d5762e9fe89de6f (patch) | |
tree | 28ce1e1e7dec14948f584ca6d0228e88c8c0c3e6 /core/fpdfdoc | |
parent | b4f2744daca0e3d3cebdad92fcc28a271cf0767a (diff) | |
download | pdfium-e919ec18fc0b008241e5e5371d5762e9fe89de6f.tar.xz |
Remove deprecated FPDFDest_GetPageIndex() API.
Use FPDFDest_GetDestPageIndex() instead.
BUG=pdfium:1041
Change-Id: I8e91ef46456a60ebd873068765b7c3ff1a991fa4
Reviewed-on: https://pdfium-review.googlesource.com/41230
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Diffstat (limited to 'core/fpdfdoc')
-rw-r--r-- | core/fpdfdoc/cpdf_dest.cpp | 18 | ||||
-rw-r--r-- | core/fpdfdoc/cpdf_dest.h | 5 |
2 files changed, 0 insertions, 23 deletions
diff --git a/core/fpdfdoc/cpdf_dest.cpp b/core/fpdfdoc/cpdf_dest.cpp index 58d0ac26b8..8dd58b185a 100644 --- a/core/fpdfdoc/cpdf_dest.cpp +++ b/core/fpdfdoc/cpdf_dest.cpp @@ -38,24 +38,6 @@ CPDF_Dest::CPDF_Dest(const CPDF_Array* pObj) : m_pObj(pObj) {} CPDF_Dest::~CPDF_Dest() {} -int CPDF_Dest::GetPageIndexDeprecated(CPDF_Document* pDoc) const { - const CPDF_Array* pArray = ToArray(m_pObj.Get()); - if (!pArray) - return 0; - - const CPDF_Object* pPage = pArray->GetDirectObjectAt(0); - if (!pPage) - return 0; - - if (pPage->IsNumber()) - return pPage->GetInteger(); - - if (!pPage->IsDictionary()) - return 0; - - return pDoc->GetPageIndex(pPage->GetObjNum()); -} - int CPDF_Dest::GetDestPageIndex(CPDF_Document* pDoc) const { const CPDF_Array* pArray = ToArray(m_pObj.Get()); if (!pArray) diff --git a/core/fpdfdoc/cpdf_dest.h b/core/fpdfdoc/cpdf_dest.h index 7f4eb86c00..c30db1183c 100644 --- a/core/fpdfdoc/cpdf_dest.h +++ b/core/fpdfdoc/cpdf_dest.h @@ -24,11 +24,6 @@ class CPDF_Dest { const CPDF_Array* GetObject() const { return m_pObj.Get(); } ByteString GetRemoteName() const; - // Deprecated. Use GetDestPageIndex instead. - // This method is wrong. It returns 0 for errors, when it could mean the first - // page as well. Keeping it avoids changing the behavior of - // FPDFDest_GetPageIndex(). - int GetPageIndexDeprecated(CPDF_Document* pDoc) const; int GetDestPageIndex(CPDF_Document* pDoc) const; uint32_t GetPageObjNum() const; |