diff options
author | Tom Sepez <tsepez@chromium.org> | 2018-10-03 23:38:32 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-10-03 23:38:32 +0000 |
commit | 244e24e17ccb574c99e5f2ca84fb2ac476ae5ccd (patch) | |
tree | 718ecb0a6b385d583fab93195cfcf14fdc9b8a60 | |
parent | 61d8d025d5687a05048202d2d1d6f355f3d20404 (diff) | |
download | pdfium-244e24e17ccb574c99e5f2ca84fb2ac476ae5ccd.tar.xz |
Remove unused method CPDF_Bookmark::GetColorRef.
Change-Id: I8ad38892eda7c820189924d53dacbb4c5a720e8b
Reviewed-on: https://pdfium-review.googlesource.com/c/43458
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
-rw-r--r-- | core/fpdfdoc/cpdf_bookmark.cpp | 24 | ||||
-rw-r--r-- | core/fpdfdoc/cpdf_bookmark.h | 1 |
2 files changed, 2 insertions, 23 deletions
diff --git a/core/fpdfdoc/cpdf_bookmark.cpp b/core/fpdfdoc/cpdf_bookmark.cpp index 89dbbf8ad3..34398439c5 100644 --- a/core/fpdfdoc/cpdf_bookmark.cpp +++ b/core/fpdfdoc/cpdf_bookmark.cpp @@ -14,33 +14,13 @@ #include "core/fpdfdoc/cpdf_nametree.h" #include "core/fxge/fx_dib.h" -namespace { - -constexpr uint32_t kBlackBGR = FXSYS_BGR(0, 0, 0); - -} // namespace - -CPDF_Bookmark::CPDF_Bookmark() {} +CPDF_Bookmark::CPDF_Bookmark() = default; CPDF_Bookmark::CPDF_Bookmark(const CPDF_Bookmark& that) = default; CPDF_Bookmark::CPDF_Bookmark(const CPDF_Dictionary* pDict) : m_pDict(pDict) {} -CPDF_Bookmark::~CPDF_Bookmark() {} - -uint32_t CPDF_Bookmark::GetColorRef() const { - if (!m_pDict) - return kBlackBGR; - - const CPDF_Array* pColor = m_pDict->GetArrayFor("C"); - if (!pColor) - return kBlackBGR; - - int r = FXSYS_round(pColor->GetNumberAt(0) * 255); - int g = FXSYS_round(pColor->GetNumberAt(1) * 255); - int b = FXSYS_round(pColor->GetNumberAt(2) * 255); - return FXSYS_BGR(b, g, r); -} +CPDF_Bookmark::~CPDF_Bookmark() = default; uint32_t CPDF_Bookmark::GetFontStyle() const { return m_pDict ? m_pDict->GetIntegerFor("F") : 0; diff --git a/core/fpdfdoc/cpdf_bookmark.h b/core/fpdfdoc/cpdf_bookmark.h index ff31af1149..47fd0715a3 100644 --- a/core/fpdfdoc/cpdf_bookmark.h +++ b/core/fpdfdoc/cpdf_bookmark.h @@ -23,7 +23,6 @@ class CPDF_Bookmark { ~CPDF_Bookmark(); const CPDF_Dictionary* GetDict() const { return m_pDict.Get(); } - uint32_t GetColorRef() const; uint32_t GetFontStyle() const; WideString GetTitle() const; CPDF_Dest GetDest(CPDF_Document* pDocument) const; |