diff options
author | Lei Zhang <thestig@chromium.org> | 2018-05-09 19:31:22 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-05-09 19:31:22 +0000 |
commit | a44b288c4132711d0d9dbcc6885fc98525748ad7 (patch) | |
tree | ed70574e2a4c40970545474d5c451220823d68a6 /core/fpdfapi/page | |
parent | 56b272e9cb6c680c1fcda2984c23c47b6cc4b421 (diff) | |
download | pdfium-a44b288c4132711d0d9dbcc6885fc98525748ad7.tar.xz |
Add constants for PDF 1.7 spec, table 7.13.
BUG=pdfium:1049
Change-Id: I3a589fe51f2e584dc130ba31faa144d4494a1b08
Reviewed-on: https://pdfium-review.googlesource.com/32179
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'core/fpdfapi/page')
-rw-r--r-- | core/fpdfapi/page/cpdf_pageobjectholder.cpp | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/core/fpdfapi/page/cpdf_pageobjectholder.cpp b/core/fpdfapi/page/cpdf_pageobjectholder.cpp index 3c998d2424..d8858279ca 100644 --- a/core/fpdfapi/page/cpdf_pageobjectholder.cpp +++ b/core/fpdfapi/page/cpdf_pageobjectholder.cpp @@ -9,6 +9,7 @@ #include <algorithm> #include <utility> +#include "constants/transparency.h" #include "core/fpdfapi/page/cpdf_allstates.h" #include "core/fpdfapi/page/cpdf_contentparser.h" #include "core/fpdfapi/page/cpdf_pageobject.h" @@ -69,20 +70,20 @@ CFX_FloatRect CPDF_PageObjectHolder::CalcBoundingBox() const { } void CPDF_PageObjectHolder::LoadTransInfo() { - if (!m_pFormDict) { + if (!m_pFormDict) return; - } + CPDF_Dictionary* pGroup = m_pFormDict->GetDictFor("Group"); - if (!pGroup) { + if (!pGroup) return; - } - if (pGroup->GetStringFor("S") != "Transparency") { + + if (pGroup->GetStringFor(pdfium::transparency::kGroupSubType) != + pdfium::transparency::kTransparency) { return; } m_iTransparency |= PDFTRANS_GROUP; - if (pGroup->GetIntegerFor("I")) { + if (pGroup->GetIntegerFor(pdfium::transparency::kI)) m_iTransparency |= PDFTRANS_ISOLATED; - } } size_t CPDF_PageObjectHolder::GetPageObjectCount() const { |