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 #include "fpdfsdk/formfiller/cffl_iformfiller.h" | 7 #include "fpdfsdk/formfiller/cffl_iformfiller.h" |
8 | 8 |
9 #include "core/fpdfapi/fpdf_page/include/cpdf_page.h" | 9 #include "core/fpdfapi/fpdf_page/include/cpdf_page.h" |
10 #include "core/fpdfapi/fpdf_parser/include/cpdf_document.h" | 10 #include "core/fpdfapi/fpdf_parser/include/cpdf_document.h" |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 void CFFL_IFormFiller::OnDelete(CPDFSDK_Annot* pAnnot) { | 116 void CFFL_IFormFiller::OnDelete(CPDFSDK_Annot* pAnnot) { |
117 if (CFFL_FormFiller* pFormFiller = GetFormFiller(pAnnot, FALSE)) { | 117 if (CFFL_FormFiller* pFormFiller = GetFormFiller(pAnnot, FALSE)) { |
118 pFormFiller->OnDelete(pAnnot); | 118 pFormFiller->OnDelete(pAnnot); |
119 } | 119 } |
120 | 120 |
121 UnRegisterFormFiller(pAnnot); | 121 UnRegisterFormFiller(pAnnot); |
122 } | 122 } |
123 | 123 |
124 void CFFL_IFormFiller::OnMouseEnter(CPDFSDK_PageView* pPageView, | 124 void CFFL_IFormFiller::OnMouseEnter(CPDFSDK_PageView* pPageView, |
125 CPDFSDK_Annot* pAnnot, | 125 CPDFSDK_Annot* pAnnot, |
126 FX_UINT nFlag) { | 126 uint32_t nFlag) { |
127 ASSERT(pAnnot->GetPDFAnnot()->GetSubtype() == CPDF_Annot::Subtype::WIDGET); | 127 ASSERT(pAnnot->GetPDFAnnot()->GetSubtype() == CPDF_Annot::Subtype::WIDGET); |
128 | 128 |
129 if (!m_bNotifying) { | 129 if (!m_bNotifying) { |
130 CPDFSDK_Widget* pWidget = (CPDFSDK_Widget*)pAnnot; | 130 CPDFSDK_Widget* pWidget = (CPDFSDK_Widget*)pAnnot; |
131 if (pWidget->GetAAction(CPDF_AAction::CursorEnter).GetDict()) { | 131 if (pWidget->GetAAction(CPDF_AAction::CursorEnter).GetDict()) { |
132 m_bNotifying = TRUE; | 132 m_bNotifying = TRUE; |
133 | 133 |
134 int nValueAge = pWidget->GetValueAge(); | 134 int nValueAge = pWidget->GetValueAge(); |
135 | 135 |
136 pWidget->ClearAppModified(); | 136 pWidget->ClearAppModified(); |
(...skipping 15 matching lines...) Expand all Loading... |
152 } | 152 } |
153 } | 153 } |
154 | 154 |
155 if (CFFL_FormFiller* pFormFiller = GetFormFiller(pAnnot, TRUE)) { | 155 if (CFFL_FormFiller* pFormFiller = GetFormFiller(pAnnot, TRUE)) { |
156 pFormFiller->OnMouseEnter(pPageView, pAnnot); | 156 pFormFiller->OnMouseEnter(pPageView, pAnnot); |
157 } | 157 } |
158 } | 158 } |
159 | 159 |
160 void CFFL_IFormFiller::OnMouseExit(CPDFSDK_PageView* pPageView, | 160 void CFFL_IFormFiller::OnMouseExit(CPDFSDK_PageView* pPageView, |
161 CPDFSDK_Annot* pAnnot, | 161 CPDFSDK_Annot* pAnnot, |
162 FX_UINT nFlag) { | 162 uint32_t nFlag) { |
163 ASSERT(pAnnot->GetPDFAnnot()->GetSubtype() == CPDF_Annot::Subtype::WIDGET); | 163 ASSERT(pAnnot->GetPDFAnnot()->GetSubtype() == CPDF_Annot::Subtype::WIDGET); |
164 | 164 |
165 if (!m_bNotifying) { | 165 if (!m_bNotifying) { |
166 CPDFSDK_Widget* pWidget = (CPDFSDK_Widget*)pAnnot; | 166 CPDFSDK_Widget* pWidget = (CPDFSDK_Widget*)pAnnot; |
167 if (pWidget->GetAAction(CPDF_AAction::CursorExit).GetDict()) { | 167 if (pWidget->GetAAction(CPDF_AAction::CursorExit).GetDict()) { |
168 m_bNotifying = TRUE; | 168 m_bNotifying = TRUE; |
169 pWidget->GetAppearanceAge(); | 169 pWidget->GetAppearanceAge(); |
170 int nValueAge = pWidget->GetValueAge(); | 170 int nValueAge = pWidget->GetValueAge(); |
171 pWidget->ClearAppModified(); | 171 pWidget->ClearAppModified(); |
172 | 172 |
(...skipping 15 matching lines...) Expand all Loading... |
188 } | 188 } |
189 } | 189 } |
190 | 190 |
191 if (CFFL_FormFiller* pFormFiller = GetFormFiller(pAnnot, FALSE)) { | 191 if (CFFL_FormFiller* pFormFiller = GetFormFiller(pAnnot, FALSE)) { |
192 pFormFiller->OnMouseExit(pPageView, pAnnot); | 192 pFormFiller->OnMouseExit(pPageView, pAnnot); |
193 } | 193 } |
194 } | 194 } |
195 | 195 |
196 FX_BOOL CFFL_IFormFiller::OnLButtonDown(CPDFSDK_PageView* pPageView, | 196 FX_BOOL CFFL_IFormFiller::OnLButtonDown(CPDFSDK_PageView* pPageView, |
197 CPDFSDK_Annot* pAnnot, | 197 CPDFSDK_Annot* pAnnot, |
198 FX_UINT nFlags, | 198 uint32_t nFlags, |
199 const CFX_FloatPoint& point) { | 199 const CFX_FloatPoint& point) { |
200 ASSERT(pAnnot->GetPDFAnnot()->GetSubtype() == CPDF_Annot::Subtype::WIDGET); | 200 ASSERT(pAnnot->GetPDFAnnot()->GetSubtype() == CPDF_Annot::Subtype::WIDGET); |
201 | 201 |
202 if (!m_bNotifying) { | 202 if (!m_bNotifying) { |
203 CPDFSDK_Widget* pWidget = (CPDFSDK_Widget*)pAnnot; | 203 CPDFSDK_Widget* pWidget = (CPDFSDK_Widget*)pAnnot; |
204 if (Annot_HitTest(pPageView, pAnnot, point) && | 204 if (Annot_HitTest(pPageView, pAnnot, point) && |
205 pWidget->GetAAction(CPDF_AAction::ButtonDown).GetDict()) { | 205 pWidget->GetAAction(CPDF_AAction::ButtonDown).GetDict()) { |
206 m_bNotifying = TRUE; | 206 m_bNotifying = TRUE; |
207 pWidget->GetAppearanceAge(); | 207 pWidget->GetAppearanceAge(); |
208 int nValueAge = pWidget->GetValueAge(); | 208 int nValueAge = pWidget->GetValueAge(); |
(...skipping 21 matching lines...) Expand all Loading... |
230 | 230 |
231 if (CFFL_FormFiller* pFormFiller = GetFormFiller(pAnnot, FALSE)) { | 231 if (CFFL_FormFiller* pFormFiller = GetFormFiller(pAnnot, FALSE)) { |
232 return pFormFiller->OnLButtonDown(pPageView, pAnnot, nFlags, point); | 232 return pFormFiller->OnLButtonDown(pPageView, pAnnot, nFlags, point); |
233 } | 233 } |
234 | 234 |
235 return FALSE; | 235 return FALSE; |
236 } | 236 } |
237 | 237 |
238 FX_BOOL CFFL_IFormFiller::OnLButtonUp(CPDFSDK_PageView* pPageView, | 238 FX_BOOL CFFL_IFormFiller::OnLButtonUp(CPDFSDK_PageView* pPageView, |
239 CPDFSDK_Annot* pAnnot, | 239 CPDFSDK_Annot* pAnnot, |
240 FX_UINT nFlags, | 240 uint32_t nFlags, |
241 const CFX_FloatPoint& point) { | 241 const CFX_FloatPoint& point) { |
242 ASSERT(pAnnot->GetPDFAnnot()->GetSubtype() == CPDF_Annot::Subtype::WIDGET); | 242 ASSERT(pAnnot->GetPDFAnnot()->GetSubtype() == CPDF_Annot::Subtype::WIDGET); |
243 CPDFSDK_Widget* pWidget = (CPDFSDK_Widget*)pAnnot; | 243 CPDFSDK_Widget* pWidget = (CPDFSDK_Widget*)pAnnot; |
244 CPDFSDK_Document* pDocument = m_pApp->GetSDKDocument(); | 244 CPDFSDK_Document* pDocument = m_pApp->GetSDKDocument(); |
245 | 245 |
246 switch (pWidget->GetFieldType()) { | 246 switch (pWidget->GetFieldType()) { |
247 case FIELDTYPE_PUSHBUTTON: | 247 case FIELDTYPE_PUSHBUTTON: |
248 case FIELDTYPE_CHECKBOX: | 248 case FIELDTYPE_CHECKBOX: |
249 case FIELDTYPE_RADIOBUTTON: | 249 case FIELDTYPE_RADIOBUTTON: |
250 if (GetViewBBox(pPageView, pAnnot).Contains((int)point.x, (int)point.y)) | 250 if (GetViewBBox(pPageView, pAnnot).Contains((int)point.x, (int)point.y)) |
(...skipping 22 matching lines...) Expand all Loading... |
273 return TRUE; | 273 return TRUE; |
274 #endif // PDF_ENABLE_XFA | 274 #endif // PDF_ENABLE_XFA |
275 } | 275 } |
276 return bRet; | 276 return bRet; |
277 } | 277 } |
278 | 278 |
279 void CFFL_IFormFiller::OnButtonUp(CPDFSDK_Widget* pWidget, | 279 void CFFL_IFormFiller::OnButtonUp(CPDFSDK_Widget* pWidget, |
280 CPDFSDK_PageView* pPageView, | 280 CPDFSDK_PageView* pPageView, |
281 FX_BOOL& bReset, | 281 FX_BOOL& bReset, |
282 FX_BOOL& bExit, | 282 FX_BOOL& bExit, |
283 FX_UINT nFlag) { | 283 uint32_t nFlag) { |
284 ASSERT(pWidget); | 284 ASSERT(pWidget); |
285 | 285 |
286 if (!m_bNotifying) { | 286 if (!m_bNotifying) { |
287 if (pWidget->GetAAction(CPDF_AAction::ButtonUp).GetDict()) { | 287 if (pWidget->GetAAction(CPDF_AAction::ButtonUp).GetDict()) { |
288 m_bNotifying = TRUE; | 288 m_bNotifying = TRUE; |
289 int nAge = pWidget->GetAppearanceAge(); | 289 int nAge = pWidget->GetAppearanceAge(); |
290 int nValueAge = pWidget->GetValueAge(); | 290 int nValueAge = pWidget->GetValueAge(); |
291 | 291 |
292 ASSERT(pPageView); | 292 ASSERT(pPageView); |
293 | 293 |
(...skipping 16 matching lines...) Expand all Loading... |
310 } | 310 } |
311 | 311 |
312 bReset = TRUE; | 312 bReset = TRUE; |
313 } | 313 } |
314 } | 314 } |
315 } | 315 } |
316 } | 316 } |
317 | 317 |
318 FX_BOOL CFFL_IFormFiller::OnLButtonDblClk(CPDFSDK_PageView* pPageView, | 318 FX_BOOL CFFL_IFormFiller::OnLButtonDblClk(CPDFSDK_PageView* pPageView, |
319 CPDFSDK_Annot* pAnnot, | 319 CPDFSDK_Annot* pAnnot, |
320 FX_UINT nFlags, | 320 uint32_t nFlags, |
321 const CFX_FloatPoint& point) { | 321 const CFX_FloatPoint& point) { |
322 ASSERT(pAnnot->GetPDFAnnot()->GetSubtype() == CPDF_Annot::Subtype::WIDGET); | 322 ASSERT(pAnnot->GetPDFAnnot()->GetSubtype() == CPDF_Annot::Subtype::WIDGET); |
323 | 323 |
324 if (CFFL_FormFiller* pFormFiller = GetFormFiller(pAnnot, FALSE)) { | 324 if (CFFL_FormFiller* pFormFiller = GetFormFiller(pAnnot, FALSE)) { |
325 return pFormFiller->OnLButtonDblClk(pPageView, pAnnot, nFlags, point); | 325 return pFormFiller->OnLButtonDblClk(pPageView, pAnnot, nFlags, point); |
326 } | 326 } |
327 | 327 |
328 return FALSE; | 328 return FALSE; |
329 } | 329 } |
330 | 330 |
331 FX_BOOL CFFL_IFormFiller::OnMouseMove(CPDFSDK_PageView* pPageView, | 331 FX_BOOL CFFL_IFormFiller::OnMouseMove(CPDFSDK_PageView* pPageView, |
332 CPDFSDK_Annot* pAnnot, | 332 CPDFSDK_Annot* pAnnot, |
333 FX_UINT nFlags, | 333 uint32_t nFlags, |
334 const CFX_FloatPoint& point) { | 334 const CFX_FloatPoint& point) { |
335 ASSERT(pAnnot->GetPDFAnnot()->GetSubtype() == CPDF_Annot::Subtype::WIDGET); | 335 ASSERT(pAnnot->GetPDFAnnot()->GetSubtype() == CPDF_Annot::Subtype::WIDGET); |
336 | 336 |
337 // change cursor | 337 // change cursor |
338 if (CFFL_FormFiller* pFormFiller = GetFormFiller(pAnnot, TRUE)) { | 338 if (CFFL_FormFiller* pFormFiller = GetFormFiller(pAnnot, TRUE)) { |
339 return pFormFiller->OnMouseMove(pPageView, pAnnot, nFlags, point); | 339 return pFormFiller->OnMouseMove(pPageView, pAnnot, nFlags, point); |
340 } | 340 } |
341 | 341 |
342 return FALSE; | 342 return FALSE; |
343 } | 343 } |
344 | 344 |
345 FX_BOOL CFFL_IFormFiller::OnMouseWheel(CPDFSDK_PageView* pPageView, | 345 FX_BOOL CFFL_IFormFiller::OnMouseWheel(CPDFSDK_PageView* pPageView, |
346 CPDFSDK_Annot* pAnnot, | 346 CPDFSDK_Annot* pAnnot, |
347 FX_UINT nFlags, | 347 uint32_t nFlags, |
348 short zDelta, | 348 short zDelta, |
349 const CFX_FloatPoint& point) { | 349 const CFX_FloatPoint& point) { |
350 ASSERT(pAnnot->GetPDFAnnot()->GetSubtype() == CPDF_Annot::Subtype::WIDGET); | 350 ASSERT(pAnnot->GetPDFAnnot()->GetSubtype() == CPDF_Annot::Subtype::WIDGET); |
351 | 351 |
352 if (CFFL_FormFiller* pFormFiller = GetFormFiller(pAnnot, FALSE)) { | 352 if (CFFL_FormFiller* pFormFiller = GetFormFiller(pAnnot, FALSE)) { |
353 return pFormFiller->OnMouseWheel(pPageView, pAnnot, nFlags, zDelta, point); | 353 return pFormFiller->OnMouseWheel(pPageView, pAnnot, nFlags, zDelta, point); |
354 } | 354 } |
355 | 355 |
356 return FALSE; | 356 return FALSE; |
357 } | 357 } |
358 | 358 |
359 FX_BOOL CFFL_IFormFiller::OnRButtonDown(CPDFSDK_PageView* pPageView, | 359 FX_BOOL CFFL_IFormFiller::OnRButtonDown(CPDFSDK_PageView* pPageView, |
360 CPDFSDK_Annot* pAnnot, | 360 CPDFSDK_Annot* pAnnot, |
361 FX_UINT nFlags, | 361 uint32_t nFlags, |
362 const CFX_FloatPoint& point) { | 362 const CFX_FloatPoint& point) { |
363 ASSERT(pAnnot->GetPDFAnnot()->GetSubtype() == CPDF_Annot::Subtype::WIDGET); | 363 ASSERT(pAnnot->GetPDFAnnot()->GetSubtype() == CPDF_Annot::Subtype::WIDGET); |
364 | 364 |
365 if (CFFL_FormFiller* pFormFiller = GetFormFiller(pAnnot, FALSE)) { | 365 if (CFFL_FormFiller* pFormFiller = GetFormFiller(pAnnot, FALSE)) { |
366 return pFormFiller->OnRButtonDown(pPageView, pAnnot, nFlags, point); | 366 return pFormFiller->OnRButtonDown(pPageView, pAnnot, nFlags, point); |
367 } | 367 } |
368 | 368 |
369 return FALSE; | 369 return FALSE; |
370 } | 370 } |
371 | 371 |
372 FX_BOOL CFFL_IFormFiller::OnRButtonUp(CPDFSDK_PageView* pPageView, | 372 FX_BOOL CFFL_IFormFiller::OnRButtonUp(CPDFSDK_PageView* pPageView, |
373 CPDFSDK_Annot* pAnnot, | 373 CPDFSDK_Annot* pAnnot, |
374 FX_UINT nFlags, | 374 uint32_t nFlags, |
375 const CFX_FloatPoint& point) { | 375 const CFX_FloatPoint& point) { |
376 ASSERT(pAnnot->GetPDFAnnot()->GetSubtype() == CPDF_Annot::Subtype::WIDGET); | 376 ASSERT(pAnnot->GetPDFAnnot()->GetSubtype() == CPDF_Annot::Subtype::WIDGET); |
377 | 377 |
378 if (CFFL_FormFiller* pFormFiller = GetFormFiller(pAnnot, FALSE)) { | 378 if (CFFL_FormFiller* pFormFiller = GetFormFiller(pAnnot, FALSE)) { |
379 return pFormFiller->OnRButtonUp(pPageView, pAnnot, nFlags, point); | 379 return pFormFiller->OnRButtonUp(pPageView, pAnnot, nFlags, point); |
380 } | 380 } |
381 | 381 |
382 return FALSE; | 382 return FALSE; |
383 } | 383 } |
384 | 384 |
385 FX_BOOL CFFL_IFormFiller::OnKeyDown(CPDFSDK_Annot* pAnnot, | 385 FX_BOOL CFFL_IFormFiller::OnKeyDown(CPDFSDK_Annot* pAnnot, |
386 FX_UINT nKeyCode, | 386 uint32_t nKeyCode, |
387 FX_UINT nFlags) { | 387 uint32_t nFlags) { |
388 ASSERT(pAnnot->GetPDFAnnot()->GetSubtype() == CPDF_Annot::Subtype::WIDGET); | 388 ASSERT(pAnnot->GetPDFAnnot()->GetSubtype() == CPDF_Annot::Subtype::WIDGET); |
389 | 389 |
390 if (CFFL_FormFiller* pFormFiller = GetFormFiller(pAnnot, FALSE)) { | 390 if (CFFL_FormFiller* pFormFiller = GetFormFiller(pAnnot, FALSE)) { |
391 return pFormFiller->OnKeyDown(pAnnot, nKeyCode, nFlags); | 391 return pFormFiller->OnKeyDown(pAnnot, nKeyCode, nFlags); |
392 } | 392 } |
393 | 393 |
394 return FALSE; | 394 return FALSE; |
395 } | 395 } |
396 | 396 |
397 FX_BOOL CFFL_IFormFiller::OnChar(CPDFSDK_Annot* pAnnot, | 397 FX_BOOL CFFL_IFormFiller::OnChar(CPDFSDK_Annot* pAnnot, |
398 FX_UINT nChar, | 398 uint32_t nChar, |
399 FX_UINT nFlags) { | 399 uint32_t nFlags) { |
400 ASSERT(pAnnot->GetPDFAnnot()->GetSubtype() == CPDF_Annot::Subtype::WIDGET); | 400 ASSERT(pAnnot->GetPDFAnnot()->GetSubtype() == CPDF_Annot::Subtype::WIDGET); |
401 if (nChar == FWL_VKEY_Tab) | 401 if (nChar == FWL_VKEY_Tab) |
402 return TRUE; | 402 return TRUE; |
403 | 403 |
404 if (CFFL_FormFiller* pFormFiller = GetFormFiller(pAnnot, FALSE)) | 404 if (CFFL_FormFiller* pFormFiller = GetFormFiller(pAnnot, FALSE)) |
405 return pFormFiller->OnChar(pAnnot, nChar, nFlags); | 405 return pFormFiller->OnChar(pAnnot, nChar, nFlags); |
406 | 406 |
407 return FALSE; | 407 return FALSE; |
408 } | 408 } |
409 | 409 |
410 FX_BOOL CFFL_IFormFiller::OnSetFocus(CPDFSDK_Annot* pAnnot, FX_UINT nFlag) { | 410 FX_BOOL CFFL_IFormFiller::OnSetFocus(CPDFSDK_Annot* pAnnot, uint32_t nFlag) { |
411 if (!pAnnot) | 411 if (!pAnnot) |
412 return FALSE; | 412 return FALSE; |
413 | 413 |
414 ASSERT(pAnnot->GetPDFAnnot()->GetSubtype() == CPDF_Annot::Subtype::WIDGET); | 414 ASSERT(pAnnot->GetPDFAnnot()->GetSubtype() == CPDF_Annot::Subtype::WIDGET); |
415 | 415 |
416 if (!m_bNotifying) { | 416 if (!m_bNotifying) { |
417 CPDFSDK_Widget* pWidget = (CPDFSDK_Widget*)pAnnot; | 417 CPDFSDK_Widget* pWidget = (CPDFSDK_Widget*)pAnnot; |
418 if (pWidget->GetAAction(CPDF_AAction::GetFocus).GetDict()) { | 418 if (pWidget->GetAAction(CPDF_AAction::GetFocus).GetDict()) { |
419 m_bNotifying = TRUE; | 419 m_bNotifying = TRUE; |
420 pWidget->GetAppearanceAge(); | 420 pWidget->GetAppearanceAge(); |
(...skipping 23 matching lines...) Expand all Loading... |
444 } | 444 } |
445 } | 445 } |
446 } | 446 } |
447 | 447 |
448 if (CFFL_FormFiller* pFormFiller = GetFormFiller(pAnnot, TRUE)) | 448 if (CFFL_FormFiller* pFormFiller = GetFormFiller(pAnnot, TRUE)) |
449 pFormFiller->SetFocusForAnnot(pAnnot, nFlag); | 449 pFormFiller->SetFocusForAnnot(pAnnot, nFlag); |
450 | 450 |
451 return TRUE; | 451 return TRUE; |
452 } | 452 } |
453 | 453 |
454 FX_BOOL CFFL_IFormFiller::OnKillFocus(CPDFSDK_Annot* pAnnot, FX_UINT nFlag) { | 454 FX_BOOL CFFL_IFormFiller::OnKillFocus(CPDFSDK_Annot* pAnnot, uint32_t nFlag) { |
455 if (!pAnnot) | 455 if (!pAnnot) |
456 return FALSE; | 456 return FALSE; |
457 ASSERT(pAnnot->GetPDFAnnot()->GetSubtype() == CPDF_Annot::Subtype::WIDGET); | 457 ASSERT(pAnnot->GetPDFAnnot()->GetSubtype() == CPDF_Annot::Subtype::WIDGET); |
458 | 458 |
459 if (CFFL_FormFiller* pFormFiller = GetFormFiller(pAnnot, FALSE)) { | 459 if (CFFL_FormFiller* pFormFiller = GetFormFiller(pAnnot, FALSE)) { |
460 pFormFiller->KillFocusForAnnot(pAnnot, nFlag); | 460 pFormFiller->KillFocusForAnnot(pAnnot, nFlag); |
461 | 461 |
462 if (!m_bNotifying) { | 462 if (!m_bNotifying) { |
463 CPDFSDK_Widget* pWidget = (CPDFSDK_Widget*)pAnnot; | 463 CPDFSDK_Widget* pWidget = (CPDFSDK_Widget*)pAnnot; |
464 if (pWidget->GetAAction(CPDF_AAction::LoseFocus).GetDict()) { | 464 if (pWidget->GetAAction(CPDF_AAction::LoseFocus).GetDict()) { |
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
732 | 732 |
733 m_bNotifying = FALSE; | 733 m_bNotifying = FALSE; |
734 } | 734 } |
735 } | 735 } |
736 | 736 |
737 #ifdef PDF_ENABLE_XFA | 737 #ifdef PDF_ENABLE_XFA |
738 void CFFL_IFormFiller::OnClick(CPDFSDK_Widget* pWidget, | 738 void CFFL_IFormFiller::OnClick(CPDFSDK_Widget* pWidget, |
739 CPDFSDK_PageView* pPageView, | 739 CPDFSDK_PageView* pPageView, |
740 FX_BOOL& bReset, | 740 FX_BOOL& bReset, |
741 FX_BOOL& bExit, | 741 FX_BOOL& bExit, |
742 FX_UINT nFlag) { | 742 uint32_t nFlag) { |
743 if (!m_bNotifying) { | 743 if (!m_bNotifying) { |
744 if (pWidget->HasXFAAAction(PDFSDK_XFA_Click)) { | 744 if (pWidget->HasXFAAAction(PDFSDK_XFA_Click)) { |
745 m_bNotifying = TRUE; | 745 m_bNotifying = TRUE; |
746 int nAge = pWidget->GetAppearanceAge(); | 746 int nAge = pWidget->GetAppearanceAge(); |
747 int nValueAge = pWidget->GetValueAge(); | 747 int nValueAge = pWidget->GetValueAge(); |
748 | 748 |
749 PDFSDK_FieldAction fa; | 749 PDFSDK_FieldAction fa; |
750 fa.bModifier = m_pApp->IsCTRLKeyDown(nFlag); | 750 fa.bModifier = m_pApp->IsCTRLKeyDown(nFlag); |
751 fa.bShift = m_pApp->IsSHIFTKeyDown(nFlag); | 751 fa.bShift = m_pApp->IsSHIFTKeyDown(nFlag); |
752 | 752 |
(...skipping 14 matching lines...) Expand all Loading... |
767 bReset = TRUE; | 767 bReset = TRUE; |
768 } | 768 } |
769 } | 769 } |
770 } | 770 } |
771 } | 771 } |
772 | 772 |
773 void CFFL_IFormFiller::OnFull(CPDFSDK_Widget* pWidget, | 773 void CFFL_IFormFiller::OnFull(CPDFSDK_Widget* pWidget, |
774 CPDFSDK_PageView* pPageView, | 774 CPDFSDK_PageView* pPageView, |
775 FX_BOOL& bReset, | 775 FX_BOOL& bReset, |
776 FX_BOOL& bExit, | 776 FX_BOOL& bExit, |
777 FX_UINT nFlag) { | 777 uint32_t nFlag) { |
778 if (!m_bNotifying) { | 778 if (!m_bNotifying) { |
779 if (pWidget->HasXFAAAction(PDFSDK_XFA_Full)) { | 779 if (pWidget->HasXFAAAction(PDFSDK_XFA_Full)) { |
780 m_bNotifying = TRUE; | 780 m_bNotifying = TRUE; |
781 int nAge = pWidget->GetAppearanceAge(); | 781 int nAge = pWidget->GetAppearanceAge(); |
782 int nValueAge = pWidget->GetValueAge(); | 782 int nValueAge = pWidget->GetValueAge(); |
783 | 783 |
784 PDFSDK_FieldAction fa; | 784 PDFSDK_FieldAction fa; |
785 fa.bModifier = m_pApp->IsCTRLKeyDown(nFlag); | 785 fa.bModifier = m_pApp->IsCTRLKeyDown(nFlag); |
786 fa.bShift = m_pApp->IsSHIFTKeyDown(nFlag); | 786 fa.bShift = m_pApp->IsSHIFTKeyDown(nFlag); |
787 | 787 |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
834 | 834 |
835 if (bTempReset || bTempExit) { | 835 if (bTempReset || bTempExit) { |
836 bExit = TRUE; | 836 bExit = TRUE; |
837 } | 837 } |
838 } | 838 } |
839 | 839 |
840 void CFFL_IFormFiller::OnPreOpen(CPDFSDK_Widget* pWidget, | 840 void CFFL_IFormFiller::OnPreOpen(CPDFSDK_Widget* pWidget, |
841 CPDFSDK_PageView* pPageView, | 841 CPDFSDK_PageView* pPageView, |
842 FX_BOOL& bReset, | 842 FX_BOOL& bReset, |
843 FX_BOOL& bExit, | 843 FX_BOOL& bExit, |
844 FX_UINT nFlag) { | 844 uint32_t nFlag) { |
845 if (!m_bNotifying) { | 845 if (!m_bNotifying) { |
846 if (pWidget->HasXFAAAction(PDFSDK_XFA_PreOpen)) { | 846 if (pWidget->HasXFAAAction(PDFSDK_XFA_PreOpen)) { |
847 m_bNotifying = TRUE; | 847 m_bNotifying = TRUE; |
848 int nAge = pWidget->GetAppearanceAge(); | 848 int nAge = pWidget->GetAppearanceAge(); |
849 int nValueAge = pWidget->GetValueAge(); | 849 int nValueAge = pWidget->GetValueAge(); |
850 | 850 |
851 PDFSDK_FieldAction fa; | 851 PDFSDK_FieldAction fa; |
852 fa.bModifier = m_pApp->IsCTRLKeyDown(nFlag); | 852 fa.bModifier = m_pApp->IsCTRLKeyDown(nFlag); |
853 fa.bShift = m_pApp->IsSHIFTKeyDown(nFlag); | 853 fa.bShift = m_pApp->IsSHIFTKeyDown(nFlag); |
854 | 854 |
(...skipping 14 matching lines...) Expand all Loading... |
869 bReset = TRUE; | 869 bReset = TRUE; |
870 } | 870 } |
871 } | 871 } |
872 } | 872 } |
873 } | 873 } |
874 | 874 |
875 void CFFL_IFormFiller::OnPostOpen(CPDFSDK_Widget* pWidget, | 875 void CFFL_IFormFiller::OnPostOpen(CPDFSDK_Widget* pWidget, |
876 CPDFSDK_PageView* pPageView, | 876 CPDFSDK_PageView* pPageView, |
877 FX_BOOL& bReset, | 877 FX_BOOL& bReset, |
878 FX_BOOL& bExit, | 878 FX_BOOL& bExit, |
879 FX_UINT nFlag) { | 879 uint32_t nFlag) { |
880 if (!m_bNotifying) { | 880 if (!m_bNotifying) { |
881 if (pWidget->HasXFAAAction(PDFSDK_XFA_PostOpen)) { | 881 if (pWidget->HasXFAAAction(PDFSDK_XFA_PostOpen)) { |
882 m_bNotifying = TRUE; | 882 m_bNotifying = TRUE; |
883 int nAge = pWidget->GetAppearanceAge(); | 883 int nAge = pWidget->GetAppearanceAge(); |
884 int nValueAge = pWidget->GetValueAge(); | 884 int nValueAge = pWidget->GetValueAge(); |
885 | 885 |
886 PDFSDK_FieldAction fa; | 886 PDFSDK_FieldAction fa; |
887 fa.bModifier = m_pApp->IsCTRLKeyDown(nFlag); | 887 fa.bModifier = m_pApp->IsCTRLKeyDown(nFlag); |
888 fa.bShift = m_pApp->IsSHIFTKeyDown(nFlag); | 888 fa.bShift = m_pApp->IsSHIFTKeyDown(nFlag); |
889 | 889 |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
998 bExit = TRUE; | 998 bExit = TRUE; |
999 m_bNotifying = FALSE; | 999 m_bNotifying = FALSE; |
1000 return; | 1000 return; |
1001 } | 1001 } |
1002 } | 1002 } |
1003 | 1003 |
1004 m_bNotifying = FALSE; | 1004 m_bNotifying = FALSE; |
1005 } | 1005 } |
1006 } | 1006 } |
1007 } | 1007 } |
OLD | NEW |