From e3dbe4db199586bee83f7db3ace142d4c71d0a18 Mon Sep 17 00:00:00 2001 From: Tom Sepez Date: Thu, 5 Feb 2015 15:52:15 -0800 Subject: Merge to master: Kill off some dodgy JS callbacks Note that this work was done opposite the usual branch order, because I didn't want to kill things in master that turned out to be in use in XFA. Original Review URL: https://codereview.chromium.org/883393007 TBR=jam@chromium.org Review URL: https://codereview.chromium.org/903893002 --- fpdfsdk/src/fsdk_baseform.cpp | 84 ------------------------------------------- 1 file changed, 84 deletions(-) (limited to 'fpdfsdk/src/fsdk_baseform.cpp') diff --git a/fpdfsdk/src/fsdk_baseform.cpp b/fpdfsdk/src/fsdk_baseform.cpp index 37caf2d1ed..6203f85662 100644 --- a/fpdfsdk/src/fsdk_baseform.cpp +++ b/fpdfsdk/src/fsdk_baseform.cpp @@ -2372,20 +2372,6 @@ FX_BOOL CPDFSDK_InterForm::FDFToURLEncodedData(FX_LPBYTE& pBuf, FX_STRSIZE& nBuf return TRUE; } -FX_BOOL CPDFSDK_InterForm::ExportFieldsToFDFFile(const CFX_WideString& sFDFFileName, - const CFX_PtrArray& fields, FX_BOOL bIncludeOrExclude) -{ - if (sFDFFileName.IsEmpty()) return FALSE; - ASSERT(m_pDocument != NULL); - ASSERT(m_pInterForm != NULL); - - CFDF_Document* pFDF = m_pInterForm->ExportToFDF(m_pDocument->GetPath(),(CFX_PtrArray&)fields, bIncludeOrExclude); - if (!pFDF) return FALSE; - FX_BOOL bRet = pFDF->WriteFile(sFDFFileName.UTF8Encode()); // = FALSE;// - delete pFDF; - - return bRet; -} FX_BOOL CPDFSDK_InterForm::ExportFieldsToFDFTextBuf(const CFX_PtrArray& fields,FX_BOOL bIncludeOrExclude, CFX_ByteTextBuf& textBuf) { ASSERT(m_pDocument != NULL); @@ -2444,22 +2430,6 @@ FX_BOOL CPDFSDK_InterForm::SubmitForm(const CFX_WideString& sDestination, FX_BOO return TRUE; } -FX_BOOL CPDFSDK_InterForm::ExportFormToFDFFile(const CFX_WideString& sFDFFileName) -{ - if (sFDFFileName.IsEmpty()) return FALSE; - - ASSERT(m_pInterForm != NULL); - ASSERT(m_pDocument != NULL); - - CFDF_Document* pFDF = m_pInterForm->ExportToFDF(m_pDocument->GetPath()); - if (!pFDF) return FALSE; - - FX_BOOL bRet = pFDF->WriteFile(sFDFFileName.UTF8Encode()); - delete pFDF; - - return bRet; -} - FX_BOOL CPDFSDK_InterForm::ExportFormToFDFTextBuf(CFX_ByteTextBuf& textBuf) { @@ -2475,43 +2445,6 @@ FX_BOOL CPDFSDK_InterForm::ExportFormToFDFTextBuf(CFX_ByteTextBuf& textBuf) return bRet; } -FX_BOOL CPDFSDK_InterForm::ExportFormToTxtFile(const CFX_WideString& sTxtFileName) -{ - ASSERT(m_pInterForm != NULL); - - CFX_WideString sFieldNames; - CFX_WideString sFieldValues; - - int nSize = m_pInterForm->CountFields(); - - if (nSize > 0) - { - for (int i=0; iGetField(i); - ASSERT(pField != NULL); - - if (i != 0) - { - sFieldNames += L"\t"; - sFieldValues += L"\t"; - } - sFieldNames += pField->GetFullName(); - sFieldValues += pField->GetValue(); - } - - return TRUE; - } - - return FALSE; -} - -FX_BOOL CPDFSDK_InterForm::ImportFormFromTxtFile(const CFX_WideString& sTxtFileName) -{ - ASSERT(m_pInterForm != NULL); - - return TRUE; -} FX_BOOL CPDFSDK_InterForm::DoAction_ResetForm(const CPDF_Action& action) { @@ -2541,23 +2474,6 @@ FX_BOOL CPDFSDK_InterForm::DoAction_ResetForm(const CPDF_Action& action) } FX_BOOL CPDFSDK_InterForm::DoAction_ImportData(const CPDF_Action& action) -{ - ASSERT(action != NULL); - - CFX_WideString sFilePath = action.GetFilePath(); - if (sFilePath.IsEmpty()) - return FALSE; - - if (!ImportFormFromFDFFile(sFilePath, TRUE)) - { - return FALSE; - } - - return TRUE; -} - -FX_BOOL CPDFSDK_InterForm::ImportFormFromFDFFile(const CFX_WideString& csFDFFileName, - FX_BOOL bNotify) { return FALSE; } -- cgit v1.2.3