| 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/formfiller/FFL_CheckBox.h" | 7 #include "fpdfsdk/include/formfiller/FFL_CheckBox.h" |
| 8 #include "fpdfsdk/include/formfiller/FFL_ComboBox.h" | 8 #include "fpdfsdk/include/formfiller/FFL_ComboBox.h" |
| 9 #include "fpdfsdk/include/formfiller/FFL_FormFiller.h" | 9 #include "fpdfsdk/include/formfiller/FFL_FormFiller.h" |
| 10 #include "fpdfsdk/include/formfiller/FFL_IFormFiller.h" | 10 #include "fpdfsdk/include/formfiller/FFL_IFormFiller.h" |
| (...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 271 bRet = pFormFiller->OnLButtonUp(pPageView, pAnnot, nFlags, point); | 271 bRet = pFormFiller->OnLButtonUp(pPageView, pAnnot, nFlags, point); |
| 272 } | 272 } |
| 273 | 273 |
| 274 if (pDocument->GetFocusAnnot() == pAnnot) { | 274 if (pDocument->GetFocusAnnot() == pAnnot) { |
| 275 FX_BOOL bExit = FALSE; | 275 FX_BOOL bExit = FALSE; |
| 276 FX_BOOL bReset = FALSE; | 276 FX_BOOL bReset = FALSE; |
| 277 OnButtonUp(pWidget, pPageView, bReset, bExit, nFlags); | 277 OnButtonUp(pWidget, pPageView, bReset, bExit, nFlags); |
| 278 if (bExit) | 278 if (bExit) |
| 279 return TRUE; | 279 return TRUE; |
| 280 #ifdef PDF_ENABLE_XFA | 280 #ifdef PDF_ENABLE_XFA |
| 281 | |
| 282 OnClick(pWidget, pPageView, bReset, bExit, nFlags); | 281 OnClick(pWidget, pPageView, bReset, bExit, nFlags); |
| 283 if (bExit) | 282 if (bExit) |
| 284 return TRUE; | 283 return TRUE; |
| 285 #endif | 284 #endif // PDF_ENABLE_XFA |
| 286 } | 285 } |
| 287 return bRet; | 286 return bRet; |
| 288 } | 287 } |
| 289 | 288 |
| 290 void CFFL_IFormFiller::OnButtonUp(CPDFSDK_Widget* pWidget, | 289 void CFFL_IFormFiller::OnButtonUp(CPDFSDK_Widget* pWidget, |
| 291 CPDFSDK_PageView* pPageView, | 290 CPDFSDK_PageView* pPageView, |
| 292 FX_BOOL& bReset, | 291 FX_BOOL& bReset, |
| 293 FX_BOOL& bExit, | 292 FX_BOOL& bExit, |
| 294 FX_UINT nFlag) { | 293 FX_UINT nFlag) { |
| 295 ASSERT(pWidget != NULL); | 294 ASSERT(pWidget != NULL); |
| (...skipping 677 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 973 if (CFFL_FormFiller* pFormFiller = GetFormFiller(pWidget, FALSE)) { | 972 if (CFFL_FormFiller* pFormFiller = GetFormFiller(pWidget, FALSE)) { |
| 974 pFormFiller->ResetPDFWindow(pPageView, | 973 pFormFiller->ResetPDFWindow(pPageView, |
| 975 nValueAge == pWidget->GetValueAge()); | 974 nValueAge == pWidget->GetValueAge()); |
| 976 } | 975 } |
| 977 | 976 |
| 978 bReset = TRUE; | 977 bReset = TRUE; |
| 979 } | 978 } |
| 980 } | 979 } |
| 981 } | 980 } |
| 982 } | 981 } |
| 982 #endif // PDF_ENABLE_XFA |
| 983 | 983 |
| 984 #endif | |
| 985 FX_BOOL CFFL_IFormFiller::IsValidAnnot(CPDFSDK_PageView* pPageView, | 984 FX_BOOL CFFL_IFormFiller::IsValidAnnot(CPDFSDK_PageView* pPageView, |
| 986 CPDFSDK_Annot* pAnnot) { | 985 CPDFSDK_Annot* pAnnot) { |
| 987 if (pPageView) | 986 if (pPageView) |
| 988 return pPageView->IsValidAnnot(pAnnot->GetPDFAnnot()); | 987 return pPageView->IsValidAnnot(pAnnot->GetPDFAnnot()); |
| 989 | 988 |
| 990 return FALSE; | 989 return FALSE; |
| 991 } | 990 } |
| 992 | 991 |
| 993 void CFFL_IFormFiller::OnBeforeKeyStroke(void* pPrivateData, | 992 void CFFL_IFormFiller::OnBeforeKeyStroke(void* pPrivateData, |
| 994 CFX_WideString& strChange, | 993 CFX_WideString& strChange, |
| (...skipping 15 matching lines...) Expand all Loading... |
| 1010 if (pFormFiller->IsFieldFull(pData->pPageView)) { | 1009 if (pFormFiller->IsFieldFull(pData->pPageView)) { |
| 1011 FX_BOOL bFullExit = FALSE; | 1010 FX_BOOL bFullExit = FALSE; |
| 1012 FX_BOOL bFullReset = FALSE; | 1011 FX_BOOL bFullReset = FALSE; |
| 1013 OnFull(pData->pWidget, pData->pPageView, bFullReset, bFullExit, nFlag); | 1012 OnFull(pData->pWidget, pData->pPageView, bFullReset, bFullExit, nFlag); |
| 1014 | 1013 |
| 1015 if (bFullReset || bFullExit) { | 1014 if (bFullReset || bFullExit) { |
| 1016 bExit = TRUE; | 1015 bExit = TRUE; |
| 1017 return; | 1016 return; |
| 1018 } | 1017 } |
| 1019 } | 1018 } |
| 1019 #endif // PDF_ENABLE_XFA |
| 1020 | 1020 |
| 1021 #endif | |
| 1022 if (!m_bNotifying) { | 1021 if (!m_bNotifying) { |
| 1023 if (pData->pWidget->GetAAction(CPDF_AAction::KeyStroke)) { | 1022 if (pData->pWidget->GetAAction(CPDF_AAction::KeyStroke)) { |
| 1024 m_bNotifying = TRUE; | 1023 m_bNotifying = TRUE; |
| 1025 int nAge = pData->pWidget->GetAppearanceAge(); | 1024 int nAge = pData->pWidget->GetAppearanceAge(); |
| 1026 int nValueAge = pData->pWidget->GetValueAge(); | 1025 int nValueAge = pData->pWidget->GetValueAge(); |
| 1027 | 1026 |
| 1028 ASSERT(pData->pPageView != NULL); | 1027 ASSERT(pData->pPageView != NULL); |
| 1029 CPDFSDK_Document* pDocument = pData->pPageView->GetSDKDocument(); | 1028 CPDFSDK_Document* pDocument = pData->pPageView->GetSDKDocument(); |
| 1030 | 1029 |
| 1031 PDFSDK_FieldAction fa; | 1030 PDFSDK_FieldAction fa; |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1075 bExit = TRUE; | 1074 bExit = TRUE; |
| 1076 m_bNotifying = FALSE; | 1075 m_bNotifying = FALSE; |
| 1077 return; | 1076 return; |
| 1078 } | 1077 } |
| 1079 } | 1078 } |
| 1080 | 1079 |
| 1081 m_bNotifying = FALSE; | 1080 m_bNotifying = FALSE; |
| 1082 } | 1081 } |
| 1083 } | 1082 } |
| 1084 } | 1083 } |
| OLD | NEW |