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

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

Issue 927263003: Tidy up JS_Defines.h (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 5 years, 10 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
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 359 matching lines...) Expand 10 before | Expand all | Expand 10 after
370 if(!pFormField->CountControls() || m_nFormControlIndex>=pFormField->Coun tControls()) return NULL; 370 if(!pFormField->CountControls() || m_nFormControlIndex>=pFormField->Coun tControls()) return NULL;
371 371
372 if (m_nFormControlIndex<0) 372 if (m_nFormControlIndex<0)
373 return pFormField->GetControl(0); 373 return pFormField->GetControl(0);
374 else 374 else
375 return pFormField->GetControl(m_nFormControlIndex); 375 return pFormField->GetControl(m_nFormControlIndex);
376 } 376 }
377 377
378 /* ---------------------------------------- property --------------------------- ------------- */ 378 /* ---------------------------------------- property --------------------------- ------------- */
379 379
380 FX_BOOL Field::alignment(OBJ_PROP_PARAMS) 380 FX_BOOL Field::alignment(IFXJS_Context* cc, CJS_PropValue& vp, JS_ErrorString& s Error)
381 { 381 {
382 ASSERT(m_pDocument != NULL); 382 ASSERT(m_pDocument != NULL);
383 383
384 if (vp.IsSetting()) 384 if (vp.IsSetting())
385 { 385 {
386 if (!m_bCanSet) return FALSE; 386 if (!m_bCanSet) return FALSE;
387 387
388 CFX_ByteString alignStr; 388 CFX_ByteString alignStr;
389 vp >> alignStr; 389 vp >> alignStr;
390 390
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
430 430
431 return TRUE; 431 return TRUE;
432 } 432 }
433 433
434 void Field::SetAlignment(CPDFSDK_Document* pDocument, const CFX_WideString& swFi eldName, int nControlIndex, 434 void Field::SetAlignment(CPDFSDK_Document* pDocument, const CFX_WideString& swFi eldName, int nControlIndex,
435 const CFX_ByteString& string) 435 const CFX_ByteString& string)
436 { 436 {
437 //Not supported. 437 //Not supported.
438 } 438 }
439 439
440 FX_BOOL Field::borderStyle(OBJ_PROP_PARAMS) 440 FX_BOOL Field::borderStyle(IFXJS_Context* cc, CJS_PropValue& vp, JS_ErrorString& sError)
441 { 441 {
442 ASSERT(m_pDocument != NULL); 442 ASSERT(m_pDocument != NULL);
443 443
444 if (vp.IsSetting()) 444 if (vp.IsSetting())
445 { 445 {
446 if (!m_bCanSet) return FALSE; 446 if (!m_bCanSet) return FALSE;
447 447
448 CFX_ByteString strType = ""; 448 CFX_ByteString strType = "";
449 vp >> strType; 449 vp >> strType;
450 450
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
551 { 551 {
552 pWidget->SetBorderStyle(nBorderS tyle); 552 pWidget->SetBorderStyle(nBorderS tyle);
553 UpdateFormControl(pDocument, pFo rmControl, TRUE, TRUE, TRUE); 553 UpdateFormControl(pDocument, pFo rmControl, TRUE, TRUE, TRUE);
554 } 554 }
555 } 555 }
556 } 556 }
557 } 557 }
558 } 558 }
559 } 559 }
560 560
561 FX_BOOL Field::buttonAlignX(OBJ_PROP_PARAMS) 561 FX_BOOL Field::buttonAlignX(IFXJS_Context* cc, CJS_PropValue& vp, JS_ErrorString & sError)
562 { 562 {
563 ASSERT(m_pDocument != NULL); 563 ASSERT(m_pDocument != NULL);
564 564
565 if (vp.IsSetting()) 565 if (vp.IsSetting())
566 { 566 {
567 if (!m_bCanSet) return FALSE; 567 if (!m_bCanSet) return FALSE;
568 568
569 int nVP; 569 int nVP;
570 vp >> nVP; 570 vp >> nVP;
571 571
(...skipping 30 matching lines...) Expand all
602 } 602 }
603 603
604 return TRUE; 604 return TRUE;
605 } 605 }
606 606
607 void Field::SetButtonAlignX(CPDFSDK_Document* pDocument, const CFX_WideString& s wFieldName, int nControlIndex, int number) 607 void Field::SetButtonAlignX(CPDFSDK_Document* pDocument, const CFX_WideString& s wFieldName, int nControlIndex, int number)
608 { 608 {
609 //Not supported. 609 //Not supported.
610 } 610 }
611 611
612 FX_BOOL Field::buttonAlignY(OBJ_PROP_PARAMS) 612 FX_BOOL Field::buttonAlignY(IFXJS_Context* cc, CJS_PropValue& vp, JS_ErrorString & sError)
613 { 613 {
614 ASSERT(m_pDocument != NULL); 614 ASSERT(m_pDocument != NULL);
615 615
616 if (vp.IsSetting()) 616 if (vp.IsSetting())
617 { 617 {
618 if (!m_bCanSet) return FALSE; 618 if (!m_bCanSet) return FALSE;
619 619
620 int nVP; 620 int nVP;
621 vp >> nVP; 621 vp >> nVP;
622 622
(...skipping 30 matching lines...) Expand all
653 } 653 }
654 654
655 return TRUE; 655 return TRUE;
656 } 656 }
657 657
658 void Field::SetButtonAlignY(CPDFSDK_Document* pDocument, const CFX_WideString& s wFieldName, int nControlIndex, int number) 658 void Field::SetButtonAlignY(CPDFSDK_Document* pDocument, const CFX_WideString& s wFieldName, int nControlIndex, int number)
659 { 659 {
660 //Not supported. 660 //Not supported.
661 } 661 }
662 662
663 FX_BOOL Field::buttonFitBounds(OBJ_PROP_PARAMS) 663 FX_BOOL Field::buttonFitBounds(IFXJS_Context* cc, CJS_PropValue& vp, JS_ErrorStr ing& sError)
664 { 664 {
665 ASSERT(m_pDocument != NULL); 665 ASSERT(m_pDocument != NULL);
666 666
667 if (vp.IsSetting()) 667 if (vp.IsSetting())
668 { 668 {
669 if (!m_bCanSet) return FALSE; 669 if (!m_bCanSet) return FALSE;
670 670
671 bool bVP; 671 bool bVP;
672 vp >> bVP; 672 vp >> bVP;
673 673
(...skipping 26 matching lines...) Expand all
700 } 700 }
701 701
702 return TRUE; 702 return TRUE;
703 } 703 }
704 704
705 void Field::SetButtonFitBounds(CPDFSDK_Document* pDocument, const CFX_WideString & swFieldName, int nControlIndex, bool b) 705 void Field::SetButtonFitBounds(CPDFSDK_Document* pDocument, const CFX_WideString & swFieldName, int nControlIndex, bool b)
706 { 706 {
707 //Not supported. 707 //Not supported.
708 } 708 }
709 709
710 FX_BOOL Field::buttonPosition(OBJ_PROP_PARAMS) 710 FX_BOOL Field::buttonPosition(IFXJS_Context* cc, CJS_PropValue& vp, JS_ErrorStri ng& sError)
711 { 711 {
712 ASSERT(m_pDocument != NULL); 712 ASSERT(m_pDocument != NULL);
713 713
714 if (vp.IsSetting()) 714 if (vp.IsSetting())
715 { 715 {
716 if (!m_bCanSet) return FALSE; 716 if (!m_bCanSet) return FALSE;
717 717
718 int nVP; 718 int nVP;
719 vp >> nVP; 719 vp >> nVP;
720 720
(...skipping 24 matching lines...) Expand all
745 vp << pFormControl->GetTextPosition(); 745 vp << pFormControl->GetTextPosition();
746 } 746 }
747 return TRUE; 747 return TRUE;
748 } 748 }
749 749
750 void Field::SetButtonPosition(CPDFSDK_Document* pDocument, const CFX_WideString& swFieldName, int nControlIndex, int number) 750 void Field::SetButtonPosition(CPDFSDK_Document* pDocument, const CFX_WideString& swFieldName, int nControlIndex, int number)
751 { 751 {
752 //Not supported. 752 //Not supported.
753 } 753 }
754 754
755 FX_BOOL Field::buttonScaleHow(OBJ_PROP_PARAMS) 755 FX_BOOL Field::buttonScaleHow(IFXJS_Context* cc, CJS_PropValue& vp, JS_ErrorStri ng& sError)
756 { 756 {
757 ASSERT(m_pDocument != NULL); 757 ASSERT(m_pDocument != NULL);
758 758
759 if (vp.IsSetting()) 759 if (vp.IsSetting())
760 { 760 {
761 if (!m_bCanSet) return FALSE; 761 if (!m_bCanSet) return FALSE;
762 762
763 int nVP; 763 int nVP;
764 vp >> nVP; 764 vp >> nVP;
765 765
(...skipping 29 matching lines...) Expand all
795 } 795 }
796 796
797 return TRUE; 797 return TRUE;
798 } 798 }
799 799
800 void Field::SetButtonScaleHow(CPDFSDK_Document* pDocument, const CFX_WideString& swFieldName, int nControlIndex, int number) 800 void Field::SetButtonScaleHow(CPDFSDK_Document* pDocument, const CFX_WideString& swFieldName, int nControlIndex, int number)
801 { 801 {
802 //Not supported. 802 //Not supported.
803 } 803 }
804 804
805 FX_BOOL Field::buttonScaleWhen(OBJ_PROP_PARAMS) 805 FX_BOOL Field::buttonScaleWhen(IFXJS_Context* cc, CJS_PropValue& vp, JS_ErrorStr ing& sError)
806 { 806 {
807 ASSERT(m_pDocument != NULL); 807 ASSERT(m_pDocument != NULL);
808 808
809 if (vp.IsSetting()) 809 if (vp.IsSetting())
810 { 810 {
811 if (!m_bCanSet) return FALSE; 811 if (!m_bCanSet) return FALSE;
812 812
813 int nVP; 813 int nVP;
814 vp >> nVP; 814 vp >> nVP;
815 815
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
857 } 857 }
858 858
859 return TRUE; 859 return TRUE;
860 } 860 }
861 861
862 void Field::SetButtonScaleWhen(CPDFSDK_Document* pDocument, const CFX_WideString & swFieldName, int nControlIndex, int number) 862 void Field::SetButtonScaleWhen(CPDFSDK_Document* pDocument, const CFX_WideString & swFieldName, int nControlIndex, int number)
863 { 863 {
864 //Not supported. 864 //Not supported.
865 } 865 }
866 866
867 FX_BOOL Field::calcOrderIndex(OBJ_PROP_PARAMS) 867 FX_BOOL Field::calcOrderIndex(IFXJS_Context* cc, CJS_PropValue& vp, JS_ErrorStri ng& sError)
868 { 868 {
869 ASSERT(m_pDocument != NULL); 869 ASSERT(m_pDocument != NULL);
870 870
871 if (vp.IsSetting()) 871 if (vp.IsSetting())
872 { 872 {
873 if (!m_bCanSet) return FALSE; 873 if (!m_bCanSet) return FALSE;
874 874
875 int nVP; 875 int nVP;
876 vp >> nVP; 876 vp >> nVP;
877 877
(...skipping 28 matching lines...) Expand all
906 } 906 }
907 907
908 return TRUE; 908 return TRUE;
909 } 909 }
910 910
911 void Field::SetCalcOrderIndex(CPDFSDK_Document* pDocument, const CFX_WideString& swFieldName, int nControlIndex, int number) 911 void Field::SetCalcOrderIndex(CPDFSDK_Document* pDocument, const CFX_WideString& swFieldName, int nControlIndex, int number)
912 { 912 {
913 //Not supported. 913 //Not supported.
914 } 914 }
915 915
916 FX_BOOL Field::charLimit(OBJ_PROP_PARAMS) 916 FX_BOOL Field::charLimit(IFXJS_Context* cc, CJS_PropValue& vp, JS_ErrorString& s Error)
917 { 917 {
918 ASSERT(m_pDocument != NULL); 918 ASSERT(m_pDocument != NULL);
919 919
920 if (vp.IsSetting()) 920 if (vp.IsSetting())
921 { 921 {
922 if (!m_bCanSet) return FALSE; 922 if (!m_bCanSet) return FALSE;
923 923
924 int nVP; 924 int nVP;
925 vp >> nVP; 925 vp >> nVP;
926 926
(...skipping 21 matching lines...) Expand all
948 vp << (FX_INT32)pFormField->GetMaxLen(); 948 vp << (FX_INT32)pFormField->GetMaxLen();
949 } 949 }
950 return TRUE; 950 return TRUE;
951 } 951 }
952 952
953 void Field::SetCharLimit(CPDFSDK_Document* pDocument, const CFX_WideString& swFi eldName, int nControlIndex, int number) 953 void Field::SetCharLimit(CPDFSDK_Document* pDocument, const CFX_WideString& swFi eldName, int nControlIndex, int number)
954 { 954 {
955 //Not supported. 955 //Not supported.
956 } 956 }
957 957
958 FX_BOOL Field::comb(OBJ_PROP_PARAMS) 958 FX_BOOL Field::comb(IFXJS_Context* cc, CJS_PropValue& vp, JS_ErrorString& sError )
959 { 959 {
960 ASSERT(m_pDocument != NULL); 960 ASSERT(m_pDocument != NULL);
961 961
962 if (vp.IsSetting()) 962 if (vp.IsSetting())
963 { 963 {
964 if (!m_bCanSet) return FALSE; 964 if (!m_bCanSet) return FALSE;
965 965
966 bool bVP; 966 bool bVP;
967 vp >> bVP; 967 vp >> bVP;
968 968
(...skipping 25 matching lines...) Expand all
994 } 994 }
995 995
996 return TRUE; 996 return TRUE;
997 } 997 }
998 998
999 void Field::SetComb(CPDFSDK_Document* pDocument, const CFX_WideString& swFieldNa me, int nControlIndex, bool b) 999 void Field::SetComb(CPDFSDK_Document* pDocument, const CFX_WideString& swFieldNa me, int nControlIndex, bool b)
1000 { 1000 {
1001 //Not supported. 1001 //Not supported.
1002 } 1002 }
1003 1003
1004 FX_BOOL Field::commitOnSelChange(OBJ_PROP_PARAMS) 1004 FX_BOOL Field::commitOnSelChange(IFXJS_Context* cc, CJS_PropValue& vp, JS_ErrorS tring& sError)
1005 { 1005 {
1006 ASSERT(m_pDocument != NULL); 1006 ASSERT(m_pDocument != NULL);
1007 1007
1008 if (vp.IsSetting()) 1008 if (vp.IsSetting())
1009 { 1009 {
1010 if (!m_bCanSet) return FALSE; 1010 if (!m_bCanSet) return FALSE;
1011 1011
1012 bool bVP; 1012 bool bVP;
1013 vp >> bVP; 1013 vp >> bVP;
1014 1014
(...skipping 25 matching lines...) Expand all
1040 } 1040 }
1041 1041
1042 return TRUE; 1042 return TRUE;
1043 } 1043 }
1044 1044
1045 void Field::SetCommitOnSelChange(CPDFSDK_Document* pDocument, const CFX_WideStri ng& swFieldName, int nControlIndex, bool b) 1045 void Field::SetCommitOnSelChange(CPDFSDK_Document* pDocument, const CFX_WideStri ng& swFieldName, int nControlIndex, bool b)
1046 { 1046 {
1047 //Not supported. 1047 //Not supported.
1048 } 1048 }
1049 1049
1050 FX_BOOL Field::currentValueIndices(OBJ_PROP_PARAMS) 1050 FX_BOOL Field::currentValueIndices(IFXJS_Context* cc, CJS_PropValue& vp, JS_Erro rString& sError)
1051 { 1051 {
1052 ASSERT(m_pDocument != NULL); 1052 ASSERT(m_pDocument != NULL);
1053 1053
1054 if (vp.IsSetting()) 1054 if (vp.IsSetting())
1055 { 1055 {
1056 if (!m_bCanSet) return FALSE; 1056 if (!m_bCanSet) return FALSE;
1057 1057
1058 CFX_DWordArray array; 1058 CFX_DWordArray array;
1059 1059
1060 if (vp.GetType() == VT_number) 1060 if (vp.GetType() == VT_number)
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
1145 int iSelecting = (FX_INT32)array.GetAt(i); 1145 int iSelecting = (FX_INT32)array.GetAt(i);
1146 if (iSelecting < pFormField->CountOptions() && ! pFormField->IsItemSelected(iSelecting)) 1146 if (iSelecting < pFormField->CountOptions() && ! pFormField->IsItemSelected(iSelecting))
1147 pFormField->SetItemSelection(iSelecting, TRUE); 1147 pFormField->SetItemSelection(iSelecting, TRUE);
1148 1148
1149 } 1149 }
1150 UpdateFormField(pDocument, pFormField, TRUE, TRUE, TRUE) ; 1150 UpdateFormField(pDocument, pFormField, TRUE, TRUE, TRUE) ;
1151 } 1151 }
1152 } 1152 }
1153 } 1153 }
1154 1154
1155 FX_BOOL Field::defaultStyle(OBJ_PROP_PARAMS) 1155 FX_BOOL Field::defaultStyle(IFXJS_Context* cc, CJS_PropValue& vp, JS_ErrorString & sError)
1156 { 1156 {
1157 // MQG sError = JSGetStringFromID(IDS_STRING_NOTSUPPORT); 1157 // MQG sError = JSGetStringFromID(IDS_STRING_NOTSUPPORT);
1158 return FALSE; 1158 return FALSE;
1159 1159
1160 if (vp.IsSetting()) 1160 if (vp.IsSetting())
1161 { 1161 {
1162 if (!m_bCanSet) return FALSE; 1162 if (!m_bCanSet) return FALSE;
1163 1163
1164 ; 1164 ;
1165 } 1165 }
1166 else 1166 else
1167 { 1167 {
1168 ; 1168 ;
1169 } 1169 }
1170 return TRUE; 1170 return TRUE;
1171 } 1171 }
1172 1172
1173 void Field::SetDefaultStyle(CPDFSDK_Document* pDocument, const CFX_WideString& s wFieldName, int nControlIndex) 1173 void Field::SetDefaultStyle(CPDFSDK_Document* pDocument, const CFX_WideString& s wFieldName, int nControlIndex)
1174 { 1174 {
1175 //Not supported. 1175 //Not supported.
1176 } 1176 }
1177 1177
1178 FX_BOOL Field::defaultValue(OBJ_PROP_PARAMS) 1178 FX_BOOL Field::defaultValue(IFXJS_Context* cc, CJS_PropValue& vp, JS_ErrorString & sError)
1179 { 1179 {
1180 ASSERT(m_pDocument != NULL); 1180 ASSERT(m_pDocument != NULL);
1181 1181
1182 if (vp.IsSetting()) 1182 if (vp.IsSetting())
1183 { 1183 {
1184 if (!m_bCanSet) return FALSE; 1184 if (!m_bCanSet) return FALSE;
1185 1185
1186 CFX_WideString WideStr; 1186 CFX_WideString WideStr;
1187 vp >> WideStr; 1187 vp >> WideStr;
1188 1188
(...skipping 23 matching lines...) Expand all
1212 } 1212 }
1213 return TRUE; 1213 return TRUE;
1214 } 1214 }
1215 1215
1216 void Field::SetDefaultValue(CPDFSDK_Document* pDocument, const CFX_WideString& s wFieldName, int nControlIndex, 1216 void Field::SetDefaultValue(CPDFSDK_Document* pDocument, const CFX_WideString& s wFieldName, int nControlIndex,
1217 const CFX_WideString& st ring) 1217 const CFX_WideString& st ring)
1218 { 1218 {
1219 //Not supported. 1219 //Not supported.
1220 } 1220 }
1221 1221
1222 FX_BOOL Field::doNotScroll(OBJ_PROP_PARAMS) 1222 FX_BOOL Field::doNotScroll(IFXJS_Context* cc, CJS_PropValue& vp, JS_ErrorString& sError)
1223 { 1223 {
1224 ASSERT(m_pDocument != NULL); 1224 ASSERT(m_pDocument != NULL);
1225 1225
1226 if (vp.IsSetting()) 1226 if (vp.IsSetting())
1227 { 1227 {
1228 if (!m_bCanSet) return FALSE; 1228 if (!m_bCanSet) return FALSE;
1229 1229
1230 bool bVP; 1230 bool bVP;
1231 vp >> bVP; 1231 vp >> bVP;
1232 1232
(...skipping 25 matching lines...) Expand all
1258 } 1258 }
1259 1259
1260 return TRUE; 1260 return TRUE;
1261 } 1261 }
1262 1262
1263 void Field::SetDoNotScroll(CPDFSDK_Document* pDocument, const CFX_WideString& sw FieldName, int nControlIndex, bool b) 1263 void Field::SetDoNotScroll(CPDFSDK_Document* pDocument, const CFX_WideString& sw FieldName, int nControlIndex, bool b)
1264 { 1264 {
1265 //Not supported. 1265 //Not supported.
1266 } 1266 }
1267 1267
1268 FX_BOOL Field::doNotSpellCheck(OBJ_PROP_PARAMS) 1268 FX_BOOL Field::doNotSpellCheck(IFXJS_Context* cc, CJS_PropValue& vp, JS_ErrorStr ing& sError)
1269 { 1269 {
1270 ASSERT(m_pDocument != NULL); 1270 ASSERT(m_pDocument != NULL);
1271 1271
1272 if (vp.IsSetting()) 1272 if (vp.IsSetting())
1273 { 1273 {
1274 if (!m_bCanSet) return FALSE; 1274 if (!m_bCanSet) return FALSE;
1275 1275
1276 bool bVP; 1276 bool bVP;
1277 vp >> bVP; 1277 vp >> bVP;
1278 } 1278 }
(...skipping 23 matching lines...) Expand all
1302 { 1302 {
1303 m_bDelay = bDelay; 1303 m_bDelay = bDelay;
1304 1304
1305 if (!m_bDelay) 1305 if (!m_bDelay)
1306 { 1306 {
1307 if (m_pJSDoc) 1307 if (m_pJSDoc)
1308 m_pJSDoc->DoFieldDelay(m_FieldName, m_nFormControlIndex) ; 1308 m_pJSDoc->DoFieldDelay(m_FieldName, m_nFormControlIndex) ;
1309 } 1309 }
1310 } 1310 }
1311 1311
1312 FX_BOOL Field::delay(OBJ_PROP_PARAMS) 1312 FX_BOOL Field::delay(IFXJS_Context* cc, CJS_PropValue& vp, JS_ErrorString& sErro r)
1313 { 1313 {
1314 if (vp.IsSetting()) 1314 if (vp.IsSetting())
1315 { 1315 {
1316 if (!m_bCanSet) return FALSE; 1316 if (!m_bCanSet) return FALSE;
1317 1317
1318 bool bVP; 1318 bool bVP;
1319 vp >> bVP; 1319 vp >> bVP;
1320 1320
1321 SetDelay(bVP); 1321 SetDelay(bVP);
1322 } 1322 }
1323 else 1323 else
1324 { 1324 {
1325 vp << m_bDelay; 1325 vp << m_bDelay;
1326 } 1326 }
1327 return TRUE; 1327 return TRUE;
1328 } 1328 }
1329 1329
1330 FX_BOOL Field::display(OBJ_PROP_PARAMS) 1330 FX_BOOL Field::display(IFXJS_Context* cc, CJS_PropValue& vp, JS_ErrorString& sEr ror)
1331 { 1331 {
1332 ASSERT(m_pDocument != NULL); 1332 ASSERT(m_pDocument != NULL);
1333 1333
1334 if (vp.IsSetting()) 1334 if (vp.IsSetting())
1335 { 1335 {
1336 if (!m_bCanSet) return FALSE; 1336 if (!m_bCanSet) return FALSE;
1337 1337
1338 int nVP; 1338 int nVP;
1339 vp >> nVP; 1339 vp >> nVP;
1340 1340
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
1491 { 1491 {
1492 pWidget->SetFlags(dwFlag); 1492 pWidget->SetFlags(dwFlag);
1493 UpdateFormControl(pDocument, pFo rmControl, TRUE, FALSE, TRUE); 1493 UpdateFormControl(pDocument, pFo rmControl, TRUE, FALSE, TRUE);
1494 } 1494 }
1495 } 1495 }
1496 } 1496 }
1497 } 1497 }
1498 } 1498 }
1499 } 1499 }
1500 1500
1501 FX_BOOL Field::doc(OBJ_PROP_PARAMS) 1501 FX_BOOL Field::doc(IFXJS_Context* cc, CJS_PropValue& vp, JS_ErrorString& sError)
1502 { 1502 {
1503 ASSERT(m_pJSDoc != NULL); 1503 ASSERT(m_pJSDoc != NULL);
1504 1504
1505 if (!vp.IsGetting())return FALSE; 1505 if (!vp.IsGetting())return FALSE;
1506 1506
1507 vp << (CJS_Object*)(*m_pJSDoc); 1507 vp << (CJS_Object*)(*m_pJSDoc);
1508 1508
1509 return TRUE; 1509 return TRUE;
1510 } 1510 }
1511 1511
1512 FX_BOOL Field::editable(OBJ_PROP_PARAMS) 1512 FX_BOOL Field::editable(IFXJS_Context* cc, CJS_PropValue& vp, JS_ErrorString& sE rror)
1513 { 1513 {
1514 ASSERT(m_pDocument != NULL); 1514 ASSERT(m_pDocument != NULL);
1515 1515
1516 if (vp.IsSetting()) 1516 if (vp.IsSetting())
1517 { 1517 {
1518 if (!m_bCanSet) return FALSE; 1518 if (!m_bCanSet) return FALSE;
1519 1519
1520 bool bVP; 1520 bool bVP;
1521 vp >> bVP; 1521 vp >> bVP;
1522 1522
(...skipping 12 matching lines...) Expand all
1535 1535
1536 if (pFormField->GetFieldFlags() & FIELDFLAG_EDIT) 1536 if (pFormField->GetFieldFlags() & FIELDFLAG_EDIT)
1537 vp << true; 1537 vp << true;
1538 else 1538 else
1539 vp << false; 1539 vp << false;
1540 } 1540 }
1541 1541
1542 return TRUE; 1542 return TRUE;
1543 } 1543 }
1544 1544
1545 FX_BOOL Field::exportValues(OBJ_PROP_PARAMS) 1545 FX_BOOL Field::exportValues(IFXJS_Context* cc, CJS_PropValue& vp, JS_ErrorString & sError)
1546 { 1546 {
1547 ASSERT(m_pDocument != NULL); 1547 ASSERT(m_pDocument != NULL);
1548 1548
1549 CFX_PtrArray FieldArray; 1549 CFX_PtrArray FieldArray;
1550 GetFormFields(m_FieldName,FieldArray); 1550 GetFormFields(m_FieldName,FieldArray);
1551 if (FieldArray.GetSize() <= 0) return FALSE; 1551 if (FieldArray.GetSize() <= 0) return FALSE;
1552 1552
1553 CPDF_FormField* pFormField = (CPDF_FormField*)FieldArray.ElementAt(0); 1553 CPDF_FormField* pFormField = (CPDF_FormField*)FieldArray.ElementAt(0);
1554 ASSERT(pFormField != NULL); 1554 ASSERT(pFormField != NULL);
1555 1555
(...skipping 28 matching lines...) Expand all
1584 1584
1585 ExportValusArray.SetElement(0, CJS_Value(m_isolate,pForm Control->GetExportValue().c_str())); 1585 ExportValusArray.SetElement(0, CJS_Value(m_isolate,pForm Control->GetExportValue().c_str()));
1586 } 1586 }
1587 1587
1588 vp << ExportValusArray; 1588 vp << ExportValusArray;
1589 } 1589 }
1590 1590
1591 return TRUE; 1591 return TRUE;
1592 } 1592 }
1593 1593
1594 FX_BOOL Field::fileSelect(OBJ_PROP_PARAMS) 1594 FX_BOOL Field::fileSelect(IFXJS_Context* cc, CJS_PropValue& vp, JS_ErrorString& sError)
1595 { 1595 {
1596 ASSERT(m_pDocument != NULL); 1596 ASSERT(m_pDocument != NULL);
1597 1597
1598 CFX_PtrArray FieldArray; 1598 CFX_PtrArray FieldArray;
1599 GetFormFields(m_FieldName, FieldArray); 1599 GetFormFields(m_FieldName, FieldArray);
1600 if (FieldArray.GetSize() <= 0) return FALSE; 1600 if (FieldArray.GetSize() <= 0) return FALSE;
1601 1601
1602 CPDF_FormField* pFormField = (CPDF_FormField*)FieldArray.ElementAt(0); 1602 CPDF_FormField* pFormField = (CPDF_FormField*)FieldArray.ElementAt(0);
1603 ASSERT(pFormField != NULL); 1603 ASSERT(pFormField != NULL);
1604 1604
(...skipping 12 matching lines...) Expand all
1617 { 1617 {
1618 if (pFormField->GetFieldFlags() & FIELDFLAG_FILESELECT) 1618 if (pFormField->GetFieldFlags() & FIELDFLAG_FILESELECT)
1619 vp << true; 1619 vp << true;
1620 else 1620 else
1621 vp << false; 1621 vp << false;
1622 } 1622 }
1623 1623
1624 return TRUE; 1624 return TRUE;
1625 } 1625 }
1626 1626
1627 FX_BOOL Field::fillColor(OBJ_PROP_PARAMS) 1627 FX_BOOL Field::fillColor(IFXJS_Context* cc, CJS_PropValue& vp, JS_ErrorString& s Error)
1628 { 1628 {
1629 ASSERT(m_pDocument != NULL); 1629 ASSERT(m_pDocument != NULL);
1630 1630
1631 CJS_Array crArray(m_isolate); 1631 CJS_Array crArray(m_isolate);
1632 1632
1633 CFX_PtrArray FieldArray; 1633 CFX_PtrArray FieldArray;
1634 GetFormFields(m_FieldName,FieldArray); 1634 GetFormFields(m_FieldName,FieldArray);
1635 if (FieldArray.GetSize() <= 0) return FALSE; 1635 if (FieldArray.GetSize() <= 0) return FALSE;
1636 1636
1637 if (vp.IsSetting()) 1637 if (vp.IsSetting())
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
1695 } 1695 }
1696 1696
1697 return TRUE; 1697 return TRUE;
1698 } 1698 }
1699 1699
1700 void Field::SetFillColor(CPDFSDK_Document* pDocument, const CFX_WideString& swFi eldName, int nControlIndex, const CPWL_Color& color) 1700 void Field::SetFillColor(CPDFSDK_Document* pDocument, const CFX_WideString& swFi eldName, int nControlIndex, const CPWL_Color& color)
1701 { 1701 {
1702 //Not supported. 1702 //Not supported.
1703 } 1703 }
1704 1704
1705 FX_BOOL Field::hidden(OBJ_PROP_PARAMS) 1705 FX_BOOL Field::hidden(IFXJS_Context* cc, CJS_PropValue& vp, JS_ErrorString& sErr or)
1706 { 1706 {
1707 ASSERT(m_pDocument != NULL); 1707 ASSERT(m_pDocument != NULL);
1708 1708
1709 if (vp.IsSetting()) 1709 if (vp.IsSetting())
1710 { 1710 {
1711 if (!m_bCanSet) return FALSE; 1711 if (!m_bCanSet) return FALSE;
1712 1712
1713 bool bVP; 1713 bool bVP;
1714 vp >> bVP; 1714 vp >> bVP;
1715 1715
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
1826 { 1826 {
1827 pWidget->SetFlags(dwFlags); 1827 pWidget->SetFlags(dwFlags);
1828 UpdateFormControl(pDocument, pFo rmControl, TRUE, FALSE, TRUE); 1828 UpdateFormControl(pDocument, pFo rmControl, TRUE, FALSE, TRUE);
1829 } 1829 }
1830 } 1830 }
1831 } 1831 }
1832 } 1832 }
1833 } 1833 }
1834 } 1834 }
1835 1835
1836 FX_BOOL Field::highlight(OBJ_PROP_PARAMS) 1836 FX_BOOL Field::highlight(IFXJS_Context* cc, CJS_PropValue& vp, JS_ErrorString& s Error)
1837 { 1837 {
1838 ASSERT(m_pDocument != NULL); 1838 ASSERT(m_pDocument != NULL);
1839 1839
1840 if (vp.IsSetting()) 1840 if (vp.IsSetting())
1841 { 1841 {
1842 if (!m_bCanSet) return FALSE; 1842 if (!m_bCanSet) return FALSE;
1843 1843
1844 CFX_ByteString strMode; 1844 CFX_ByteString strMode;
1845 vp >> strMode; 1845 vp >> strMode;
1846 1846
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
1890 } 1890 }
1891 1891
1892 return TRUE; 1892 return TRUE;
1893 } 1893 }
1894 1894
1895 void Field::SetHighlight(CPDFSDK_Document* pDocument, const CFX_WideString& swFi eldName, int nControlIndex, const CFX_ByteString& string) 1895 void Field::SetHighlight(CPDFSDK_Document* pDocument, const CFX_WideString& swFi eldName, int nControlIndex, const CFX_ByteString& string)
1896 { 1896 {
1897 //Not supported. 1897 //Not supported.
1898 } 1898 }
1899 1899
1900 FX_BOOL Field::lineWidth(OBJ_PROP_PARAMS) 1900 FX_BOOL Field::lineWidth(IFXJS_Context* cc, CJS_PropValue& vp, JS_ErrorString& s Error)
1901 { 1901 {
1902 ASSERT(m_pDocument != NULL); 1902 ASSERT(m_pDocument != NULL);
1903 1903
1904 if (vp.IsSetting()) 1904 if (vp.IsSetting())
1905 { 1905 {
1906 if (!m_bCanSet) return FALSE; 1906 if (!m_bCanSet) return FALSE;
1907 1907
1908 int iWidth; 1908 int iWidth;
1909 vp >> iWidth; 1909 vp >> iWidth;
1910 1910
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
1988 { 1988 {
1989 pWidget->SetBorderWidth(number); 1989 pWidget->SetBorderWidth(number);
1990 UpdateFormControl(pDocument, pFo rmControl, TRUE, TRUE, TRUE); 1990 UpdateFormControl(pDocument, pFo rmControl, TRUE, TRUE, TRUE);
1991 } 1991 }
1992 } 1992 }
1993 } 1993 }
1994 } 1994 }
1995 } 1995 }
1996 } 1996 }
1997 1997
1998 FX_BOOL Field::multiline(OBJ_PROP_PARAMS) 1998 FX_BOOL Field::multiline(IFXJS_Context* cc, CJS_PropValue& vp, JS_ErrorString& s Error)
1999 { 1999 {
2000 ASSERT(m_pDocument != NULL); 2000 ASSERT(m_pDocument != NULL);
2001 2001
2002 if (vp.IsSetting()) 2002 if (vp.IsSetting())
2003 { 2003 {
2004 if (!m_bCanSet) return FALSE; 2004 if (!m_bCanSet) return FALSE;
2005 2005
2006 bool bVP; 2006 bool bVP;
2007 vp >> bVP; 2007 vp >> bVP;
2008 2008
(...skipping 25 matching lines...) Expand all
2034 } 2034 }
2035 2035
2036 return TRUE; 2036 return TRUE;
2037 } 2037 }
2038 2038
2039 void Field::SetMultiline(CPDFSDK_Document* pDocument, const CFX_WideString& swFi eldName, int nControlIndex, bool b) 2039 void Field::SetMultiline(CPDFSDK_Document* pDocument, const CFX_WideString& swFi eldName, int nControlIndex, bool b)
2040 { 2040 {
2041 //Not supported. 2041 //Not supported.
2042 } 2042 }
2043 2043
2044 FX_BOOL Field::multipleSelection(OBJ_PROP_PARAMS) 2044 FX_BOOL Field::multipleSelection(IFXJS_Context* cc, CJS_PropValue& vp, JS_ErrorS tring& sError)
2045 { 2045 {
2046 ASSERT(m_pDocument != NULL); 2046 ASSERT(m_pDocument != NULL);
2047 2047
2048 if (vp.IsSetting()) 2048 if (vp.IsSetting())
2049 { 2049 {
2050 if (!m_bCanSet) return FALSE; 2050 if (!m_bCanSet) return FALSE;
2051 2051
2052 bool bVP; 2052 bool bVP;
2053 vp >> bVP; 2053 vp >> bVP;
2054 2054
(...skipping 25 matching lines...) Expand all
2080 } 2080 }
2081 2081
2082 return TRUE; 2082 return TRUE;
2083 } 2083 }
2084 2084
2085 void Field::SetMultipleSelection(CPDFSDK_Document* pDocument, const CFX_WideStri ng& swFieldName, int nControlIndex, bool b) 2085 void Field::SetMultipleSelection(CPDFSDK_Document* pDocument, const CFX_WideStri ng& swFieldName, int nControlIndex, bool b)
2086 { 2086 {
2087 //Not supported. 2087 //Not supported.
2088 } 2088 }
2089 2089
2090 FX_BOOL Field::name(OBJ_PROP_PARAMS) 2090 FX_BOOL Field::name(IFXJS_Context* cc, CJS_PropValue& vp, JS_ErrorString& sError )
2091 { 2091 {
2092 if (!vp.IsGetting()) return FALSE; 2092 if (!vp.IsGetting()) return FALSE;
2093 2093
2094 CFX_PtrArray FieldArray; 2094 CFX_PtrArray FieldArray;
2095 GetFormFields(m_FieldName, FieldArray); 2095 GetFormFields(m_FieldName, FieldArray);
2096 if (FieldArray.GetSize() <= 0) return FALSE; 2096 if (FieldArray.GetSize() <= 0) return FALSE;
2097 2097
2098 vp << m_FieldName; 2098 vp << m_FieldName;
2099 2099
2100 return TRUE; 2100 return TRUE;
2101 } 2101 }
2102 2102
2103 FX_BOOL Field::numItems(OBJ_PROP_PARAMS) 2103 FX_BOOL Field::numItems(IFXJS_Context* cc, CJS_PropValue& vp, JS_ErrorString& sE rror)
2104 { 2104 {
2105 CFX_PtrArray FieldArray; 2105 CFX_PtrArray FieldArray;
2106 GetFormFields(m_FieldName, FieldArray); 2106 GetFormFields(m_FieldName, FieldArray);
2107 if (FieldArray.GetSize() <= 0) return FALSE; 2107 if (FieldArray.GetSize() <= 0) return FALSE;
2108 2108
2109 CPDF_FormField* pFormField = (CPDF_FormField*)FieldArray.ElementAt(0); 2109 CPDF_FormField* pFormField = (CPDF_FormField*)FieldArray.ElementAt(0);
2110 ASSERT(pFormField != NULL); 2110 ASSERT(pFormField != NULL);
2111 2111
2112 if (pFormField->GetFieldType() != FIELDTYPE_COMBOBOX && 2112 if (pFormField->GetFieldType() != FIELDTYPE_COMBOBOX &&
2113 pFormField->GetFieldType() != FIELDTYPE_LISTBOX) 2113 pFormField->GetFieldType() != FIELDTYPE_LISTBOX)
2114 return FALSE; 2114 return FALSE;
2115 2115
2116 if (!vp.IsGetting()) return FALSE; 2116 if (!vp.IsGetting()) return FALSE;
2117 2117
2118 vp << (FX_INT32)pFormField->CountOptions(); 2118 vp << (FX_INT32)pFormField->CountOptions();
2119 2119
2120 return TRUE; 2120 return TRUE;
2121 } 2121 }
2122 2122
2123 FX_BOOL Field::page(OBJ_PROP_PARAMS) 2123 FX_BOOL Field::page(IFXJS_Context* cc, CJS_PropValue& vp, JS_ErrorString& sError )
2124 { 2124 {
2125 if (!vp.IsGetting()) return FALSE; 2125 if (!vp.IsGetting()) return FALSE;
2126 2126
2127 CFX_PtrArray FieldArray; 2127 CFX_PtrArray FieldArray;
2128 GetFormFields(m_FieldName, FieldArray); 2128 GetFormFields(m_FieldName, FieldArray);
2129 if (FieldArray.GetSize() <= 0) return FALSE; 2129 if (FieldArray.GetSize() <= 0) return FALSE;
2130 2130
2131 CPDF_FormField* pFormField = (CPDF_FormField*)FieldArray.ElementAt(0); 2131 CPDF_FormField* pFormField = (CPDF_FormField*)FieldArray.ElementAt(0);
2132 if (!pFormField) return FALSE; 2132 if (!pFormField) return FALSE;
2133 2133
(...skipping 24 matching lines...) Expand all
2158 vp << PageArray; 2158 vp << PageArray;
2159 } 2159 }
2160 else 2160 else
2161 { 2161 {
2162 vp << (FX_INT32) -1; 2162 vp << (FX_INT32) -1;
2163 } 2163 }
2164 2164
2165 return TRUE; 2165 return TRUE;
2166 } 2166 }
2167 2167
2168 FX_BOOL Field::password(OBJ_PROP_PARAMS) 2168 FX_BOOL Field::password(IFXJS_Context* cc, CJS_PropValue& vp, JS_ErrorString& sE rror)
2169 { 2169 {
2170 ASSERT(m_pDocument != NULL); 2170 ASSERT(m_pDocument != NULL);
2171 2171
2172 if (vp.IsSetting()) 2172 if (vp.IsSetting())
2173 { 2173 {
2174 if (!m_bCanSet) return FALSE; 2174 if (!m_bCanSet) return FALSE;
2175 2175
2176 bool bVP; 2176 bool bVP;
2177 vp >> bVP; 2177 vp >> bVP;
2178 2178
(...skipping 25 matching lines...) Expand all
2204 } 2204 }
2205 2205
2206 return TRUE; 2206 return TRUE;
2207 } 2207 }
2208 2208
2209 void Field::SetPassword(CPDFSDK_Document* pDocument, const CFX_WideString& swFie ldName, int nControlIndex, bool b) 2209 void Field::SetPassword(CPDFSDK_Document* pDocument, const CFX_WideString& swFie ldName, int nControlIndex, bool b)
2210 { 2210 {
2211 //Not supported. 2211 //Not supported.
2212 } 2212 }
2213 2213
2214 FX_BOOL Field::print(OBJ_PROP_PARAMS) 2214 FX_BOOL Field::print(IFXJS_Context* cc, CJS_PropValue& vp, JS_ErrorString& sErro r)
2215 { 2215 {
2216 ASSERT(m_pDocument != NULL); 2216 ASSERT(m_pDocument != NULL);
2217 2217
2218 CPDFSDK_InterForm* pInterForm = (CPDFSDK_InterForm*)m_pDocument->GetInte rForm(); 2218 CPDFSDK_InterForm* pInterForm = (CPDFSDK_InterForm*)m_pDocument->GetInte rForm();
2219 ASSERT(pInterForm != NULL); 2219 ASSERT(pInterForm != NULL);
2220 2220
2221 CFX_PtrArray FieldArray; 2221 CFX_PtrArray FieldArray;
2222 GetFormFields(m_FieldName, FieldArray); 2222 GetFormFields(m_FieldName, FieldArray);
2223 if (FieldArray.GetSize() <= 0) return FALSE; 2223 if (FieldArray.GetSize() <= 0) return FALSE;
2224 2224
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
2291 2291
2292 if (pWidget->GetFlags() & ANNOTFLAG_PRINT) 2292 if (pWidget->GetFlags() & ANNOTFLAG_PRINT)
2293 vp << true; 2293 vp << true;
2294 else 2294 else
2295 vp << false; 2295 vp << false;
2296 } 2296 }
2297 2297
2298 return TRUE; 2298 return TRUE;
2299 } 2299 }
2300 2300
2301 FX_BOOL Field::radiosInUnison(OBJ_PROP_PARAMS) 2301 FX_BOOL Field::radiosInUnison(IFXJS_Context* cc, CJS_PropValue& vp, JS_ErrorStri ng& sError)
2302 { 2302 {
2303 ASSERT(m_pDocument != NULL); 2303 ASSERT(m_pDocument != NULL);
2304 2304
2305 CFX_PtrArray FieldArray; 2305 CFX_PtrArray FieldArray;
2306 GetFormFields(m_FieldName,FieldArray); 2306 GetFormFields(m_FieldName,FieldArray);
2307 if (FieldArray.GetSize() <= 0) return FALSE; 2307 if (FieldArray.GetSize() <= 0) return FALSE;
2308 2308
2309 if (vp.IsSetting()) 2309 if (vp.IsSetting())
2310 { 2310 {
2311 if (!m_bCanSet) return FALSE; 2311 if (!m_bCanSet) return FALSE;
(...skipping 12 matching lines...) Expand all
2324 2324
2325 if (pFormField->GetFieldFlags() & FIELDFLAG_RADIOSINUNISON) 2325 if (pFormField->GetFieldFlags() & FIELDFLAG_RADIOSINUNISON)
2326 vp << true; 2326 vp << true;
2327 else 2327 else
2328 vp << false; 2328 vp << false;
2329 } 2329 }
2330 2330
2331 return TRUE; 2331 return TRUE;
2332 } 2332 }
2333 2333
2334 FX_BOOL Field::readonly(OBJ_PROP_PARAMS) 2334 FX_BOOL Field::readonly(IFXJS_Context* cc, CJS_PropValue& vp, JS_ErrorString& sE rror)
2335 { 2335 {
2336 ASSERT(m_pDocument != NULL); 2336 ASSERT(m_pDocument != NULL);
2337 2337
2338 CFX_PtrArray FieldArray; 2338 CFX_PtrArray FieldArray;
2339 GetFormFields(m_FieldName,FieldArray); 2339 GetFormFields(m_FieldName,FieldArray);
2340 if (FieldArray.GetSize() <= 0) return FALSE; 2340 if (FieldArray.GetSize() <= 0) return FALSE;
2341 2341
2342 if (vp.IsSetting()) 2342 if (vp.IsSetting())
2343 { 2343 {
2344 if (!m_bCanSet) return FALSE; 2344 if (!m_bCanSet) return FALSE;
2345 2345
2346 bool bVP; 2346 bool bVP;
2347 vp >> bVP; 2347 vp >> bVP;
2348 2348
2349 } 2349 }
2350 else 2350 else
2351 { 2351 {
2352 CPDF_FormField* pFormField = (CPDF_FormField*)FieldArray.Element At(0); 2352 CPDF_FormField* pFormField = (CPDF_FormField*)FieldArray.Element At(0);
2353 ASSERT(pFormField != NULL); 2353 ASSERT(pFormField != NULL);
2354 2354
2355 if (pFormField->GetFieldFlags() & FIELDFLAG_READONLY) 2355 if (pFormField->GetFieldFlags() & FIELDFLAG_READONLY)
2356 vp << true; 2356 vp << true;
2357 else 2357 else
2358 vp << false; 2358 vp << false;
2359 } 2359 }
2360 2360
2361 return TRUE; 2361 return TRUE;
2362 } 2362 }
2363 2363
2364 FX_BOOL Field::rect(OBJ_PROP_PARAMS) 2364 FX_BOOL Field::rect(IFXJS_Context* cc, CJS_PropValue& vp, JS_ErrorString& sError )
2365 { 2365 {
2366 ASSERT(m_pDocument != NULL); 2366 ASSERT(m_pDocument != NULL);
2367 2367
2368 if (vp.IsSetting()) 2368 if (vp.IsSetting())
2369 { 2369 {
2370 if (!m_bCanSet) return FALSE; 2370 if (!m_bCanSet) return FALSE;
2371 if (!vp.IsArrayObject())return FALSE; 2371 if (!vp.IsArrayObject())return FALSE;
2372 2372
2373 CJS_Array rcArray(m_isolate); 2373 CJS_Array rcArray(m_isolate);
2374 vp >> rcArray; 2374 vp >> rcArray;
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
2509 pWidget->SetRect(crRect) ; 2509 pWidget->SetRect(crRect) ;
2510 UpdateFormControl(pDocum ent, pFormControl, TRUE, TRUE, TRUE); 2510 UpdateFormControl(pDocum ent, pFormControl, TRUE, TRUE, TRUE);
2511 } 2511 }
2512 } 2512 }
2513 } 2513 }
2514 } 2514 }
2515 } 2515 }
2516 } 2516 }
2517 } 2517 }
2518 2518
2519 FX_BOOL Field::required(OBJ_PROP_PARAMS) 2519 FX_BOOL Field::required(IFXJS_Context* cc, CJS_PropValue& vp, JS_ErrorString& sE rror)
2520 { 2520 {
2521 ASSERT(m_pDocument != NULL); 2521 ASSERT(m_pDocument != NULL);
2522 2522
2523 CFX_PtrArray FieldArray; 2523 CFX_PtrArray FieldArray;
2524 GetFormFields(m_FieldName,FieldArray); 2524 GetFormFields(m_FieldName,FieldArray);
2525 if (FieldArray.GetSize() <= 0) return FALSE; 2525 if (FieldArray.GetSize() <= 0) return FALSE;
2526 2526
2527 if (vp.IsSetting()) 2527 if (vp.IsSetting())
2528 { 2528 {
2529 if (!m_bCanSet) return FALSE; 2529 if (!m_bCanSet) return FALSE;
(...skipping 13 matching lines...) Expand all
2543 2543
2544 if (pFormField->GetFieldFlags() & FIELDFLAG_REQUIRED) 2544 if (pFormField->GetFieldFlags() & FIELDFLAG_REQUIRED)
2545 vp << true; 2545 vp << true;
2546 else 2546 else
2547 vp << false; 2547 vp << false;
2548 } 2548 }
2549 2549
2550 return TRUE; 2550 return TRUE;
2551 } 2551 }
2552 2552
2553 FX_BOOL Field::richText(OBJ_PROP_PARAMS) 2553 FX_BOOL Field::richText(IFXJS_Context* cc, CJS_PropValue& vp, JS_ErrorString& sE rror)
2554 { 2554 {
2555 ASSERT(m_pDocument != NULL); 2555 ASSERT(m_pDocument != NULL);
2556 2556
2557 if (vp.IsSetting()) 2557 if (vp.IsSetting())
2558 { 2558 {
2559 if (!m_bCanSet) return FALSE; 2559 if (!m_bCanSet) return FALSE;
2560 2560
2561 bool bVP; 2561 bool bVP;
2562 vp >> bVP; 2562 vp >> bVP;
2563 2563
(...skipping 25 matching lines...) Expand all
2589 } 2589 }
2590 2590
2591 return TRUE; 2591 return TRUE;
2592 } 2592 }
2593 2593
2594 void Field::SetRichText(CPDFSDK_Document* pDocument, const CFX_WideString& swFie ldName, int nControlIndex, bool b) 2594 void Field::SetRichText(CPDFSDK_Document* pDocument, const CFX_WideString& swFie ldName, int nControlIndex, bool b)
2595 { 2595 {
2596 //Not supported. 2596 //Not supported.
2597 } 2597 }
2598 2598
2599 FX_BOOL Field::richValue(OBJ_PROP_PARAMS) 2599 FX_BOOL Field::richValue(IFXJS_Context* cc, CJS_PropValue& vp, JS_ErrorString& s Error)
2600 { 2600 {
2601 return TRUE; 2601 return TRUE;
2602 if (vp.IsSetting()) 2602 if (vp.IsSetting())
2603 { 2603 {
2604 if (!m_bCanSet) return FALSE; 2604 if (!m_bCanSet) return FALSE;
2605 ; 2605 ;
2606 } 2606 }
2607 else 2607 else
2608 { 2608 {
2609 ; 2609 ;
2610 } 2610 }
2611 return TRUE; 2611 return TRUE;
2612 } 2612 }
2613 2613
2614 void Field::SetRichValue(CPDFSDK_Document* pDocument, const CFX_WideString& swFi eldName, int nControlIndex) 2614 void Field::SetRichValue(CPDFSDK_Document* pDocument, const CFX_WideString& swFi eldName, int nControlIndex)
2615 { 2615 {
2616 //Not supported. 2616 //Not supported.
2617 } 2617 }
2618 2618
2619 FX_BOOL Field::rotation(OBJ_PROP_PARAMS) 2619 FX_BOOL Field::rotation(IFXJS_Context* cc, CJS_PropValue& vp, JS_ErrorString& sE rror)
2620 { 2620 {
2621 ASSERT(m_pDocument != NULL); 2621 ASSERT(m_pDocument != NULL);
2622 2622
2623 if (vp.IsSetting()) 2623 if (vp.IsSetting())
2624 { 2624 {
2625 if (!m_bCanSet) return FALSE; 2625 if (!m_bCanSet) return FALSE;
2626 2626
2627 int nVP; 2627 int nVP;
2628 vp >> nVP; 2628 vp >> nVP;
2629 2629
(...skipping 22 matching lines...) Expand all
2652 } 2652 }
2653 2653
2654 return TRUE; 2654 return TRUE;
2655 } 2655 }
2656 2656
2657 void Field::SetRotation(CPDFSDK_Document* pDocument, const CFX_WideString& swFie ldName, int nControlIndex, int number) 2657 void Field::SetRotation(CPDFSDK_Document* pDocument, const CFX_WideString& swFie ldName, int nControlIndex, int number)
2658 { 2658 {
2659 //Not supported. 2659 //Not supported.
2660 } 2660 }
2661 2661
2662 FX_BOOL Field::strokeColor(OBJ_PROP_PARAMS) 2662 FX_BOOL Field::strokeColor(IFXJS_Context* cc, CJS_PropValue& vp, JS_ErrorString& sError)
2663 { 2663 {
2664 ASSERT(m_pDocument != NULL); 2664 ASSERT(m_pDocument != NULL);
2665 2665
2666 if (vp.IsSetting()) 2666 if (vp.IsSetting())
2667 { 2667 {
2668 if (!m_bCanSet) return FALSE; 2668 if (!m_bCanSet) return FALSE;
2669 2669
2670 if (!vp.IsArrayObject())return FALSE; 2670 if (!vp.IsArrayObject())return FALSE;
2671 2671
2672 CJS_Array crArray(m_isolate); 2672 CJS_Array crArray(m_isolate);
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
2731 } 2731 }
2732 2732
2733 return TRUE; 2733 return TRUE;
2734 } 2734 }
2735 2735
2736 void Field::SetStrokeColor(CPDFSDK_Document* pDocument, const CFX_WideString& sw FieldName, int nControlIndex, const CPWL_Color& color) 2736 void Field::SetStrokeColor(CPDFSDK_Document* pDocument, const CFX_WideString& sw FieldName, int nControlIndex, const CPWL_Color& color)
2737 { 2737 {
2738 //Not supported. 2738 //Not supported.
2739 } 2739 }
2740 2740
2741 FX_BOOL Field::style(OBJ_PROP_PARAMS) 2741 FX_BOOL Field::style(IFXJS_Context* cc, CJS_PropValue& vp, JS_ErrorString& sErro r)
2742 { 2742 {
2743 ASSERT(m_pDocument != NULL); 2743 ASSERT(m_pDocument != NULL);
2744 2744
2745 if (vp.IsSetting()) 2745 if (vp.IsSetting())
2746 { 2746 {
2747 if (!m_bCanSet) return FALSE; 2747 if (!m_bCanSet) return FALSE;
2748 2748
2749 CFX_ByteString csBCaption; 2749 CFX_ByteString csBCaption;
2750 vp >> csBCaption; 2750 vp >> csBCaption;
2751 2751
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
2803 2803
2804 return TRUE; 2804 return TRUE;
2805 } 2805 }
2806 2806
2807 void Field::SetStyle(CPDFSDK_Document* pDocument, const CFX_WideString& swFieldN ame, int nControlIndex, 2807 void Field::SetStyle(CPDFSDK_Document* pDocument, const CFX_WideString& swFieldN ame, int nControlIndex,
2808 const CFX_ByteString& string) 2808 const CFX_ByteString& string)
2809 { 2809 {
2810 //Not supported. 2810 //Not supported.
2811 } 2811 }
2812 2812
2813 FX_BOOL Field::submitName(OBJ_PROP_PARAMS) 2813 FX_BOOL Field::submitName(IFXJS_Context* cc, CJS_PropValue& vp, JS_ErrorString& sError)
2814 { 2814 {
2815 return TRUE; 2815 return TRUE;
2816 } 2816 }
2817 2817
2818 FX_BOOL Field::textColor(OBJ_PROP_PARAMS) 2818 FX_BOOL Field::textColor(IFXJS_Context* cc, CJS_PropValue& vp, JS_ErrorString& s Error)
2819 { 2819 {
2820 ASSERT(m_pDocument != NULL); 2820 ASSERT(m_pDocument != NULL);
2821 2821
2822 if (vp.IsSetting()) 2822 if (vp.IsSetting())
2823 { 2823 {
2824 if (!m_bCanSet) return FALSE; 2824 if (!m_bCanSet) return FALSE;
2825 2825
2826 CJS_Array crArray(m_isolate); 2826 CJS_Array crArray(m_isolate);
2827 if (!vp.IsArrayObject())return FALSE; 2827 if (!vp.IsArrayObject())return FALSE;
2828 vp >> crArray; 2828 vp >> crArray;
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
2871 } 2871 }
2872 2872
2873 return TRUE; 2873 return TRUE;
2874 } 2874 }
2875 2875
2876 void Field::SetTextColor(CPDFSDK_Document* pDocument, const CFX_WideString& swFi eldName, int nControlIndex, const CPWL_Color& color) 2876 void Field::SetTextColor(CPDFSDK_Document* pDocument, const CFX_WideString& swFi eldName, int nControlIndex, const CPWL_Color& color)
2877 { 2877 {
2878 //Not supported. 2878 //Not supported.
2879 } 2879 }
2880 2880
2881 FX_BOOL Field::textFont(OBJ_PROP_PARAMS) 2881 FX_BOOL Field::textFont(IFXJS_Context* cc, CJS_PropValue& vp, JS_ErrorString& sE rror)
2882 { 2882 {
2883 ASSERT(m_pDocument != NULL); 2883 ASSERT(m_pDocument != NULL);
2884 2884
2885 if (vp.IsSetting()) 2885 if (vp.IsSetting())
2886 { 2886 {
2887 if (!m_bCanSet) return FALSE; 2887 if (!m_bCanSet) return FALSE;
2888 2888
2889 CFX_ByteString csFontName; 2889 CFX_ByteString csFontName;
2890 vp >> csFontName; 2890 vp >> csFontName;
2891 if (csFontName.IsEmpty()) return FALSE; 2891 if (csFontName.IsEmpty()) return FALSE;
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
2928 } 2928 }
2929 2929
2930 return TRUE; 2930 return TRUE;
2931 } 2931 }
2932 2932
2933 void Field::SetTextFont(CPDFSDK_Document* pDocument, const CFX_WideString& swFie ldName, int nControlIndex, const CFX_ByteString& string) 2933 void Field::SetTextFont(CPDFSDK_Document* pDocument, const CFX_WideString& swFie ldName, int nControlIndex, const CFX_ByteString& string)
2934 { 2934 {
2935 //Not supported. 2935 //Not supported.
2936 } 2936 }
2937 2937
2938 FX_BOOL Field::textSize(OBJ_PROP_PARAMS) 2938 FX_BOOL Field::textSize(IFXJS_Context* cc, CJS_PropValue& vp, JS_ErrorString& sE rror)
2939 { 2939 {
2940 ASSERT(m_pDocument != NULL); 2940 ASSERT(m_pDocument != NULL);
2941 2941
2942 if (vp.IsSetting()) 2942 if (vp.IsSetting())
2943 { 2943 {
2944 if (!m_bCanSet) return FALSE; 2944 if (!m_bCanSet) return FALSE;
2945 2945
2946 int nVP; 2946 int nVP;
2947 vp >> nVP; 2947 vp >> nVP;
2948 2948
(...skipping 28 matching lines...) Expand all
2977 } 2977 }
2978 2978
2979 return TRUE; 2979 return TRUE;
2980 } 2980 }
2981 2981
2982 void Field::SetTextSize(CPDFSDK_Document* pDocument, const CFX_WideString& swFie ldName, int nControlIndex, int number) 2982 void Field::SetTextSize(CPDFSDK_Document* pDocument, const CFX_WideString& swFie ldName, int nControlIndex, int number)
2983 { 2983 {
2984 //Not supported. 2984 //Not supported.
2985 } 2985 }
2986 2986
2987 FX_BOOL Field::type(OBJ_PROP_PARAMS) 2987 FX_BOOL Field::type(IFXJS_Context* cc, CJS_PropValue& vp, JS_ErrorString& sError )
2988 { 2988 {
2989 ASSERT(m_pDocument != NULL); 2989 ASSERT(m_pDocument != NULL);
2990 2990
2991 if (!vp.IsGetting()) return FALSE; 2991 if (!vp.IsGetting()) return FALSE;
2992 2992
2993 CFX_PtrArray FieldArray; 2993 CFX_PtrArray FieldArray;
2994 GetFormFields(m_FieldName,FieldArray); 2994 GetFormFields(m_FieldName,FieldArray);
2995 if (FieldArray.GetSize() <= 0) return FALSE; 2995 if (FieldArray.GetSize() <= 0) return FALSE;
2996 2996
2997 CPDF_FormField* pFormField = (CPDF_FormField*)FieldArray.ElementAt(0); 2997 CPDF_FormField* pFormField = (CPDF_FormField*)FieldArray.ElementAt(0);
(...skipping 26 matching lines...) Expand all
3024 vp << L"signature"; 3024 vp << L"signature";
3025 break; 3025 break;
3026 default : 3026 default :
3027 vp << L"unknown"; 3027 vp << L"unknown";
3028 break; 3028 break;
3029 } 3029 }
3030 3030
3031 return TRUE; 3031 return TRUE;
3032 } 3032 }
3033 3033
3034 FX_BOOL Field::userName(OBJ_PROP_PARAMS) 3034 FX_BOOL Field::userName(IFXJS_Context* cc, CJS_PropValue& vp, JS_ErrorString& sE rror)
3035 { 3035 {
3036 ASSERT(m_pDocument != NULL); 3036 ASSERT(m_pDocument != NULL);
3037 3037
3038 if (vp.IsSetting()) 3038 if (vp.IsSetting())
3039 { 3039 {
3040 if (!m_bCanSet) return FALSE; 3040 if (!m_bCanSet) return FALSE;
3041 3041
3042 CFX_WideString swName; 3042 CFX_WideString swName;
3043 vp >> swName; 3043 vp >> swName;
3044 3044
(...skipping 19 matching lines...) Expand all
3064 } 3064 }
3065 3065
3066 return TRUE; 3066 return TRUE;
3067 } 3067 }
3068 3068
3069 void Field::SetUserName(CPDFSDK_Document* pDocument, const CFX_WideString& swFie ldName, int nControlIndex, const CFX_WideString& string) 3069 void Field::SetUserName(CPDFSDK_Document* pDocument, const CFX_WideString& swFie ldName, int nControlIndex, const CFX_WideString& string)
3070 { 3070 {
3071 //Not supported. 3071 //Not supported.
3072 } 3072 }
3073 3073
3074 FX_BOOL Field::value(OBJ_PROP_PARAMS) 3074 FX_BOOL Field::value(IFXJS_Context* cc, CJS_PropValue& vp, JS_ErrorString& sErro r)
3075 { 3075 {
3076 ASSERT(m_pDocument != NULL); 3076 ASSERT(m_pDocument != NULL);
3077 3077
3078 if (vp.IsSetting()) 3078 if (vp.IsSetting())
3079 { 3079 {
3080 if (!m_bCanSet) return FALSE; 3080 if (!m_bCanSet) return FALSE;
3081 3081
3082 CJS_WideStringArray strArray; 3082 CJS_WideStringArray strArray;
3083 3083
3084 if (vp.IsArrayObject()) 3084 if (vp.IsArrayObject())
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
3284 UpdateFormField(pDocument, pFormField, T RUE, FALSE, TRUE); 3284 UpdateFormField(pDocument, pFormField, T RUE, FALSE, TRUE);
3285 } 3285 }
3286 } 3286 }
3287 break; 3287 break;
3288 default: 3288 default:
3289 break; 3289 break;
3290 } 3290 }
3291 } 3291 }
3292 } 3292 }
3293 3293
3294 FX_BOOL Field::valueAsString(OBJ_PROP_PARAMS) 3294 FX_BOOL Field::valueAsString(IFXJS_Context* cc, CJS_PropValue& vp, JS_ErrorStrin g& sError)
3295 { 3295 {
3296 ASSERT(m_pDocument != NULL); 3296 ASSERT(m_pDocument != NULL);
3297 3297
3298 if (!vp.IsGetting()) return FALSE; 3298 if (!vp.IsGetting()) return FALSE;
3299 3299
3300 CFX_PtrArray FieldArray; 3300 CFX_PtrArray FieldArray;
3301 GetFormFields(m_FieldName,FieldArray); 3301 GetFormFields(m_FieldName,FieldArray);
3302 if (FieldArray.GetSize() <= 0) return FALSE; 3302 if (FieldArray.GetSize() <= 0) return FALSE;
3303 3303
3304 CPDF_FormField* pFormField = (CPDF_FormField*)FieldArray.ElementAt(0); 3304 CPDF_FormField* pFormField = (CPDF_FormField*)FieldArray.ElementAt(0);
(...skipping 29 matching lines...) Expand all
3334 vp << L""; 3334 vp << L"";
3335 } 3335 }
3336 else 3336 else
3337 vp << pFormField->GetValue().c_str(); 3337 vp << pFormField->GetValue().c_str();
3338 3338
3339 return TRUE; 3339 return TRUE;
3340 } 3340 }
3341 3341
3342 /* --------------------------------- methods --------------------------------- * / 3342 /* --------------------------------- methods --------------------------------- * /
3343 3343
3344 FX_BOOL Field::browseForFileToSubmit(OBJ_METHOD_PARAMS) 3344 FX_BOOL Field::browseForFileToSubmit(IFXJS_Context* cc, const CJS_Parameters& pa rams, CJS_Value& vRet, JS_ErrorString& sError)
3345 { 3345 {
3346 ASSERT(m_pDocument != NULL); 3346 ASSERT(m_pDocument != NULL);
3347 3347
3348 CFX_PtrArray FieldArray; 3348 CFX_PtrArray FieldArray;
3349 GetFormFields(m_FieldName, FieldArray); 3349 GetFormFields(m_FieldName, FieldArray);
3350 if (FieldArray.GetSize() <= 0) return FALSE; 3350 if (FieldArray.GetSize() <= 0) return FALSE;
3351 3351
3352 CPDF_FormField* pFormField = (CPDF_FormField*)FieldArray.ElementAt(0); 3352 CPDF_FormField* pFormField = (CPDF_FormField*)FieldArray.ElementAt(0);
3353 ASSERT(pFormField != NULL); 3353 ASSERT(pFormField != NULL);
3354 3354
(...skipping 10 matching lines...) Expand all
3365 UpdateFormField(m_pDocument, pFormField, TRUE, TRUE, TRU E); 3365 UpdateFormField(m_pDocument, pFormField, TRUE, TRUE, TRU E);
3366 } 3366 }
3367 } 3367 }
3368 else 3368 else
3369 return FALSE; 3369 return FALSE;
3370 3370
3371 return TRUE; 3371 return TRUE;
3372 } 3372 }
3373 3373
3374 3374
3375 FX_BOOL Field::buttonGetCaption(OBJ_METHOD_PARAMS) 3375 FX_BOOL Field::buttonGetCaption(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, JS_ErrorString& sError)
3376 { 3376 {
3377 ASSERT(m_pDocument != NULL); 3377 ASSERT(m_pDocument != NULL);
3378 3378
3379 int nface = 0; 3379 int nface = 0;
3380 int iSize = params.size(); 3380 int iSize = params.size();
3381 if ( iSize >= 1) 3381 if ( iSize >= 1)
3382 nface = (FX_INT32) params[0]; 3382 nface = (FX_INT32) params[0];
3383 3383
3384 CFX_PtrArray FieldArray; 3384 CFX_PtrArray FieldArray;
3385 GetFormFields(m_FieldName,FieldArray); 3385 GetFormFields(m_FieldName,FieldArray);
(...skipping 15 matching lines...) Expand all
3401 else if (nface == 2) 3401 else if (nface == 2)
3402 vRet = pFormControl->GetRolloverCaption(); 3402 vRet = pFormControl->GetRolloverCaption();
3403 else 3403 else
3404 return FALSE; 3404 return FALSE;
3405 3405
3406 return TRUE; 3406 return TRUE;
3407 } 3407 }
3408 3408
3409 //#pragma warning(disable: 4800) 3409 //#pragma warning(disable: 4800)
3410 3410
3411 FX_BOOL Field::buttonGetIcon(OBJ_METHOD_PARAMS) 3411 FX_BOOL Field::buttonGetIcon(IFXJS_Context* cc, const CJS_Parameters& params, CJ S_Value& vRet, JS_ErrorString& sError)
3412 { 3412 {
3413 ASSERT(m_pDocument != NULL); 3413 ASSERT(m_pDocument != NULL);
3414 3414
3415 int nface = 0; 3415 int nface = 0;
3416 int iSize = params.size(); 3416 int iSize = params.size();
3417 if ( iSize >= 1) 3417 if ( iSize >= 1)
3418 nface = (FX_INT32) params[0]; 3418 nface = (FX_INT32) params[0];
3419 3419
3420 CFX_PtrArray FieldArray; 3420 CFX_PtrArray FieldArray;
3421 GetFormFields(m_FieldName,FieldArray); 3421 GetFormFields(m_FieldName,FieldArray);
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
3456 return FALSE; 3456 return FALSE;
3457 3457
3458 pIcon->SetStream(pIconStream); 3458 pIcon->SetStream(pIconStream);
3459 vRet = pJS_Icon; 3459 vRet = pJS_Icon;
3460 3460
3461 return TRUE; 3461 return TRUE;
3462 } 3462 }
3463 3463
3464 //#pragma warning(default: 4800) 3464 //#pragma warning(default: 4800)
3465 3465
3466 FX_BOOL Field::buttonImportIcon(OBJ_METHOD_PARAMS) 3466 FX_BOOL Field::buttonImportIcon(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, JS_ErrorString& sError)
3467 { 3467 {
3468 #if 0 3468 #if 0
3469 ASSERT(m_pDocument != NULL); 3469 ASSERT(m_pDocument != NULL);
3470 3470
3471 CFX_PtrArray FieldArray; 3471 CFX_PtrArray FieldArray;
3472 GetFormFields(m_FieldName,FieldArray); 3472 GetFormFields(m_FieldName,FieldArray);
3473 if (FieldArray.GetSize() <= 0) return FALSE; 3473 if (FieldArray.GetSize() <= 0) return FALSE;
3474 3474
3475 CPDF_FormField* pFormField = (CPDF_FormField*)FieldArray.ElementAt(0); 3475 CPDF_FormField* pFormField = (CPDF_FormField*)FieldArray.ElementAt(0);
3476 if (!pFormField)return FALSE; 3476 if (!pFormField)return FALSE;
(...skipping 22 matching lines...) Expand all
3499 if (!pFormControl)return FALSE; 3499 if (!pFormControl)return FALSE;
3500 3500
3501 pFormControl->SetNormalIcon(pStream); 3501 pFormControl->SetNormalIcon(pStream);
3502 UpdateFormControl(m_pDocument, pFormControl, TRUE, TRUE, TRUE); 3502 UpdateFormControl(m_pDocument, pFormControl, TRUE, TRUE, TRUE);
3503 3503
3504 vRet = 0; 3504 vRet = 0;
3505 #endif // 0 3505 #endif // 0
3506 return TRUE; 3506 return TRUE;
3507 } 3507 }
3508 3508
3509 FX_BOOL Field::buttonSetCaption(OBJ_METHOD_PARAMS) 3509 FX_BOOL Field::buttonSetCaption(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, JS_ErrorString& sError)
3510 { 3510 {
3511 return FALSE; 3511 return FALSE;
3512 } 3512 }
3513 3513
3514 FX_BOOL Field::buttonSetIcon(OBJ_METHOD_PARAMS) 3514 FX_BOOL Field::buttonSetIcon(IFXJS_Context* cc, const CJS_Parameters& params, CJ S_Value& vRet, JS_ErrorString& sError)
3515 { 3515 {
3516 return FALSE; 3516 return FALSE;
3517 } 3517 }
3518 3518
3519 FX_BOOL Field::checkThisBox(OBJ_METHOD_PARAMS) 3519 FX_BOOL Field::checkThisBox(IFXJS_Context* cc, const CJS_Parameters& params, CJS _Value& vRet, JS_ErrorString& sError)
3520 { 3520 {
3521 ASSERT(m_pDocument != NULL); 3521 ASSERT(m_pDocument != NULL);
3522 3522
3523 if (!m_bCanSet) return FALSE; 3523 if (!m_bCanSet) return FALSE;
3524 3524
3525 int iSize = params.size(); 3525 int iSize = params.size();
3526 int nWidget = -1; 3526 int nWidget = -1;
3527 if ( iSize >= 1) 3527 if ( iSize >= 1)
3528 nWidget= (FX_INT32) params[0]; 3528 nWidget= (FX_INT32) params[0];
3529 else 3529 else
(...skipping 17 matching lines...) Expand all
3547 if (pFormField->GetFieldType() == FIELDTYPE_RADIOBUTTON) 3547 if (pFormField->GetFieldType() == FIELDTYPE_RADIOBUTTON)
3548 pFormField->CheckControl(nWidget, bCheckit, TRUE); 3548 pFormField->CheckControl(nWidget, bCheckit, TRUE);
3549 else 3549 else
3550 pFormField->CheckControl(nWidget, bCheckit, TRUE); 3550 pFormField->CheckControl(nWidget, bCheckit, TRUE);
3551 3551
3552 UpdateFormField(m_pDocument, pFormField, TRUE, TRUE, TRUE); 3552 UpdateFormField(m_pDocument, pFormField, TRUE, TRUE, TRUE);
3553 3553
3554 return TRUE; 3554 return TRUE;
3555 } 3555 }
3556 3556
3557 FX_BOOL Field::clearItems(OBJ_METHOD_PARAMS) 3557 FX_BOOL Field::clearItems(IFXJS_Context* cc, const CJS_Parameters& params, CJS_V alue& vRet, JS_ErrorString& sError)
3558 { 3558 {
3559 return TRUE; 3559 return TRUE;
3560 } 3560 }
3561 3561
3562 FX_BOOL Field::defaultIsChecked(OBJ_METHOD_PARAMS) 3562 FX_BOOL Field::defaultIsChecked(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, JS_ErrorString& sError)
3563 { 3563 {
3564 ASSERT(m_pDocument != NULL); 3564 ASSERT(m_pDocument != NULL);
3565 3565
3566 if (!m_bCanSet) return FALSE; 3566 if (!m_bCanSet) return FALSE;
3567 3567
3568 int iSize = params.size(); 3568 int iSize = params.size();
3569 int nWidget = -1; 3569 int nWidget = -1;
3570 if ( iSize >= 1) 3570 if ( iSize >= 1)
3571 nWidget= (FX_INT32) params[0]; 3571 nWidget= (FX_INT32) params[0];
3572 else 3572 else
(...skipping 19 matching lines...) Expand all
3592 { 3592 {
3593 3593
3594 vRet = TRUE; 3594 vRet = TRUE;
3595 } 3595 }
3596 else 3596 else
3597 vRet = FALSE; 3597 vRet = FALSE;
3598 3598
3599 return TRUE; 3599 return TRUE;
3600 } 3600 }
3601 3601
3602 FX_BOOL Field::deleteItemAt(OBJ_METHOD_PARAMS) 3602 FX_BOOL Field::deleteItemAt(IFXJS_Context* cc, const CJS_Parameters& params, CJS _Value& vRet, JS_ErrorString& sError)
3603 { 3603 {
3604 return TRUE; 3604 return TRUE;
3605 } 3605 }
3606 3606
3607 int JS_COMPARESTRING(CFX_WideString* ps1, CFX_WideString* ps2) 3607 int JS_COMPARESTRING(CFX_WideString* ps1, CFX_WideString* ps2)
3608 { 3608 {
3609 ASSERT(ps1 != NULL); 3609 ASSERT(ps1 != NULL);
3610 ASSERT(ps2 != NULL); 3610 ASSERT(ps2 != NULL);
3611 3611
3612 return ps1->Compare(*ps2); 3612 return ps1->Compare(*ps2);
3613 } 3613 }
3614 3614
3615 3615
3616 FX_BOOL Field::getArray(OBJ_METHOD_PARAMS) 3616 FX_BOOL Field::getArray(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Val ue& vRet, JS_ErrorString& sError)
3617 { 3617 {
3618 ASSERT(m_pDocument != NULL); 3618 ASSERT(m_pDocument != NULL);
3619 3619
3620 CFX_PtrArray FieldArray; 3620 CFX_PtrArray FieldArray;
3621 GetFormFields(m_FieldName,FieldArray); 3621 GetFormFields(m_FieldName,FieldArray);
3622 if (FieldArray.GetSize() <= 0) return FALSE; 3622 if (FieldArray.GetSize() <= 0) return FALSE;
3623 3623
3624 CGW_ArrayTemplate<CFX_WideString*> swSort; 3624 CGW_ArrayTemplate<CFX_WideString*> swSort;
3625 3625
3626 for (int i=0,sz=FieldArray.GetSize(); i<sz; i++) 3626 for (int i=0,sz=FieldArray.GetSize(); i<sz; i++)
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
3659 FormFieldArray.SetElement(j, FormFieldValue); 3659 FormFieldArray.SetElement(j, FormFieldValue);
3660 3660
3661 delete pStr; 3661 delete pStr;
3662 } 3662 }
3663 3663
3664 vRet = FormFieldArray; 3664 vRet = FormFieldArray;
3665 swSort.RemoveAll(); 3665 swSort.RemoveAll();
3666 return TRUE; 3666 return TRUE;
3667 } 3667 }
3668 3668
3669 FX_BOOL Field::getItemAt(OBJ_METHOD_PARAMS) 3669 FX_BOOL Field::getItemAt(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Va lue& vRet, JS_ErrorString& sError)
3670 { 3670 {
3671 ASSERT(m_pDocument != NULL); 3671 ASSERT(m_pDocument != NULL);
3672 3672
3673 int nIdx = -1; 3673 int nIdx = -1;
3674 if (params.size() >=1) 3674 if (params.size() >=1)
3675 nIdx = (FX_INT32) params[0]; 3675 nIdx = (FX_INT32) params[0];
3676 FX_BOOL bExport = TRUE; 3676 FX_BOOL bExport = TRUE;
3677 int iSize = params.size(); 3677 int iSize = params.size();
3678 if ( iSize >= 2) 3678 if ( iSize >= 2)
3679 { 3679 {
(...skipping 22 matching lines...) Expand all
3702 } 3702 }
3703 else 3703 else
3704 vRet = pFormField->GetOptionLabel(nIdx); 3704 vRet = pFormField->GetOptionLabel(nIdx);
3705 } 3705 }
3706 else 3706 else
3707 return FALSE; 3707 return FALSE;
3708 3708
3709 return TRUE; 3709 return TRUE;
3710 } 3710 }
3711 3711
3712 FX_BOOL Field::getLock(OBJ_METHOD_PARAMS) 3712 FX_BOOL Field::getLock(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Valu e& vRet, JS_ErrorString& sError)
3713 { 3713 {
3714 return FALSE; 3714 return FALSE;
3715 } 3715 }
3716 3716
3717 FX_BOOL Field::insertItemAt(OBJ_METHOD_PARAMS) 3717 FX_BOOL Field::insertItemAt(IFXJS_Context* cc, const CJS_Parameters& params, CJS _Value& vRet, JS_ErrorString& sError)
3718 { 3718 {
3719 return TRUE; 3719 return TRUE;
3720 } 3720 }
3721 3721
3722 FX_BOOL Field::isBoxChecked(OBJ_METHOD_PARAMS) 3722 FX_BOOL Field::isBoxChecked(IFXJS_Context* cc, const CJS_Parameters& params, CJS _Value& vRet, JS_ErrorString& sError)
3723 { 3723 {
3724 ASSERT(m_pDocument != NULL); 3724 ASSERT(m_pDocument != NULL);
3725 3725
3726 int nIndex = -1; 3726 int nIndex = -1;
3727 if (params.size() >=1) 3727 if (params.size() >=1)
3728 nIndex = (FX_INT32) params[0]; 3728 nIndex = (FX_INT32) params[0];
3729 3729
3730 CFX_PtrArray FieldArray; 3730 CFX_PtrArray FieldArray;
3731 GetFormFields(m_FieldName,FieldArray); 3731 GetFormFields(m_FieldName,FieldArray);
3732 if (FieldArray.GetSize() <= 0) return FALSE; 3732 if (FieldArray.GetSize() <= 0) return FALSE;
(...skipping 14 matching lines...) Expand all
3747 vRet = TRUE; 3747 vRet = TRUE;
3748 else 3748 else
3749 vRet = FALSE; 3749 vRet = FALSE;
3750 } 3750 }
3751 else 3751 else
3752 vRet = FALSE; 3752 vRet = FALSE;
3753 3753
3754 return TRUE; 3754 return TRUE;
3755 } 3755 }
3756 3756
3757 FX_BOOL Field::isDefaultChecked(OBJ_METHOD_PARAMS) 3757 FX_BOOL Field::isDefaultChecked(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, JS_ErrorString& sError)
3758 { 3758 {
3759 ASSERT(m_pDocument != NULL); 3759 ASSERT(m_pDocument != NULL);
3760 3760
3761 int nIndex = -1; 3761 int nIndex = -1;
3762 if (params.size() >=1) 3762 if (params.size() >=1)
3763 nIndex = (FX_INT32) params[0]; 3763 nIndex = (FX_INT32) params[0];
3764 3764
3765 CFX_PtrArray FieldArray; 3765 CFX_PtrArray FieldArray;
3766 GetFormFields(m_FieldName,FieldArray); 3766 GetFormFields(m_FieldName,FieldArray);
3767 if (FieldArray.GetSize() <= 0) return FALSE; 3767 if (FieldArray.GetSize() <= 0) return FALSE;
(...skipping 13 matching lines...) Expand all
3781 vRet = TRUE; 3781 vRet = TRUE;
3782 else 3782 else
3783 vRet = FALSE; 3783 vRet = FALSE;
3784 } 3784 }
3785 else 3785 else
3786 vRet = FALSE; 3786 vRet = FALSE;
3787 3787
3788 return TRUE; 3788 return TRUE;
3789 } 3789 }
3790 3790
3791 FX_BOOL Field::setAction(OBJ_METHOD_PARAMS) 3791 FX_BOOL Field::setAction(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Va lue& vRet, JS_ErrorString& sError)
3792 { 3792 {
3793 return TRUE; 3793 return TRUE;
3794 } 3794 }
3795 3795
3796 FX_BOOL Field::setFocus(OBJ_METHOD_PARAMS) 3796 FX_BOOL Field::setFocus(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Val ue& vRet, JS_ErrorString& sError)
3797 { 3797 {
3798 ASSERT(m_pDocument != NULL); 3798 ASSERT(m_pDocument != NULL);
3799 3799
3800 CFX_PtrArray FieldArray; 3800 CFX_PtrArray FieldArray;
3801 GetFormFields(m_FieldName,FieldArray); 3801 GetFormFields(m_FieldName,FieldArray);
3802 if (FieldArray.GetSize() <= 0) return FALSE; 3802 if (FieldArray.GetSize() <= 0) return FALSE;
3803 3803
3804 CPDF_FormField* pFormField = (CPDF_FormField*)FieldArray.ElementAt(0); 3804 CPDF_FormField* pFormField = (CPDF_FormField*)FieldArray.ElementAt(0);
3805 ASSERT(pFormField != NULL); 3805 ASSERT(pFormField != NULL);
3806 3806
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
3840 } 3840 }
3841 3841
3842 if (pWidget) 3842 if (pWidget)
3843 { 3843 {
3844 m_pDocument->SetFocusAnnot(pWidget); 3844 m_pDocument->SetFocusAnnot(pWidget);
3845 } 3845 }
3846 3846
3847 return TRUE; 3847 return TRUE;
3848 } 3848 }
3849 3849
3850 FX_BOOL Field::setItems(OBJ_METHOD_PARAMS) 3850 FX_BOOL Field::setItems(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Val ue& vRet, JS_ErrorString& sError)
3851 { 3851 {
3852 return TRUE; 3852 return TRUE;
3853 } 3853 }
3854 3854
3855 FX_BOOL Field::setLock(OBJ_METHOD_PARAMS) 3855 FX_BOOL Field::setLock(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Valu e& vRet, JS_ErrorString& sError)
3856 { 3856 {
3857 return FALSE; 3857 return FALSE;
3858 } 3858 }
3859 3859
3860 FX_BOOL Field::signatureGetModifications(OBJ_METHOD_PARAMS) 3860 FX_BOOL Field::signatureGetModifications(IFXJS_Context* cc, const CJS_Parameters & params, CJS_Value& vRet, JS_ErrorString& sError)
3861 { 3861 {
3862 return FALSE; 3862 return FALSE;
3863 } 3863 }
3864 3864
3865 FX_BOOL Field::signatureGetSeedValue(OBJ_METHOD_PARAMS) 3865 FX_BOOL Field::signatureGetSeedValue(IFXJS_Context* cc, const CJS_Parameters& pa rams, CJS_Value& vRet, JS_ErrorString& sError)
3866 { 3866 {
3867 return FALSE; 3867 return FALSE;
3868 } 3868 }
3869 3869
3870 FX_BOOL Field::signatureInfo(OBJ_METHOD_PARAMS) 3870 FX_BOOL Field::signatureInfo(IFXJS_Context* cc, const CJS_Parameters& params, CJ S_Value& vRet, JS_ErrorString& sError)
3871 { 3871 {
3872 return FALSE; 3872 return FALSE;
3873 } 3873 }
3874 3874
3875 FX_BOOL Field::signatureSetSeedValue(OBJ_METHOD_PARAMS) 3875 FX_BOOL Field::signatureSetSeedValue(IFXJS_Context* cc, const CJS_Parameters& pa rams, CJS_Value& vRet, JS_ErrorString& sError)
3876 { 3876 {
3877 return FALSE; 3877 return FALSE;
3878 } 3878 }
3879 3879
3880 FX_BOOL Field::signatureSign(OBJ_METHOD_PARAMS) 3880 FX_BOOL Field::signatureSign(IFXJS_Context* cc, const CJS_Parameters& params, CJ S_Value& vRet, JS_ErrorString& sError)
3881 { 3881 {
3882 return FALSE; 3882 return FALSE;
3883 } 3883 }
3884 3884
3885 FX_BOOL Field::signatureValidate(OBJ_METHOD_PARAMS) 3885 FX_BOOL Field::signatureValidate(IFXJS_Context* cc, const CJS_Parameters& params , CJS_Value& vRet, JS_ErrorString& sError)
3886 { 3886 {
3887 return FALSE; 3887 return FALSE;
3888 } 3888 }
3889 3889
3890 FX_BOOL Field::source(OBJ_PROP_PARAMS) 3890 FX_BOOL Field::source(IFXJS_Context* cc, CJS_PropValue& vp, JS_ErrorString& sErr or)
3891 { 3891 {
3892 if (vp.IsGetting()) 3892 if (vp.IsGetting())
3893 { 3893 {
3894 vp << (CJS_Object*)NULL; 3894 vp << (CJS_Object*)NULL;
3895 } 3895 }
3896 3896
3897 return TRUE; 3897 return TRUE;
3898 } 3898 }
3899 3899
3900 /////////////////////////////////////////// delay ////////////////////////////// /////////////// 3900 /////////////////////////////////////////// delay ////////////////////////////// ///////////////
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after
4119 4119
4120 #define JS_FIELD_MINWIDTH 1 4120 #define JS_FIELD_MINWIDTH 1
4121 #define JS_FIELD_MINHEIGHT 1 4121 #define JS_FIELD_MINHEIGHT 1
4122 4122
4123 void Field::AddField(CPDFSDK_Document* pDocument, int nPageIndex, int nFieldType , 4123 void Field::AddField(CPDFSDK_Document* pDocument, int nPageIndex, int nFieldType ,
4124 const CFX_WideString& sN ame, const CPDF_Rect& rcCoords) 4124 const CFX_WideString& sN ame, const CPDF_Rect& rcCoords)
4125 { 4125 {
4126 //Not supported. 4126 //Not supported.
4127 } 4127 }
4128 4128
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698