| 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 "Field.h" | 7 #include "Field.h" |
| 8 | 8 |
| 9 #include "Document.h" | 9 #include "Document.h" |
| 10 #include "Icon.h" | 10 #include "Icon.h" |
| (...skipping 3379 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3390 | 3390 |
| 3391 CPDFSDK_InterForm* pInterForm = | 3391 CPDFSDK_InterForm* pInterForm = |
| 3392 (CPDFSDK_InterForm*)m_pDocument->GetInterForm(); | 3392 (CPDFSDK_InterForm*)m_pDocument->GetInterForm(); |
| 3393 ASSERT(pInterForm != NULL); | 3393 ASSERT(pInterForm != NULL); |
| 3394 | 3394 |
| 3395 CPDFSDK_Widget* pWidget = NULL; | 3395 CPDFSDK_Widget* pWidget = NULL; |
| 3396 if (nCount == 1) { | 3396 if (nCount == 1) { |
| 3397 pWidget = pInterForm->GetWidget(pFormField->GetControl(0)); | 3397 pWidget = pInterForm->GetWidget(pFormField->GetControl(0)); |
| 3398 } else { | 3398 } else { |
| 3399 CPDFDoc_Environment* pEnv = m_pDocument->GetEnv(); | 3399 CPDFDoc_Environment* pEnv = m_pDocument->GetEnv(); |
| 3400 ASSERT(pEnv); | 3400 UnderlyingPageType* pPage = UnderlyingFromFPDFPage( |
| 3401 CPDFXFA_Page* pPage = | 3401 pEnv->FFI_GetCurrentPage(m_pDocument->GetUnderlyingDocument())); |
| 3402 (CPDFXFA_Page*)pEnv->FFI_GetCurrentPage(m_pDocument->GetDocument()); | |
| 3403 if (!pPage) | 3402 if (!pPage) |
| 3404 return FALSE; | 3403 return FALSE; |
| 3405 if (CPDFSDK_PageView* pCurPageView = m_pDocument->GetPageView(pPage)) { | 3404 if (CPDFSDK_PageView* pCurPageView = m_pDocument->GetPageView(pPage)) { |
| 3406 for (int32_t i = 0; i < nCount; i++) { | 3405 for (int32_t i = 0; i < nCount; i++) { |
| 3407 if (CPDFSDK_Widget* pTempWidget = | 3406 if (CPDFSDK_Widget* pTempWidget = |
| 3408 pInterForm->GetWidget(pFormField->GetControl(i))) { | 3407 pInterForm->GetWidget(pFormField->GetControl(i))) { |
| 3409 if (pTempWidget->GetPDFPage() == pCurPageView->GetPDFPage()) { | 3408 if (pTempWidget->GetPDFPage() == pCurPageView->GetPDFPage()) { |
| 3410 pWidget = pTempWidget; | 3409 pWidget = pTempWidget; |
| 3411 break; | 3410 break; |
| 3412 } | 3411 } |
| (...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3739 #define JS_FIELD_MINWIDTH 1 | 3738 #define JS_FIELD_MINWIDTH 1 |
| 3740 #define JS_FIELD_MINHEIGHT 1 | 3739 #define JS_FIELD_MINHEIGHT 1 |
| 3741 | 3740 |
| 3742 void Field::AddField(CPDFSDK_Document* pDocument, | 3741 void Field::AddField(CPDFSDK_Document* pDocument, |
| 3743 int nPageIndex, | 3742 int nPageIndex, |
| 3744 int nFieldType, | 3743 int nFieldType, |
| 3745 const CFX_WideString& sName, | 3744 const CFX_WideString& sName, |
| 3746 const CPDF_Rect& rcCoords) { | 3745 const CPDF_Rect& rcCoords) { |
| 3747 // Not supported. | 3746 // Not supported. |
| 3748 } | 3747 } |
| OLD | NEW |