Remove unused CPDFSDK_InterForm::DoFDFBuffer.
authorDan Sinclair <dsinclair@chromium.org>
Thu, 22 Oct 2015 15:08:42 +0000 (11:08 -0400)
committerDan Sinclair <dsinclair@chromium.org>
Thu, 22 Oct 2015 15:08:42 +0000 (11:08 -0400)
This method isn't used anywhere and the implementation doesn't really do
anything.

R=thestig@chromium.org

Review URL: https://codereview.chromium.org/1405163003 .

fpdfsdk/include/fsdk_baseform.h
fpdfsdk/src/fsdk_baseform.cpp

index 204cb3b..bc0edf2 100644 (file)
@@ -250,7 +250,6 @@ class CPDFSDK_InterForm : public CPDF_FormNotify {
   FX_BOOL FDFToURLEncodedData(uint8_t*& pBuf, FX_STRSIZE& nBufSize);
   int GetPageIndexByAnnotDict(CPDF_Document* pDocument,
                               CPDF_Dictionary* pAnnotDict) const;
-  void DoFDFBuffer(CFX_ByteString sBuffer);
 
   using CPDFSDK_WidgetMap = std::map<CPDF_FormControl*, CPDFSDK_Widget*>;
 
index 542ade0..3b845b0 100644 (file)
@@ -2037,36 +2037,6 @@ FX_BOOL CPDFSDK_InterForm::SubmitFields(const CFX_WideString& csDestination,
   return TRUE;
 }
 
-void CPDFSDK_InterForm::DoFDFBuffer(CFX_ByteString sBuffer) {
-  ASSERT(m_pDocument != NULL);
-
-  if (CFDF_Document* pFDFDocument = CFDF_Document::ParseMemory(
-          (const unsigned char*)sBuffer.GetBuffer(sBuffer.GetLength()),
-          sBuffer.GetLength())) {
-    CPDF_Dictionary* pRootDic = pFDFDocument->GetRoot();
-    if (pRootDic) {
-      CPDF_Dictionary* pFDFDict = pRootDic->GetDict("FDF");
-      if (pFDFDict) {
-        CPDF_Dictionary* pJSDict = pFDFDict->GetDict("JavaScript");
-        if (pJSDict) {
-          CFX_WideString csJS;
-
-          CPDF_Object* pJS = pJSDict->GetElementValue("Before");
-          if (pJS != NULL) {
-            if (pJS->IsString())
-              csJS = pJSDict->GetUnicodeText("Before");
-            else if (pJS->GetType() == PDFOBJ_STREAM)
-              csJS = pJS->GetUnicodeText();
-          }
-        }
-      }
-    }
-    delete pFDFDocument;
-  }
-
-  sBuffer.ReleaseBuffer();
-}
-
 FX_BOOL CPDFSDK_InterForm::FDFToURLEncodedData(CFX_WideString csFDFFile,
                                                CFX_WideString csTxtFile) {
   return TRUE;