2020-08-23 14:15:53 +00:00
|
|
|
//
|
|
|
|
// Copyright 2020 FoxyUtils ehf. All rights reserved.
|
|
|
|
//
|
|
|
|
// This is a commercial product and requires a license to operate.
|
|
|
|
// A trial license can be obtained at https://unidoc.io
|
|
|
|
//
|
|
|
|
// DO NOT EDIT: generated by unitwist Go source code obfuscator.
|
|
|
|
//
|
|
|
|
// Use of this source code is governed by the UniDoc End User License Agreement
|
|
|
|
// terms that can be accessed at https://unidoc.io/eula/
|
|
|
|
|
2020-11-09 01:00:18 +00:00
|
|
|
package custom_properties ;import (_d "encoding/xml";_ec "fmt";_be "github.com/unidoc/unioffice";_g "github.com/unidoc/unioffice/schema/soo/ofc/docPropsVTypes";_bb "github.com/unidoc/unioffice/schema/soo/ofc/sharedTypes";_b "strconv";_e "time";);
|
2020-10-12 13:59:12 +00:00
|
|
|
|
|
|
|
// ValidateWithPath validates the CT_Property and its children, prefixing error messages with path
|
2020-11-09 01:00:18 +00:00
|
|
|
func (_ecee *CT_Property )ValidateWithPath (path string )error {if !_bb .ST_GuidPatternRe .MatchString (_ecee .FmtidAttr ){return _ec .Errorf ("%\u0073\u002f\u006d\u002e\u0046\u006d\u0074\u0069\u0064\u0041\u0074\u0074\u0072\u0020\u006d\u0075\u0073\u0074 \u006d\u0061\u0074\u0063\u0068\u0020\u0027\u0025\u0073\u0027 (\u0068\u0061\u0076e\u0020%\u0076\u0029",path ,_bb .ST_GuidPatternRe ,_ecee .FmtidAttr );};if _ecee .Vector !=nil {if _cff :=_ecee .Vector .ValidateWithPath (path +"\u002fV\u0065\u0063\u0074\u006f\u0072");_cff !=nil {return _cff ;};};if _ecee .Array !=nil {if _gea :=_ecee .Array .ValidateWithPath (path +"\u002f\u0041\u0072\u0072\u0061\u0079");_gea !=nil {return _gea ;};};if _ecee .Empty !=nil {if _beg :=_ecee .Empty .ValidateWithPath (path +"\u002f\u0045\u006d\u0070\u0074\u0079");_beg !=nil {return _beg ;};};if _ecee .Null !=nil {if _ede :=_ecee .Null .ValidateWithPath (path +"\u002f\u004e\u0075l\u006c");_ede !=nil {return _ede ;};};if _ecee .Cy !=nil {if !_g .ST_CyPatternRe .MatchString (*_ecee .Cy ){return _ec .Errorf ("\u0025\u0073\u002f\u006d\u002e\u0043y\u0020\u006d\u0075\u0073\u0074\u0020\u006d\u0061\u0074\u0063\u0068\u0020\u0027%\u0073\u0027\u0020\u0028\u0068\u0061\u0076e\u0020\u0025\u0076\u0029",path ,_g .ST_CyPatternRe ,*_ecee .Cy );};};if _ecee .Error !=nil {if !_g .ST_ErrorPatternRe .MatchString (*_ecee .Error ){return _ec .Errorf ("\u0025\u0073/m\u002e\u0045\u0072r\u006f\u0072\u0020\u006dust\u0020ma\u0074\u0063\u0068\u0020\u0027\u0025\u0073' \u0028\u0068\u0061\u0076\u0065\u0020\u0025v\u0029",path ,_g .ST_ErrorPatternRe ,*_ecee .Error );};};if _ecee .Vstream !=nil {if _ccb :=_ecee .Vstream .ValidateWithPath (path +"\u002f\u0056\u0073\u0074\u0072\u0065\u0061\u006d");_ccb !=nil {return _ccb ;};};if _ecee .Clsid !=nil {if !_bb .ST_GuidPatternRe .MatchString (*_ecee .Clsid ){return _ec .Errorf ("\u0025\u0073/m\u002e\u0043\u006cs\u0069\u0064\u0020\u006dust\u0020ma\u0074\u0063\u0068\u0020\u0027\u0025\u0073' \u0028\u0068\u0061\u0076\u0065\u0020\u0025v\u0029",path ,_bb .ST_GuidPatternRe ,*_ecee .Clsid );};};return nil ;};func NewCT_Properties ()*CT_Properties {_f :=&CT_Properties {};return _f };func (_cbg *Properties )UnmarshalXML (d *_d .Decoder ,start _d .StartElement )error {_cbg .CT_Properties =*NewCT_Properties ();_adcd :for {_eeg ,_bcb :=d .Token ();if _bcb !=nil {return _bcb ;};switch _bbbg :=_eeg .(type ){case _d .StartElement :switch _bbbg .Name {case _d .Name {Space :"\u0068\u0074\u0074\u0070\u003a\u002f\u002f\u0073\u0063h\u0065\u006d\u0061\u0073\u002e\u006f\u0070\u0065\u006e\u0078\u006d\u006c\u0066\u006f\u0072\u006d\u0061\u0074\u0073\u002e\u006f\u0072\u0067/\u006f\u0066f\u0069\u0063e\u0044\u006f\u0063\u0075\u006d\u0065\u006e\u0074\u002f\u0032\u0030\u0030\u0036/c\u0075\u0073\u0074\u006f\u006d\u002d\u0070\u0072\u006fp\u0065\u0072\u0074\u0069\u0065\u0073",Local :"\u0070\u0072\u006f\u0070\u0065\u0072\u0074\u0079"}:_dbe :=NewCT_Property ();if _ebd :=d .DecodeElement (_dbe ,&_bbbg );_ebd !=nil {return _ebd ;};_cbg .Property =append (_cbg .Property ,_dbe );default:_be .Log ("\u0073k\u0069\u0070p\u0069\u006e\u0067 \u0075\u006e\u0073\u0075\u0070\u0070\u006fr\u0074\u0065\u0064\u0020\u0065\u006ce\u006d\u0065\u006e\u0074\u0020\u006f\u006e\u0020\u0050\u0072\u006fp\u0065\u0072\u0074\u0069\u0065\u0073\u0020\u0025\u0076",_bbbg .Name );if _faf :=d .Skip ();_faf !=nil {return _faf ;};};case _d .EndElement :break _adcd ;case _d .CharData :};};return nil ;};type CT_Property struct{FmtidAttr string ;PidAttr int32 ;NameAttr *string ;LinkTargetAttr *string ;Vector *_g .Vector ;Array *_g .Array ;Blob *string ;Oblob *string ;Empty *_g .Empty ;Null *_g .Null ;I1 *int8 ;I2 *int16 ;I4 *int32 ;I8 *int64 ;Int *int32 ;Ui1 *uint8 ;Ui2 *uint16 ;Ui4 *uint32 ;Ui8 *uint64 ;Uint *uint32 ;R4 *float32 ;R8 *float64 ;Decimal *float64 ;Lpstr *string ;Lpwstr *string ;Bstr *string ;Date *_e .Time ;Filetime *_e .Time ;Bool *bool ;Cy *string ;Error *string ;Stream *string ;Ostream *string ;Storage *string ;Ostorage *string ;Vstream *_g .Vstream ;Clsid *string ;};func (_ee *CT_Properties )MarshalXML (e *_d .Encoder ,start _d .StartElement )err
|
2020-08-31 22:58:25 +00:00
|
|
|
|
|
|
|
// ValidateWithPath validates the Properties and its children, prefixing error messages with path
|
2020-11-09 01:00:18 +00:00
|
|
|
func (_dbda *Properties )ValidateWithPath (path string )error {if _cag :=_dbda .CT_Properties .ValidateWithPath (path );_cag !=nil {return _cag ;};return nil ;};func (_beb *CT_Property )MarshalXML (e *_d .Encoder ,start _d .StartElement )error {start .Attr =append (start .Attr ,_d .Attr {Name :_d .Name {Local :"\u0066\u006d\u0074i\u0064"},Value :_ec .Sprintf ("\u0025\u0076",_beb .FmtidAttr )});start .Attr =append (start .Attr ,_d .Attr {Name :_d .Name {Local :"\u0070\u0069\u0064"},Value :_ec .Sprintf ("\u0025\u0076",_beb .PidAttr )});if _beb .NameAttr !=nil {start .Attr =append (start .Attr ,_d .Attr {Name :_d .Name {Local :"\u006e\u0061\u006d\u0065"},Value :_ec .Sprintf ("\u0025\u0076",*_beb .NameAttr )});};if _beb .LinkTargetAttr !=nil {start .Attr =append (start .Attr ,_d .Attr {Name :_d .Name {Local :"\u006c\u0069\u006e\u006b\u0054\u0061\u0072\u0067\u0065\u0074"},Value :_ec .Sprintf ("\u0025\u0076",*_beb .LinkTargetAttr )});};e .EncodeToken (start );if _beb .Vector !=nil {_bge :=_d .StartElement {Name :_d .Name {Local :"\u0076t\u003a\u0076\u0065\u0063\u0074\u006fr"}};e .EncodeElement (_beb .Vector ,_bge );};if _beb .Array !=nil {_ab :=_d .StartElement {Name :_d .Name {Local :"\u0076\u0074\u003a\u0061\u0072\u0072\u0061\u0079"}};e .EncodeElement (_beb .Array ,_ab );};if _beb .Blob !=nil {_cf :=_d .StartElement {Name :_d .Name {Local :"\u0076t\u003a\u0062\u006c\u006f\u0062"}};_be .AddPreserveSpaceAttr (&_cf ,*_beb .Blob );e .EncodeElement (_beb .Blob ,_cf );};if _beb .Oblob !=nil {_ag :=_d .StartElement {Name :_d .Name {Local :"\u0076\u0074\u003a\u006f\u0062\u006c\u006f\u0062"}};_be .AddPreserveSpaceAttr (&_ag ,*_beb .Oblob );e .EncodeElement (_beb .Oblob ,_ag );};if _beb .Empty !=nil {_aa :=_d .StartElement {Name :_d .Name {Local :"\u0076\u0074\u003a\u0065\u006d\u0070\u0074\u0079"}};e .EncodeElement (_beb .Empty ,_aa );};if _beb .Null !=nil {_bbc :=_d .StartElement {Name :_d .Name {Local :"\u0076t\u003a\u006e\u0075\u006c\u006c"}};e .EncodeElement (_beb .Null ,_bbc );};if _beb .I1 !=nil {_eg :=_d .StartElement {Name :_d .Name {Local :"\u0076\u0074\u003ai\u0031"}};e .EncodeElement (_beb .I1 ,_eg );};if _beb .I2 !=nil {_dcc :=_d .StartElement {Name :_d .Name {Local :"\u0076\u0074\u003ai\u0032"}};e .EncodeElement (_beb .I2 ,_dcc );};if _beb .I4 !=nil {_af :=_d .StartElement {Name :_d .Name {Local :"\u0076\u0074\u003ai\u0034"}};e .EncodeElement (_beb .I4 ,_af );};if _beb .I8 !=nil {_ca :=_d .StartElement {Name :_d .Name {Local :"\u0076\u0074\u003ai\u0038"}};e .EncodeElement (_beb .I8 ,_ca );};if _beb .Int !=nil {_cg :=_d .StartElement {Name :_d .Name {Local :"\u0076\u0074\u003a\u0069\u006e\u0074"}};e .EncodeElement (_beb .Int ,_cg );};if _beb .Ui1 !=nil {_gb :=_d .StartElement {Name :_d .Name {Local :"\u0076\u0074\u003a\u0075\u0069\u0031"}};e .EncodeElement (_beb .Ui1 ,_gb );};if _beb .Ui2 !=nil {_dccd :=_d .StartElement {Name :_d .Name {Local :"\u0076\u0074\u003a\u0075\u0069\u0032"}};e .EncodeElement (_beb .Ui2 ,_dccd );};if _beb .Ui4 !=nil {_bf :=_d .StartElement {Name :_d .Name {Local :"\u0076\u0074\u003a\u0075\u0069\u0034"}};e .EncodeElement (_beb .Ui4 ,_bf );};if _beb .Ui8 !=nil {_fc :=_d .StartElement {Name :_d .Name {Local :"\u0076\u0074\u003a\u0075\u0069\u0038"}};e .EncodeElement (_beb .Ui8 ,_fc );};if _beb .Uint !=nil {_cc :=_d .StartElement {Name :_d .Name {Local :"\u0076t\u003a\u0075\u0069\u006e\u0074"}};e .EncodeElement (_beb .Uint ,_cc );};if _beb .R4 !=nil {_da :=_d .StartElement {Name :_d .Name {Local :"\u0076\u0074\u003ar\u0034"}};e .EncodeElement (_beb .R4 ,_da );};if _beb .R8 !=nil {_gge :=_d .StartElement {Name :_d .Name {Local :"\u0076\u0074\u003ar\u0038"}};e .EncodeElement (_beb .R8 ,_gge );};if _beb .Decimal !=nil {_ceg :=_d .StartElement {Name :_d .Name {Local :"\u0076\u0074\u003a\u0064\u0065\u0063\u0069\u006d\u0061\u006c"}};e .EncodeElement (_beb .Decimal ,_ceg );};if _beb .Lpstr !=nil {_ecd :=_d .StartElement {Name :_d .Name {Local :"\u0076\u0074\u003a\u006c\u0070\u0073\u0074\u0072"}};_be .AddPreserveSpaceAttr (&_ecd ,*_beb .Lpstr );e .EncodeElement (_beb .Lpstr ,_ecd );};if _beb .Lpwstr !=nil {_ba
|
|
|
|
|
|
|
|
// ValidateWithPath validates the CT_Properties and its children, prefixing error messages with path
|
|
|
|
func (_fa *CT_Properties )ValidateWithPath (path string )error {for _bg ,_gf :=range _fa .Property {if _dg :=_gf .ValidateWithPath (_ec .Sprintf ("\u0025s\u002fP\u0072\u006f\u0070\u0065\u0072\u0074\u0079\u005b\u0025\u0064\u005d",path ,_bg ));_dg !=nil {return _dg ;};};return nil ;};func NewProperties ()*Properties {_fccc :=&Properties {};_fccc .CT_Properties =*NewCT_Properties ();return _fccc ;};
|
2020-08-23 14:15:53 +00:00
|
|
|
|
|
|
|
// Validate validates the CT_Property and its children
|
2020-11-09 01:00:18 +00:00
|
|
|
func (_ddb *CT_Property )Validate ()error {return _ddb .ValidateWithPath ("C\u0054\u005f\u0050\u0072\u006f\u0070\u0065\u0072\u0074\u0079");};type CT_Properties struct{Property []*CT_Property ;};
|
|
|
|
|
|
|
|
// Validate validates the Properties and its children
|
|
|
|
func (_bcbb *Properties )Validate ()error {return _bcbb .ValidateWithPath ("\u0050\u0072\u006f\u0070\u0065\u0072\u0074\u0069\u0065\u0073");};
|
|
|
|
|
|
|
|
// Validate validates the CT_Properties and its children
|
|
|
|
func (_a *CT_Properties )Validate ()error {return _a .ValidateWithPath ("\u0043\u0054\u005f\u0050\u0072\u006f\u0070\u0065\u0072\u0074\u0069\u0065\u0073");};func NewCT_Property ()*CT_Property {_bbd :=&CT_Property {};_bbd .FmtidAttr ="\u007b\u0030\u0030\u0030\u0030\u0030\u0030\u0030\u0030\u002d\u0030\u0030\u0030\u0030\u002d\u0030\u0030\u0030\u0030\u002d\u0030\u0030\u0030\u0030-\u0030\u0030\u0030\u0030\u00300\u0030\u00300\u0030\u0030\u0030\u007d";return _bbd ;};func init (){_be .RegisterConstructor ("\u0068\u0074\u0074\u0070\u003a\u002f\u002f\u0073\u0063h\u0065\u006d\u0061\u0073\u002e\u006f\u0070\u0065\u006e\u0078\u006d\u006c\u0066\u006f\u0072\u006d\u0061\u0074\u0073\u002e\u006f\u0072\u0067/\u006f\u0066f\u0069\u0063e\u0044\u006f\u0063\u0075\u006d\u0065\u006e\u0074\u002f\u0032\u0030\u0030\u0036/c\u0075\u0073\u0074\u006f\u006d\u002d\u0070\u0072\u006fp\u0065\u0072\u0074\u0069\u0065\u0073","\u0043\u0054\u005f\u0050\u0072\u006f\u0070\u0065\u0072\u0074\u0069\u0065\u0073",NewCT_Properties );_be .RegisterConstructor ("\u0068\u0074\u0074\u0070\u003a\u002f\u002f\u0073\u0063h\u0065\u006d\u0061\u0073\u002e\u006f\u0070\u0065\u006e\u0078\u006d\u006c\u0066\u006f\u0072\u006d\u0061\u0074\u0073\u002e\u006f\u0072\u0067/\u006f\u0066f\u0069\u0063e\u0044\u006f\u0063\u0075\u006d\u0065\u006e\u0074\u002f\u0032\u0030\u0030\u0036/c\u0075\u0073\u0074\u006f\u006d\u002d\u0070\u0072\u006fp\u0065\u0072\u0074\u0069\u0065\u0073","C\u0054\u005f\u0050\u0072\u006f\u0070\u0065\u0072\u0074\u0079",NewCT_Property );_be .RegisterConstructor ("\u0068\u0074\u0074\u0070\u003a\u002f\u002f\u0073\u0063h\u0065\u006d\u0061\u0073\u002e\u006f\u0070\u0065\u006e\u0078\u006d\u006c\u0066\u006f\u0072\u006d\u0061\u0074\u0073\u002e\u006f\u0072\u0067/\u006f\u0066f\u0069\u0063e\u0044\u006f\u0063\u0075\u006d\u0065\u006e\u0074\u002f\u0032\u0030\u0030\u0036/c\u0075\u0073\u0074\u006f\u006d\u002d\u0070\u0072\u006fp\u0065\u0072\u0074\u0069\u0065\u0073","\u0050\u0072\u006f\u0070\u0065\u0072\u0074\u0069\u0065\u0073",NewProperties );};
|