| 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 "xfa/fxfa/app/xfa_fffield.h" | 7 #include "xfa/fxfa/app/xfa_fffield.h" |
| 8 | 8 |
| 9 #include "xfa/fwl/basewidget/ifwl_edit.h" | 9 #include "xfa/fwl/basewidget/ifwl_edit.h" |
| 10 #include "xfa/fwl/core/cfwl_message.h" | 10 #include "xfa/fwl/core/cfwl_message.h" |
| (...skipping 713 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 724 return 1; | 724 return 1; |
| 725 } | 725 } |
| 726 IXFA_AppProvider* pAppProvider = GetApp()->GetAppProvider(); | 726 IXFA_AppProvider* pAppProvider = GetApp()->GetAppProvider(); |
| 727 if (pAppProvider) { | 727 if (pAppProvider) { |
| 728 CFX_WideString wsMessage; | 728 CFX_WideString wsMessage; |
| 729 CFX_WideString wsWarning; | 729 CFX_WideString wsWarning; |
| 730 pAppProvider->LoadString(XFA_IDS_NotModifyField, wsWarning); | 730 pAppProvider->LoadString(XFA_IDS_NotModifyField, wsWarning); |
| 731 wsMessage += wsWarning; | 731 wsMessage += wsWarning; |
| 732 CFX_WideString wsTitle; | 732 CFX_WideString wsTitle; |
| 733 pAppProvider->LoadString(XFA_IDS_CalcOverride, wsTitle); | 733 pAppProvider->LoadString(XFA_IDS_CalcOverride, wsTitle); |
| 734 pAppProvider->MsgBox(wsMessage.AsWideStringC(), | 734 pAppProvider->MsgBox(wsMessage.AsStringC(), wsTitle.AsStringC(), |
| 735 wsTitle.AsWideStringC(), XFA_MBICON_Warning, | 735 XFA_MBICON_Warning, XFA_MB_OK); |
| 736 XFA_MB_OK); | |
| 737 } | 736 } |
| 738 } | 737 } |
| 739 return 0; | 738 return 0; |
| 740 case XFA_ATTRIBUTEENUM_Warning: { | 739 case XFA_ATTRIBUTEENUM_Warning: { |
| 741 if (version <= XFA_VERSION_204) { | 740 if (version <= XFA_VERSION_204) { |
| 742 CXFA_Script script = calc.GetScript(); | 741 CXFA_Script script = calc.GetScript(); |
| 743 if (!script) { | 742 if (!script) { |
| 744 return 1; | 743 return 1; |
| 745 } | 744 } |
| 746 CFX_WideString wsExpression; | 745 CFX_WideString wsExpression; |
| (...skipping 10 matching lines...) Expand all Loading... |
| 757 CFX_WideString wsMessage; | 756 CFX_WideString wsMessage; |
| 758 calc.GetMessageText(wsMessage); | 757 calc.GetMessageText(wsMessage); |
| 759 if (!wsMessage.IsEmpty()) { | 758 if (!wsMessage.IsEmpty()) { |
| 760 wsMessage += L"\r\n"; | 759 wsMessage += L"\r\n"; |
| 761 } | 760 } |
| 762 CFX_WideString wsWarning; | 761 CFX_WideString wsWarning; |
| 763 pAppProvider->LoadString(XFA_IDS_ModifyField, wsWarning); | 762 pAppProvider->LoadString(XFA_IDS_ModifyField, wsWarning); |
| 764 wsMessage += wsWarning; | 763 wsMessage += wsWarning; |
| 765 CFX_WideString wsTitle; | 764 CFX_WideString wsTitle; |
| 766 pAppProvider->LoadString(XFA_IDS_CalcOverride, wsTitle); | 765 pAppProvider->LoadString(XFA_IDS_CalcOverride, wsTitle); |
| 767 if (pAppProvider->MsgBox(wsMessage.AsWideStringC(), | 766 if (pAppProvider->MsgBox(wsMessage.AsStringC(), wsTitle.AsStringC(), |
| 768 wsTitle.AsWideStringC(), XFA_MBICON_Warning, | 767 XFA_MBICON_Warning, |
| 769 XFA_MB_YesNo) == XFA_IDYes) { | 768 XFA_MB_YesNo) == XFA_IDYes) { |
| 770 pAcc->GetNode()->SetFlag(XFA_NODEFLAG_UserInteractive, TRUE, FALSE); | 769 pAcc->GetNode()->SetFlag(XFA_NODEFLAG_UserInteractive, TRUE, FALSE); |
| 771 return 1; | 770 return 1; |
| 772 } | 771 } |
| 773 } | 772 } |
| 774 return 0; | 773 return 0; |
| 775 } | 774 } |
| 776 case XFA_ATTRIBUTEENUM_Ignore: | 775 case XFA_ATTRIBUTEENUM_Ignore: |
| 777 return 0; | 776 return 0; |
| 778 case XFA_ATTRIBUTEENUM_Disabled: | 777 case XFA_ATTRIBUTEENUM_Disabled: |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 831 break; | 830 break; |
| 832 } | 831 } |
| 833 default: {} | 832 default: {} |
| 834 } | 833 } |
| 835 return FWL_ERR_Succeeded; | 834 return FWL_ERR_Succeeded; |
| 836 } | 835 } |
| 837 FWL_ERR CXFA_FFField::OnDrawWidget(CFX_Graphics* pGraphics, | 836 FWL_ERR CXFA_FFField::OnDrawWidget(CFX_Graphics* pGraphics, |
| 838 const CFX_Matrix* pMatrix) { | 837 const CFX_Matrix* pMatrix) { |
| 839 return FWL_ERR_Succeeded; | 838 return FWL_ERR_Succeeded; |
| 840 } | 839 } |
| OLD | NEW |