diff options
Diffstat (limited to 'core')
-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; |