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

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

Issue 2083453003: Split the XFA_OBJECTTYPE enum into two parts. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Fix == nullptr Created 4 years, 6 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.cpp » ('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 722 matching lines...) Expand 10 before | Expand all | Expand 10 after
733 CXFA_Script script = calc.GetScript(); 733 CXFA_Script script = calc.GetScript();
734 if (!script) { 734 if (!script) {
735 return 1; 735 return 1;
736 } 736 }
737 CFX_WideString wsExpression; 737 CFX_WideString wsExpression;
738 script.GetExpression(wsExpression); 738 script.GetExpression(wsExpression);
739 if (wsExpression.IsEmpty()) { 739 if (wsExpression.IsEmpty()) {
740 return 1; 740 return 1;
741 } 741 }
742 } 742 }
743 if (pAcc->GetNode()->HasFlag(XFA_NODEFLAG_UserInteractive)) { 743 if (pAcc->GetNode()->IsUserInteractive())
744 return 1; 744 return 1;
745 } 745
746 IXFA_AppProvider* pAppProvider = GetApp()->GetAppProvider(); 746 IXFA_AppProvider* pAppProvider = GetApp()->GetAppProvider();
747 if (pAppProvider) { 747 if (pAppProvider) {
748 CFX_WideString wsMessage; 748 CFX_WideString wsMessage;
749 calc.GetMessageText(wsMessage); 749 calc.GetMessageText(wsMessage);
750 if (!wsMessage.IsEmpty()) { 750 if (!wsMessage.IsEmpty()) {
751 wsMessage += L"\r\n"; 751 wsMessage += L"\r\n";
752 } 752 }
753 CFX_WideString wsWarning; 753 CFX_WideString wsWarning;
754 pAppProvider->LoadString(XFA_IDS_ModifyField, wsWarning); 754 pAppProvider->LoadString(XFA_IDS_ModifyField, wsWarning);
755 wsMessage += wsWarning; 755 wsMessage += wsWarning;
756 CFX_WideString wsTitle; 756 CFX_WideString wsTitle;
757 pAppProvider->LoadString(XFA_IDS_CalcOverride, wsTitle); 757 pAppProvider->LoadString(XFA_IDS_CalcOverride, wsTitle);
758 if (pAppProvider->MsgBox(wsMessage, wsTitle, XFA_MBICON_Warning, 758 if (pAppProvider->MsgBox(wsMessage, wsTitle, XFA_MBICON_Warning,
759 XFA_MB_YesNo) == XFA_IDYes) { 759 XFA_MB_YesNo) == XFA_IDYes) {
760 pAcc->GetNode()->SetFlag(XFA_NODEFLAG_UserInteractive, false); 760 pAcc->GetNode()->SetFlag(XFA_NodeFlag_UserInteractive, false);
761 return 1; 761 return 1;
762 } 762 }
763 } 763 }
764 return 0; 764 return 0;
765 } 765 }
766 case XFA_ATTRIBUTEENUM_Ignore: 766 case XFA_ATTRIBUTEENUM_Ignore:
767 return 0; 767 return 0;
768 case XFA_ATTRIBUTEENUM_Disabled: 768 case XFA_ATTRIBUTEENUM_Disabled:
769 pAcc->GetNode()->SetFlag(XFA_NODEFLAG_UserInteractive, false); 769 pAcc->GetNode()->SetFlag(XFA_NodeFlag_UserInteractive, false);
770 default: 770 default:
771 return 1; 771 return 1;
772 } 772 }
773 } 773 }
774 return 1; 774 return 1;
775 } 775 }
776 FX_BOOL CXFA_FFField::CommitData() { 776 FX_BOOL CXFA_FFField::CommitData() {
777 return FALSE; 777 return FALSE;
778 } 778 }
779 FX_BOOL CXFA_FFField::IsDataChanged() { 779 FX_BOOL CXFA_FFField::IsDataChanged() {
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
818 m_pDataAcc->ProcessEvent(XFA_ATTRIBUTEENUM_Click, &eParam); 818 m_pDataAcc->ProcessEvent(XFA_ATTRIBUTEENUM_Click, &eParam);
819 break; 819 break;
820 } 820 }
821 default: 821 default:
822 break; 822 break;
823 } 823 }
824 } 824 }
825 825
826 void CXFA_FFField::OnDrawWidget(CFX_Graphics* pGraphics, 826 void CXFA_FFField::OnDrawWidget(CFX_Graphics* pGraphics,
827 const CFX_Matrix* pMatrix) {} 827 const CFX_Matrix* pMatrix) {}
OLDNEW
« no previous file with comments | « xfa/fxfa/app/xfa_ffdocview.cpp ('k') | xfa/fxfa/app/xfa_ffnotify.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698