1 // Copyright 2016 PDFium Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com 6 7 #ifndef XFA_FXFA_PARSER_CXFA_VALIDATE_H_ 8 #define XFA_FXFA_PARSER_CXFA_VALIDATE_H_ 9 10 #include "core/fxcrt/fx_string.h" 11 #include "core/fxcrt/fx_system.h" 12 #include "xfa/fxfa/parser/cxfa_data.h" 13 #include "xfa/fxfa/parser/cxfa_script.h" 14 15 class CXFA_Node; 16 17 class CXFA_Validate : public CXFA_Data { 18 public: 19 explicit CXFA_Validate(CXFA_Node* pNode); 20 21 int32_t GetFormatTest(); 22 int32_t GetNullTest(); 23 bool SetNullTest(CFX_WideString wsValue); 24 int32_t GetScriptTest(); 25 void GetFormatMessageText(CFX_WideString& wsMessage); 26 void SetFormatMessageText(CFX_WideString wsMessage); 27 void GetNullMessageText(CFX_WideString& wsMessage); 28 void SetNullMessageText(CFX_WideString wsMessage); 29 void GetScriptMessageText(CFX_WideString& wsMessage); 30 void SetScriptMessageText(CFX_WideString wsMessage); 31 void GetPicture(CFX_WideString& wsPicture); 32 CXFA_Script GetScript(); 33 34 protected: 35 void GetMessageText(CFX_WideString& wsMessage, 36 const CFX_WideString& wsMessageType); 37 void SetMessageText(CFX_WideString& wsMessage, 38 const CFX_WideString& wsMessageType); 39 bool SetTestValue(int32_t iType, 40 CFX_WideString& wsValue, 41 XFA_ATTRIBUTEENUM eName); 42 }; 43 44 #endif // XFA_FXFA_PARSER_CXFA_VALIDATE_H_ 45