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/
|
|
|
|
|
2022-01-15 21:17:38 +00:00
|
|
|
package custom_properties ;import (_cc "encoding/xml";_g "fmt";_ge "github.com/unidoc/unioffice";_gc "github.com/unidoc/unioffice/common/logger";_cg "github.com/unidoc/unioffice/schema/soo/ofc/docPropsVTypes";_ca "github.com/unidoc/unioffice/schema/soo/ofc/sharedTypes";_a "strconv";_e "time";);func (_edc *Properties )MarshalXML (e *_cc .Encoder ,start _cc .StartElement )error {start .Attr =append (start .Attr ,_cc .Attr {Name :_cc .Name {Local :"\u0078\u006d\u006cn\u0073"},Value :"\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"});start .Attr =append (start .Attr ,_cc .Attr {Name :_cc .Name {Local :"\u0078m\u006c\u006e\u0073\u003a\u0073"},Value :"\u0068\u0074\u0074\u0070\u003a/\u002f\u0073\u0063\u0068\u0065m\u0061s\u002e\u006f\u0070\u0065\u006e\u0078\u006d\u006c\u0066\u006f\u0072\u006d\u0061\u0074\u0073\u002e\u006f\u0072\u0067/\u006f\u0066\u0066\u0069\u0063\u0065\u0044\u006f\u0063\u0075\u006d\u0065\u006e\u0074\u002f\u0032\u0030\u0030\u0036\u002f\u0073\u0068\u0061\u0072e\u0064\u0054\u0079\u0070\u0065\u0073"});start .Attr =append (start .Attr ,_cc .Attr {Name :_cc .Name {Local :"\u0078\u006d\u006c\u006e\u0073\u003a\u0076\u0074"},Value :"\u0068\u0074\u0074\u0070\u003a\u002f\u002f\u0073\u0063\u0068\u0065\u006d\u0061\u0073\u002e\u006f\u0070\u0065\u006e\u0078m\u006c\u0066\u006f\u0072\u006d\u0061\u0074\u0073\u002e\u006f\u0072\u0067\u002f\u006f\u0066\u0066\u0069\u0063\u0065\u0044\u006fc\u0075\u006d\u0065\u006e\u0074\u002f\u0032\u0030\u0030\u0036\u002f\u0064\u006f\u0063P\u0072\u006f\u0070s\u0056\u0054\u0079\u0070\u0065\u0073"});start .Attr =append (start .Attr ,_cc .Attr {Name :_cc .Name {Local :"\u0078m\u006c\u006e\u0073\u003a\u0078\u006dl"},Value :"\u0068\u0074tp\u003a\u002f\u002fw\u0077\u0077\u002e\u00773.o\u0072g/\u0058\u004d\u004c\u002f\u0031\u0039\u00398/\u006e\u0061\u006d\u0065\u0073\u0070\u0061c\u0065"});start .Name .Local ="\u0050\u0072\u006f\u0070\u0065\u0072\u0074\u0069\u0065\u0073";return _edc .CT_Properties .MarshalXML (e ,start );};func (_ccc *CT_Properties )MarshalXML (e *_cc .Encoder ,start _cc .StartElement )error {e .EncodeToken (start );if _ccc .Property !=nil {_cgb :=_cc .StartElement {Name :_cc .Name {Local :"\u0070\u0072\u006f\u0070\u0065\u0072\u0074\u0079"}};for _ ,_ee :=range _ccc .Property {e .EncodeElement (_ee ,_cgb );};};e .EncodeToken (_cc .EndElement {Name :start .Name });return nil ;};func NewCT_Property ()*CT_Property {_ae :=&CT_Property {};_ae .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 _ae ;};
|
2021-04-23 20:00:00 +00:00
|
|
|
|
2022-01-15 21:17:38 +00:00
|
|
|
// Validate validates the Properties and its children
|
|
|
|
func (_fda *Properties )Validate ()error {return _fda .ValidateWithPath ("\u0050\u0072\u006f\u0070\u0065\u0072\u0074\u0069\u0065\u0073");};type Properties struct{CT_Properties };
|
2021-05-31 16:22:30 +00:00
|
|
|
|
2022-01-15 21:17:38 +00:00
|
|
|
// Validate validates the CT_Property and its children
|
|
|
|
func (_eea *CT_Property )Validate ()error {return _eea .ValidateWithPath ("C\u0054\u005f\u0050\u0072\u006f\u0070\u0065\u0072\u0074\u0079");};
|
2021-09-22 16:41:01 +00:00
|
|
|
|
2021-11-10 11:45:21 +00:00
|
|
|
// ValidateWithPath validates the CT_Properties and its children, prefixing error messages with path
|
2022-01-15 21:17:38 +00:00
|
|
|
func (_fgd *CT_Properties )ValidateWithPath (path string )error {for _ga ,_cd :=range _fgd .Property {if _dgc :=_cd .ValidateWithPath (_g .Sprintf ("\u0025s\u002fP\u0072\u006f\u0070\u0065\u0072\u0074\u0079\u005b\u0025\u0064\u005d",path ,_ga ));_dgc !=nil {return _dgc ;};};return nil ;};func (_ace *CT_Property )UnmarshalXML (d *_cc .Decoder ,start _cc .StartElement )error {_ace .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";for _ ,_dgec :=range start .Attr {if _dgec .Name .Local =="\u0070\u0069\u0064"{_da ,_ff :=_a .ParseInt (_dgec .Value ,10,32);if _ff !=nil {return _ff ;};_ace .PidAttr =int32 (_da );continue ;};if _dgec .Name .Local =="\u006c\u0069\u006e\u006b\u0054\u0061\u0072\u0067\u0065\u0074"{_fd ,_dba :=_dgec .Value ,error (nil );if _dba !=nil {return _dba ;};_ace .LinkTargetAttr =&_fd ;continue ;};if _dgec .Name .Local =="\u006e\u0061\u006d\u0065"{_aa ,_fe :=_dgec .Value ,error (nil );if _fe !=nil {return _fe ;};_ace .NameAttr =&_aa ;continue ;};if _dgec .Name .Local =="\u0066\u006d\u0074i\u0064"{_dgee ,_dgea :=_dgec .Value ,error (nil );if _dgea !=nil {return _dgea ;};_ace .FmtidAttr =_dgee ;continue ;};};_bbb :for {_bg ,_gfe :=d .Token ();if _gfe !=nil {return _gfe ;};switch _ce :=_bg .(type ){case _cc .StartElement :switch _ce .Name {case _cc .Name {Space :"\u0068\u0074\u0074\u0070\u003a\u002f\u002f\u0073\u0063\u0068\u0065\u006d\u0061\u0073\u002e\u006f\u0070\u0065\u006e\u0078m\u006c\u0066\u006f\u0072\u006d\u0061\u0074\u0073\u002e\u006f\u0072\u0067\u002f\u006f\u0066\u0066\u0069\u0063\u0065\u0044\u006fc\u0075\u006d\u0065\u006e\u0074\u002f\u0032\u0030\u0030\u0036\u002f\u0064\u006f\u0063P\u0072\u006f\u0070s\u0056\u0054\u0079\u0070\u0065\u0073",Local :"\u0076\u0065\u0063\u0074\u006f\u0072"},_cc .Name {Space :"\u0068\u0074\u0074\u0070\u003a\u002f/\u0070\u0075\u0072l\u002e\u006f\u0063l\u0063\u002e\u006f\u0072\u0067\u002f\u006f\u006f\u0078\u006dl\u002f\u006f\u0066\u0066\u0069ce\u0044\u006f\u0063\u0075\u006d\u0065\u006e\u0074\u002f\u0064\u006f\u0063\u0050\u0072\u006f\u0070\u0073\u0056\u0054\u0079\u0070\u0065\u0073",Local :"\u0076\u0065\u0063\u0074\u006f\u0072"}:_ace .Vector =_cg .NewVector ();if _gdc :=d .DecodeElement (_ace .Vector ,&_ce );_gdc !=nil {return _gdc ;};case _cc .Name {Space :"\u0068\u0074\u0074\u0070\u003a\u002f\u002f\u0073\u0063\u0068\u0065\u006d\u0061\u0073\u002e\u006f\u0070\u0065\u006e\u0078m\u006c\u0066\u006f\u0072\u006d\u0061\u0074\u0073\u002e\u006f\u0072\u0067\u002f\u006f\u0066\u0066\u0069\u0063\u0065\u0044\u006fc\u0075\u006d\u0065\u006e\u0074\u002f\u0032\u0030\u0030\u0036\u002f\u0064\u006f\u0063P\u0072\u006f\u0070s\u0056\u0054\u0079\u0070\u0065\u0073",Local :"\u0061\u0072\u0072a\u0079"},_cc .Name {Space :"\u0068\u0074\u0074\u0070\u003a\u002f/\u0070\u0075\u0072l\u002e\u006f\u0063l\u0063\u002e\u006f\u0072\u0067\u002f\u006f\u006f\u0078\u006dl\u002f\u006f\u0066\u0066\u0069ce\u0044\u006f\u0063\u0075\u006d\u0065\u006e\u0074\u002f\u0064\u006f\u0063\u0050\u0072\u006f\u0070\u0073\u0056\u0054\u0079\u0070\u0065\u0073",Local :"\u0061\u0072\u0072a\u0079"}:_ace .Array =_cg .NewArray ();if _ffc :=d .DecodeElement (_ace .Array ,&_ce );_ffc !=nil {return _ffc ;};case _cc .Name {Space :"\u0068\u0074\u0074\u0070\u003a\u002f\u002f\u0073\u0063\u0068\u0065\u006d\u0061\u0073\u002e\u006f\u0070\u0065\u006e\u0078m\u006c\u0066\u006f\u0072\u006d\u0061\u0074\u0073\u002e\u006f\u0072\u0067\u002f\u006f\u0066\u0066\u0069\u0063\u0065\u0044\u006fc\u0075\u006d\u0065\u006e\u0074\u002f\u0032\u0030\u0030\u0036\u002f\u0064\u006f\u0063P\u0072\u006f\u0070s\u0056\u0054\u0079\u0070\u0065\u0073",Local :"\u0062\u006c\u006f\u0062"},_cc .Name {Space :"\u0068\u0074\u0074\u0070\u003a\u002f/\u0070\u0075\u0072l\u002e\u006f\u0063l\u0063\u002e\u006f\u0072\u0067\u002f\u006f\u006f\u0078\u006dl\u002f\u006f\u0066\u0066\u0069ce\u0044\u006f\u0063\u0075\u006d\u0065\u006e\u0074\u002f\u0064\u006f\u0063\u0050\u0072\u006f\u0070\u0073\u0056\u0054\u0079\u0070\u0065\u0073",Local :"\u006
|
2021-07-30 17:03:26 +00:00
|
|
|
|
2021-11-10 11:45:21 +00:00
|
|
|
// Validate validates the CT_Properties and its children
|
2022-01-15 21:17:38 +00:00
|
|
|
func (_gd *CT_Properties )Validate ()error {return _gd .ValidateWithPath ("\u0043\u0054\u005f\u0050\u0072\u006f\u0070\u0065\u0072\u0074\u0069\u0065\u0073");};
|
2021-09-22 16:41:01 +00:00
|
|
|
|
2022-01-15 21:17:38 +00:00
|
|
|
// ValidateWithPath validates the CT_Property and its children, prefixing error messages with path
|
|
|
|
func (_dcf *CT_Property )ValidateWithPath (path string )error {if !_ca .ST_GuidPatternRe .MatchString (_dcf .FmtidAttr ){return _g .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 ,_ca .ST_GuidPatternRe ,_dcf .FmtidAttr );};if _dcf .Vector !=nil {if _ddd :=_dcf .Vector .ValidateWithPath (path +"\u002fV\u0065\u0063\u0074\u006f\u0072");_ddd !=nil {return _ddd ;};};if _dcf .Array !=nil {if _ffe :=_dcf .Array .ValidateWithPath (path +"\u002f\u0041\u0072\u0072\u0061\u0079");_ffe !=nil {return _ffe ;};};if _dcf .Empty !=nil {if _bba :=_dcf .Empty .ValidateWithPath (path +"\u002f\u0045\u006d\u0070\u0074\u0079");_bba !=nil {return _bba ;};};if _dcf .Null !=nil {if _ggg :=_dcf .Null .ValidateWithPath (path +"\u002f\u004e\u0075l\u006c");_ggg !=nil {return _ggg ;};};if _dcf .Cy !=nil {if !_cg .ST_CyPatternRe .MatchString (*_dcf .Cy ){return _g .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 ,_cg .ST_CyPatternRe ,*_dcf .Cy );};};if _dcf .Error !=nil {if !_cg .ST_ErrorPatternRe .MatchString (*_dcf .Error ){return _g .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 ,_cg .ST_ErrorPatternRe ,*_dcf .Error );};};if _dcf .Vstream !=nil {if _aegb :=_dcf .Vstream .ValidateWithPath (path +"\u002f\u0056\u0073\u0074\u0072\u0065\u0061\u006d");_aegb !=nil {return _aegb ;};};if _dcf .Clsid !=nil {if !_ca .ST_GuidPatternRe .MatchString (*_dcf .Clsid ){return _g .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 ,_ca .ST_GuidPatternRe ,*_dcf .Clsid );};};return nil ;};func (_dd *CT_Property )MarshalXML (e *_cc .Encoder ,start _cc .StartElement )error {start .Attr =append (start .Attr ,_cc .Attr {Name :_cc .Name {Local :"\u0066\u006d\u0074i\u0064"},Value :_g .Sprintf ("\u0025\u0076",_dd .FmtidAttr )});start .Attr =append (start .Attr ,_cc .Attr {Name :_cc .Name {Local :"\u0070\u0069\u0064"},Value :_g .Sprintf ("\u0025\u0076",_dd .PidAttr )});if _dd .NameAttr !=nil {start .Attr =append (start .Attr ,_cc .Attr {Name :_cc .Name {Local :"\u006e\u0061\u006d\u0065"},Value :_g .Sprintf ("\u0025\u0076",*_dd .NameAttr )});};if _dd .LinkTargetAttr !=nil {start .Attr =append (start .Attr ,_cc .Attr {Name :_cc .Name {Local :"\u006c\u0069\u006e\u006b\u0054\u0061\u0072\u0067\u0065\u0074"},Value :_g .Sprintf ("\u0025\u0076",*_dd .LinkTargetAttr )});};e .EncodeToken (start );if _dd .Vector !=nil {_ag :=_cc .StartElement {Name :_cc .Name {Local :"\u0076t\u003a\u0076\u0065\u0063\u0074\u006fr"}};e .EncodeElement (_dd .Vector ,_ag );};if _dd .Array !=nil {_fa :=_cc .StartElement {Name :_cc .Name {Local :"\u0076\u0074\u003a\u0061\u0072\u0072\u0061\u0079"}};e .EncodeElement (_dd .Array ,_fa );};if _dd .Blob !=nil {_ec :=_cc .StartElement {Name :_cc .Name {Local :"\u0076t\u003a\u0062\u006c\u006f\u0062"}};_ge .AddPreserveSpaceAttr (&_ec ,*_dd .Blob );e .EncodeElement (_dd .Blob ,_ec );};if _dd .Oblob !=nil {_cag :=_cc .StartElement {Name :_cc .Name {Local :"\u0076\u0074\u003a\u006f\u0062\u006c\u006f\u0062"}};_ge .AddPreserveSpaceAttr (&_cag ,*_dd .Oblob );e .EncodeElement (_dd .Oblob ,_cag );};if _dd .Empty !=nil {_cb :=_cc .StartElement {Name :_cc .Name {Local :"\u0076\u0074\u003a\u0065\u006d\u0070\u0074\u0079"}};e .EncodeElement (_dd .Empty ,_cb );};if _dd .Null !=nil {_cde :=_cc .StartElement {Name :_cc .Name {Local :"\u0076t\u003a\u006e\u0075\u006c\u006c"}};e .EncodeElement (_dd .Null ,_cde );};if _dd .I1 !=nil {_dge :=_cc .StartElement {Name :_cc .Name {Local :"\u0076\u0074\u003ai\u0031"}};e .EncodeElement (_dd .I1 ,_dge );};if _dd .I2 !=nil {_db :=_cc .StartElement {Name :_cc .Name {Local :"\
|
|
|
|
|
|
|
|
// ValidateWithPath validates the Properties and its children, prefixing error messages with path
|
|
|
|
func (_acac *Properties )ValidateWithPath (path string )error {if _dfc :=_acac .CT_Properties .ValidateWithPath (path );_dfc !=nil {return _dfc ;};return nil ;};func (_f *CT_Properties )UnmarshalXML (d *_cc .Decoder ,start _cc .StartElement )error {_ed :for {_d ,_fg :=d .Token ();if _fg !=nil {return _fg ;};switch _gb :=_d .(type ){case _cc .StartElement :switch _gb .Name {case _cc .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"}:_cfb :=NewCT_Property ();if _dg :=d .DecodeElement (_cfb ,&_gb );_dg !=nil {return _dg ;};_f .Property =append (_f .Property ,_cfb );default:_gc .Log .Debug ("\u0073\u006b\u0069\u0070\u0070\u0069\u006e\u0067 \u0075\u006e\u0073up\u0070\u006f\u0072\u0074\u0065\u0064 \u0065\u006c\u0065\u006d\u0065\u006e\u0074\u0020\u006f\u006e\u0020\u0043\u0054\u005f\u0050r\u006f\u0070\u0065\u0072\u0074\u0069\u0065\u0073 \u0025\u0076",_gb .Name );if _b :=d .Skip ();_b !=nil {return _b ;};};case _cc .EndElement :break _ed ;case _cc .CharData :};};return nil ;};func NewProperties ()*Properties {_bcc :=&Properties {};_bcc .CT_Properties =*NewCT_Properties ();return _bcc ;};func init (){_ge .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 );_ge .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 );_ge .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 );};
|