summaryrefslogtreecommitdiff
path: root/fpdfsdk/src/fsdk_baseform.cpp
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2015-02-05 15:27:25 -0800
committerTom Sepez <tsepez@chromium.org>2015-02-05 15:27:25 -0800
commitc6ab1725213a487838cbe03cb08cb5cac4ad956a (patch)
tree9b736199673b73677054307794b62165c72f03f1 /fpdfsdk/src/fsdk_baseform.cpp
parentdbe2a8e6ac3d92edf640ed10a6d4a0e658bc35c5 (diff)
downloadpdfium-c6ab1725213a487838cbe03cb08cb5cac4ad956a.tar.xz
Kill off some dodgy JS callbacks
None of these are currently reachable because the IsSafeMode method always returns true. This, in turn, will let us kill off some file (as in fopen()) based parsing. That, in turn, will let us kill of some more now-unreachable code. In general, we don't want to have unsafe modes. BUG=https://code.google.com/p/pdfium/issues/detail?id=116 R=jam@chromium.org Review URL: https://codereview.chromium.org/883393007
Diffstat (limited to 'fpdfsdk/src/fsdk_baseform.cpp')
-rw-r--r--fpdfsdk/src/fsdk_baseform.cpp84
1 files changed, 0 insertions, 84 deletions
diff --git a/fpdfsdk/src/fsdk_baseform.cpp b/fpdfsdk/src/fsdk_baseform.cpp
index 7cdb32f4bd..f2873b51fd 100644
--- a/fpdfsdk/src/fsdk_baseform.cpp
+++ b/fpdfsdk/src/fsdk_baseform.cpp
@@ -3141,20 +3141,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);
@@ -3234,22 +3220,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)
{
@@ -3265,43 +3235,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; i<nSize; i++)
- {
- CPDF_FormField* pField = m_pInterForm->GetField(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)
{
@@ -3332,23 +3265,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;
}