diff options
author | Lei Zhang <thestig@chromium.org> | 2015-08-11 14:08:47 -0700 |
---|---|---|
committer | Lei Zhang <thestig@chromium.org> | 2015-08-11 14:08:47 -0700 |
commit | 119dc646ff7c108cc7319dbc11e05958d98fadfe (patch) | |
tree | 287591b7caa87be7fc7def160bfb47d1a80a0f5f /fpdfsdk | |
parent | 335e11825fcb8520f68ac668f8dacd9b48f05804 (diff) | |
download | pdfium-119dc646ff7c108cc7319dbc11e05958d98fadfe.tar.xz |
Merge to XFA: Remove dead code from CPDF_Metadata. Add missing nullptr check.
BUG=pdfium:117
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1282653002 .
(cherry picked from commit 1e2ece0cf98f8daecdea5b45ebd20cedbcef4bd9)
Review URL: https://codereview.chromium.org/1274803004 .
Diffstat (limited to 'fpdfsdk')
-rw-r--r-- | fpdfsdk/src/fpdf_ext.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/fpdfsdk/src/fpdf_ext.cpp b/fpdfsdk/src/fpdf_ext.cpp index a198f9f63c..210c28dc43 100644 --- a/fpdfsdk/src/fpdf_ext.cpp +++ b/fpdfsdk/src/fpdf_ext.cpp @@ -89,7 +89,7 @@ void CheckUnSupportAnnot(CPDF_Document* pDoc, CPDF_Annot* pPDFAnnot) { } } -FX_BOOL CheckSharedForm(CXML_Element* pElement, CFX_ByteString cbName) { +FX_BOOL CheckSharedForm(const CXML_Element* pElement, CFX_ByteString cbName) { int count = pElement->CountAttrs(); int i = 0; for (i = 0; i < count; i++) { @@ -169,9 +169,8 @@ void CheckUnSupportError(CPDF_Document* pDoc, FX_DWORD err_code) { } // SharedForm - CPDF_Metadata metaData; - metaData.LoadDoc(pDoc); - CXML_Element* pElement = metaData.GetRoot(); + CPDF_Metadata metaData(pDoc); + const CXML_Element* pElement = metaData.GetRoot(); if (pElement) CheckSharedForm(pElement, "workflowType"); } |