| OLD | NEW |
| 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 1168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1179 CPDF_Dictionary* pMainDict = pDoc->GetRoot()->GetDict("FDF"); | 1179 CPDF_Dictionary* pMainDict = pDoc->GetRoot()->GetDict("FDF"); |
| 1180 if (!pdf_path.IsEmpty()) { | 1180 if (!pdf_path.IsEmpty()) { |
| 1181 if (bSimpleFileSpec) { | 1181 if (bSimpleFileSpec) { |
| 1182 CFX_WideString wsFilePath = FILESPEC_EncodeFileName(pdf_path); | 1182 CFX_WideString wsFilePath = FILESPEC_EncodeFileName(pdf_path); |
| 1183 pMainDict->SetAtString(FX_BSTRC("F"), | 1183 pMainDict->SetAtString(FX_BSTRC("F"), |
| 1184 CFX_ByteString::FromUnicode(wsFilePath)); | 1184 CFX_ByteString::FromUnicode(wsFilePath)); |
| 1185 pMainDict->SetAtString(FX_BSTRC("UF"), PDF_EncodeText(wsFilePath)); | 1185 pMainDict->SetAtString(FX_BSTRC("UF"), PDF_EncodeText(wsFilePath)); |
| 1186 } else { | 1186 } else { |
| 1187 CPDF_FileSpec filespec; | 1187 CPDF_FileSpec filespec; |
| 1188 filespec.SetFileName(pdf_path); | 1188 filespec.SetFileName(pdf_path); |
| 1189 pMainDict->SetAt("F", (CPDF_Object*)filespec); | 1189 pMainDict->SetAt("F", static_cast<CPDF_Object*>(filespec)); |
| 1190 } | 1190 } |
| 1191 } | 1191 } |
| 1192 CPDF_Array* pFields = CPDF_Array::Create(); | 1192 CPDF_Array* pFields = CPDF_Array::Create(); |
| 1193 if (pFields == NULL) { | 1193 if (pFields == NULL) { |
| 1194 return NULL; | 1194 return NULL; |
| 1195 } | 1195 } |
| 1196 pMainDict->SetAt("Fields", pFields); | 1196 pMainDict->SetAt("Fields", pFields); |
| 1197 int nCount = m_pFieldTree->m_Root.CountFields(); | 1197 int nCount = m_pFieldTree->m_Root.CountFields(); |
| 1198 for (int i = 0; i < nCount; i++) { | 1198 for (int i = 0; i < nCount; i++) { |
| 1199 CPDF_FormField* pField = m_pFieldTree->m_Root.GetField(i); | 1199 CPDF_FormField* pField = m_pFieldTree->m_Root.GetField(i); |
| (...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1370 FDF_ImportField(pField, L"", bNotify); | 1370 FDF_ImportField(pField, L"", bNotify); |
| 1371 } | 1371 } |
| 1372 if (bNotify && m_pFormNotify != NULL) { | 1372 if (bNotify && m_pFormNotify != NULL) { |
| 1373 m_pFormNotify->AfterFormImportData(this); | 1373 m_pFormNotify->AfterFormImportData(this); |
| 1374 } | 1374 } |
| 1375 return TRUE; | 1375 return TRUE; |
| 1376 } | 1376 } |
| 1377 void CPDF_InterForm::SetFormNotify(const CPDF_FormNotify* pNotify) { | 1377 void CPDF_InterForm::SetFormNotify(const CPDF_FormNotify* pNotify) { |
| 1378 m_pFormNotify = (CPDF_FormNotify*)pNotify; | 1378 m_pFormNotify = (CPDF_FormNotify*)pNotify; |
| 1379 } | 1379 } |
| OLD | NEW |