From 091344f0d97022a0bf1f9edc41455b50f95b5d05 Mon Sep 17 00:00:00 2001 From: Dan Sinclair Date: Wed, 18 Jan 2017 08:57:35 -0500 Subject: Remove unused codePage and URL code. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit These methods are never called, removed. Change-Id: I47930c209229c9e50effc433579809b882cd2dc9 Reviewed-on: https://pdfium-review.googlesource.com/2215 Commit-Queue: dsinclair Reviewed-by: Nicolás Peña Reviewed-by: Tom Sepez --- xfa/fde/css/fde_cssstylesheet.cpp | 16 +--------------- xfa/fde/css/fde_cssstylesheet.h | 4 ---- 2 files changed, 1 insertion(+), 19 deletions(-) diff --git a/xfa/fde/css/fde_cssstylesheet.cpp b/xfa/fde/css/fde_cssstylesheet.cpp index 4477593359..5bbd9fd49e 100644 --- a/xfa/fde/css/fde_cssstylesheet.cpp +++ b/xfa/fde/css/fde_cssstylesheet.cpp @@ -50,9 +50,7 @@ int32_t GetCSSNameLen(const FX_WCHAR* psz, const FX_WCHAR* pEnd) { } // namespace CFDE_CSSStyleSheet::CFDE_CSSStyleSheet() - : m_wCodePage(FX_CODEPAGE_UTF8), - m_wRefCount(1), - m_dwMediaList(FDE_CSSMEDIATYPE_ALL) { + : m_wRefCount(1), m_dwMediaList(FDE_CSSMEDIATYPE_ALL) { ASSERT(m_dwMediaList > 0); } @@ -76,19 +74,10 @@ uint32_t CFDE_CSSStyleSheet::Release() { return dwRefCount; } -bool CFDE_CSSStyleSheet::GetUrl(CFX_WideString& szUrl) { - szUrl = m_szUrl; - return szUrl.GetLength() > 0; -} - uint32_t CFDE_CSSStyleSheet::GetMediaList() const { return m_dwMediaList; } -uint16_t CFDE_CSSStyleSheet::GetCodePage() const { - return m_wCodePage; -} - int32_t CFDE_CSSStyleSheet::CountRules() const { return pdfium::CollectionSize(m_RuleArray); } @@ -101,9 +90,6 @@ bool CFDE_CSSStyleSheet::LoadFromBuffer(const FX_WCHAR* pBuffer, int32_t iBufSize) { ASSERT(pBuffer && iBufSize > 0); - m_wCodePage = FX_CODEPAGE_UTF8; - m_szUrl = CFX_WideString(); - auto pSyntax = pdfium::MakeUnique(); return pSyntax->Init(pBuffer, iBufSize) && LoadFromSyntax(pSyntax.get()); } diff --git a/xfa/fde/css/fde_cssstylesheet.h b/xfa/fde/css/fde_cssstylesheet.h index 9cc7b63cbd..aa05a9dda1 100644 --- a/xfa/fde/css/fde_cssstylesheet.h +++ b/xfa/fde/css/fde_cssstylesheet.h @@ -100,9 +100,7 @@ class CFDE_CSSStyleSheet : public IFX_Retainable { bool LoadFromBuffer(const FX_WCHAR* pBuffer, int32_t iBufSize); - bool GetUrl(CFX_WideString& szUrl); uint32_t GetMediaList() const; - uint16_t GetCodePage() const; int32_t CountRules() const; CFDE_CSSRule* GetRule(int32_t index); @@ -120,11 +118,9 @@ class CFDE_CSSStyleSheet : public IFX_Retainable { std::vector>* ruleArray); FDE_CSSSyntaxStatus SkipRuleSet(CFDE_CSSSyntaxParser* pSyntax); - uint16_t m_wCodePage; uint16_t m_wRefCount; uint32_t m_dwMediaList; std::vector> m_RuleArray; - CFX_WideString m_szUrl; std::unordered_map m_StringCache; }; -- cgit v1.2.3