From bdeeb8a036442302b821686a03698b0bb98952e1 Mon Sep 17 00:00:00 2001 From: Tom Sepez Date: Wed, 27 May 2015 12:25:00 -0700 Subject: Make CPDFXFA_App / IXFA_AppProvider saner Move interface comments from the implementation header to the interface header. Replace Create / Release functions with static methods. Replace dubious Release() methods with deletion via virtual dtor, also for IXFA_App and IXFA_FontMgr while we're at it. Untabify and fix (theoretically) illegal _CAP include guard definitions for fpdfxfa/ headers. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1153553003 --- fpdfsdk/src/fpdfsave.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'fpdfsdk/src/fpdfsave.cpp') diff --git a/fpdfsdk/src/fpdfsave.cpp b/fpdfsdk/src/fpdfsave.cpp index 0be1709f37..b3ab2f0df9 100644 --- a/fpdfsdk/src/fpdfsave.cpp +++ b/fpdfsdk/src/fpdfsave.cpp @@ -67,17 +67,18 @@ FX_BOOL _SaveXFADocumentData(CPDFXFA_Document* pDocument, CFX_PtrArray& fileList return FALSE; if (pDocument->GetDocType() != DOCTYPE_DYNIMIC_XFA && pDocument->GetDocType() != DOCTYPE_STATIC_XFA) return TRUE; - if (!FPDFXFA_GetApp()->GetXFAApp()) + if (!CPDFXFA_App::GetInstance()->GetXFAApp()) return TRUE; IXFA_DocView* pXFADocView = pDocument->GetXFADocView(); if (NULL == pXFADocView) return TRUE; - IXFA_DocHandler *pXFADocHandler = FPDFXFA_GetApp()->GetXFAApp()->GetDocHandler(); - + + IXFA_DocHandler *pXFADocHandler = CPDFXFA_App::GetInstance()->GetXFAApp()->GetDocHandler(); CPDF_Document * pPDFDocument = pDocument->GetPDFDoc(); - if (pDocument == NULL) + if (pDocument == NULL) return FALSE; + CPDF_Dictionary* pRoot = pPDFDocument->GetRoot(); if (pRoot == NULL) return FALSE; -- cgit v1.2.3