From 09065aeee59e51e88de054c8dab3b0e538c0893f Mon Sep 17 00:00:00 2001 From: Dan Sinclair Date: Wed, 18 Jan 2017 08:56:52 -0500 Subject: Remove GetDeclImp methods in favour of GetDeclaration MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I245d755814123f351a661bda1f38eaa96d4e68ae Reviewed-on: https://pdfium-review.googlesource.com/2214 Reviewed-by: Nicolás Peña Reviewed-by: Tom Sepez Commit-Queue: dsinclair --- xfa/fde/css/fde_cssstylesheet.cpp | 16 ++++++++-------- xfa/fde/css/fde_cssstylesheet.h | 3 +-- 2 files changed, 9 insertions(+), 10 deletions(-) (limited to 'xfa/fde') diff --git a/xfa/fde/css/fde_cssstylesheet.cpp b/xfa/fde/css/fde_cssstylesheet.cpp index 50f2bddfbf..4477593359 100644 --- a/xfa/fde/css/fde_cssstylesheet.cpp +++ b/xfa/fde/css/fde_cssstylesheet.cpp @@ -213,15 +213,15 @@ FDE_CSSSyntaxStatus CFDE_CSSStyleSheet::LoadStyleRule( if (propertyArgs.pProperty) { pszValue = pSyntax->GetCurrentString(iValueLen); if (iValueLen > 0) { - pStyleRule->GetDeclImp().AddProperty(&propertyArgs, pszValue, - iValueLen); + pStyleRule->GetDeclaration()->AddProperty(&propertyArgs, pszValue, + iValueLen); } } else if (iValueLen > 0) { pszValue = pSyntax->GetCurrentString(iValueLen); if (iValueLen > 0) { - pStyleRule->GetDeclImp().AddProperty(&propertyArgs, wsName.c_str(), - wsName.GetLength(), pszValue, - iValueLen); + pStyleRule->GetDeclaration()->AddProperty( + &propertyArgs, wsName.c_str(), wsName.GetLength(), pszValue, + iValueLen); } } break; @@ -237,7 +237,7 @@ FDE_CSSSyntaxStatus CFDE_CSSStyleSheet::LoadStyleRule( } break; case FDE_CSSSyntaxStatus::DeclClose: - if (pStyleRule && pStyleRule->GetDeclImp().empty()) { + if (pStyleRule && pStyleRule->GetDeclaration()->empty()) { ruleArray->pop_back(); pStyleRule = nullptr; } @@ -271,8 +271,8 @@ FDE_CSSSyntaxStatus CFDE_CSSStyleSheet::LoadFontFaceRule( if (propertyArgs.pProperty) { pszValue = pSyntax->GetCurrentString(iValueLen); if (iValueLen > 0) { - pFontFaceRule->GetDeclImp().AddProperty(&propertyArgs, pszValue, - iValueLen); + pFontFaceRule->GetDeclaration()->AddProperty(&propertyArgs, + pszValue, iValueLen); } } break; diff --git a/xfa/fde/css/fde_cssstylesheet.h b/xfa/fde/css/fde_cssstylesheet.h index 46c0897694..9cc7b63cbd 100644 --- a/xfa/fde/css/fde_cssstylesheet.h +++ b/xfa/fde/css/fde_cssstylesheet.h @@ -54,7 +54,6 @@ class CFDE_CSSStyleRule : public CFDE_CSSRule { size_t CountSelectorLists() const; CFDE_CSSSelector* GetSelectorList(int32_t index) const; CFDE_CSSDeclaration* GetDeclaration(); - CFDE_CSSDeclaration& GetDeclImp() { return m_Declaration; } void SetSelector(std::vector>* list); @@ -84,7 +83,7 @@ class CFDE_CSSFontFaceRule : public CFDE_CSSRule { CFDE_CSSFontFaceRule(); ~CFDE_CSSFontFaceRule() override; - CFDE_CSSDeclaration& GetDeclImp() { return m_Declaration; } + CFDE_CSSDeclaration* GetDeclaration() { return &m_Declaration; } private: CFDE_CSSDeclaration m_Declaration; -- cgit v1.2.3