Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(72)

Side by Side Diff: core/src/fpdfdoc/doc_form.cpp

Issue 1432863004: Cleanup CPDF_ApSettings and CJS_Parameters. (Closed) Base URL: https://pdfium.googlesource.com/pdfium@master
Patch Set: Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2014 PDFium Authors. All rights reserved. 1 // Copyright 2014 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6 6
7 #include "../../include/fpdfdoc/fpdf_doc.h" 7 #include "../../include/fpdfdoc/fpdf_doc.h"
8 #include "doc_utils.h" 8 #include "doc_utils.h"
9 9
10 const int nMaxRecursion = 32; 10 const int nMaxRecursion = 32;
(...skipping 1127 matching lines...) Expand 10 before | Expand all | Expand 10 after
1138 1138
1139 CFDF_Document* CPDF_InterForm::ExportToFDF(const CFX_WideStringC& pdf_path, 1139 CFDF_Document* CPDF_InterForm::ExportToFDF(const CFX_WideStringC& pdf_path,
1140 bool bSimpleFileSpec) const { 1140 bool bSimpleFileSpec) const {
1141 std::vector<CPDF_FormField*> fields; 1141 std::vector<CPDF_FormField*> fields;
1142 int nCount = m_pFieldTree->m_Root.CountFields(); 1142 int nCount = m_pFieldTree->m_Root.CountFields();
1143 for (int i = 0; i < nCount; ++i) 1143 for (int i = 0; i < nCount; ++i)
1144 fields.push_back(m_pFieldTree->m_Root.GetField(i)); 1144 fields.push_back(m_pFieldTree->m_Root.GetField(i));
1145 return ExportToFDF(pdf_path, fields, true, bSimpleFileSpec); 1145 return ExportToFDF(pdf_path, fields, true, bSimpleFileSpec);
1146 } 1146 }
1147 1147
1148 // TODO(thestig): Fix this.
1149 CFX_WideString FILESPEC_EncodeFileName(const CFX_WideStringC& filepath);
1150
1151 CFDF_Document* CPDF_InterForm::ExportToFDF( 1148 CFDF_Document* CPDF_InterForm::ExportToFDF(
1152 const CFX_WideStringC& pdf_path, 1149 const CFX_WideStringC& pdf_path,
1153 const std::vector<CPDF_FormField*>& fields, 1150 const std::vector<CPDF_FormField*>& fields,
1154 bool bIncludeOrExclude, 1151 bool bIncludeOrExclude,
1155 bool bSimpleFileSpec) const { 1152 bool bSimpleFileSpec) const {
1156 CFDF_Document* pDoc = CFDF_Document::CreateNewDoc(); 1153 CFDF_Document* pDoc = CFDF_Document::CreateNewDoc();
1157 if (pDoc == NULL) { 1154 if (pDoc == NULL) {
1158 return NULL; 1155 return NULL;
1159 } 1156 }
1160 CPDF_Dictionary* pMainDict = pDoc->GetRoot()->GetDict("FDF"); 1157 CPDF_Dictionary* pMainDict = pDoc->GetRoot()->GetDict("FDF");
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
1349 FDF_ImportField(pField, L"", bNotify); 1346 FDF_ImportField(pField, L"", bNotify);
1350 } 1347 }
1351 if (bNotify && m_pFormNotify != NULL) { 1348 if (bNotify && m_pFormNotify != NULL) {
1352 m_pFormNotify->AfterFormImportData(this); 1349 m_pFormNotify->AfterFormImportData(this);
1353 } 1350 }
1354 return TRUE; 1351 return TRUE;
1355 } 1352 }
1356 void CPDF_InterForm::SetFormNotify(const CPDF_FormNotify* pNotify) { 1353 void CPDF_InterForm::SetFormNotify(const CPDF_FormNotify* pNotify) {
1357 m_pFormNotify = (CPDF_FormNotify*)pNotify; 1354 m_pFormNotify = (CPDF_FormNotify*)pNotify;
1358 } 1355 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698