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

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

Issue 1332973002: Remove some abstractions in fxjs_v8.h. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Remove implicit cast operator from CJS_Runtime. Created 5 years, 3 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/javascript/Consts.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 242 matching lines...) Expand 10 before | Expand all | Expand 10 after
253 } else if (iPageNum >= iPageCount) { 253 } else if (iPageNum >= iPageCount) {
254 pEnv->JS_docgotoPage(iPageCount - 1); 254 pEnv->JS_docgotoPage(iPageCount - 1);
255 } else if (iPageNum < 0) { 255 } else if (iPageNum < 0) {
256 pEnv->JS_docgotoPage(0); 256 pEnv->JS_docgotoPage(0);
257 } 257 }
258 } 258 }
259 259
260 return TRUE; 260 return TRUE;
261 } 261 }
262 262
263 FX_BOOL Document::ParserParams(JSObject* pObj, CJS_AnnotObj& annotobj) {
264 // Not supported.
265 return TRUE;
266 }
267
268 FX_BOOL Document::addAnnot(IFXJS_Context* cc, 263 FX_BOOL Document::addAnnot(IFXJS_Context* cc,
269 const CJS_Parameters& params, 264 const CJS_Parameters& params,
270 CJS_Value& vRet, 265 CJS_Value& vRet,
271 CFX_WideString& sError) { 266 CFX_WideString& sError) {
272 // Not supported. 267 // Not supported.
273 return TRUE; 268 return TRUE;
274 } 269 }
275 270
276 FX_BOOL Document::addField(IFXJS_Context* cc, 271 FX_BOOL Document::addField(IFXJS_Context* cc,
277 const CJS_Parameters& params, 272 const CJS_Parameters& params,
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
323 CFX_WideString wideName = params[0].ToCFXWideString(); 318 CFX_WideString wideName = params[0].ToCFXWideString();
324 319
325 CPDFSDK_InterForm* pInterForm = m_pDocument->GetInterForm(); 320 CPDFSDK_InterForm* pInterForm = m_pDocument->GetInterForm();
326 CPDF_InterForm* pPDFForm = pInterForm->GetInterForm(); 321 CPDF_InterForm* pPDFForm = pInterForm->GetInterForm();
327 if (pPDFForm->CountFields(wideName) <= 0) { 322 if (pPDFForm->CountFields(wideName) <= 0) {
328 vRet.SetNull(); 323 vRet.SetNull();
329 return TRUE; 324 return TRUE;
330 } 325 }
331 326
332 CJS_Runtime* pRuntime = pContext->GetJSRuntime(); 327 CJS_Runtime* pRuntime = pContext->GetJSRuntime();
333 JSFXObject pFieldObj = JS_NewFxDynamicObj( 328 v8::Local<v8::Object> pFieldObj =
334 *pRuntime, pContext, JS_GetObjDefnID(*pRuntime, L"Field")); 329 JS_NewFxDynamicObj(pRuntime->GetIsolate(), pContext,
330 JS_GetObjDefnID(pRuntime->GetIsolate(), L"Field"));
335 331
336 v8::Isolate* isolate = GetIsolate(cc); 332 v8::Isolate* isolate = GetIsolate(cc);
337 CJS_Field* pJSField = (CJS_Field*)JS_GetPrivate(isolate, pFieldObj); 333 CJS_Field* pJSField = (CJS_Field*)JS_GetPrivate(isolate, pFieldObj);
338 Field* pField = (Field*)pJSField->GetEmbedObject(); 334 Field* pField = (Field*)pJSField->GetEmbedObject();
339 pField->AttachField(this, wideName); 335 pField->AttachField(this, wideName);
340 336
341 vRet = pJSField; 337 vRet = pJSField;
342 return TRUE; 338 return TRUE;
343 } 339 }
344 340
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
455 int nEnd = 0; 451 int nEnd = 0;
456 FX_BOOL bSilent = FALSE; 452 FX_BOOL bSilent = FALSE;
457 FX_BOOL bShrinkToFit = FALSE; 453 FX_BOOL bShrinkToFit = FALSE;
458 FX_BOOL bPrintAsImage = FALSE; 454 FX_BOOL bPrintAsImage = FALSE;
459 FX_BOOL bReverse = FALSE; 455 FX_BOOL bReverse = FALSE;
460 FX_BOOL bAnnotations = FALSE; 456 FX_BOOL bAnnotations = FALSE;
461 457
462 int nlength = params.size(); 458 int nlength = params.size();
463 if (nlength == 9) { 459 if (nlength == 9) {
464 if (params[8].GetType() == VT_fxobject) { 460 if (params[8].GetType() == VT_fxobject) {
465 JSFXObject pObj = params[8].ToV8Object(); 461 v8::Local<v8::Object> pObj = params[8].ToV8Object();
466 { 462 {
467 if (JS_GetObjDefnID(pObj) == 463 if (JS_GetObjDefnID(pObj) ==
468 JS_GetObjDefnID(*pRuntime, L"PrintParamsObj")) { 464 JS_GetObjDefnID(pRuntime->GetIsolate(), L"PrintParamsObj")) {
469 if (CJS_Object* pJSObj = params[8].ToCJSObject()) { 465 if (CJS_Object* pJSObj = params[8].ToCJSObject()) {
470 if (PrintParamsObj* pprintparamsObj = 466 if (PrintParamsObj* pprintparamsObj =
471 (PrintParamsObj*)pJSObj->GetEmbedObject()) { 467 (PrintParamsObj*)pJSObj->GetEmbedObject()) {
472 bUI = pprintparamsObj->bUI; 468 bUI = pprintparamsObj->bUI;
473 nStart = pprintparamsObj->nStart; 469 nStart = pprintparamsObj->nStart;
474 nEnd = pprintparamsObj->nEnd; 470 nEnd = pprintparamsObj->nEnd;
475 bSilent = pprintparamsObj->bSilent; 471 bSilent = pprintparamsObj->bSilent;
476 bShrinkToFit = pprintparamsObj->bShrinkToFit; 472 bShrinkToFit = pprintparamsObj->bShrinkToFit;
477 bPrintAsImage = pprintparamsObj->bPrintAsImage; 473 bPrintAsImage = pprintparamsObj->bPrintAsImage;
478 bReverse = pprintparamsObj->bReverse; 474 bReverse = pprintparamsObj->bReverse;
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
657 CJS_Value v = params[0]; 653 CJS_Value v = params[0];
658 if (v.GetType() == VT_string) { 654 if (v.GetType() == VT_string) {
659 strURL = params[0].ToCFXWideString(); 655 strURL = params[0].ToCFXWideString();
660 if (nSize > 1) 656 if (nSize > 1)
661 bFDF = params[1].ToBool(); 657 bFDF = params[1].ToBool();
662 if (nSize > 2) 658 if (nSize > 2)
663 bEmpty = params[2].ToBool(); 659 bEmpty = params[2].ToBool();
664 if (nSize > 3) 660 if (nSize > 3)
665 aFields.Attach(params[3].ToV8Array()); 661 aFields.Attach(params[3].ToV8Array());
666 } else if (v.GetType() == VT_object) { 662 } else if (v.GetType() == VT_object) {
667 JSObject pObj = params[0].ToV8Object(); 663 v8::Local<v8::Object> pObj = params[0].ToV8Object();
668 v8::Local<v8::Value> pValue = JS_GetObjectElement(isolate, pObj, L"cURL"); 664 v8::Local<v8::Value> pValue = JS_GetObjectElement(isolate, pObj, L"cURL");
669 if (!pValue.IsEmpty()) 665 if (!pValue.IsEmpty())
670 strURL = 666 strURL =
671 CJS_Value(isolate, pValue, GET_VALUE_TYPE(pValue)).ToCFXWideString(); 667 CJS_Value(isolate, pValue, GET_VALUE_TYPE(pValue)).ToCFXWideString();
672 pValue = JS_GetObjectElement(isolate, pObj, L"bFDF"); 668 pValue = JS_GetObjectElement(isolate, pObj, L"bFDF");
673 bFDF = CJS_Value(isolate, pValue, GET_VALUE_TYPE(pValue)).ToBool(); 669 bFDF = CJS_Value(isolate, pValue, GET_VALUE_TYPE(pValue)).ToBool();
674 pValue = JS_GetObjectElement(isolate, pObj, L"bEmpty"); 670 pValue = JS_GetObjectElement(isolate, pObj, L"bEmpty");
675 bEmpty = CJS_Value(isolate, pValue, GET_VALUE_TYPE(pValue)).ToBool(); 671 bEmpty = CJS_Value(isolate, pValue, GET_VALUE_TYPE(pValue)).ToBool();
676 pValue = JS_GetObjectElement(isolate, pObj, L"aFields"); 672 pValue = JS_GetObjectElement(isolate, pObj, L"aFields");
677 aFields.Attach( 673 aFields.Attach(
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
764 if (params.size() >= 4) 760 if (params.size() >= 4)
765 cBcc = params[3].ToCFXWideString(); 761 cBcc = params[3].ToCFXWideString();
766 if (params.size() >= 5) 762 if (params.size() >= 5)
767 cSubject = params[4].ToCFXWideString(); 763 cSubject = params[4].ToCFXWideString();
768 if (params.size() >= 6) 764 if (params.size() >= 6)
769 cMsg = params[5].ToCFXWideString(); 765 cMsg = params[5].ToCFXWideString();
770 766
771 v8::Isolate* isolate = GetIsolate(cc); 767 v8::Isolate* isolate = GetIsolate(cc);
772 768
773 if (params.size() >= 1 && params[0].GetType() == VT_object) { 769 if (params.size() >= 1 && params[0].GetType() == VT_object) {
774 JSObject pObj = params[0].ToV8Object(); 770 v8::Local<v8::Object> pObj = params[0].ToV8Object();
775 771
776 v8::Local<v8::Value> pValue = JS_GetObjectElement(isolate, pObj, L"bUI"); 772 v8::Local<v8::Value> pValue = JS_GetObjectElement(isolate, pObj, L"bUI");
777 bUI = CJS_Value(isolate, pValue, GET_VALUE_TYPE(pValue)).ToInt(); 773 bUI = CJS_Value(isolate, pValue, GET_VALUE_TYPE(pValue)).ToInt();
778 774
779 pValue = JS_GetObjectElement(isolate, pObj, L"cTo"); 775 pValue = JS_GetObjectElement(isolate, pObj, L"cTo");
780 cTo = CJS_Value(isolate, pValue, GET_VALUE_TYPE(pValue)).ToCFXWideString(); 776 cTo = CJS_Value(isolate, pValue, GET_VALUE_TYPE(pValue)).ToCFXWideString();
781 777
782 pValue = JS_GetObjectElement(isolate, pObj, L"cCc"); 778 pValue = JS_GetObjectElement(isolate, pObj, L"cCc");
783 cCc = CJS_Value(isolate, pValue, GET_VALUE_TYPE(pValue)).ToCFXWideString(); 779 cCc = CJS_Value(isolate, pValue, GET_VALUE_TYPE(pValue)).ToCFXWideString();
784 780
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
847 CFX_WideString cwCreator = pDictionary->GetUnicodeText("Creator"); 843 CFX_WideString cwCreator = pDictionary->GetUnicodeText("Creator");
848 CFX_WideString cwProducer = pDictionary->GetUnicodeText("Producer"); 844 CFX_WideString cwProducer = pDictionary->GetUnicodeText("Producer");
849 CFX_WideString cwCreationDate = pDictionary->GetUnicodeText("CreationDate"); 845 CFX_WideString cwCreationDate = pDictionary->GetUnicodeText("CreationDate");
850 CFX_WideString cwModDate = pDictionary->GetUnicodeText("ModDate"); 846 CFX_WideString cwModDate = pDictionary->GetUnicodeText("ModDate");
851 CFX_WideString cwTrapped = pDictionary->GetUnicodeText("Trapped"); 847 CFX_WideString cwTrapped = pDictionary->GetUnicodeText("Trapped");
852 848
853 v8::Isolate* isolate = GetIsolate(cc); 849 v8::Isolate* isolate = GetIsolate(cc);
854 if (vp.IsGetting()) { 850 if (vp.IsGetting()) {
855 CJS_Context* pContext = (CJS_Context*)cc; 851 CJS_Context* pContext = (CJS_Context*)cc;
856 CJS_Runtime* pRuntime = pContext->GetJSRuntime(); 852 CJS_Runtime* pRuntime = pContext->GetJSRuntime();
857 JSFXObject pObj = JS_NewFxDynamicObj(*pRuntime, pContext, -1); 853 v8::Local<v8::Object> pObj =
854 JS_NewFxDynamicObj(pRuntime->GetIsolate(), pContext, -1);
858 JS_PutObjectString(isolate, pObj, L"Author", cwAuthor.c_str()); 855 JS_PutObjectString(isolate, pObj, L"Author", cwAuthor.c_str());
859 JS_PutObjectString(isolate, pObj, L"Title", cwTitle.c_str()); 856 JS_PutObjectString(isolate, pObj, L"Title", cwTitle.c_str());
860 JS_PutObjectString(isolate, pObj, L"Subject", cwSubject.c_str()); 857 JS_PutObjectString(isolate, pObj, L"Subject", cwSubject.c_str());
861 JS_PutObjectString(isolate, pObj, L"Keywords", cwKeywords.c_str()); 858 JS_PutObjectString(isolate, pObj, L"Keywords", cwKeywords.c_str());
862 JS_PutObjectString(isolate, pObj, L"Creator", cwCreator.c_str()); 859 JS_PutObjectString(isolate, pObj, L"Creator", cwCreator.c_str());
863 JS_PutObjectString(isolate, pObj, L"Producer", cwProducer.c_str()); 860 JS_PutObjectString(isolate, pObj, L"Producer", cwProducer.c_str());
864 JS_PutObjectString(isolate, pObj, L"CreationDate", cwCreationDate.c_str()); 861 JS_PutObjectString(isolate, pObj, L"CreationDate", cwCreationDate.c_str());
865 JS_PutObjectString(isolate, pObj, L"ModDate", cwModDate.c_str()); 862 JS_PutObjectString(isolate, pObj, L"ModDate", cwModDate.c_str());
866 JS_PutObjectString(isolate, pObj, L"Trapped", cwTrapped.c_str()); 863 JS_PutObjectString(isolate, pObj, L"Trapped", cwTrapped.c_str());
867 864
(...skipping 498 matching lines...) Expand 10 before | Expand all | Expand 10 after
1366 if (params.size() != 2) { 1363 if (params.size() != 2) {
1367 sError = JSGetStringFromID(pContext, IDS_STRING_JSPARAMERROR); 1364 sError = JSGetStringFromID(pContext, IDS_STRING_JSPARAMERROR);
1368 return FALSE; 1365 return FALSE;
1369 } 1366 }
1370 CFX_WideString swIconName = params[0].ToCFXWideString(); 1367 CFX_WideString swIconName = params[0].ToCFXWideString();
1371 1368
1372 if (params[1].GetType() != VT_object) { 1369 if (params[1].GetType() != VT_object) {
1373 sError = JSGetStringFromID(pContext, IDS_STRING_JSTYPEERROR); 1370 sError = JSGetStringFromID(pContext, IDS_STRING_JSTYPEERROR);
1374 return FALSE; 1371 return FALSE;
1375 } 1372 }
1376 JSFXObject pJSIcon = params[1].ToV8Object(); 1373 v8::Local<v8::Object> pJSIcon = params[1].ToV8Object();
1377 1374
1378 CJS_Runtime* pRuntime = pContext->GetJSRuntime(); 1375 CJS_Runtime* pRuntime = pContext->GetJSRuntime();
1379 if (JS_GetObjDefnID(pJSIcon) != JS_GetObjDefnID(*pRuntime, L"Icon")) { 1376 if (JS_GetObjDefnID(pJSIcon) !=
1377 JS_GetObjDefnID(pRuntime->GetIsolate(), L"Icon")) {
1380 sError = JSGetStringFromID(pContext, IDS_STRING_JSTYPEERROR); 1378 sError = JSGetStringFromID(pContext, IDS_STRING_JSTYPEERROR);
1381 return FALSE; 1379 return FALSE;
1382 } 1380 }
1383 1381
1384 CJS_EmbedObj* pEmbedObj = params[1].ToCJSObject()->GetEmbedObject(); 1382 CJS_EmbedObj* pEmbedObj = params[1].ToCJSObject()->GetEmbedObject();
1385 if (!pEmbedObj) { 1383 if (!pEmbedObj) {
1386 sError = JSGetStringFromID(pContext, IDS_STRING_JSTYPEERROR); 1384 sError = JSGetStringFromID(pContext, IDS_STRING_JSTYPEERROR);
1387 return FALSE; 1385 return FALSE;
1388 } 1386 }
1389 1387
(...skipping 26 matching lines...) Expand all
1416 CJS_Array Icons(m_isolate); 1414 CJS_Array Icons(m_isolate);
1417 IconElement* pIconElement = NULL; 1415 IconElement* pIconElement = NULL;
1418 int iIconTreeLength = m_pIconTree->GetLength(); 1416 int iIconTreeLength = m_pIconTree->GetLength();
1419 1417
1420 CJS_Context* pContext = (CJS_Context*)cc; 1418 CJS_Context* pContext = (CJS_Context*)cc;
1421 CJS_Runtime* pRuntime = pContext->GetJSRuntime(); 1419 CJS_Runtime* pRuntime = pContext->GetJSRuntime();
1422 1420
1423 for (int i = 0; i < iIconTreeLength; i++) { 1421 for (int i = 0; i < iIconTreeLength; i++) {
1424 pIconElement = (*m_pIconTree)[i]; 1422 pIconElement = (*m_pIconTree)[i];
1425 1423
1426 JSFXObject pObj = JS_NewFxDynamicObj(*pRuntime, pContext, 1424 v8::Local<v8::Object> pObj =
1427 JS_GetObjDefnID(*pRuntime, L"Icon")); 1425 JS_NewFxDynamicObj(pRuntime->GetIsolate(), pContext,
1426 JS_GetObjDefnID(pRuntime->GetIsolate(), L"Icon"));
1428 if (pObj.IsEmpty()) 1427 if (pObj.IsEmpty())
1429 return FALSE; 1428 return FALSE;
1430 1429
1431 CJS_Icon* pJS_Icon = (CJS_Icon*)JS_GetPrivate(pObj); 1430 CJS_Icon* pJS_Icon = (CJS_Icon*)JS_GetPrivate(pObj);
1432 if (!pJS_Icon) 1431 if (!pJS_Icon)
1433 return FALSE; 1432 return FALSE;
1434 1433
1435 Icon* pIcon = (Icon*)pJS_Icon->GetEmbedObject(); 1434 Icon* pIcon = (Icon*)pJS_Icon->GetEmbedObject();
1436 if (!pIcon) 1435 if (!pIcon)
1437 return FALSE; 1436 return FALSE;
(...skipping 21 matching lines...) Expand all
1459 return FALSE; 1458 return FALSE;
1460 CFX_WideString swIconName = params[0].ToCFXWideString(); 1459 CFX_WideString swIconName = params[0].ToCFXWideString();
1461 int iIconCounts = m_pIconTree->GetLength(); 1460 int iIconCounts = m_pIconTree->GetLength();
1462 1461
1463 CJS_Runtime* pRuntime = pContext->GetJSRuntime(); 1462 CJS_Runtime* pRuntime = pContext->GetJSRuntime();
1464 1463
1465 for (int i = 0; i < iIconCounts; i++) { 1464 for (int i = 0; i < iIconCounts; i++) {
1466 if ((*m_pIconTree)[i]->IconName == swIconName) { 1465 if ((*m_pIconTree)[i]->IconName == swIconName) {
1467 Icon* pRetIcon = (*m_pIconTree)[i]->IconStream; 1466 Icon* pRetIcon = (*m_pIconTree)[i]->IconStream;
1468 1467
1469 JSFXObject pObj = JS_NewFxDynamicObj(*pRuntime, pContext, 1468 v8::Local<v8::Object> pObj =
1470 JS_GetObjDefnID(*pRuntime, L"Icon")); 1469 JS_NewFxDynamicObj(pRuntime->GetIsolate(), pContext,
1470 JS_GetObjDefnID(pRuntime->GetIsolate(), L"Icon"));
1471 if (pObj.IsEmpty()) 1471 if (pObj.IsEmpty())
1472 return FALSE; 1472 return FALSE;
1473 1473
1474 CJS_Icon* pJS_Icon = (CJS_Icon*)JS_GetPrivate(pObj); 1474 CJS_Icon* pJS_Icon = (CJS_Icon*)JS_GetPrivate(pObj);
1475 if (!pJS_Icon) 1475 if (!pJS_Icon)
1476 return FALSE; 1476 return FALSE;
1477 1477
1478 Icon* pIcon = (Icon*)pJS_Icon->GetEmbedObject(); 1478 Icon* pIcon = (Icon*)pJS_Icon->GetEmbedObject();
1479 if (!pIcon) 1479 if (!pIcon)
1480 return FALSE; 1480 return FALSE;
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
1655 1655
1656 return TRUE; 1656 return TRUE;
1657 } 1657 }
1658 1658
1659 FX_BOOL Document::getPrintParams(IFXJS_Context* cc, 1659 FX_BOOL Document::getPrintParams(IFXJS_Context* cc,
1660 const CJS_Parameters& params, 1660 const CJS_Parameters& params,
1661 CJS_Value& vRet, 1661 CJS_Value& vRet,
1662 CFX_WideString& sError) { 1662 CFX_WideString& sError) {
1663 CJS_Context* pContext = (CJS_Context*)cc; 1663 CJS_Context* pContext = (CJS_Context*)cc;
1664 CJS_Runtime* pRuntime = pContext->GetJSRuntime(); 1664 CJS_Runtime* pRuntime = pContext->GetJSRuntime();
1665 JSFXObject pRetObj = JS_NewFxDynamicObj( 1665 v8::Local<v8::Object> pRetObj = JS_NewFxDynamicObj(
1666 *pRuntime, pContext, JS_GetObjDefnID(*pRuntime, L"PrintParamsObj")); 1666 pRuntime->GetIsolate(), pContext,
1667 JS_GetObjDefnID(pRuntime->GetIsolate(), L"PrintParamsObj"));
1667 1668
1668 // Not implemented yet. 1669 // Not implemented yet.
1669 1670
1670 vRet = pRetObj; 1671 vRet = pRetObj;
1671 return TRUE; 1672 return TRUE;
1672 } 1673 }
1673 1674
1674 #define ISLATINWORD(u) (u != 0x20 && u <= 0x28FF) 1675 #define ISLATINWORD(u) (u != 0x20 && u <= 0x28FF)
1675 1676
1676 int Document::CountWords(CPDF_TextObject* pTextObj) { 1677 int Document::CountWords(CPDF_TextObject* pTextObj) {
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
1848 CFX_DWordArray DelArray; 1849 CFX_DWordArray DelArray;
1849 1850
1850 for (int j = DelArray.GetSize() - 1; j >= 0; j--) { 1851 for (int j = DelArray.GetSize() - 1; j >= 0; j--) {
1851 m_DelayData.RemoveAt(DelArray[j]); 1852 m_DelayData.RemoveAt(DelArray[j]);
1852 } 1853 }
1853 } 1854 }
1854 1855
1855 CJS_Document* Document::GetCJSDoc() const { 1856 CJS_Document* Document::GetCJSDoc() const {
1856 return static_cast<CJS_Document*>(m_pJSObject); 1857 return static_cast<CJS_Document*>(m_pJSObject);
1857 } 1858 }
OLDNEW
« no previous file with comments | « fpdfsdk/src/javascript/Consts.cpp ('k') | fpdfsdk/src/javascript/Field.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698