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

Side by Side Diff: fpdfsdk/src/javascript/Document.cpp

Issue 811593007: XFA: merge patch from CL 733693003, getting rid of more casts (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: Created 6 years 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
« no previous file with comments | « fpdfsdk/src/fsdk_baseform.cpp ('k') | fpdfsdk/src/javascript/Field.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/javascript/JavaScript.h" 7 #include "../../include/javascript/JavaScript.h"
8 #include "../../include/javascript/IJavaScript.h" 8 #include "../../include/javascript/IJavaScript.h"
9 #include "../../include/javascript/JS_Define.h" 9 #include "../../include/javascript/JS_Define.h"
10 #include "../../include/javascript/JS_Object.h" 10 #include "../../include/javascript/JS_Object.h"
(...skipping 587 matching lines...) Expand 10 before | Expand all | Expand 10 after
598 return FALSE; 598 return FALSE;
599 599
600 CJS_Context* pContext = (CJS_Context*)cc; 600 CJS_Context* pContext = (CJS_Context*)cc;
601 ASSERT(pContext != NULL); 601 ASSERT(pContext != NULL);
602 CPDFDoc_Environment* pEnv = pContext->GetReaderApp(); 602 CPDFDoc_Environment* pEnv = pContext->GetReaderApp();
603 ASSERT(pEnv != NULL); 603 ASSERT(pEnv != NULL);
604 CJS_Runtime* pRuntime = pContext->GetJSRuntime(); 604 CJS_Runtime* pRuntime = pContext->GetJSRuntime();
605 ASSERT(pRuntime != NULL); 605 ASSERT(pRuntime != NULL);
606 606
607 pRuntime->BeginBlock(); 607 pRuntime->BeginBlock();
608 pEnv->JS_docmailForm(textBuf.GetBuffer(), textBuf.GetLength(), bUI, (FX_LPCW STR)cTo, (FX_LPCWSTR)cSubject, (FX_LPCWSTR)cCc, (FX_LPCWSTR)cBcc, (FX_LPCWSTR)cM sg); 608 » pEnv->JS_docmailForm(textBuf.GetBuffer(), textBuf.GetLength(), bUI, cTo. c_str(), cSubject.c_str(), cCc.c_str(), cBcc.c_str(), cMsg.c_str());
609 pRuntime->EndBlock(); 609 pRuntime->EndBlock();
610 return TRUE; 610 return TRUE;
611 } 611 }
612 612
613 FX_BOOL Document::print(OBJ_METHOD_PARAMS) 613 FX_BOOL Document::print(OBJ_METHOD_PARAMS)
614 { 614 {
615 CJS_Context* pContext = (CJS_Context*)cc; 615 CJS_Context* pContext = (CJS_Context*)cc;
616 ASSERT(pContext != NULL); 616 ASSERT(pContext != NULL);
617 CJS_Runtime* pRuntime = pContext->GetJSRuntime(); 617 CJS_Runtime* pRuntime = pContext->GetJSRuntime();
618 ASSERT(pRuntime != NULL); 618 ASSERT(pRuntime != NULL);
(...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after
992 992
993 } 993 }
994 994
995 CJS_Context* pContext = (CJS_Context*)cc; 995 CJS_Context* pContext = (CJS_Context*)cc;
996 ASSERT(pContext != NULL); 996 ASSERT(pContext != NULL);
997 CJS_Runtime* pRuntime = pContext->GetJSRuntime(); 997 CJS_Runtime* pRuntime = pContext->GetJSRuntime();
998 ASSERT(pRuntime != NULL); 998 ASSERT(pRuntime != NULL);
999 999
1000 pRuntime->BeginBlock(); 1000 pRuntime->BeginBlock();
1001 CPDFDoc_Environment* pEnv = pRuntime->GetReaderApp(); 1001 CPDFDoc_Environment* pEnv = pRuntime->GetReaderApp();
1002 » pEnv->JS_docmailForm(NULL, 0, bUI, (FX_LPCWSTR)cTo, (FX_LPCWSTR)cSubject , (FX_LPCWSTR)cCc, (FX_LPCWSTR)cBcc, (FX_LPCWSTR)cMsg); 1002 » pEnv->JS_docmailForm(NULL, 0, bUI, cTo.c_str(), cSubject.c_str(), cCc.c_ str(), cBcc.c_str(), cMsg.c_str());
1003 pRuntime->EndBlock(); 1003 pRuntime->EndBlock();
1004 1004
1005 return TRUE; 1005 return TRUE;
1006 } 1006 }
1007 1007
1008 FX_BOOL Document::author(OBJ_PROP_PARAMS) 1008 FX_BOOL Document::author(OBJ_PROP_PARAMS)
1009 { 1009 {
1010 ASSERT(m_pDocument != NULL); 1010 ASSERT(m_pDocument != NULL);
1011 1011
1012 CPDF_Dictionary* pDictionary = m_pDocument->GetDocument()->GetPDFDoc()-> GetInfo(); 1012 CPDF_Dictionary* pDictionary = m_pDocument->GetDocument()->GetPDFDoc()-> GetInfo();
(...skipping 1505 matching lines...) Expand 10 before | Expand all | Expand 10 after
2518 2518
2519 void Document::DoAnnotDelay() 2519 void Document::DoAnnotDelay()
2520 { 2520 {
2521 CFX_DWordArray DelArray; 2521 CFX_DWordArray DelArray;
2522 2522
2523 for (int j=DelArray.GetSize()-1; j>=0; j--) 2523 for (int j=DelArray.GetSize()-1; j>=0; j--)
2524 { 2524 {
2525 m_DelayData.RemoveAt(DelArray[j]); 2525 m_DelayData.RemoveAt(DelArray[j]);
2526 } 2526 }
2527 } 2527 }
OLDNEW
« no previous file with comments | « fpdfsdk/src/fsdk_baseform.cpp ('k') | fpdfsdk/src/javascript/Field.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698