mirror of
https://github.com/unidoc/unioffice.git
synced 2025-04-25 13:48:53 +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 (_f "encoding/xml";_a "fmt";_ae "github.com/unidoc/unioffice";_d "github.com/unidoc/unioffice/common/logger";);
|
|
|
|
// ValidateWithPath validates the CT_OcxPr and its children, prefixing error messages with path
|
|
func (_eff *CT_OcxPr )ValidateWithPath (path string )error {if _eff .Choice !=nil {if _efc :=_eff .Choice .ValidateWithPath (path +"\u002fC\u0068\u006f\u0069\u0063\u0065");_efc !=nil {return _efc ;};};return nil ;};func (_ede *CT_Ocx )MarshalXML (e *_f .Encoder ,start _f .StartElement )error {start .Attr =append (start .Attr ,_f .Attr {Name :_f .Name {Local :"\u0061\u0078\u003a\u0063\u006c\u0061\u0073\u0073\u0069\u0064"},Value :_a .Sprintf ("\u0025\u0076",_ede .ClassidAttr )});if _ede .LicenseAttr !=nil {start .Attr =append (start .Attr ,_f .Attr {Name :_f .Name {Local :"\u0061\u0078\u003a\u006c\u0069\u0063\u0065\u006e\u0073\u0065"},Value :_a .Sprintf ("\u0025\u0076",*_ede .LicenseAttr )});};if _ede .IdAttr !=nil {start .Attr =append (start .Attr ,_f .Attr {Name :_f .Name {Local :"\u0072\u003a\u0069\u0064"},Value :_a .Sprintf ("\u0025\u0076",*_ede .IdAttr )});};_cad ,_ece :=_ede .PersistenceAttr .MarshalXMLAttr (_f .Name {Local :"\u0061\u0078\u003a\u0070\u0065\u0072\u0073\u0069\u0073t\u0065\u006e\u0063\u0065"});if _ece !=nil {return _ece ;};start .Attr =append (start .Attr ,_cad );e .EncodeToken (start );if _ede .OcxPr !=nil {_edd :=_f .StartElement {Name :_f .Name {Local :"\u0061\u0078\u003a\u006f\u0063\u0078\u0050\u0072"}};for _ ,_cfg :=range _ede .OcxPr {e .EncodeElement (_cfg ,_edd );};};e .EncodeToken (_f .EndElement {Name :start .Name });return nil ;};func (_gg *CT_Ocx )UnmarshalXML (d *_f .Decoder ,start _f .StartElement )error {_gg .PersistenceAttr =ST_Persistence (1);for _ ,_be :=range start .Attr {if _be .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"&&_be .Name .Local =="\u0069\u0064"||_be .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"&&_be .Name .Local =="\u0069\u0064"{_adf ,_gbe :=_be .Value ,error (nil );if _gbe !=nil {return _gbe ;};_gg .IdAttr =&_adf ;continue ;};if _be .Name .Local =="\u0063l\u0061\u0073\u0073\u0069\u0064"{_bg ,_bb :=_be .Value ,error (nil );if _bb !=nil {return _bb ;};_gg .ClassidAttr =_bg ;continue ;};if _be .Name .Local =="\u006ci\u0063\u0065\u006e\u0073\u0065"{_aga ,_af :=_be .Value ,error (nil );if _af !=nil {return _af ;};_gg .LicenseAttr =&_aga ;continue ;};if _be .Name .Local =="p\u0065\u0072\u0073\u0069\u0073\u0074\u0065\u006e\u0063\u0065"{_gg .PersistenceAttr .UnmarshalXMLAttr (_be );continue ;};};_df :for {_adc ,_afb :=d .Token ();if _afb !=nil {return _afb ;};switch _fb :=_adc .(type ){case _f .StartElement :switch _fb .Name {case _f .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"}:_gc :=NewCT_OcxPr ();if _eef :=d .DecodeElement (_gc ,&_fb );_eef !=nil {return _eef ;};_gg .OcxPr =append (_gg .OcxPr ,_gc );default:_d .Log .Debug ("\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",_fb .Name );if _ab :=d .Skip ();_ab !=nil {return _ab ;};};case _f .EndElement :break _df ;case _f .CharData :};};return nil ;};
|
|
|
|
// Validate validates the Ocx and its children
|
|
func (_gbeg *Ocx )Validate ()error {return _gbeg .ValidateWithPath ("\u004f\u0063\u0078")};func (_bac ST_Persistence )MarshalXML (e *_f .Encoder ,start _f .StartElement )error {return e .EncodeElement (_bac .String (),start );};func (_aee *CT_Font )UnmarshalXML (d *_f .Decoder ,start _f .StartElement )error {for _ ,_efg :=range start .Attr {if _efg .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"&&_efg .Name .Local =="\u0069\u0064"||_efg .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"&&_efg .Name .Local =="\u0069\u0064"{_gb ,_ad :=_efg .Value ,error (nil );if _ad !=nil {return _ad ;};_aee .IdAttr =&_gb ;continue ;};if _efg .Name .Local =="p\u0065\u0072\u0073\u0069\u0073\u0074\u0065\u006e\u0063\u0065"{_aee .PersistenceAttr .UnmarshalXMLAttr (_efg );continue ;};};_ce :for {_dd ,_ebg :=d .Token ();if _ebg !=nil {return _ebg ;};switch _gd :=_dd .(type ){case _f .StartElement :switch _gd .Name {case _f .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"}:_ca :=NewCT_OcxPr ();if _dbe :=d .DecodeElement (_ca ,&_gd );_dbe !=nil {return _dbe ;};_aee .OcxPr =append (_aee .OcxPr ,_ca );default:_d .Log .Debug ("\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",_gd .Name );if _cf :=d .Skip ();_cf !=nil {return _cf ;};};case _f .EndElement :break _ce ;case _f .CharData :};};return nil ;};func (_aba *CT_Picture )UnmarshalXML (d *_f .Decoder ,start _f .StartElement )error {for _ ,_dfg :=range start .Attr {if _dfg .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"&&_dfg .Name .Local =="\u0069\u0064"||_dfg .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"&&_dfg .Name .Local =="\u0069\u0064"{_daa ,_gec :=_dfg .Value ,error (nil );if _gec !=nil {return _gec ;};_aba .IdAttr =&_daa ;continue ;};};for {_dad ,_cc :=d .Token ();if _cc !=nil {return _a .Errorf ("\u0070\u0061\u0072\u0073in\u0067\u0020\u0043\u0054\u005f\u0050\u0069\u0063\u0074\u0075\u0072\u0065\u003a\u0020%\u0073",_cc );};if _fa ,_cfga :=_dad .(_f .EndElement );_cfga &&_fa .Name ==start .Name {break ;};};return nil ;};func (_gcd *CT_Picture )MarshalXML (e *_f .Encoder ,start _f .StartElement )error {if _gcd .IdAttr !=nil {start .Attr =append (start .Attr ,_f .Attr {Name :_f .Name {Local :"\u0072\u003a\u0069\u0064"},Value :_a .Sprintf ("\u0025\u0076",*_gcd .IdAttr )});};e .EncodeToken (start );e .EncodeToken (_f .EndElement {Name :start .Name });return nil ;};type CT_Font struct{PersistenceAttr ST_Persistence ;IdAttr *string ;OcxPr []*CT_OcxPr ;};
|
|
|
|
// ValidateWithPath validates the CT_Font and its children, prefixing error messages with path
|
|
func (_ed *CT_Font )ValidateWithPath (path string )error {if _dba :=_ed .PersistenceAttr .ValidateWithPath (path +"\u002f\u0050e\u0072\u0073\u0069s\u0074\u0065\u006e\u0063\u0065\u0041\u0074\u0074\u0072");_dba !=nil {return _dba ;};for _ba ,_ee :=range _ed .OcxPr {if _gdc :=_ee .ValidateWithPath (_a .Sprintf ("\u0025\u0073\u002fO\u0063\u0078\u0050\u0072\u005b\u0025\u0064\u005d",path ,_ba ));_gdc !=nil {return _gdc ;};};return nil ;};func (_beaa *ST_Persistence )UnmarshalXMLAttr (attr _f .Attr )error {switch attr .Value {case "":*_beaa =0;case "\u0070e\u0072s\u0069\u0073\u0074\u0050\u0072o\u0070\u0065r\u0074\u0079\u0042\u0061\u0067":*_beaa =1;case "\u0070\u0065\u0072\u0073\u0069\u0073\u0074\u0053\u0074\u0072\u0065\u0061\u006d":*_beaa =2;case "\u0070\u0065\u0072\u0073\u0069\u0073\u0074\u0053\u0074\u0072\u0065\u0061m\u0049\u006e\u0069\u0074":*_beaa =3;case "\u0070\u0065\u0072\u0073\u0069\u0073\u0074\u0053\u0074o\u0072\u0061\u0067\u0065":*_beaa =4;};return nil ;};type CT_OcxPrChoice struct{Font *CT_Font ;Picture *CT_Picture ;};func (_dced *Ocx )UnmarshalXML (d *_f .Decoder ,start _f .StartElement )error {_dced .CT_Ocx =*NewCT_Ocx ();for _ ,_bcf :=range start .Attr {if _bcf .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"&&_bcf .Name .Local =="\u0069\u0064"||_bcf .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"&&_bcf .Name .Local =="\u0069\u0064"{_bda ,_dac :=_bcf .Value ,error (nil );if _dac !=nil {return _dac ;};_dced .IdAttr =&_bda ;continue ;};if _bcf .Name .Local =="\u0063l\u0061\u0073\u0073\u0069\u0064"{_ac ,_agb :=_bcf .Value ,error (nil );if _agb !=nil {return _agb ;};_dced .ClassidAttr =_ac ;continue ;};if _bcf .Name .Local =="\u006ci\u0063\u0065\u006e\u0073\u0065"{_fag ,_eg :=_bcf .Value ,error (nil );if _eg !=nil {return _eg ;};_dced .LicenseAttr =&_fag ;continue ;};if _bcf .Name .Local =="p\u0065\u0072\u0073\u0069\u0073\u0074\u0065\u006e\u0063\u0065"{_dced .PersistenceAttr .UnmarshalXMLAttr (_bcf );continue ;};};_efbb :for {_bae ,_dfbe :=d .Token ();if _dfbe !=nil {return _dfbe ;};switch _ggc :=_bae .(type ){case _f .StartElement :switch _ggc .Name {case _f .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"}:_bba :=NewCT_OcxPr ();if _ecb :=d .DecodeElement (_bba ,&_ggc );_ecb !=nil {return _ecb ;};_dced .OcxPr =append (_dced .OcxPr ,_bba );default:_d .Log .Debug ("\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 _gagc :=d .Skip ();_gagc !=nil {return _gagc ;};};case _f .EndElement :break _efbb ;case _f .CharData :};};return nil ;};
|
|
|
|
// ValidateWithPath validates the CT_Ocx and its children, prefixing error messages with path
|
|
func (_agc *CT_Ocx )ValidateWithPath (path string )error {if _agc .PersistenceAttr ==ST_PersistenceUnset {return _a .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 _cfb :=_agc .PersistenceAttr .ValidateWithPath (path +"\u002f\u0050e\u0072\u0073\u0069s\u0074\u0065\u006e\u0063\u0065\u0041\u0074\u0074\u0072");_cfb !=nil {return _cfb ;};for _fbf ,_bc :=range _agc .OcxPr {if _dbb :=_bc .ValidateWithPath (_a .Sprintf ("\u0025\u0073\u002fO\u0063\u0078\u0050\u0072\u005b\u0025\u0064\u005d",path ,_fbf ));_dbb !=nil {return _dbb ;};};return nil ;};
|
|
|
|
// Validate validates the CT_Font and its children
|
|
func (_efb *CT_Font )Validate ()error {return _efb .ValidateWithPath ("\u0043T\u005f\u0046\u006f\u006e\u0074");};func (_dfb *CT_OcxPr )UnmarshalXML (d *_f .Decoder ,start _f .StartElement )error {for _ ,_fg :=range start .Attr {if _fg .Name .Local =="\u006e\u0061\u006d\u0065"{_ge ,_fga :=_fg .Value ,error (nil );if _fga !=nil {return _fga ;};_dfb .NameAttr =_ge ;continue ;};if _fg .Name .Local =="\u0076\u0061\u006cu\u0065"{_agab ,_dc :=_fg .Value ,error (nil );if _dc !=nil {return _dc ;};_dfb .ValueAttr =&_agab ;continue ;};};_gda :for {_aeee ,_age :=d .Token ();if _age !=nil {return _age ;};switch _ga :=_aeee .(type ){case _f .StartElement :switch _ga .Name {case _f .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"}:_dfb .Choice =NewCT_OcxPrChoice ();if _dce :=d .DecodeElement (&_dfb .Choice .Font ,&_ga );_dce !=nil {return _dce ;};case _f .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"}:_dfb .Choice =NewCT_OcxPrChoice ();if _ea :=d .DecodeElement (&_dfb .Choice .Picture ,&_ga );_ea !=nil {return _ea ;};default:_d .Log .Debug ("\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",_ga .Name );if _fe :=d .Skip ();_fe !=nil {return _fe ;};};case _f .EndElement :break _gda ;case _f .CharData :};};return nil ;};
|
|
|
|
// Validate validates the CT_Picture and its children
|
|
func (_fdc *CT_Picture )Validate ()error {return _fdc .ValidateWithPath ("\u0043\u0054\u005f\u0050\u0069\u0063\u0074\u0075\u0072\u0065");};func NewCT_Picture ()*CT_Picture {_dea :=&CT_Picture {};return _dea };type CT_Ocx struct{ClassidAttr string ;LicenseAttr *string ;IdAttr *string ;PersistenceAttr ST_Persistence ;OcxPr []*CT_OcxPr ;};func (_ff *CT_OcxPrChoice )UnmarshalXML (d *_f .Decoder ,start _f .StartElement )error {_ddf :for {_fda ,_fge :=d .Token ();if _fge !=nil {return _fge ;};switch _bcg :=_fda .(type ){case _f .StartElement :switch _bcg .Name {case _f .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"}:_ff .Font =NewCT_Font ();if _agg :=d .DecodeElement (_ff .Font ,&_bcg );_agg !=nil {return _agg ;};case _f .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"}:_ff .Picture =NewCT_Picture ();if _eab :=d .DecodeElement (_ff .Picture ,&_bcg );_eab !=nil {return _eab ;};default:_d .Log .Debug ("\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",_bcg .Name );if _de :=d .Skip ();_de !=nil {return _de ;};};case _f .EndElement :break _ddf ;case _f .CharData :};};return nil ;};
|
|
|
|
// Validate validates the CT_OcxPrChoice and its children
|
|
func (_bd *CT_OcxPrChoice )Validate ()error {return _bd .ValidateWithPath ("\u0043\u0054\u005f\u004f\u0063\u0078\u0050\u0072\u0043h\u006f\u0069\u0063\u0065");};type Ocx struct{CT_Ocx };func NewOcx ()*Ocx {_eae :=&Ocx {};_eae .CT_Ocx =*NewCT_Ocx ();return _eae };func (_edb ST_Persistence )MarshalXMLAttr (name _f .Name )(_f .Attr ,error ){_bdab :=_f .Attr {};_bdab .Name =name ;switch _edb {case ST_PersistenceUnset :_bdab .Value ="";case ST_PersistencePersistPropertyBag :_bdab .Value ="\u0070e\u0072s\u0069\u0073\u0074\u0050\u0072o\u0070\u0065r\u0074\u0079\u0042\u0061\u0067";case ST_PersistencePersistStream :_bdab .Value ="\u0070\u0065\u0072\u0073\u0069\u0073\u0074\u0053\u0074\u0072\u0065\u0061\u006d";case ST_PersistencePersistStreamInit :_bdab .Value ="\u0070\u0065\u0072\u0073\u0069\u0073\u0074\u0053\u0074\u0072\u0065\u0061m\u0049\u006e\u0069\u0074";case ST_PersistencePersistStorage :_bdab .Value ="\u0070\u0065\u0072\u0073\u0069\u0073\u0074\u0053\u0074o\u0072\u0061\u0067\u0065";};return _bdab ,nil ;};func (_edg *CT_OcxPr )MarshalXML (e *_f .Encoder ,start _f .StartElement )error {start .Attr =append (start .Attr ,_f .Attr {Name :_f .Name {Local :"\u0061x\u003a\u006e\u0061\u006d\u0065"},Value :_a .Sprintf ("\u0025\u0076",_edg .NameAttr )});if _edg .ValueAttr !=nil {start .Attr =append (start .Attr ,_f .Attr {Name :_f .Name {Local :"\u0061\u0078\u003a\u0076\u0061\u006c\u0075\u0065"},Value :_a .Sprintf ("\u0025\u0076",*_edg .ValueAttr )});};e .EncodeToken (start );if _edg .Choice !=nil {_edg .Choice .MarshalXML (e ,_f .StartElement {});};e .EncodeToken (_f .EndElement {Name :start .Name });return nil ;};func (_dgc ST_Persistence )ValidateWithPath (path string )error {switch _dgc {case 0,1,2,3,4:default:return _a .Errorf ("\u0025s\u003a\u0020\u006f\u0075t\u0020\u006f\u0066\u0020\u0072a\u006eg\u0065 \u0076\u0061\u006c\u0075\u0065\u0020\u0025d",path ,int (_dgc ));};return nil ;};
|
|
|
|
// Validate validates the CT_Ocx and its children
|
|
func (_gcc *CT_Ocx )Validate ()error {return _gcc .ValidateWithPath ("\u0043\u0054\u005f\u004f\u0063\u0078");};func (_dff ST_Persistence )String ()string {switch _dff {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 "";};type CT_OcxPr struct{NameAttr string ;ValueAttr *string ;Choice *CT_OcxPrChoice ;};func NewCT_Ocx ()*CT_Ocx {_dbf :=&CT_Ocx {};_dbf .PersistenceAttr =ST_Persistence (1);return _dbf };func NewCT_OcxPrChoice ()*CT_OcxPrChoice {_gf :=&CT_OcxPrChoice {};return _gf };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;);func NewCT_Font ()*CT_Font {_b :=&CT_Font {};return _b };
|
|
|
|
// Validate validates the CT_OcxPr and its children
|
|
func (_gbc *CT_OcxPr )Validate ()error {return _gbc .ValidateWithPath ("\u0043\u0054\u005f\u004f\u0063\u0078\u0050\u0072");};
|
|
|
|
// ValidateWithPath validates the Ocx and its children, prefixing error messages with path
|
|
func (_acg *Ocx )ValidateWithPath (path string )error {if _gdb :=_acg .CT_Ocx .ValidateWithPath (path );_gdb !=nil {return _gdb ;};return nil ;};func (_db *CT_Font )MarshalXML (e *_f .Encoder ,start _f .StartElement )error {if _db .PersistenceAttr !=ST_PersistenceUnset {_g ,_ag :=_db .PersistenceAttr .MarshalXMLAttr (_f .Name {Local :"\u0061\u0078\u003a\u0070\u0065\u0072\u0073\u0069\u0073t\u0065\u006e\u0063\u0065"});if _ag !=nil {return _ag ;};start .Attr =append (start .Attr ,_g );};if _db .IdAttr !=nil {start .Attr =append (start .Attr ,_f .Attr {Name :_f .Name {Local :"\u0072\u003a\u0069\u0064"},Value :_a .Sprintf ("\u0025\u0076",*_db .IdAttr )});};e .EncodeToken (start );if _db .OcxPr !=nil {_ec :=_f .StartElement {Name :_f .Name {Local :"\u0061\u0078\u003a\u006f\u0063\u0078\u0050\u0072"}};for _ ,_ef :=range _db .OcxPr {e .EncodeElement (_ef ,_ec );};};e .EncodeToken (_f .EndElement {Name :start .Name });return nil ;};type CT_Picture struct{IdAttr *string ;};func (_feb ST_Persistence )Validate ()error {return _feb .ValidateWithPath ("")};func NewCT_OcxPr ()*CT_OcxPr {_fd :=&CT_OcxPr {};return _fd };type ST_Persistence byte ;
|
|
|
|
// ValidateWithPath validates the CT_Picture and its children, prefixing error messages with path
|
|
func (_afa *CT_Picture )ValidateWithPath (path string )error {return nil };func (_cb *CT_OcxPrChoice )MarshalXML (e *_f .Encoder ,start _f .StartElement )error {if _cb .Font !=nil {_gag :=_f .StartElement {Name :_f .Name {Local :"\u0061x\u003a\u0066\u006f\u006e\u0074"}};e .EncodeElement (_cb .Font ,_gag );};if _cb .Picture !=nil {_fdg :=_f .StartElement {Name :_f .Name {Local :"\u0061\u0078\u003a\u0070\u0069\u0063\u0074\u0075\u0072\u0065"}};e .EncodeElement (_cb .Picture ,_fdg );};return nil ;};func (_eefd *ST_Persistence )UnmarshalXML (d *_f .Decoder ,start _f .StartElement )error {_cd ,_ecg :=d .Token ();if _ecg !=nil {return _ecg ;};if _gfa ,_ffa :=_cd .(_f .EndElement );_ffa &&_gfa .Name ==start .Name {*_eefd =1;return nil ;};if _aed ,_acc :=_cd .(_f .CharData );!_acc {return _a .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",_cd );}else {switch string (_aed ){case "":*_eefd =0;case "\u0070e\u0072s\u0069\u0073\u0074\u0050\u0072o\u0070\u0065r\u0074\u0079\u0042\u0061\u0067":*_eefd =1;case "\u0070\u0065\u0072\u0073\u0069\u0073\u0074\u0053\u0074\u0072\u0065\u0061\u006d":*_eefd =2;case "\u0070\u0065\u0072\u0073\u0069\u0073\u0074\u0053\u0074\u0072\u0065\u0061m\u0049\u006e\u0069\u0074":*_eefd =3;case "\u0070\u0065\u0072\u0073\u0069\u0073\u0074\u0053\u0074o\u0072\u0061\u0067\u0065":*_eefd =4;};};_cd ,_ecg =d .Token ();if _ecg !=nil {return _ecg ;};if _ddg ,_ecc :=_cd .(_f .EndElement );_ecc &&_ddg .Name ==start .Name {return nil ;};return _a .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",_cd );};
|
|
|
|
// ValidateWithPath validates the CT_OcxPrChoice and its children, prefixing error messages with path
|
|
func (_bcgg *CT_OcxPrChoice )ValidateWithPath (path string )error {if _bcgg .Font !=nil {if _bea :=_bcgg .Font .ValidateWithPath (path +"\u002f\u0046\u006fn\u0074");_bea !=nil {return _bea ;};};if _bcgg .Picture !=nil {if _da :=_bcgg .Picture .ValidateWithPath (path +"\u002f\u0050\u0069\u0063\u0074\u0075\u0072\u0065");_da !=nil {return _da ;};};return nil ;};func (_cgb *Ocx )MarshalXML (e *_f .Encoder ,start _f .StartElement )error {start .Attr =append (start .Attr ,_f .Attr {Name :_f .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 ,_f .Attr {Name :_f .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 ,_f .Attr {Name :_f .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 ,_f .Attr {Name :_f .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 _cgb .CT_Ocx .MarshalXML (e ,start );};func init (){_ae .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 );_ae .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 );_ae .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 );_ae .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 );_ae .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 );}; |