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/include/fsdk_baseform.h" | 7 #include "fpdfsdk/include/fsdk_baseform.h" |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 #include <map> | 10 #include <map> |
(...skipping 2260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2271 | 2271 |
2272 void CPDFSDK_InterForm::UpdateField(CPDF_FormField* pFormField) { | 2272 void CPDFSDK_InterForm::UpdateField(CPDF_FormField* pFormField) { |
2273 for (int i = 0, sz = pFormField->CountControls(); i < sz; i++) { | 2273 for (int i = 0, sz = pFormField->CountControls(); i < sz; i++) { |
2274 CPDF_FormControl* pFormCtrl = pFormField->GetControl(i); | 2274 CPDF_FormControl* pFormCtrl = pFormField->GetControl(i); |
2275 ASSERT(pFormCtrl); | 2275 ASSERT(pFormCtrl); |
2276 | 2276 |
2277 if (CPDFSDK_Widget* pWidget = GetWidget(pFormCtrl)) { | 2277 if (CPDFSDK_Widget* pWidget = GetWidget(pFormCtrl)) { |
2278 CPDFDoc_Environment* pEnv = m_pDocument->GetEnv(); | 2278 CPDFDoc_Environment* pEnv = m_pDocument->GetEnv(); |
2279 CFFL_IFormFiller* pIFormFiller = pEnv->GetIFormFiller(); | 2279 CFFL_IFormFiller* pIFormFiller = pEnv->GetIFormFiller(); |
2280 UnderlyingPageType* pPage = pWidget->GetUnderlyingPage(); | 2280 UnderlyingPageType* pPage = pWidget->GetUnderlyingPage(); |
2281 CPDFSDK_PageView* pPageView = m_pDocument->GetPageView(pPage, FALSE); | 2281 CPDFSDK_PageView* pPageView = m_pDocument->GetPageView(pPage, false); |
2282 FX_RECT rcBBox = pIFormFiller->GetViewBBox(pPageView, pWidget); | 2282 FX_RECT rcBBox = pIFormFiller->GetViewBBox(pPageView, pWidget); |
2283 | 2283 |
2284 pEnv->FFI_Invalidate(pPage, rcBBox.left, rcBBox.top, rcBBox.right, | 2284 pEnv->FFI_Invalidate(pPage, rcBBox.left, rcBBox.top, rcBBox.right, |
2285 rcBBox.bottom); | 2285 rcBBox.bottom); |
2286 } | 2286 } |
2287 } | 2287 } |
2288 } | 2288 } |
2289 | 2289 |
2290 FX_BOOL CPDFSDK_InterForm::OnKeyStrokeCommit(CPDF_FormField* pFormField, | 2290 FX_BOOL CPDFSDK_InterForm::OnKeyStrokeCommit(CPDF_FormField* pFormField, |
2291 const CFX_WideString& csValue) { | 2291 const CFX_WideString& csValue) { |
(...skipping 535 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2827 break; | 2827 break; |
2828 } | 2828 } |
2829 } | 2829 } |
2830 } | 2830 } |
2831 | 2831 |
2832 CFX_FloatRect CBA_AnnotIterator::GetAnnotRect(const CPDFSDK_Annot* pAnnot) { | 2832 CFX_FloatRect CBA_AnnotIterator::GetAnnotRect(const CPDFSDK_Annot* pAnnot) { |
2833 CFX_FloatRect rcAnnot; | 2833 CFX_FloatRect rcAnnot; |
2834 pAnnot->GetPDFAnnot()->GetRect(rcAnnot); | 2834 pAnnot->GetPDFAnnot()->GetRect(rcAnnot); |
2835 return rcAnnot; | 2835 return rcAnnot; |
2836 } | 2836 } |
OLD | NEW |