mirror of
https://github.com/unidoc/unioffice.git
synced 2025-05-02 22:17:07 +08:00
48 lines
27 KiB
Go
48 lines
27 KiB
Go
//
|
|
// 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/
|
|
|
|
package activeX ;import (_a "encoding/xml";_bg "fmt";_g "github.com/unidoc/unioffice";);
|
|
|
|
// ValidateWithPath validates the CT_OcxPrChoice and its children, prefixing error messages with path
|
|
func (_adf *CT_OcxPrChoice )ValidateWithPath (path string )error {if _adf .Font !=nil {if _bdgb :=_adf .Font .ValidateWithPath (path +"\u002f\u0046\u006fn\u0074");_bdgb !=nil {return _bdgb ;};};if _adf .Picture !=nil {if _bf :=_adf .Picture .ValidateWithPath (path +"\u002f\u0050\u0069\u0063\u0074\u0075\u0072\u0065");_bf !=nil {return _bf ;};};return nil ;};
|
|
|
|
// Validate validates the CT_Font and its children
|
|
func (_ede *CT_Font )Validate ()error {return _ede .ValidateWithPath ("\u0043T\u005f\u0046\u006f\u006e\u0074");};func NewCT_OcxPr ()*CT_OcxPr {_ecb :=&CT_OcxPr {};return _ecb };
|
|
|
|
// ValidateWithPath validates the CT_Ocx and its children, prefixing error messages with path
|
|
func (_ge *CT_Ocx )ValidateWithPath (path string )error {if _ge .PersistenceAttr ==ST_PersistenceUnset {return _bg .Errorf ("\u0025\u0073\u002f\u0050\u0065\u0072\u0073\u0069\u0073\u0074\u0065\u006e\u0063e\u0041\u0074\u0074\u0072\u0020\u0069s\u0020\u0061\u0020\u006d\u0061\u006e\u0064\u0061\u0074\u006f\u0072\u0079\u0020f\u0069\u0065\u006c\u0064",path );};if _fd :=_ge .PersistenceAttr .ValidateWithPath (path +"\u002f\u0050e\u0072\u0073\u0069s\u0074\u0065\u006e\u0063\u0065\u0041\u0074\u0074\u0072");_fd !=nil {return _fd ;};for _gcgg ,_egc :=range _ge .OcxPr {if _cg :=_egc .ValidateWithPath (_bg .Sprintf ("\u0025\u0073\u002fO\u0063\u0078\u0050\u0072\u005b\u0025\u0064\u005d",path ,_gcgg ));_cg !=nil {return _cg ;};};return nil ;};func NewCT_Picture ()*CT_Picture {_eef :=&CT_Picture {};return _eef };func (_dac *CT_OcxPrChoice )UnmarshalXML (d *_a .Decoder ,start _a .StartElement )error {_aac :for {_beb ,_fgc :=d .Token ();if _fgc !=nil {return _fgc ;};switch _aec :=_beb .(type ){case _a .StartElement :switch _aec .Name {case _a .Name {Space :"\u0068\u0074\u0074\u0070\u003a\u002f\u002f\u0073c\u0068\u0065\u006das\u002e\u006d\u0069\u0063\u0072\u006fs\u006f\u0066\u0074\u002e\u0063\u006f\u006d\u002f\u006f\u0066\u0066\u0069\u0063\u0065\u002f2\u0030\u0030\u0036\u002f\u0061\u0063\u0074\u0069v\u0065\u0058",Local :"\u0066\u006f\u006e\u0074"}:_dac .Font =NewCT_Font ();if _cae :=d .DecodeElement (_dac .Font ,&_aec );_cae !=nil {return _cae ;};case _a .Name {Space :"\u0068\u0074\u0074\u0070\u003a\u002f\u002f\u0073c\u0068\u0065\u006das\u002e\u006d\u0069\u0063\u0072\u006fs\u006f\u0066\u0074\u002e\u0063\u006f\u006d\u002f\u006f\u0066\u0066\u0069\u0063\u0065\u002f2\u0030\u0030\u0036\u002f\u0061\u0063\u0074\u0069v\u0065\u0058",Local :"\u0070i\u0063\u0074\u0075\u0072\u0065"}:_dac .Picture =NewCT_Picture ();if _efe :=d .DecodeElement (_dac .Picture ,&_aec );_efe !=nil {return _efe ;};default:_g .Log ("\u0073\u006b\u0069\u0070\u0070\u0069n\u0067\u0020\u0075\u006e\u0073\u0075\u0070\u0070\u006f\u0072\u0074\u0065\u0064\u0020\u0065\u006c\u0065\u006d\u0065\u006et\u0020\u006f\u006e\u0020\u0043\u0054\u005f\u004f\u0063\u0078\u0050\u0072\u0043\u0068o\u0069c\u0065\u0020\u0025\u0076",_aec .Name );if _dc :=d .Skip ();_dc !=nil {return _dc ;};};case _a .EndElement :break _aac ;case _a .CharData :};};return nil ;};func (_dg *CT_Ocx )MarshalXML (e *_a .Encoder ,start _a .StartElement )error {start .Attr =append (start .Attr ,_a .Attr {Name :_a .Name {Local :"\u0061\u0078\u003a\u0063\u006c\u0061\u0073\u0073\u0069\u0064"},Value :_bg .Sprintf ("\u0025\u0076",_dg .ClassidAttr )});if _dg .LicenseAttr !=nil {start .Attr =append (start .Attr ,_a .Attr {Name :_a .Name {Local :"\u0061\u0078\u003a\u006c\u0069\u0063\u0065\u006e\u0073\u0065"},Value :_bg .Sprintf ("\u0025\u0076",*_dg .LicenseAttr )});};if _dg .IdAttr !=nil {start .Attr =append (start .Attr ,_a .Attr {Name :_a .Name {Local :"\u0072\u003a\u0069\u0064"},Value :_bg .Sprintf ("\u0025\u0076",*_dg .IdAttr )});};_cde ,_eb :=_dg .PersistenceAttr .MarshalXMLAttr (_a .Name {Local :"\u0061\u0078\u003a\u0070\u0065\u0072\u0073\u0069\u0073t\u0065\u006e\u0063\u0065"});if _eb !=nil {return _eb ;};start .Attr =append (start .Attr ,_cde );e .EncodeToken (start );if _dg .OcxPr !=nil {_aa :=_a .StartElement {Name :_a .Name {Local :"\u0061\u0078\u003a\u006f\u0063\u0078\u0050\u0072"}};for _ ,_ffc :=range _dg .OcxPr {e .EncodeElement (_ffc ,_aa );};};e .EncodeToken (_a .EndElement {Name :start .Name });return nil ;};func (_de *CT_OcxPr )MarshalXML (e *_a .Encoder ,start _a .StartElement )error {start .Attr =append (start .Attr ,_a .Attr {Name :_a .Name {Local :"\u0061x\u003a\u006e\u0061\u006d\u0065"},Value :_bg .Sprintf ("\u0025\u0076",_de .NameAttr )});if _de .ValueAttr !=nil {start .Attr =append (start .Attr ,_a .Attr {Name :_a .Name {Local :"\u0061\u0078\u003a\u0076\u0061\u006c\u0075\u0065"},Value :_bg .Sprintf ("\u0025\u0076",*_de .ValueAttr )});};e .EncodeToken (start );if _de .Choice !=nil {_de .Choice .MarshalXML (e ,_a .StartElement {});};e .EncodeToken (_a .EndElement {Name :start .Name });return nil ;};func (_aee ST_Persistence )MarshalXMLAttr (name _a .Name )(_a .Attr ,error ){_gga :=_a .Attr {};_gga .Name =name ;switch _aee {case ST_PersistenceUnset :_gga .Value ="";case ST_PersistencePersistPropertyBag :_gga .Value ="\u0070e\u0072s\u0069\u0073\u0074\u0050\u0072o\u0070\u0065r\u0074\u0079\u0042\u0061\u0067";case ST_PersistencePersistStream :_gga .Value ="\u0070\u0065\u0072\u0073\u0069\u0073\u0074\u0053\u0074\u0072\u0065\u0061\u006d";case ST_PersistencePersistStreamInit :_gga .Value ="\u0070\u0065\u0072\u0073\u0069\u0073\u0074\u0053\u0074\u0072\u0065\u0061m\u0049\u006e\u0069\u0074";case ST_PersistencePersistStorage :_gga .Value ="\u0070\u0065\u0072\u0073\u0069\u0073\u0074\u0053\u0074o\u0072\u0061\u0067\u0065";};return _gga ,nil ;};func (_age *CT_Ocx )UnmarshalXML (d *_a .Decoder ,start _a .StartElement )error {_age .PersistenceAttr =ST_Persistence (1);for _ ,_ead :=range start .Attr {if _ead .Name .Space =="\u0068\u0074\u0074\u0070\u003a\u002f/\u0073\u0063\u0068\u0065\u006da\u0073\u002e\u006f\u0070\u0065\u006ex\u006d\u006c\u0066\u006f\u0072m\u0061\u0074\u0073\u002e\u006f\u0072\u0067\u002f\u006f\u0066\u0066\u0069c\u0065\u0044\u006f\u0063\u0075\u006d\u0065\u006e\u0074\u002f\u0032\u0030\u0030\u0036\u002fr\u0065\u006c\u0061\u0074\u0069\u006f\u006e\u0073h\u0069\u0070\u0073"&&_ead .Name .Local =="\u0069\u0064"||_ead .Name .Space =="\u0068\u0074\u0074\u0070\u003a\u002f\u002fp\u0075\u0072\u006c.\u006f\u0063\u006cc\u002e\u006fr\u0067\u002f\u006f\u006f\u0078\u006dl\u002fof\u0066\u0069\u0063\u0065\u0044\u006f\u0063\u0075\u006d\u0065\u006e\u0074\u002f\u0072\u0065\u006c\u0061\u0074\u0069\u006f\u006e\u0073\u0068\u0069\u0070\u0073"&&_ead .Name .Local =="\u0069\u0064"{_cc ,_gc :=_ead .Value ,error (nil );if _gc !=nil {return _gc ;};_age .IdAttr =&_cc ;continue ;};if _ead .Name .Local =="\u0063l\u0061\u0073\u0073\u0069\u0064"{_gfc ,_ae :=_ead .Value ,error (nil );if _ae !=nil {return _ae ;};_age .ClassidAttr =_gfc ;continue ;};if _ead .Name .Local =="\u006ci\u0063\u0065\u006e\u0073\u0065"{_df ,_da :=_ead .Value ,error (nil );if _da !=nil {return _da ;};_age .LicenseAttr =&_df ;continue ;};if _ead .Name .Local =="p\u0065\u0072\u0073\u0069\u0073\u0074\u0065\u006e\u0063\u0065"{_age .PersistenceAttr .UnmarshalXMLAttr (_ead );continue ;};};_eg :for {_gd ,_fg :=d .Token ();if _fg !=nil {return _fg ;};switch _gcg :=_gd .(type ){case _a .StartElement :switch _gcg .Name {case _a .Name {Space :"\u0068\u0074\u0074\u0070\u003a\u002f\u002f\u0073c\u0068\u0065\u006das\u002e\u006d\u0069\u0063\u0072\u006fs\u006f\u0066\u0074\u002e\u0063\u006f\u006d\u002f\u006f\u0066\u0066\u0069\u0063\u0065\u002f2\u0030\u0030\u0036\u002f\u0061\u0063\u0074\u0069v\u0065\u0058",Local :"\u006f\u0063\u0078P\u0072"}:_ffg :=NewCT_OcxPr ();if _bgf :=d .DecodeElement (_ffg ,&_gcg );_bgf !=nil {return _bgf ;};_age .OcxPr =append (_age .OcxPr ,_ffg );default:_g .Log ("\u0073\u006b\u0069\u0070\u0070i\u006e\u0067\u0020\u0075\u006e\u0073\u0075\u0070\u0070\u006f\u0072\u0074\u0065d\u0020\u0065\u006c\u0065\u006d\u0065\u006e\u0074\u0020\u006f\u006e\u0020\u0043\u0054\u005f\u004f\u0063\u0078\u0020\u0025\u0076",_gcg .Name );if _db :=d .Skip ();_db !=nil {return _db ;};};case _a .EndElement :break _eg ;case _a .CharData :};};return nil ;};func (_gcb *ST_Persistence )UnmarshalXMLAttr (attr _a .Attr )error {switch attr .Value {case "":*_gcb =0;case "\u0070e\u0072s\u0069\u0073\u0074\u0050\u0072o\u0070\u0065r\u0074\u0079\u0042\u0061\u0067":*_gcb =1;case "\u0070\u0065\u0072\u0073\u0069\u0073\u0074\u0053\u0074\u0072\u0065\u0061\u006d":*_gcb =2;case "\u0070\u0065\u0072\u0073\u0069\u0073\u0074\u0053\u0074\u0072\u0065\u0061m\u0049\u006e\u0069\u0074":*_gcb =3;case "\u0070\u0065\u0072\u0073\u0069\u0073\u0074\u0053\u0074o\u0072\u0061\u0067\u0065":*_gcb =4;};return nil ;};
|
|
|
|
// Validate validates the CT_OcxPr and its children
|
|
func (_be *CT_OcxPr )Validate ()error {return _be .ValidateWithPath ("\u0043\u0054\u005f\u004f\u0063\u0078\u0050\u0072");};func NewCT_Font ()*CT_Font {_bd :=&CT_Font {};return _bd };
|
|
|
|
// Validate validates the CT_OcxPrChoice and its children
|
|
func (_baa *CT_OcxPrChoice )Validate ()error {return _baa .ValidateWithPath ("\u0043\u0054\u005f\u004f\u0063\u0078\u0050\u0072\u0043h\u006f\u0069\u0063\u0065");};func NewCT_Ocx ()*CT_Ocx {_bdg :=&CT_Ocx {};_bdg .PersistenceAttr =ST_Persistence (1);return _bdg };func (_fba *CT_Picture )UnmarshalXML (d *_a .Decoder ,start _a .StartElement )error {for _ ,_caa :=range start .Attr {if _caa .Name .Space =="\u0068\u0074\u0074\u0070\u003a\u002f/\u0073\u0063\u0068\u0065\u006da\u0073\u002e\u006f\u0070\u0065\u006ex\u006d\u006c\u0066\u006f\u0072m\u0061\u0074\u0073\u002e\u006f\u0072\u0067\u002f\u006f\u0066\u0066\u0069c\u0065\u0044\u006f\u0063\u0075\u006d\u0065\u006e\u0074\u002f\u0032\u0030\u0030\u0036\u002fr\u0065\u006c\u0061\u0074\u0069\u006f\u006e\u0073h\u0069\u0070\u0073"&&_caa .Name .Local =="\u0069\u0064"||_caa .Name .Space =="\u0068\u0074\u0074\u0070\u003a\u002f\u002fp\u0075\u0072\u006c.\u006f\u0063\u006cc\u002e\u006fr\u0067\u002f\u006f\u006f\u0078\u006dl\u002fof\u0066\u0069\u0063\u0065\u0044\u006f\u0063\u0075\u006d\u0065\u006e\u0074\u002f\u0072\u0065\u006c\u0061\u0074\u0069\u006f\u006e\u0073\u0068\u0069\u0070\u0073"&&_caa .Name .Local =="\u0069\u0064"{_edeg ,_bgd :=_caa .Value ,error (nil );if _bgd !=nil {return _bgd ;};_fba .IdAttr =&_edeg ;continue ;};};for {_dd ,_feg :=d .Token ();if _feg !=nil {return _bg .Errorf ("\u0070\u0061\u0072\u0073in\u0067\u0020\u0043\u0054\u005f\u0050\u0069\u0063\u0074\u0075\u0072\u0065\u003a\u0020%\u0073",_feg );};if _bfc ,_cggc :=_dd .(_a .EndElement );_cggc &&_bfc .Name ==start .Name {break ;};};return nil ;};
|
|
|
|
// Validate validates the CT_Picture and its children
|
|
func (_bfg *CT_Picture )Validate ()error {return _bfg .ValidateWithPath ("\u0043\u0054\u005f\u0050\u0069\u0063\u0074\u0075\u0072\u0065");};func (_bgga *ST_Persistence )UnmarshalXML (d *_a .Decoder ,start _a .StartElement )error {_cab ,_ggg :=d .Token ();if _ggg !=nil {return _ggg ;};if _geg ,_ddc :=_cab .(_a .EndElement );_ddc &&_geg .Name ==start .Name {*_bgga =1;return nil ;};if _cga ,_fgb :=_cab .(_a .CharData );!_fgb {return _bg .Errorf ("\u0065\u0078\u0070\u0065\u0063\u0074\u0065\u0064\u0020\u0063\u0068a\u0072\u0020\u0064\u0061\u0074\u0061\u002c\u0020\u0067\u006ft\u0020\u0025\u0054",_cab );}else {switch string (_cga ){case "":*_bgga =0;case "\u0070e\u0072s\u0069\u0073\u0074\u0050\u0072o\u0070\u0065r\u0074\u0079\u0042\u0061\u0067":*_bgga =1;case "\u0070\u0065\u0072\u0073\u0069\u0073\u0074\u0053\u0074\u0072\u0065\u0061\u006d":*_bgga =2;case "\u0070\u0065\u0072\u0073\u0069\u0073\u0074\u0053\u0074\u0072\u0065\u0061m\u0049\u006e\u0069\u0074":*_bgga =3;case "\u0070\u0065\u0072\u0073\u0069\u0073\u0074\u0053\u0074o\u0072\u0061\u0067\u0065":*_bgga =4;};};_cab ,_ggg =d .Token ();if _ggg !=nil {return _ggg ;};if _dga ,_dce :=_cab .(_a .EndElement );_dce &&_dga .Name ==start .Name {return nil ;};return _bg .Errorf ("\u0065\u0078\u0070\u0065c\u0074\u0065\u0064\u0020\u0065\u006e\u0064\u0020\u0065\u006ce\u006de\u006e\u0074\u002c\u0020\u0067\u006f\u0074 \u0025\u0076",_cab );};func NewCT_OcxPrChoice ()*CT_OcxPrChoice {_gca :=&CT_OcxPrChoice {};return _gca };
|
|
|
|
// Validate validates the CT_Ocx and its children
|
|
func (_edef *CT_Ocx )Validate ()error {return _edef .ValidateWithPath ("\u0043\u0054\u005f\u004f\u0063\u0078");};type ST_Persistence byte ;func (_dbb ST_Persistence )String ()string {switch _dbb {case 0:return "";case 1:return "\u0070e\u0072s\u0069\u0073\u0074\u0050\u0072o\u0070\u0065r\u0074\u0079\u0042\u0061\u0067";case 2:return "\u0070\u0065\u0072\u0073\u0069\u0073\u0074\u0053\u0074\u0072\u0065\u0061\u006d";case 3:return "\u0070\u0065\u0072\u0073\u0069\u0073\u0074\u0053\u0074\u0072\u0065\u0061m\u0049\u006e\u0069\u0074";case 4:return "\u0070\u0065\u0072\u0073\u0069\u0073\u0074\u0053\u0074o\u0072\u0061\u0067\u0065";};return "";};
|
|
|
|
// ValidateWithPath validates the CT_Font and its children, prefixing error messages with path
|
|
func (_cd *CT_Font )ValidateWithPath (path string )error {if _gg :=_cd .PersistenceAttr .ValidateWithPath (path +"\u002f\u0050e\u0072\u0073\u0069s\u0074\u0065\u006e\u0063\u0065\u0041\u0074\u0074\u0072");_gg !=nil {return _gg ;};for _bae ,_ff :=range _cd .OcxPr {if _ag :=_ff .ValidateWithPath (_bg .Sprintf ("\u0025\u0073\u002fO\u0063\u0078\u0050\u0072\u005b\u0025\u0064\u005d",path ,_bae ));_ag !=nil {return _ag ;};};return nil ;};func (_ee *CT_OcxPr )UnmarshalXML (d *_a .Decoder ,start _a .StartElement )error {for _ ,_fb :=range start .Attr {if _fb .Name .Local =="\u006e\u0061\u006d\u0065"{_fbb ,_cgg :=_fb .Value ,error (nil );if _cgg !=nil {return _cgg ;};_ee .NameAttr =_fbb ;continue ;};if _fb .Name .Local =="\u0076\u0061\u006cu\u0065"{_cb ,_aad :=_fb .Value ,error (nil );if _aad !=nil {return _aad ;};_ee .ValueAttr =&_cb ;continue ;};};_ecd :for {_aae ,_dbf :=d .Token ();if _dbf !=nil {return _dbf ;};switch _gfcf :=_aae .(type ){case _a .StartElement :switch _gfcf .Name {case _a .Name {Space :"\u0068\u0074\u0074\u0070\u003a\u002f\u002f\u0073c\u0068\u0065\u006das\u002e\u006d\u0069\u0063\u0072\u006fs\u006f\u0066\u0074\u002e\u0063\u006f\u006d\u002f\u006f\u0066\u0066\u0069\u0063\u0065\u002f2\u0030\u0030\u0036\u002f\u0061\u0063\u0074\u0069v\u0065\u0058",Local :"\u0066\u006f\u006e\u0074"}:_ee .Choice =NewCT_OcxPrChoice ();if _ebb :=d .DecodeElement (&_ee .Choice .Font ,&_gfcf );_ebb !=nil {return _ebb ;};case _a .Name {Space :"\u0068\u0074\u0074\u0070\u003a\u002f\u002f\u0073c\u0068\u0065\u006das\u002e\u006d\u0069\u0063\u0072\u006fs\u006f\u0066\u0074\u002e\u0063\u006f\u006d\u002f\u006f\u0066\u0066\u0069\u0063\u0065\u002f2\u0030\u0030\u0036\u002f\u0061\u0063\u0074\u0069v\u0065\u0058",Local :"\u0070i\u0063\u0074\u0075\u0072\u0065"}:_ee .Choice =NewCT_OcxPrChoice ();if _dfb :=d .DecodeElement (&_ee .Choice .Picture ,&_gfcf );_dfb !=nil {return _dfb ;};default:_g .Log ("\u0073\u006b\u0069\u0070\u0070\u0069\u006eg\u0020\u0075\u006es\u0075\u0070\u0070\u006fr\u0074\u0065\u0064\u0020\u0065\u006c\u0065\u006d\u0065\u006e\u0074\u0020\u006f\u006e\u0020\u0043\u0054\u005f\u004f\u0063\u0078\u0050\u0072\u0020\u0025\u0076",_gfcf .Name );if _fff :=d .Skip ();_fff !=nil {return _fff ;};};case _a .EndElement :break _ecd ;case _a .CharData :};};return nil ;};func NewOcx ()*Ocx {_ebf :=&Ocx {};_ebf .CT_Ocx =*NewCT_Ocx ();return _ebf };func (_ebfc ST_Persistence )MarshalXML (e *_a .Encoder ,start _a .StartElement )error {return e .EncodeElement (_ebfc .String (),start );};type CT_Ocx struct{ClassidAttr string ;LicenseAttr *string ;IdAttr *string ;PersistenceAttr ST_Persistence ;OcxPr []*CT_OcxPr ;};type CT_Picture struct{IdAttr *string ;};type CT_OcxPr struct{NameAttr string ;ValueAttr *string ;Choice *CT_OcxPrChoice ;};func (_ad *CT_Font )MarshalXML (e *_a .Encoder ,start _a .StartElement )error {if _ad .PersistenceAttr !=ST_PersistenceUnset {_e ,_c :=_ad .PersistenceAttr .MarshalXMLAttr (_a .Name {Local :"\u0061\u0078\u003a\u0070\u0065\u0072\u0073\u0069\u0073t\u0065\u006e\u0063\u0065"});if _c !=nil {return _c ;};start .Attr =append (start .Attr ,_e );};if _ad .IdAttr !=nil {start .Attr =append (start .Attr ,_a .Attr {Name :_a .Name {Local :"\u0072\u003a\u0069\u0064"},Value :_bg .Sprintf ("\u0025\u0076",*_ad .IdAttr )});};e .EncodeToken (start );if _ad .OcxPr !=nil {_ba :=_a .StartElement {Name :_a .Name {Local :"\u0061\u0078\u003a\u006f\u0063\u0078\u0050\u0072"}};for _ ,_gf :=range _ad .OcxPr {e .EncodeElement (_gf ,_ba );};};e .EncodeToken (_a .EndElement {Name :start .Name });return nil ;};func (_fdf ST_Persistence )ValidateWithPath (path string )error {switch _fdf {case 0,1,2,3,4:default:return _bg .Errorf ("\u0025s\u003a\u0020\u006f\u0075t\u0020\u006f\u0066\u0020\u0072a\u006eg\u0065 \u0076\u0061\u006c\u0075\u0065\u0020\u0025d",path ,int (_fdf ));};return nil ;};
|
|
|
|
// ValidateWithPath validates the Ocx and its children, prefixing error messages with path
|
|
func (_bee *Ocx )ValidateWithPath (path string )error {if _acc :=_bee .CT_Ocx .ValidateWithPath (path );_acc !=nil {return _acc ;};return nil ;};
|
|
|
|
// Validate validates the Ocx and its children
|
|
func (_gcc *Ocx )Validate ()error {return _gcc .ValidateWithPath ("\u004f\u0063\u0078")};func (_daf ST_Persistence )Validate ()error {return _daf .ValidateWithPath ("")};
|
|
|
|
// ValidateWithPath validates the CT_Picture and its children, prefixing error messages with path
|
|
func (_cdf *CT_Picture )ValidateWithPath (path string )error {return nil };type CT_OcxPrChoice struct{Font *CT_Font ;Picture *CT_Picture ;};func (_d *CT_Font )UnmarshalXML (d *_a .Decoder ,start _a .StartElement )error {for _ ,_bgg :=range start .Attr {if _bgg .Name .Space =="\u0068\u0074\u0074\u0070\u003a\u002f/\u0073\u0063\u0068\u0065\u006da\u0073\u002e\u006f\u0070\u0065\u006ex\u006d\u006c\u0066\u006f\u0072m\u0061\u0074\u0073\u002e\u006f\u0072\u0067\u002f\u006f\u0066\u0066\u0069c\u0065\u0044\u006f\u0063\u0075\u006d\u0065\u006e\u0074\u002f\u0032\u0030\u0030\u0036\u002fr\u0065\u006c\u0061\u0074\u0069\u006f\u006e\u0073h\u0069\u0070\u0073"&&_bgg .Name .Local =="\u0069\u0064"||_bgg .Name .Space =="\u0068\u0074\u0074\u0070\u003a\u002f\u002fp\u0075\u0072\u006c.\u006f\u0063\u006cc\u002e\u006fr\u0067\u002f\u006f\u006f\u0078\u006dl\u002fof\u0066\u0069\u0063\u0065\u0044\u006f\u0063\u0075\u006d\u0065\u006e\u0074\u002f\u0072\u0065\u006c\u0061\u0074\u0069\u006f\u006e\u0073\u0068\u0069\u0070\u0073"&&_bgg .Name .Local =="\u0069\u0064"{_bggg ,_ef :=_bgg .Value ,error (nil );if _ef !=nil {return _ef ;};_d .IdAttr =&_bggg ;continue ;};if _bgg .Name .Local =="p\u0065\u0072\u0073\u0069\u0073\u0074\u0065\u006e\u0063\u0065"{_d .PersistenceAttr .UnmarshalXMLAttr (_bgg );continue ;};};_acf :for {_f ,_bgb :=d .Token ();if _bgb !=nil {return _bgb ;};switch _gb :=_f .(type ){case _a .StartElement :switch _gb .Name {case _a .Name {Space :"\u0068\u0074\u0074\u0070\u003a\u002f\u002f\u0073c\u0068\u0065\u006das\u002e\u006d\u0069\u0063\u0072\u006fs\u006f\u0066\u0074\u002e\u0063\u006f\u006d\u002f\u006f\u0066\u0066\u0069\u0063\u0065\u002f2\u0030\u0030\u0036\u002f\u0061\u0063\u0074\u0069v\u0065\u0058",Local :"\u006f\u0063\u0078P\u0072"}:_ec :=NewCT_OcxPr ();if _gfd :=d .DecodeElement (_ec ,&_gb );_gfd !=nil {return _gfd ;};_d .OcxPr =append (_d .OcxPr ,_ec );default:_g .Log ("\u0073\u006b\u0069p\u0070\u0069\u006e\u0067\u0020\u0075\u006e\u0073\u0075\u0070\u0070\u006f\u0072\u0074\u0065\u0064\u0020\u0065\u006c\u0065\u006d\u0065\u006e\u0074\u0020\u006f\u006e\u0020\u0043T\u005f\u0046\u006f\u006e\u0074\u0020\u0025\u0076",_gb .Name );if _ed :=d .Skip ();_ed !=nil {return _ed ;};};case _a .EndElement :break _acf ;case _a .CharData :};};return nil ;};func (_cbd *Ocx )UnmarshalXML (d *_a .Decoder ,start _a .StartElement )error {_cbd .CT_Ocx =*NewCT_Ocx ();for _ ,_cdg :=range start .Attr {if _cdg .Name .Space =="\u0068\u0074\u0074\u0070\u003a\u002f/\u0073\u0063\u0068\u0065\u006da\u0073\u002e\u006f\u0070\u0065\u006ex\u006d\u006c\u0066\u006f\u0072m\u0061\u0074\u0073\u002e\u006f\u0072\u0067\u002f\u006f\u0066\u0066\u0069c\u0065\u0044\u006f\u0063\u0075\u006d\u0065\u006e\u0074\u002f\u0032\u0030\u0030\u0036\u002fr\u0065\u006c\u0061\u0074\u0069\u006f\u006e\u0073h\u0069\u0070\u0073"&&_cdg .Name .Local =="\u0069\u0064"||_cdg .Name .Space =="\u0068\u0074\u0074\u0070\u003a\u002f\u002fp\u0075\u0072\u006c.\u006f\u0063\u006cc\u002e\u006fr\u0067\u002f\u006f\u006f\u0078\u006dl\u002fof\u0066\u0069\u0063\u0065\u0044\u006f\u0063\u0075\u006d\u0065\u006e\u0074\u002f\u0072\u0065\u006c\u0061\u0074\u0069\u006f\u006e\u0073\u0068\u0069\u0070\u0073"&&_cdg .Name .Local =="\u0069\u0064"{_gfa ,_ab :=_cdg .Value ,error (nil );if _ab !=nil {return _ab ;};_cbd .IdAttr =&_gfa ;continue ;};if _cdg .Name .Local =="\u0063l\u0061\u0073\u0073\u0069\u0064"{_ccc ,_aag :=_cdg .Value ,error (nil );if _aag !=nil {return _aag ;};_cbd .ClassidAttr =_ccc ;continue ;};if _cdg .Name .Local =="\u006ci\u0063\u0065\u006e\u0073\u0065"{_fa ,_efg :=_cdg .Value ,error (nil );if _efg !=nil {return _efg ;};_cbd .LicenseAttr =&_fa ;continue ;};if _cdg .Name .Local =="p\u0065\u0072\u0073\u0069\u0073\u0074\u0065\u006e\u0063\u0065"{_cbd .PersistenceAttr .UnmarshalXMLAttr (_cdg );continue ;};};_abe :for {_ga ,_ddd :=d .Token ();if _ddd !=nil {return _ddd ;};switch _ggc :=_ga .(type ){case _a .StartElement :switch _ggc .Name {case _a .Name {Space :"\u0068\u0074\u0074\u0070\u003a\u002f\u002f\u0073c\u0068\u0065\u006das\u002e\u006d\u0069\u0063\u0072\u006fs\u006f\u0066\u0074\u002e\u0063\u006f\u006d\u002f\u006f\u0066\u0066\u0069\u0063\u0065\u002f2\u0030\u0030\u0036\u002f\u0061\u0063\u0074\u0069v\u0065\u0058",Local :"\u006f\u0063\u0078P\u0072"}:_cce :=NewCT_OcxPr ();if _aef :=d .DecodeElement (_cce ,&_ggc );_aef !=nil {return _aef ;};_cbd .OcxPr =append (_cbd .OcxPr ,_cce );default:_g .Log ("\u0073\u006b\u0069\u0070\u0070\u0069\u006e\u0067\u0020\u0075\u006e\u0073\u0075\u0070\u0070\u006f\u0072\u0074\u0065\u0064\u0020\u0065\u006c\u0065m\u0065\u006e\u0074\u0020\u006fn\u0020\u004fc\u0078\u0020\u0025\u0076",_ggc .Name );if _eaf :=d .Skip ();_eaf !=nil {return _eaf ;};};case _a .EndElement :break _abe ;case _a .CharData :};};return nil ;};const (ST_PersistenceUnset ST_Persistence =0;ST_PersistencePersistPropertyBag ST_Persistence =1;ST_PersistencePersistStream ST_Persistence =2;ST_PersistencePersistStreamInit ST_Persistence =3;ST_PersistencePersistStorage ST_Persistence =4;);
|
|
|
|
// ValidateWithPath validates the CT_OcxPr and its children, prefixing error messages with path
|
|
func (_def *CT_OcxPr )ValidateWithPath (path string )error {if _def .Choice !=nil {if _agf :=_def .Choice .ValidateWithPath (path +"\u002fC\u0068\u006f\u0069\u0063\u0065");_agf !=nil {return _agf ;};};return nil ;};func (_efd *Ocx )MarshalXML (e *_a .Encoder ,start _a .StartElement )error {start .Attr =append (start .Attr ,_a .Attr {Name :_a .Name {Local :"\u0078\u006d\u006cn\u0073"},Value :"\u0068\u0074\u0074\u0070\u003a\u002f\u002f\u0073c\u0068\u0065\u006das\u002e\u006d\u0069\u0063\u0072\u006fs\u006f\u0066\u0074\u002e\u0063\u006f\u006d\u002f\u006f\u0066\u0066\u0069\u0063\u0065\u002f2\u0030\u0030\u0036\u002f\u0061\u0063\u0074\u0069v\u0065\u0058"});start .Attr =append (start .Attr ,_a .Attr {Name :_a .Name {Local :"\u0078\u006d\u006c\u006e\u0073\u003a\u0061\u0078"},Value :"\u0068\u0074\u0074\u0070\u003a\u002f\u002f\u0073c\u0068\u0065\u006das\u002e\u006d\u0069\u0063\u0072\u006fs\u006f\u0066\u0074\u002e\u0063\u006f\u006d\u002f\u006f\u0066\u0066\u0069\u0063\u0065\u002f2\u0030\u0030\u0036\u002f\u0061\u0063\u0074\u0069v\u0065\u0058"});start .Attr =append (start .Attr ,_a .Attr {Name :_a .Name {Local :"\u0078m\u006c\u006e\u0073\u003a\u0072"},Value :"\u0068\u0074\u0074\u0070\u003a\u002f/\u0073\u0063\u0068\u0065\u006da\u0073\u002e\u006f\u0070\u0065\u006ex\u006d\u006c\u0066\u006f\u0072m\u0061\u0074\u0073\u002e\u006f\u0072\u0067\u002f\u006f\u0066\u0066\u0069c\u0065\u0044\u006f\u0063\u0075\u006d\u0065\u006e\u0074\u002f\u0032\u0030\u0030\u0036\u002fr\u0065\u006c\u0061\u0074\u0069\u006f\u006e\u0073h\u0069\u0070\u0073"});start .Attr =append (start .Attr ,_a .Attr {Name :_a .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 ="\u0061\u0078\u003a\u006f\u0063\u0078";return _efd .CT_Ocx .MarshalXML (e ,start );};type Ocx struct{CT_Ocx };func (_eec *CT_Picture )MarshalXML (e *_a .Encoder ,start _a .StartElement )error {if _eec .IdAttr !=nil {start .Attr =append (start .Attr ,_a .Attr {Name :_a .Name {Local :"\u0072\u003a\u0069\u0064"},Value :_bg .Sprintf ("\u0025\u0076",*_eec .IdAttr )});};e .EncodeToken (start );e .EncodeToken (_a .EndElement {Name :start .Name });return nil ;};func (_cbg *CT_OcxPrChoice )MarshalXML (e *_a .Encoder ,start _a .StartElement )error {if _cbg .Font !=nil {_acfc :=_a .StartElement {Name :_a .Name {Local :"\u0061x\u003a\u0066\u006f\u006e\u0074"}};e .EncodeElement (_cbg .Font ,_acfc );};if _cbg .Picture !=nil {_fe :=_a .StartElement {Name :_a .Name {Local :"\u0061\u0078\u003a\u0070\u0069\u0063\u0074\u0075\u0072\u0065"}};e .EncodeElement (_cbg .Picture ,_fe );};return nil ;};type CT_Font struct{PersistenceAttr ST_Persistence ;IdAttr *string ;OcxPr []*CT_OcxPr ;};func init (){_g .RegisterConstructor ("\u0068\u0074\u0074\u0070\u003a\u002f\u002f\u0073c\u0068\u0065\u006das\u002e\u006d\u0069\u0063\u0072\u006fs\u006f\u0066\u0074\u002e\u0063\u006f\u006d\u002f\u006f\u0066\u0066\u0069\u0063\u0065\u002f2\u0030\u0030\u0036\u002f\u0061\u0063\u0074\u0069v\u0065\u0058","\u0043\u0054\u005f\u004f\u0063\u0078",NewCT_Ocx );_g .RegisterConstructor ("\u0068\u0074\u0074\u0070\u003a\u002f\u002f\u0073c\u0068\u0065\u006das\u002e\u006d\u0069\u0063\u0072\u006fs\u006f\u0066\u0074\u002e\u0063\u006f\u006d\u002f\u006f\u0066\u0066\u0069\u0063\u0065\u002f2\u0030\u0030\u0036\u002f\u0061\u0063\u0074\u0069v\u0065\u0058","\u0043\u0054\u005f\u004f\u0063\u0078\u0050\u0072",NewCT_OcxPr );_g .RegisterConstructor ("\u0068\u0074\u0074\u0070\u003a\u002f\u002f\u0073c\u0068\u0065\u006das\u002e\u006d\u0069\u0063\u0072\u006fs\u006f\u0066\u0074\u002e\u0063\u006f\u006d\u002f\u006f\u0066\u0066\u0069\u0063\u0065\u002f2\u0030\u0030\u0036\u002f\u0061\u0063\u0074\u0069v\u0065\u0058","\u0043T\u005f\u0046\u006f\u006e\u0074",NewCT_Font );_g .RegisterConstructor ("\u0068\u0074\u0074\u0070\u003a\u002f\u002f\u0073c\u0068\u0065\u006das\u002e\u006d\u0069\u0063\u0072\u006fs\u006f\u0066\u0074\u002e\u0063\u006f\u006d\u002f\u006f\u0066\u0066\u0069\u0063\u0065\u002f2\u0030\u0030\u0036\u002f\u0061\u0063\u0074\u0069v\u0065\u0058","\u0043\u0054\u005f\u0050\u0069\u0063\u0074\u0075\u0072\u0065",NewCT_Picture );_g .RegisterConstructor ("\u0068\u0074\u0074\u0070\u003a\u002f\u002f\u0073c\u0068\u0065\u006das\u002e\u006d\u0069\u0063\u0072\u006fs\u006f\u0066\u0074\u002e\u0063\u006f\u006d\u002f\u006f\u0066\u0066\u0069\u0063\u0065\u002f2\u0030\u0030\u0036\u002f\u0061\u0063\u0074\u0069v\u0065\u0058","\u006f\u0063\u0078",NewOcx );}; |