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/src/javascript/Document.h" | 7 #include "fpdfsdk/src/javascript/Document.h" |
8 | 8 |
9 #include "fpdfsdk/include/fsdk_mgr.h" // For CPDFDoc_Environment. | 9 #include "fpdfsdk/include/fsdk_mgr.h" // For CPDFDoc_Environment. |
10 #include "fpdfsdk/include/javascript/IJavaScript.h" | 10 #include "fpdfsdk/include/javascript/IJavaScript.h" |
(...skipping 476 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
487 CPDFSDK_InterForm* pInterForm = | 487 CPDFSDK_InterForm* pInterForm = |
488 (CPDFSDK_InterForm*)m_pDocument->GetInterForm(); | 488 (CPDFSDK_InterForm*)m_pDocument->GetInterForm(); |
489 | 489 |
490 std::vector<CPDFSDK_Widget*> widgets; | 490 std::vector<CPDFSDK_Widget*> widgets; |
491 pInterForm->GetWidgets(sFieldName, &widgets); | 491 pInterForm->GetWidgets(sFieldName, &widgets); |
492 | 492 |
493 if (widgets.empty()) | 493 if (widgets.empty()) |
494 return TRUE; | 494 return TRUE; |
495 | 495 |
496 for (CPDFSDK_Widget* pWidget : widgets) { | 496 for (CPDFSDK_Widget* pWidget : widgets) { |
497 CPDF_Rect rcAnnot = pWidget->GetRect(); | 497 CFX_FloatRect rcAnnot = pWidget->GetRect(); |
498 --rcAnnot.left; | 498 --rcAnnot.left; |
499 --rcAnnot.bottom; | 499 --rcAnnot.bottom; |
500 ++rcAnnot.right; | 500 ++rcAnnot.right; |
501 ++rcAnnot.top; | 501 ++rcAnnot.top; |
502 | 502 |
503 CFX_RectArray aRefresh; | 503 CFX_RectArray aRefresh; |
504 aRefresh.Add(rcAnnot); | 504 aRefresh.Add(rcAnnot); |
505 | 505 |
506 UnderlyingPageType* pPage = pWidget->GetUnderlyingPage(); | 506 UnderlyingPageType* pPage = pWidget->GetUnderlyingPage(); |
507 ASSERT(pPage); | 507 ASSERT(pPage); |
(...skipping 1116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1624 CJS_DelayData* pData = DelayDataForFieldAndControlIndex.GetAt(i); | 1624 CJS_DelayData* pData = DelayDataForFieldAndControlIndex.GetAt(i); |
1625 Field::DoDelay(m_pDocument, pData); | 1625 Field::DoDelay(m_pDocument, pData); |
1626 DelayDataForFieldAndControlIndex.SetAt(i, NULL); | 1626 DelayDataForFieldAndControlIndex.SetAt(i, NULL); |
1627 delete pData; | 1627 delete pData; |
1628 } | 1628 } |
1629 } | 1629 } |
1630 | 1630 |
1631 CJS_Document* Document::GetCJSDoc() const { | 1631 CJS_Document* Document::GetCJSDoc() const { |
1632 return static_cast<CJS_Document*>(m_pJSObject); | 1632 return static_cast<CJS_Document*>(m_pJSObject); |
1633 } | 1633 } |
OLD | NEW |