diff options
author | Tom Sepez <tsepez@chromium.org> | 2018-05-25 23:37:50 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-05-25 23:37:50 +0000 |
commit | ca02733961f84abd562d59e4b6a83018ef41b143 (patch) | |
tree | a5f2cb28353fc82aab57f99d6605f5b817a04cce /fpdfsdk/cpdfsdk_helpers.cpp | |
parent | df93cd35530e7b8dd67abde8d199c36c3fae76be (diff) | |
download | pdfium-ca02733961f84abd562d59e4b6a83018ef41b143.tar.xz |
Replace some #ifdefs PDF_ENABLE_XFA, part 2.
Tidy some code encountered along the way in cpdfsdk_helpers.cpp
Remove one ifdef from xfa-only file.
Restore some option flag processing (probably wrong to remove).
Flip some #ifndef to #ifdef (#ifndef PDF_ENABLE_XFA is an
anti-pattern and should be treated with suspicion since XFA should
always be "additive").
Change-Id: I564a28401e20e6269c85ea610da8c96f8c8dd737
Reviewed-on: https://pdfium-review.googlesource.com/32834
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Diffstat (limited to 'fpdfsdk/cpdfsdk_helpers.cpp')
-rw-r--r-- | fpdfsdk/cpdfsdk_helpers.cpp | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/fpdfsdk/cpdfsdk_helpers.cpp b/fpdfsdk/cpdfsdk_helpers.cpp index eb91bcf9ba..5773a8b512 100644 --- a/fpdfsdk/cpdfsdk_helpers.cpp +++ b/fpdfsdk/cpdfsdk_helpers.cpp @@ -215,10 +215,9 @@ void CheckUnSupportError(CPDF_Document* pDoc, uint32_t err_code) { if (!pDoc) return; - // Portfolios and Packages const CPDF_Dictionary* pRootDict = pDoc->GetRoot(); if (pRootDict) { - ByteString cbString; + // Portfolios and Packages if (pRootDict->KeyExist("Collection")) { RaiseUnSupportError(FPDF_UNSP_DOC_PORTABLECOLLECTION); return; @@ -244,12 +243,8 @@ void CheckUnSupportError(CPDF_Document* pDoc, uint32_t err_code) { } } } - } - - // SharedForm - const CPDF_Dictionary* pRoot = pDoc->GetRoot(); - if (pRoot) { - const CPDF_Stream* pStream = pRoot->GetStreamFor("Metadata"); + // SharedForm + const CPDF_Stream* pStream = pRootDict->GetStreamFor("Metadata"); if (pStream) { CPDF_Metadata metaData(pStream); for (const auto& err : metaData.CheckForSharedForm()) |