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

Side by Side Diff: xfa/fxfa/app/xfa_fffield.cpp

Issue 1890563003: Simplify XFA event handling. (Closed) Base URL: https://pdfium.googlesource.com/pdfium@master
Patch Set: address comments Created 4 years, 8 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 | « xfa/fxfa/app/xfa_ffdocview.cpp ('k') | xfa/fxfa/app/xfa_ffnotify.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 "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 748 matching lines...) Expand 10 before | Expand all | Expand 10 after
759 wsMessage += L"\r\n"; 759 wsMessage += L"\r\n";
760 } 760 }
761 CFX_WideString wsWarning; 761 CFX_WideString wsWarning;
762 pAppProvider->LoadString(XFA_IDS_ModifyField, wsWarning); 762 pAppProvider->LoadString(XFA_IDS_ModifyField, wsWarning);
763 wsMessage += wsWarning; 763 wsMessage += wsWarning;
764 CFX_WideString wsTitle; 764 CFX_WideString wsTitle;
765 pAppProvider->LoadString(XFA_IDS_CalcOverride, wsTitle); 765 pAppProvider->LoadString(XFA_IDS_CalcOverride, wsTitle);
766 if (pAppProvider->MsgBox(wsMessage.AsStringC(), wsTitle.AsStringC(), 766 if (pAppProvider->MsgBox(wsMessage.AsStringC(), wsTitle.AsStringC(),
767 XFA_MBICON_Warning, 767 XFA_MBICON_Warning,
768 XFA_MB_YesNo) == XFA_IDYes) { 768 XFA_MB_YesNo) == XFA_IDYes) {
769 pAcc->GetNode()->SetFlag(XFA_NODEFLAG_UserInteractive, TRUE, FALSE); 769 pAcc->GetNode()->SetFlag(XFA_NODEFLAG_UserInteractive, false);
770 return 1; 770 return 1;
771 } 771 }
772 } 772 }
773 return 0; 773 return 0;
774 } 774 }
775 case XFA_ATTRIBUTEENUM_Ignore: 775 case XFA_ATTRIBUTEENUM_Ignore:
776 return 0; 776 return 0;
777 case XFA_ATTRIBUTEENUM_Disabled: 777 case XFA_ATTRIBUTEENUM_Disabled:
778 pAcc->GetNode()->SetFlag(XFA_NODEFLAG_UserInteractive, TRUE, FALSE); 778 pAcc->GetNode()->SetFlag(XFA_NODEFLAG_UserInteractive, false);
779 default: 779 default:
780 return 1; 780 return 1;
781 } 781 }
782 } 782 }
783 return 1; 783 return 1;
784 } 784 }
785 FX_BOOL CXFA_FFField::CommitData() { 785 FX_BOOL CXFA_FFField::CommitData() {
786 return FALSE; 786 return FALSE;
787 } 787 }
788 FX_BOOL CXFA_FFField::IsDataChanged() { 788 FX_BOOL CXFA_FFField::IsDataChanged() {
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
830 break; 830 break;
831 } 831 }
832 default: {} 832 default: {}
833 } 833 }
834 return FWL_ERR_Succeeded; 834 return FWL_ERR_Succeeded;
835 } 835 }
836 FWL_ERR CXFA_FFField::OnDrawWidget(CFX_Graphics* pGraphics, 836 FWL_ERR CXFA_FFField::OnDrawWidget(CFX_Graphics* pGraphics,
837 const CFX_Matrix* pMatrix) { 837 const CFX_Matrix* pMatrix) {
838 return FWL_ERR_Succeeded; 838 return FWL_ERR_Succeeded;
839 } 839 }
OLDNEW
« no previous file with comments | « xfa/fxfa/app/xfa_ffdocview.cpp ('k') | xfa/fxfa/app/xfa_ffnotify.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698