| OLD | NEW |
| 1 // Copyright 2014 PDFium Authors. All rights reserved. | 1 // Copyright 2014 PDFium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com |
| 6 | 6 |
| 7 #ifndef FPDFSDK_JAVASCRIPT_FIELD_H_ | 7 #ifndef FPDFSDK_JAVASCRIPT_FIELD_H_ |
| 8 #define FPDFSDK_JAVASCRIPT_FIELD_H_ | 8 #define FPDFSDK_JAVASCRIPT_FIELD_H_ |
| 9 | 9 |
| 10 #include <string> | 10 #include <string> |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 CPWL_Color color; | 70 CPWL_Color color; |
| 71 std::vector<uint32_t> wordarray; | 71 std::vector<uint32_t> wordarray; |
| 72 std::vector<CFX_WideString> widestringarray; | 72 std::vector<CFX_WideString> widestringarray; |
| 73 }; | 73 }; |
| 74 | 74 |
| 75 class Field : public CJS_EmbedObj { | 75 class Field : public CJS_EmbedObj { |
| 76 public: | 76 public: |
| 77 explicit Field(CJS_Object* pJSObject); | 77 explicit Field(CJS_Object* pJSObject); |
| 78 ~Field() override; | 78 ~Field() override; |
| 79 | 79 |
| 80 FX_BOOL alignment(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); | 80 bool alignment(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); |
| 81 FX_BOOL borderStyle(IJS_Context* cc, | 81 bool borderStyle(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); |
| 82 bool buttonAlignX(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); |
| 83 bool buttonAlignY(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); |
| 84 bool buttonFitBounds(IJS_Context* cc, |
| 85 CJS_PropValue& vp, |
| 86 CFX_WideString& sError); |
| 87 bool buttonPosition(IJS_Context* cc, |
| 82 CJS_PropValue& vp, | 88 CJS_PropValue& vp, |
| 83 CFX_WideString& sError); | 89 CFX_WideString& sError); |
| 84 FX_BOOL buttonAlignX(IJS_Context* cc, | 90 bool buttonScaleHow(IJS_Context* cc, |
| 91 CJS_PropValue& vp, |
| 92 CFX_WideString& sError); |
| 93 bool buttonScaleWhen(IJS_Context* cc, |
| 85 CJS_PropValue& vp, | 94 CJS_PropValue& vp, |
| 86 CFX_WideString& sError); | 95 CFX_WideString& sError); |
| 87 FX_BOOL buttonAlignY(IJS_Context* cc, | 96 bool calcOrderIndex(IJS_Context* cc, |
| 97 CJS_PropValue& vp, |
| 98 CFX_WideString& sError); |
| 99 bool charLimit(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); |
| 100 bool comb(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); |
| 101 bool commitOnSelChange(IJS_Context* cc, |
| 102 CJS_PropValue& vp, |
| 103 CFX_WideString& sError); |
| 104 bool currentValueIndices(IJS_Context* cc, |
| 105 CJS_PropValue& vp, |
| 106 CFX_WideString& sError); |
| 107 bool defaultStyle(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); |
| 108 bool defaultValue(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); |
| 109 bool doNotScroll(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); |
| 110 bool doNotSpellCheck(IJS_Context* cc, |
| 88 CJS_PropValue& vp, | 111 CJS_PropValue& vp, |
| 89 CFX_WideString& sError); | 112 CFX_WideString& sError); |
| 90 FX_BOOL buttonFitBounds(IJS_Context* cc, | 113 bool delay(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); |
| 91 CJS_PropValue& vp, | 114 bool display(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); |
| 92 CFX_WideString& sError); | 115 bool doc(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); |
| 93 FX_BOOL buttonPosition(IJS_Context* cc, | 116 bool editable(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); |
| 117 bool exportValues(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); |
| 118 bool fileSelect(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); |
| 119 bool fillColor(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); |
| 120 bool hidden(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); |
| 121 bool highlight(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); |
| 122 bool lineWidth(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); |
| 123 bool multiline(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); |
| 124 bool multipleSelection(IJS_Context* cc, |
| 94 CJS_PropValue& vp, | 125 CJS_PropValue& vp, |
| 95 CFX_WideString& sError); | 126 CFX_WideString& sError); |
| 96 FX_BOOL buttonScaleHow(IJS_Context* cc, | 127 bool name(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); |
| 97 CJS_PropValue& vp, | 128 bool numItems(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); |
| 98 CFX_WideString& sError); | 129 bool page(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); |
| 99 FX_BOOL buttonScaleWhen(IJS_Context* cc, | 130 bool password(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); |
| 100 CJS_PropValue& vp, | 131 bool print(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); |
| 101 CFX_WideString& sError); | 132 bool radiosInUnison(IJS_Context* cc, |
| 102 FX_BOOL calcOrderIndex(IJS_Context* cc, | |
| 103 CJS_PropValue& vp, | |
| 104 CFX_WideString& sError); | |
| 105 FX_BOOL charLimit(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); | |
| 106 FX_BOOL comb(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); | |
| 107 FX_BOOL commitOnSelChange(IJS_Context* cc, | |
| 108 CJS_PropValue& vp, | |
| 109 CFX_WideString& sError); | |
| 110 FX_BOOL currentValueIndices(IJS_Context* cc, | |
| 111 CJS_PropValue& vp, | |
| 112 CFX_WideString& sError); | |
| 113 FX_BOOL defaultStyle(IJS_Context* cc, | |
| 114 CJS_PropValue& vp, | |
| 115 CFX_WideString& sError); | |
| 116 FX_BOOL defaultValue(IJS_Context* cc, | |
| 117 CJS_PropValue& vp, | |
| 118 CFX_WideString& sError); | |
| 119 FX_BOOL doNotScroll(IJS_Context* cc, | |
| 120 CJS_PropValue& vp, | 133 CJS_PropValue& vp, |
| 121 CFX_WideString& sError); | 134 CFX_WideString& sError); |
| 122 FX_BOOL doNotSpellCheck(IJS_Context* cc, | 135 bool readonly(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); |
| 123 CJS_PropValue& vp, | 136 bool rect(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); |
| 124 CFX_WideString& sError); | 137 bool required(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); |
| 125 FX_BOOL delay(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); | 138 bool richText(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); |
| 126 FX_BOOL display(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); | 139 bool richValue(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); |
| 127 FX_BOOL doc(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); | 140 bool rotation(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); |
| 128 FX_BOOL editable(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); | 141 bool strokeColor(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); |
| 129 FX_BOOL exportValues(IJS_Context* cc, | 142 bool style(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); |
| 130 CJS_PropValue& vp, | 143 bool submitName(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); |
| 131 CFX_WideString& sError); | 144 bool textColor(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); |
| 132 FX_BOOL fileSelect(IJS_Context* cc, | 145 bool textFont(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); |
| 146 bool textSize(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); |
| 147 bool type(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); |
| 148 bool userName(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); |
| 149 bool value(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); |
| 150 bool valueAsString(IJS_Context* cc, |
| 133 CJS_PropValue& vp, | 151 CJS_PropValue& vp, |
| 134 CFX_WideString& sError); | 152 CFX_WideString& sError); |
| 135 FX_BOOL fillColor(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); | 153 bool source(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); |
| 136 FX_BOOL hidden(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); | |
| 137 FX_BOOL highlight(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); | |
| 138 FX_BOOL lineWidth(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); | |
| 139 FX_BOOL multiline(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); | |
| 140 FX_BOOL multipleSelection(IJS_Context* cc, | |
| 141 CJS_PropValue& vp, | |
| 142 CFX_WideString& sError); | |
| 143 FX_BOOL name(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); | |
| 144 FX_BOOL numItems(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); | |
| 145 FX_BOOL page(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); | |
| 146 FX_BOOL password(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); | |
| 147 FX_BOOL print(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); | |
| 148 FX_BOOL radiosInUnison(IJS_Context* cc, | |
| 149 CJS_PropValue& vp, | |
| 150 CFX_WideString& sError); | |
| 151 FX_BOOL readonly(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); | |
| 152 FX_BOOL rect(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); | |
| 153 FX_BOOL required(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); | |
| 154 FX_BOOL richText(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); | |
| 155 FX_BOOL richValue(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); | |
| 156 FX_BOOL rotation(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); | |
| 157 FX_BOOL strokeColor(IJS_Context* cc, | |
| 158 CJS_PropValue& vp, | |
| 159 CFX_WideString& sError); | |
| 160 FX_BOOL style(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); | |
| 161 FX_BOOL submitName(IJS_Context* cc, | |
| 162 CJS_PropValue& vp, | |
| 163 CFX_WideString& sError); | |
| 164 FX_BOOL textColor(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); | |
| 165 FX_BOOL textFont(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); | |
| 166 FX_BOOL textSize(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); | |
| 167 FX_BOOL type(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); | |
| 168 FX_BOOL userName(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); | |
| 169 FX_BOOL value(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); | |
| 170 FX_BOOL valueAsString(IJS_Context* cc, | |
| 171 CJS_PropValue& vp, | |
| 172 CFX_WideString& sError); | |
| 173 FX_BOOL source(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); | |
| 174 | 154 |
| 175 FX_BOOL browseForFileToSubmit(IJS_Context* cc, | 155 bool browseForFileToSubmit(IJS_Context* cc, |
| 176 const std::vector<CJS_Value>& params, | 156 const std::vector<CJS_Value>& params, |
| 177 CJS_Value& vRet, | 157 CJS_Value& vRet, |
| 178 CFX_WideString& sError); | 158 CFX_WideString& sError); |
| 179 FX_BOOL buttonGetCaption(IJS_Context* cc, | 159 bool buttonGetCaption(IJS_Context* cc, |
| 180 const std::vector<CJS_Value>& params, | |
| 181 CJS_Value& vRet, | |
| 182 CFX_WideString& sError); | |
| 183 FX_BOOL buttonGetIcon(IJS_Context* cc, | |
| 184 const std::vector<CJS_Value>& params, | 160 const std::vector<CJS_Value>& params, |
| 185 CJS_Value& vRet, | 161 CJS_Value& vRet, |
| 186 CFX_WideString& sError); | 162 CFX_WideString& sError); |
| 187 FX_BOOL buttonImportIcon(IJS_Context* cc, | 163 bool buttonGetIcon(IJS_Context* cc, |
| 188 const std::vector<CJS_Value>& params, | 164 const std::vector<CJS_Value>& params, |
| 189 CJS_Value& vRet, | 165 CJS_Value& vRet, |
| 190 CFX_WideString& sError); | 166 CFX_WideString& sError); |
| 191 FX_BOOL buttonSetCaption(IJS_Context* cc, | 167 bool buttonImportIcon(IJS_Context* cc, |
| 192 const std::vector<CJS_Value>& params, | |
| 193 CJS_Value& vRet, | |
| 194 CFX_WideString& sError); | |
| 195 FX_BOOL buttonSetIcon(IJS_Context* cc, | |
| 196 const std::vector<CJS_Value>& params, | 168 const std::vector<CJS_Value>& params, |
| 197 CJS_Value& vRet, | 169 CJS_Value& vRet, |
| 198 CFX_WideString& sError); | 170 CFX_WideString& sError); |
| 199 FX_BOOL checkThisBox(IJS_Context* cc, | 171 bool buttonSetCaption(IJS_Context* cc, |
| 200 const std::vector<CJS_Value>& params, | 172 const std::vector<CJS_Value>& params, |
| 201 CJS_Value& vRet, | 173 CJS_Value& vRet, |
| 202 CFX_WideString& sError); | 174 CFX_WideString& sError); |
| 203 FX_BOOL clearItems(IJS_Context* cc, | 175 bool buttonSetIcon(IJS_Context* cc, |
| 204 const std::vector<CJS_Value>& params, | 176 const std::vector<CJS_Value>& params, |
| 205 CJS_Value& vRet, | 177 CJS_Value& vRet, |
| 206 CFX_WideString& sError); | 178 CFX_WideString& sError); |
| 207 FX_BOOL defaultIsChecked(IJS_Context* cc, | 179 bool checkThisBox(IJS_Context* cc, |
| 208 const std::vector<CJS_Value>& params, | |
| 209 CJS_Value& vRet, | |
| 210 CFX_WideString& sError); | |
| 211 FX_BOOL deleteItemAt(IJS_Context* cc, | |
| 212 const std::vector<CJS_Value>& params, | |
| 213 CJS_Value& vRet, | |
| 214 CFX_WideString& sError); | |
| 215 FX_BOOL getArray(IJS_Context* cc, | |
| 216 const std::vector<CJS_Value>& params, | |
| 217 CJS_Value& vRet, | |
| 218 CFX_WideString& sError); | |
| 219 FX_BOOL getItemAt(IJS_Context* cc, | |
| 220 const std::vector<CJS_Value>& params, | 180 const std::vector<CJS_Value>& params, |
| 221 CJS_Value& vRet, | 181 CJS_Value& vRet, |
| 222 CFX_WideString& sError); | 182 CFX_WideString& sError); |
| 223 FX_BOOL getLock(IJS_Context* cc, | 183 bool clearItems(IJS_Context* cc, |
| 224 const std::vector<CJS_Value>& params, | 184 const std::vector<CJS_Value>& params, |
| 225 CJS_Value& vRet, | 185 CJS_Value& vRet, |
| 226 CFX_WideString& sError); | 186 CFX_WideString& sError); |
| 227 FX_BOOL insertItemAt(IJS_Context* cc, | 187 bool defaultIsChecked(IJS_Context* cc, |
| 228 const std::vector<CJS_Value>& params, | 188 const std::vector<CJS_Value>& params, |
| 229 CJS_Value& vRet, | 189 CJS_Value& vRet, |
| 230 CFX_WideString& sError); | 190 CFX_WideString& sError); |
| 231 FX_BOOL isBoxChecked(IJS_Context* cc, | 191 bool deleteItemAt(IJS_Context* cc, |
| 232 const std::vector<CJS_Value>& params, | |
| 233 CJS_Value& vRet, | |
| 234 CFX_WideString& sError); | |
| 235 FX_BOOL isDefaultChecked(IJS_Context* cc, | |
| 236 const std::vector<CJS_Value>& params, | |
| 237 CJS_Value& vRet, | |
| 238 CFX_WideString& sError); | |
| 239 FX_BOOL setAction(IJS_Context* cc, | |
| 240 const std::vector<CJS_Value>& params, | 192 const std::vector<CJS_Value>& params, |
| 241 CJS_Value& vRet, | 193 CJS_Value& vRet, |
| 242 CFX_WideString& sError); | 194 CFX_WideString& sError); |
| 243 FX_BOOL setFocus(IJS_Context* cc, | 195 bool getArray(IJS_Context* cc, |
| 244 const std::vector<CJS_Value>& params, | 196 const std::vector<CJS_Value>& params, |
| 245 CJS_Value& vRet, | 197 CJS_Value& vRet, |
| 246 CFX_WideString& sError); | 198 CFX_WideString& sError); |
| 247 FX_BOOL setItems(IJS_Context* cc, | 199 bool getItemAt(IJS_Context* cc, |
| 248 const std::vector<CJS_Value>& params, | 200 const std::vector<CJS_Value>& params, |
| 249 CJS_Value& vRet, | 201 CJS_Value& vRet, |
| 250 CFX_WideString& sError); | 202 CFX_WideString& sError); |
| 251 FX_BOOL setLock(IJS_Context* cc, | 203 bool getLock(IJS_Context* cc, |
| 252 const std::vector<CJS_Value>& params, | 204 const std::vector<CJS_Value>& params, |
| 253 CJS_Value& vRet, | 205 CJS_Value& vRet, |
| 254 CFX_WideString& sError); | 206 CFX_WideString& sError); |
| 255 FX_BOOL signatureGetModifications(IJS_Context* cc, | 207 bool insertItemAt(IJS_Context* cc, |
| 256 const std::vector<CJS_Value>& params, | 208 const std::vector<CJS_Value>& params, |
| 257 CJS_Value& vRet, | 209 CJS_Value& vRet, |
| 258 CFX_WideString& sError); | 210 CFX_WideString& sError); |
| 259 FX_BOOL signatureGetSeedValue(IJS_Context* cc, | 211 bool isBoxChecked(IJS_Context* cc, |
| 260 const std::vector<CJS_Value>& params, | 212 const std::vector<CJS_Value>& params, |
| 261 CJS_Value& vRet, | 213 CJS_Value& vRet, |
| 262 CFX_WideString& sError); | 214 CFX_WideString& sError); |
| 263 FX_BOOL signatureInfo(IJS_Context* cc, | 215 bool isDefaultChecked(IJS_Context* cc, |
| 264 const std::vector<CJS_Value>& params, | 216 const std::vector<CJS_Value>& params, |
| 265 CJS_Value& vRet, | 217 CJS_Value& vRet, |
| 266 CFX_WideString& sError); | 218 CFX_WideString& sError); |
| 267 FX_BOOL signatureSetSeedValue(IJS_Context* cc, | 219 bool setAction(IJS_Context* cc, |
| 268 const std::vector<CJS_Value>& params, | 220 const std::vector<CJS_Value>& params, |
| 269 CJS_Value& vRet, | 221 CJS_Value& vRet, |
| 270 CFX_WideString& sError); | 222 CFX_WideString& sError); |
| 271 FX_BOOL signatureSign(IJS_Context* cc, | 223 bool setFocus(IJS_Context* cc, |
| 272 const std::vector<CJS_Value>& params, | 224 const std::vector<CJS_Value>& params, |
| 273 CJS_Value& vRet, | 225 CJS_Value& vRet, |
| 274 CFX_WideString& sError); | 226 CFX_WideString& sError); |
| 275 FX_BOOL signatureValidate(IJS_Context* cc, | 227 bool setItems(IJS_Context* cc, |
| 276 const std::vector<CJS_Value>& params, | 228 const std::vector<CJS_Value>& params, |
| 277 CJS_Value& vRet, | 229 CJS_Value& vRet, |
| 278 CFX_WideString& sError); | 230 CFX_WideString& sError); |
| 231 bool setLock(IJS_Context* cc, |
| 232 const std::vector<CJS_Value>& params, |
| 233 CJS_Value& vRet, |
| 234 CFX_WideString& sError); |
| 235 bool signatureGetModifications(IJS_Context* cc, |
| 236 const std::vector<CJS_Value>& params, |
| 237 CJS_Value& vRet, |
| 238 CFX_WideString& sError); |
| 239 bool signatureGetSeedValue(IJS_Context* cc, |
| 240 const std::vector<CJS_Value>& params, |
| 241 CJS_Value& vRet, |
| 242 CFX_WideString& sError); |
| 243 bool signatureInfo(IJS_Context* cc, |
| 244 const std::vector<CJS_Value>& params, |
| 245 CJS_Value& vRet, |
| 246 CFX_WideString& sError); |
| 247 bool signatureSetSeedValue(IJS_Context* cc, |
| 248 const std::vector<CJS_Value>& params, |
| 249 CJS_Value& vRet, |
| 250 CFX_WideString& sError); |
| 251 bool signatureSign(IJS_Context* cc, |
| 252 const std::vector<CJS_Value>& params, |
| 253 CJS_Value& vRet, |
| 254 CFX_WideString& sError); |
| 255 bool signatureValidate(IJS_Context* cc, |
| 256 const std::vector<CJS_Value>& params, |
| 257 CJS_Value& vRet, |
| 258 CFX_WideString& sError); |
| 279 | 259 |
| 280 static void SetAlignment(CPDFSDK_FormFillEnvironment* pFormFillEnv, | 260 static void SetAlignment(CPDFSDK_FormFillEnvironment* pFormFillEnv, |
| 281 const CFX_WideString& swFieldName, | 261 const CFX_WideString& swFieldName, |
| 282 int nControlIndex, | 262 int nControlIndex, |
| 283 const CFX_ByteString& string); | 263 const CFX_ByteString& string); |
| 284 static void SetBorderStyle(CPDFSDK_FormFillEnvironment* pFormFillEnv, | 264 static void SetBorderStyle(CPDFSDK_FormFillEnvironment* pFormFillEnv, |
| 285 const CFX_WideString& swFieldName, | 265 const CFX_WideString& swFieldName, |
| 286 int nControlIndex, | 266 int nControlIndex, |
| 287 const CFX_ByteString& string); | 267 const CFX_ByteString& string); |
| 288 static void SetButtonAlignX(CPDFSDK_FormFillEnvironment* pFormFillEnv, | 268 static void SetButtonAlignX(CPDFSDK_FormFillEnvironment* pFormFillEnv, |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 410 const std::vector<CFX_WideString>& strArray); | 390 const std::vector<CFX_WideString>& strArray); |
| 411 | 391 |
| 412 static void AddField(CPDFSDK_FormFillEnvironment* pFormFillEnv, | 392 static void AddField(CPDFSDK_FormFillEnvironment* pFormFillEnv, |
| 413 int nPageIndex, | 393 int nPageIndex, |
| 414 int nFieldType, | 394 int nFieldType, |
| 415 const CFX_WideString& sName, | 395 const CFX_WideString& sName, |
| 416 const CFX_FloatRect& rcCoords); | 396 const CFX_FloatRect& rcCoords); |
| 417 | 397 |
| 418 static void UpdateFormField(CPDFSDK_FormFillEnvironment* pFormFillEnv, | 398 static void UpdateFormField(CPDFSDK_FormFillEnvironment* pFormFillEnv, |
| 419 CPDF_FormField* pFormField, | 399 CPDF_FormField* pFormField, |
| 420 FX_BOOL bChangeMark, | 400 bool bChangeMark, |
| 421 FX_BOOL bResetAP, | 401 bool bResetAP, |
| 422 FX_BOOL bRefresh); | 402 bool bRefresh); |
| 423 static void UpdateFormControl(CPDFSDK_FormFillEnvironment* pFormFillEnv, | 403 static void UpdateFormControl(CPDFSDK_FormFillEnvironment* pFormFillEnv, |
| 424 CPDF_FormControl* pFormControl, | 404 CPDF_FormControl* pFormControl, |
| 425 FX_BOOL bChangeMark, | 405 bool bChangeMark, |
| 426 FX_BOOL bResetAP, | 406 bool bResetAP, |
| 427 FX_BOOL bRefresh); | 407 bool bRefresh); |
| 428 | 408 |
| 429 static CPDFSDK_Widget* GetWidget(CPDFSDK_FormFillEnvironment* pFormFillEnv, | 409 static CPDFSDK_Widget* GetWidget(CPDFSDK_FormFillEnvironment* pFormFillEnv, |
| 430 CPDF_FormControl* pFormControl, | 410 CPDF_FormControl* pFormControl, |
| 431 bool createIfNeeded); | 411 bool createIfNeeded); |
| 432 static std::vector<CPDF_FormField*> GetFormFields( | 412 static std::vector<CPDF_FormField*> GetFormFields( |
| 433 CPDFSDK_FormFillEnvironment* pFormFillEnv, | 413 CPDFSDK_FormFillEnvironment* pFormFillEnv, |
| 434 const CFX_WideString& csFieldName); | 414 const CFX_WideString& csFieldName); |
| 435 | 415 |
| 436 static void DoDelay(CPDFSDK_FormFillEnvironment* pFormFillEnv, | 416 static void DoDelay(CPDFSDK_FormFillEnvironment* pFormFillEnv, |
| 437 CJS_DelayData* pData); | 417 CJS_DelayData* pData); |
| 438 | 418 |
| 439 FX_BOOL AttachField(Document* pDocument, const CFX_WideString& csFieldName); | 419 bool AttachField(Document* pDocument, const CFX_WideString& csFieldName); |
| 440 void SetDelay(FX_BOOL bDelay); | 420 void SetDelay(bool bDelay); |
| 441 | 421 |
| 442 protected: | 422 protected: |
| 443 void ParseFieldName(const std::wstring& strFieldNameParsed, | 423 void ParseFieldName(const std::wstring& strFieldNameParsed, |
| 444 std::wstring& strFieldName, | 424 std::wstring& strFieldName, |
| 445 int& iControlNo); | 425 int& iControlNo); |
| 446 std::vector<CPDF_FormField*> GetFormFields( | 426 std::vector<CPDF_FormField*> GetFormFields( |
| 447 const CFX_WideString& csFieldName) const; | 427 const CFX_WideString& csFieldName) const; |
| 448 CPDF_FormControl* GetSmartFieldControl(CPDF_FormField* pFormField); | 428 CPDF_FormControl* GetSmartFieldControl(CPDF_FormField* pFormField); |
| 449 FX_BOOL ValueIsOccur(CPDF_FormField* pFormField, CFX_WideString csOptLabel); | 429 bool ValueIsOccur(CPDF_FormField* pFormField, CFX_WideString csOptLabel); |
| 450 | 430 |
| 451 void AddDelay_Int(FIELD_PROP prop, int32_t n); | 431 void AddDelay_Int(FIELD_PROP prop, int32_t n); |
| 452 void AddDelay_Bool(FIELD_PROP prop, bool b); | 432 void AddDelay_Bool(FIELD_PROP prop, bool b); |
| 453 void AddDelay_String(FIELD_PROP prop, const CFX_ByteString& string); | 433 void AddDelay_String(FIELD_PROP prop, const CFX_ByteString& string); |
| 454 void AddDelay_WideString(FIELD_PROP prop, const CFX_WideString& string); | 434 void AddDelay_WideString(FIELD_PROP prop, const CFX_WideString& string); |
| 455 void AddDelay_Rect(FIELD_PROP prop, const CFX_FloatRect& rect); | 435 void AddDelay_Rect(FIELD_PROP prop, const CFX_FloatRect& rect); |
| 456 void AddDelay_Color(FIELD_PROP prop, const CPWL_Color& color); | 436 void AddDelay_Color(FIELD_PROP prop, const CPWL_Color& color); |
| 457 void AddDelay_WordArray(FIELD_PROP prop, const std::vector<uint32_t>& array); | 437 void AddDelay_WordArray(FIELD_PROP prop, const std::vector<uint32_t>& array); |
| 458 void AddDelay_WideStringArray(FIELD_PROP prop, | 438 void AddDelay_WideStringArray(FIELD_PROP prop, |
| 459 const std::vector<CFX_WideString>& array); | 439 const std::vector<CFX_WideString>& array); |
| 460 | 440 |
| 461 void DoDelay(); | 441 void DoDelay(); |
| 462 | 442 |
| 463 public: | 443 public: |
| 464 Document* m_pJSDoc; | 444 Document* m_pJSDoc; |
| 465 CPDFSDK_FormFillEnvironment::ObservedPtr m_pFormFillEnv; | 445 CPDFSDK_FormFillEnvironment::ObservedPtr m_pFormFillEnv; |
| 466 CFX_WideString m_FieldName; | 446 CFX_WideString m_FieldName; |
| 467 int m_nFormControlIndex; | 447 int m_nFormControlIndex; |
| 468 FX_BOOL m_bCanSet; | 448 bool m_bCanSet; |
| 469 FX_BOOL m_bDelay; | 449 bool m_bDelay; |
| 470 }; | 450 }; |
| 471 | 451 |
| 472 class CJS_Field : public CJS_Object { | 452 class CJS_Field : public CJS_Object { |
| 473 public: | 453 public: |
| 474 explicit CJS_Field(v8::Local<v8::Object> pObject) : CJS_Object(pObject) {} | 454 explicit CJS_Field(v8::Local<v8::Object> pObject) : CJS_Object(pObject) {} |
| 475 ~CJS_Field() override {} | 455 ~CJS_Field() override {} |
| 476 | 456 |
| 477 void InitInstance(IJS_Runtime* pIRuntime) override; | 457 void InitInstance(IJS_Runtime* pIRuntime) override; |
| 478 | 458 |
| 479 DECLARE_JS_CLASS(); | 459 DECLARE_JS_CLASS(); |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 552 JS_STATIC_METHOD(setLock, Field); | 532 JS_STATIC_METHOD(setLock, Field); |
| 553 JS_STATIC_METHOD(signatureGetModifications, Field); | 533 JS_STATIC_METHOD(signatureGetModifications, Field); |
| 554 JS_STATIC_METHOD(signatureGetSeedValue, Field); | 534 JS_STATIC_METHOD(signatureGetSeedValue, Field); |
| 555 JS_STATIC_METHOD(signatureInfo, Field); | 535 JS_STATIC_METHOD(signatureInfo, Field); |
| 556 JS_STATIC_METHOD(signatureSetSeedValue, Field); | 536 JS_STATIC_METHOD(signatureSetSeedValue, Field); |
| 557 JS_STATIC_METHOD(signatureSign, Field); | 537 JS_STATIC_METHOD(signatureSign, Field); |
| 558 JS_STATIC_METHOD(signatureValidate, Field); | 538 JS_STATIC_METHOD(signatureValidate, Field); |
| 559 }; | 539 }; |
| 560 | 540 |
| 561 #endif // FPDFSDK_JAVASCRIPT_FIELD_H_ | 541 #endif // FPDFSDK_JAVASCRIPT_FIELD_H_ |
| OLD | NEW |