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

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

Issue 1737593006: Re-land "Replace CPDF_Rect and CPDF_Point with CFX types." (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Ooops. Created 4 years, 9 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
« no previous file with comments | « fpdfsdk/src/fxedit/fxet_pageobjs.cpp ('k') | fpdfsdk/src/javascript/Field.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "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
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
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 }
OLDNEW
« no previous file with comments | « fpdfsdk/src/fxedit/fxet_pageobjs.cpp ('k') | fpdfsdk/src/javascript/Field.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698