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

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

Issue 383563002: Fix an out-of-boundary issue for wide string (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Add WStringLength function Created 6 years, 5 months 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/fpdftext.cpp ('k') | fpdfsdk/src/javascript/app.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 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 m_DelayAnnotData.RemoveAll(); 189 m_DelayAnnotData.RemoveAll();
190 } 190 }
191 191
192 //the total number of fileds in document. 192 //the total number of fileds in document.
193 FX_BOOL Document::numFields(OBJ_PROP_PARAMS) 193 FX_BOOL Document::numFields(OBJ_PROP_PARAMS)
194 { 194 {
195 if (!vp.IsGetting()) return FALSE; 195 if (!vp.IsGetting()) return FALSE;
196 196
197 ASSERT(m_pDocument != NULL); 197 ASSERT(m_pDocument != NULL);
198 198
199 » CPDFSDK_InterForm *pInterForm = m_pDocument->GetInterForm(); 199 » CPDFSDK_InterForm *pInterForm = m_pDocument->GetInterForm();
200 ASSERT(pInterForm != NULL); 200 ASSERT(pInterForm != NULL);
201 201
202 CPDF_InterForm *pPDFForm = pInterForm->GetInterForm(); 202 CPDF_InterForm *pPDFForm = pInterForm->GetInterForm();
203 ASSERT(pPDFForm != NULL); 203 ASSERT(pPDFForm != NULL);
204 204
205 vp << (int)pPDFForm->CountFields(); 205 vp << (int)pPDFForm->CountFields();
206 206
207 return TRUE; 207 return TRUE;
208 } 208 }
209 209
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
277 else if (iPageNum >= iPageCount) 277 else if (iPageNum >= iPageCount)
278 { 278 {
279 pEnv->JS_docgotoPage(iPageCount-1); 279 pEnv->JS_docgotoPage(iPageCount-1);
280 } 280 }
281 else if (iPageNum < 0) 281 else if (iPageNum < 0)
282 { 282 {
283 pEnv->JS_docgotoPage(0); 283 pEnv->JS_docgotoPage(0);
284 } 284 }
285 } 285 }
286 286
287 » return TRUE; 287 » return TRUE;
288 } 288 }
289 289
290 FX_BOOL Document::ParserParams(JSObject* pObj,CJS_AnnotObj& annotobj) 290 FX_BOOL Document::ParserParams(JSObject* pObj,CJS_AnnotObj& annotobj)
291 { 291 {
292 return TRUE; 292 return TRUE;
293 } 293 }
294 294
295 FX_BOOL Document::addAnnot(OBJ_METHOD_PARAMS) 295 FX_BOOL Document::addAnnot(OBJ_METHOD_PARAMS)
296 { 296 {
297 » return TRUE; 297 » return TRUE;
298 } 298 }
299 299
300 FX_BOOL Document::addField(OBJ_METHOD_PARAMS) 300 FX_BOOL Document::addField(OBJ_METHOD_PARAMS)
301 { 301 {
302 //Doesn't support. 302 //Doesn't support.
303 return TRUE; 303 return TRUE;
304 } 304 }
305 305
306 //exports form fields as a tab-delimited text file to a local hard disk. 306 //exports form fields as a tab-delimited text file to a local hard disk.
307 //comment: need reader support 307 //comment: need reader support
(...skipping 21 matching lines...) Expand all
329 329
330 if (!m_pDocument->GetPermissions(FPDFPERM_EXTRACT_ACCESS)) return FALSE; 330 if (!m_pDocument->GetPermissions(FPDFPERM_EXTRACT_ACCESS)) return FALSE;
331 331
332 FX_BOOL bAllFields = params.size() > 0 ? (FX_BOOL)params[0] : FALSE; 332 FX_BOOL bAllFields = params.size() > 0 ? (FX_BOOL)params[0] : FALSE;
333 FX_BOOL bNoPassWord = params.size() > 1 ? (FX_BOOL)params[1] : TRUE; 333 FX_BOOL bNoPassWord = params.size() > 1 ? (FX_BOOL)params[1] : TRUE;
334 FX_BOOL bWhole = params.size() > 2 ? (params[2].GetType() == VT_null) : TRUE; 334 FX_BOOL bWhole = params.size() > 2 ? (params[2].GetType() == VT_null) : TRUE;
335 CJS_Array arrayFileds(isolate); 335 CJS_Array arrayFileds(isolate);
336 if (!bWhole) 336 if (!bWhole)
337 arrayFileds.Attach(params[2]); 337 arrayFileds.Attach(params[2]);
338 //FX_BOOL bFlags = params.size() > 3 ? (FX_BOOL)params[3] : FALSE; 338 //FX_BOOL bFlags = params.size() > 3 ? (FX_BOOL)params[3] : FALSE;
339 CFX_WideString swFilePath = params.size() > 4 ? (FX_LPCWSTR)params[4].operat or CFX_WideString() : (FX_LPCWSTR)L""; 339 » CFX_WideString swFilePath = params.size() > 4 ? (FX_LPCWSTR)params[4].op erator CFX_WideString() : (FX_LPCWSTR)L"";
340 340
341 if (swFilePath.IsEmpty()) 341 if (swFilePath.IsEmpty())
342 { 342 {
343 CPDFDoc_Environment* pEnv = m_pDocument->GetEnv(); 343 CPDFDoc_Environment* pEnv = m_pDocument->GetEnv();
344 swFilePath = pEnv->JS_fieldBrowse(); 344 swFilePath = pEnv->JS_fieldBrowse();
345 if(swFilePath.IsEmpty()) 345 if(swFilePath.IsEmpty())
346 return TRUE; 346 return TRUE;
347 } 347 }
348 else 348 else
349 { 349 {
350 swFilePath = app::PDFPathToSysPath(swFilePath); 350 swFilePath = app::PDFPathToSysPath(swFilePath);
351 } 351 }
352 352 »
353 m_pDocument->SetFocusAnnot(NULL); 353 m_pDocument->SetFocusAnnot(NULL);
354 354
355 CPDFSDK_InterForm* pInterForm= (CPDFSDK_InterForm*)m_pDocument->GetInterForm (); 355 » CPDFSDK_InterForm* pInterForm= (CPDFSDK_InterForm*)m_pDocument->GetInter Form();
356 ASSERT(pInterForm != NULL); 356 ASSERT(pInterForm != NULL);
357 357
358 CPDF_InterForm* pPDFForm = pInterForm->GetInterForm(); 358 CPDF_InterForm* pPDFForm = pInterForm->GetInterForm();
359 ASSERT(pPDFForm != NULL); 359 ASSERT(pPDFForm != NULL);
360 360
361 CFX_PtrArray aFields; 361 CFX_PtrArray aFields;
362 362
363 if (bWhole) 363 if (bWhole)
364 { 364 {
365 for (int j=0,jsz=pPDFForm->CountFields(); j<jsz; j++) 365 for (int j=0,jsz=pPDFForm->CountFields(); j<jsz; j++)
(...skipping 13 matching lines...) Expand all
379 { 379 {
380 aFields.Add(pPDFForm->GetField(j, swName)); 380 aFields.Add(pPDFForm->GetField(j, swName));
381 } 381 }
382 } 382 }
383 } 383 }
384 384
385 CFX_PtrArray fields; 385 CFX_PtrArray fields;
386 386
387 for (int i=0,sz=aFields.GetSize(); i<sz; i++) 387 for (int i=0,sz=aFields.GetSize(); i<sz; i++)
388 { 388 {
389 » CPDF_FormField* pField = (CPDF_FormField*)aFields[i]; 389 » » CPDF_FormField* pField = (CPDF_FormField*)aFields[i];
390 390
391 if (!bAllFields) 391 if (!bAllFields)
392 if (pField->GetValue() == L"") 392 if (pField->GetValue() == L"")
393 continue; 393 continue;
394 394
395 if (bNoPassWord) 395 if (bNoPassWord)
396 if (pField->GetFieldFlags() & 0x2000) 396 if (pField->GetFieldFlags() & 0x2000)
397 continue; 397 continue;
398 398
399 fields.Add((void*)pField); 399 » » fields.Add((void*)pField);
400 } 400 }
401 401
402 return pInterForm->ExportFieldsToFDFFile(swFilePath, fields, TRUE); 402 » return pInterForm->ExportFieldsToFDFFile(swFilePath, fields, TRUE);
403 } 403 }
404 404
405 //exports form fields an XFDF file to the local hard drive 405 //exports form fields an XFDF file to the local hard drive
406 //comment: need reder supports 406 //comment: need reder supports
407 //note:the last parameter can't be test 407 //note:the last parameter can't be test
408 //int CPDFSDK_Document::ExportAsXFDF(FX_BOOL bAllFields,FX_BOOL bNoPassWord,Str ingArray aFields,String cPath,FX_BOOL bAnnoatations); 408 //int CPDFSDK_Document::ExportAsXFDF(FX_BOOL bAllFields,FX_BOOL bNoPassWord,Str ingArray aFields,String cPath,FX_BOOL bAnnoatations);
409 409
410 FX_BOOL Document::exportAsXFDF(OBJ_METHOD_PARAMS) 410 FX_BOOL Document::exportAsXFDF(OBJ_METHOD_PARAMS)
411 { 411 {
412 if (IsSafeMode(cc)) return TRUE; 412 if (IsSafeMode(cc)) return TRUE;
(...skipping 10 matching lines...) Expand all
423 423
424 FX_BOOL Document::getField(OBJ_METHOD_PARAMS) 424 FX_BOOL Document::getField(OBJ_METHOD_PARAMS)
425 { 425 {
426 v8::Isolate* isolate = GetIsolate(cc); 426 v8::Isolate* isolate = GetIsolate(cc);
427 ASSERT(m_pDocument != NULL); 427 ASSERT(m_pDocument != NULL);
428 428
429 if (params.size() < 1) return FALSE; 429 if (params.size() < 1) return FALSE;
430 430
431 CFX_WideString wideName = params[0].operator CFX_WideString(); 431 CFX_WideString wideName = params[0].operator CFX_WideString();
432 432
433 CPDFSDK_InterForm* pInterForm = m_pDocument->GetInterForm(); 433 » CPDFSDK_InterForm* pInterForm = m_pDocument->GetInterForm();
434 ASSERT(pInterForm != NULL); 434 ASSERT(pInterForm != NULL);
435 435
436 CPDF_InterForm* pPDFForm = pInterForm->GetInterForm(); 436 CPDF_InterForm* pPDFForm = pInterForm->GetInterForm();
437 ASSERT(pPDFForm != NULL); 437 ASSERT(pPDFForm != NULL);
438 438
439 if (pPDFForm->CountFields(wideName) <= 0) 439 if (pPDFForm->CountFields(wideName) <= 0)
440 { 440 {
441 vRet.SetNull(); 441 vRet.SetNull();
442 return TRUE; 442 return TRUE;
443 } 443 }
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
498 498
499 if (!(m_pDocument->GetPermissions(FPDFPERM_MODIFY) || 499 if (!(m_pDocument->GetPermissions(FPDFPERM_MODIFY) ||
500 m_pDocument->GetPermissions(FPDFPERM_ANNOT_FORM) || 500 m_pDocument->GetPermissions(FPDFPERM_ANNOT_FORM) ||
501 m_pDocument->GetPermissions(FPDFPERM_FILL_FORM))) return FALSE; 501 m_pDocument->GetPermissions(FPDFPERM_FILL_FORM))) return FALSE;
502 502
503 503
504 CFX_WideString swPath; 504 CFX_WideString swPath;
505 505
506 if (params.size() > 0) 506 if (params.size() > 0)
507 swPath = params[0]; 507 swPath = params[0];
508 508 »
509 if (swPath.IsEmpty()) 509 if (swPath.IsEmpty())
510 { 510 {
511 CPDFDoc_Environment* pEnv = m_pDocument->GetEnv(); 511 CPDFDoc_Environment* pEnv = m_pDocument->GetEnv();
512 swPath = pEnv->JS_fieldBrowse(); 512 swPath = pEnv->JS_fieldBrowse();
513 if(swPath.IsEmpty()) 513 if(swPath.IsEmpty())
514 return TRUE; 514 return TRUE;
515 } 515 }
516 else 516 else
517 { 517 {
518 swPath = app::PDFPathToSysPath(swPath); 518 swPath = app::PDFPathToSysPath(swPath);
519 } 519 }
520 520
521 m_pDocument->SetFocusAnnot(NULL); 521 m_pDocument->SetFocusAnnot(NULL);
522 522
523 CPDFSDK_InterForm* pInterForm = (CPDFSDK_InterForm*)m_pDocument->GetInte rForm(); 523 CPDFSDK_InterForm* pInterForm = (CPDFSDK_InterForm*)m_pDocument->GetInte rForm();
524 ASSERT(pInterForm != NULL); 524 ASSERT(pInterForm != NULL);
525 525
526 if (!pInterForm->ImportFormFromFDFFile(swPath, TRUE)) 526 if (!pInterForm->ImportFormFromFDFFile(swPath, TRUE))
527 return FALSE; 527 return FALSE;
528 528
529 » m_pDocument->SetChangeMark(); 529 » m_pDocument->SetChangeMark();
530 // CPDFDoc_Environment* pEnv = m_pDocument->GetEnv(); 530 // CPDFDoc_Environment* pEnv = m_pDocument->GetEnv();
531 // ASSERT(pEnv != NULL); 531 // ASSERT(pEnv != NULL);
532 // IUndo* pUndo = IUndo::GetUndo(pEnv); 532 // IUndo* pUndo = IUndo::GetUndo(pEnv);
533 // ASSERT(pUndo != NULL); 533 // ASSERT(pUndo != NULL);
534 // pUndo->Reset(m_pDocument); 534 // pUndo->Reset(m_pDocument);
535 535
536 return TRUE; 536 return TRUE;
537 } 537 }
538 538
539 //imports and specified XFDF file containing XML form data 539 //imports and specified XFDF file containing XML form data
(...skipping 58 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, (FX_ LPCWSTR)cTo, (FX_LPCWSTR)cSubject, (FX_LPCWSTR)cCc, (FX_LPCWSTR)cBcc, (FX_LPCWST R)cMsg);
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);
619 619
620 FX_BOOL bUI = TRUE; 620 FX_BOOL bUI = TRUE;
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
653 } 653 }
654 } 654 }
655 } 655 }
656 else 656 else
657 { 657 {
658 if(nlength >= 1) 658 if(nlength >= 1)
659 bUI = params[0]; 659 bUI = params[0];
660 if(nlength >= 2) 660 if(nlength >= 2)
661 nStart = (int)params[1]; 661 nStart = (int)params[1];
662 if(nlength >= 3) 662 if(nlength >= 3)
663 » » nEnd = (int)params[2]; 663 » » » nEnd = (int)params[2];
664 if(nlength >= 4) 664 if(nlength >= 4)
665 bSilent = params[3]; 665 bSilent = params[3];
666 if(nlength >= 5) 666 if(nlength >= 5)
667 » » bShrinkToFit = params[4]; 667 » » » bShrinkToFit = params[4];
668 if(nlength >= 6) 668 if(nlength >= 6)
669 bPrintAsImage = params[5]; 669 bPrintAsImage = params[5];
670 if(nlength >= 7) 670 if(nlength >= 7)
671 bReverse = params[6]; 671 bReverse = params[6];
672 if(nlength >= 8) 672 if(nlength >= 8)
673 bAnnotations = params[7]; 673 bAnnotations = params[7];
674 } 674 }
675 675
676 » ASSERT(m_pDocument != NULL); 676 » ASSERT(m_pDocument != NULL);
677 677
678 » if (CPDFDoc_Environment* pEnv = m_pDocument->GetEnv()) 678 » if (CPDFDoc_Environment* pEnv = m_pDocument->GetEnv())
679 » { 679 » {
680 pEnv->JS_docprint(bUI, nStart, nEnd, bSilent, bShrinkToFit, bPri ntAsImage, bReverse, bAnnotations); 680 pEnv->JS_docprint(bUI, nStart, nEnd, bSilent, bShrinkToFit, bPri ntAsImage, bReverse, bAnnotations);
681 » » return TRUE; 681 » » return TRUE;
682 » } 682 » }
683 return FALSE; 683 return FALSE;
684 } 684 }
685 685
686 //removes the specified field from the document. 686 //removes the specified field from the document.
687 //comment: 687 //comment:
688 //note: if the filed name is not retional, adobe is dumb for it. 688 //note: if the filed name is not retional, adobe is dumb for it.
689 689
690 FX_BOOL Document::removeField(OBJ_METHOD_PARAMS) 690 FX_BOOL Document::removeField(OBJ_METHOD_PARAMS)
691 { 691 {
692 ASSERT(m_pDocument != NULL); 692 ASSERT(m_pDocument != NULL);
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
779 CFX_WideString swVal = valElement.operator CFX_WideStrin g(); 779 CFX_WideString swVal = valElement.operator CFX_WideStrin g();
780 780
781 for (int j=0,jsz=pPDFForm->CountFields(swVal); j<jsz; j+ +) 781 for (int j=0,jsz=pPDFForm->CountFields(swVal); j<jsz; j+ +)
782 { 782 {
783 aFields.Add((void*)pPDFForm->GetField(j,swVal)); 783 aFields.Add((void*)pPDFForm->GetField(j,swVal));
784 } 784 }
785 } 785 }
786 786
787 if (aFields.GetSize() > 0) 787 if (aFields.GetSize() > 0)
788 { 788 {
789 » » » pPDFForm->ResetForm(aFields, TRUE, TRUE); 789 » » » pPDFForm->ResetForm(aFields, TRUE, TRUE);
790 » » » m_pDocument->SetChangeMark(); 790 » » » m_pDocument->SetChangeMark();
791 791
792 } 792 }
793 } 793 }
794 else 794 else
795 { 795 {
796 » » pPDFForm->ResetForm(TRUE); 796 » » pPDFForm->ResetForm(TRUE);
797 » » m_pDocument->SetChangeMark(); 797 » » m_pDocument->SetChangeMark();
798 798
799 } 799 }
800 800
801 return TRUE; 801 return TRUE;
802 } 802 }
803 803
804 804
805 FX_BOOL Document::saveAs(OBJ_METHOD_PARAMS) 805 FX_BOOL Document::saveAs(OBJ_METHOD_PARAMS)
806 { 806 {
807 807
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after
1063 JS_PutObjectString(isolate,pObj, L"CreationDate", cwCreationDate ); 1063 JS_PutObjectString(isolate,pObj, L"CreationDate", cwCreationDate );
1064 JS_PutObjectString(isolate,pObj, L"ModDate", cwModDate); 1064 JS_PutObjectString(isolate,pObj, L"ModDate", cwModDate);
1065 JS_PutObjectString(isolate,pObj, L"Trapped", cwTrapped); 1065 JS_PutObjectString(isolate,pObj, L"Trapped", cwTrapped);
1066 1066
1067 // It's to be compatible to non-standard info dictionary. 1067 // It's to be compatible to non-standard info dictionary.
1068 FX_POSITION pos = pDictionary->GetStartPos(); 1068 FX_POSITION pos = pDictionary->GetStartPos();
1069 while(pos) 1069 while(pos)
1070 { 1070 {
1071 CFX_ByteString bsKey; 1071 CFX_ByteString bsKey;
1072 CPDF_Object* pValueObj = pDictionary->GetNextElement(pos , bsKey); 1072 CPDF_Object* pValueObj = pDictionary->GetNextElement(pos , bsKey);
1073 » » » CFX_WideString wsKey = CFX_WideString::FromUTF8(bsKey); 1073 » » » CFX_WideString wsKey = CFX_WideString::FromUTF8(bsKey, bsKey.GetLength());
1074 if((pValueObj->GetType()==PDFOBJ_STRING) || (pValueObj-> GetType()==PDFOBJ_NAME) ) 1074 if((pValueObj->GetType()==PDFOBJ_STRING) || (pValueObj-> GetType()==PDFOBJ_NAME) )
1075 JS_PutObjectString(isolate,pObj, wsKey, pValueObj->GetUnicodeText()); 1075 JS_PutObjectString(isolate,pObj, wsKey, pValueObj->GetUnicodeText());
1076 if(pValueObj->GetType()==PDFOBJ_NUMBER) 1076 if(pValueObj->GetType()==PDFOBJ_NUMBER)
1077 JS_PutObjectNumber(isolate,pObj, wsKey, (float)p ValueObj->GetNumber()); 1077 JS_PutObjectNumber(isolate,pObj, wsKey, (float)p ValueObj->GetNumber());
1078 if(pValueObj->GetType()==PDFOBJ_BOOLEAN) 1078 if(pValueObj->GetType()==PDFOBJ_BOOLEAN)
1079 JS_PutObjectBoolean(isolate,pObj, wsKey, (bool)p ValueObj->GetInteger()); 1079 JS_PutObjectBoolean(isolate,pObj, wsKey, (bool)p ValueObj->GetInteger());
1080 } 1080 }
1081 1081
1082 vp << pObj; 1082 vp << pObj;
1083 return TRUE; 1083 return TRUE;
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after
1349 return TRUE; 1349 return TRUE;
1350 } 1350 }
1351 } 1351 }
1352 1352
1353 vp << 0; 1353 vp << 0;
1354 return TRUE; 1354 return TRUE;
1355 } 1355 }
1356 1356
1357 FX_BOOL Document::mouseX(OBJ_PROP_PARAMS) 1357 FX_BOOL Document::mouseX(OBJ_PROP_PARAMS)
1358 { 1358 {
1359 » return TRUE;» 1359 » return TRUE;»
1360 } 1360 }
1361 1361
1362 FX_BOOL Document::mouseY(OBJ_PROP_PARAMS) 1362 FX_BOOL Document::mouseY(OBJ_PROP_PARAMS)
1363 { 1363 {
1364 » return TRUE; 1364 » return TRUE;
1365 } 1365 }
1366 1366
1367 FX_BOOL Document::baseURL(OBJ_PROP_PARAMS) 1367 FX_BOOL Document::baseURL(OBJ_PROP_PARAMS)
1368 { 1368 {
1369 if (vp.IsGetting()) 1369 if (vp.IsGetting())
1370 { 1370 {
1371 vp << m_cwBaseURL; 1371 vp << m_cwBaseURL;
1372 return TRUE; 1372 return TRUE;
1373 } 1373 }
1374 else 1374 else
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
1486 return TRUE; 1486 return TRUE;
1487 } 1487 }
1488 1488
1489 FX_BOOL Document::layout(OBJ_PROP_PARAMS) 1489 FX_BOOL Document::layout(OBJ_PROP_PARAMS)
1490 { 1490 {
1491 return TRUE; 1491 return TRUE;
1492 } 1492 }
1493 1493
1494 FX_BOOL Document::addLink(OBJ_METHOD_PARAMS) 1494 FX_BOOL Document::addLink(OBJ_METHOD_PARAMS)
1495 { 1495 {
1496 » return TRUE; 1496 » return TRUE;
1497 } 1497 }
1498 1498
1499 FX_BOOL Document::closeDoc(OBJ_METHOD_PARAMS) 1499 FX_BOOL Document::closeDoc(OBJ_METHOD_PARAMS)
1500 { 1500 {
1501 ASSERT(m_pDocument != NULL); 1501 ASSERT(m_pDocument != NULL);
1502 1502
1503 1503
1504 1504
1505 1505
1506 1506
1507 return TRUE; 1507 return TRUE;
1508 } 1508 }
1509 1509
1510 FX_BOOL Document::getPageBox(OBJ_METHOD_PARAMS) 1510 FX_BOOL Document::getPageBox(OBJ_METHOD_PARAMS)
1511 { 1511 {
1512 » return TRUE; 1512 » return TRUE;
1513 } 1513 }
1514 1514
1515 1515
1516 FX_BOOL Document::getAnnot(OBJ_METHOD_PARAMS) 1516 FX_BOOL Document::getAnnot(OBJ_METHOD_PARAMS)
1517 { 1517 {
1518 » return TRUE; 1518 » return TRUE;
1519 } 1519 }
1520 1520
1521 FX_BOOL Document::getAnnots(OBJ_METHOD_PARAMS) 1521 FX_BOOL Document::getAnnots(OBJ_METHOD_PARAMS)
1522 { 1522 {
1523 vRet.SetNull(); 1523 vRet.SetNull();
1524 return TRUE; 1524 return TRUE;
1525 } 1525 }
1526 1526
1527 FX_BOOL Document::getAnnot3D(OBJ_METHOD_PARAMS) 1527 FX_BOOL Document::getAnnot3D(OBJ_METHOD_PARAMS)
1528 { 1528 {
(...skipping 996 matching lines...) Expand 10 before | Expand all | Expand 10 after
2525 2525
2526 void Document::DoAnnotDelay() 2526 void Document::DoAnnotDelay()
2527 { 2527 {
2528 CFX_DWordArray DelArray; 2528 CFX_DWordArray DelArray;
2529 2529
2530 for (int j=DelArray.GetSize()-1; j>=0; j--) 2530 for (int j=DelArray.GetSize()-1; j>=0; j--)
2531 { 2531 {
2532 m_DelayData.RemoveAt(DelArray[j]); 2532 m_DelayData.RemoveAt(DelArray[j]);
2533 } 2533 }
2534 } 2534 }
OLDNEW
« no previous file with comments | « fpdfsdk/src/fpdftext.cpp ('k') | fpdfsdk/src/javascript/app.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698