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/javascript/Document.h" | 7 #include "fpdfsdk/javascript/Document.h" |
8 | 8 |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 474 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
485 CFX_FloatRect rcAnnot = pWidget->GetRect(); | 485 CFX_FloatRect rcAnnot = pWidget->GetRect(); |
486 --rcAnnot.left; | 486 --rcAnnot.left; |
487 --rcAnnot.bottom; | 487 --rcAnnot.bottom; |
488 ++rcAnnot.right; | 488 ++rcAnnot.right; |
489 ++rcAnnot.top; | 489 ++rcAnnot.top; |
490 | 490 |
491 std::vector<CFX_FloatRect> aRefresh(1, rcAnnot); | 491 std::vector<CFX_FloatRect> aRefresh(1, rcAnnot); |
492 UnderlyingPageType* pPage = pWidget->GetUnderlyingPage(); | 492 UnderlyingPageType* pPage = pWidget->GetUnderlyingPage(); |
493 ASSERT(pPage); | 493 ASSERT(pPage); |
494 | 494 |
495 CPDFSDK_PageView* pPageView = m_pDocument->GetPageView(pPage); | 495 CPDFSDK_PageView* pPageView = m_pDocument->GetPageView(pPage, true); |
496 pPageView->DeleteAnnot(pWidget); | 496 pPageView->DeleteAnnot(pWidget); |
497 pPageView->UpdateRects(aRefresh); | 497 pPageView->UpdateRects(aRefresh); |
498 } | 498 } |
499 m_pDocument->SetChangeMark(); | 499 m_pDocument->SetChangeMark(); |
500 | 500 |
501 return TRUE; | 501 return TRUE; |
502 } | 502 } |
503 | 503 |
504 // reset filed values within a document. | 504 // reset filed values within a document. |
505 // comment: | 505 // comment: |
(...skipping 1060 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1566 } | 1566 } |
1567 } | 1567 } |
1568 | 1568 |
1569 for (const auto& pData : DelayDataForFieldAndControlIndex) | 1569 for (const auto& pData : DelayDataForFieldAndControlIndex) |
1570 Field::DoDelay(m_pDocument, pData.get()); | 1570 Field::DoDelay(m_pDocument, pData.get()); |
1571 } | 1571 } |
1572 | 1572 |
1573 CJS_Document* Document::GetCJSDoc() const { | 1573 CJS_Document* Document::GetCJSDoc() const { |
1574 return static_cast<CJS_Document*>(m_pJSObject); | 1574 return static_cast<CJS_Document*>(m_pJSObject); |
1575 } | 1575 } |
OLD | NEW |