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/fsdk_define.h" | 7 #include "../include/fsdk_define.h" |
8 #include "../include/fsdk_mgr.h" | 8 #include "../include/fsdk_mgr.h" |
9 #include "../include/fsdk_baseannot.h" | 9 #include "../include/fsdk_baseannot.h" |
10 #include "../include/fsdk_baseform.h" | 10 #include "../include/fsdk_baseform.h" |
(...skipping 2266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2277 FX_STRSIZE nBufSize = textBuf.GetLength(); | 2277 FX_STRSIZE nBufSize = textBuf.GetLength(); |
2278 | 2278 |
2279 if (bUrlEncoded) | 2279 if (bUrlEncoded) |
2280 { | 2280 { |
2281 if(!FDFToURLEncodedData(pBuffer, nBufSize)) | 2281 if(!FDFToURLEncodedData(pBuffer, nBufSize)) |
2282 return FALSE; | 2282 return FALSE; |
2283 } | 2283 } |
2284 | 2284 |
2285 pEnv->JS_docSubmitForm(pBuffer, nBufSize, (FX_LPCWSTR)csDestination); | 2285 pEnv->JS_docSubmitForm(pBuffer, nBufSize, (FX_LPCWSTR)csDestination); |
2286 | 2286 |
2287 if (bUrlEncoded && pBuffer) | |
2288 { | |
2289 FX_Free(pBuffer); | |
2290 pBuffer = NULL; | |
2291 } | |
2292 | |
2293 return TRUE; | 2287 return TRUE; |
2294 } | 2288 } |
2295 | 2289 |
2296 void CPDFSDK_InterForm::DoFDFBuffer(CFX_ByteString sBuffer) | 2290 void CPDFSDK_InterForm::DoFDFBuffer(CFX_ByteString sBuffer) |
2297 { | 2291 { |
2298 ASSERT(m_pDocument != NULL); | 2292 ASSERT(m_pDocument != NULL); |
2299 | 2293 |
2300 if (CFDF_Document *pFDFDocument = CFDF_Document::ParseMemory((const unsi
gned char *)sBuffer.GetBuffer(sBuffer.GetLength()), sBuffer.GetLength())) | 2294 if (CFDF_Document *pFDFDocument = CFDF_Document::ParseMemory((const unsi
gned char *)sBuffer.GetBuffer(sBuffer.GetLength()), sBuffer.GetLength())) |
2301 { | 2295 { |
2302 CPDF_Dictionary* pRootDic = pFDFDocument->GetRoot(); | 2296 CPDF_Dictionary* pRootDic = pFDFDocument->GetRoot(); |
(...skipping 799 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3102 | 3096 |
3103 CPDF_Annot* pPDFAnnot = pAnnot->GetPDFAnnot(); | 3097 CPDF_Annot* pPDFAnnot = pAnnot->GetPDFAnnot(); |
3104 ASSERT(pPDFAnnot != NULL); | 3098 ASSERT(pPDFAnnot != NULL); |
3105 | 3099 |
3106 CPDF_Rect rcAnnot; | 3100 CPDF_Rect rcAnnot; |
3107 pPDFAnnot->GetRect(rcAnnot); | 3101 pPDFAnnot->GetRect(rcAnnot); |
3108 | 3102 |
3109 return rcAnnot; | 3103 return rcAnnot; |
3110 } | 3104 } |
3111 | 3105 |
OLD | NEW |