prepare release

This commit is contained in:
UniDoc Build 2021-05-31 16:22:30 +00:00
parent 9dd5d3abf7
commit d1a30428b9
50 changed files with 24386 additions and 24383 deletions

View File

@ -9,7 +9,7 @@
// 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 algo ;import _e "strconv";
package algo ;import _b "strconv";func RepeatString (s string ,cnt int )string {if cnt <=0{return "";};_dd :=make ([]byte ,len (s )*cnt );_ab :=[]byte (s );for _gc :=0;_gc < cnt ;_gc ++{copy (_dd [_gc :],_ab );};return string (_dd );};func _d (_bf byte )bool {return _bf >='0'&&_bf <='9'};
// NaturalLess compares two strings in a human manner so rId2 sorts less than rId10
func NaturalLess (lhs ,rhs string )bool {_ff ,_ab :=0,0;for _ff < len (lhs )&&_ab < len (rhs ){_fc :=lhs [_ff ];_ee :=rhs [_ab ];_gg :=_g (_fc );_d :=_g (_ee );switch {case _gg &&!_d :return true ;case !_gg &&_d :return false ;case !_gg &&!_d :if _fc !=_ee {return _fc < _ee ;};_ff ++;_ab ++;default:_c :=_ff +1;_eb :=_ab +1;for _c < len (lhs )&&_g (lhs [_c ]){_c ++;};for _eb < len (rhs )&&_g (rhs [_eb ]){_eb ++;};_fff ,_ :=_e .ParseUint (lhs [_ff :_c ],10,64);_dd ,_ :=_e .ParseUint (rhs [_ff :_eb ],10,64);if _fff !=_dd {return _fff < _dd ;};_ff =_c ;_ab =_eb ;};};return len (lhs )< len (rhs );};func RepeatString (s string ,cnt int )string {if cnt <=0{return "";};_ggc :=make ([]byte ,len (s )*cnt );_b :=[]byte (s );for _ea :=0;_ea < cnt ;_ea ++{copy (_ggc [_ea :],_b );};return string (_ggc );};func _g (_a byte )bool {return _a >='0'&&_a <='9'};
func NaturalLess (lhs ,rhs string )bool {_bd ,_gd :=0,0;for _bd < len (lhs )&&_gd < len (rhs ){_a :=lhs [_bd ];_gb :=rhs [_gd ];_aa :=_d (_a );_be :=_d (_gb );switch {case _aa &&!_be :return true ;case !_aa &&_be :return false ;case !_aa &&!_be :if _a !=_gb {return _a < _gb ;};_bd ++;_gd ++;default:_ag :=_bd +1;_c :=_gd +1;for _ag < len (lhs )&&_d (lhs [_ag ]){_ag ++;};for _c < len (rhs )&&_d (rhs [_c ]){_c ++;};_e ,_ :=_b .ParseUint (lhs [_bd :_ag ],10,64);_bdc ,_ :=_b .ParseUint (rhs [_bd :_c ],10,64);if _e !=_bdc {return _e < _bdc ;};_bd =_ag ;_gd =_c ;};};return len (lhs )< len (rhs );};

View File

@ -9,523 +9,523 @@
// 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 chart ;import (_d "fmt";_e "github.com/unidoc/unioffice";_ed "github.com/unidoc/unioffice/color";_fb "github.com/unidoc/unioffice/drawing";_a "github.com/unidoc/unioffice/measurement";_dc "github.com/unidoc/unioffice/schema/soo/dml";_g "github.com/unidoc/unioffice/schema/soo/dml/chart";_b "math/rand";);func (_eb nullAxis )AxisID ()uint32 {return 0};func (_gac CategoryAxis )SetMinorTickMark (m _g .ST_TickMark ){if m ==_g .ST_TickMarkUnset {_gac ._fab .MinorTickMark =nil ;}else {_gac ._fab .MinorTickMark =_g .NewCT_TickMark ();_gac ._fab .MinorTickMark .ValAttr =m ;};};type Marker struct{_ege *_g .CT_Marker };
// Properties returns the bar chart series shape properties.
func (_bcb AreaChartSeries )Properties ()_fb .ShapeProperties {if _bcb ._bgc .SpPr ==nil {_bcb ._bgc .SpPr =_dc .NewCT_ShapeProperties ();};return _fb .MakeShapeProperties (_bcb ._bgc .SpPr );};func (_gbbdg SeriesAxis )InitializeDefaults (){};type Title struct{_adcf *_g .CT_Title };
// BarChartSeries is a series to be used on a bar chart.
type BarChartSeries struct{_dg *_g .CT_BarSer };func (_egeg Marker )Properties ()_fb .ShapeProperties {if _egeg ._ege .SpPr ==nil {_egeg ._ege .SpPr =_dc .NewCT_ShapeProperties ();};return _fb .MakeShapeProperties (_egeg ._ege .SpPr );};
// AddLine3DChart adds a new 3D line chart to a chart.
func (_bef Chart )AddLine3DChart ()Line3DChart {_ffe (_bef ._cdb .Chart );_ged :=_g .NewCT_PlotAreaChoice ();_bef ._cdb .Chart .PlotArea .Choice =append (_bef ._cdb .Chart .PlotArea .Choice ,_ged );_ged .Line3DChart =_g .NewCT_Line3DChart ();_ged .Line3DChart .Grouping =_g .NewCT_Grouping ();_ged .Line3DChart .Grouping .ValAttr =_g .ST_GroupingStandard ;return Line3DChart {_dfb :_ged .Line3DChart };};
package chart ;import (_f "fmt";_fe "github.com/unidoc/unioffice";_fef "github.com/unidoc/unioffice/color";_fega "github.com/unidoc/unioffice/drawing";_ee "github.com/unidoc/unioffice/measurement";_feg "github.com/unidoc/unioffice/schema/soo/dml";_e "github.com/unidoc/unioffice/schema/soo/dml/chart";_d "math/rand";);
// AddSeries adds a default series to a Surface chart.
func (_agg Surface3DChart )AddSeries ()SurfaceChartSeries {_dac :=_agg .nextColor (len (_agg ._agfa .Ser ));_eaba :=_g .NewCT_SurfaceSer ();_agg ._agfa .Ser =append (_agg ._agfa .Ser ,_eaba );_eaba .Idx .ValAttr =uint32 (len (_agg ._agfa .Ser )-1);_eaba .Order .ValAttr =uint32 (len (_agg ._agfa .Ser )-1);_gagb :=SurfaceChartSeries {_eaba };_gagb .InitializeDefaults ();_gagb .Properties ().LineProperties ().SetSolidFill (_dac );return _gagb ;};
func (_gbbc SurfaceChart )AddSeries ()SurfaceChartSeries {_gce :=_gbbc .nextColor (len (_gbbc ._gcaa .Ser ));_gag :=_e .NewCT_SurfaceSer ();_gbbc ._gcaa .Ser =append (_gbbc ._gcaa .Ser ,_gag );_gag .Idx .ValAttr =uint32 (len (_gbbc ._gcaa .Ser )-1);_gag .Order .ValAttr =uint32 (len (_gbbc ._gcaa .Ser )-1);_baf :=SurfaceChartSeries {_gag };_baf .InitializeDefaults ();_baf .Properties ().LineProperties ().SetSolidFill (_gce );return _baf ;};func (_cff CategoryAxis )SetPosition (p _e .ST_AxPos ){_cff ._aac .AxPos =_e .NewCT_AxPos ();_cff ._aac .AxPos .ValAttr =p ;};
// SetDirection changes the direction of the bar chart (bar or column).
func (_bfe Bar3DChart )SetDirection (d _e .ST_BarDir ){_bfe ._daa .BarDir .ValAttr =d };
// SetValues sets values directly on a source.
func (_beae NumberDataSource )SetValues (v []float64 ){_beae .ensureChoice ();_beae ._dce .Choice .NumRef =nil ;_beae ._dce .Choice .NumLit =_e .NewCT_NumData ();_beae ._dce .Choice .NumLit .PtCount =_e .NewCT_UnsignedInt ();_beae ._dce .Choice .NumLit .PtCount .ValAttr =uint32 (len (v ));for _gdfc ,_bded :=range v {_beae ._dce .Choice .NumLit .Pt =append (_beae ._dce .Choice .NumLit .Pt ,&_e .CT_NumVal {IdxAttr :uint32 (_gdfc ),V :_f .Sprintf ("\u0025\u0067",_bded )});};};
// AddStockChart adds a new stock chart.
func (_cec Chart )AddStockChart ()StockChart {_df :=_e .NewCT_PlotAreaChoice ();_cec ._gdd .Chart .PlotArea .Choice =append (_cec ._gdd .Chart .PlotArea .Choice ,_df );_df .StockChart =_e .NewCT_StockChart ();_bca :=StockChart {_agc :_df .StockChart };_bca .InitializeDefaults ();return _bca ;};
// X returns the inner wrapped XML type.
func (_afcc LineChartSeries )X ()*_e .CT_LineSer {return _afcc ._afc };
// Axis is the interface implemented by different axes when assigning to a
// chart.
type Axis interface{AxisID ()uint32 ;};type NumberDataSource struct{_dce *_e .CT_NumDataSource };type Line3DChart struct{chartBase ;_cbd *_e .CT_Line3DChart ;};
// BubbleChartSeries is a series to be used on a Bubble chart.
type BubbleChartSeries struct{_gd *_e .CT_BubbleSer };
// AddDateAxis adds a value axis to the chart.
func (_dgce Chart )AddDateAxis ()DateAxis {_dcb :=_e .NewCT_DateAx ();if _dgce ._gdd .Chart .PlotArea .CChoice ==nil {_dgce ._gdd .Chart .PlotArea .CChoice =_e .NewCT_PlotAreaChoice1 ();};_dcb .AxId =_e .NewCT_UnsignedInt ();_dcb .AxId .ValAttr =0x7FFFFFFF&_d .Uint32 ();_dgce ._gdd .Chart .PlotArea .CChoice .DateAx =append (_dgce ._gdd .Chart .PlotArea .CChoice .DateAx ,_dcb );_dcb .Delete =_e .NewCT_Boolean ();_dcb .Delete .ValAttr =_fe .Bool (false );_dcb .Scaling =_e .NewCT_Scaling ();_dcb .Scaling .Orientation =_e .NewCT_Orientation ();_dcb .Scaling .Orientation .ValAttr =_e .ST_OrientationMinMax ;_dcb .Choice =&_e .EG_AxSharedChoice {};_dcb .Choice .Crosses =_e .NewCT_Crosses ();_dcb .Choice .Crosses .ValAttr =_e .ST_CrossesAutoZero ;_gafb :=DateAxis {_dcb };_gafb .MajorGridLines ().Properties ().LineProperties ().SetSolidFill (_fef .LightGray );_gafb .SetMajorTickMark (_e .ST_TickMarkOut );_gafb .SetMinorTickMark (_e .ST_TickMarkIn );_gafb .SetTickLabelPosition (_e .ST_TickLblPosNextTo );_gafb .Properties ().LineProperties ().SetSolidFill (_fef .Black );_gafb .SetPosition (_e .ST_AxPosL );return _gafb ;};
// RadarChart is an Radar chart that has a shaded Radar underneath a curve.
type RadarChart struct{chartBase ;_ebcd *_e .CT_RadarChart ;};
// X returns the inner wrapped XML type.
func (_aa BubbleChartSeries )X ()*_e .CT_BubbleSer {return _aa ._gd };
// Values returns the value data source.
func (_da AreaChartSeries )Values ()NumberDataSource {if _da ._caa .Val ==nil {_da ._caa .Val =_e .NewCT_NumDataSource ();};return MakeNumberDataSource (_da ._caa .Val );};
// CategoryAxis returns the category data source.
func (_ffg BubbleChartSeries )CategoryAxis ()CategoryAxisDataSource {if _ffg ._dff .XVal ==nil {_ffg ._dff .XVal =_g .NewCT_AxDataSource ();};return MakeAxisDataSource (_ffg ._dff .XVal );};
func (_cab BarChartSeries )CategoryAxis ()CategoryAxisDataSource {if _cab ._fc .Cat ==nil {_cab ._fc .Cat =_e .NewCT_AxDataSource ();};return MakeAxisDataSource (_cab ._fc .Cat );};func (_fg Area3DChart )AddAxis (axis Axis ){_bfa :=_e .NewCT_UnsignedInt ();_bfa .ValAttr =axis .AxisID ();_fg ._cg .AxId =append (_fg ._cg .AxId ,_bfa );};
// Properties returns the line chart series shape properties.
func (_febd SurfaceChartSeries )Properties ()_fega .ShapeProperties {if _febd ._gdda .SpPr ==nil {_febd ._gdda .SpPr =_feg .NewCT_ShapeProperties ();};return _fega .MakeShapeProperties (_febd ._gdda .SpPr );};
// AddSeries adds a default series to a Scatter chart.
func (_efaf ScatterChart )AddSeries ()ScatterChartSeries {_dgf :=_efaf .nextColor (len (_efaf ._dbbd .Ser ));_bcb :=_e .NewCT_ScatterSer ();_efaf ._dbbd .Ser =append (_efaf ._dbbd .Ser ,_bcb );_bcb .Idx .ValAttr =uint32 (len (_efaf ._dbbd .Ser )-1);_bcb .Order .ValAttr =uint32 (len (_efaf ._dbbd .Ser )-1);_gfef :=ScatterChartSeries {_bcb };_gfef .InitializeDefaults ();_gfef .Marker ().Properties ().LineProperties ().SetSolidFill (_dgf );_gfef .Marker ().Properties ().SetSolidFill (_dgf );return _gfef ;};func (_bdag DataLabels )SetShowLegendKey (b bool ){_bdag .ensureChoice ();_bdag ._bga .Choice .ShowLegendKey =_e .NewCT_Boolean ();_bdag ._bga .Choice .ShowLegendKey .ValAttr =_fe .Bool (b );};
// AddPieChart adds a new pie chart to a chart.
func (_ece Chart )AddPieChart ()PieChart {_bec :=_e .NewCT_PlotAreaChoice ();_ece ._gdd .Chart .PlotArea .Choice =append (_ece ._gdd .Chart .PlotArea .Choice ,_bec );_bec .PieChart =_e .NewCT_PieChart ();_ebf :=PieChart {_bddb :_bec .PieChart };_ebf .InitializeDefaults ();return _ebf ;};type chartBase struct{};
// X returns the inner wrapped XML type.
func (_dfec PieChart )X ()*_g .CT_PieChart {return _dfec ._fdca };
func (_cfe Bar3DChart )X ()*_e .CT_Bar3DChart {return _cfe ._daa };
// InitializeDefaults the bar chart to its defaults
func (_bad DoughnutChart )InitializeDefaults (){_bad ._gebe .VaryColors =_e .NewCT_Boolean ();_bad ._gebe .VaryColors .ValAttr =_fe .Bool (true );_bad ._gebe .HoleSize =_e .NewCT_HoleSize ();_bad ._gebe .HoleSize .ValAttr =&_e .ST_HoleSize {};_bad ._gebe .HoleSize .ValAttr .ST_HoleSizeUByte =_fe .Uint8 (50);};func (_fbc Title )ParagraphProperties ()_fega .ParagraphProperties {if _fbc ._afaa .Tx ==nil {_fbc .SetText ("");};if _fbc ._afaa .Tx .Choice .Rich .P [0].PPr ==nil {_fbc ._afaa .Tx .Choice .Rich .P [0].PPr =_feg .NewCT_TextParagraphProperties ();};return _fega .MakeParagraphProperties (_fbc ._afaa .Tx .Choice .Rich .P [0].PPr );};type Legend struct{_eca *_e .CT_Legend };type nullAxis byte ;
// Values returns the value data source.
func (_ddb BarChartSeries )Values ()NumberDataSource {if _ddb ._fc .Val ==nil {_ddb ._fc .Val =_e .NewCT_NumDataSource ();};return MakeNumberDataSource (_ddb ._fc .Val );};func (_fee DateAxis )SetPosition (p _e .ST_AxPos ){_fee ._gggda .AxPos =_e .NewCT_AxPos ();_fee ._gggda .AxPos .ValAttr =p ;};
// X returns the inner wrapped XML type.
func (_bcbc RadarChart )X ()*_g .CT_RadarChart {return _bcbc ._cfdg };
func (_efb SurfaceChartSeries )X ()*_e .CT_SurfaceSer {return _efb ._gdda };func (_dba ScatterChart )InitializeDefaults (){_dba ._dbbd .ScatterStyle .ValAttr =_e .ST_ScatterStyleMarker ;};
// Labels returns the data label properties.
func (_gga LineChartSeries )Labels ()DataLabels {if _gga ._afc .DLbls ==nil {_gga ._afc .DLbls =_e .NewCT_DLbls ();};return MakeDataLabels (_gga ._afc .DLbls );};func MakeChart (x *_e .ChartSpace )Chart {return Chart {x }};
// AddSeries adds a default series to an area chart.
func (_fd Area3DChart )AddSeries ()AreaChartSeries {_bf :=_fd .nextColor (len (_fd ._cg .Ser ));_ce :=_e .NewCT_AreaSer ();_fd ._cg .Ser =append (_fd ._cg .Ser ,_ce );_ce .Idx .ValAttr =uint32 (len (_fd ._cg .Ser )-1);_ce .Order .ValAttr =uint32 (len (_fd ._cg .Ser )-1);_g :=AreaChartSeries {_ce };_g .InitializeDefaults ();_g .Properties ().SetSolidFill (_bf );return _g ;};
// SetIndex sets the index of the series
func (_cad LineChartSeries )SetIndex (idx uint32 ){_cad ._afc .Idx .ValAttr =idx };
// SetOrder sets the order of the series
func (_egbc LineChartSeries )SetOrder (idx uint32 ){_egbc ._afc .Order .ValAttr =idx };
// InitializeDefaults the bar chart to its defaults
func (_db Bar3DChart )InitializeDefaults (){_db .SetDirection (_e .ST_BarDirCol )};
// X returns the inner wrapped XML type.
func (_cgfa StockChart )X ()*_g .CT_StockChart {return _cgfa ._gceg };
func (_ddg GridLines )X ()*_e .CT_ChartLines {return _ddg ._fgcf };
// AddLegend adds a legend to a chart, replacing any existing legend.
func (_abb Chart )AddLegend ()Legend {_abb ._cdb .Chart .Legend =_g .NewCT_Legend ();_fga :=MakeLegend (_abb ._cdb .Chart .Legend );_fga .InitializeDefaults ();return _fga ;};
// AddAxis adds an axis to a line chart.
func (_efgg LineChart )AddAxis (axis Axis ){_feed :=_e .NewCT_UnsignedInt ();_feed .ValAttr =axis .AxisID ();_efgg ._gafd .AxId =append (_efgg ._gafd .AxId ,_feed );};type DateAxis struct{_gggda *_e .CT_DateAx };func (_ebc DataLabels )ensureChoice (){if _ebc ._bga .Choice ==nil {_ebc ._bga .Choice =_e .NewCT_DLblsChoice ();};};func (_fbbe DateAxis )AxisID ()uint32 {return _fbbe ._gggda .AxId .ValAttr };func (_bgd StockChart )AddAxis (axis Axis ){_fbbb :=_e .NewCT_UnsignedInt ();_fbbb .ValAttr =axis .AxisID ();_bgd ._agc .AxId =append (_bgd ._agc .AxId ,_fbbb );};
// X returns the inner wrapped XML type.
func (_gdeb ScatterChart )X ()*_e .CT_ScatterChart {return _gdeb ._dbbd };
// Properties returns the bar chart series shape properties.
func (_egac RadarChartSeries )Properties ()_fega .ShapeProperties {if _egac ._eed .SpPr ==nil {_egac ._eed .SpPr =_feg .NewCT_ShapeProperties ();};return _fega .MakeShapeProperties (_egac ._eed .SpPr );};
// Marker returns the marker properties.
func (_becc LineChartSeries )Marker ()Marker {if _becc ._afc .Marker ==nil {_becc ._afc .Marker =_e .NewCT_Marker ();};return MakeMarker (_becc ._afc .Marker );};
// InitializeDefaults the Bubble chart to its defaults
func (_fec BubbleChart )InitializeDefaults (){};
// DoughnutChart is a Doughnut chart.
type DoughnutChart struct{chartBase ;_gebe *_e .CT_DoughnutChart ;};
// Properties returns the chart's shape properties.
func (_gda Chart )Properties ()_fega .ShapeProperties {if _gda ._gdd .SpPr ==nil {_gda ._gdd .SpPr =_feg .NewCT_ShapeProperties ();};return _fega .MakeShapeProperties (_gda ._gdd .SpPr );};func (_feb CategoryAxis )AxisID ()uint32 {return _feb ._aac .AxId .ValAttr };
// X returns the inner wrapped XML type.
func (_ec BarChart )X ()*_e .CT_BarChart {return _ec ._fa };func (_cb CategoryAxis )SetTickLabelPosition (p _e .ST_TickLblPos ){if p ==_e .ST_TickLblPosUnset {_cb ._aac .TickLblPos =nil ;}else {_cb ._aac .TickLblPos =_e .NewCT_TickLblPos ();_cb ._aac .TickLblPos .ValAttr =p ;};};
// PieOfPieChart is a Pie chart with an extra Pie chart.
type PieOfPieChart struct{chartBase ;_ggac *_e .CT_OfPieChart ;};func (_eaa SurfaceChartSeries )CategoryAxis ()CategoryAxisDataSource {if _eaa ._gdda .Cat ==nil {_eaa ._gdda .Cat =_e .NewCT_AxDataSource ();};return MakeAxisDataSource (_eaa ._gdda .Cat );};func (_ggae LineChartSeries )Values ()NumberDataSource {if _ggae ._afc .Val ==nil {_ggae ._afc .Val =_e .NewCT_NumDataSource ();};return MakeNumberDataSource (_ggae ._afc .Val );};func (_dgea LineChartSeries )CategoryAxis ()CategoryAxisDataSource {if _dgea ._afc .Cat ==nil {_dgea ._afc .Cat =_e .NewCT_AxDataSource ();};return MakeAxisDataSource (_dgea ._afc .Cat );};func MakeNumberDataSource (x *_e .CT_NumDataSource )NumberDataSource {return NumberDataSource {x }};func (_bb chartBase )nextColor (_bee int )_fef .Color {return _fgc [_bee %len (_fgc )]};
// X returns the inner wrapped XML type.
func (_ddf ScatterChartSeries )X ()*_e .CT_ScatterSer {return _ddf ._egge };
// SetOrder sets the order of the series
func (_aed SurfaceChartSeries )SetOrder (idx uint32 ){_aed ._gdda .Order .ValAttr =idx };
// X returns the inner wrapped XML type.
func (_dca Legend )X ()*_e .CT_Legend {return _dca ._eca };
// InitializeDefaults initializes a Bubble chart series to the default values.
func (_aae BubbleChartSeries )InitializeDefaults (){};
// X returns the inner wrapped XML type.
func (_cgce SurfaceChart )X ()*_e .CT_SurfaceChart {return _cgce ._gcaa };func MakeDataLabels (x *_e .CT_DLbls )DataLabels {return DataLabels {x }};func (_bfc DateAxis )Properties ()_fega .ShapeProperties {if _bfc ._gggda .SpPr ==nil {_bfc ._gggda .SpPr =_feg .NewCT_ShapeProperties ();};return _fega .MakeShapeProperties (_bfc ._gggda .SpPr );};
// SetOrder sets the order of the series
func (_dcf ScatterChartSeries )SetOrder (idx uint32 ){_dcf ._egge .Order .ValAttr =idx };func (_caf ValueAxis )SetCrosses (axis Axis ){_caf ._cdf .CrossAx .ValAttr =axis .AxisID ()};
// X returns the inner wrapped XML type.
func (_ggbg PieChartSeries )X ()*_e .CT_PieSer {return _ggbg ._faag };func (_edb Legend )SetPosition (p _e .ST_LegendPos ){if p ==_e .ST_LegendPosUnset {_edb ._eca .LegendPos =nil ;}else {_edb ._eca .LegendPos =_e .NewCT_LegendPos ();_edb ._eca .LegendPos .ValAttr =p ;};};
// SetLabelReference is used to set the source data to a range of cells
// containing strings.
func (_aed CategoryAxisDataSource )SetLabelReference (s string ){_aed ._eab .Choice =_g .NewCT_AxDataSourceChoice ();_aed ._eab .Choice .StrRef =_g .NewCT_StrRef ();_aed ._eab .Choice .StrRef .F =s ;};func (_bcba SurfaceChart )InitializeDefaults (){_bcba ._ecd .Wireframe =_g .NewCT_Boolean ();_bcba ._ecd .Wireframe .ValAttr =_e .Bool (false );_bcba ._ecd .BandFmts =_g .NewCT_BandFmts ();for _deg :=0;_deg < 15;_deg ++{_dae :=_g .NewCT_BandFmt ();_dae .Idx .ValAttr =uint32 (_deg );_dae .SpPr =_dc .NewCT_ShapeProperties ();_aaa :=_fb .MakeShapeProperties (_dae .SpPr );_aaa .SetSolidFill (_bcba .nextColor (_deg ));_bcba ._ecd .BandFmts .BandFmt =append (_bcba ._ecd .BandFmts .BandFmt ,_dae );};};
// Labels returns the data label properties.
func (_fcc LineChartSeries )Labels ()DataLabels {if _fcc ._bce .DLbls ==nil {_fcc ._bce .DLbls =_g .NewCT_DLbls ();};return MakeDataLabels (_fcc ._bce .DLbls );};
// Properties returns the Bubble chart series shape properties.
func (_dgf BubbleChartSeries )Properties ()_fb .ShapeProperties {if _dgf ._dff .SpPr ==nil {_dgf ._dff .SpPr =_dc .NewCT_ShapeProperties ();};return _fb .MakeShapeProperties (_dgf ._dff .SpPr );};func _ffe (_edag *_g .CT_Chart ){_edag .View3D =_g .NewCT_View3D ();_edag .View3D .RotX =_g .NewCT_RotX ();_edag .View3D .RotX .ValAttr =_e .Int8 (15);_edag .View3D .RotY =_g .NewCT_RotY ();_edag .View3D .RotY .ValAttr =_e .Uint16 (20);_edag .View3D .RAngAx =_g .NewCT_Boolean ();_edag .View3D .RAngAx .ValAttr =_e .Bool (false );_edag .Floor =_g .NewCT_Surface ();_edag .Floor .Thickness =_g .NewCT_Thickness ();_edag .Floor .Thickness .ValAttr .Uint32 =_e .Uint32 (0);_edag .SideWall =_g .NewCT_Surface ();_edag .SideWall .Thickness =_g .NewCT_Thickness ();_edag .SideWall .Thickness .ValAttr .Uint32 =_e .Uint32 (0);_edag .BackWall =_g .NewCT_Surface ();_edag .BackWall .Thickness =_g .NewCT_Thickness ();_edag .BackWall .Thickness .ValAttr .Uint32 =_e .Uint32 (0);};
// Properties returns the line chart series shape properties.
func (_efa SurfaceChartSeries )Properties ()_fb .ShapeProperties {if _efa ._ecdc .SpPr ==nil {_efa ._ecdc .SpPr =_dc .NewCT_ShapeProperties ();};return _fb .MakeShapeProperties (_efa ._ecdc .SpPr );};
// AddCategoryAxis adds a category axis.
func (_abe Chart )AddCategoryAxis ()CategoryAxis {_dcfe :=_g .NewCT_CatAx ();if _abe ._cdb .Chart .PlotArea .CChoice ==nil {_abe ._cdb .Chart .PlotArea .CChoice =_g .NewCT_PlotAreaChoice1 ();};_dcfe .AxId =_g .NewCT_UnsignedInt ();_dcfe .AxId .ValAttr =0x7FFFFFFF&_b .Uint32 ();_abe ._cdb .Chart .PlotArea .CChoice .CatAx =append (_abe ._cdb .Chart .PlotArea .CChoice .CatAx ,_dcfe );_dcfe .Auto =_g .NewCT_Boolean ();_dcfe .Auto .ValAttr =_e .Bool (true );_dcfe .Delete =_g .NewCT_Boolean ();_dcfe .Delete .ValAttr =_e .Bool (false );_bdd :=MakeCategoryAxis (_dcfe );_bdd .InitializeDefaults ();return _bdd ;};func (_bac StockChart )AddAxis (axis Axis ){_gaf :=_g .NewCT_UnsignedInt ();_gaf .ValAttr =axis .AxisID ();_bac ._gceg .AxId =append (_bac ._gceg .AxId ,_gaf );};
// Values returns the bubble size data source.
func (_fbb BubbleChartSeries )BubbleSizes ()NumberDataSource {if _fbb ._dff .BubbleSize ==nil {_fbb ._dff .BubbleSize =_g .NewCT_NumDataSource ();};return MakeNumberDataSource (_fbb ._dff .BubbleSize );};func (_acg CategoryAxis )Properties ()_fb .ShapeProperties {if _acg ._fab .SpPr ==nil {_acg ._fab .SpPr =_dc .NewCT_ShapeProperties ();};return _fb .MakeShapeProperties (_acg ._fab .SpPr );};
// InitializeDefaults initializes a bar chart series to the default values.
func (_cab BarChartSeries )InitializeDefaults (){};func (_gcaf RadarChart )AddAxis (axis Axis ){_ffc :=_g .NewCT_UnsignedInt ();_ffc .ValAttr =axis .AxisID ();_gcaf ._cfdg .AxId =append (_gcaf ._cfdg .AxId ,_ffc );};
// AddAxis adds an axis to a line chart.
func (_bdga Line3DChart )AddAxis (axis Axis ){_ddf :=_g .NewCT_UnsignedInt ();_ddf .ValAttr =axis .AxisID ();_bdga ._dfb .AxId =append (_bdga ._dfb .AxId ,_ddf );};func (_efbf ScatterChartSeries )CategoryAxis ()CategoryAxisDataSource {if _efbf ._ffgd .XVal ==nil {_efbf ._ffgd .XVal =_g .NewCT_AxDataSource ();};return MakeAxisDataSource (_efbf ._ffgd .XVal );};func (_ffec Marker )SetSymbol (s _g .ST_MarkerStyle ){if s ==_g .ST_MarkerStyleUnset {_ffec ._ege .Symbol =nil ;}else {_ffec ._ege .Symbol =_g .NewCT_MarkerStyle ();_ffec ._ege .Symbol .ValAttr =s ;};};func (_fbba Surface3DChart )InitializeDefaults (){_fbba ._agfa .Wireframe =_g .NewCT_Boolean ();_fbba ._agfa .Wireframe .ValAttr =_e .Bool (false );_fbba ._agfa .BandFmts =_g .NewCT_BandFmts ();for _gbba :=0;_gbba < 15;_gbba ++{_gecd :=_g .NewCT_BandFmt ();_gecd .Idx .ValAttr =uint32 (_gbba );_gecd .SpPr =_dc .NewCT_ShapeProperties ();_aac :=_fb .MakeShapeProperties (_gecd .SpPr );_aac .SetSolidFill (_fbba .nextColor (_gbba ));_fbba ._agfa .BandFmts .BandFmt =append (_fbba ._agfa .BandFmts .BandFmt ,_gecd );};};func (_bgd LineChartSeries )InitializeDefaults (){_bgd .Properties ().LineProperties ().SetWidth (1*_a .Point );_bgd .Properties ().LineProperties ().SetSolidFill (_ed .Black );_bgd .Properties ().LineProperties ().SetJoin (_fb .LineJoinRound );_bgd .Marker ().SetSymbol (_g .ST_MarkerStyleNone );_bgd .Labels ().SetShowLegendKey (false );_bgd .Labels ().SetShowValue (false );_bgd .Labels ().SetShowPercent (false );_bgd .Labels ().SetShowCategoryName (false );_bgd .Labels ().SetShowSeriesName (false );_bgd .Labels ().SetShowLeaderLines (false );};
// X returns the inner wrapped XML type.
func (_bcg Line3DChart )X ()*_g .CT_Line3DChart {return _bcg ._dfb };
// SetText sets the series text.
func (_eccf PieChartSeries )SetText (s string ){_eccf ._baea .Tx =_g .NewCT_SerTx ();_eccf ._baea .Tx .Choice .V =&s ;};
// AddSeries adds a default series to an Pie chart.
func (_cbd PieOfPieChart )AddSeries ()PieChartSeries {_fbda :=_g .NewCT_PieSer ();_cbd ._bbg .Ser =append (_cbd ._bbg .Ser ,_fbda );_fbda .Idx .ValAttr =uint32 (len (_cbd ._bbg .Ser )-1);_fbda .Order .ValAttr =uint32 (len (_cbd ._bbg .Ser )-1);_cdfd :=PieChartSeries {_fbda };_cdfd .InitializeDefaults ();return _cdfd ;};
// BubbleChartSeries is a series to be used on a Bubble chart.
type BubbleChartSeries struct{_dff *_g .CT_BubbleSer };
// X returns the inner wrapped XML type.
func (_dbc Surface3DChart )X ()*_g .CT_Surface3DChart {return _dbc ._agfa };func MakeMarker (x *_g .CT_Marker )Marker {return Marker {x }};func (_cga DateAxis )AxisID ()uint32 {return _cga ._caf .AxId .ValAttr };
// InitializeDefaults the Bubble chart to its defaults
func (_cea BubbleChart )InitializeDefaults (){};func MakeLegend (l *_g .CT_Legend )Legend {return Legend {l }};
// SetText sets the series text.
func (_dcb RadarChartSeries )SetText (s string ){_dcb ._dfd .Tx =_g .NewCT_SerTx ();_dcb ._dfd .Tx .Choice .V =&s ;};func (_gag ScatterChartSeries )InitializeDefaults (){_gag .Properties ().LineProperties ().SetNoFill ();_gag .Marker ().SetSymbol (_g .ST_MarkerStyleAuto );_gag .Labels ().SetShowLegendKey (false );_gag .Labels ().SetShowValue (true );_gag .Labels ().SetShowPercent (false );_gag .Labels ().SetShowCategoryName (false );_gag .Labels ().SetShowSeriesName (false );_gag .Labels ().SetShowLeaderLines (false );};
// X returns the inner wrapped XML type.
func (_fag DoughnutChart )X ()*_g .CT_DoughnutChart {return _fag ._bcd };
// X returns the inner wrapped XML type.
func (_fefa Pie3DChart )X ()*_g .CT_Pie3DChart {return _fefa ._fde };
// CategoryAxis returns the category data source.
func (_gff PieChartSeries )CategoryAxis ()CategoryAxisDataSource {if _gff ._baea .Cat ==nil {_gff ._baea .Cat =_g .NewCT_AxDataSource ();};return MakeAxisDataSource (_gff ._baea .Cat );};
// InitializeDefaults initializes an Pie series to the default values.
func (_facc PieChartSeries )InitializeDefaults (){};
// Chart is a generic chart.
type Chart struct{_cdb *_g .ChartSpace };func (_acb CategoryAxis )AxisID ()uint32 {return _acb ._fab .AxId .ValAttr };
// X returns the inner wrapped XML type.
func (_cbb SeriesAxis )X ()*_g .CT_SerAx {return _cbb ._eef };
// X returns the inner wrapped XML type.
func (_efbd RadarChartSeries )X ()*_g .CT_RadarSer {return _efbd ._dfd };
// InitializeDefaults the Stock chart to its defaults
func (_ggdg StockChart )InitializeDefaults (){_ggdg ._gceg .HiLowLines =_g .NewCT_ChartLines ();_ggdg ._gceg .UpDownBars =_g .NewCT_UpDownBars ();_ggdg ._gceg .UpDownBars .GapWidth =_g .NewCT_GapAmount ();_ggdg ._gceg .UpDownBars .GapWidth .ValAttr =&_g .ST_GapAmount {};_ggdg ._gceg .UpDownBars .GapWidth .ValAttr .ST_GapAmountUShort =_e .Uint16 (150);_ggdg ._gceg .UpDownBars .UpBars =_g .NewCT_UpDownBar ();_ggdg ._gceg .UpDownBars .DownBars =_g .NewCT_UpDownBar ();};
// SetValues is used to set the source data to a set of values.
func (_fac CategoryAxisDataSource )SetValues (v []string ){_fac ._eab .Choice =_g .NewCT_AxDataSourceChoice ();_fac ._eab .Choice .StrLit =_g .NewCT_StrData ();_fac ._eab .Choice .StrLit .PtCount =_g .NewCT_UnsignedInt ();_fac ._eab .Choice .StrLit .PtCount .ValAttr =uint32 (len (v ));for _acc ,_ede :=range v {_fac ._eab .Choice .StrLit .Pt =append (_fac ._eab .Choice .StrLit .Pt ,&_g .CT_StrVal {IdxAttr :uint32 (_acc ),V :_ede });};};func (_fea CategoryAxis )SetCrosses (axis Axis ){_fea ._fab .Choice =_g .NewEG_AxSharedChoice ();_fea ._fab .Choice .Crosses =_g .NewCT_Crosses ();_fea ._fab .Choice .Crosses .ValAttr =_g .ST_CrossesAutoZero ;_fea ._fab .CrossAx .ValAttr =axis .AxisID ();};
// Area3DChart is an area chart that has a shaded area underneath a curve.
type Area3DChart struct{chartBase ;_c *_g .CT_Area3DChart ;};
// AddSeries adds a default series to a bar chart.
func (_dfa Bar3DChart )AddSeries ()BarChartSeries {_ea :=_dfa .nextColor (len (_dfa ._dcf .Ser ));_gf :=_g .NewCT_BarSer ();_dfa ._dcf .Ser =append (_dfa ._dcf .Ser ,_gf );_gf .Idx .ValAttr =uint32 (len (_dfa ._dcf .Ser )-1);_gf .Order .ValAttr =uint32 (len (_dfa ._dcf .Ser )-1);_ec :=BarChartSeries {_gf };_ec .InitializeDefaults ();_ec .Properties ().SetSolidFill (_ea );return _ec ;};
// Index returns the index of the series
func (_cgf LineChartSeries )Index ()uint32 {return _cgf ._bce .Idx .ValAttr };func (_dfef LineChartSeries )Values ()NumberDataSource {if _dfef ._bce .Val ==nil {_dfef ._bce .Val =_g .NewCT_NumDataSource ();};return MakeNumberDataSource (_dfef ._bce .Val );};
// Properties returns the bar chart series shape properties.
func (_ac BarChartSeries )Properties ()_fb .ShapeProperties {if _ac ._dg .SpPr ==nil {_ac ._dg .SpPr =_dc .NewCT_ShapeProperties ();};return _fb .MakeShapeProperties (_ac ._dg .SpPr );};
// SetOrder sets the order of the series
func (_gbaa SurfaceChartSeries )SetOrder (idx uint32 ){_gbaa ._ecdc .Order .ValAttr =idx };
// SetNumberReference is used to set the source data to a range of cells containing
// numbers.
func (_age CategoryAxisDataSource )SetNumberReference (s string ){_age ._eab .Choice =_g .NewCT_AxDataSourceChoice ();_age ._eab .Choice .NumRef =_g .NewCT_NumRef ();_age ._eab .Choice .NumRef .F =s ;};
// DoughnutChart is a Doughnut chart.
type DoughnutChart struct{chartBase ;_bcd *_g .CT_DoughnutChart ;};
// X returns the inner wrapped XML type.
func (_de Area3DChart )X ()*_g .CT_Area3DChart {return _de ._c };
// AreaChart is an area chart that has a shaded area underneath a curve.
type AreaChart struct{chartBase ;_ca *_g .CT_AreaChart ;};type Line3DChart struct{chartBase ;_dfb *_g .CT_Line3DChart ;};
func (_ac CategoryAxisDataSource )SetLabelReference (s string ){_ac ._dgd .Choice =_e .NewCT_AxDataSourceChoice ();_ac ._dgd .Choice .StrRef =_e .NewCT_StrRef ();_ac ._dgd .Choice .StrRef .F =s ;};
// InitializeDefaults the bar chart to its defaults
func (_ge Area3DChart )InitializeDefaults (){};func (_cf BarChart )AddAxis (axis Axis ){_fba :=_g .NewCT_UnsignedInt ();_fba .ValAttr =axis .AxisID ();_cf ._fdf .AxId =append (_cf ._fdf .AxId ,_fba );};func (_egg DateAxis )SetTickLabelPosition (p _g .ST_TickLblPos ){if p ==_g .ST_TickLblPosUnset {_egg ._caf .TickLblPos =nil ;}else {_egg ._caf .TickLblPos =_g .NewCT_TickLblPos ();_egg ._caf .TickLblPos .ValAttr =p ;};};
func (_adcg RadarChart )InitializeDefaults (){_adcg ._ebcd .RadarStyle .ValAttr =_e .ST_RadarStyleMarker };
// InitializeDefaults the bar chart to its defaults
func (_bd AreaChart )InitializeDefaults (){};func (_acf Marker )SetSize (sz uint8 ){_acf ._gdf .Size =_e .NewCT_MarkerSize ();_acf ._gdf .Size .ValAttr =&sz ;};func MakeCategoryAxis (x *_e .CT_CatAx )CategoryAxis {return CategoryAxis {x }};
// AddBar3DChart adds a new 3D bar chart to a chart.
func (_ggc Chart )AddBar3DChart ()Bar3DChart {_ad (_ggc ._gdd .Chart );_egb :=_e .NewCT_PlotAreaChoice ();_ggc ._gdd .Chart .PlotArea .Choice =append (_ggc ._gdd .Chart .PlotArea .Choice ,_egb );_egb .Bar3DChart =_e .NewCT_Bar3DChart ();_egb .Bar3DChart .Grouping =_e .NewCT_BarGrouping ();_egb .Bar3DChart .Grouping .ValAttr =_e .ST_BarGroupingStandard ;_de :=Bar3DChart {_daa :_egb .Bar3DChart };_de .InitializeDefaults ();return _de ;};
// AddScatterChart adds a scatter (X/Y) chart.
func (_agf Chart )AddScatterChart ()ScatterChart {_dac :=_e .NewCT_PlotAreaChoice ();_agf ._gdd .Chart .PlotArea .Choice =append (_agf ._gdd .Chart .PlotArea .Choice ,_dac );_dac .ScatterChart =_e .NewCT_ScatterChart ();_bef :=ScatterChart {_dbbd :_dac .ScatterChart };_bef .InitializeDefaults ();return _bef ;};
// InitializeDefaults the bar chart to its defaults
func (_fdgb PieChart )InitializeDefaults (){_fdgb ._bddb .VaryColors =_e .NewCT_Boolean ();_fdgb ._bddb .VaryColors .ValAttr =_fe .Bool (true );};
// BarChartSeries is a series to be used on a bar chart.
type BarChartSeries struct{_fc *_e .CT_BarSer };
// AddAxis adds an axis to a line chart.
func (_bdb Line3DChart )AddAxis (axis Axis ){_dcbe :=_e .NewCT_UnsignedInt ();_dcbe .ValAttr =axis .AxisID ();_bdb ._cbd .AxId =append (_bdb ._cbd .AxId ,_dcbe );};func (_abge GridLines )Properties ()_fega .ShapeProperties {if _abge ._fgcf .SpPr ==nil {_abge ._fgcf .SpPr =_feg .NewCT_ShapeProperties ();};return _fega .MakeShapeProperties (_abge ._fgcf .SpPr );};func (_dbb DataLabels )SetShowValue (b bool ){_dbb .ensureChoice ();_dbb ._bga .Choice .ShowVal =_e .NewCT_Boolean ();_dbb ._bga .Choice .ShowVal .ValAttr =_fe .Bool (b );};
// AddSurface3DChart adds a new 3D surface chart to a chart.
func (_ag Chart )AddSurface3DChart ()Surface3DChart {_ada :=_e .NewCT_PlotAreaChoice ();_ag ._gdd .Chart .PlotArea .Choice =append (_ag ._gdd .Chart .PlotArea .Choice ,_ada );_ada .Surface3DChart =_e .NewCT_Surface3DChart ();_ad (_ag ._gdd .Chart );_adc :=Surface3DChart {_abfa :_ada .Surface3DChart };_adc .InitializeDefaults ();return _adc ;};
// AddDoughnutChart adds a new doughnut (pie with a hole in the center) chart to a chart.
func (_ae Chart )AddDoughnutChart ()DoughnutChart {_ffg :=_e .NewCT_PlotAreaChoice ();_ae ._gdd .Chart .PlotArea .Choice =append (_ae ._gdd .Chart .PlotArea .Choice ,_ffg );_ffg .DoughnutChart =_e .NewCT_DoughnutChart ();_gggd :=DoughnutChart {_gebe :_ffg .DoughnutChart };_gggd .InitializeDefaults ();return _gggd ;};
// AddAxis adds an axis to a Surface chart.
func (_ccb SurfaceChart )AddAxis (axis Axis ){_gdcc :=_e .NewCT_UnsignedInt ();_gdcc .ValAttr =axis .AxisID ();_ccb ._gcaa .AxId =append (_ccb ._gcaa .AxId ,_gdcc );};
// Properties returns the bar chart series shape properties.
func (_cfeg BarChartSeries )Properties ()_fega .ShapeProperties {if _cfeg ._fc .SpPr ==nil {_cfeg ._fc .SpPr =_feg .NewCT_ShapeProperties ();};return _fega .MakeShapeProperties (_cfeg ._fc .SpPr );};func (_acg ScatterChartSeries )InitializeDefaults (){_acg .Properties ().LineProperties ().SetNoFill ();_acg .Marker ().SetSymbol (_e .ST_MarkerStyleAuto );_acg .Labels ().SetShowLegendKey (false );_acg .Labels ().SetShowValue (true );_acg .Labels ().SetShowPercent (false );_acg .Labels ().SetShowCategoryName (false );_acg .Labels ().SetShowSeriesName (false );_acg .Labels ().SetShowLeaderLines (false );};func MakeTitle (x *_e .CT_Title )Title {return Title {x }};func (_dfa DataLabels )SetShowSeriesName (b bool ){_dfa .ensureChoice ();_dfa ._bga .Choice .ShowSerName =_e .NewCT_Boolean ();_dfa ._bga .Choice .ShowSerName .ValAttr =_fe .Bool (b );};
// StockChart is a 2D Stock chart.
type StockChart struct{chartBase ;_agc *_e .CT_StockChart ;};
// AddPieOfPieChart adds a new pie chart to a chart.
func (_gfe Chart )AddPieOfPieChart ()PieOfPieChart {_dda :=_e .NewCT_PlotAreaChoice ();_gfe ._gdd .Chart .PlotArea .Choice =append (_gfe ._gdd .Chart .PlotArea .Choice ,_dda );_dda .OfPieChart =_e .NewCT_OfPieChart ();_efg :=PieOfPieChart {_ggac :_dda .OfPieChart };_efg .InitializeDefaults ();return _efg ;};
// InitializeDefaults initializes an area series to the default values.
func (_cgc AreaChartSeries )InitializeDefaults (){};
// PieChartSeries is a series to be used on an Pie chart.
type PieChartSeries struct{_faag *_e .CT_PieSer };
// SetIndex sets the index of the series
func (_ddcg SurfaceChartSeries )SetIndex (idx uint32 ){_ddcg ._gdda .Idx .ValAttr =idx };
// X returns the inner wrapped XML type.
func (_cca Title )X ()*_g .CT_Title {return _cca ._adcf };
func (_ccc DateAxis )X ()*_e .CT_DateAx {return _ccc ._gggda };
// AddAxis adds an axis to a Surface chart.
func (_gggc Surface3DChart )AddAxis (axis Axis ){_gfeg :=_e .NewCT_UnsignedInt ();_gfeg .ValAttr =axis .AxisID ();_gggc ._abfa .AxId =append (_gggc ._abfa .AxId ,_gfeg );};type Marker struct{_gdf *_e .CT_Marker };
// SetType sets the type the secone pie to either pie or bar
func (_beb PieOfPieChart )SetType (t _g .ST_OfPieType ){_beb ._bbg .OfPieType .ValAttr =t };
func (_ggf PieOfPieChart )SetType (t _e .ST_OfPieType ){_ggf ._ggac .OfPieType .ValAttr =t };func (_fdg CategoryAxis )SetMinorTickMark (m _e .ST_TickMark ){if m ==_e .ST_TickMarkUnset {_fdg ._aac .MinorTickMark =nil ;}else {_fdg ._aac .MinorTickMark =_e .NewCT_TickMark ();_fdg ._aac .MinorTickMark .ValAttr =m ;};};func (_gggb Chart )AddSeriesAxis ()SeriesAxis {_ega :=_e .NewCT_SerAx ();if _gggb ._gdd .Chart .PlotArea .CChoice ==nil {_gggb ._gdd .Chart .PlotArea .CChoice =_e .NewCT_PlotAreaChoice1 ();};_ega .AxId =_e .NewCT_UnsignedInt ();_ega .AxId .ValAttr =0x7FFFFFFF&_d .Uint32 ();_gggb ._gdd .Chart .PlotArea .CChoice .SerAx =append (_gggb ._gdd .Chart .PlotArea .CChoice .SerAx ,_ega );_ega .Delete =_e .NewCT_Boolean ();_ega .Delete .ValAttr =_fe .Bool (false );_aeg :=MakeSeriesAxis (_ega );_aeg .InitializeDefaults ();return _aeg ;};
// AddAreaChart adds a new area chart to a chart.
func (_gdg Chart )AddAreaChart ()AreaChart {_dfg :=_g .NewCT_PlotAreaChoice ();_gdg ._cdb .Chart .PlotArea .Choice =append (_gdg ._cdb .Chart .PlotArea .Choice ,_dfg );_dfg .AreaChart =_g .NewCT_AreaChart ();_ceaf :=AreaChart {_ca :_dfg .AreaChart };_ceaf .InitializeDefaults ();return _ceaf ;};func (_dfgf ValueAxis )Properties ()_fb .ShapeProperties {if _dfgf ._bdad .SpPr ==nil {_dfgf ._bdad .SpPr =_dc .NewCT_ShapeProperties ();};return _fb .MakeShapeProperties (_dfgf ._bdad .SpPr );};func (_gcdc SurfaceChartSeries )InitializeDefaults (){_gcdc .Properties ().LineProperties ().SetWidth (1*_a .Point );_gcdc .Properties ().LineProperties ().SetSolidFill (_ed .Black );_gcdc .Properties ().LineProperties ().SetJoin (_fb .LineJoinRound );};
// LineChartSeries is the data series for a line chart.
type LineChartSeries struct{_afc *_e .CT_LineSer };
// X returns the inner wrapped XML type.
func (_dbf PieChart )X ()*_e .CT_PieChart {return _dbf ._bddb };
// AddLine3DChart adds a new 3D line chart to a chart.
func (_ccd Chart )AddLine3DChart ()Line3DChart {_ad (_ccd ._gdd .Chart );_gc :=_e .NewCT_PlotAreaChoice ();_ccd ._gdd .Chart .PlotArea .Choice =append (_ccd ._gdd .Chart .PlotArea .Choice ,_gc );_gc .Line3DChart =_e .NewCT_Line3DChart ();_gc .Line3DChart .Grouping =_e .NewCT_Grouping ();_gc .Line3DChart .Grouping .ValAttr =_e .ST_GroupingStandard ;return Line3DChart {_cbd :_gc .Line3DChart };};
// Index returns the index of the series
func (_fbg ScatterChartSeries )Index ()uint32 {return _fbg ._egge .Idx .ValAttr };
// Chart is a generic chart.
type Chart struct{_gdd *_e .ChartSpace };func (_bcg DataLabels )SetShowPercent (b bool ){_bcg .ensureChoice ();_bcg ._bga .Choice .ShowPercent =_e .NewCT_Boolean ();_bcg ._bga .Choice .ShowPercent .ValAttr =_fe .Bool (b );};
// Pie3DChart is a Pie3D chart.
type Pie3DChart struct{chartBase ;_cacc *_e .CT_Pie3DChart ;};
// InitializeDefaults initializes a bar chart series to the default values.
func (_daaf BarChartSeries )InitializeDefaults (){};
// AddSeries adds a default series to an Pie chart.
func (_fgg PieChart )AddSeries ()PieChartSeries {_gba :=_e .NewCT_PieSer ();_fgg ._bddb .Ser =append (_fgg ._bddb .Ser ,_gba );_gba .Idx .ValAttr =uint32 (len (_fgg ._bddb .Ser )-1);_gba .Order .ValAttr =uint32 (len (_fgg ._bddb .Ser )-1);_bbf :=PieChartSeries {_gba };_bbf .InitializeDefaults ();return _bbf ;};
// Properties returns the bar chart series shape properties.
func (_fae PieChartSeries )Properties ()_fega .ShapeProperties {if _fae ._faag .SpPr ==nil {_fae ._faag .SpPr =_feg .NewCT_ShapeProperties ();};return _fega .MakeShapeProperties (_fae ._faag .SpPr );};
// SetExplosion sets the value that the segements of the pie are 'exploded' by
func (_aec PieChartSeries )SetExplosion (v uint32 ){_aec ._faag .Explosion =_e .NewCT_UnsignedInt ();_aec ._faag .Explosion .ValAttr =v ;};
// X returns the inner wrapped XML type.
func (_cfb RadarChart )X ()*_e .CT_RadarChart {return _cfb ._ebcd };func (_adca Legend )InitializeDefaults (){_adca .SetPosition (_e .ST_LegendPosR );_adca .SetOverlay (false );_adca .Properties ().SetNoFill ();_adca .Properties ().LineProperties ().SetNoFill ();};
// X returns the inner wrapped XML type.
func (_cac Marker )X ()*_e .CT_Marker {return _cac ._gdf };
// AddSeries adds a default series to an Doughnut chart.
func (_gca DoughnutChart )AddSeries ()PieChartSeries {_fca :=_e .NewCT_PieSer ();_gca ._gebe .Ser =append (_gca ._gebe .Ser ,_fca );_fca .Idx .ValAttr =uint32 (len (_gca ._gebe .Ser )-1);_fca .Order .ValAttr =uint32 (len (_gca ._gebe .Ser )-1);_bfb :=PieChartSeries {_fca };_bfb .InitializeDefaults ();return _bfb ;};
// Values returns the value data source.
func (_dbg BubbleChartSeries )Values ()NumberDataSource {if _dbg ._gd .YVal ==nil {_dbg ._gd .YVal =_e .NewCT_NumDataSource ();};return MakeNumberDataSource (_dbg ._gd .YVal );};func (_ggaa ValueAxis )SetTickLabelPosition (p _e .ST_TickLblPos ){if p ==_e .ST_TickLblPosUnset {_ggaa ._cdf .TickLblPos =nil ;}else {_ggaa ._cdf .TickLblPos =_e .NewCT_TickLblPos ();_ggaa ._cdf .TickLblPos .ValAttr =p ;};};
// AddRadarChart adds a new radar chart to a chart.
func (_eb Chart )AddRadarChart ()RadarChart {_ecd :=_e .NewCT_PlotAreaChoice ();_eb ._gdd .Chart .PlotArea .Choice =append (_eb ._gdd .Chart .PlotArea .Choice ,_ecd );_ecd .RadarChart =_e .NewCT_RadarChart ();_acb :=RadarChart {_ebcd :_ecd .RadarChart };_acb .InitializeDefaults ();return _acb ;};func (_bbeb ScatterChartSeries )SetSmooth (b bool ){_bbeb ._egge .Smooth =_e .NewCT_Boolean ();_bbeb ._egge .Smooth .ValAttr =&b ;};
// AddLineChart adds a new line chart to a chart.
func (_dgc Chart )AddLineChart ()LineChart {_bdae :=_e .NewCT_PlotAreaChoice ();_dgc ._gdd .Chart .PlotArea .Choice =append (_dgc ._gdd .Chart .PlotArea .Choice ,_bdae );_bdae .LineChart =_e .NewCT_LineChart ();_bdae .LineChart .Grouping =_e .NewCT_Grouping ();_bdae .LineChart .Grouping .ValAttr =_e .ST_GroupingStandard ;return LineChart {_gafd :_bdae .LineChart };};
// AddSeries adds a default series to a bar chart.
func (_cd Bar3DChart )AddSeries ()BarChartSeries {_fb :=_cd .nextColor (len (_cd ._daa .Ser ));_ed :=_e .NewCT_BarSer ();_cd ._daa .Ser =append (_cd ._daa .Ser ,_ed );_ed .Idx .ValAttr =uint32 (len (_cd ._daa .Ser )-1);_ed .Order .ValAttr =uint32 (len (_cd ._daa .Ser )-1);_eeg :=BarChartSeries {_ed };_eeg .InitializeDefaults ();_eeg .Properties ().SetSolidFill (_fb );return _eeg ;};
// InitializeDefaults initializes an Pie series to the default values.
func (_abfb PieChartSeries )InitializeDefaults (){};func (_acd Marker )Properties ()_fega .ShapeProperties {if _acd ._gdf .SpPr ==nil {_acd ._gdf .SpPr =_feg .NewCT_ShapeProperties ();};return _fega .MakeShapeProperties (_acd ._gdf .SpPr );};func (_bcgf LineChartSeries )InitializeDefaults (){_bcgf .Properties ().LineProperties ().SetWidth (1*_ee .Point );_bcgf .Properties ().LineProperties ().SetSolidFill (_fef .Black );_bcgf .Properties ().LineProperties ().SetJoin (_fega .LineJoinRound );_bcgf .Marker ().SetSymbol (_e .ST_MarkerStyleNone );_bcgf .Labels ().SetShowLegendKey (false );_bcgf .Labels ().SetShowValue (false );_bcgf .Labels ().SetShowPercent (false );_bcgf .Labels ().SetShowCategoryName (false );_bcgf .Labels ().SetShowSeriesName (false );_bcgf .Labels ().SetShowLeaderLines (false );};
// SetText sets the series text.
func (_egg RadarChartSeries )SetText (s string ){_egg ._eed .Tx =_e .NewCT_SerTx ();_egg ._eed .Tx .Choice .V =&s ;};
// X returns the inner wrapped XML type.
func (_fcd SeriesAxis )X ()*_e .CT_SerAx {return _fcd ._faac };
// X returns the inner wrapped XML type.
func (_fbf BubbleChart )X ()*_e .CT_BubbleChart {return _fbf ._gb };
// SetText sets the series text
func (_ddgd ScatterChartSeries )SetText (s string ){_ddgd ._egge .Tx =_e .NewCT_SerTx ();_ddgd ._egge .Tx .Choice .V =&s ;};
// ScatterChartSeries is the data series for a scatter chart.
type ScatterChartSeries struct{_egge *_e .CT_ScatterSer };
// AddCategoryAxis adds a category axis.
func (_bcc Chart )AddCategoryAxis ()CategoryAxis {_cgg :=_e .NewCT_CatAx ();if _bcc ._gdd .Chart .PlotArea .CChoice ==nil {_bcc ._gdd .Chart .PlotArea .CChoice =_e .NewCT_PlotAreaChoice1 ();};_cgg .AxId =_e .NewCT_UnsignedInt ();_cgg .AxId .ValAttr =0x7FFFFFFF&_d .Uint32 ();_bcc ._gdd .Chart .PlotArea .CChoice .CatAx =append (_bcc ._gdd .Chart .PlotArea .CChoice .CatAx ,_cgg );_cgg .Auto =_e .NewCT_Boolean ();_cgg .Auto .ValAttr =_fe .Bool (true );_cgg .Delete =_e .NewCT_Boolean ();_cgg .Delete .ValAttr =_fe .Bool (false );_gcf :=MakeCategoryAxis (_cgg );_gcf .InitializeDefaults ();return _gcf ;};func (_egc DateAxis )SetMinorTickMark (m _e .ST_TickMark ){if m ==_e .ST_TickMarkUnset {_egc ._gggda .MinorTickMark =nil ;}else {_egc ._gggda .MinorTickMark =_e .NewCT_TickMark ();_egc ._gggda .MinorTickMark .ValAttr =m ;};};
// InitializeDefaults the bar chart to its defaults
func (_fce Pie3DChart )InitializeDefaults (){_fce ._cacc .VaryColors =_e .NewCT_Boolean ();_fce ._cacc .VaryColors .ValAttr =_fe .Bool (true );};
// X returns the inner wrapped XML type.
func (_b Area3DChart )X ()*_e .CT_Area3DChart {return _b ._cg };
// AddBarChart adds a new bar chart to a chart.
func (_dfe Chart )AddBarChart ()BarChart {_cbf :=_e .NewCT_PlotAreaChoice ();_dfe ._gdd .Chart .PlotArea .Choice =append (_dfe ._gdd .Chart .PlotArea .Choice ,_cbf );_cbf .BarChart =_e .NewCT_BarChart ();_cbf .BarChart .Grouping =_e .NewCT_BarGrouping ();_cbf .BarChart .Grouping .ValAttr =_e .ST_BarGroupingStandard ;_abg :=BarChart {_fa :_cbf .BarChart };_abg .InitializeDefaults ();return _abg ;};
// SetText sets the series text.
func (_gg BubbleChartSeries )SetText (s string ){_gg ._gd .Tx =_e .NewCT_SerTx ();_gg ._gd .Tx .Choice .V =&s ;};var _fgc =[]_fef .Color {_fef .RGB (0x33,0x66,0xcc),_fef .RGB (0xDC,0x39,0x12),_fef .RGB (0xFF,0x99,0x00),_fef .RGB (0x10,0x96,0x18),_fef .RGB (0x99,0x00,0x99),_fef .RGB (0x3B,0x3E,0xAC),_fef .RGB (0x00,0x99,0xC6),_fef .RGB (0xDD,0x44,0x77),_fef .RGB (0x66,0xAA,0x00),_fef .RGB (0xB8,0x2E,0x2E),_fef .RGB (0x31,0x63,0x95),_fef .RGB (0x99,0x44,0x99),_fef .RGB (0x22,0xAA,0x99),_fef .RGB (0xAA,0xAA,0x11),_fef .RGB (0x66,0x33,0xCC),_fef .RGB (0xE6,0x73,0x00),_fef .RGB (0x8B,0x07,0x07),_fef .RGB (0x32,0x92,0x62),_fef .RGB (0x55,0x74,0xA6),_fef .RGB (0x3B,0x3E,0xAC)};
// Marker returns the marker properties.
func (_faaa ScatterChartSeries )Marker ()Marker {if _faaa ._egge .Marker ==nil {_faaa ._egge .Marker =_e .NewCT_Marker ();};return MakeMarker (_faaa ._egge .Marker );};func MakeMarker (x *_e .CT_Marker )Marker {return Marker {x }};
// CreateEmptyNumberCache creates an empty number cache, which is used sometimes
// to increase file format compatibility. It should actually contain the
// computed cell data, but just creating an empty one is good enough.
func (_fdg NumberDataSource )CreateEmptyNumberCache (){_fdg .ensureChoice ();if _fdg ._bcbf .Choice .NumRef ==nil {_fdg ._bcbf .Choice .NumRef =_g .NewCT_NumRef ();};_fdg ._bcbf .Choice .NumLit =nil ;_fdg ._bcbf .Choice .NumRef .NumCache =_g .NewCT_NumData ();_fdg ._bcbf .Choice .NumRef .NumCache .PtCount =_g .NewCT_UnsignedInt ();_fdg ._bcbf .Choice .NumRef .NumCache .PtCount .ValAttr =0;};type DataLabels struct{_bcff *_g .CT_DLbls };
func (_geg NumberDataSource )CreateEmptyNumberCache (){_geg .ensureChoice ();if _geg ._dce .Choice .NumRef ==nil {_geg ._dce .Choice .NumRef =_e .NewCT_NumRef ();};_geg ._dce .Choice .NumLit =nil ;_geg ._dce .Choice .NumRef .NumCache =_e .NewCT_NumData ();_geg ._dce .Choice .NumRef .NumCache .PtCount =_e .NewCT_UnsignedInt ();_geg ._dce .Choice .NumRef .NumCache .PtCount .ValAttr =0;};func (_accg Marker )SetSymbol (s _e .ST_MarkerStyle ){if s ==_e .ST_MarkerStyleUnset {_accg ._gdf .Symbol =nil ;}else {_accg ._gdf .Symbol =_e .NewCT_MarkerStyle ();_accg ._gdf .Symbol .ValAttr =s ;};};var NullAxis Axis =nullAxis (0);type DataLabels struct{_bga *_e .CT_DLbls };
// PieChart is a Pie chart.
type PieChart struct{chartBase ;_fdca *_g .CT_PieChart ;};func (_cg BubbleChart )AddAxis (axis Axis ){_eag :=_g .NewCT_UnsignedInt ();_eag .ValAttr =axis .AxisID ();_cg ._ggd .AxId =append (_cg ._ggd .AxId ,_eag );};
// RemoveLegend removes the legend if the chart has one.
func (_bgf Chart )RemoveLegend (){_bgf ._cdb .Chart .Legend =nil };func MakeDataLabels (x *_g .CT_DLbls )DataLabels {return DataLabels {x }};
// X returns the inner wrapped XML type.
func (_bfa Legend )X ()*_g .CT_Legend {return _bfa ._ffbd };func (_abf DateAxis )SetMajorTickMark (m _g .ST_TickMark ){if m ==_g .ST_TickMarkUnset {_abf ._caf .MajorTickMark =nil ;}else {_abf ._caf .MajorTickMark =_g .NewCT_TickMark ();_abf ._caf .MajorTickMark .ValAttr =m ;};};func (_bdf SurfaceChartSeries )CategoryAxis ()CategoryAxisDataSource {if _bdf ._ecdc .Cat ==nil {_bdf ._ecdc .Cat =_g .NewCT_AxDataSource ();};return MakeAxisDataSource (_bdf ._ecdc .Cat );};func (_deca ValueAxis )SetCrosses (axis Axis ){_deca ._bdad .CrossAx .ValAttr =axis .AxisID ()};
// X returns the inner wrapped XML type.
func (_cba BubbleChart )X ()*_g .CT_BubbleChart {return _cba ._ggd };
// BubbleChart is a 2D Bubble chart.
type BubbleChart struct{chartBase ;_ggd *_g .CT_BubbleChart ;};
// SetOrder sets the order of the series
func (_bcgd ScatterChartSeries )SetOrder (idx uint32 ){_bcgd ._ffgd .Order .ValAttr =idx };type Legend struct{_ffbd *_g .CT_Legend };
// InitializeDefaults initializes an area series to the default values.
func (_df AreaChartSeries )InitializeDefaults (){};
// Values returns the value data source.
func (_ee BarChartSeries )Values ()NumberDataSource {if _ee ._dg .Val ==nil {_ee ._dg .Val =_g .NewCT_NumDataSource ();};return MakeNumberDataSource (_ee ._dg .Val );};
// X returns the inner wrapped XML type.
func (_efg ValueAxis )X ()*_g .CT_ValAx {return _efg ._bdad };
// AddAxis adds an axis to a Scatter chart.
func (_edea ScatterChart )AddAxis (axis Axis ){_ffa :=_g .NewCT_UnsignedInt ();_ffa .ValAttr =axis .AxisID ();_edea ._fbab .AxId =append (_edea ._fbab .AxId ,_ffa );};
// InitializeDefaults initializes an Radar series to the default values.
func (_gcfg RadarChartSeries )InitializeDefaults (){};
// SetDisplayBlanksAs controls how missing values are displayed.
func (_acbf Chart )SetDisplayBlanksAs (v _g .ST_DispBlanksAs ){_acbf ._cdb .Chart .DispBlanksAs =_g .NewCT_DispBlanksAs ();_acbf ._cdb .Chart .DispBlanksAs .ValAttr =v ;};
// X returns the inner wrapped XML type.
func (_bcf AreaChartSeries )X ()*_g .CT_AreaSer {return _bcf ._bgc };
// PieChartSeries is a series to be used on an Pie chart.
type PieChartSeries struct{_baea *_g .CT_PieSer };func MakeNumberDataSource (x *_g .CT_NumDataSource )NumberDataSource {return NumberDataSource {x }};func MakeValueAxis (x *_g .CT_ValAx )ValueAxis {return ValueAxis {x }};
// InitializeDefaults the bar chart to its defaults
func (_gfe BarChart )InitializeDefaults (){_gfe .SetDirection (_g .ST_BarDirCol )};
// AddTitle sets a new title on the chart.
func (_ecf Chart )AddTitle ()Title {_ecf ._cdb .Chart .Title =_g .NewCT_Title ();_ecf ._cdb .Chart .Title .Overlay =_g .NewCT_Boolean ();_ecf ._cdb .Chart .Title .Overlay .ValAttr =_e .Bool (false );_ecf ._cdb .Chart .AutoTitleDeleted =_g .NewCT_Boolean ();_ecf ._cdb .Chart .AutoTitleDeleted .ValAttr =_e .Bool (false );_cff :=MakeTitle (_ecf ._cdb .Chart .Title );_cff .InitializeDefaults ();return _cff ;};
// X returns the inner wrapped XML type.
func (_fd AreaChart )X ()*_g .CT_AreaChart {return _fd ._ca };
// X returns the inner wrapped XML type.
func (_eec SurfaceChartSeries )X ()*_g .CT_SurfaceSer {return _eec ._ecdc };func (_cdf Chart )AddSeriesAxis ()SeriesAxis {_gbf :=_g .NewCT_SerAx ();if _cdf ._cdb .Chart .PlotArea .CChoice ==nil {_cdf ._cdb .Chart .PlotArea .CChoice =_g .NewCT_PlotAreaChoice1 ();};_gbf .AxId =_g .NewCT_UnsignedInt ();_gbf .AxId .ValAttr =0x7FFFFFFF&_b .Uint32 ();_cdf ._cdb .Chart .PlotArea .CChoice .SerAx =append (_cdf ._cdb .Chart .PlotArea .CChoice .SerAx ,_gbf );_gbf .Delete =_g .NewCT_Boolean ();_gbf .Delete .ValAttr =_e .Bool (false );_bbe :=MakeSeriesAxis (_gbf );_bbe .InitializeDefaults ();return _bbe ;};
// AddDateAxis adds a value axis to the chart.
func (_fdc Chart )AddDateAxis ()DateAxis {_gba :=_g .NewCT_DateAx ();if _fdc ._cdb .Chart .PlotArea .CChoice ==nil {_fdc ._cdb .Chart .PlotArea .CChoice =_g .NewCT_PlotAreaChoice1 ();};_gba .AxId =_g .NewCT_UnsignedInt ();_gba .AxId .ValAttr =0x7FFFFFFF&_b .Uint32 ();_fdc ._cdb .Chart .PlotArea .CChoice .DateAx =append (_fdc ._cdb .Chart .PlotArea .CChoice .DateAx ,_gba );_gba .Delete =_g .NewCT_Boolean ();_gba .Delete .ValAttr =_e .Bool (false );_gba .Scaling =_g .NewCT_Scaling ();_gba .Scaling .Orientation =_g .NewCT_Orientation ();_gba .Scaling .Orientation .ValAttr =_g .ST_OrientationMinMax ;_gba .Choice =&_g .EG_AxSharedChoice {};_gba .Choice .Crosses =_g .NewCT_Crosses ();_gba .Choice .Crosses .ValAttr =_g .ST_CrossesAutoZero ;_fef :=DateAxis {_gba };_fef .MajorGridLines ().Properties ().LineProperties ().SetSolidFill (_ed .LightGray );_fef .SetMajorTickMark (_g .ST_TickMarkOut );_fef .SetMinorTickMark (_g .ST_TickMarkIn );_fef .SetTickLabelPosition (_g .ST_TickLblPosNextTo );_fef .Properties ().LineProperties ().SetSolidFill (_ed .Black );_fef .SetPosition (_g .ST_AxPosL );return _fef ;};type LineChart struct{chartBase ;_efb *_g .CT_LineChart ;};
// Order returns the order of the series
func (_acf LineChartSeries )Order ()uint32 {return _acf ._bce .Order .ValAttr };
// SetText sets the series text.
func (_dec AreaChartSeries )SetText (s string ){_dec ._bgc .Tx =_g .NewCT_SerTx ();_dec ._bgc .Tx .Choice .V =&s ;};func (_bada ScatterChartSeries )SetSmooth (b bool ){_bada ._ffgd .Smooth =_g .NewCT_Boolean ();_bada ._ffgd .Smooth .ValAttr =&b ;};
// InitializeDefaults the Stock chart to its defaults
func (_aba StockChart )InitializeDefaults (){_aba ._agc .HiLowLines =_e .NewCT_ChartLines ();_aba ._agc .UpDownBars =_e .NewCT_UpDownBars ();_aba ._agc .UpDownBars .GapWidth =_e .NewCT_GapAmount ();_aba ._agc .UpDownBars .GapWidth .ValAttr =&_e .ST_GapAmount {};_aba ._agc .UpDownBars .GapWidth .ValAttr .ST_GapAmountUShort =_fe .Uint16 (150);_aba ._agc .UpDownBars .UpBars =_e .NewCT_UpDownBar ();_aba ._agc .UpDownBars .DownBars =_e .NewCT_UpDownBar ();};func (_cbdf SurfaceChartSeries )Values ()NumberDataSource {if _cbdf ._gdda .Val ==nil {_cbdf ._gdda .Val =_e .NewCT_NumDataSource ();};_bdbc :=MakeNumberDataSource (_cbdf ._gdda .Val );_bdbc .CreateEmptyNumberCache ();return _bdbc ;};
// AddSeries adds a default series to an Pie3D chart.
func (_ced Pie3DChart )AddSeries ()PieChartSeries {_bgbc :=_g .NewCT_PieSer ();_ced ._fde .Ser =append (_ced ._fde .Ser ,_bgbc );_bgbc .Idx .ValAttr =uint32 (len (_ced ._fde .Ser )-1);_bgbc .Order .ValAttr =uint32 (len (_ced ._fde .Ser )-1);_baad :=PieChartSeries {_bgbc };_baad .InitializeDefaults ();return _baad ;};func (_gbb LineChartSeries )CategoryAxis ()CategoryAxisDataSource {if _gbb ._bce .Cat ==nil {_gbb ._bce .Cat =_g .NewCT_AxDataSource ();};return MakeAxisDataSource (_gbb ._bce .Cat );};type ScatterChart struct{chartBase ;_fbab *_g .CT_ScatterChart ;};func (_ddab NumberDataSource )SetReference (s string ){_ddab .ensureChoice ();if _ddab ._bcbf .Choice .NumRef ==nil {_ddab ._bcbf .Choice .NumRef =_g .NewCT_NumRef ();};_ddab ._bcbf .Choice .NumRef .F =s ;};
func (_bfed Pie3DChart )AddSeries ()PieChartSeries {_bfcb :=_e .NewCT_PieSer ();_bfed ._cacc .Ser =append (_bfed ._cacc .Ser ,_bfcb );_bfcb .Idx .ValAttr =uint32 (len (_bfed ._cacc .Ser )-1);_bfcb .Order .ValAttr =uint32 (len (_bfed ._cacc .Ser )-1);_acag :=PieChartSeries {_bfcb };_acag .InitializeDefaults ();return _acag ;};
// AddSeries adds a default series to a bar chart.
func (_ebd BarChart )AddSeries ()BarChartSeries {_gae :=_ebd .nextColor (len (_ebd ._fdf .Ser ));_eg :=_g .NewCT_BarSer ();_ebd ._fdf .Ser =append (_ebd ._fdf .Ser ,_eg );_eg .Idx .ValAttr =uint32 (len (_ebd ._fdf .Ser )-1);_eg .Order .ValAttr =uint32 (len (_ebd ._fdf .Ser )-1);_bd :=BarChartSeries {_eg };_bd .InitializeDefaults ();_bd .Properties ().SetSolidFill (_gae );return _bd ;};
// BubbleChart is a 2D Bubble chart.
type BubbleChart struct{chartBase ;_gb *_e .CT_BubbleChart ;};func (_gbbg DataLabels )SetShowCategoryName (b bool ){_gbbg .ensureChoice ();_gbbg ._bga .Choice .ShowCatName =_e .NewCT_Boolean ();_gbbg ._bga .Choice .ShowCatName .ValAttr =_fe .Bool (b );};
// AddArea3DChart adds a new area chart to a chart.
func (_dga Chart )AddArea3DChart ()Area3DChart {_ffe (_dga ._cdb .Chart );_cfd :=_g .NewCT_PlotAreaChoice ();_dga ._cdb .Chart .PlotArea .Choice =append (_dga ._cdb .Chart .PlotArea .Choice ,_cfd );_cfd .Area3DChart =_g .NewCT_Area3DChart ();_dgb :=Area3DChart {_c :_cfd .Area3DChart };_dgb .InitializeDefaults ();return _dgb ;};
// AddAxis adds an axis to a Scatter chart.
func (_aega ScatterChart )AddAxis (axis Axis ){_dcag :=_e .NewCT_UnsignedInt ();_dcag .ValAttr =axis .AxisID ();_aega ._dbbd .AxId =append (_aega ._dbbd .AxId ,_dcag );};
// X returns the inner wrapped XML type.
func (_edf BubbleChartSeries )X ()*_g .CT_BubbleSer {return _edf ._dff };
// SetText sets the series text.
func (_cdg PieChartSeries )SetText (s string ){_cdg ._faag .Tx =_e .NewCT_SerTx ();_cdg ._faag .Tx .Choice .V =&s ;};
// AddAxis adds an axis to a line chart.
func (_baac LineChart )AddAxis (axis Axis ){_dbe :=_g .NewCT_UnsignedInt ();_dbe .ValAttr =axis .AxisID ();_baac ._efb .AxId =append (_baac ._efb .AxId ,_dbe );};
// AddBar3DChart adds a new 3D bar chart to a chart.
func (_bae Chart )AddBar3DChart ()Bar3DChart {_ffe (_bae ._cdb .Chart );_geb :=_g .NewCT_PlotAreaChoice ();_bae ._cdb .Chart .PlotArea .Choice =append (_bae ._cdb .Chart .PlotArea .Choice ,_geb );_geb .Bar3DChart =_g .NewCT_Bar3DChart ();_geb .Bar3DChart .Grouping =_g .NewCT_BarGrouping ();_geb .Bar3DChart .Grouping .ValAttr =_g .ST_BarGroupingStandard ;_dee :=Bar3DChart {_dcf :_geb .Bar3DChart };_dee .InitializeDefaults ();return _dee ;};func (_gfb DataLabels )SetShowValue (b bool ){_gfb .ensureChoice ();_gfb ._bcff .Choice .ShowVal =_g .NewCT_Boolean ();_gfb ._bcff .Choice .ShowVal .ValAttr =_e .Bool (b );};
// SetDirection changes the direction of the bar chart (bar or column).
func (_ga BarChart )SetDirection (d _g .ST_BarDir ){_ga ._fdf .BarDir .ValAttr =d };func (_abd DateAxis )SetPosition (p _g .ST_AxPos ){_abd ._caf .AxPos =_g .NewCT_AxPos ();_abd ._caf .AxPos .ValAttr =p ;};
// InitializeDefaults the bar chart to its defaults
func (_gcd DoughnutChart )InitializeDefaults (){_gcd ._bcd .VaryColors =_g .NewCT_Boolean ();_gcd ._bcd .VaryColors .ValAttr =_e .Bool (true );_gcd ._bcd .HoleSize =_g .NewCT_HoleSize ();_gcd ._bcd .HoleSize .ValAttr =&_g .ST_HoleSize {};_gcd ._bcd .HoleSize .ValAttr .ST_HoleSizeUByte =_e .Uint8 (50);};
// AddLineChart adds a new line chart to a chart.
func (_baa Chart )AddLineChart ()LineChart {_bf :=_g .NewCT_PlotAreaChoice ();_baa ._cdb .Chart .PlotArea .Choice =append (_baa ._cdb .Chart .PlotArea .Choice ,_bf );_bf .LineChart =_g .NewCT_LineChart ();_bf .LineChart .Grouping =_g .NewCT_Grouping ();_bf .LineChart .Grouping .ValAttr =_g .ST_GroupingStandard ;return LineChart {_efb :_bf .LineChart };};func MakeTitle (x *_g .CT_Title )Title {return Title {x }};
// Properties returns the line chart series shape properties.
func (_gbd ScatterChartSeries )Properties ()_fb .ShapeProperties {if _gbd ._ffgd .SpPr ==nil {_gbd ._ffgd .SpPr =_dc .NewCT_ShapeProperties ();};return _fb .MakeShapeProperties (_gbd ._ffgd .SpPr );};func (_cdgg Title )RunProperties ()_fb .RunProperties {if _cdgg ._adcf .Tx ==nil {_cdgg .SetText ("");};if _cdgg ._adcf .Tx .Choice .Rich .P [0].EG_TextRun [0].R .RPr ==nil {_cdgg ._adcf .Tx .Choice .Rich .P [0].EG_TextRun [0].R .RPr =_dc .NewCT_TextCharacterProperties ();};return _fb .MakeRunProperties (_cdgg ._adcf .Tx .Choice .Rich .P [0].EG_TextRun [0].R .RPr );};
// X returns the inner wrapped XML type.
func (_cge PieChartSeries )X ()*_g .CT_PieSer {return _cge ._baea };func (_ead Title )InitializeDefaults (){_ead .SetText ("\u0054\u0069\u0074l\u0065");_ead .RunProperties ().SetSize (16*_a .Point );_ead .RunProperties ().SetSolidFill (_ed .Black );_ead .RunProperties ().SetFont ("\u0043\u0061\u006c\u0069\u0062\u0020\u0072\u0069");_ead .RunProperties ().SetBold (false );};
// Values returns the value data source.
func (_abdg RadarChartSeries )Values ()NumberDataSource {if _abdg ._dfd .Val ==nil {_abdg ._dfd .Val =_g .NewCT_NumDataSource ();};return MakeNumberDataSource (_abdg ._dfd .Val );};func (_gca DataLabels )SetShowCategoryName (b bool ){_gca .ensureChoice ();_gca ._bcff .Choice .ShowCatName =_g .NewCT_Boolean ();_gca ._bcff .Choice .ShowCatName .ValAttr =_e .Bool (b );};
// SetValues sets values directly on a source.
func (_cacg NumberDataSource )SetValues (v []float64 ){_cacg .ensureChoice ();_cacg ._bcbf .Choice .NumRef =nil ;_cacg ._bcbf .Choice .NumLit =_g .NewCT_NumData ();_cacg ._bcbf .Choice .NumLit .PtCount =_g .NewCT_UnsignedInt ();_cacg ._bcbf .Choice .NumLit .PtCount .ValAttr =uint32 (len (v ));for _gdfd ,_dge :=range v {_cacg ._bcbf .Choice .NumLit .Pt =append (_cacg ._bcbf .Choice .NumLit .Pt ,&_g .CT_NumVal {IdxAttr :uint32 (_gdfd ),V :_d .Sprintf ("\u0025\u0067",_dge )});};};func (_geaa DateAxis )SetCrosses (axis Axis ){_geaa ._caf .CrossAx .ValAttr =axis .AxisID ()};
// Values returns the value data source.
func (_gea AreaChartSeries )Values ()NumberDataSource {if _gea ._bgc .Val ==nil {_gea ._bgc .Val =_g .NewCT_NumDataSource ();};return MakeNumberDataSource (_gea ._bgc .Val );};
// Order returns the order of the series
func (_abfb SurfaceChartSeries )Order ()uint32 {return _abfb ._ecdc .Order .ValAttr };
// SetText sets the series text
func (_bbdf ScatterChartSeries )SetText (s string ){_bbdf ._ffgd .Tx =_g .NewCT_SerTx ();_bbdf ._ffgd .Tx .Choice .V =&s ;};
// Labels returns the data label properties.
func (_gfeb ScatterChartSeries )Labels ()DataLabels {if _gfeb ._ffgd .DLbls ==nil {_gfeb ._ffgd .DLbls =_g .NewCT_DLbls ();};return MakeDataLabels (_gfeb ._ffgd .DLbls );};
// BarChart is a 2D bar chart.
type BarChart struct{chartBase ;_fdf *_g .CT_BarChart ;};
// Pie3DChart is a Pie3D chart.
type Pie3DChart struct{chartBase ;_fde *_g .CT_Pie3DChart ;};
// Values returns the value data source.
func (_fbga PieChartSeries )Values ()NumberDataSource {if _fbga ._baea .Val ==nil {_fbga ._baea .Val =_g .NewCT_NumDataSource ();};return MakeNumberDataSource (_fbga ._baea .Val );};
// AddSeries adds a default series to a line chart.
func (_ggcd LineChart )AddSeries ()LineChartSeries {_aeg :=_ggcd .nextColor (len (_ggcd ._efb .Ser ));_fbg :=_g .NewCT_LineSer ();_ggcd ._efb .Ser =append (_ggcd ._efb .Ser ,_fbg );_fbg .Idx .ValAttr =uint32 (len (_ggcd ._efb .Ser )-1);_fbg .Order .ValAttr =uint32 (len (_ggcd ._efb .Ser )-1);_ffbf :=LineChartSeries {_fbg };_ffbf .InitializeDefaults ();_ffbf .Properties ().LineProperties ().SetSolidFill (_aeg );return _ffbf ;};func (_gdbb DateAxis )MajorGridLines ()GridLines {if _gdbb ._caf .MajorGridlines ==nil {_gdbb ._caf .MajorGridlines =_g .NewCT_ChartLines ();};return GridLines {_gdbb ._caf .MajorGridlines };};func MakeCategoryAxis (x *_g .CT_CatAx )CategoryAxis {return CategoryAxis {x }};
// MakeAxisDataSource constructs an AxisDataSource wrapper.
func MakeAxisDataSource (x *_g .CT_AxDataSource )CategoryAxisDataSource {return CategoryAxisDataSource {x };};func (_cadc Marker )SetSize (sz uint8 ){_cadc ._ege .Size =_g .NewCT_MarkerSize ();_cadc ._ege .Size .ValAttr =&sz ;};
// Marker returns the marker properties.
func (_gdbc LineChartSeries )Marker ()Marker {if _gdbc ._bce .Marker ==nil {_gdbc ._bce .Marker =_g .NewCT_Marker ();};return MakeMarker (_gdbc ._bce .Marker );};
// RadarChart is an Radar chart that has a shaded Radar underneath a curve.
type RadarChart struct{chartBase ;_cfdg *_g .CT_RadarChart ;};
// AddAxis adds an axis to a Surface chart.
func (_bfab Surface3DChart )AddAxis (axis Axis ){_eaf :=_g .NewCT_UnsignedInt ();_eaf .ValAttr =axis .AxisID ();_bfab ._agfa .AxId =append (_bfab ._agfa .AxId ,_eaf );};
// CategoryAxis returns the category data source.
func (_dafc BubbleChartSeries )CategoryAxis ()CategoryAxisDataSource {if _dafc ._gd .XVal ==nil {_dafc ._gd .XVal =_e .NewCT_AxDataSource ();};return MakeAxisDataSource (_dafc ._gd .XVal );};func (_abgc Legend )Properties ()_fega .ShapeProperties {if _abgc ._eca .SpPr ==nil {_abgc ._eca .SpPr =_feg .NewCT_ShapeProperties ();};return _fega .MakeShapeProperties (_abgc ._eca .SpPr );};func (_dbc ScatterChartSeries )CategoryAxis ()CategoryAxisDataSource {if _dbc ._egge .XVal ==nil {_dbc ._egge .XVal =_e .NewCT_AxDataSource ();};return MakeAxisDataSource (_dbc ._egge .XVal );};
// CategoryAxisDataSource specifies the data for an axis. It's commonly used with
// SetReference to set the axis data to a range of cells.
type CategoryAxisDataSource struct{_eab *_g .CT_AxDataSource };func (_bga DateAxis )SetMinorTickMark (m _g .ST_TickMark ){if m ==_g .ST_TickMarkUnset {_bga ._caf .MinorTickMark =nil ;}else {_bga ._caf .MinorTickMark =_g .NewCT_TickMark ();_bga ._caf .MinorTickMark .ValAttr =m ;};};func (_cef Legend )SetPosition (p _g .ST_LegendPos ){if p ==_g .ST_LegendPosUnset {_cef ._ffbd .LegendPos =nil ;}else {_cef ._ffbd .LegendPos =_g .NewCT_LegendPos ();_cef ._ffbd .LegendPos .ValAttr =p ;};};func (_acgd DataLabels )SetPosition (p _g .ST_DLblPos ){_acgd .ensureChoice ();_acgd ._bcff .Choice .DLblPos =_g .NewCT_DLblPos ();_acgd ._bcff .Choice .DLblPos .ValAttr =p ;};
// AddSeries adds a default series to an area chart.
func (_bc Area3DChart )AddSeries ()AreaChartSeries {_eda :=_bc .nextColor (len (_bc ._c .Ser ));_da :=_g .NewCT_AreaSer ();_bc ._c .Ser =append (_bc ._c .Ser ,_da );_da .Idx .ValAttr =uint32 (len (_bc ._c .Ser )-1);_da .Order .ValAttr =uint32 (len (_bc ._c .Ser )-1);_cc :=AreaChartSeries {_da };_cc .InitializeDefaults ();_cc .Properties ().SetSolidFill (_eda );return _cc ;};
// X returns the inner wrapped XML type.
func (_abbe GridLines )X ()*_g .CT_ChartLines {return _abbe ._gga };func (_fbgd Title )SetText (s string ){if _fbgd ._adcf .Tx ==nil {_fbgd ._adcf .Tx =_g .NewCT_Tx ();};if _fbgd ._adcf .Tx .Choice .Rich ==nil {_fbgd ._adcf .Tx .Choice .Rich =_dc .NewCT_TextBody ();};var _cdca *_dc .CT_TextParagraph ;if len (_fbgd ._adcf .Tx .Choice .Rich .P )==0{_cdca =_dc .NewCT_TextParagraph ();_fbgd ._adcf .Tx .Choice .Rich .P =[]*_dc .CT_TextParagraph {_cdca };}else {_cdca =_fbgd ._adcf .Tx .Choice .Rich .P [0];};var _eaa *_dc .EG_TextRun ;if len (_cdca .EG_TextRun )==0{_eaa =_dc .NewEG_TextRun ();_cdca .EG_TextRun =[]*_dc .EG_TextRun {_eaa };}else {_eaa =_cdca .EG_TextRun [0];};if _eaa .R ==nil {_eaa .R =_dc .NewCT_RegularTextRun ();};_eaa .R .T =s ;};
// AddScatterChart adds a scatter (X/Y) chart.
func (_cfe Chart )AddScatterChart ()ScatterChart {_gece :=_g .NewCT_PlotAreaChoice ();_cfe ._cdb .Chart .PlotArea .Choice =append (_cfe ._cdb .Chart .PlotArea .Choice ,_gece );_gece .ScatterChart =_g .NewCT_ScatterChart ();_ebb :=ScatterChart {_fbab :_gece .ScatterChart };_ebb .InitializeDefaults ();return _ebb ;};
// AddPieOfPieChart adds a new pie chart to a chart.
func (_bgcc Chart )AddPieOfPieChart ()PieOfPieChart {_gaa :=_g .NewCT_PlotAreaChoice ();_bgcc ._cdb .Chart .PlotArea .Choice =append (_bgcc ._cdb .Chart .PlotArea .Choice ,_gaa );_gaa .OfPieChart =_g .NewCT_OfPieChart ();_bca :=PieOfPieChart {_bbg :_gaa .OfPieChart };_bca .InitializeDefaults ();return _bca ;};
// CategoryAxis returns the category data source.
func (_fe AreaChartSeries )CategoryAxis ()CategoryAxisDataSource {if _fe ._bgc .Cat ==nil {_fe ._bgc .Cat =_g .NewCT_AxDataSource ();};return MakeAxisDataSource (_fe ._bgc .Cat );};
// LineChartSeries is the data series for a line chart.
type LineChartSeries struct{_bce *_g .CT_LineSer };
// Bar3DChart is a 3D bar chart.
type Bar3DChart struct{chartBase ;_dcf *_g .CT_Bar3DChart ;};
// X returns the inner wrapped XML type.
func (_ece ScatterChart )X ()*_g .CT_ScatterChart {return _ece ._fbab };func (_ef CategoryAxis )InitializeDefaults (){_ef .SetPosition (_g .ST_AxPosB );_ef .SetMajorTickMark (_g .ST_TickMarkOut );_ef .SetMinorTickMark (_g .ST_TickMarkIn );_ef .SetTickLabelPosition (_g .ST_TickLblPosNextTo );_ef .MajorGridLines ().Properties ().LineProperties ().SetSolidFill (_ed .LightGray );_ef .Properties ().LineProperties ().SetSolidFill (_ed .Black );};
// AddStockChart adds a new stock chart.
func (_fed Chart )AddStockChart ()StockChart {_gdb :=_g .NewCT_PlotAreaChoice ();_fed ._cdb .Chart .PlotArea .Choice =append (_fed ._cdb .Chart .PlotArea .Choice ,_gdb );_gdb .StockChart =_g .NewCT_StockChart ();_egd :=StockChart {_gceg :_gdb .StockChart };_egd .InitializeDefaults ();return _egd ;};func (_ffb DataLabels )SetShowLeaderLines (b bool ){_ffb .ensureChoice ();_ffb ._bcff .Choice .ShowLeaderLines =_g .NewCT_Boolean ();_ffb ._bcff .Choice .ShowLeaderLines .ValAttr =_e .Bool (b );};
// X returns the inner wrapped XML type.
func (_ecc Marker )X ()*_g .CT_Marker {return _ecc ._ege };
// SetText sets the series text.
func (_aga BubbleChartSeries )SetText (s string ){_aga ._dff .Tx =_g .NewCT_SerTx ();_aga ._dff .Tx .Choice .V =&s ;};
// SetHoleSize controls the hole size in the pie chart and is measured in percent.
func (_afa DoughnutChart )SetHoleSize (pct uint8 ){if _afa ._bcd .HoleSize ==nil {_afa ._bcd .HoleSize =_g .NewCT_HoleSize ();};if _afa ._bcd .HoleSize .ValAttr ==nil {_afa ._bcd .HoleSize .ValAttr =&_g .ST_HoleSize {};};_afa ._bcd .HoleSize .ValAttr .ST_HoleSizeUByte =&pct ;};func (_adc DataLabels )SetShowSeriesName (b bool ){_adc .ensureChoice ();_adc ._bcff .Choice .ShowSerName =_g .NewCT_Boolean ();_adc ._bcff .Choice .ShowSerName .ValAttr =_e .Bool (b );};
// AddSeries adds a default series to an Radar chart.
func (_gbc RadarChart )AddSeries ()RadarChartSeries {_gcb :=_gbc .nextColor (len (_gbc ._cfdg .Ser ));_accf :=_g .NewCT_RadarSer ();_gbc ._cfdg .Ser =append (_gbc ._cfdg .Ser ,_accf );_accf .Idx .ValAttr =uint32 (len (_gbc ._cfdg .Ser )-1);_accf .Order .ValAttr =uint32 (len (_gbc ._cfdg .Ser )-1);_gce :=RadarChartSeries {_accf };_gce .InitializeDefaults ();_gce .Properties ().SetSolidFill (_gcb );return _gce ;};func (_bff ValueAxis )SetPosition (p _g .ST_AxPos ){_bff ._bdad .AxPos =_g .NewCT_AxPos ();_bff ._bdad .AxPos .ValAttr =p ;};func (_edb Title )ParagraphProperties ()_fb .ParagraphProperties {if _edb ._adcf .Tx ==nil {_edb .SetText ("");};if _edb ._adcf .Tx .Choice .Rich .P [0].PPr ==nil {_edb ._adcf .Tx .Choice .Rich .P [0].PPr =_dc .NewCT_TextParagraphProperties ();};return _fb .MakeParagraphProperties (_edb ._adcf .Tx .Choice .Rich .P [0].PPr );};
// X returns the inner wrapped XML type.
func (_edd Bar3DChart )X ()*_g .CT_Bar3DChart {return _edd ._dcf };
// Marker returns the marker properties.
func (_eagf ScatterChartSeries )Marker ()Marker {if _eagf ._ffgd .Marker ==nil {_eagf ._ffgd .Marker =_g .NewCT_Marker ();};return MakeMarker (_eagf ._ffgd .Marker );};type SeriesAxis struct{_eef *_g .CT_SerAx };
// X returns the inner wrapped XML type.
func (_gbbd PieOfPieChart )X ()*_g .CT_OfPieChart {return _gbbd ._bbg };
// X returns the inner wrapped XML type.
func (_dfc ScatterChartSeries )X ()*_g .CT_ScatterSer {return _dfc ._ffgd };
// AddSeries adds a default series to an Pie chart.
func (_bbef PieChart )AddSeries ()PieChartSeries {_afd :=_g .NewCT_PieSer ();_bbef ._fdca .Ser =append (_bbef ._fdca .Ser ,_afd );_afd .Idx .ValAttr =uint32 (len (_bbef ._fdca .Ser )-1);_afd .Order .ValAttr =uint32 (len (_bbef ._fdca .Ser )-1);_cebe :=PieChartSeries {_afd };_cebe .InitializeDefaults ();return _cebe ;};
// X returns the inner wrapped XML type.
func (_dfeg LineChart )X ()*_g .CT_LineChart {return _dfeg ._efb };func MakeChart (x *_g .ChartSpace )Chart {return Chart {x }};func (_cac DateAxis )Properties ()_fb .ShapeProperties {if _cac ._caf .SpPr ==nil {_cac ._caf .SpPr =_dc .NewCT_ShapeProperties ();};return _fb .MakeShapeProperties (_cac ._caf .SpPr );};func (_ffbfd ValueAxis )AxisID ()uint32 {return _ffbfd ._bdad .AxId .ValAttr };func (_bg Area3DChart )AddAxis (axis Axis ){_gd :=_g .NewCT_UnsignedInt ();_gd .ValAttr =axis .AxisID ();_bg ._c .AxId =append (_bg ._c .AxId ,_gd );};
// InitializeDefaults initializes a Bubble chart series to the default values.
func (_dd BubbleChartSeries )InitializeDefaults (){};
// AddSeries adds a default series to a Surface chart.
func (_gbde SurfaceChart )AddSeries ()SurfaceChartSeries {_cbbg :=_gbde .nextColor (len (_gbde ._ecd .Ser ));_eeg :=_g .NewCT_SurfaceSer ();_gbde ._ecd .Ser =append (_gbde ._ecd .Ser ,_eeg );_eeg .Idx .ValAttr =uint32 (len (_gbde ._ecd .Ser )-1);_eeg .Order .ValAttr =uint32 (len (_gbde ._ecd .Ser )-1);_gfbc :=SurfaceChartSeries {_eeg };_gfbc .InitializeDefaults ();_gfbc .Properties ().LineProperties ().SetSolidFill (_cbbg );return _gfbc ;};
// InitializeDefaults the bar chart to its defaults
func (_efe Pie3DChart )InitializeDefaults (){_efe ._fde .VaryColors =_g .NewCT_Boolean ();_efe ._fde .VaryColors .ValAttr =_e .Bool (true );};
// AddBubbleChart adds a new bubble chart.
func (_agb Chart )AddBubbleChart ()BubbleChart {_aae :=_g .NewCT_PlotAreaChoice ();_agb ._cdb .Chart .PlotArea .Choice =append (_agb ._cdb .Chart .PlotArea .Choice ,_aae );_aae .BubbleChart =_g .NewCT_BubbleChart ();_ebe :=BubbleChart {_ggd :_aae .BubbleChart };_ebe .InitializeDefaults ();return _ebe ;};
// InitializeDefaults the bar chart to its defaults
func (_ce Bar3DChart )InitializeDefaults (){_ce .SetDirection (_g .ST_BarDirCol )};
// AddPie3DChart adds a new pie chart to a chart.
func (_fg Chart )AddPie3DChart ()Pie3DChart {_ffe (_fg ._cdb .Chart );_edg :=_g .NewCT_PlotAreaChoice ();_fg ._cdb .Chart .PlotArea .Choice =append (_fg ._cdb .Chart .PlotArea .Choice ,_edg );_edg .Pie3DChart =_g .NewCT_Pie3DChart ();_egf :=Pie3DChart {_fde :_edg .Pie3DChart };_egf .InitializeDefaults ();return _egf ;};func (_cfc ValueAxis )SetMajorTickMark (m _g .ST_TickMark ){if m ==_g .ST_TickMarkUnset {_cfc ._bdad .MajorTickMark =nil ;}else {_cfc ._bdad .MajorTickMark =_g .NewCT_TickMark ();_cfc ._bdad .MajorTickMark .ValAttr =m ;};};
// X returns the inner wrapped XML type.
func (_fa BarChart )X ()*_g .CT_BarChart {return _fa ._fdf };func (_bda CategoryAxis )SetTickLabelPosition (p _g .ST_TickLblPos ){if p ==_g .ST_TickLblPosUnset {_bda ._fab .TickLblPos =nil ;}else {_bda ._fab .TickLblPos =_g .NewCT_TickLblPos ();_bda ._fab .TickLblPos .ValAttr =p ;};};
// X returns the inner wrapped XML type.
func (_bdg Chart )X ()*_g .ChartSpace {return _bdg ._cdb };type GridLines struct{_gga *_g .CT_ChartLines };
// SetText sets the series text
func (_decg SurfaceChartSeries )SetText (s string ){_decg ._ecdc .Tx =_g .NewCT_SerTx ();_decg ._ecdc .Tx .Choice .V =&s ;};
// AddSeries adds a default series to an area chart.
func (_fbd AreaChart )AddSeries ()AreaChartSeries {_ab :=_fbd .nextColor (len (_fbd ._ca .Ser ));_cd :=_g .NewCT_AreaSer ();_fbd ._ca .Ser =append (_fbd ._ca .Ser ,_cd );_cd .Idx .ValAttr =uint32 (len (_fbd ._ca .Ser )-1);_cd .Order .ValAttr =uint32 (len (_fbd ._ca .Ser )-1);_bgb :=AreaChartSeries {_cd };_bgb .InitializeDefaults ();_bgb .Properties ().SetSolidFill (_ab );return _bgb ;};
// Properties returns the bar chart series shape properties.
func (_cdbb PieChartSeries )Properties ()_fb .ShapeProperties {if _cdbb ._baea .SpPr ==nil {_cdbb ._baea .SpPr =_dc .NewCT_ShapeProperties ();};return _fb .MakeShapeProperties (_cdbb ._baea .SpPr );};
// AddSurfaceChart adds a new surface chart to a chart.
func (_eee Chart )AddSurfaceChart ()SurfaceChart {_gec :=_g .NewCT_PlotAreaChoice ();_eee ._cdb .Chart .PlotArea .Choice =append (_eee ._cdb .Chart .PlotArea .Choice ,_gec );_gec .SurfaceChart =_g .NewCT_SurfaceChart ();_ffe (_eee ._cdb .Chart );_eee ._cdb .Chart .View3D .RotX .ValAttr =_e .Int8 (90);_eee ._cdb .Chart .View3D .RotY .ValAttr =_e .Uint16 (0);_eee ._cdb .Chart .View3D .Perspective =_g .NewCT_Perspective ();_eee ._cdb .Chart .View3D .Perspective .ValAttr =_e .Uint8 (0);_eeef :=SurfaceChart {_ecd :_gec .SurfaceChart };_eeef .InitializeDefaults ();return _eeef ;};func (_bfe DataLabels )ensureChoice (){if _bfe ._bcff .Choice ==nil {_bfe ._bcff .Choice =_g .NewCT_DLblsChoice ();};};
// ScatterChartSeries is the data series for a scatter chart.
type ScatterChartSeries struct{_ffgd *_g .CT_ScatterSer };type NumberDataSource struct{_bcbf *_g .CT_NumDataSource };func (_gfc DataLabels )SetShowPercent (b bool ){_gfc .ensureChoice ();_gfc ._bcff .Choice .ShowPercent =_g .NewCT_Boolean ();_gfc ._bcff .Choice .ShowPercent .ValAttr =_e .Bool (b );};func (_bbd LineChartSeries )SetSmooth (b bool ){_bbd ._bce .Smooth =_g .NewCT_Boolean ();_bbd ._bce .Smooth .ValAttr =&b ;};
// SetIndex sets the index of the series
func (_ceb LineChartSeries )SetIndex (idx uint32 ){_ceb ._bce .Idx .ValAttr =idx };
// X returns the inner wrapped XML type.
func (_fdef SurfaceChart )X ()*_g .CT_SurfaceChart {return _fdef ._ecd };
// Axis is the interface implemented by different axes when assigning to a
// chart.
type Axis interface{AxisID ()uint32 ;};
// Values returns the value data source.
func (_be BubbleChartSeries )Values ()NumberDataSource {if _be ._dff .YVal ==nil {_be ._dff .YVal =_g .NewCT_NumDataSource ();};return MakeNumberDataSource (_be ._dff .YVal );};
// RadarChartSeries is a series to be used on an Radar chart.
type RadarChartSeries struct{_dfd *_g .CT_RadarSer };func (_eaga ScatterChartSeries )Values ()NumberDataSource {if _eaga ._ffgd .YVal ==nil {_eaga ._ffgd .YVal =_g .NewCT_NumDataSource ();};return MakeNumberDataSource (_eaga ._ffgd .YVal );};
// InitializeDefaults the bar chart to its defaults
func (_ad AreaChart )InitializeDefaults (){};
// Index returns the index of the series
func (_bcad SurfaceChartSeries )Index ()uint32 {return _bcad ._ecdc .Idx .ValAttr };
// AddPieChart adds a new pie chart to a chart.
func (_gdc Chart )AddPieChart ()PieChart {_eca :=_g .NewCT_PlotAreaChoice ();_gdc ._cdb .Chart .PlotArea .Choice =append (_gdc ._cdb .Chart .PlotArea .Choice ,_eca );_eca .PieChart =_g .NewCT_PieChart ();_cgb :=PieChart {_fdca :_eca .PieChart };_cgb .InitializeDefaults ();return _cgb ;};
// PieOfPieChart is a Pie chart with an extra Pie chart.
type PieOfPieChart struct{chartBase ;_bbg *_g .CT_OfPieChart ;};func (_dad CategoryAxis )SetPosition (p _g .ST_AxPos ){_dad ._fab .AxPos =_g .NewCT_AxPos ();_dad ._fab .AxPos .ValAttr =p ;};
// X returns the inner wrapped XML type.
func (_abbd LineChartSeries )X ()*_g .CT_LineSer {return _abbd ._bce };func (_egga Legend )SetOverlay (b bool ){_egga ._ffbd .Overlay =_g .NewCT_Boolean ();_egga ._ffbd .Overlay .ValAttr =_e .Bool (b );};
// InitializeDefaults the bar chart to its defaults
func (_eabf PieChart )InitializeDefaults (){_eabf ._fdca .VaryColors =_g .NewCT_Boolean ();_eabf ._fdca .VaryColors .ValAttr =_e .Bool (true );};
// CategoryAxis returns the category data source.
func (_ccd BarChartSeries )CategoryAxis ()CategoryAxisDataSource {if _ccd ._dg .Cat ==nil {_ccd ._dg .Cat =_g .NewCT_AxDataSource ();};return MakeAxisDataSource (_ccd ._dg .Cat );};
// AreaChartSeries is a series to be used on an area chart.
type AreaChartSeries struct{_bgc *_g .CT_AreaSer };func (_bgae ValueAxis )MajorGridLines ()GridLines {if _bgae ._bdad .MajorGridlines ==nil {_bgae ._bdad .MajorGridlines =_g .NewCT_ChartLines ();};return GridLines {_bgae ._bdad .MajorGridlines };};
// SetIndex sets the index of the series
func (_cec SurfaceChartSeries )SetIndex (idx uint32 ){_cec ._ecdc .Idx .ValAttr =idx };type CategoryAxis struct{_fab *_g .CT_CatAx };func (_acd SeriesAxis )SetCrosses (axis Axis ){_acd ._eef .CrossAx .ValAttr =axis .AxisID ()};var NullAxis Axis =nullAxis (0);func (_gb CategoryAxis )SetMajorTickMark (m _g .ST_TickMark ){if m ==_g .ST_TickMarkUnset {_gb ._fab .MajorTickMark =nil ;}else {_gb ._fab .MajorTickMark =_g .NewCT_TickMark ();_gb ._fab .MajorTickMark .ValAttr =m ;};};func (_cace ValueAxis )SetTickLabelPosition (p _g .ST_TickLblPos ){if p ==_g .ST_TickLblPosUnset {_cace ._bdad .TickLblPos =nil ;}else {_cace ._bdad .TickLblPos =_g .NewCT_TickLblPos ();_cace ._bdad .TickLblPos .ValAttr =p ;};};func (_fcf ValueAxis )SetMinorTickMark (m _g .ST_TickMark ){if m ==_g .ST_TickMarkUnset {_fcf ._bdad .MinorTickMark =nil ;}else {_fcf ._bdad .MinorTickMark =_g .NewCT_TickMark ();_fcf ._bdad .MinorTickMark .ValAttr =m ;};};func MakeSeriesAxis (x *_g .CT_SerAx )SeriesAxis {return SeriesAxis {x }};func (_bgg CategoryAxis )MajorGridLines ()GridLines {if _bgg ._fab .MajorGridlines ==nil {_bgg ._fab .MajorGridlines =_g .NewCT_ChartLines ();};return GridLines {_bgg ._fab .MajorGridlines };};
// SurfaceChart is a 3D surface chart, viewed from the top-down.
type SurfaceChart struct{chartBase ;_ecd *_g .CT_SurfaceChart ;};func (_ecb Bar3DChart )AddAxis (axis Axis ){_ag :=_g .NewCT_UnsignedInt ();_ag .ValAttr =axis .AxisID ();_ecb ._dcf .AxId =append (_ecb ._dcf .AxId ,_ag );};
// Index returns the index of the series
func (_aff ScatterChartSeries )Index ()uint32 {return _aff ._ffgd .Idx .ValAttr };func (_dfecc ScatterChart )InitializeDefaults (){_dfecc ._fbab .ScatterStyle .ValAttr =_g .ST_ScatterStyleMarker ;};func (_aeda SeriesAxis )AxisID ()uint32 {return _aeda ._eef .AxId .ValAttr };
// AddValueAxis adds a value axis to the chart.
func (_adb Chart )AddValueAxis ()ValueAxis {_agag :=_g .NewCT_ValAx ();if _adb ._cdb .Chart .PlotArea .CChoice ==nil {_adb ._cdb .Chart .PlotArea .CChoice =_g .NewCT_PlotAreaChoice1 ();};_agag .AxId =_g .NewCT_UnsignedInt ();_agag .AxId .ValAttr =0x7FFFFFFF&_b .Uint32 ();_adb ._cdb .Chart .PlotArea .CChoice .ValAx =append (_adb ._cdb .Chart .PlotArea .CChoice .ValAx ,_agag );_agag .Delete =_g .NewCT_Boolean ();_agag .Delete .ValAttr =_e .Bool (false );_agag .Scaling =_g .NewCT_Scaling ();_agag .Scaling .Orientation =_g .NewCT_Orientation ();_agag .Scaling .Orientation .ValAttr =_g .ST_OrientationMinMax ;_agag .Choice =&_g .EG_AxSharedChoice {};_agag .Choice .Crosses =_g .NewCT_Crosses ();_agag .Choice .Crosses .ValAttr =_g .ST_CrossesAutoZero ;_agag .CrossBetween =_g .NewCT_CrossBetween ();_agag .CrossBetween .ValAttr =_g .ST_CrossBetweenBetween ;_dfee :=MakeValueAxis (_agag );_dfee .MajorGridLines ().Properties ().LineProperties ().SetSolidFill (_ed .LightGray );_dfee .SetMajorTickMark (_g .ST_TickMarkOut );_dfee .SetMinorTickMark (_g .ST_TickMarkIn );_dfee .SetTickLabelPosition (_g .ST_TickLblPosNextTo );_dfee .Properties ().LineProperties ().SetSolidFill (_ed .Black );_dfee .SetPosition (_g .ST_AxPosL );return _dfee ;};func (_egb Legend )InitializeDefaults (){_egb .SetPosition (_g .ST_LegendPosR );_egb .SetOverlay (false );_egb .Properties ().SetNoFill ();_egb .Properties ().LineProperties ().SetNoFill ();};
// AddSeries adds a default series to a line chart.
func (_gfg Line3DChart )AddSeries ()LineChartSeries {_dda :=_gfg .nextColor (len (_gfg ._dfb .Ser ));_eggg :=_g .NewCT_LineSer ();_gfg ._dfb .Ser =append (_gfg ._dfb .Ser ,_eggg );_eggg .Idx .ValAttr =uint32 (len (_gfg ._dfb .Ser )-1);_eggg .Order .ValAttr =uint32 (len (_gfg ._dfb .Ser )-1);_fbdf :=LineChartSeries {_eggg };_fbdf .InitializeDefaults ();_fbdf .Properties ().LineProperties ().SetSolidFill (_dda );_fbdf .Properties ().SetSolidFill (_dda );return _fbdf ;};type chartBase struct{};
// CategoryAxis returns the category data source.
func (_ccf RadarChartSeries )CategoryAxis ()CategoryAxisDataSource {if _ccf ._dfd .Cat ==nil {_ccf ._dfd .Cat =_g .NewCT_AxDataSource ();};return MakeAxisDataSource (_ccf ._dfd .Cat );};type ValueAxis struct{_bdad *_g .CT_ValAx };
// AddAxis adds an axis to a Surface chart.
func (_acde SurfaceChart )AddAxis (axis Axis ){_dab :=_g .NewCT_UnsignedInt ();_dab .ValAttr =axis .AxisID ();_acde ._ecd .AxId =append (_acde ._ecd .AxId ,_dab );};
// AddSurface3DChart adds a new 3D surface chart to a chart.
func (_dfe Chart )AddSurface3DChart ()Surface3DChart {_af :=_g .NewCT_PlotAreaChoice ();_dfe ._cdb .Chart .PlotArea .Choice =append (_dfe ._cdb .Chart .PlotArea .Choice ,_af );_af .Surface3DChart =_g .NewCT_Surface3DChart ();_ffe (_dfe ._cdb .Chart );_gc :=Surface3DChart {_agfa :_af .Surface3DChart };_gc .InitializeDefaults ();return _gc ;};
type CategoryAxisDataSource struct{_dgd *_e .CT_AxDataSource };func (_fbfg ValueAxis )Properties ()_fega .ShapeProperties {if _fbfg ._cdf .SpPr ==nil {_fbfg ._cdf .SpPr =_feg .NewCT_ShapeProperties ();};return _fega .MakeShapeProperties (_fbfg ._cdf .SpPr );};
// AddSeries adds a default series to a Stock chart.
func (_cde StockChart )AddSeries ()LineChartSeries {_fgf :=_g .NewCT_LineSer ();_cde ._gceg .Ser =append (_cde ._gceg .Ser ,_fgf );_fgf .Idx .ValAttr =uint32 (len (_cde ._gceg .Ser )-1);_fgf .Order .ValAttr =uint32 (len (_cde ._gceg .Ser )-1);_gdce :=LineChartSeries {_fgf };_gdce .Values ().CreateEmptyNumberCache ();_gdce .Properties ().LineProperties ().SetNoFill ();return _gdce ;};func (_eed NumberDataSource )ensureChoice (){if _eed ._bcbf .Choice ==nil {_eed ._bcbf .Choice =_g .NewCT_NumDataSourceChoice ();};};func (_facg GridLines )Properties ()_fb .ShapeProperties {if _facg ._gga .SpPr ==nil {_facg ._gga .SpPr =_dc .NewCT_ShapeProperties ();};return _fb .MakeShapeProperties (_facg ._gga .SpPr );};
func (_fcc StockChart )AddSeries ()LineChartSeries {_gcfa :=_e .NewCT_LineSer ();_fcc ._agc .Ser =append (_fcc ._agc .Ser ,_gcfa );_gcfa .Idx .ValAttr =uint32 (len (_fcc ._agc .Ser )-1);_gcfa .Order .ValAttr =uint32 (len (_fcc ._agc .Ser )-1);_gcc :=LineChartSeries {_gcfa };_gcc .Values ().CreateEmptyNumberCache ();_gcc .Properties ().LineProperties ().SetNoFill ();return _gcc ;};
// AddSeries adds a default series to an Doughnut chart.
func (_gge DoughnutChart )AddSeries ()PieChartSeries {_cabd :=_g .NewCT_PieSer ();_gge ._bcd .Ser =append (_gge ._bcd .Ser ,_cabd );_cabd .Idx .ValAttr =uint32 (len (_gge ._bcd .Ser )-1);_cabd .Order .ValAttr =uint32 (len (_gge ._bcd .Ser )-1);_bcab :=PieChartSeries {_cabd };_bcab .InitializeDefaults ();return _bcab ;};func (_ba AreaChart )AddAxis (axis Axis ){_cb :=_g .NewCT_UnsignedInt ();_cb .ValAttr =axis .AxisID ();_ba ._ca .AxId =append (_ba ._ca .AxId ,_cb );};var _agagd =[]_ed .Color {_ed .RGB (0x33,0x66,0xcc),_ed .RGB (0xDC,0x39,0x12),_ed .RGB (0xFF,0x99,0x00),_ed .RGB (0x10,0x96,0x18),_ed .RGB (0x99,0x00,0x99),_ed .RGB (0x3B,0x3E,0xAC),_ed .RGB (0x00,0x99,0xC6),_ed .RGB (0xDD,0x44,0x77),_ed .RGB (0x66,0xAA,0x00),_ed .RGB (0xB8,0x2E,0x2E),_ed .RGB (0x31,0x63,0x95),_ed .RGB (0x99,0x44,0x99),_ed .RGB (0x22,0xAA,0x99),_ed .RGB (0xAA,0xAA,0x11),_ed .RGB (0x66,0x33,0xCC),_ed .RGB (0xE6,0x73,0x00),_ed .RGB (0x8B,0x07,0x07),_ed .RGB (0x32,0x92,0x62),_ed .RGB (0x55,0x74,0xA6),_ed .RGB (0x3B,0x3E,0xAC)};
// SetHoleSize controls the hole size in the pie chart and is measured in percent.
func (_beb DoughnutChart )SetHoleSize (pct uint8 ){if _beb ._gebe .HoleSize ==nil {_beb ._gebe .HoleSize =_e .NewCT_HoleSize ();};if _beb ._gebe .HoleSize .ValAttr ==nil {_beb ._gebe .HoleSize .ValAttr =&_e .ST_HoleSize {};};_beb ._gebe .HoleSize .ValAttr .ST_HoleSizeUByte =&pct ;};
// AddRadarChart adds a new radar chart to a chart.
func (_agc Chart )AddRadarChart ()RadarChart {_dba :=_g .NewCT_PlotAreaChoice ();_agc ._cdb .Chart .PlotArea .Choice =append (_agc ._cdb .Chart .PlotArea .Choice ,_dba );_dba .RadarChart =_g .NewCT_RadarChart ();_aa :=RadarChart {_cfdg :_dba .RadarChart };_aa .InitializeDefaults ();return _aa ;};
// RemoveLegend removes the legend if the chart has one.
func (_aca Chart )RemoveLegend (){_aca ._gdd .Chart .Legend =nil };
// Properties returns the line chart series shape properties.
func (_bdgg LineChartSeries )Properties ()_fb .ShapeProperties {if _bdgg ._bce .SpPr ==nil {_bdgg ._bce .SpPr =_dc .NewCT_ShapeProperties ();};return _fb .MakeShapeProperties (_bdgg ._bce .SpPr );};
// AddSeries adds a default series to a Bubble chart.
func (_gdd BubbleChart )AddSeries ()BubbleChartSeries {_abc :=_gdd .nextColor (len (_gdd ._ggd .Ser ));_db :=_g .NewCT_BubbleSer ();_gdd ._ggd .Ser =append (_gdd ._ggd .Ser ,_db );_db .Idx .ValAttr =uint32 (len (_gdd ._ggd .Ser )-1);_db .Order .ValAttr =uint32 (len (_gdd ._ggd .Ser )-1);_ggc :=BubbleChartSeries {_db };_ggc .InitializeDefaults ();_ggc .Properties ().SetSolidFill (_abc );return _ggc ;};
// SetOrder sets the order of the series
func (_ade LineChartSeries )SetOrder (idx uint32 ){_ade ._bce .Order .ValAttr =idx };func (_gcc Legend )Properties ()_fb .ShapeProperties {if _gcc ._ffbd .SpPr ==nil {_gcc ._ffbd .SpPr =_dc .NewCT_ShapeProperties ();};return _fb .MakeShapeProperties (_gcc ._ffbd .SpPr );};
// AddBarChart adds a new bar chart to a chart.
func (_facd Chart )AddBarChart ()BarChart {_baf :=_g .NewCT_PlotAreaChoice ();_facd ._cdb .Chart .PlotArea .Choice =append (_facd ._cdb .Chart .PlotArea .Choice ,_baf );_baf .BarChart =_g .NewCT_BarChart ();_baf .BarChart .Grouping =_g .NewCT_BarGrouping ();_baf .BarChart .Grouping .ValAttr =_g .ST_BarGroupingStandard ;_bb :=BarChart {_fdf :_baf .BarChart };_bb .InitializeDefaults ();return _bb ;};
// Surface3DChart is a 3D view of a surface chart.
type Surface3DChart struct{chartBase ;_agfa *_g .CT_Surface3DChart ;};
// InitializeDefaults the bar chart to its defaults
func (_cdc PieOfPieChart )InitializeDefaults (){_cdc ._bbg .VaryColors =_g .NewCT_Boolean ();_cdc ._bbg .VaryColors .ValAttr =_e .Bool (true );_cdc .SetType (_g .ST_OfPieTypePie );_cdc ._bbg .SecondPieSize =_g .NewCT_SecondPieSize ();_cdc ._bbg .SecondPieSize .ValAttr =&_g .ST_SecondPieSize {};_cdc ._bbg .SecondPieSize .ValAttr .ST_SecondPieSizeUShort =_e .Uint16 (75);_fgc :=_g .NewCT_ChartLines ();_fgc .SpPr =_dc .NewCT_ShapeProperties ();_gbg :=_fb .MakeShapeProperties (_fgc .SpPr );_gbg .LineProperties ().SetSolidFill (_ed .Auto );_cdc ._bbg .SerLines =append (_cdc ._bbg .SerLines ,_fgc );};
// Properties returns the bar chart series shape properties.
func (_bgfe RadarChartSeries )Properties ()_fb .ShapeProperties {if _bgfe ._dfd .SpPr ==nil {_bgfe ._dfd .SpPr =_dc .NewCT_ShapeProperties ();};return _fb .MakeShapeProperties (_bgfe ._dfd .SpPr );};
// AddSeries adds a default series to a Scatter chart.
func (_ffd ScatterChart )AddSeries ()ScatterChartSeries {_edec :=_ffd .nextColor (len (_ffd ._fbab .Ser ));_bad :=_g .NewCT_ScatterSer ();_ffd ._fbab .Ser =append (_ffd ._fbab .Ser ,_bad );_bad .Idx .ValAttr =uint32 (len (_ffd ._fbab .Ser )-1);_bad .Order .ValAttr =uint32 (len (_ffd ._fbab .Ser )-1);_egeb :=ScatterChartSeries {_bad };_egeb .InitializeDefaults ();_egeb .Marker ().Properties ().LineProperties ().SetSolidFill (_edec );_egeb .Marker ().Properties ().SetSolidFill (_edec );return _egeb ;};type nullAxis byte ;
// X returns the inner wrapped XML type.
func (_fc DateAxis )X ()*_g .CT_DateAx {return _fc ._caf };
// SetText sets the series text
func (_ebdb LineChartSeries )SetText (s string ){_ebdb ._bce .Tx =_g .NewCT_SerTx ();_ebdb ._bce .Tx .Choice .V =&s ;};func (_gcf DataLabels )SetShowLegendKey (b bool ){_gcf .ensureChoice ();_gcf ._bcff .Choice .ShowLegendKey =_g .NewCT_Boolean ();_gcf ._bcff .Choice .ShowLegendKey .ValAttr =_e .Bool (b );};func (_cad chartBase )nextColor (_dcg int )_ed .Color {return _agagd [_dcg %len (_agagd )]};
// RemoveTitle removes any existing title from the chart.
func (_faf Chart )RemoveTitle (){_faf ._cdb .Chart .Title =nil ;_faf ._cdb .Chart .AutoTitleDeleted =_g .NewCT_Boolean ();_faf ._cdb .Chart .AutoTitleDeleted .ValAttr =_e .Bool (true );};func (_cdg SurfaceChartSeries )Values ()NumberDataSource {if _cdg ._ecdc .Val ==nil {_cdg ._ecdc .Val =_g .NewCT_NumDataSource ();};_cefa :=MakeNumberDataSource (_cdg ._ecdc .Val );_cefa .CreateEmptyNumberCache ();return _cefa ;};
// InitializeDefaults initializes an Radar series to the default values.
func (_badg RadarChartSeries )InitializeDefaults (){};func (_bddc SurfaceChartSeries )InitializeDefaults (){_bddc .Properties ().LineProperties ().SetWidth (1*_ee .Point );_bddc .Properties ().LineProperties ().SetSolidFill (_fef .Black );_bddc .Properties ().LineProperties ().SetJoin (_fega .LineJoinRound );};
// SetDirection changes the direction of the bar chart (bar or column).
func (_gg Bar3DChart )SetDirection (d _g .ST_BarDir ){_gg ._dcf .BarDir .ValAttr =d };type DateAxis struct{_caf *_g .CT_DateAx };type SurfaceChartSeries struct{_ecdc *_g .CT_SurfaceSer };
func (_fdb BarChart )SetDirection (d _e .ST_BarDir ){_fdb ._fa .BarDir .ValAttr =d };func (_bab Surface3DChart )InitializeDefaults (){_bab ._abfa .Wireframe =_e .NewCT_Boolean ();_bab ._abfa .Wireframe .ValAttr =_fe .Bool (false );_bab ._abfa .BandFmts =_e .NewCT_BandFmts ();for _cfeb :=0;_cfeb < 15;_cfeb ++{_gddb :=_e .NewCT_BandFmt ();_gddb .Idx .ValAttr =uint32 (_cfeb );_gddb .SpPr =_feg .NewCT_ShapeProperties ();_dceg :=_fega .MakeShapeProperties (_gddb .SpPr );_dceg .SetSolidFill (_bab .nextColor (_cfeb ));_bab ._abfa .BandFmts .BandFmt =append (_bab ._abfa .BandFmts .BandFmt ,_gddb );};};
// X returns the inner wrapped XML type.
func (_ae BarChartSeries )X ()*_g .CT_BarSer {return _ae ._dg };
func (_fcdg Title )X ()*_e .CT_Title {return _fcdg ._afaa };
// SetIndex sets the index of the series
func (_fae ScatterChartSeries )SetIndex (idx uint32 ){_fae ._ffgd .Idx .ValAttr =idx };
// BarChart is a 2D bar chart.
type BarChart struct{chartBase ;_fa *_e .CT_BarChart ;};func (_ace SeriesAxis )InitializeDefaults (){};
// SetExplosion sets the value that the segements of the pie are 'exploded' by
func (_bgdb PieChartSeries )SetExplosion (v uint32 ){_bgdb ._baea .Explosion =_g .NewCT_UnsignedInt ();_bgdb ._baea .Explosion .ValAttr =v ;};
// X returns the inner wrapped XML type.
func (_fed Pie3DChart )X ()*_e .CT_Pie3DChart {return _fed ._cacc };
// AddDoughnutChart adds a new doughnut (pie with a hole in the center) chart to a chart.
func (_cgbg Chart )AddDoughnutChart ()DoughnutChart {_afc :=_g .NewCT_PlotAreaChoice ();_cgbg ._cdb .Chart .PlotArea .Choice =append (_cgbg ._cdb .Chart .PlotArea .Choice ,_afc );_afc .DoughnutChart =_g .NewCT_DoughnutChart ();_agf :=DoughnutChart {_bcd :_afc .DoughnutChart };_agf .InitializeDefaults ();return _agf ;};
// AreaChartSeries is a series to be used on an area chart.
type AreaChartSeries struct{_caa *_e .CT_AreaSer };func (_dea ValueAxis )MajorGridLines ()GridLines {if _dea ._cdf .MajorGridlines ==nil {_dea ._cdf .MajorGridlines =_e .NewCT_ChartLines ();};return GridLines {_dea ._cdf .MajorGridlines };};func (_baef DateAxis )MajorGridLines ()GridLines {if _baef ._gggda .MajorGridlines ==nil {_baef ._gggda .MajorGridlines =_e .NewCT_ChartLines ();};return GridLines {_baef ._gggda .MajorGridlines };};
// StockChart is a 2D Stock chart.
type StockChart struct{chartBase ;_gceg *_g .CT_StockChart ;};
// Properties returns the Bubble chart series shape properties.
func (_ffb BubbleChartSeries )Properties ()_fega .ShapeProperties {if _ffb ._gd .SpPr ==nil {_ffb ._gd .SpPr =_feg .NewCT_ShapeProperties ();};return _fega .MakeShapeProperties (_ffb ._gd .SpPr );};
// SetText sets the series text.
func (_ff BarChartSeries )SetText (s string ){_ff ._dg .Tx =_g .NewCT_SerTx ();_ff ._dg .Tx .Choice .V =&s };
// X returns the inner wrapped XML type.
func (_fedc ValueAxis )X ()*_e .CT_ValAx {return _fedc ._cdf };func (_cga SeriesAxis )AxisID ()uint32 {return _cga ._faac .AxId .ValAttr };func (_fcb NumberDataSource )SetReference (s string ){_fcb .ensureChoice ();if _fcb ._dce .Choice .NumRef ==nil {_fcb ._dce .Choice .NumRef =_e .NewCT_NumRef ();};_fcb ._dce .Choice .NumRef .F =s ;};
// Order returns the order of the series
func (_abcf ScatterChartSeries )Order ()uint32 {return _abcf ._ffgd .Order .ValAttr };
// AddSeries adds a default series to a line chart.
func (_fab Line3DChart )AddSeries ()LineChartSeries {_bcaf :=_fab .nextColor (len (_fab ._cbd .Ser ));_gggdb :=_e .NewCT_LineSer ();_fab ._cbd .Ser =append (_fab ._cbd .Ser ,_gggdb );_gggdb .Idx .ValAttr =uint32 (len (_fab ._cbd .Ser )-1);_gggdb .Order .ValAttr =uint32 (len (_fab ._cbd .Ser )-1);_ea :=LineChartSeries {_gggdb };_ea .InitializeDefaults ();_ea .Properties ().LineProperties ().SetSolidFill (_bcaf );_ea .Properties ().SetSolidFill (_bcaf );return _ea ;};func (_ecab LineChartSeries )SetSmooth (b bool ){_ecab ._afc .Smooth =_e .NewCT_Boolean ();_ecab ._afc .Smooth .ValAttr =&b ;};
// Properties returns the chart's shape properties.
func (_gdf Chart )Properties ()_fb .ShapeProperties {if _gdf ._cdb .SpPr ==nil {_gdf ._cdb .SpPr =_dc .NewCT_ShapeProperties ();};return _fb .MakeShapeProperties (_gdf ._cdb .SpPr );};
// AddSeries adds a default series to a bar chart.
func (_ga BarChart )AddSeries ()BarChartSeries {_efe :=_ga .nextColor (len (_ga ._fa .Ser ));_fff :=_e .NewCT_BarSer ();_ga ._fa .Ser =append (_ga ._fa .Ser ,_fff );_fff .Idx .ValAttr =uint32 (len (_ga ._fa .Ser )-1);_fff .Order .ValAttr =uint32 (len (_ga ._fa .Ser )-1);_dc :=BarChartSeries {_fff };_dc .InitializeDefaults ();_dc .Properties ().SetSolidFill (_efe );return _dc ;};func (_beec DateAxis )SetTickLabelPosition (p _e .ST_TickLblPos ){if p ==_e .ST_TickLblPosUnset {_beec ._gggda .TickLblPos =nil ;}else {_beec ._gggda .TickLblPos =_e .NewCT_TickLblPos ();_beec ._gggda .TickLblPos .ValAttr =p ;};};
// RadarChartSeries is a series to be used on an Radar chart.
type RadarChartSeries struct{_eed *_e .CT_RadarSer };
// Labels returns the data label properties.
func (_bbe ScatterChartSeries )Labels ()DataLabels {if _bbe ._egge .DLbls ==nil {_bbe ._egge .DLbls =_e .NewCT_DLbls ();};return MakeDataLabels (_bbe ._egge .DLbls );};type CategoryAxis struct{_aac *_e .CT_CatAx };
// AddAreaChart adds a new area chart to a chart.
func (_gge Chart )AddAreaChart ()AreaChart {_bgg :=_e .NewCT_PlotAreaChoice ();_gge ._gdd .Chart .PlotArea .Choice =append (_gge ._gdd .Chart .PlotArea .Choice ,_bgg );_bgg .AreaChart =_e .NewCT_AreaChart ();_dad :=AreaChart {_cc :_bgg .AreaChart };_dad .InitializeDefaults ();return _dad ;};
// InitializeDefaults the bar chart to its defaults
func (_gebf RadarChart )InitializeDefaults (){_gebf ._cfdg .RadarStyle .ValAttr =_g .ST_RadarStyleMarker };
func (_abbg PieOfPieChart )InitializeDefaults (){_abbg ._ggac .VaryColors =_e .NewCT_Boolean ();_abbg ._ggac .VaryColors .ValAttr =_fe .Bool (true );_abbg .SetType (_e .ST_OfPieTypePie );_abbg ._ggac .SecondPieSize =_e .NewCT_SecondPieSize ();_abbg ._ggac .SecondPieSize .ValAttr =&_e .ST_SecondPieSize {};_abbg ._ggac .SecondPieSize .ValAttr .ST_SecondPieSizeUShort =_fe .Uint16 (75);_fceb :=_e .NewCT_ChartLines ();_fceb .SpPr =_feg .NewCT_ShapeProperties ();_bgb :=_fega .MakeShapeProperties (_fceb .SpPr );_bgb .LineProperties ().SetSolidFill (_fef .Auto );_abbg ._ggac .SerLines =append (_abbg ._ggac .SerLines ,_fceb );};
// SetText sets the series text
func (_eag LineChartSeries )SetText (s string ){_eag ._afc .Tx =_e .NewCT_SerTx ();_eag ._afc .Tx .Choice .V =&s ;};
// SurfaceChart is a 3D surface chart, viewed from the top-down.
type SurfaceChart struct{chartBase ;_gcaa *_e .CT_SurfaceChart ;};
// CategoryAxis returns the category data source.
func (_efa PieChartSeries )CategoryAxis ()CategoryAxisDataSource {if _efa ._faag .Cat ==nil {_efa ._faag .Cat =_e .NewCT_AxDataSource ();};return MakeAxisDataSource (_efa ._faag .Cat );};func (_bgeb ValueAxis )SetPosition (p _e .ST_AxPos ){_bgeb ._cdf .AxPos =_e .NewCT_AxPos ();_bgeb ._cdf .AxPos .ValAttr =p ;};func (_adbb Title )InitializeDefaults (){_adbb .SetText ("\u0054\u0069\u0074l\u0065");_adbb .RunProperties ().SetSize (16*_ee .Point );_adbb .RunProperties ().SetSolidFill (_fef .Black );_adbb .RunProperties ().SetFont ("\u0043\u0061\u006c\u0069\u0062\u0020\u0072\u0069");_adbb .RunProperties ().SetBold (false );};
// X returns the inner wrapped XML type.
func (_acad RadarChartSeries )X ()*_e .CT_RadarSer {return _acad ._eed };type SurfaceChartSeries struct{_gdda *_e .CT_SurfaceSer };
// AddSurfaceChart adds a new surface chart to a chart.
func (_geb Chart )AddSurfaceChart ()SurfaceChart {_baaa :=_e .NewCT_PlotAreaChoice ();_geb ._gdd .Chart .PlotArea .Choice =append (_geb ._gdd .Chart .PlotArea .Choice ,_baaa );_baaa .SurfaceChart =_e .NewCT_SurfaceChart ();_ad (_geb ._gdd .Chart );_geb ._gdd .Chart .View3D .RotX .ValAttr =_fe .Int8 (90);_geb ._gdd .Chart .View3D .RotY .ValAttr =_fe .Uint16 (0);_geb ._gdd .Chart .View3D .Perspective =_e .NewCT_Perspective ();_geb ._gdd .Chart .View3D .Perspective .ValAttr =_fe .Uint8 (0);_gbd :=SurfaceChart {_gcaa :_baaa .SurfaceChart };_gbd .InitializeDefaults ();return _gbd ;};func (_efd RadarChart )AddAxis (axis Axis ){_aff :=_e .NewCT_UnsignedInt ();_aff .ValAttr =axis .AxisID ();_efd ._ebcd .AxId =append (_efd ._ebcd .AxId ,_aff );};type Title struct{_afaa *_e .CT_Title };type GridLines struct{_fgcf *_e .CT_ChartLines };func (_bg Bar3DChart )AddAxis (axis Axis ){_bae :=_e .NewCT_UnsignedInt ();_bae .ValAttr =axis .AxisID ();_bg ._daa .AxId =append (_bg ._daa .AxId ,_bae );};func (_caef SeriesAxis )SetCrosses (axis Axis ){_caef ._faac .CrossAx .ValAttr =axis .AxisID ()};
// X returns the inner wrapped XML type.
func (_cfa StockChart )X ()*_e .CT_StockChart {return _cfa ._agc };
// SetText sets the series text
func (_fgf SurfaceChartSeries )SetText (s string ){_fgf ._gdda .Tx =_e .NewCT_SerTx ();_fgf ._gdda .Tx .Choice .V =&s ;};
// RemoveTitle removes any existing title from the chart.
func (_ebg Chart )RemoveTitle (){_ebg ._gdd .Chart .Title =nil ;_ebg ._gdd .Chart .AutoTitleDeleted =_e .NewCT_Boolean ();_ebg ._gdd .Chart .AutoTitleDeleted .ValAttr =_fe .Bool (true );};func (_bdf AreaChart )AddAxis (axis Axis ){_dg :=_e .NewCT_UnsignedInt ();_dg .ValAttr =axis .AxisID ();_bdf ._cc .AxId =append (_bdf ._cc .AxId ,_dg );};
// AddSeries adds a default series to a Surface chart.
func (_afa Surface3DChart )AddSeries ()SurfaceChartSeries {_efga :=_afa .nextColor (len (_afa ._abfa .Ser ));_dbff :=_e .NewCT_SurfaceSer ();_afa ._abfa .Ser =append (_afa ._abfa .Ser ,_dbff );_dbff .Idx .ValAttr =uint32 (len (_afa ._abfa .Ser )-1);_dbff .Order .ValAttr =uint32 (len (_afa ._abfa .Ser )-1);_ggd :=SurfaceChartSeries {_dbff };_ggd .InitializeDefaults ();_ggd .Properties ().LineProperties ().SetSolidFill (_efga );return _ggd ;};func (_bggb ValueAxis )AxisID ()uint32 {return _bggb ._cdf .AxId .ValAttr };
// X returns the inner wrapped XML type.
func (_be AreaChartSeries )X ()*_e .CT_AreaSer {return _be ._caa };type ValueAxis struct{_cdf *_e .CT_ValAx };
// Order returns the order of the series
func (_dbd LineChartSeries )Order ()uint32 {return _dbd ._afc .Order .ValAttr };func (_cgd BarChart )AddAxis (axis Axis ){_fba :=_e .NewCT_UnsignedInt ();_fba .ValAttr =axis .AxisID ();_cgd ._fa .AxId =append (_cgd ._fa .AxId ,_fba );};
// Properties returns the line chart series shape properties.
func (_fea LineChartSeries )Properties ()_fega .ShapeProperties {if _fea ._afc .SpPr ==nil {_fea ._afc .SpPr =_feg .NewCT_ShapeProperties ();};return _fega .MakeShapeProperties (_fea ._afc .SpPr );};
// Properties returns the line chart series shape properties.
func (_fbba ScatterChartSeries )Properties ()_fega .ShapeProperties {if _fbba ._egge .SpPr ==nil {_fbba ._egge .SpPr =_feg .NewCT_ShapeProperties ();};return _fega .MakeShapeProperties (_fbba ._egge .SpPr );};
// SetNumberReference is used to set the source data to a range of cells containing
// numbers.
func (_gbf CategoryAxisDataSource )SetNumberReference (s string ){_gbf ._dgd .Choice =_e .NewCT_AxDataSourceChoice ();_gbf ._dgd .Choice .NumRef =_e .NewCT_NumRef ();_gbf ._dgd .Choice .NumRef .F =s ;};
// SetDisplayBlanksAs controls how missing values are displayed.
func (_befg Chart )SetDisplayBlanksAs (v _e .ST_DispBlanksAs ){_befg ._gdd .Chart .DispBlanksAs =_e .NewCT_DispBlanksAs ();_befg ._gdd .Chart .DispBlanksAs .ValAttr =v ;};func (_fgec DataLabels )SetPosition (p _e .ST_DLblPos ){_fgec .ensureChoice ();_fgec ._bga .Choice .DLblPos =_e .NewCT_DLblPos ();_fgec ._bga .Choice .DLblPos .ValAttr =p ;};
// Values returns the value data source.
func (_deg RadarChartSeries )Values ()NumberDataSource {if _deg ._eed .Val ==nil {_deg ._eed .Val =_e .NewCT_NumDataSource ();};return MakeNumberDataSource (_deg ._eed .Val );};
// SetValues is used to set the source data to a set of values.
func (_abb CategoryAxisDataSource )SetValues (v []string ){_abb ._dgd .Choice =_e .NewCT_AxDataSourceChoice ();_abb ._dgd .Choice .StrLit =_e .NewCT_StrData ();_abb ._dgd .Choice .StrLit .PtCount =_e .NewCT_UnsignedInt ();_abb ._dgd .Choice .StrLit .PtCount .ValAttr =uint32 (len (v ));for _eg ,_dge :=range v {_abb ._dgd .Choice .StrLit .Pt =append (_abb ._dgd .Choice .StrLit .Pt ,&_e .CT_StrVal {IdxAttr :uint32 (_eg ),V :_dge });};};func (_aaea DateAxis )SetCrosses (axis Axis ){_aaea ._gggda .CrossAx .ValAttr =axis .AxisID ()};
// InitializeDefaults the bar chart to its defaults
func (_ef BarChart )InitializeDefaults (){_ef .SetDirection (_e .ST_BarDirCol )};
// X returns the inner wrapped XML type.
func (_gbe Chart )X ()*_e .ChartSpace {return _gbe ._gdd };
// CategoryAxis returns the category data source.
func (_bge RadarChartSeries )CategoryAxis ()CategoryAxisDataSource {if _bge ._eed .Cat ==nil {_bge ._eed .Cat =_e .NewCT_AxDataSource ();};return MakeAxisDataSource (_bge ._eed .Cat );};func (_faa BubbleChart )AddAxis (axis Axis ){_ab :=_e .NewCT_UnsignedInt ();_ab .ValAttr =axis .AxisID ();_faa ._gb .AxId =append (_faa ._gb .AxId ,_ab );};
// AddBubbleChart adds a new bubble chart.
func (_def Chart )AddBubbleChart ()BubbleChart {_gdc :=_e .NewCT_PlotAreaChoice ();_def ._gdd .Chart .PlotArea .Choice =append (_def ._gdd .Chart .PlotArea .Choice ,_gdc );_gdc .BubbleChart =_e .NewCT_BubbleChart ();_cbg :=BubbleChart {_gb :_gdc .BubbleChart };_cbg .InitializeDefaults ();return _cbg ;};
// X returns the inner wrapped XML type.
func (_gcfe PieOfPieChart )X ()*_e .CT_OfPieChart {return _gcfe ._ggac };func (_bdg ValueAxis )SetMinorTickMark (m _e .ST_TickMark ){if m ==_e .ST_TickMarkUnset {_bdg ._cdf .MinorTickMark =nil ;}else {_bdg ._cdf .MinorTickMark =_e .NewCT_TickMark ();_bdg ._cdf .MinorTickMark .ValAttr =m ;};};func (_egda SurfaceChart )InitializeDefaults (){_egda ._gcaa .Wireframe =_e .NewCT_Boolean ();_egda ._gcaa .Wireframe .ValAttr =_fe .Bool (false );_egda ._gcaa .BandFmts =_e .NewCT_BandFmts ();for _ccf :=0;_ccf < 15;_ccf ++{_fffd :=_e .NewCT_BandFmt ();_fffd .Idx .ValAttr =uint32 (_ccf );_fffd .SpPr =_feg .NewCT_ShapeProperties ();_dcfe :=_fega .MakeShapeProperties (_fffd .SpPr );_dcfe .SetSolidFill (_egda .nextColor (_ccf ));_egda ._gcaa .BandFmts .BandFmt =append (_egda ._gcaa .BandFmts .BandFmt ,_fffd );};};
// AddLegend adds a legend to a chart, replacing any existing legend.
func (_aea Chart )AddLegend ()Legend {_aea ._gdd .Chart .Legend =_e .NewCT_Legend ();_beff :=MakeLegend (_aea ._gdd .Chart .Legend );_beff .InitializeDefaults ();return _beff ;};func (_adb DateAxis )SetMajorTickMark (m _e .ST_TickMark ){if m ==_e .ST_TickMarkUnset {_adb ._gggda .MajorTickMark =nil ;}else {_adb ._gggda .MajorTickMark =_e .NewCT_TickMark ();_adb ._gggda .MajorTickMark .ValAttr =m ;};};func MakeValueAxis (x *_e .CT_ValAx )ValueAxis {return ValueAxis {x }};func _ad (_gde *_e .CT_Chart ){_gde .View3D =_e .NewCT_View3D ();_gde .View3D .RotX =_e .NewCT_RotX ();_gde .View3D .RotX .ValAttr =_fe .Int8 (15);_gde .View3D .RotY =_e .NewCT_RotY ();_gde .View3D .RotY .ValAttr =_fe .Uint16 (20);_gde .View3D .RAngAx =_e .NewCT_Boolean ();_gde .View3D .RAngAx .ValAttr =_fe .Bool (false );_gde .Floor =_e .NewCT_Surface ();_gde .Floor .Thickness =_e .NewCT_Thickness ();_gde .Floor .Thickness .ValAttr .Uint32 =_fe .Uint32 (0);_gde .SideWall =_e .NewCT_Surface ();_gde .SideWall .Thickness =_e .NewCT_Thickness ();_gde .SideWall .Thickness .ValAttr .Uint32 =_fe .Uint32 (0);_gde .BackWall =_e .NewCT_Surface ();_gde .BackWall .Thickness =_e .NewCT_Thickness ();_gde .BackWall .Thickness .ValAttr .Uint32 =_fe .Uint32 (0);};type ScatterChart struct{chartBase ;_dbbd *_e .CT_ScatterChart ;};
// X returns the inner wrapped XML type.
func (_beg LineChart )X ()*_e .CT_LineChart {return _beg ._gafd };
// AddTitle sets a new title on the chart.
func (_ffge Chart )AddTitle ()Title {_ffge ._gdd .Chart .Title =_e .NewCT_Title ();_ffge ._gdd .Chart .Title .Overlay =_e .NewCT_Boolean ();_ffge ._gdd .Chart .Title .Overlay .ValAttr =_fe .Bool (false );_ffge ._gdd .Chart .AutoTitleDeleted =_e .NewCT_Boolean ();_ffge ._gdd .Chart .AutoTitleDeleted .ValAttr =_fe .Bool (false );_fge :=MakeTitle (_ffge ._gdd .Chart .Title );_fge .InitializeDefaults ();return _fge ;};
// Surface3DChart is a 3D view of a surface chart.
type Surface3DChart struct{chartBase ;_abfa *_e .CT_Surface3DChart ;};func (_ffc CategoryAxis )SetMajorTickMark (m _e .ST_TickMark ){if m ==_e .ST_TickMarkUnset {_ffc ._aac .MajorTickMark =nil ;}else {_ffc ._aac .MajorTickMark =_e .NewCT_TickMark ();_ffc ._aac .MajorTickMark .ValAttr =m ;};};
// AddArea3DChart adds a new area chart to a chart.
func (_bff Chart )AddArea3DChart ()Area3DChart {_ad (_bff ._gdd .Chart );_bea :=_e .NewCT_PlotAreaChoice ();_bff ._gdd .Chart .PlotArea .Choice =append (_bff ._gdd .Chart .PlotArea .Choice ,_bea );_bea .Area3DChart =_e .NewCT_Area3DChart ();_fbb :=Area3DChart {_cg :_bea .Area3DChart };_fbb .InitializeDefaults ();return _fbb ;};
// Values returns the bubble size data source.
func (_ddc BubbleChartSeries )BubbleSizes ()NumberDataSource {if _ddc ._gd .BubbleSize ==nil {_ddc ._gd .BubbleSize =_e .NewCT_NumDataSource ();};return MakeNumberDataSource (_ddc ._gd .BubbleSize );};func MakeSeriesAxis (x *_e .CT_SerAx )SeriesAxis {return SeriesAxis {x }};func (_baa nullAxis )AxisID ()uint32 {return 0};
// X returns the inner wrapped XML type.
func (_a AreaChart )X ()*_e .CT_AreaChart {return _a ._cc };
// Index returns the index of the series
func (_egd LineChartSeries )Index ()uint32 {return _egd ._afc .Idx .ValAttr };
// PieChart is a Pie chart.
type PieChart struct{chartBase ;_bddb *_e .CT_PieChart ;};func (_ggb NumberDataSource )ensureChoice (){if _ggb ._dce .Choice ==nil {_ggb ._dce .Choice =_e .NewCT_NumDataSourceChoice ();};};
// Area3DChart is an area chart that has a shaded area underneath a curve.
type Area3DChart struct{chartBase ;_cg *_e .CT_Area3DChart ;};func (_dcd CategoryAxis )InitializeDefaults (){_dcd .SetPosition (_e .ST_AxPosB );_dcd .SetMajorTickMark (_e .ST_TickMarkOut );_dcd .SetMinorTickMark (_e .ST_TickMarkIn );_dcd .SetTickLabelPosition (_e .ST_TickLblPosNextTo );_dcd .MajorGridLines ().Properties ().LineProperties ().SetSolidFill (_fef .LightGray );_dcd .Properties ().LineProperties ().SetSolidFill (_fef .Black );};
// AddValueAxis adds a value axis to the chart.
func (_dfee Chart )AddValueAxis ()ValueAxis {_cae :=_e .NewCT_ValAx ();if _dfee ._gdd .Chart .PlotArea .CChoice ==nil {_dfee ._gdd .Chart .PlotArea .CChoice =_e .NewCT_PlotAreaChoice1 ();};_cae .AxId =_e .NewCT_UnsignedInt ();_cae .AxId .ValAttr =0x7FFFFFFF&_d .Uint32 ();_dfee ._gdd .Chart .PlotArea .CChoice .ValAx =append (_dfee ._gdd .Chart .PlotArea .CChoice .ValAx ,_cae );_cae .Delete =_e .NewCT_Boolean ();_cae .Delete .ValAttr =_fe .Bool (false );_cae .Scaling =_e .NewCT_Scaling ();_cae .Scaling .Orientation =_e .NewCT_Orientation ();_cae .Scaling .Orientation .ValAttr =_e .ST_OrientationMinMax ;_cae .Choice =&_e .EG_AxSharedChoice {};_cae .Choice .Crosses =_e .NewCT_Crosses ();_cae .Choice .Crosses .ValAttr =_e .ST_CrossesAutoZero ;_cae .CrossBetween =_e .NewCT_CrossBetween ();_cae .CrossBetween .ValAttr =_e .ST_CrossBetweenBetween ;_acc :=MakeValueAxis (_cae );_acc .MajorGridLines ().Properties ().LineProperties ().SetSolidFill (_fef .LightGray );_acc .SetMajorTickMark (_e .ST_TickMarkOut );_acc .SetMinorTickMark (_e .ST_TickMarkIn );_acc .SetTickLabelPosition (_e .ST_TickLblPosNextTo );_acc .Properties ().LineProperties ().SetSolidFill (_fef .Black );_acc .SetPosition (_e .ST_AxPosL );return _acc ;};
// AddSeries adds a default series to an Radar chart.
func (_aee RadarChart )AddSeries ()RadarChartSeries {_ebe :=_aee .nextColor (len (_aee ._ebcd .Ser ));_bfbf :=_e .NewCT_RadarSer ();_aee ._ebcd .Ser =append (_aee ._ebcd .Ser ,_bfbf );_bfbf .Idx .ValAttr =uint32 (len (_aee ._ebcd .Ser )-1);_bfbf .Order .ValAttr =uint32 (len (_aee ._ebcd .Ser )-1);_dbgg :=RadarChartSeries {_bfbf };_dbgg .InitializeDefaults ();_dbgg .Properties ().SetSolidFill (_ebe );return _dbgg ;};
// X returns the inner wrapped XML type.
func (_gbeg Line3DChart )X ()*_e .CT_Line3DChart {return _gbeg ._cbd };func MakeLegend (l *_e .CT_Legend )Legend {return Legend {l }};
// Values returns the value data source.
func (_fdbb PieChartSeries )Values ()NumberDataSource {if _fdbb ._faag .Val ==nil {_fdbb ._faag .Val =_e .NewCT_NumDataSource ();};return MakeNumberDataSource (_fdbb ._faag .Val );};
// SetText sets the series text.
func (_ced AreaChartSeries )SetText (s string ){_ced ._caa .Tx =_e .NewCT_SerTx ();_ced ._caa .Tx .Choice .V =&s ;};func (_bc CategoryAxis )SetCrosses (axis Axis ){_bc ._aac .Choice =_e .NewEG_AxSharedChoice ();_bc ._aac .Choice .Crosses =_e .NewCT_Crosses ();_bc ._aac .Choice .Crosses .ValAttr =_e .ST_CrossesAutoZero ;_bc ._aac .CrossAx .ValAttr =axis .AxisID ();};
// Properties returns the bar chart series shape properties.
func (_dd AreaChartSeries )Properties ()_fega .ShapeProperties {if _dd ._caa .SpPr ==nil {_dd ._caa .SpPr =_feg .NewCT_ShapeProperties ();};return _fega .MakeShapeProperties (_dd ._caa .SpPr );};
// InitializeDefaults the bar chart to its defaults
func (_ca Area3DChart )InitializeDefaults (){};
// SetIndex sets the index of the series
func (_feba ScatterChartSeries )SetIndex (idx uint32 ){_feba ._egge .Idx .ValAttr =idx };func (_ggg CategoryAxis )MajorGridLines ()GridLines {if _ggg ._aac .MajorGridlines ==nil {_ggg ._aac .MajorGridlines =_e .NewCT_ChartLines ();};return GridLines {_ggg ._aac .MajorGridlines };};func (_bgf Title )RunProperties ()_fega .RunProperties {if _bgf ._afaa .Tx ==nil {_bgf .SetText ("");};if _bgf ._afaa .Tx .Choice .Rich .P [0].EG_TextRun [0].R .RPr ==nil {_bgf ._afaa .Tx .Choice .Rich .P [0].EG_TextRun [0].R .RPr =_feg .NewCT_TextCharacterProperties ();};return _fega .MakeRunProperties (_bgf ._afaa .Tx .Choice .Rich .P [0].EG_TextRun [0].R .RPr );};type SeriesAxis struct{_faac *_e .CT_SerAx };
// AddSeries adds a default series to an Pie chart.
func (_afb PieOfPieChart )AddSeries ()PieChartSeries {_ecea :=_e .NewCT_PieSer ();_afb ._ggac .Ser =append (_afb ._ggac .Ser ,_ecea );_ecea .Idx .ValAttr =uint32 (len (_afb ._ggac .Ser )-1);_ecea .Order .ValAttr =uint32 (len (_afb ._ggac .Ser )-1);_fcg :=PieChartSeries {_ecea };_fcg .InitializeDefaults ();return _fcg ;};
// Bar3DChart is a 3D bar chart.
type Bar3DChart struct{chartBase ;_daa *_e .CT_Bar3DChart ;};func (_fdd ScatterChartSeries )Values ()NumberDataSource {if _fdd ._egge .YVal ==nil {_fdd ._egge .YVal =_e .NewCT_NumDataSource ();};return MakeNumberDataSource (_fdd ._egge .YVal );};
// X returns the inner wrapped XML type.
func (_ebea Surface3DChart )X ()*_e .CT_Surface3DChart {return _ebea ._abfa };
// SetText sets the series text.
func (_fga BarChartSeries )SetText (s string ){_fga ._fc .Tx =_e .NewCT_SerTx ();_fga ._fc .Tx .Choice .V =&s ;};func (_cbfb Title )SetText (s string ){if _cbfb ._afaa .Tx ==nil {_cbfb ._afaa .Tx =_e .NewCT_Tx ();};if _cbfb ._afaa .Tx .Choice .Rich ==nil {_cbfb ._afaa .Tx .Choice .Rich =_feg .NewCT_TextBody ();};var _gbda *_feg .CT_TextParagraph ;if len (_cbfb ._afaa .Tx .Choice .Rich .P )==0{_gbda =_feg .NewCT_TextParagraph ();_cbfb ._afaa .Tx .Choice .Rich .P =[]*_feg .CT_TextParagraph {_gbda };}else {_gbda =_cbfb ._afaa .Tx .Choice .Rich .P [0];};var _cabc *_feg .EG_TextRun ;if len (_gbda .EG_TextRun )==0{_cabc =_feg .NewEG_TextRun ();_gbda .EG_TextRun =[]*_feg .EG_TextRun {_cabc };}else {_cabc =_gbda .EG_TextRun [0];};if _cabc .R ==nil {_cabc .R =_feg .NewCT_RegularTextRun ();};_cabc .R .T =s ;};
// Index returns the index of the series
func (_fde SurfaceChartSeries )Index ()uint32 {return _fde ._gdda .Idx .ValAttr };func (_abf DataLabels )SetShowLeaderLines (b bool ){_abf .ensureChoice ();_abf ._bga .Choice .ShowLeaderLines =_e .NewCT_Boolean ();_abf ._bga .Choice .ShowLeaderLines .ValAttr =_fe .Bool (b );};func (_fgfb ValueAxis )SetMajorTickMark (m _e .ST_TickMark ){if m ==_e .ST_TickMarkUnset {_fgfb ._cdf .MajorTickMark =nil ;}else {_fgfb ._cdf .MajorTickMark =_e .NewCT_TickMark ();_fgfb ._cdf .MajorTickMark .ValAttr =m ;};};
// Order returns the order of the series
func (_gcfec SurfaceChartSeries )Order ()uint32 {return _gcfec ._gdda .Order .ValAttr };
// MakeAxisDataSource constructs an AxisDataSource wrapper.
func MakeAxisDataSource (x *_e .CT_AxDataSource )CategoryAxisDataSource {return CategoryAxisDataSource {x };};type LineChart struct{chartBase ;_gafd *_e .CT_LineChart ;};
// AddPie3DChart adds a new pie chart to a chart.
func (_gaf Chart )AddPie3DChart ()Pie3DChart {_ad (_gaf ._gdd .Chart );_aab :=_e .NewCT_PlotAreaChoice ();_gaf ._gdd .Chart .PlotArea .Choice =append (_gaf ._gdd .Chart .PlotArea .Choice ,_aab );_aab .Pie3DChart =_e .NewCT_Pie3DChart ();_gbb :=Pie3DChart {_cacc :_aab .Pie3DChart };_gbb .InitializeDefaults ();return _gbb ;};
// AddSeries adds a default series to an area chart.
func (_ff AreaChart )AddSeries ()AreaChartSeries {_cf :=_ff .nextColor (len (_ff ._cc .Ser ));_af :=_e .NewCT_AreaSer ();_ff ._cc .Ser =append (_ff ._cc .Ser ,_af );_af .Idx .ValAttr =uint32 (len (_ff ._cc .Ser )-1);_af .Order .ValAttr =uint32 (len (_ff ._cc .Ser )-1);_ba :=AreaChartSeries {_af };_ba .InitializeDefaults ();_ba .Properties ().SetSolidFill (_cf );return _ba ;};
// AreaChart is an area chart that has a shaded area underneath a curve.
type AreaChart struct{chartBase ;_cc *_e .CT_AreaChart ;};
// AddSeries adds a default series to a line chart.
func (_fcf LineChart )AddSeries ()LineChartSeries {_gbeb :=_fcf .nextColor (len (_fcf ._gafd .Ser ));_gcb :=_e .NewCT_LineSer ();_fcf ._gafd .Ser =append (_fcf ._gafd .Ser ,_gcb );_gcb .Idx .ValAttr =uint32 (len (_fcf ._gafd .Ser )-1);_gcb .Order .ValAttr =uint32 (len (_fcf ._gafd .Ser )-1);_daag :=LineChartSeries {_gcb };_daag .InitializeDefaults ();_daag .Properties ().LineProperties ().SetSolidFill (_gbeb );return _daag ;};func (_gf CategoryAxis )Properties ()_fega .ShapeProperties {if _gf ._aac .SpPr ==nil {_gf ._aac .SpPr =_feg .NewCT_ShapeProperties ();};return _fega .MakeShapeProperties (_gf ._aac .SpPr );};
// X returns the inner wrapped XML type.
func (_gbg DoughnutChart )X ()*_e .CT_DoughnutChart {return _gbg ._gebe };
// CategoryAxis returns the category data source.
func (_ge AreaChartSeries )CategoryAxis ()CategoryAxisDataSource {if _ge ._caa .Cat ==nil {_ge ._caa .Cat =_e .NewCT_AxDataSource ();};return MakeAxisDataSource (_ge ._caa .Cat );};func (_dbe Legend )SetOverlay (b bool ){_dbe ._eca .Overlay =_e .NewCT_Boolean ();_dbe ._eca .Overlay .ValAttr =_fe .Bool (b );};
// X returns the inner wrapped XML type.
func (_bda BarChartSeries )X ()*_e .CT_BarSer {return _bda ._fc };
// AddSeries adds a default series to a Bubble chart.
func (_bdd BubbleChart )AddSeries ()BubbleChartSeries {_eff :=_bdd .nextColor (len (_bdd ._gb .Ser ));_daf :=_e .NewCT_BubbleSer ();_bdd ._gb .Ser =append (_bdd ._gb .Ser ,_daf );_daf .Idx .ValAttr =uint32 (len (_bdd ._gb .Ser )-1);_daf .Order .ValAttr =uint32 (len (_bdd ._gb .Ser )-1);_bde :=BubbleChartSeries {_daf };_bde .InitializeDefaults ();_bde .Properties ().SetSolidFill (_eff );return _bde ;};
// Order returns the order of the series
func (_cgde ScatterChartSeries )Order ()uint32 {return _cgde ._egge .Order .ValAttr };

View File

@ -11,27 +11,27 @@
// Package color provides color handling structures and functions for use across
// all of the document types.
package color ;import (_f "fmt";_e "github.com/unidoc/unioffice";);var Navy =Color {0x00,0x00,0x80,255,false };var DarkOliveGreen =Color {0x55,0x6B,0x2F,255,false };var Aquamarine =Color {0x7F,0xFF,0xD4,255,false };
package color ;import (_g "fmt";_d "github.com/unidoc/unioffice";);var MediumSlateBlue =Color {0x7B,0x68,0xEE,255,false };var LightSkyBlue =Color {0x87,0xCE,0xFA,255,false };var Sienna =Color {0xA0,0x52,0x2D,255,false };var BlanchedAlmond =Color {0xFF,0xEB,0xCD,255,false };
// Color is a 24 bit color that can be converted to
// internal ECMA-376 formats as needed.
type Color struct{_d ,_dc ,_fg ,_b uint8 ;_a bool ;};var Beige =Color {0xF5,0xF5,0xDC,255,false };var DimGrey =Color {0x69,0x69,0x69,255,false };var SteelBlue =Color {0x46,0x82,0xB4,255,false };var Ivory =Color {0xFF,0xFF,0xF0,255,false };var Turquoise =Color {0x40,0xE0,0xD0,255,false };var IndianRed =Color {0xCD,0x5C,0x5C,255,false };var PowderBlue =Color {0xB0,0xE0,0xE6,255,false };var Lavender =Color {0xE6,0xE6,0xFA,255,false };var SeaGreen =Color {0x2E,0x8B,0x57,255,false };var Bisque =Color {0xFF,0xE4,0xC4,255,false };var Moccasin =Color {0xFF,0xE4,0xB5,255,false };var LightSkyBlue =Color {0x87,0xCE,0xFA,255,false };var Azure =Color {0xF0,0xFF,0xFF,255,false };var Salmon =Color {0xFA,0x80,0x72,255,false };var DarkSlateBlue =Color {0x48,0x3D,0x8B,255,false };var DarkKhaki =Color {0xBD,0xB7,0x6B,255,false };var Plum =Color {0xDD,0xA0,0xDD,255,false };var Sienna =Color {0xA0,0x52,0x2D,255,false };var DarkGray =Color {0xA9,0xA9,0xA9,255,false };var MediumPurple =Color {0x93,0x70,0xDB,255,false };var LightSlateGrey =Color {0x77,0x88,0x99,255,false };var BurlyWood =Color {0xDE,0xB8,0x87,255,false };var DarkMagenta =Color {0x8B,0x00,0x8B,255,false };
// RGB constructs a new RGB color with a given red, green and blue value.
func RGB (r ,g ,b uint8 )Color {return Color {r ,g ,b ,255,false }};var DarkGray =Color {0xA9,0xA9,0xA9,255,false };var Turquoise =Color {0x40,0xE0,0xD0,255,false };var PapayaWhip =Color {0xFF,0xEF,0xD5,255,false };var GreenYellow =Color {0xAD,0xFF,0x2F,255,false };var Peru =Color {0xCD,0x85,0x3F,255,false };var Green =Color {0x00,0x80,0x00,255,false };
// RGBA constructs a new RGBA color with a given red, green, blue and alpha
// value.
func RGBA (r ,g ,b ,a uint8 )Color {return Color {r ,g ,b ,a ,false }};var LightCyan =Color {0xE0,0xFF,0xFF,255,false };var Cornsilk =Color {0xFF,0xF8,0xDC,255,false };var DarkCyan =Color {0x00,0x8B,0x8B,255,false };var CadetBlue =Color {0x5F,0x9E,0xA0,255,false };var Fuchsia =Color {0xFF,0x00,0xFF,255,false };var Chartreuse =Color {0x7F,0xFF,0x00,255,false };var Khaki =Color {0xF0,0xE6,0x8C,255,false };var LightSteelBlue =Color {0xB0,0xC4,0xDE,255,false };var DarkSlateGray =Color {0x2F,0x4F,0x4F,255,false };var Coral =Color {0xFF,0x7F,0x50,255,false };var Tan =Color {0xD2,0xB4,0x8C,255,false };var PaleTurquoise =Color {0xAF,0xEE,0xEE,255,false };var LightGoldenRodYellow =Color {0xFA,0xFA,0xD2,255,false };var Olive =Color {0x80,0x80,0x00,255,false };var SandyBrown =Color {0xF4,0xA4,0x60,255,false };var Orchid =Color {0xDA,0x70,0xD6,255,false };var Red =Color {0xFF,0x00,0x00,255,false };var Black =Color {0x00,0x00,0x00,255,false };var DarkGreen =Color {0x00,0x64,0x00,255,false };var MediumSlateBlue =Color {0x7B,0x68,0xEE,255,false };var DarkSalmon =Color {0xE9,0x96,0x7A,255,false };var DarkSeaGreen =Color {0x8F,0xBC,0x8F,255,false };var HoneyDew =Color {0xF0,0xFF,0xF0,255,false };var Linen =Color {0xFA,0xF0,0xE6,255,false };var Teal =Color {0x00,0x80,0x80,255,false };var White =Color {0xFF,0xFF,0xFF,255,false };var LightSlateGray =Color {0x77,0x88,0x99,255,false };var SlateGray =Color {0x70,0x80,0x90,255,false };var LightYellow =Color {0xFF,0xFF,0xE0,255,false };var DarkOrange =Color {0xFF,0x8C,0x00,255,false };var OldLace =Color {0xFD,0xF5,0xE6,255,false };var LightGrey =Color {0xD3,0xD3,0xD3,255,false };var SkyBlue =Color {0x87,0xCE,0xEB,255,false };var PaleGreen =Color {0x98,0xFB,0x98,255,false };var LavenderBlush =Color {0xFF,0xF0,0xF5,255,false };var CornflowerBlue =Color {0x64,0x95,0xED,255,false };var LemonChiffon =Color {0xFF,0xFA,0xCD,255,false };var Blue =Color {0x00,0x00,0xFF,255,false };var MediumSeaGreen =Color {0x3C,0xB3,0x71,255,false };var Magenta =Color {0xFF,0x00,0xFF,255,false };var DarkOrchid =Color {0x99,0x32,0xCC,255,false };var DarkRed =Color {0x8B,0x00,0x00,255,false };var MediumVioletRed =Color {0xC7,0x15,0x85,255,false };var LightGreen =Color {0x90,0xEE,0x90,255,false };var MediumSpringGreen =Color {0x00,0xFA,0x9A,255,false };var Maroon =Color {0x80,0x00,0x00,255,false };var DarkGrey =Color {0xA9,0xA9,0xA9,255,false };
// RGB constructs a new RGB color with a given red, green and blue value.
func RGB (r ,g ,b uint8 )Color {return Color {r ,g ,b ,255,false }};var Lime =Color {0x00,0xFF,0x00,255,false };var SlateGrey =Color {0x70,0x80,0x90,255,false };var DarkGoldenRod =Color {0xB8,0x86,0x0B,255,false };var BlueViolet =Color {0x8A,0x2B,0xE2,255,false };var WhiteSmoke =Color {0xF5,0xF5,0xF5,255,false };var MediumBlue =Color {0x00,0x00,0xCD,255,false };var YellowGreen =Color {0x9A,0xCD,0x32,255,false };var MediumOrchid =Color {0xBA,0x55,0xD3,255,false };var NavajoWhite =Color {0xFF,0xDE,0xAD,255,false };var RebeccaPurple =Color {0x66,0x33,0x99,255,false };var PaleVioletRed =Color {0xDB,0x70,0x93,255,false };var OliveDrab =Color {0x6B,0x8E,0x23,255,false };var Pink =Color {0xFF,0xC0,0xCB,255,false };var Aqua =Color {0x00,0xFF,0xFF,255,false };var DarkViolet =Color {0x94,0x00,0xD3,255,false };var FireBrick =Color {0xB2,0x22,0x22,255,false };var SaddleBrown =Color {0x8B,0x45,0x13,255,false };var BlanchedAlmond =Color {0xFF,0xEB,0xCD,255,false };var AliceBlue =Color {0xF0,0xF8,0xFF,255,false };var MidnightBlue =Color {0x19,0x19,0x70,255,false };
// AsRGBString is used by the various wrappers to return a pointer
// to a string containing a six digit hex RGB value.
func (_de Color )AsRGBString ()*string {return _e .Stringf ("\u0025\u0030\u0032x\u0025\u0030\u0032\u0078\u0025\u0030\u0032\u0078",_de ._d ,_de ._dc ,_de ._fg );};var GoldenRod =Color {0xDA,0xA5,0x20,255,false };var Violet =Color {0xEE,0x82,0xEE,255,false };var Brown =Color {0xA5,0x2A,0x2A,255,false };var DeepPink =Color {0xFF,0x14,0x93,255,false };var LightSeaGreen =Color {0x20,0xB2,0xAA,255,false };var Cyan =Color {0x00,0xFF,0xFF,255,false };var MistyRose =Color {0xFF,0xE4,0xE1,255,false };var DarkBlue =Color {0x00,0x00,0x8B,255,false };var DodgerBlue =Color {0x1E,0x90,0xFF,255,false };var Silver =Color {0xC0,0xC0,0xC0,255,false };var SeaShell =Color {0xFF,0xF5,0xEE,255,false };var GhostWhite =Color {0xF8,0xF8,0xFF,255,false };var SlateBlue =Color {0x6A,0x5A,0xCD,255,false };var LightBlue =Color {0xAD,0xD8,0xE6,255,false };var Auto =Color {0,0,0,255,true };var Purple =Color {0x80,0x00,0x80,255,false };
// AsRGBAString is used by the various wrappers to return a pointer
// to a string containing a six digit hex RGB value.
func (_fb Color )AsRGBAString ()*string {return _e .Stringf ("\u0025\u00302\u0078\u0025\u00302\u0078\u0025\u0030\u0032\u0078\u0025\u0030\u0032\u0078",_fb ._b ,_fb ._d ,_fb ._dc ,_fb ._fg );};var LightPink =Color {0xFF,0xB6,0xC1,255,false };var Indigo =Color {0x4B,0x00,0x82,255,false };func FromHex (s string )Color {if len (s )==0{return Auto ;};if s [0]=='#'{s =s [1:];};var _gg ,_dg ,_bb uint8 ;_bf ,_ :=_f .Sscanf (s ,"\u0025\u0030\u0032x\u0025\u0030\u0032\u0078\u0025\u0030\u0032\u0078",&_gg ,&_dg ,&_bb );if _bf ==3{return RGB (_gg ,_dg ,_bb );};return Auto ;};var Wheat =Color {0xF5,0xDE,0xB3,255,false };var LawnGreen =Color {0x7C,0xFC,0x00,255,false };var Tomato =Color {0xFF,0x63,0x47,255,false };var GreenYellow =Color {0xAD,0xFF,0x2F,255,false };var RoyalBlue =Color {0x41,0x69,0xE1,255,false };var DeepSkyBlue =Color {0x00,0xBF,0xFF,255,false };var Chocolate =Color {0xD2,0x69,0x1E,255,false };var SpringGreen =Color {0x00,0xFF,0x7F,255,false };var LightGray =Color {0xD3,0xD3,0xD3,255,false };var MediumAquaMarine =Color {0x66,0xCD,0xAA,255,false };var MintCream =Color {0xF5,0xFF,0xFA,255,false };var FloralWhite =Color {0xFF,0xFA,0xF0,255,false };var DimGray =Color {0x69,0x69,0x69,255,false };var Gainsboro =Color {0xDC,0xDC,0xDC,255,false };var ForestGreen =Color {0x22,0x8B,0x22,255,false };var PaleGoldenRod =Color {0xEE,0xE8,0xAA,255,false };var Yellow =Color {0xFF,0xFF,0x00,255,false };var Peru =Color {0xCD,0x85,0x3F,255,false };var LightSalmon =Color {0xFF,0xA0,0x7A,255,false };var PeachPuff =Color {0xFF,0xDA,0xB9,255,false };var Green =Color {0x00,0x80,0x00,255,false };var Orange =Color {0xFF,0xA5,0x00,255,false };var SuccessGreen =Color {0x00,0xCC,0x00,255,false };var DarkSlateGrey =Color {0x2F,0x4F,0x4F,255,false };var PapayaWhip =Color {0xFF,0xEF,0xD5,255,false };var LightCoral =Color {0xF0,0x80,0x80,255,false };var DarkTurquoise =Color {0x00,0xCE,0xD1,255,false };var Crimson =Color {0xDC,0x14,0x3C,255,false };var Gold =Color {0xFF,0xD7,0x00,255,false };var MediumTurquoise =Color {0x48,0xD1,0xCC,255,false };var AntiqueWhite =Color {0xFA,0xEB,0xD7,255,false };
func RGBA (r ,g ,b ,a uint8 )Color {return Color {r ,g ,b ,a ,false }};var DarkViolet =Color {0x94,0x00,0xD3,255,false };var WhiteSmoke =Color {0xF5,0xF5,0xF5,255,false };var DeepSkyBlue =Color {0x00,0xBF,0xFF,255,false };var FloralWhite =Color {0xFF,0xFA,0xF0,255,false };var DarkMagenta =Color {0x8B,0x00,0x8B,255,false };var DarkGreen =Color {0x00,0x64,0x00,255,false };var LightSteelBlue =Color {0xB0,0xC4,0xDE,255,false };var PeachPuff =Color {0xFF,0xDA,0xB9,255,false };var LightSlateGrey =Color {0x77,0x88,0x99,255,false };var Gainsboro =Color {0xDC,0xDC,0xDC,255,false };var Auto =Color {0,0,0,255,true };var NavajoWhite =Color {0xFF,0xDE,0xAD,255,false };var LawnGreen =Color {0x7C,0xFC,0x00,255,false };var LimeGreen =Color {0x32,0xCD,0x32,255,false };var PaleGreen =Color {0x98,0xFB,0x98,255,false };var SlateBlue =Color {0x6A,0x5A,0xCD,255,false };var Wheat =Color {0xF5,0xDE,0xB3,255,false };var MidnightBlue =Color {0x19,0x19,0x70,255,false };var MediumTurquoise =Color {0x48,0xD1,0xCC,255,false };var BurlyWood =Color {0xDE,0xB8,0x87,255,false };var LightSeaGreen =Color {0x20,0xB2,0xAA,255,false };var DarkCyan =Color {0x00,0x8B,0x8B,255,false };var DarkBlue =Color {0x00,0x00,0x8B,255,false };var DarkSeaGreen =Color {0x8F,0xBC,0x8F,255,false };
// IsAuto returns true if the color is the 'Auto' type. If the
// field doesn't support an Auto color, then black is used.
func (_fd Color )IsAuto ()bool {return _fd ._a };var LimeGreen =Color {0x32,0xCD,0x32,255,false };var Gray =Color {0x80,0x80,0x80,255,false };var Thistle =Color {0xD8,0xBF,0xD8,255,false };var Snow =Color {0xFF,0xFA,0xFA,255,false };var RosyBrown =Color {0xBC,0x8F,0x8F,255,false };var HotPink =Color {0xFF,0x69,0xB4,255,false };var OrangeRed =Color {0xFF,0x45,0x00,255,false };
func (_fg Color )IsAuto ()bool {return _fg ._b };var GoldenRod =Color {0xDA,0xA5,0x20,255,false };var Gray =Color {0x80,0x80,0x80,255,false };var DarkSlateGrey =Color {0x2F,0x4F,0x4F,255,false };var PowderBlue =Color {0xB0,0xE0,0xE6,255,false };var DarkGoldenRod =Color {0xB8,0x86,0x0B,255,false };var PaleVioletRed =Color {0xDB,0x70,0x93,255,false };var Beige =Color {0xF5,0xF5,0xDC,255,false };var Blue =Color {0x00,0x00,0xFF,255,false };var ForestGreen =Color {0x22,0x8B,0x22,255,false };var MediumAquaMarine =Color {0x66,0xCD,0xAA,255,false };var DeepPink =Color {0xFF,0x14,0x93,255,false };var Navy =Color {0x00,0x00,0x80,255,false };var Salmon =Color {0xFA,0x80,0x72,255,false };var LightBlue =Color {0xAD,0xD8,0xE6,255,false };var Maroon =Color {0x80,0x00,0x00,255,false };var FireBrick =Color {0xB2,0x22,0x22,255,false };var MediumOrchid =Color {0xBA,0x55,0xD3,255,false };var RosyBrown =Color {0xBC,0x8F,0x8F,255,false };var Tan =Color {0xD2,0xB4,0x8C,255,false };var LightGoldenRodYellow =Color {0xFA,0xFA,0xD2,255,false };var LightGreen =Color {0x90,0xEE,0x90,255,false };var MediumPurple =Color {0x93,0x70,0xDB,255,false };var DarkOrange =Color {0xFF,0x8C,0x00,255,false };var IndianRed =Color {0xCD,0x5C,0x5C,255,false };var Lavender =Color {0xE6,0xE6,0xFA,255,false };var MintCream =Color {0xF5,0xFF,0xFA,255,false };var Violet =Color {0xEE,0x82,0xEE,255,false };var Chartreuse =Color {0x7F,0xFF,0x00,255,false };var DarkOliveGreen =Color {0x55,0x6B,0x2F,255,false };var AntiqueWhite =Color {0xFA,0xEB,0xD7,255,false };
// Color is a 24 bit color that can be converted to
// internal ECMA-376 formats as needed.
type Color struct{_a ,_f ,_de ,_ga uint8 ;_b bool ;};var Snow =Color {0xFF,0xFA,0xFA,255,false };func FromHex (s string )Color {if len (s )==0{return Auto ;};if s [0]=='#'{s =s [1:];};var _fd ,_be ,_ee uint8 ;_fe ,_ :=_g .Sscanf (s ,"\u0025\u0030\u0032x\u0025\u0030\u0032\u0078\u0025\u0030\u0032\u0078",&_fd ,&_be ,&_ee );if _fe ==3{return RGB (_fd ,_be ,_ee );};return Auto ;};var Coral =Color {0xFF,0x7F,0x50,255,false };var MediumVioletRed =Color {0xC7,0x15,0x85,255,false };var LightCyan =Color {0xE0,0xFF,0xFF,255,false };var OrangeRed =Color {0xFF,0x45,0x00,255,false };var AliceBlue =Color {0xF0,0xF8,0xFF,255,false };var DarkSlateGray =Color {0x2F,0x4F,0x4F,255,false };var BlueViolet =Color {0x8A,0x2B,0xE2,255,false };var Orange =Color {0xFF,0xA5,0x00,255,false };var LemonChiffon =Color {0xFF,0xFA,0xCD,255,false };var Orchid =Color {0xDA,0x70,0xD6,255,false };var LightCoral =Color {0xF0,0x80,0x80,255,false };
// AsRGBString is used by the various wrappers to return a pointer
// to a string containing a six digit hex RGB value.
func (_bc Color )AsRGBString ()*string {return _d .Stringf ("\u0025\u0030\u0032x\u0025\u0030\u0032\u0078\u0025\u0030\u0032\u0078",_bc ._a ,_bc ._f ,_bc ._de );};var CadetBlue =Color {0x5F,0x9E,0xA0,255,false };var Bisque =Color {0xFF,0xE4,0xC4,255,false };var Crimson =Color {0xDC,0x14,0x3C,255,false };var LightYellow =Color {0xFF,0xFF,0xE0,255,false };var DarkKhaki =Color {0xBD,0xB7,0x6B,255,false };var DarkSalmon =Color {0xE9,0x96,0x7A,255,false };var DarkTurquoise =Color {0x00,0xCE,0xD1,255,false };var Purple =Color {0x80,0x00,0x80,255,false };var PaleTurquoise =Color {0xAF,0xEE,0xEE,255,false };var DimGrey =Color {0x69,0x69,0x69,255,false };var SteelBlue =Color {0x46,0x82,0xB4,255,false };var SlateGrey =Color {0x70,0x80,0x90,255,false };var MediumBlue =Color {0x00,0x00,0xCD,255,false };var SaddleBrown =Color {0x8B,0x45,0x13,255,false };var Teal =Color {0x00,0x80,0x80,255,false };var MistyRose =Color {0xFF,0xE4,0xE1,255,false };var HoneyDew =Color {0xF0,0xFF,0xF0,255,false };var Magenta =Color {0xFF,0x00,0xFF,255,false };var DarkGrey =Color {0xA9,0xA9,0xA9,255,false };var DarkSlateBlue =Color {0x48,0x3D,0x8B,255,false };var CornflowerBlue =Color {0x64,0x95,0xED,255,false };var OldLace =Color {0xFD,0xF5,0xE6,255,false };var LavenderBlush =Color {0xFF,0xF0,0xF5,255,false };var Thistle =Color {0xD8,0xBF,0xD8,255,false };var OliveDrab =Color {0x6B,0x8E,0x23,255,false };var Yellow =Color {0xFF,0xFF,0x00,255,false };var White =Color {0xFF,0xFF,0xFF,255,false };var Plum =Color {0xDD,0xA0,0xDD,255,false };var Ivory =Color {0xFF,0xFF,0xF0,255,false };var Brown =Color {0xA5,0x2A,0x2A,255,false };var Black =Color {0x00,0x00,0x00,255,false };var Aquamarine =Color {0x7F,0xFF,0xD4,255,false };var SuccessGreen =Color {0x00,0xCC,0x00,255,false };var Silver =Color {0xC0,0xC0,0xC0,255,false };var DarkOrchid =Color {0x99,0x32,0xCC,255,false };var DodgerBlue =Color {0x1E,0x90,0xFF,255,false };var RebeccaPurple =Color {0x66,0x33,0x99,255,false };var Cyan =Color {0x00,0xFF,0xFF,255,false };var HotPink =Color {0xFF,0x69,0xB4,255,false };
// AsRGBAString is used by the various wrappers to return a pointer
// to a string containing a six digit hex RGB value.
func (_c Color )AsRGBAString ()*string {return _d .Stringf ("\u0025\u00302\u0078\u0025\u00302\u0078\u0025\u0030\u0032\u0078\u0025\u0030\u0032\u0078",_c ._ga ,_c ._a ,_c ._f ,_c ._de );};var Aqua =Color {0x00,0xFF,0xFF,255,false };var Cornsilk =Color {0xFF,0xF8,0xDC,255,false };var LightPink =Color {0xFF,0xB6,0xC1,255,false };var SlateGray =Color {0x70,0x80,0x90,255,false };var Khaki =Color {0xF0,0xE6,0x8C,255,false };var Indigo =Color {0x4B,0x00,0x82,255,false };var MediumSpringGreen =Color {0x00,0xFA,0x9A,255,false };var LightGrey =Color {0xD3,0xD3,0xD3,255,false };var PaleGoldenRod =Color {0xEE,0xE8,0xAA,255,false };var Olive =Color {0x80,0x80,0x00,255,false };var Lime =Color {0x00,0xFF,0x00,255,false };var Azure =Color {0xF0,0xFF,0xFF,255,false };var Pink =Color {0xFF,0xC0,0xCB,255,false };var SpringGreen =Color {0x00,0xFF,0x7F,255,false };var GhostWhite =Color {0xF8,0xF8,0xFF,255,false };var LightSlateGray =Color {0x77,0x88,0x99,255,false };var SeaShell =Color {0xFF,0xF5,0xEE,255,false };var Moccasin =Color {0xFF,0xE4,0xB5,255,false };var SandyBrown =Color {0xF4,0xA4,0x60,255,false };var LightSalmon =Color {0xFF,0xA0,0x7A,255,false };var Red =Color {0xFF,0x00,0x00,255,false };var Linen =Color {0xFA,0xF0,0xE6,255,false };var Tomato =Color {0xFF,0x63,0x47,255,false };var Fuchsia =Color {0xFF,0x00,0xFF,255,false };var DimGray =Color {0x69,0x69,0x69,255,false };var YellowGreen =Color {0x9A,0xCD,0x32,255,false };var MediumSeaGreen =Color {0x3C,0xB3,0x71,255,false };var Gold =Color {0xFF,0xD7,0x00,255,false };var SeaGreen =Color {0x2E,0x8B,0x57,255,false };var DarkRed =Color {0x8B,0x00,0x00,255,false };var RoyalBlue =Color {0x41,0x69,0xE1,255,false };var LightGray =Color {0xD3,0xD3,0xD3,255,false };var Chocolate =Color {0xD2,0x69,0x1E,255,false };var SkyBlue =Color {0x87,0xCE,0xEB,255,false };

View File

@ -13,395 +13,395 @@
// OOXML document formats.
//
// Package common contains common properties used by the subpackages.
package common ;import (_af "archive/zip";_da "bytes";_c "encoding/xml";_a "errors";_ee "fmt";_gfe "github.com/unidoc/unioffice";_ggc "github.com/unidoc/unioffice/common/tempstorage";_aa "github.com/unidoc/unioffice/common/tempstorage/diskstore";_eb "github.com/unidoc/unioffice/measurement";_ggb "github.com/unidoc/unioffice/schema/soo/dml";_ef "github.com/unidoc/unioffice/schema/soo/ofc/custom_properties";_daf "github.com/unidoc/unioffice/schema/soo/ofc/docPropsVTypes";_aaea "github.com/unidoc/unioffice/schema/soo/ofc/extended_properties";_db "github.com/unidoc/unioffice/schema/soo/pkg/content_types";_ge "github.com/unidoc/unioffice/schema/soo/pkg/metadata/core_properties";_aae "github.com/unidoc/unioffice/schema/soo/pkg/relationships";_ec "github.com/unidoc/unioffice/zippkg";_gg "image";_ "image/gif";_ "image/jpeg";_ "image/png";_d "os";_g "reflect";_fff "regexp";_cg "strconv";_cb "strings";_e "time";);func (_cdad CustomProperties )SetPropertyAsBool (name string ,b bool ){_dbec :=_cdad .getNewProperty (name );_dbec .Bool =&b ;_cdad .setOrReplaceProperty (_dbec );};
package common ;import (_cgf "archive/zip";_ce "bytes";_cgb "encoding/xml";_cea "errors";_ca "fmt";_fd "github.com/unidoc/unioffice";_gg "github.com/unidoc/unioffice/common/tempstorage";_ceg "github.com/unidoc/unioffice/common/tempstorage/diskstore";_e "github.com/unidoc/unioffice/measurement";_ag "github.com/unidoc/unioffice/schema/soo/dml";_eg "github.com/unidoc/unioffice/schema/soo/ofc/custom_properties";_de "github.com/unidoc/unioffice/schema/soo/ofc/docPropsVTypes";_fa "github.com/unidoc/unioffice/schema/soo/ofc/extended_properties";_bd "github.com/unidoc/unioffice/schema/soo/pkg/content_types";_beg "github.com/unidoc/unioffice/schema/soo/pkg/metadata/core_properties";_bb "github.com/unidoc/unioffice/schema/soo/pkg/relationships";_cf "github.com/unidoc/unioffice/zippkg";_d "image";_ "image/gif";_ "image/jpeg";_ "image/png";_be "os";_f "reflect";_g "regexp";_db "strconv";_dg "strings";_ba "time";);
// NewAppProperties constructs a new AppProperties.
func NewAppProperties ()AppProperties {_fbc :=AppProperties {_aff :_fa .NewProperties ()};_fbc .SetCompany ("\u0046\u006f\u0078\u0079\u0055\u0074\u0069\u006c\u0073\u0020\u0065\u0068\u0066");_fbc .SetApplication ("g\u0069\u0074\u0068\u0075\u0062\u002ec\u006f\u006d\u002f\u0075\u006e\u0069\u0064\u006f\u0063/\u0075\u006e\u0069o\u0066f\u0069\u0063\u0065");_fbc .SetDocSecurity (0);_fbc .SetLinksUpToDate (false );var _ccb ,_cegd ,_cdf int64 ;_ca .Sscanf (Version ,"\u0025\u0064\u002e\u0025\u0064\u002e\u0025\u0064",&_ccb ,&_cegd ,&_cdf );_gfb :=float64 (_ccb )+float64 (_cegd )/10000.0;_fbc .SetApplicationVersion (_ca .Sprintf ("\u0025\u0030\u0037\u002e\u0034\u0066",_gfb ));return _fbc ;};
// SetTarget changes the target attribute of the image reference (e.g. in the case of the creation of the reference or if the image which the reference is related to was moved from one location to another).
func (_deafd *ImageRef )SetTarget (target string ){_deafd ._dda =target };
// AddOverride adds an override content type for a given path name.
func (_fgb ContentTypes )AddOverride (path ,contentType string ){if !_dg .HasPrefix (path ,"\u002f"){path ="\u002f"+path ;};if _dg .HasPrefix (contentType ,"\u0068\u0074\u0074\u0070"){_fd .Log ("\u0063\u006f\u006e\u0074\u0065\u006et\u0020\u0074\u0079p\u0065\u0020\u0027%\u0073\u0027\u0020\u0069\u0073\u0020\u0069\u006e\u0063\u006fr\u0072\u0065\u0063\u0074\u002c m\u0075\u0073\u0074\u0020\u006e\u006f\u0074\u0020\u0073\u0074\u0061\u0072\u0074\u0020\u0077\u0069\u0074\u0068\u0020\u0068\u0074\u0074\u0070",contentType );};for _ ,_ef :=range _fgb ._bacb .Override {if _ef .PartNameAttr ==path &&_ef .ContentTypeAttr ==contentType {return ;};};_aaca :=_bd .NewOverride ();_aaca .PartNameAttr =path ;_aaca .ContentTypeAttr =contentType ;_fgb ._bacb .Override =append (_fgb ._bacb .Override ,_aaca );};
// SetLanguage records the language of the document.
func (_dc CoreProperties )SetLanguage (s string ){_dc ._baega .Language =&_fd .XSDAny {XMLName :_cgb .Name {Local :"d\u0063\u003a\u006c\u0061\u006e\u0067\u0075\u0061\u0067\u0065"}};_dc ._baega .Language .Data =[]byte (s );};
// Data returns the data of an image file, if any.
func (_dcc ImageRef )Data ()*[]byte {return _dcc ._gdg .Data };
// Cells returns an array of row cells.
func (_abf TableRow )Cells ()[]*_ag .CT_TableCell {return _abf ._cgag .Tc };
// RemoveOverride removes an override given a path.
func (_baea ContentTypes )RemoveOverride (path string ){if !_dg .HasPrefix (path ,"\u002f"){path ="\u002f"+path ;};for _cb ,_cgd :=range _baea ._bacb .Override {if _cgd .PartNameAttr ==path {copy (_baea ._bacb .Override [_cb :],_baea ._bacb .Override [_cb +1:]);_baea ._bacb .Override =_baea ._bacb .Override [0:len (_baea ._bacb .Override )-1];};};};
// ApplicationVersion returns the version of the application that created the
// document.
func (_adb AppProperties )ApplicationVersion ()string {if _adb ._ede .AppVersion !=nil {return *_adb ._ede .AppVersion ;};return "";};
func (_eb AppProperties )ApplicationVersion ()string {if _eb ._aff .AppVersion !=nil {return *_eb ._aff .AppVersion ;};return "";};
// X returns the inner raw content types.
func (_bf ContentTypes )X ()*_bd .Types {return _bf ._bacb };
// NewRelationships creates a new relationship wrapper.
func NewRelationships ()Relationships {return Relationships {_gfd :_bb .NewRelationships ()}};
// Pages returns total number of pages which are saved by the text editor which produced the document.
// For unioffice created documents, it is 0.
func (_eec AppProperties )Pages ()int32 {if _eec ._aff .Pages !=nil {return *_eec ._aff .Pages ;};return 0;};
// Company returns the name of the company that created the document.
// For unioffice created documents, it defaults to github.com/unidoc/unioffice
func (_bdb AppProperties )Company ()string {if _bdb ._aff .Company !=nil {return *_bdb ._aff .Company ;};return "";};
// ExtraFile is an unsupported file type extracted from, or to be written to a
// zip package
type ExtraFile struct{ZipPath string ;DiskPath string ;};
// SetModified sets the time that the document was modified.
func (_dfa CoreProperties )SetModified (t _ba .Time ){_dfa ._baega .Modified =_beb (t ,"\u0064\u0063t\u0065\u0072\u006ds\u003a\u006d\u006f\u0064\u0069\u0066\u0069\u0065\u0064");};
// Rows returns all table rows.
func (_gabg Table )Rows ()[]*TableRow {_fcc :=_gabg ._fege .Tr ;_bad :=[]*TableRow {};for _ ,_ebfd :=range _fcc {_bad =append (_bad ,&TableRow {_cgag :_ebfd });};return _bad ;};
// SetTitle records the title of the document.
func (_ge CoreProperties )SetTitle (s string ){if _ge ._baega .Title ==nil {_ge ._baega .Title =&_fd .XSDAny {XMLName :_cgb .Name {Local :"\u0064\u0063\u003a\u0074\u0069\u0074\u006c\u0065"}};};_ge ._baega .Title .Data =[]byte (s );};var ReleasedAt =_ba .Date (_geg ,_bbgcc ,_dcb ,_ebccd ,_aad ,0,0,_ba .UTC );func UtcTimeFormat (t _ba .Time )string {return t .Format (_ccfe )+"\u0020\u0055\u0054\u0043"};
// X returns the inner wrapped XML type.
func (_adag Table )X ()*_ag .Tbl {return _adag ._fege };
// WriteExtraFiles writes the extra files to the zip package.
func (_gbb *DocBase )WriteExtraFiles (z *_cgf .Writer )error {for _ ,_gbgd :=range _gbb .ExtraFiles {if _faf :=_cf .AddFileFromDisk (z ,_gbgd .ZipPath ,_gbgd .DiskPath );_faf !=nil {return _faf ;};};return nil ;};
// NewCoreProperties constructs a new CoreProperties.
func NewCoreProperties ()CoreProperties {return CoreProperties {_baega :_beg .NewCoreProperties ()}};
// SetContentStatus records the content status of the document.
func (_fc CoreProperties )SetContentStatus (s string ){_fc ._baega .ContentStatus =&s };var _ebfa =_cea .New ("\u0069\u006d\u0061\u0067\u0065\u0020\u006e\u006f\u0074\u0020\u0066o\u0075\u006e\u0064\u0020\u0069\u006e\u0020\u0073\u0074\u006fr\u0061\u0067\u0065");
// AddRelationship adds a relationship.
func (_dbcg Relationships )AddRelationship (target ,ctype string )Relationship {if !_dg .HasPrefix (ctype ,"\u0068t\u0074\u0070\u003a\u002f\u002f"){_fd .Log ("\u0072\u0065\u006c\u0061\u0074\u0069\u006f\u006es\u0068\u0069\u0070 t\u0079\u0070\u0065\u0020\u0025\u0073 \u0073\u0068\u006f\u0075\u006c\u0064\u0020\u0073\u0074\u0061\u0072\u0074\u0020\u0077\u0069t\u0068\u0020\u0027\u0068\u0074\u0074\u0070\u003a/\u002f\u0027",ctype );};_fgd :=_bb .NewRelationship ();_cgbg :=len (_dbcg ._gfd .Relationship )+1;_dge :=map[string ]struct{}{};for _ ,_add :=range _dbcg ._gfd .Relationship {_dge [_add .IdAttr ]=struct{}{};};for _ ,_ggb :=_dge [_ca .Sprintf ("\u0072\u0049\u0064%\u0064",_cgbg )];_ggb ;_ ,_ggb =_dge [_ca .Sprintf ("\u0072\u0049\u0064%\u0064",_cgbg )]{_cgbg ++;};_fgd .IdAttr =_ca .Sprintf ("\u0072\u0049\u0064%\u0064",_cgbg );_fgd .TargetAttr =target ;_fgd .TypeAttr =ctype ;_dbcg ._gfd .Relationship =append (_dbcg ._gfd .Relationship ,_fgd );return Relationship {_edd :_fgd };};
// ImageFromFile reads an image from a file on disk. It doesn't keep the image
// in memory and only reads it to determine the format and size. You can also
// construct an Image directly if the file and size are known.
// NOTE: See also ImageFromStorage.
func ImageFromFile (path string )(Image ,error ){_gfcd ,_acf :=_d .Open (path );_cff :=Image {};if _acf !=nil {return _cff ,_ee .Errorf ("\u0065\u0072\u0072or\u0020\u0072\u0065\u0061\u0064\u0069\u006e\u0067\u0020\u0069\u006d\u0061\u0067\u0065\u003a\u0020\u0025\u0073",_acf );};defer _gfcd .Close ();_adgc ,_cfed ,_acf :=_gg .Decode (_gfcd );if _acf !=nil {return _cff ,_ee .Errorf ("\u0075n\u0061\u0062\u006c\u0065 \u0074\u006f\u0020\u0070\u0061r\u0073e\u0020i\u006d\u0061\u0067\u0065\u003a\u0020\u0025s",_acf );};_cff .Path =path ;_cff .Format =_cfed ;_cff .Size =_adgc .Bounds ().Size ();return _cff ,nil ;};
func ImageFromFile (path string )(Image ,error ){_ffb ,_dba :=_be .Open (path );_fefa :=Image {};if _dba !=nil {return _fefa ,_ca .Errorf ("\u0065\u0072\u0072or\u0020\u0072\u0065\u0061\u0064\u0069\u006e\u0067\u0020\u0069\u006d\u0061\u0067\u0065\u003a\u0020\u0025\u0073",_dba );};defer _ffb .Close ();_fbb ,_aga ,_dba :=_d .Decode (_ffb );if _dba !=nil {return _fefa ,_ca .Errorf ("\u0075n\u0061\u0062\u006c\u0065 \u0074\u006f\u0020\u0070\u0061r\u0073e\u0020i\u006d\u0061\u0067\u0065\u003a\u0020\u0025s",_dba );};_fefa .Path =path ;_fefa .Format =_aga ;_fefa .Size =_fbb .Bounds ().Size ();return _fefa ,nil ;};
// RemoveOverrideByIndex removes an override given a path and override index.
func (_edd ContentTypes )RemoveOverrideByIndex (path string ,indexToFind int )error {_acg :=path [0:len (path )-5];if !_cb .HasPrefix (_acg ,"\u002f"){_acg ="\u002f"+_acg ;};_dea ,_edg :=_fff .Compile (_acg +"\u0028\u005b\u0030-\u0039\u005d\u002b\u0029\u002e\u0078\u006d\u006c");if _edg !=nil {return _edg ;};_gcd :=0;_def :=-1;for _gdg ,_bcfb :=range _edd ._cgg .Override {if _fcc :=_dea .FindStringSubmatch (_bcfb .PartNameAttr );len (_fcc )> 1{if _gcd ==indexToFind {_def =_gdg ;}else if _gcd > indexToFind {_dda ,_ :=_cg .Atoi (_fcc [1]);_dda --;_bcfb .PartNameAttr =_ee .Sprintf ("\u0025\u0073\u0025\u0064\u002e\u0078\u006d\u006c",_acg ,_dda );};_gcd ++;};};if _def > -1{copy (_edd ._cgg .Override [_def :],_edd ._cgg .Override [_def +1:]);_edd ._cgg .Override =_edd ._cgg .Override [0:len (_edd ._cgg .Override )-1];};return nil ;};
// Application returns the name of the application that created the document.
// For unioffice created documents, it defaults to github.com/unidoc/unioffice
func (_begg AppProperties )Application ()string {if _begg ._aff .Application !=nil {return *_begg ._aff .Application ;};return "";};
// CoreProperties contains document specific properties.
type CoreProperties struct{_agf *_ge .CoreProperties };
// RelID returns the relationship ID.
func (_eaf ImageRef )RelID ()string {return _eaf ._fefg };
// TableCol represents a column in a table.
type TableCol struct{_gea *_ggb .CT_TableCol };
// ImageFromStorage reads an image using the currently set
// temporary storage mechanism (see tempstorage). You can also
// construct an Image directly if the file and size are known.
func ImageFromStorage (path string )(Image ,error ){_deg :=Image {};_acc ,_bdc :=_ggc .Open (path );if _bdc !=nil {return _deg ,_ee .Errorf ("\u0065\u0072\u0072or\u0020\u0072\u0065\u0061\u0064\u0069\u006e\u0067\u0020\u0069\u006d\u0061\u0067\u0065\u003a\u0020\u0025\u0073",_bdc );};defer _acc .Close ();_ccc ,_daed ,_bdc :=_gg .Decode (_acc );if _bdc !=nil {return _deg ,_ee .Errorf ("\u0075n\u0061\u0062\u006c\u0065 \u0074\u006f\u0020\u0070\u0061r\u0073e\u0020i\u006d\u0061\u0067\u0065\u003a\u0020\u0025s",_bdc );};_deg .Path =path ;_deg .Format =_daed ;_deg .Size =_ccc .Bounds ().Size ();return _deg ,nil ;};func (_ffg *ImageRef )SetRelID (id string ){_ffg ._ebb =id };
// Format returns the format of the underlying image
func (_cbd ImageRef )Format ()string {return _cbd ._dcg .Format };
// ContentTypes is the top level "[Content_Types].xml" in a zip package.
type ContentTypes struct{_cgg *_db .Types };
// SetCompany sets the name of the company that created the document.
func (_dac AppProperties )SetCompany (s string ){_dac ._ede .Company =&s };
// AddRow adds a row to a table.
func (_accg Table )AddRow ()*TableRow {_fcg :=_ag .NewCT_TableRow ();for _bef :=0;_bef < len (_accg ._fege .TblGrid .GridCol );_bef ++{_fcg .Tc =append (_fcg .Tc ,_ag .NewCT_TableCell ());};_accg ._fege .Tr =append (_accg ._fege .Tr ,_fcg );return &TableRow {_cgag :_fcg };};
// X returns the inner wrapped XML type.
func (_beeg Relationship )X ()*_aae .Relationship {return _beeg ._caf };
func (_bfdd Theme )X ()*_ag .Theme {return _bfdd ._dcag };const _fdfd ="2\u00300\u0036\u002d\u0030\u0031\u002d\u0030\u0032\u00541\u0035\u003a\u0030\u0034:0\u0035\u005a";
// NewRelationships creates a new relationship wrapper.
func NewRelationships ()Relationships {return Relationships {_deaa :_aae .NewRelationships ()}};
// EnsureOverride ensures that an override for the given path exists, adding it if necessary
func (_cdd ContentTypes )EnsureOverride (path ,contentType string ){for _ ,_ebf :=range _cdd ._bacb .Override {if _ebf .PartNameAttr ==path {if _dg .HasPrefix (contentType ,"\u0068\u0074\u0074\u0070"){_fd .Log ("\u0063\u006f\u006e\u0074\u0065\u006et\u0020\u0074\u0079p\u0065\u0020\u0027%\u0073\u0027\u0020\u0069\u0073\u0020\u0069\u006e\u0063\u006fr\u0072\u0065\u0063\u0074\u002c m\u0075\u0073\u0074\u0020\u006e\u006f\u0074\u0020\u0073\u0074\u0061\u0072\u0074\u0020\u0077\u0069\u0074\u0068\u0020\u0068\u0074\u0074\u0070",contentType );};_ebf .ContentTypeAttr =contentType ;return ;};};_cdd .AddOverride (path ,contentType );};func (_edg CustomProperties )SetPropertyAsUi2 (name string ,ui2 uint16 ){_dfgc :=_edg .getNewProperty (name );_dfgc .Ui2 =&ui2 ;_edg .setOrReplaceProperty (_dfgc );};
// CustomProperty contains document specific property.
// Using of this type is deprecated.
type CustomProperty struct{_ffb *_ef .CT_Property };
// SetLastModifiedBy records the last person to modify the document.
func (_cddb CoreProperties )SetLastModifiedBy (s string ){_cddb ._baega .LastModifiedBy =&s };func (_degc CustomProperties )SetPropertyAsR4 (name string ,r4 float32 ){_fgf :=_degc .getNewProperty (name );_fgf .R4 =&r4 ;_degc .setOrReplaceProperty (_fgf );};
// NewTable makes a new table.
func NewTable ()*Table {_cee :=_ggb .NewTbl ();_cee .TblPr =_ggb .NewCT_TableProperties ();return &Table {_fadc :_cee };};
// GetPropertyByName returns a custom property selected by it's name.
func (_bda CustomProperties )GetPropertyByName (name string )CustomProperty {_gcfc :=_bda ._bdd .Property ;for _ ,_bbf :=range _gcfc {if *_bbf .NameAttr ==name {return CustomProperty {_cab :_bbf };};};return CustomProperty {};};
// EnsureDefault esnures that an extension and default content type exist,
// adding it if necessary.
func (_gfd ContentTypes )EnsureDefault (ext ,contentType string ){ext =_cb .ToLower (ext );for _ ,_add :=range _gfd ._cgg .Default {if _add .ExtensionAttr ==ext {_add .ContentTypeAttr =contentType ;return ;};};_ba :=&_db .Default {};_ba .ContentTypeAttr =contentType ;_ba .ExtensionAttr =ext ;_gfd ._cgg .Default =append (_gfd ._cgg .Default ,_ba );};func (_faff CustomProperties )SetPropertyAsLpwstr (name string ,lpwstr string ){_ebe :=_faff .getNewProperty (name );_ebe .Lpwstr =&lpwstr ;_faff .setOrReplaceProperty (_ebe );};func (_cda CustomProperties )SetPropertyAsStream (name string ,stream string ){_egf :=_cda .getNewProperty (name );_egf .Stream =&stream ;_cda .setOrReplaceProperty (_egf );};
// NewRelationship constructs a new relationship.
func NewRelationship ()Relationship {return Relationship {_edd :_bb .NewRelationship ()}};
// AddRelationship adds a relationship.
func (_gee Relationships )AddRelationship (target ,ctype string )Relationship {if !_cb .HasPrefix (ctype ,"\u0068t\u0074\u0070\u003a\u002f\u002f"){_gfe .Log ("\u0072\u0065\u006c\u0061\u0074\u0069\u006f\u006es\u0068\u0069\u0070 t\u0079\u0070\u0065\u0020\u0025\u0073 \u0073\u0068\u006f\u0075\u006c\u0064\u0020\u0073\u0074\u0061\u0072\u0074\u0020\u0077\u0069t\u0068\u0020\u0027\u0068\u0074\u0074\u0070\u003a/\u002f\u0027",ctype );};_deafd :=_aae .NewRelationship ();_fgcd :=len (_gee ._deaa .Relationship )+1;_bca :=map[string ]struct{}{};for _ ,_dgd :=range _gee ._deaa .Relationship {_bca [_dgd .IdAttr ]=struct{}{};};for _ ,_fdc :=_bca [_ee .Sprintf ("\u0072\u0049\u0064%\u0064",_fgcd )];_fdc ;_ ,_fdc =_bca [_ee .Sprintf ("\u0072\u0049\u0064%\u0064",_fgcd )]{_fgcd ++;};_deafd .IdAttr =_ee .Sprintf ("\u0072\u0049\u0064%\u0064",_fgcd );_deafd .TargetAttr =target ;_deafd .TypeAttr =ctype ;_gee ._deaa .Relationship =append (_gee ._deaa .Relationship ,_deafd );return Relationship {_caf :_deafd };};
// X returns the inner wrapped XML type.
func (_bdab Relationship )X ()*_bb .Relationship {return _bdab ._edd };
// SetHeight sets row height, see measurement package.
func (_ada TableRow )SetHeight (m _eb .Distance ){_dee :=_eb .ToEMU (float64 (m ));_ada ._dgc .HAttr =_ggb .ST_Coordinate {ST_CoordinateUnqualified :&_dee };};func (_faf CustomProperties )SetPropertyAsEmpty (name string ){_efac :=_faf .getNewProperty (name );_efac .Empty =_daf .NewEmpty ();_faf .setOrReplaceProperty (_efac );};func _gca (_dcac *_gfe .XSDAny )_e .Time {if _dcac ==nil {return _e .Time {};};_eaa ,_cbg :=_e .Parse (_dfe ,string (_dcac .Data ));if _cbg !=nil {_gfe .Log ("\u0065\u0072\u0072\u006f\u0072\u0020\u0070\u0061\u0072\u0073i\u006e\u0067\u0020\u0074\u0069\u006d\u0065 \u0066\u0072\u006f\u006d\u0020\u0025\u0073\u003a\u0020\u0025\u0073",string (_dcac .Data ),_cbg );};return _eaa ;};
// Format returns the format of the underlying image
func (_acd ImageRef )Format ()string {return _acd ._gdg .Format };
// AddExtraFileFromZip is used when reading an unsupported file from an OOXML
// file. This ensures that unsupported file content will at least round-trip
// correctly.
func (_fec *DocBase )AddExtraFileFromZip (f *_af .File )error {_eddf ,_cabb :=_ec .ExtractToDiskTmp (f ,_fec .TmpPath );if _cabb !=nil {return _ee .Errorf ("\u0065\u0072r\u006f\u0072\u0020\u0065x\u0074\u0072a\u0063\u0074\u0069\u006e\u0067\u0020\u0075\u006es\u0075\u0070\u0070\u006f\u0072\u0074\u0065\u0064\u0020\u0066\u0069\u006ce\u003a\u0020\u0025\u0073",_cabb );};_fec .ExtraFiles =append (_fec .ExtraFiles ,ExtraFile {ZipPath :f .Name ,DiskPath :_eddf });return nil ;};func (_cfg CustomProperties )SetPropertyAsOstorage (name string ,ostorage string ){_afd :=_cfg .getNewProperty (name );_afd .Ostorage =&ostorage ;_cfg .setOrReplaceProperty (_afd );};func (_efaa CustomProperties )getNewProperty (_bbg string )*_ef .CT_Property {_afg :=_efaa ._gcaa .Property ;_fdd :=int32 (1);for _ ,_bdd :=range _afg {if _bdd .PidAttr > _fdd {_fdd =_bdd .PidAttr ;};};_bab :=_ef .NewCT_Property ();_bab .NameAttr =&_bbg ;_bab .PidAttr =_fdd +1;_bab .FmtidAttr ="\u007b\u0044\u0035\u0043\u0044\u0044\u0035\u0030\u0035\u002d\u0032\u0045\u0039\u0043\u002d\u0031\u0030\u0031\u0042\u002d\u0039\u0033\u0039\u0037-\u0030\u0038\u0030\u0030\u0032B\u0032\u0043F\u0039\u0041\u0045\u007d";return _bab ;};func (_gaag CustomProperties )SetPropertyAsBstr (name string ,bstr string ){_fae :=_gaag .getNewProperty (name );_fae .Bstr =&bstr ;_gaag .setOrReplaceProperty (_fae );};
// Properties returns table properties.
func (_dfb Table )Grid ()*_ag .CT_TableGrid {return _dfb ._fege .TblGrid };
// X returns the inner wrapped XML type of CustomProperty.
func (_fbdb CustomProperty )X ()*_ef .CT_Property {return _fbdb ._ffb };
// Clear removes any existing relationships.
func (_ddbf Relationships )Clear (){_ddbf ._gfd .Relationship =nil };
// SetOffsetY sets vertical offset of a table in distance units (see measurement package).
func (_gab Table )SetOffsetY (offY float64 ){if _gab ._ggdg .Off ==nil {_gab ._ggdg .Off =_ggb .NewCT_Point2D ();_ebag :=int64 (0);_gab ._ggdg .Off .XAttr =_ggb .ST_Coordinate {ST_CoordinateUnqualified :&_ebag };};_fcfb :=_eb .ToEMU (offY );_gab ._ggdg .Off .YAttr =_ggb .ST_Coordinate {ST_CoordinateUnqualified :&_fcfb };};
func (_bffd Table )SetOffsetY (offY float64 ){if _bffd ._deag .Off ==nil {_bffd ._deag .Off =_ag .NewCT_Point2D ();_cabg :=int64 (0);_bffd ._deag .Off .XAttr =_ag .ST_Coordinate {ST_CoordinateUnqualified :&_cabg };};_aba :=_e .ToEMU (offY );_bffd ._deag .Off .YAttr =_ag .ST_Coordinate {ST_CoordinateUnqualified :&_aba };};
// NewCustomProperties constructs a new CustomProperties.
func NewCustomProperties ()CustomProperties {return CustomProperties {_gcaa :_ef .NewProperties ()}};
// SetApplicationVersion sets the version of the application that created the
// document. Per MS, the verison string mut be in the form 'XX.YYYY'.
func (_bbg AppProperties )SetApplicationVersion (s string ){_bbg ._aff .AppVersion =&s };
// RelativeWidth returns the relative width of an image given a fixed height.
// This is used when setting image to a fixed height to calculate the width
// required to keep the same image aspect ratio.
func (_cceg ImageRef )RelativeWidth (h _eb .Distance )_eb .Distance {_deaf :=float64 (_cceg .Size ().X )/float64 (_cceg .Size ().Y );return h *_eb .Distance (_deaf );};func (_dba CustomProperties )SetPropertyAsInt (name string ,i int ){_fgde :=_dba .getNewProperty (name );_afe :=int32 (i );_fgde .Int =&_afe ;_dba .setOrReplaceProperty (_fgde );};func (_fdaf CustomProperties )SetPropertyAsVstream (name string ,vstream *_daf .Vstream ){_gfb :=_fdaf .getNewProperty (name );_gfb .Vstream =vstream ;_fdaf .setOrReplaceProperty (_gfb );};
// ImageFromBytes returns an Image struct for an in-memory image. You can also
// construct an Image directly if the file and size are known.
func ImageFromBytes (data []byte )(Image ,error ){_addd :=Image {};_acee ,_ggfa ,_dbfc :=_gg .Decode (_da .NewReader (data ));if _dbfc !=nil {return _addd ,_ee .Errorf ("\u0075n\u0061\u0062\u006c\u0065 \u0074\u006f\u0020\u0070\u0061r\u0073e\u0020i\u006d\u0061\u0067\u0065\u003a\u0020\u0025s",_dbfc );};_addd .Data =&data ;_addd .Format =_ggfa ;_addd .Size =_acee .Bounds ().Size ();return _addd ,nil ;};
// Author returns the author of the document
func (_fbd CoreProperties )Author ()string {if _fbd ._agf .Creator !=nil {return string (_fbd ._agf .Creator .Data );};return "";};
// AddCol adds a column to a table.
func (_efc Table )AddCol ()*TableCol {_gaef :=_ggb .NewCT_TableCol ();_efc ._fadc .TblGrid .GridCol =append (_efc ._fadc .TblGrid .GridCol ,_gaef );for _ ,_adfc :=range _efc ._fadc .Tr {_dead :=_ggb .NewCT_TableCell ();_adfc .Tc =append (_adfc .Tc ,_dead );};return &TableCol {_gea :_gaef };};
// DefAttr returns the DefAttr property.
func (_beecf TableStyles )DefAttr ()string {return _beecf ._gaed .DefAttr };
// NewRelationship constructs a new relationship.
func NewRelationship ()Relationship {return Relationship {_caf :_aae .NewRelationship ()}};
// Relationships represents a .rels file.
type Relationships struct{_deaa *_aae .Relationships };func (_eba CustomProperties )SetPropertyAsArray (name string ,array *_daf .Array ){_dce :=_eba .getNewProperty (name );_dce .Array =array ;_eba .setOrReplaceProperty (_dce );};
// GetPropertyByName returns a custom property selected by it's name.
func (_eddb CustomProperties )GetPropertyByName (name string )CustomProperty {_bgg :=_eddb ._gcaa .Property ;for _ ,_fgf :=range _bgg {if *_fgf .NameAttr ==name {return CustomProperty {_ffb :_fgf };};};return CustomProperty {};};
// NewAppProperties constructs a new AppProperties.
func NewAppProperties ()AppProperties {_geb :=AppProperties {_ede :_aaea .NewProperties ()};_geb .SetCompany ("\u0046\u006f\u0078\u0079\u0055\u0074\u0069\u006c\u0073\u0020\u0065\u0068\u0066");_geb .SetApplication ("g\u0069\u0074\u0068\u0075\u0062\u002ec\u006f\u006d\u002f\u0075\u006e\u0069\u0064\u006f\u0063/\u0075\u006e\u0069o\u0066f\u0069\u0063\u0065");_geb .SetDocSecurity (0);_geb .SetLinksUpToDate (false );var _ddg ,_ag ,_gc int64 ;_ee .Sscanf (Version ,"\u0025\u0064\u002e\u0025\u0064\u002e\u0025\u0064",&_ddg ,&_ag ,&_gc );_ffa :=float64 (_ddg )+float64 (_ag )/10000.0;_geb .SetApplicationVersion (_ee .Sprintf ("\u0025\u0030\u0037\u002e\u0034\u0066",_ffa ));return _geb ;};
// AddOverride adds an override content type for a given path name.
func (_aea ContentTypes )AddOverride (path ,contentType string ){if !_cb .HasPrefix (path ,"\u002f"){path ="\u002f"+path ;};if _cb .HasPrefix (contentType ,"\u0068\u0074\u0074\u0070"){_gfe .Log ("\u0063\u006f\u006e\u0074\u0065\u006et\u0020\u0074\u0079p\u0065\u0020\u0027%\u0073\u0027\u0020\u0069\u0073\u0020\u0069\u006e\u0063\u006fr\u0072\u0065\u0063\u0074\u002c m\u0075\u0073\u0074\u0020\u006e\u006f\u0074\u0020\u0073\u0074\u0061\u0072\u0074\u0020\u0077\u0069\u0074\u0068\u0020\u0068\u0074\u0074\u0070",contentType );};for _ ,_afc :=range _aea ._cgg .Override {if _afc .PartNameAttr ==path &&_afc .ContentTypeAttr ==contentType {return ;};};_eda :=_db .NewOverride ();_eda .PartNameAttr =path ;_eda .ContentTypeAttr =contentType ;_aea ._cgg .Override =append (_aea ._cgg .Override ,_eda );};func UtcTimeFormat (t _e .Time )string {return t .Format (_ddd )+"\u0020\u0055\u0054\u0043"};
// Hyperlink is just an appropriately configured relationship.
type Hyperlink Relationship ;
// Modified returns the time that the document was modified.
func (_ecd CoreProperties )Modified ()_e .Time {return _gca (_ecd ._agf .Modified )};
// NewTableWithXfrm makes a new table with a pointer to its parent Xfrm for changing its offset and size.
func NewTableWithXfrm (xfrm *_ggb .CT_Transform2D )*Table {_fcfg :=_ggb .NewTbl ();_fcfg .TblPr =_ggb .NewCT_TableProperties ();return &Table {_fadc :_fcfg ,_ggdg :xfrm };};
// SetLinksUpToDate sets the links up to date flag.
func (_bf AppProperties )SetLinksUpToDate (v bool ){_bf ._ede .LinksUpToDate =_gfe .Bool (v )};func (_bed CustomProperties )SetPropertyAsBlob (name ,blob string ){_gce :=_bed .getNewProperty (name );_gce .Blob =&blob ;_bed .setOrReplaceProperty (_gce );};func (_cdfc CustomProperties )setOrReplaceProperty (_ggdb *_ef .CT_Property ){_cdfc .setPropertyHelper (_ggdb ,true );};func (_eee CustomProperties )SetPropertyAsOstream (name string ,ostream string ){_fee :=_eee .getNewProperty (name );_fee .Ostream =&ostream ;_eee .setOrReplaceProperty (_fee );};
// LastModifiedBy returns the name of the last person to modify the document
func (_bg CoreProperties )LastModifiedBy ()string {if _bg ._agf .LastModifiedBy !=nil {return *_bg ._agf .LastModifiedBy ;};return "";};
// Type returns the type of a relationship.
func (_fbea Relationship )Type ()string {return _fbea ._caf .TypeAttr };
// X returns the inner wrapped XML type.
func (_ega Table )X ()*_ggb .Tbl {return _ega ._fadc };
// RelID returns the relationship ID.
func (_fef ImageRef )RelID ()string {return _fef ._ebb };
// Cells returns an array of row cells.
func (_cfef TableRow )Cells ()[]*_ggb .CT_TableCell {return _cfef ._dgc .Tc };const _dfe ="2\u00300\u0036\u002d\u0030\u0031\u002d\u0030\u0032\u00541\u0035\u003a\u0030\u0034:0\u0035\u005a";func (_fda CustomProperties )SetPropertyAsI4 (name string ,i4 int32 ){_ebf :=_fda .getNewProperty (name );_ebf .I4 =&i4 ;_fda .setOrReplaceProperty (_ebf );};func (_dgeg CustomProperties )SetPropertyAsStorage (name string ,storage string ){_gceb :=_dgeg .getNewProperty (name );_gceb .Storage =&storage ;_dgeg .setOrReplaceProperty (_gceb );};
// Clear removes any existing relationships.
func (_abf Relationships )Clear (){_abf ._deaa .Relationship =nil };
// RemoveOverride removes an override given a path.
func (_cf ContentTypes )RemoveOverride (path string ){if !_cb .HasPrefix (path ,"\u002f"){path ="\u002f"+path ;};for _ab ,_bad :=range _cf ._cgg .Override {if _bad .PartNameAttr ==path {copy (_cf ._cgg .Override [_ab :],_cf ._cgg .Override [_ab +1:]);_cf ._cgg .Override =_cf ._cgg .Override [0:len (_cf ._cgg .Override )-1];};};};const _ddd ="\u0032\u0020\u004aan\u0075\u0061\u0072\u0079\u0020\u0032\u0030\u0030\u0036\u0020\u0061\u0074\u0020\u0031\u0035\u003a\u0030\u0034";
// Rows returns all table rows.
func (_ffbg Table )Rows ()[]*TableRow {_aebf :=_ffbg ._fadc .Tr ;_efca :=[]*TableRow {};for _ ,_abd :=range _aebf {_efca =append (_efca ,&TableRow {_dgc :_abd });};return _efca ;};
// SetWidth sets column width, see measurement package.
func (_aebb TableCol )SetWidth (m _eb .Distance ){_dadc :=_eb .ToEMU (float64 (m ));_aebb ._gea .WAttr =_ggb .ST_Coordinate {ST_CoordinateUnqualified :&_dadc };};
// IsEmpty returns true if there are no relationships.
func (_beg Relationships )IsEmpty ()bool {return _beg ._deaa ==nil ||len (_beg ._deaa .Relationship )==0;};
// Remove removes an existing relationship.
func (_caa Relationships )Remove (rel Relationship )bool {for _fdg ,_efba :=range _caa ._deaa .Relationship {if _efba ==rel ._caf {copy (_caa ._deaa .Relationship [_fdg :],_caa ._deaa .Relationship [_fdg +1:]);_caa ._deaa .Relationship =_caa ._deaa .Relationship [0:len (_caa ._deaa .Relationship )-1];return true ;};};return false ;};
// AppProperties contains properties specific to the document and the
// application that created it.
type AppProperties struct{_ede *_aaea .Properties };func (_gbg CustomProperties )SetPropertyAsUi8 (name string ,ui8 uint64 ){_edeb :=_gbg .getNewProperty (name );_edeb .Ui8 =&ui8 ;_gbg .setOrReplaceProperty (_edeb );};
// SetAuthor records the author of the document.
func (_gb CoreProperties )SetAuthor (s string ){if _gb ._agf .Creator ==nil {_gb ._agf .Creator =&_gfe .XSDAny {XMLName :_c .Name {Local :"\u0064\u0063\u003a\u0063\u0072\u0065\u0061\u0074\u006f\u0072"}};};_gb ._agf .Creator .Data =[]byte (s );};func (_bedc CustomProperties )SetPropertyAsFiletime (name string ,filetime _e .Time ){_beeb :=_bedc .getNewProperty (name );_beeb .Filetime =&filetime ;_bedc .setOrReplaceProperty (_beeb );};func (_deac CustomProperties )SetPropertyAsR4 (name string ,r4 float32 ){_bga :=_deac .getNewProperty (name );_bga .R4 =&r4 ;_deac .setOrReplaceProperty (_bga );};
// Path returns the path to an image file, if any.
func (_edc ImageRef )Path ()string {return _edc ._dcg .Path };
// ContentStatus returns the content status of the document (e.g. "Final", "Draft")
func (_bbb CoreProperties )ContentStatus ()string {if _bbb ._agf .ContentStatus !=nil {return *_bbb ._agf .ContentStatus ;};return "";};
// CustomProperties contains document specific properties.
type CustomProperties struct{_gcaa *_ef .Properties };
// Image is a container for image information. It's used as we need format and
// and size information to use images.
// It contains either the filesystem path to the image, or the image itself.
type Image struct{Size _gg .Point ;Format string ;Path string ;Data *[]byte ;};
// Append appends DocBase part of an office document to another DocBase.
func (_b DocBase )Append (docBase1 DocBase )DocBase {_ce :=docBase1 .ContentTypes .X ();for _ ,_de :=range _ce .Default {_b .ContentTypes .AddDefault (_de .ExtensionAttr ,_de .ContentTypeAttr );};for _ ,_dbd :=range _ce .Override {_b .ContentTypes .AddOverride (_dbd .PartNameAttr ,_dbd .ContentTypeAttr );};_cbc :=_b .AppProperties .X ();_gd :=docBase1 .AppProperties .X ();if _cbc .Pages !=nil {if _gd .Pages !=nil {*_cbc .Pages +=*_gd .Pages ;};}else if _gd .Pages !=nil {_cbc .Pages =_gd .Pages ;};if _cbc .Words !=nil {if _gd .Words !=nil {*_cbc .Words +=*_gd .Words ;};}else if _gd .Words !=nil {_cbc .Words =_gd .Words ;};if _cbc .Characters !=nil {if _gd .Characters !=nil {*_cbc .Characters +=*_gd .Characters ;};}else if _gd .Characters !=nil {_cbc .Characters =_gd .Characters ;};if _cbc .Lines !=nil {if _gd .Lines !=nil {*_cbc .Lines +=*_gd .Lines ;};}else if _gd .Lines !=nil {_cbc .Lines =_gd .Lines ;};if _cbc .Paragraphs !=nil {if _gd .Paragraphs !=nil {*_cbc .Paragraphs +=*_gd .Paragraphs ;};}else if _gd .Paragraphs !=nil {_cbc .Paragraphs =_gd .Paragraphs ;};if _cbc .Notes !=nil {if _gd .Notes !=nil {*_cbc .Notes +=*_gd .Notes ;};}else if _gd .Notes !=nil {_cbc .Notes =_gd .Notes ;};if _cbc .HiddenSlides !=nil {if _gd .HiddenSlides !=nil {*_cbc .HiddenSlides +=*_gd .HiddenSlides ;};}else if _gd .HiddenSlides !=nil {_cbc .HiddenSlides =_gd .HiddenSlides ;};if _cbc .MMClips !=nil {if _gd .MMClips !=nil {*_cbc .MMClips +=*_gd .MMClips ;};}else if _gd .MMClips !=nil {_cbc .MMClips =_gd .MMClips ;};if _cbc .LinksUpToDate !=nil {if _gd .LinksUpToDate !=nil {*_cbc .LinksUpToDate =*_cbc .LinksUpToDate &&*_gd .LinksUpToDate ;};}else if _gd .LinksUpToDate !=nil {_cbc .LinksUpToDate =_gd .LinksUpToDate ;};if _cbc .CharactersWithSpaces !=nil {if _gd .CharactersWithSpaces !=nil {*_cbc .CharactersWithSpaces +=*_gd .CharactersWithSpaces ;};}else if _gd .CharactersWithSpaces !=nil {_cbc .CharactersWithSpaces =_gd .CharactersWithSpaces ;};if _cbc .SharedDoc !=nil {if _gd .SharedDoc !=nil {*_cbc .SharedDoc =*_cbc .SharedDoc ||*_gd .SharedDoc ;};}else if _gd .SharedDoc !=nil {_cbc .SharedDoc =_gd .SharedDoc ;};if _cbc .HyperlinksChanged !=nil {if _gd .HyperlinksChanged !=nil {*_cbc .HyperlinksChanged =*_cbc .HyperlinksChanged ||*_gd .HyperlinksChanged ;};}else if _gd .HyperlinksChanged !=nil {_cbc .HyperlinksChanged =_gd .HyperlinksChanged ;};_cbc .DigSig =nil ;if _cbc .TitlesOfParts ==nil &&_gd .TitlesOfParts !=nil {_cbc .TitlesOfParts =_gd .TitlesOfParts ;};if _cbc .HeadingPairs !=nil {if _gd .HeadingPairs !=nil {_fd :=_cbc .HeadingPairs .Vector ;_gac :=_gd .HeadingPairs .Vector ;_cd :=_fd .Variant ;_bc :=_gac .Variant ;_fdf :=[]*_daf .Variant {};for _bd :=0;_bd < len (_bc );_bd +=2{_fc :=_bc [_bd ].Lpstr ;_cdd :=false ;for _df :=0;_df < len (_cd );_df +=2{_fcb :=_cd [_df ].Lpstr ;if _fcb !=nil &&_fc !=nil &&*_fcb ==*_fc {*_cd [_df +1].I4 =*_cd [_df +1].I4 +*_bc [_bd +1].I4 ;_cdd =true ;break ;};};if !_cdd {_fdf =append (_fdf ,&_daf .Variant {CT_Variant :_daf .CT_Variant {Lpstr :_bc [_bd ].Lpstr }});_fdf =append (_fdf ,&_daf .Variant {CT_Variant :_daf .CT_Variant {I4 :_bc [_bd ].I4 }});};};_cd =append (_cd ,_fdf ...);_fd .SizeAttr =uint32 (len (_cd ));};}else if _gd .HeadingPairs !=nil {_cbc .HeadingPairs =_gd .HeadingPairs ;};if _cbc .HLinks !=nil {if _gd .HLinks !=nil {_dfb :=_cbc .HLinks .Vector ;_eec :=_gd .HLinks .Vector ;_eg :=_dfb .Variant ;_dd :=_eec .Variant ;for _ ,_dc :=range _dd {_dfc :=true ;for _ ,_cdf :=range _eg {if _g .DeepEqual (_cdf ,_dc ){_dfc =false ;break ;};};if _dfc {_eg =append (_eg ,_dc );_dfb .SizeAttr ++;};};};}else if _gd .HLinks !=nil {_cbc .HLinks =_gd .HLinks ;};_dbf :=_b .GetOrCreateCustomProperties ();_dfd :=docBase1 .GetOrCreateCustomProperties ();for _ ,_bde :=range _dfd .PropertiesList (){_dbf .setProperty (_bde );};_b .CustomProperties =_dbf ;_adg :=_b .Rels .X ().Relationship ;for _ ,_gfc :=range docBase1 .Rels .X ().Relationship {_gdb :=true ;for _ ,_fga :=range _adg {if _fga .TargetAttr ==_gfc .TargetAttr &&_fga .TypeAttr ==_gfc .TypeAttr {_gdb =false ;break ;};};if _gdb {_b .Rels .AddRelationship (_gfc .TargetAttr ,_gfc .TypeAttr );};};for _ ,_ed :=range docBase1 .ExtraFiles {_bcf :=_ed .ZipPath ;_ac :=true ;for _ ,_fb :=range _b .ExtraFiles {if _fb .ZipPath ==_bcf {_ac =false ;break ;};};if _ac {_b .ExtraFiles =append (_b .ExtraFiles ,_ed );};};return _b ;};func (_ace CustomProperties )SetPropertyAsI2 (name string ,i2 int16 ){_dge :=_ace .getNewProperty (name );_dge .I2 =&i2 ;_ace .setOrReplaceProperty (_dge );};
// Table represents a table in the document.
type Table struct{_fadc *_ggb .Tbl ;_ggdg *_ggb .CT_Transform2D ;};
// NewCoreProperties constructs a new CoreProperties.
func NewCoreProperties ()CoreProperties {return CoreProperties {_agf :_ge .NewCoreProperties ()}};
// SetTitle records the title of the document.
func (_adbd CoreProperties )SetTitle (s string ){if _adbd ._agf .Title ==nil {_adbd ._agf .Title =&_gfe .XSDAny {XMLName :_c .Name {Local :"\u0064\u0063\u003a\u0074\u0069\u0074\u006c\u0065"}};};_adbd ._agf .Title .Data =[]byte (s );};
func (_dage ImageRef )RelativeWidth (h _e .Distance )_e .Distance {_bacd :=float64 (_dage .Size ().X )/float64 (_dage .Size ().Y );return h *_e .Distance (_bacd );};
// CopyOverride copies override content type for a given `path` and puts it with a path `newPath`.
func (_efbe ContentTypes )CopyOverride (path ,newPath string ){if !_cb .HasPrefix (path ,"\u002f"){path ="\u002f"+path ;};if !_cb .HasPrefix (newPath ,"\u002f"){newPath ="\u002f"+newPath ;};for _cfe :=range _efbe ._cgg .Override {if _efbe ._cgg .Override [_cfe ].PartNameAttr ==path {_bfe :=*_efbe ._cgg .Override [_cfe ];_bfe .PartNameAttr =newPath ;_efbe ._cgg .Override =append (_efbe ._cgg .Override ,&_bfe );};};};
// FindRIDForN returns the relationship ID for the i'th relationship of type t.
func (_aaef Relationships )FindRIDForN (i int ,t string )string {for _ ,_agag :=range _aaef ._deaa .CT_Relationships .Relationship {if _agag .TypeAttr ==t {if i ==0{return _agag .IdAttr ;};i --;};};return "";};
// SetTarget set the target (path) of a relationship.
func (_ebaa Relationship )SetTarget (s string ){_ebaa ._caf .TargetAttr =s };
// SetLanguage records the language of the document.
func (_egb CoreProperties )SetLanguage (s string ){_egb ._agf .Language =&_gfe .XSDAny {XMLName :_c .Name {Local :"d\u0063\u003a\u006c\u0061\u006e\u0067\u0075\u0061\u0067\u0065"}};_egb ._agf .Language .Data =[]byte (s );};
// Relationships returns a slice of all of the relationships.
func (_dag Relationships )Relationships ()[]Relationship {_ccd :=[]Relationship {};for _ ,_decf :=range _dag ._deaa .Relationship {_ccd =append (_ccd ,Relationship {_caf :_decf });};return _ccd ;};
// NewContentTypes returns a wrapper around a newly constructed content-types.
func NewContentTypes ()ContentTypes {_dfdb :=ContentTypes {_cgg :_db .NewTypes ()};_dfdb .AddDefault ("\u0078\u006d\u006c","\u0061p\u0070l\u0069\u0063\u0061\u0074\u0069\u006f\u006e\u002f\u0078\u006d\u006c");_dfdb .AddDefault ("\u0072\u0065\u006c\u0073","\u0061\u0070\u0070\u006c\u0069\u0063a\u0074\u0069\u006fn\u002f\u0076\u006ed\u002e\u006f\u0070\u0065\u006e\u0078\u006d\u006c\u0066\u006fr\u006d\u0061\u0074\u0073\u002dpa\u0063\u006b\u0061\u0067\u0065\u002e\u0072\u0065\u006c\u0061\u0074\u0069\u006f\u006e\u0073\u0068\u0069\u0070\u0073\u002b\u0078\u006d\u006c");_dfdb .AddDefault ("\u0070\u006e\u0067","\u0069m\u0061\u0067\u0065\u002f\u0070\u006eg");_dfdb .AddDefault ("\u006a\u0070\u0065\u0067","\u0069\u006d\u0061\u0067\u0065\u002f\u006a\u0070\u0065\u0067");_dfdb .AddDefault ("\u006a\u0070\u0067","\u0069m\u0061\u0067\u0065\u002f\u006a\u0070g");_dfdb .AddDefault ("\u0077\u006d\u0066","i\u006d\u0061\u0067\u0065\u002f\u0078\u002d\u0077\u006d\u0066");_dfdb .AddOverride ("\u002fd\u006fc\u0050\u0072\u006f\u0070\u0073/\u0063\u006fr\u0065\u002e\u0078\u006d\u006c","\u0061\u0070\u0070\u006c\u0069\u0063\u0061\u0074\u0069\u006f\u006e\u002f\u0076\u006e\u0064\u002e\u006f\u0070\u0065\u006ex\u006d\u006c\u0066\u006f\u0072\u006d\u0061\u0074\u0073-\u0070\u0061\u0063\u006b\u0061\u0067\u0065\u002e\u0063\u006f\u0072\u0065\u002dp\u0072\u006f\u0070\u0065\u0072\u0074i\u0065\u0073\u002bx\u006d\u006c");_dfdb .AddOverride ("\u002f\u0064\u006f\u0063\u0050\u0072\u006f\u0070\u0073\u002f\u0061\u0070p\u002e\u0078\u006d\u006c","a\u0070\u0070l\u0069\u0063\u0061\u0074\u0069\u006f\u006e\u002f\u0076\u006e\u0064\u002e\u006f\u0070\u0065\u006e\u0078\u006d\u006c\u0066o\u0072\u006d\u0061\u0074\u0073\u002d\u006f\u0066\u0066\u0069\u0063\u0065\u0064\u006f\u0063\u0075m\u0065\u006e\u0074\u002e\u0065\u0078\u0074\u0065\u006e\u0064\u0065\u0064\u002dp\u0072\u006f\u0070\u0065\u0072\u0074\u0069\u0065\u0073\u002b\u0078m\u006c");return _dfdb ;};
// AddCustomRelationships adds relationships related to custom properties to the document.
func (_aec *DocBase )AddCustomRelationships (){_aec .ContentTypes .AddOverride ("/\u0064o\u0063\u0050\u0072\u006f\u0070\u0073\u002f\u0063u\u0073\u0074\u006f\u006d.x\u006d\u006c","\u0061\u0070\u0070\u006c\u0069\u0063a\u0074\u0069\u006f\u006e\u002fv\u006e\u0064\u002e\u006f\u0070\u0065n\u0078\u006d\u006c\u0066\u006fr\u006d\u0061\u0074\u0073\u002d\u006f\u0066\u0066\u0069\u0063\u0065\u0064o\u0063\u0075\u006d\u0065\u006e\u0074\u002e\u0063\u0075\u0073\u0074\u006f\u006d\u002d\u0070r\u006f\u0070\u0065\u0072\u0074\u0069\u0065\u0073+\u0078\u006d\u006c");_aec .Rels .AddRelationship ("\u0064\u006f\u0063\u0050ro\u0070\u0073\u002f\u0063\u0075\u0073\u0074\u006f\u006d\u002e\u0078\u006d\u006c",_gfe .CustomPropertiesType );};func (_aeb CustomProperties )SetPropertyAsClsid (name string ,clsid string ){_dae :=_aeb .getNewProperty (name );_dae .Clsid =&clsid ;_aeb .setOrReplaceProperty (_dae );};
// NewRelationshipsCopy creates a new relationships wrapper as a copy of passed in instance.
func NewRelationshipsCopy (rels Relationships )Relationships {_fgg :=*rels ._deaa ;return Relationships {_deaa :&_fgg };};func (_bgf CustomProperties )SetPropertyAsCy (name string ,cy string ){_eddd :=_bgf .getNewProperty (name );_eddd .Cy =&cy ;_bgf .setOrReplaceProperty (_eddd );};
// ID returns the ID of a relationship.
func (_cfae Relationship )ID ()string {return _cfae ._caf .IdAttr };func (_cebf TableRow )addCell ()*_ggb .CT_TableCell {_cbcc :=_ggb .NewCT_TableCell ();_cebf ._dgc .Tc =append (_cebf ._dgc .Tc ,_cbcc );return _cbcc ;};
// WriteExtraFiles writes the extra files to the zip package.
func (_eaf *DocBase )WriteExtraFiles (z *_af .Writer )error {for _ ,_dcc :=range _eaf .ExtraFiles {if _ecdb :=_ec .AddFileFromDisk (z ,_dcc .ZipPath ,_dcc .DiskPath );_ecdb !=nil {return _ecdb ;};};return nil ;};
// AddDefault registers a default content type for a given file extension.
func (_fbe ContentTypes )AddDefault (fileExtension string ,contentType string ){fileExtension =_cb .ToLower (fileExtension );for _ ,_bcfe :=range _fbe ._cgg .Default {if _bcfe .ExtensionAttr ==fileExtension &&_bcfe .ContentTypeAttr ==contentType {return ;};};_eecc :=_db .NewDefault ();_eecc .ExtensionAttr =fileExtension ;_eecc .ContentTypeAttr =contentType ;_fbe ._cgg .Default =append (_fbe ._cgg .Default ,_eecc );};
// SetModified sets the time that the document was modified.
func (_gaa CoreProperties )SetModified (t _e .Time ){_gaa ._agf .Modified =_cab (t ,"\u0064\u0063t\u0065\u0072\u006ds\u003a\u006d\u006f\u0064\u0069\u0066\u0069\u0065\u0064");};
// TableRow represents a row in a table.
type TableRow struct{_dgc *_ggb .CT_TableRow };
// SetDescription records the description of the document.
func (_bfa CoreProperties )SetDescription (s string ){if _bfa ._agf .Description ==nil {_bfa ._agf .Description =&_gfe .XSDAny {XMLName :_c .Name {Local :"\u0064\u0063\u003a\u0064\u0065\u0073\u0063\u0072\u0069p\u0074\u0069\u006f\u006e"}};};_bfa ._agf .Description .Data =[]byte (s );};func (_ead CustomProperties )SetPropertyAsI1 (name string ,i1 int8 ){_ced :=_ead .getNewProperty (name );_ced .I1 =&i1 ;_ead .setOrReplaceProperty (_ced );};func _cab (_cde _e .Time ,_fbec string )*_gfe .XSDAny {_agfc :=&_gfe .XSDAny {XMLName :_c .Name {Local :_fbec }};_agfc .Attrs =append (_agfc .Attrs ,_c .Attr {Name :_c .Name {Local :"\u0078\u0073\u0069\u003a\u0074\u0079\u0070\u0065"},Value :"\u0064\u0063\u0074\u0065\u0072\u006d\u0073\u003a\u00573\u0043\u0044\u0054\u0046"});_agfc .Attrs =append (_agfc .Attrs ,_c .Attr {Name :_c .Name {Local :"\u0078m\u006c\u006e\u0073\u003a\u0078\u0073i"},Value :"\u0068\u0074\u0074\u0070\u003a/\u002f\u0077\u0077\u0077\u002e\u0077\u0033\u002e\u006f\u0072\u0067\u002f\u00320\u0030\u0031\u002f\u0058\u004d\u004c\u0053\u0063\u0068\u0065\u006d\u0061\u002d\u0069\u006e\u0073\u0074\u0061\u006e\u0063\u0065"});_agfc .Attrs =append (_agfc .Attrs ,_c .Attr {Name :_c .Name {Local :"\u0078\u006d\u006c\u006e\u0073\u003a\u0064\u0063\u0074\u0065\u0072\u006d\u0073"},Value :"\u0068t\u0074\u0070\u003a\u002f/\u0070\u0075\u0072\u006c\u002eo\u0072g\u002fd\u0063\u002f\u0074\u0065\u0072\u006d\u0073/"});_agfc .Data =[]byte (_cde .Format (_dfe ));return _agfc ;};func (_cfa CustomProperties )SetPropertyAsDecimal (name string ,decimal float64 ){_efag :=_cfa .getNewProperty (name );_efag .Decimal =&decimal ;_cfa .setOrReplaceProperty (_efag );};
// X returns the inner wrapped XML type.
func (_edag TableStyles )X ()*_ggb .TblStyleLst {return _edag ._gaed };const _gec =2021;
// Data returns the data of an image file, if any.
func (_cge ImageRef )Data ()*[]byte {return _cge ._dcg .Data };
func (_abc ContentTypes )CopyOverride (path ,newPath string ){if !_dg .HasPrefix (path ,"\u002f"){path ="\u002f"+path ;};if !_dg .HasPrefix (newPath ,"\u002f"){newPath ="\u002f"+newPath ;};for _dgd :=range _abc ._bacb .Override {if _abc ._bacb .Override [_dgd ].PartNameAttr ==path {_fae :=*_abc ._bacb .Override [_dgd ];_fae .PartNameAttr =newPath ;_abc ._bacb .Override =append (_abc ._bacb .Override ,&_fae );};};};func (_eebe CustomProperties )setOrReplaceProperty (_eca *_eg .CT_Property ){_eebe .setPropertyHelper (_eca ,true );};
// SetCreated sets the time that the document was created.
func (_ecf CoreProperties )SetCreated (t _e .Time ){_ecf ._agf .Created =_cab (t ,"\u0064c\u0074e\u0072\u006d\u0073\u003a\u0063\u0072\u0065\u0061\u0074\u0065\u0064");};
func (_dag CoreProperties )SetCreated (t _ba .Time ){_dag ._baega .Created =_beb (t ,"\u0064c\u0074e\u0072\u006d\u0073\u003a\u0063\u0072\u0065\u0061\u0074\u0065\u0064");};
// PropertiesList returns the list of all custom properties of the document.
func (_ddc CustomProperties )PropertiesList ()[]*_ef .CT_Property {return _ddc ._gcaa .Property };func (_ffed CustomProperties )SetPropertyAsNull (name string ){_cac :=_ffed .getNewProperty (name );_cac .Null =_daf .NewNull ();_ffed .setOrReplaceProperty (_cac );};
// FindRIDForN returns the relationship ID for the i'th relationship of type t.
func (_cdda Relationships )FindRIDForN (i int ,t string )string {for _ ,_dff :=range _cdda ._gfd .CT_Relationships .Relationship {if _dff .TypeAttr ==t {if i ==0{return _dff .IdAttr ;};i --;};};return "";};func (_cee CustomProperties )SetPropertyAsBool (name string ,b bool ){_bcd :=_cee .getNewProperty (name );_bcd .Bool =&b ;_cee .setOrReplaceProperty (_bcd );};func (_dbf CustomProperties )SetPropertyAsR8 (name string ,r8 float64 ){_agc :=_dbf .getNewProperty (name );_agc .R8 =&r8 ;_dbf .setOrReplaceProperty (_agc );};
// GetImageBytesByTarget returns Image object with Data bytes read from its target.
func (_cdfb *DocBase )GetImageBytesByTarget (target string )(Image ,error ){if target !=""{target ="\u0077\u006f\u0072d\u002f"+target ;for _ ,_ecc :=range _cdfb .Images {if _ecc .Target ()==target {return ImageFromStorage (_ecc .Path ());};};};return Image {},_ebd ;};
// GetOrCreateCustomProperties returns the custom properties of the document (and if they not exist yet, creating them first).
func (_efd *DocBase )GetOrCreateCustomProperties ()CustomProperties {if _efd .CustomProperties .X ()==nil {_efd .CreateCustomProperties ();};return _efd .CustomProperties ;};
// SetDocSecurity sets the document security flag.
func (_dg AppProperties )SetDocSecurity (v int32 ){_dg ._ede .DocSecurity =_gfe .Int32 (v )};
// Application returns the name of the application that created the document.
// For unioffice created documents, it defaults to github.com/unidoc/unioffice
func (_bcfg AppProperties )Application ()string {if _bcfg ._ede .Application !=nil {return *_bcfg ._ede .Application ;};return "";};
// Relationship is a relationship within a .rels file.
type Relationship struct{_caf *_aae .Relationship };
// SetLastModifiedBy records the last person to modify the document.
func (_cggf CoreProperties )SetLastModifiedBy (s string ){_cggf ._agf .LastModifiedBy =&s };func (_fge CustomProperties )setPropertyHelper (_ddf *_ef .CT_Property ,_be bool ){_dbff :=_fge .GetPropertyByName (*_ddf .NameAttr );if (_dbff ==CustomProperty {}){_fge ._gcaa .Property =append (_fge ._gcaa .Property ,_ddf );}else if _be {_ddf .FmtidAttr =_dbff ._ffb .FmtidAttr ;if _dbff ._ffb .PidAttr ==0{_ddf .PidAttr =_dbff ._ffb .PidAttr ;};_ddf .LinkTargetAttr =_dbff ._ffb .LinkTargetAttr ;*_dbff ._ffb =*_ddf ;};};
// CopyRelationship copies the relationship.
func (_gfeg Relationships )CopyRelationship (idAttr string )(Relationship ,bool ){for _eaab :=range _gfeg ._deaa .Relationship {if _gfeg ._deaa .Relationship [_eaab ].IdAttr ==idAttr {_eag :=*_gfeg ._deaa .Relationship [_eaab ];_ded :=len (_gfeg ._deaa .Relationship )+1;_dbdd :=map[string ]struct{}{};for _ ,_dbfd :=range _gfeg ._deaa .Relationship {_dbdd [_dbfd .IdAttr ]=struct{}{};};for _ ,_adf :=_dbdd [_ee .Sprintf ("\u0072\u0049\u0064%\u0064",_ded )];_adf ;_ ,_adf =_dbdd [_ee .Sprintf ("\u0072\u0049\u0064%\u0064",_ded )]{_ded ++;};_eag .IdAttr =_ee .Sprintf ("\u0072\u0049\u0064%\u0064",_ded );_gfeg ._deaa .Relationship =append (_gfeg ._deaa .Relationship ,&_eag );return Relationship {_caf :&_eag },true ;};};return Relationship {},false ;};
// GetTargetByRelId returns a target path with the associated relation ID.
func (_fdfb Relationships )GetTargetByRelId (idAttr string )string {for _ ,_cca :=range _fdfb ._deaa .Relationship {if _cca .IdAttr ==idAttr {return _cca .TargetAttr ;};};return "";};
// SetOffsetX sets horizontal offset of a table in distance units (see measurement package).
func (_cfc Table )SetOffsetX (offX float64 ){if _cfc ._ggdg .Off ==nil {_cfc ._ggdg .Off =_ggb .NewCT_Point2D ();_abfb :=int64 (0);_cfc ._ggdg .Off .YAttr =_ggb .ST_Coordinate {ST_CoordinateUnqualified :&_abfb };};_agaa :=_eb .ToEMU (offX );_cfc ._ggdg .Off .XAttr =_ggb .ST_Coordinate {ST_CoordinateUnqualified :&_agaa };};func (_ade CustomProperties )SetPropertyAsUi4 (name string ,ui4 uint32 ){_gff :=_ade .getNewProperty (name );_gff .Ui4 =&ui4 ;_ade .setOrReplaceProperty (_gff );};
// X returns the inner wrapped XML type.
func (_fe AppProperties )X ()*_aaea .Properties {return _fe ._ede };const _eed =30;
// Title returns the Title of the document
func (_ggf CoreProperties )Title ()string {if _ggf ._agf .Title !=nil {return string (_ggf ._agf .Title .Data );};return "";};
// TableStyles contains document specific properties.
type TableStyles struct{_gaed *_ggb .TblStyleLst };
// Theme is a drawingml theme.
type Theme struct{_cffd *_ggb .Theme };
// SetApplicationVersion sets the version of the application that created the
// document. Per MS, the verison string mut be in the form 'XX.YYYY'.
func (_ggbe AppProperties )SetApplicationVersion (s string ){_ggbe ._ede .AppVersion =&s };
// Size returns the size of an image
func (_bag ImageRef )Size ()_gg .Point {return _bag ._dcg .Size };func (_gebc CustomProperties )SetPropertyAsError (name string ,error string ){_cggd :=_gebc .getNewProperty (name );_cggd .Error =&error ;_gebc .setOrReplaceProperty (_cggd );};var _ebd =_a .New ("\u0069\u006d\u0061\u0067\u0065\u0020\u006e\u006f\u0074\u0020\u0066o\u0075\u006e\u0064\u0020\u0069\u006e\u0020\u0073\u0074\u006fr\u0061\u0067\u0065");
// SetTarget changes the target attribute of the image reference (e.g. in the case of the creation of the reference or if the image which the reference is related to was moved from one location to another).
func (_fgc *ImageRef )SetTarget (target string ){_fgc ._dbcd =target };
// Pages returns total number of pages which are saved by the text editor which produced the document.
// For unioffice created documents, it is 0.
func (_ae AppProperties )Pages ()int32 {if _ae ._ede .Pages !=nil {return *_ae ._ede .Pages ;};return 0;};
// DocBase is the type embedded in in the Document/Workbook/Presentation types
// that contains members common to all.
type DocBase struct{ContentTypes ContentTypes ;AppProperties AppProperties ;Rels Relationships ;CoreProperties CoreProperties ;CustomProperties CustomProperties ;Thumbnail _gg .Image ;Images []ImageRef ;ExtraFiles []ExtraFile ;TmpPath string ;};
// X returns the inner wrapped XML type.
func (_dab CustomProperties )X ()*_ef .Properties {return _dab ._gcaa };
// Category returns the category of the document
func (_dbe CoreProperties )Category ()string {if _dbe ._agf .Category !=nil {return *_dbe ._agf .Category ;};return "";};
// NewTableStyles constructs a new TableStyles.
func NewTableStyles ()TableStyles {return TableStyles {_gaed :_ggb .NewTblStyleLst ()}};
// MakeImageRef constructs an image reference which is a reference to a
// particular image file inside a document. The same image can be used multiple
// times in a document by re-use the ImageRef.
func MakeImageRef (img Image ,d *DocBase ,rels Relationships )ImageRef {return ImageRef {_dcg :img ,_gae :d ,_fad :rels };};
// ImageRef is a reference to an image within a document.
type ImageRef struct{_gae *DocBase ;_fad Relationships ;_dcg Image ;_ebb string ;_dbcd string ;};func (_fgdf CustomProperties )SetPropertyAsLpstr (name string ,lpstr string ){_afcd :=_fgdf .getNewProperty (name );_afcd .Lpstr =&lpstr ;_fgdf .setOrReplaceProperty (_afcd );};
// Created returns the time that the document was created.
func (_cbb CoreProperties )Created ()_e .Time {return _gca (_cbb ._agf .Created )};func (_efdd Relationship )String ()string {return _ee .Sprintf ("\u007b\u0049\u0044\u003a \u0025\u0073\u0020\u0054\u0061\u0072\u0067\u0065\u0074\u003a \u0025s\u0020\u0054\u0079\u0070\u0065\u003a\u0020%\u0073\u007d",_efdd .ID (),_efdd .Target (),_efdd .Type ());};
// Properties returns table properties.
func (_adc Table )Properties ()*_ggb .CT_TableProperties {return _adc ._fadc .TblPr };
// ExtraFile is an unsupported file type extracted from, or to be written to a
// zip package
type ExtraFile struct{ZipPath string ;DiskPath string ;};func (_beee CustomProperties )SetPropertyAsR8 (name string ,r8 float64 ){_dbab :=_beee .getNewProperty (name );_dbab .R8 =&r8 ;_beee .setOrReplaceProperty (_dbab );};func init (){_aa .SetAsStorage ()};func (_bff CustomProperties )SetPropertyAsVector (name string ,vector *_daf .Vector ){_feb :=_bff .getNewProperty (name );_feb .Vector =vector ;_bff .setOrReplaceProperty (_feb );};
// AddHyperlink adds an external hyperlink relationship.
func (_agb Relationships )AddHyperlink (target string )Hyperlink {_fca :=_agb .AddRelationship (target ,_gfe .HyperLinkType );_fca ._caf .TargetModeAttr =_aae .ST_TargetModeExternal ;return Hyperlink (_fca );};
// Description returns the description of the document
func (_bbc CoreProperties )Description ()string {if _bbc ._agf .Description !=nil {return string (_bbc ._agf .Description .Data );};return "";};const Version ="\u0031\u002e\u0031\u0030\u002e\u0030";var ReleasedAt =_e .Date (_gec ,_edec ,_gffb ,_cef ,_eed ,0,0,_e .UTC );const _gffb =23;
// Company returns the name of the company that created the document.
// For unioffice created documents, it defaults to github.com/unidoc/unioffice
func (_edf AppProperties )Company ()string {if _edf ._ede .Company !=nil {return *_edf ._ede .Company ;};return "";};const _cef =19;
// SetContentStatus records the content status of the document.
func (_dca CoreProperties )SetContentStatus (s string ){_dca ._agf .ContentStatus =&s };
// SetCategory records the category of the document.
func (_cc CoreProperties )SetCategory (s string ){_cc ._agf .Category =&s };func (_cgd CustomProperties )SetPropertyAsI8 (name string ,i8 int64 ){_eac :=_cgd .getNewProperty (name );_eac .I8 =&i8 ;_cgd .setOrReplaceProperty (_eac );};
// EnsureOverride ensures that an override for the given path exists, adding it if necessary
func (_dfbf ContentTypes )EnsureOverride (path ,contentType string ){for _ ,_bcb :=range _dfbf ._cgg .Override {if _bcb .PartNameAttr ==path {if _cb .HasPrefix (contentType ,"\u0068\u0074\u0074\u0070"){_gfe .Log ("\u0063\u006f\u006e\u0074\u0065\u006et\u0020\u0074\u0079p\u0065\u0020\u0027%\u0073\u0027\u0020\u0069\u0073\u0020\u0069\u006e\u0063\u006fr\u0072\u0065\u0063\u0074\u002c m\u0075\u0073\u0074\u0020\u006e\u006f\u0074\u0020\u0073\u0074\u0061\u0072\u0074\u0020\u0077\u0069\u0074\u0068\u0020\u0068\u0074\u0074\u0070",contentType );};_bcb .ContentTypeAttr =contentType ;return ;};};_dfbf .AddOverride (path ,contentType );};
// SetStyle assigns TableStyle to a table.
func (_gbf Table )SetStyle (style *_ggb .CT_TableStyle ){if _gbf ._fadc .TblPr ==nil {_gbf ._fadc .TblPr =_ggb .NewCT_TableProperties ();};if _gbf ._fadc .TblPr .Choice ==nil {_gbf ._fadc .TblPr .Choice =_ggb .NewCT_TablePropertiesChoice ();};_gbf ._fadc .TblPr .Choice .TableStyle =style ;};
// Target returns the target attrubute of the image reference (a path where the image file is located in the document structure).
func (_gddd *ImageRef )Target ()string {return _gddd ._dbcd };func (_cec CustomProperties )SetPropertyAsOblob (name ,oblob string ){_adbg :=_cec .getNewProperty (name );_adbg .Oblob =&oblob ;_cec .setOrReplaceProperty (_adbg );};
// NewTheme constructs a new theme.
func NewTheme ()Theme {return Theme {_ggb .NewTheme ()}};func (_eae CustomProperties )SetPropertyAsUint (name string ,ui uint ){_dad :=_eae .getNewProperty (name );_edad :=uint32 (ui );_dad .Uint =&_edad ;_eae .setOrReplaceProperty (_dad );};
// TblStyle returns the TblStyle property.
func (_gcg TableStyles )TblStyle ()[]*_ggb .CT_TableStyle {return _gcg ._gaed .TblStyle };
// CreateCustomProperties creates the custom properties of the document.
func (_fddc *DocBase )CreateCustomProperties (){_fddc .CustomProperties =NewCustomProperties ();_fddc .AddCustomRelationships ();};func (_beb CustomProperties )SetPropertyAsUi1 (name string ,ui1 uint8 ){_bbd :=_beb .getNewProperty (name );_bbd .Ui1 =&ui1 ;_beb .setOrReplaceProperty (_bbd );};
// Properties returns table properties.
func (_eea Table )Grid ()*_ggb .CT_TableGrid {return _eea ._fadc .TblGrid };
// X returns the inner wrapped XML type.
func (_fgd CoreProperties )X ()*_ge .CoreProperties {return _fgd ._agf };
// X returns the underlying raw XML data.
func (_aga Relationships )X ()*_aae .Relationships {return _aga ._deaa };
// Target returns the target (path) of a relationship.
func (_fdaf Relationship )Target ()string {return _fdaf ._edd .TargetAttr };
// SetApplication sets the name of the application that created the document.
func (_bb AppProperties )SetApplication (s string ){_bb ._ede .Application =&s };
func (_dfg AppProperties )SetApplication (s string ){_dfg ._aff .Application =&s };const _dcb =31;
// AddRow adds a row to a table.
func (_egd Table )AddRow ()*TableRow {_fdb :=_ggb .NewCT_TableRow ();for _cfgc :=0;_cfgc < len (_egd ._fadc .TblGrid .GridCol );_cfgc ++{_fdb .Tc =append (_fdb .Tc ,_ggb .NewCT_TableCell ());};_egd ._fadc .Tr =append (_egd ._fadc .Tr ,_fdb );return &TableRow {_dgc :_fdb };};const _edec =4;
// X returns the inner wrapped XML type.
func (_dea AppProperties )X ()*_fa .Properties {return _dea ._aff };func (_egec CustomProperties )SetPropertyAsCy (name string ,cy string ){_ddb :=_egec .getNewProperty (name );_ddb .Cy =&cy ;_egec .setOrReplaceProperty (_ddb );};func (_bbgc CustomProperties )SetPropertyAsUi8 (name string ,ui8 uint64 ){_fcee :=_bbgc .getNewProperty (name );_fcee .Ui8 =&ui8 ;_bbgc .setOrReplaceProperty (_fcee );};func (_fce CustomProperties )SetPropertyAsUi4 (name string ,ui4 uint32 ){_def :=_fce .getNewProperty (name );_def .Ui4 =&ui4 ;_fce .setOrReplaceProperty (_def );};
// X returns the inner raw content types.
func (_efb ContentTypes )X ()*_db .Types {return _efb ._cgg };
// Type returns the type of a relationship.
func (_bde Relationship )Type ()string {return _bde ._edd .TypeAttr };
// Append appends DocBase part of an office document to another DocBase.
func (_ec DocBase )Append (docBase1 DocBase )DocBase {_ae :=docBase1 .ContentTypes .X ();for _ ,_af :=range _ae .Default {_ec .ContentTypes .AddDefault (_af .ExtensionAttr ,_af .ContentTypeAttr );};for _ ,_bg :=range _ae .Override {_ec .ContentTypes .AddOverride (_bg .PartNameAttr ,_bg .ContentTypeAttr );};_ad :=_ec .AppProperties .X ();_ege :=docBase1 .AppProperties .X ();if _ad .Pages !=nil {if _ege .Pages !=nil {*_ad .Pages +=*_ege .Pages ;};}else if _ege .Pages !=nil {_ad .Pages =_ege .Pages ;};if _ad .Words !=nil {if _ege .Words !=nil {*_ad .Words +=*_ege .Words ;};}else if _ege .Words !=nil {_ad .Words =_ege .Words ;};if _ad .Characters !=nil {if _ege .Characters !=nil {*_ad .Characters +=*_ege .Characters ;};}else if _ege .Characters !=nil {_ad .Characters =_ege .Characters ;};if _ad .Lines !=nil {if _ege .Lines !=nil {*_ad .Lines +=*_ege .Lines ;};}else if _ege .Lines !=nil {_ad .Lines =_ege .Lines ;};if _ad .Paragraphs !=nil {if _ege .Paragraphs !=nil {*_ad .Paragraphs +=*_ege .Paragraphs ;};}else if _ege .Paragraphs !=nil {_ad .Paragraphs =_ege .Paragraphs ;};if _ad .Notes !=nil {if _ege .Notes !=nil {*_ad .Notes +=*_ege .Notes ;};}else if _ege .Notes !=nil {_ad .Notes =_ege .Notes ;};if _ad .HiddenSlides !=nil {if _ege .HiddenSlides !=nil {*_ad .HiddenSlides +=*_ege .HiddenSlides ;};}else if _ege .HiddenSlides !=nil {_ad .HiddenSlides =_ege .HiddenSlides ;};if _ad .MMClips !=nil {if _ege .MMClips !=nil {*_ad .MMClips +=*_ege .MMClips ;};}else if _ege .MMClips !=nil {_ad .MMClips =_ege .MMClips ;};if _ad .LinksUpToDate !=nil {if _ege .LinksUpToDate !=nil {*_ad .LinksUpToDate =*_ad .LinksUpToDate &&*_ege .LinksUpToDate ;};}else if _ege .LinksUpToDate !=nil {_ad .LinksUpToDate =_ege .LinksUpToDate ;};if _ad .CharactersWithSpaces !=nil {if _ege .CharactersWithSpaces !=nil {*_ad .CharactersWithSpaces +=*_ege .CharactersWithSpaces ;};}else if _ege .CharactersWithSpaces !=nil {_ad .CharactersWithSpaces =_ege .CharactersWithSpaces ;};if _ad .SharedDoc !=nil {if _ege .SharedDoc !=nil {*_ad .SharedDoc =*_ad .SharedDoc ||*_ege .SharedDoc ;};}else if _ege .SharedDoc !=nil {_ad .SharedDoc =_ege .SharedDoc ;};if _ad .HyperlinksChanged !=nil {if _ege .HyperlinksChanged !=nil {*_ad .HyperlinksChanged =*_ad .HyperlinksChanged ||*_ege .HyperlinksChanged ;};}else if _ege .HyperlinksChanged !=nil {_ad .HyperlinksChanged =_ege .HyperlinksChanged ;};_ad .DigSig =nil ;if _ad .TitlesOfParts ==nil &&_ege .TitlesOfParts !=nil {_ad .TitlesOfParts =_ege .TitlesOfParts ;};if _ad .HeadingPairs !=nil {if _ege .HeadingPairs !=nil {_ee :=_ad .HeadingPairs .Vector ;_gc :=_ege .HeadingPairs .Vector ;_cc :=_ee .Variant ;_da :=_gc .Variant ;_gf :=[]*_de .Variant {};for _cd :=0;_cd < len (_da );_cd +=2{_fg :=_da [_cd ].Lpstr ;_aef :=false ;for _ecd :=0;_ecd < len (_cc );_ecd +=2{_ccf :=_cc [_ecd ].Lpstr ;if _ccf !=nil &&_fg !=nil &&*_ccf ==*_fg {*_cc [_ecd +1].I4 =*_cc [_ecd +1].I4 +*_da [_cd +1].I4 ;_aef =true ;break ;};};if !_aef {_gf =append (_gf ,&_de .Variant {CT_Variant :_de .CT_Variant {Lpstr :_da [_cd ].Lpstr }});_gf =append (_gf ,&_de .Variant {CT_Variant :_de .CT_Variant {I4 :_da [_cd ].I4 }});};};_cc =append (_cc ,_gf ...);_ee .SizeAttr =uint32 (len (_cc ));};}else if _ege .HeadingPairs !=nil {_ad .HeadingPairs =_ege .HeadingPairs ;};if _ad .HLinks !=nil {if _ege .HLinks !=nil {_fdf :=_ad .HLinks .Vector ;_bed :=_ege .HLinks .Vector ;_fe :=_fdf .Variant ;_fef :=_bed .Variant ;for _ ,_eef :=range _fef {_agf :=true ;for _ ,_ab :=range _fe {if _f .DeepEqual (_ab ,_eef ){_agf =false ;break ;};};if _agf {_fe =append (_fe ,_eef );_fdf .SizeAttr ++;};};};}else if _ege .HLinks !=nil {_ad .HLinks =_ege .HLinks ;};_gd :=_ec .GetOrCreateCustomProperties ();_bea :=docBase1 .GetOrCreateCustomProperties ();for _ ,_caa :=range _bea .PropertiesList (){_gd .setProperty (_caa );};_ec .CustomProperties =_gd ;_bae :=_ec .Rels .X ().Relationship ;for _ ,_adf :=range docBase1 .Rels .X ().Relationship {_abe :=true ;for _ ,_bgf :=range _bae {if _bgf .TargetAttr ==_adf .TargetAttr &&_bgf .TypeAttr ==_adf .TypeAttr {_abe =false ;break ;};};if _abe {_ec .Rels .AddRelationship (_adf .TargetAttr ,_adf .TypeAttr );};};for _ ,_fb :=range docBase1 .ExtraFiles {_baeg :=_fb .ZipPath ;_bac :=true ;for _ ,_afc :=range _ec .ExtraFiles {if _afc .ZipPath ==_baeg {_bac =false ;break ;};};if _bac {_ec .ExtraFiles =append (_ec .ExtraFiles ,_fb );};};return _ec ;};
// NewRelationshipsCopy creates a new relationships wrapper as a copy of passed in instance.
func NewRelationshipsCopy (rels Relationships )Relationships {_bdae :=*rels ._gfd ;return Relationships {_gfd :&_bdae };};func (_cga CustomProperties )SetPropertyAsArray (name string ,array *_de .Array ){_gfa :=_cga .getNewProperty (name );_gfa .Array =array ;_cga .setOrReplaceProperty (_gfa );};func (_fgag CustomProperties )SetPropertyAsBstr (name string ,bstr string ){_gfad :=_fgag .getNewProperty (name );_gfad .Bstr =&bstr ;_fgag .setOrReplaceProperty (_gfad );};
// ContentStatus returns the content status of the document (e.g. "Final", "Draft")
func (_baf CoreProperties )ContentStatus ()string {if _baf ._baega .ContentStatus !=nil {return *_baf ._baega .ContentStatus ;};return "";};
// Relationships represents a .rels file.
type Relationships struct{_gfd *_bb .Relationships };
// ImageRef is a reference to an image within a document.
type ImageRef struct{_bfc *DocBase ;_abcd Relationships ;_gdg Image ;_fefg string ;_dda string ;};
// SetCategory records the category of the document.
func (_affg CoreProperties )SetCategory (s string ){_affg ._baega .Category =&s };
// SetTarget set the target (path) of a relationship.
func (_cef Relationship )SetTarget (s string ){_cef ._edd .TargetAttr =s };const _geg =2021;
// SetHeight sets row height, see measurement package.
func (_abg TableRow )SetHeight (m _e .Distance ){_egb :=_e .ToEMU (float64 (m ));_abg ._cgag .HAttr =_ag .ST_Coordinate {ST_CoordinateUnqualified :&_egb };};func (_cbc CustomProperties )SetPropertyAsDate (name string ,date _ba .Time ){date =date .UTC ();_faa ,_cbcd ,_afg :=date .Date ();_dced ,_gag ,_cde :=date .Clock ();_cadf :=_ba .Date (_faa ,_cbcd ,_afg ,_dced ,_gag ,_cde ,0,_ba .UTC );_aab :=_cbc .getNewProperty (name );_aab .Filetime =&_cadf ;_cbc .setOrReplaceProperty (_aab );};
// RelativeHeight returns the relative height of an image given a fixed width.
// This is used when setting image to a fixed width to calculate the height
// required to keep the same image aspect ratio.
func (_eef ImageRef )RelativeHeight (w _eb .Distance )_eb .Distance {_ddb :=float64 (_eef .Size ().Y )/float64 (_eef .Size ().X );return w *_eb .Distance (_ddb );};func (_beec CustomProperties )SetPropertyAsDate (name string ,date _e .Time ){date =date .UTC ();_bgd ,_ebeg ,_egg :=date .Date ();_ggdba ,_afgd ,_eeb :=date .Clock ();_bda :=_e .Date (_bgd ,_ebeg ,_egg ,_ggdba ,_afgd ,_eeb ,0,_e .UTC );_cdeb :=_beec .getNewProperty (name );_cdeb .Filetime =&_bda ;_beec .setOrReplaceProperty (_cdeb );};func (_bee CustomProperties )SetPropertyAsUi2 (name string ,ui2 uint16 ){_ecg :=_bee .getNewProperty (name );_ecg .Ui2 =&ui2 ;_bee .setOrReplaceProperty (_ecg );};
func (_fage ImageRef )RelativeHeight (w _e .Distance )_e .Distance {_gfac :=float64 (_fage .Size ().Y )/float64 (_fage .Size ().X );return w *_e .Distance (_gfac );};
// Remove removes an existing relationship.
func (_bfcd Relationships )Remove (rel Relationship )bool {for _cefc ,_fgfa :=range _bfcd ._gfd .Relationship {if _fgfa ==rel ._edd {copy (_bfcd ._gfd .Relationship [_cefc :],_bfcd ._gfd .Relationship [_cefc +1:]);_bfcd ._gfd .Relationship =_bfcd ._gfd .Relationship [0:len (_bfcd ._gfd .Relationship )-1];return true ;};};return false ;};
// Author returns the author of the document
func (_bga CoreProperties )Author ()string {if _bga ._baega .Creator !=nil {return string (_bga ._baega .Creator .Data );};return "";};func (_gaa CustomProperties )SetPropertyAsStream (name string ,stream string ){_fde :=_gaa .getNewProperty (name );_fde .Stream =&stream ;_gaa .setOrReplaceProperty (_fde );};
// SetWidth sets column width, see measurement package.
func (_acf TableCol )SetWidth (m _e .Distance ){_bdfg :=_e .ToEMU (float64 (m ));_acf ._afgg .WAttr =_ag .ST_Coordinate {ST_CoordinateUnqualified :&_bdfg };};const _aad =30;func (_agb CustomProperties )SetPropertyAsI1 (name string ,i1 int8 ){_cda :=_agb .getNewProperty (name );_cda .I1 =&i1 ;_agb .setOrReplaceProperty (_cda );};
// TblStyle returns the TblStyle property.
func (_ebbg TableStyles )TblStyle ()[]*_ag .CT_TableStyle {return _ebbg ._bfgf .TblStyle };
// Table represents a table in the document.
type Table struct{_fege *_ag .Tbl ;_deag *_ag .CT_Transform2D ;};
// ID returns the ID of a relationship.
func (_gef Relationship )ID ()string {return _gef ._edd .IdAttr };func (_ccbf CustomProperties )SetPropertyAsLpstr (name string ,lpstr string ){_ebb :=_ccbf .getNewProperty (name );_ebb .Lpstr =&lpstr ;_ccbf .setOrReplaceProperty (_ebb );};
// AddCol adds a column to a table.
func (_bdc Table )AddCol ()*TableCol {_egd :=_ag .NewCT_TableCol ();_bdc ._fege .TblGrid .GridCol =append (_bdc ._fege .TblGrid .GridCol ,_egd );for _ ,_gga :=range _bdc ._fege .Tr {_bcdg :=_ag .NewCT_TableCell ();_gga .Tc =append (_gga .Tc ,_bcdg );};return &TableCol {_afgg :_egd };};func (_affa CustomProperties )SetPropertyAsDecimal (name string ,decimal float64 ){_agcb :=_affa .getNewProperty (name );_agcb .Decimal =&decimal ;_affa .setOrReplaceProperty (_agcb );};
// DefAttr returns the DefAttr property.
func (_aae TableStyles )DefAttr ()string {return _aae ._bfgf .DefAttr };func (_dbfa CustomProperties )SetPropertyAsLpwstr (name string ,lpwstr string ){_aefe :=_dbfa .getNewProperty (name );_aefe .Lpwstr =&lpwstr ;_dbfa .setOrReplaceProperty (_aefe );};
// ContentTypes is the top level "[Content_Types].xml" in a zip package.
type ContentTypes struct{_bacb *_bd .Types };
// AddDefault registers a default content type for a given file extension.
func (_ff ContentTypes )AddDefault (fileExtension string ,contentType string ){fileExtension =_dg .ToLower (fileExtension );for _ ,_adb :=range _ff ._bacb .Default {if _adb .ExtensionAttr ==fileExtension &&_adb .ContentTypeAttr ==contentType {return ;};};_gcf :=_bd .NewDefault ();_gcf .ExtensionAttr =fileExtension ;_gcf .ContentTypeAttr =contentType ;_ff ._bacb .Default =append (_ff ._bacb .Default ,_gcf );};func (_ccff CustomProperties )SetPropertyAsInt (name string ,i int ){_aaa :=_ccff .getNewProperty (name );_dad :=int32 (i );_aaa .Int =&_dad ;_ccff .setOrReplaceProperty (_aaa );};
// Modified returns the time that the document was modified.
func (_bff CoreProperties )Modified ()_ba .Time {return _ecf (_bff ._baega .Modified )};
// X returns the inner wrapped XML type.
func (_bfb Theme )X ()*_ggb .Theme {return _bfb ._cffd };
func (_dede TableStyles )X ()*_ag .TblStyleLst {return _dede ._bfgf };
// Target returns the target (path) of a relationship.
func (_acgc Relationship )Target ()string {return _acgc ._caf .TargetAttr };
// AddCustomRelationships adds relationships related to custom properties to the document.
func (_eae *DocBase )AddCustomRelationships (){_eae .ContentTypes .AddOverride ("/\u0064o\u0063\u0050\u0072\u006f\u0070\u0073\u002f\u0063u\u0073\u0074\u006f\u006d.x\u006d\u006c","\u0061\u0070\u0070\u006c\u0069\u0063a\u0074\u0069\u006f\u006e\u002fv\u006e\u0064\u002e\u006f\u0070\u0065n\u0078\u006d\u006c\u0066\u006fr\u006d\u0061\u0074\u0073\u002d\u006f\u0066\u0066\u0069\u0063\u0065\u0064o\u0063\u0075\u006d\u0065\u006e\u0074\u002e\u0063\u0075\u0073\u0074\u006f\u006d\u002d\u0070r\u006f\u0070\u0065\u0072\u0074\u0069\u0065\u0073+\u0078\u006d\u006c");_eae .Rels .AddRelationship ("\u0064\u006f\u0063\u0050ro\u0070\u0073\u002f\u0063\u0075\u0073\u0074\u006f\u006d\u002e\u0078\u006d\u006c",_fd .CustomPropertiesType );};
// TableCol represents a column in a table.
type TableCol struct{_afgg *_ag .CT_TableCol };
// IsEmpty returns true if there are no relationships.
func (_aeb Relationships )IsEmpty ()bool {return _aeb ._gfd ==nil ||len (_aeb ._gfd .Relationship )==0};
// Category returns the category of the document
func (_dab CoreProperties )Category ()string {if _dab ._baega .Category !=nil {return *_dab ._baega .Category ;};return "";};
// Size returns the size of an image
func (_gba ImageRef )Size ()_d .Point {return _gba ._gdg .Size };
// CopyRelationship copies the relationship.
func (_dbfc Relationships )CopyRelationship (idAttr string )(Relationship ,bool ){for _bcb :=range _dbfc ._gfd .Relationship {if _dbfc ._gfd .Relationship [_bcb ].IdAttr ==idAttr {_feg :=*_dbfc ._gfd .Relationship [_bcb ];_cdde :=len (_dbfc ._gfd .Relationship )+1;_ccag :=map[string ]struct{}{};for _ ,_bgc :=range _dbfc ._gfd .Relationship {_ccag [_bgc .IdAttr ]=struct{}{};};for _ ,_bbee :=_ccag [_ca .Sprintf ("\u0072\u0049\u0064%\u0064",_cdde )];_bbee ;_ ,_bbee =_ccag [_ca .Sprintf ("\u0072\u0049\u0064%\u0064",_cdde )]{_cdde ++;};_feg .IdAttr =_ca .Sprintf ("\u0072\u0049\u0064%\u0064",_cdde );_dbfc ._gfd .Relationship =append (_dbfc ._gfd .Relationship ,&_feg );return Relationship {_edd :&_feg },true ;};};return Relationship {},false ;};
// X returns the inner wrapped XML type.
func (_aefd CustomProperties )X ()*_eg .Properties {return _aefd ._bdd };func (_bfg CustomProperties )SetPropertyAsUi1 (name string ,ui1 uint8 ){_eea :=_bfg .getNewProperty (name );_eea .Ui1 =&ui1 ;_bfg .setOrReplaceProperty (_eea );};
// SetLinksUpToDate sets the links up to date flag.
func (_aac AppProperties )SetLinksUpToDate (v bool ){_aac ._aff .LinksUpToDate =_fd .Bool (v )};
// CreateCustomProperties creates the custom properties of the document.
func (_aee *DocBase )CreateCustomProperties (){_aee .CustomProperties =NewCustomProperties ();_aee .AddCustomRelationships ();};func (_fcf Relationship )String ()string {return _ca .Sprintf ("\u007b\u0049\u0044\u003a \u0025\u0073\u0020\u0054\u0061\u0072\u0067\u0065\u0074\u003a \u0025s\u0020\u0054\u0079\u0070\u0065\u003a\u0020%\u0073\u007d",_fcf .ID (),_fcf .Target (),_fcf .Type ());};func (_gbf *ImageRef )SetRelID (id string ){_gbf ._fefg =id };func (_ffg CustomProperties )SetPropertyAsBlob (name ,blob string ){_cca :=_ffg .getNewProperty (name );_cca .Blob =&blob ;_ffg .setOrReplaceProperty (_cca );};func (_cabc CustomProperties )SetPropertyAsEmpty (name string ){_dbc :=_cabc .getNewProperty (name );_dbc .Empty =_de .NewEmpty ();_cabc .setOrReplaceProperty (_dbc );};
// ImageFromStorage reads an image using the currently set
// temporary storage mechanism (see tempstorage). You can also
// construct an Image directly if the file and size are known.
func ImageFromStorage (path string )(Image ,error ){_bccb :=Image {};_bdg ,_adba :=_gg .Open (path );if _adba !=nil {return _bccb ,_ca .Errorf ("\u0065\u0072\u0072or\u0020\u0072\u0065\u0061\u0064\u0069\u006e\u0067\u0020\u0069\u006d\u0061\u0067\u0065\u003a\u0020\u0025\u0073",_adba );};defer _bdg .Close ();_acc ,_afeg ,_adba :=_d .Decode (_bdg );if _adba !=nil {return _bccb ,_ca .Errorf ("\u0075n\u0061\u0062\u006c\u0065 \u0074\u006f\u0020\u0070\u0061r\u0073e\u0020i\u006d\u0061\u0067\u0065\u003a\u0020\u0025s",_adba );};_bccb .Path =path ;_bccb .Format =_afeg ;_bccb .Size =_acc .Bounds ().Size ();return _bccb ,nil ;};const _bbgcc =5;func (_dcg CustomProperties )SetPropertyAsOstream (name string ,ostream string ){_cad :=_dcg .getNewProperty (name );_cad .Ostream =&ostream ;_dcg .setOrReplaceProperty (_cad );};func (_afe CustomProperties )setPropertyHelper (_bfd *_eg .CT_Property ,_bgd bool ){_deaf :=_afe .GetPropertyByName (*_bfd .NameAttr );if (_deaf ==CustomProperty {}){_afe ._bdd .Property =append (_afe ._bdd .Property ,_bfd );}else if _bgd {_bfd .FmtidAttr =_deaf ._cab .FmtidAttr ;if _deaf ._cab .PidAttr ==0{_bfd .PidAttr =_deaf ._cab .PidAttr ;};_bfd .LinkTargetAttr =_deaf ._cab .LinkTargetAttr ;*_deaf ._cab =*_bfd ;};};
// GetOrCreateCustomProperties returns the custom properties of the document (and if they not exist yet, creating them first).
func (_dafb *DocBase )GetOrCreateCustomProperties ()CustomProperties {if _dafb .CustomProperties .X ()==nil {_dafb .CreateCustomProperties ();};return _dafb .CustomProperties ;};
// NewTable makes a new table.
func NewTable ()*Table {_eafa :=_ag .NewTbl ();_eafa .TblPr =_ag .NewCT_TableProperties ();return &Table {_fege :_eafa };};func (_bfee CustomProperties )SetPropertyAsOstorage (name string ,ostorage string ){_efd :=_bfee .getNewProperty (name );_efd .Ostorage =&ostorage ;_bfee .setOrReplaceProperty (_efd );};
// Image is a container for image information. It's used as we need format and
// and size information to use images.
// It contains either the filesystem path to the image, or the image itself.
type Image struct{Size _d .Point ;Format string ;Path string ;Data *[]byte ;};func (_gbg CustomProperties )SetPropertyAsUint (name string ,ui uint ){_dce :=_gbg .getNewProperty (name );_dgc :=uint32 (ui );_dce .Uint =&_dgc ;_gbg .setOrReplaceProperty (_dce );};const _ebccd =15;func (_fgbb CustomProperties )SetPropertyAsI2 (name string ,i2 int16 ){_ada :=_fgbb .getNewProperty (name );_ada .I2 =&i2 ;_fgbb .setOrReplaceProperty (_ada );};
// AddImageToZip adds an image (either from bytes or from disk) and adds it to the zip file.
func AddImageToZip (z *_af .Writer ,img ImageRef ,imageNum int ,dt _gfe .DocType )error {_dfcd :=_gfe .AbsoluteImageFilename (dt ,imageNum ,_cb .ToLower (img .Format ()));if img .Data ()!=nil &&len (*img .Data ())> 0{if _cce :=_ec .AddFileFromBytes (z ,_dfcd ,*img .Data ());_cce !=nil {return _cce ;};}else if img .Path ()!=""{if _edadd :=_ec .AddFileFromDisk (z ,_dfcd ,img .Path ());_edadd !=nil {return _edadd ;};}else {return _ee .Errorf ("\u0075\u006es\u0075\u0070\u0070\u006f\u0072\u0074\u0065\u0064\u0020\u0069\u006d\u0061\u0067\u0065\u0020\u0073\u006f\u0075\u0072\u0063\u0065\u003a %\u002b\u0076",img );};return nil ;};func (_gda CustomProperties )setProperty (_dbc *_ef .CT_Property ){_gda .setPropertyHelper (_dbc ,false )};
func AddImageToZip (z *_cgf .Writer ,img ImageRef ,imageNum int ,dt _fd .DocType )error {_bbge :=_fd .AbsoluteImageFilename (dt ,imageNum ,_dg .ToLower (img .Format ()));if img .Data ()!=nil &&len (*img .Data ())> 0{if _fgff :=_cf .AddFileFromBytes (z ,_bbge ,*img .Data ());_fgff !=nil {return _fgff ;};}else if img .Path ()!=""{if _efb :=_cf .AddFileFromDisk (z ,_bbge ,img .Path ());_efb !=nil {return _efb ;};}else {return _ca .Errorf ("\u0075\u006es\u0075\u0070\u0070\u006f\u0072\u0074\u0065\u0064\u0020\u0069\u006d\u0061\u0067\u0065\u0020\u0073\u006f\u0075\u0072\u0063\u0065\u003a %\u002b\u0076",img );};return nil ;};
// SetCompany sets the name of the company that created the document.
func (_bc AppProperties )SetCompany (s string ){_bc ._aff .Company =&s };
// MakeImageRef constructs an image reference which is a reference to a
// particular image file inside a document. The same image can be used multiple
// times in a document by re-use the ImageRef.
func MakeImageRef (img Image ,d *DocBase ,rels Relationships )ImageRef {return ImageRef {_gdg :img ,_bfc :d ,_abcd :rels };};
// AddAutoRelationship adds a relationship with an automatically generated
// filename based off of the type. It should be preferred over AddRelationship
// to ensure consistent filenames are maintained.
func (_dfbd Relationships )AddAutoRelationship (dt _gfe .DocType ,src string ,idx int ,ctype string )Relationship {return _dfbd .AddRelationship (_gfe .RelativeFilename (dt ,src ,ctype ,idx ),ctype );};
func (_dcec Relationships )AddAutoRelationship (dt _fd .DocType ,src string ,idx int ,ctype string )Relationship {return _dcec .AddRelationship (_fd .RelativeFilename (dt ,src ,ctype ,idx ),ctype );};
// SetDocSecurity sets the document security flag.
func (_beae AppProperties )SetDocSecurity (v int32 ){_beae ._aff .DocSecurity =_fd .Int32 (v )};func (_ccbb CustomProperties )SetPropertyAsOblob (name ,oblob string ){_gff :=_ccbb .getNewProperty (name );_gff .Oblob =&oblob ;_ccbb .setOrReplaceProperty (_gff );};
// Target returns the target attrubute of the image reference (a path where the image file is located in the document structure).
func (_ccbe *ImageRef )Target ()string {return _ccbe ._dda };
// AppProperties contains properties specific to the document and the
// application that created it.
type AppProperties struct{_aff *_fa .Properties };func _ecf (_bfag *_fd .XSDAny )_ba .Time {if _bfag ==nil {return _ba .Time {};};_dgb ,_ggf :=_ba .Parse (_fdfd ,string (_bfag .Data ));if _ggf !=nil {_fd .Log ("\u0065\u0072\u0072\u006f\u0072\u0020\u0070\u0061\u0072\u0073i\u006e\u0067\u0020\u0074\u0069\u006d\u0065 \u0066\u0072\u006f\u006d\u0020\u0025\u0073\u003a\u0020\u0025\u0073",string (_bfag .Data ),_ggf );};return _dgb ;};
// PropertiesList returns the list of all custom properties of the document.
func (_egc CustomProperties )PropertiesList ()[]*_eg .CT_Property {return _egc ._bdd .Property };
// EnsureDefault esnures that an extension and default content type exist,
// adding it if necessary.
func (_dd ContentTypes )EnsureDefault (ext ,contentType string ){ext =_dg .ToLower (ext );for _ ,_fab :=range _dd ._bacb .Default {if _fab .ExtensionAttr ==ext {_fab .ContentTypeAttr =contentType ;return ;};};_cfg :=&_bd .Default {};_cfg .ContentTypeAttr =contentType ;_cfg .ExtensionAttr =ext ;_dd ._bacb .Default =append (_dd ._bacb .Default ,_cfg );};
// RemoveOverrideByIndex removes an override given a path and override index.
func (_deaa ContentTypes )RemoveOverrideByIndex (path string ,indexToFind int )error {_dgg :=path [0:len (path )-5];if !_dg .HasPrefix (_dgg ,"\u002f"){_dgg ="\u002f"+_dgg ;};_ebcc ,_bfa :=_g .Compile (_dgg +"\u0028\u005b\u0030-\u0039\u005d\u002b\u0029\u002e\u0078\u006d\u006c");if _bfa !=nil {return _bfa ;};_aed :=0;_ed :=-1;for _egeb ,_fed :=range _deaa ._bacb .Override {if _ea :=_ebcc .FindStringSubmatch (_fed .PartNameAttr );len (_ea )> 1{if _aed ==indexToFind {_ed =_egeb ;}else if _aed > indexToFind {_ggd ,_ :=_db .Atoi (_ea [1]);_ggd --;_fed .PartNameAttr =_ca .Sprintf ("\u0025\u0073\u0025\u0064\u002e\u0078\u006d\u006c",_dgg ,_ggd );};_aed ++;};};if _ed > -1{copy (_deaa ._bacb .Override [_ed :],_deaa ._bacb .Override [_ed +1:]);_deaa ._bacb .Override =_deaa ._bacb .Override [0:len (_deaa ._bacb .Override )-1];};return nil ;};
// Relationship is a relationship within a .rels file.
type Relationship struct{_edd *_bb .Relationship };func (_gcaf CustomProperties )SetPropertyAsStorage (name string ,storage string ){_ffa :=_gcaf .getNewProperty (name );_ffa .Storage =&storage ;_gcaf .setOrReplaceProperty (_ffa );};
// X returns the underlying raw XML data.
func (_bccc Relationships )X ()*_bb .Relationships {return _bccc ._gfd };
// SetOffsetX sets horizontal offset of a table in distance units (see measurement package).
func (_gdc Table )SetOffsetX (offX float64 ){if _gdc ._deag .Off ==nil {_gdc ._deag .Off =_ag .NewCT_Point2D ();_eeff :=int64 (0);_gdc ._deag .Off .YAttr =_ag .ST_Coordinate {ST_CoordinateUnqualified :&_eeff };};_gdgc :=_e .ToEMU (offX );_gdc ._deag .Off .XAttr =_ag .ST_Coordinate {ST_CoordinateUnqualified :&_gdgc };};func (_eee CustomProperties )setProperty (_bcc *_eg .CT_Property ){_eee .setPropertyHelper (_bcc ,false )};
// LastModifiedBy returns the name of the last person to modify the document
func (_baeae CoreProperties )LastModifiedBy ()string {if _baeae ._baega .LastModifiedBy !=nil {return *_baeae ._baega .LastModifiedBy ;};return "";};
// X returns the inner wrapped XML type of CustomProperty.
func (_adc CustomProperty )X ()*_eg .CT_Property {return _adc ._cab };
// AddHyperlink adds an external hyperlink relationship.
func (_gbe Relationships )AddHyperlink (target string )Hyperlink {_ffc :=_gbe .AddRelationship (target ,_fd .HyperLinkType );_ffc ._edd .TargetModeAttr =_bb .ST_TargetModeExternal ;return Hyperlink (_ffc );};
// CoreProperties contains document specific properties.
type CoreProperties struct{_baega *_beg .CoreProperties };const Version ="\u0031\u002e\u0031\u0031\u002e\u0030";
// CustomProperty contains document specific property.
// Using of this type is deprecated.
type CustomProperty struct{_cab *_eg .CT_Property };
// Title returns the Title of the document
func (_fga CoreProperties )Title ()string {if _fga ._baega .Title !=nil {return string (_fga ._baega .Title .Data );};return "";};
// Theme is a drawingml theme.
type Theme struct{_dcag *_ag .Theme };func init (){_ceg .SetAsStorage ()};func (_fda CustomProperties )SetPropertyAsVector (name string ,vector *_de .Vector ){_dgdb :=_fda .getNewProperty (name );_dgdb .Vector =vector ;_fda .setOrReplaceProperty (_dgdb );};
// Description returns the description of the document
func (_dca CoreProperties )Description ()string {if _dca ._baega .Description !=nil {return string (_dca ._baega .Description .Data );};return "";};func (_fedc CustomProperties )SetPropertyAsFiletime (name string ,filetime _ba .Time ){_afgf :=_fedc .getNewProperty (name );_afgf .Filetime =&filetime ;_fedc .setOrReplaceProperty (_afgf );};
// CustomProperties contains document specific properties.
type CustomProperties struct{_bdd *_eg .Properties };
// NewTableStyles constructs a new TableStyles.
func NewTableStyles ()TableStyles {return TableStyles {_bfgf :_ag .NewTblStyleLst ()}};
// AddExtraFileFromZip is used when reading an unsupported file from an OOXML
// file. This ensures that unsupported file content will at least round-trip
// correctly.
func (_agfd *DocBase )AddExtraFileFromZip (f *_cgf .File )error {_ecac ,_dfeg :=_cf .ExtractToDiskTmp (f ,_agfd .TmpPath );if _dfeg !=nil {return _ca .Errorf ("\u0065\u0072r\u006f\u0072\u0020\u0065x\u0074\u0072a\u0063\u0074\u0069\u006e\u0067\u0020\u0075\u006es\u0075\u0070\u0070\u006f\u0072\u0074\u0065\u0064\u0020\u0066\u0069\u006ce\u003a\u0020\u0025\u0073",_dfeg );};_agfd .ExtraFiles =append (_agfd .ExtraFiles ,ExtraFile {ZipPath :f .Name ,DiskPath :_ecac });return nil ;};
// SetStyle assigns TableStyle to a table.
func (_ebfe Table )SetStyle (style *_ag .CT_TableStyle ){if _ebfe ._fege .TblPr ==nil {_ebfe ._fege .TblPr =_ag .NewCT_TableProperties ();};if _ebfe ._fege .TblPr .Choice ==nil {_ebfe ._fege .TblPr .Choice =_ag .NewCT_TablePropertiesChoice ();};_ebfe ._fege .TblPr .Choice .TableStyle =style ;};func (_cfbf TableRow )addCell ()*_ag .CT_TableCell {_afa :=_ag .NewCT_TableCell ();_cfbf ._cgag .Tc =append (_cfbf ._cgag .Tc ,_afa );return _afa ;};func (_cfb CustomProperties )getNewProperty (_egef string )*_eg .CT_Property {_ga :=_cfb ._bdd .Property ;_fag :=int32 (1);for _ ,_fbd :=range _ga {if _fbd .PidAttr > _fag {_fag =_fbd .PidAttr ;};};_agfg :=_eg .NewCT_Property ();_agfg .NameAttr =&_egef ;_agfg .PidAttr =_fag +1;_agfg .FmtidAttr ="\u007b\u0044\u0035\u0043\u0044\u0044\u0035\u0030\u0035\u002d\u0032\u0045\u0039\u0043\u002d\u0031\u0030\u0031\u0042\u002d\u0039\u0033\u0039\u0037-\u0030\u0038\u0030\u0030\u0032B\u0032\u0043F\u0039\u0041\u0045\u007d";return _agfg ;};func (_edb CustomProperties )SetPropertyAsError (name string ,error string ){_daf :=_edb .getNewProperty (name );_daf .Error =&error ;_edb .setOrReplaceProperty (_daf );};
// NewContentTypes returns a wrapper around a newly constructed content-types.
func NewContentTypes ()ContentTypes {_ebc :=ContentTypes {_bacb :_bd .NewTypes ()};_ebc .AddDefault ("\u0078\u006d\u006c","\u0061p\u0070l\u0069\u0063\u0061\u0074\u0069\u006f\u006e\u002f\u0078\u006d\u006c");_ebc .AddDefault ("\u0072\u0065\u006c\u0073","\u0061\u0070\u0070\u006c\u0069\u0063a\u0074\u0069\u006fn\u002f\u0076\u006ed\u002e\u006f\u0070\u0065\u006e\u0078\u006d\u006c\u0066\u006fr\u006d\u0061\u0074\u0073\u002dpa\u0063\u006b\u0061\u0067\u0065\u002e\u0072\u0065\u006c\u0061\u0074\u0069\u006f\u006e\u0073\u0068\u0069\u0070\u0073\u002b\u0078\u006d\u006c");_ebc .AddDefault ("\u0070\u006e\u0067","\u0069m\u0061\u0067\u0065\u002f\u0070\u006eg");_ebc .AddDefault ("\u006a\u0070\u0065\u0067","\u0069\u006d\u0061\u0067\u0065\u002f\u006a\u0070\u0065\u0067");_ebc .AddDefault ("\u006a\u0070\u0067","\u0069m\u0061\u0067\u0065\u002f\u006a\u0070g");_ebc .AddDefault ("\u0077\u006d\u0066","i\u006d\u0061\u0067\u0065\u002f\u0078\u002d\u0077\u006d\u0066");_ebc .AddOverride ("\u002fd\u006fc\u0050\u0072\u006f\u0070\u0073/\u0063\u006fr\u0065\u002e\u0078\u006d\u006c","\u0061\u0070\u0070\u006c\u0069\u0063\u0061\u0074\u0069\u006f\u006e\u002f\u0076\u006e\u0064\u002e\u006f\u0070\u0065\u006ex\u006d\u006c\u0066\u006f\u0072\u006d\u0061\u0074\u0073-\u0070\u0061\u0063\u006b\u0061\u0067\u0065\u002e\u0063\u006f\u0072\u0065\u002dp\u0072\u006f\u0070\u0065\u0072\u0074i\u0065\u0073\u002bx\u006d\u006c");_ebc .AddOverride ("\u002f\u0064\u006f\u0063\u0050\u0072\u006f\u0070\u0073\u002f\u0061\u0070p\u002e\u0078\u006d\u006c","a\u0070\u0070l\u0069\u0063\u0061\u0074\u0069\u006f\u006e\u002f\u0076\u006e\u0064\u002e\u006f\u0070\u0065\u006e\u0078\u006d\u006c\u0066o\u0072\u006d\u0061\u0074\u0073\u002d\u006f\u0066\u0066\u0069\u0063\u0065\u0064\u006f\u0063\u0075m\u0065\u006e\u0074\u002e\u0065\u0078\u0074\u0065\u006e\u0064\u0065\u0064\u002dp\u0072\u006f\u0070\u0065\u0072\u0074\u0069\u0065\u0073\u002b\u0078m\u006c");return _ebc ;};
// TableStyles contains document specific properties.
type TableStyles struct{_bfgf *_ag .TblStyleLst };func _beb (_eefg _ba .Time ,_dga string )*_fd .XSDAny {_dgf :=&_fd .XSDAny {XMLName :_cgb .Name {Local :_dga }};_dgf .Attrs =append (_dgf .Attrs ,_cgb .Attr {Name :_cgb .Name {Local :"\u0078\u0073\u0069\u003a\u0074\u0079\u0070\u0065"},Value :"\u0064\u0063\u0074\u0065\u0072\u006d\u0073\u003a\u00573\u0043\u0044\u0054\u0046"});_dgf .Attrs =append (_dgf .Attrs ,_cgb .Attr {Name :_cgb .Name {Local :"\u0078m\u006c\u006e\u0073\u003a\u0078\u0073i"},Value :"\u0068\u0074\u0074\u0070\u003a/\u002f\u0077\u0077\u0077\u002e\u0077\u0033\u002e\u006f\u0072\u0067\u002f\u00320\u0030\u0031\u002f\u0058\u004d\u004c\u0053\u0063\u0068\u0065\u006d\u0061\u002d\u0069\u006e\u0073\u0074\u0061\u006e\u0063\u0065"});_dgf .Attrs =append (_dgf .Attrs ,_cgb .Attr {Name :_cgb .Name {Local :"\u0078\u006d\u006c\u006e\u0073\u003a\u0064\u0063\u0074\u0065\u0072\u006d\u0073"},Value :"\u0068t\u0074\u0070\u003a\u002f/\u0070\u0075\u0072\u006c\u002eo\u0072g\u002fd\u0063\u002f\u0074\u0065\u0072\u006d\u0073/"});_dgf .Data =[]byte (_eefg .Format (_fdfd ));return _dgf ;};
// GetTargetByRelId returns a target path with the associated relation ID.
func (_gbc Relationships )GetTargetByRelId (idAttr string )string {for _ ,_gae :=range _gbc ._gfd .Relationship {if _gae .IdAttr ==idAttr {return _gae .TargetAttr ;};};return "";};
// DocBase is the type embedded in in the Document/Workbook/Presentation types
// that contains members common to all.
type DocBase struct{ContentTypes ContentTypes ;AppProperties AppProperties ;Rels Relationships ;CoreProperties CoreProperties ;CustomProperties CustomProperties ;Thumbnail _d .Image ;Images []ImageRef ;ExtraFiles []ExtraFile ;TmpPath string ;};func (_bec CustomProperties )SetPropertyAsI8 (name string ,i8 int64 ){_ecg :=_bec .getNewProperty (name );_ecg .I8 =&i8 ;_bec .setOrReplaceProperty (_ecg );};func (_cbe CustomProperties )SetPropertyAsI4 (name string ,i4 int32 ){_dfe :=_cbe .getNewProperty (name );_dfe .I4 =&i4 ;_cbe .setOrReplaceProperty (_dfe );};
// Path returns the path to an image file, if any.
func (_edc ImageRef )Path ()string {return _edc ._gdg .Path };
// Created returns the time that the document was created.
func (_fba CoreProperties )Created ()_ba .Time {return _ecf (_fba ._baega .Created )};
// NewTableWithXfrm makes a new table with a pointer to its parent Xfrm for changing its offset and size.
func NewTableWithXfrm (xfrm *_ag .CT_Transform2D )*Table {_eafd :=_ag .NewTbl ();_eafd .TblPr =_ag .NewCT_TableProperties ();return &Table {_fege :_eafd ,_deag :xfrm };};
// X returns the inner wrapped XML type.
func (_dbe CoreProperties )X ()*_beg .CoreProperties {return _dbe ._baega };func (_gca CustomProperties )SetPropertyAsNull (name string ){_bfe :=_gca .getNewProperty (name );_bfe .Null =_de .NewNull ();_gca .setOrReplaceProperty (_bfe );};
// TableRow represents a row in a table.
type TableRow struct{_cgag *_ag .CT_TableRow };func (_cge CustomProperties )SetPropertyAsClsid (name string ,clsid string ){_adca :=_cge .getNewProperty (name );_adca .Clsid =&clsid ;_cge .setOrReplaceProperty (_adca );};
// Properties returns table properties.
func (_gab Table )Properties ()*_ag .CT_TableProperties {return _gab ._fege .TblPr };
// SetDescription records the description of the document.
func (_eeb CoreProperties )SetDescription (s string ){if _eeb ._baega .Description ==nil {_eeb ._baega .Description =&_fd .XSDAny {XMLName :_cgb .Name {Local :"\u0064\u0063\u003a\u0064\u0065\u0073\u0063\u0072\u0069p\u0074\u0069\u006f\u006e"}};};_eeb ._baega .Description .Data =[]byte (s );};
// NewTheme constructs a new theme.
func NewTheme ()Theme {return Theme {_ag .NewTheme ()}};func (_faab CustomProperties )SetPropertyAsVstream (name string ,vstream *_de .Vstream ){_deda :=_faab .getNewProperty (name );_deda .Vstream =vstream ;_faab .setOrReplaceProperty (_deda );};
// Relationships returns a slice of all of the relationships.
func (_gbgc Relationships )Relationships ()[]Relationship {_eba :=[]Relationship {};for _ ,_fgae :=range _gbgc ._gfd .Relationship {_eba =append (_eba ,Relationship {_edd :_fgae });};return _eba ;};
// ImageFromBytes returns an Image struct for an in-memory image. You can also
// construct an Image directly if the file and size are known.
func ImageFromBytes (data []byte )(Image ,error ){_aag :=Image {};_abb ,_dbb ,_ebbf :=_d .Decode (_ce .NewReader (data ));if _ebbf !=nil {return _aag ,_ca .Errorf ("\u0075n\u0061\u0062\u006c\u0065 \u0074\u006f\u0020\u0070\u0061r\u0073e\u0020i\u006d\u0061\u0067\u0065\u003a\u0020\u0025s",_ebbf );};_aag .Data =&data ;_aag .Format =_dbb ;_aag .Size =_abb .Bounds ().Size ();return _aag ,nil ;};const _ccfe ="\u0032\u0020\u004aan\u0075\u0061\u0072\u0079\u0020\u0032\u0030\u0030\u0036\u0020\u0061\u0074\u0020\u0031\u0035\u003a\u0030\u0034";
// NewCustomProperties constructs a new CustomProperties.
func NewCustomProperties ()CustomProperties {return CustomProperties {_bdd :_eg .NewProperties ()}};
// Hyperlink is just an appropriately configured relationship.
type Hyperlink Relationship ;
// SetAuthor records the author of the document.
func (_bbd CoreProperties )SetAuthor (s string ){if _bbd ._baega .Creator ==nil {_bbd ._baega .Creator =&_fd .XSDAny {XMLName :_cgb .Name {Local :"\u0064\u0063\u003a\u0063\u0072\u0065\u0061\u0074\u006f\u0072"}};};_bbd ._baega .Creator .Data =[]byte (s );};
// GetImageBytesByTarget returns Image object with Data bytes read from its target.
func (_cdec *DocBase )GetImageBytesByTarget (target string )(Image ,error ){if target !=""{target ="\u0077\u006f\u0072d\u002f"+target ;for _ ,_gcd :=range _cdec .Images {if _gcd .Target ()==target {return ImageFromStorage (_gcd .Path ());};};};return Image {},_ebfa ;};

View File

@ -11,34 +11,34 @@
// Package license helps manage commercial licenses and check if they
// are valid for the version of UniOffice used.
package license ;import _a "github.com/unidoc/unioffice/internal/license";const (LicenseTierUnlicensed =_a .LicenseTierUnlicensed ;LicenseTierCommunity =_a .LicenseTierCommunity ;LicenseTierIndividual =_a .LicenseTierIndividual ;LicenseTierBusiness =_a .LicenseTierBusiness ;);
package license ;import _g "github.com/unidoc/unioffice/internal/license";
// SetMeteredKey sets the metered License API key required for SaaS operation.
// Document usage is reported periodically for the product to function correctly.
func SetMeteredKey (apiKey string )error {return _a .SetMeteredKey (apiKey )};
// SetLegacyLicenseKey installs a legacy license code. License codes issued prior to June 2019.
// Will be removed at some point in a future major version.
func SetLegacyLicenseKey (s string )error {return _a .SetLegacyLicenseKey (s )};
// GetLicenseKey returns the currently loaded license key.
func GetLicenseKey ()*LicenseKey {return _a .GetLicenseKey ()};
// SetLicenseKey sets and validates the license key.
func SetLicenseKey (content string ,customerName string )error {return _a .SetLicenseKey (content ,customerName );};
// LicenseKey represents a loaded license key.
type LicenseKey =_a .LicenseKey ;
// LegacyLicenseType is the type of license
type LegacyLicenseType =_a .LegacyLicenseType ;
func SetMeteredKey (apiKey string )error {return _g .SetMeteredKey (apiKey )};
// GetMeteredState checks the currently used metered document usage status,
// documents used and credits available.
func GetMeteredState ()(_a .MeteredStatus ,error ){return _a .GetMeteredState ()};
// LegacyLicense holds the old-style unioffice license information.
type LegacyLicense =_a .LegacyLicense ;
func GetMeteredState ()(_g .MeteredStatus ,error ){return _g .GetMeteredState ()};
// MakeUnlicensedKey returns a default key.
func MakeUnlicensedKey ()*LicenseKey {return _a .MakeUnlicensedKey ()};
func MakeUnlicensedKey ()*LicenseKey {return _g .MakeUnlicensedKey ()};const (LicenseTierUnlicensed =_g .LicenseTierUnlicensed ;LicenseTierCommunity =_g .LicenseTierCommunity ;LicenseTierIndividual =_g .LicenseTierIndividual ;LicenseTierBusiness =_g .LicenseTierBusiness ;);
// LegacyLicense holds the old-style unioffice license information.
type LegacyLicense =_g .LegacyLicense ;
// SetLicenseKey sets and validates the license key.
func SetLicenseKey (content string ,customerName string )error {return _g .SetLicenseKey (content ,customerName );};
// LegacyLicenseType is the type of license
type LegacyLicenseType =_g .LegacyLicenseType ;
// LicenseKey represents a loaded license key.
type LicenseKey =_g .LicenseKey ;
// GetLicenseKey returns the currently loaded license key.
func GetLicenseKey ()*LicenseKey {return _g .GetLicenseKey ()};
// SetLegacyLicenseKey installs a legacy license code. License codes issued prior to June 2019.
// Will be removed at some point in a future major version.
func SetLegacyLicenseKey (s string )error {return _g .SetLegacyLicenseKey (s )};

View File

@ -11,22 +11,22 @@
// Package diskstore implements tempStorage interface
// by using disk as a storage
package diskstore ;import (_ce "github.com/unidoc/unioffice/common/tempstorage";_b "io/ioutil";_c "os";_f "strings";);
// Open opens file from disk according to a path
func (_e diskStorage )Open (path string )(_ce .File ,error ){return _c .Open (path )};type diskStorage struct{};
package diskstore ;import (_fa "github.com/unidoc/unioffice/common/tempstorage";_b "io/ioutil";_g "os";_e "strings";);
// SetAsStorage sets temp storage as a disk storage
func SetAsStorage (){_a :=diskStorage {};_ce .SetAsStorage (&_a )};
func SetAsStorage (){_a :=diskStorage {};_fa .SetAsStorage (&_a )};
// TempFile creates a new temp directory by calling ioutil TempDir
func (_ec diskStorage )TempDir (pattern string )(string ,error ){return _b .TempDir ("",pattern )};
// Add is not applicable in the diskstore implementation
func (_cc diskStorage )Add (path string )error {return nil };
// Open opens file from disk according to a path
func (_ag diskStorage )Open (path string )(_fa .File ,error ){return _g .Open (path )};type diskStorage struct{};
// RemoveAll removes all files in the directory
func (_fd diskStorage )RemoveAll (dir string )error {if _f .HasPrefix (dir ,_c .TempDir ()){return _c .RemoveAll (dir );};return nil ;};
func (_ef diskStorage )RemoveAll (dir string )error {if _e .HasPrefix (dir ,_g .TempDir ()){return _g .RemoveAll (dir );};return nil ;};
// TempFile creates a new temp file by calling ioutil TempFile
func (_ae diskStorage )TempFile (dir ,pattern string )(_ce .File ,error ){return _b .TempFile (dir ,pattern );};
func (_ae diskStorage )TempFile (dir ,pattern string )(_fa .File ,error ){return _b .TempFile (dir ,pattern );};
// TempFile creates a new temp directory by calling ioutil TempDir
func (_fd diskStorage )TempDir (pattern string )(string ,error ){return _b .TempDir ("",pattern )};
// Add is not applicable in the diskstore implementation
func (_bb diskStorage )Add (path string )error {return nil };

View File

@ -11,34 +11,34 @@
// Package memstore implements tempStorage interface
// by using memory as a storage
package memstore ;import (_e "encoding/hex";_gg "errors";_d "fmt";_ggb "github.com/unidoc/unioffice/common/tempstorage";_ac "io";_g "io/ioutil";_f "math/rand";_c "sync";);type memFile struct{_ff *memDataCell ;_db int64 ;};
// Add reads a file from a disk and adds it to the storage
func (_gda *memStorage )Add (path string )error {_ ,_ag :=_gda ._gf .Load (path );if _ag {return nil ;};_gee ,_ce :=_g .ReadFile (path );if _ce !=nil {return _ce ;};_gda ._gf .Store (path ,&memDataCell {_dc :path ,_gc :_gee ,_fb :int64 (len (_gee ))});return nil ;};
// TempDir creates a name for a new temp directory using a pattern argument
func (_ea *memStorage )TempDir (pattern string )(string ,error ){return _cb (pattern ),nil };
// Name returns the filename of the underlying memDataCell
func (_ga *memFile )Name ()string {return _ga ._ff ._dc };
// Read reads from the underlying memDataCell in order to implement Reader interface
func (_b *memFile )Read (p []byte )(int ,error ){_ggg :=_b ._db ;_cc :=_b ._ff ._fb ;_fg :=int64 (len (p ));if _fg > _cc {_fg =_cc ;p =p [:_fg ];};if _ggg >=_cc {return 0,_ac .EOF ;};_ffg :=_ggg +_fg ;if _ffg >=_cc {_ffg =_cc ;};_fc :=copy (p ,_b ._ff ._gc [_ggg :_ffg ]);_b ._db =_ffg ;return _fc ,nil ;};func _gce (_bc int )(string ,error ){_fga :=make ([]byte ,_bc );if _ ,_cbf :=_f .Read (_fga );_cbf !=nil {return "",_cbf ;};return _e .EncodeToString (_fga ),nil ;};type memDataCell struct{_dc string ;_gc []byte ;_fb int64 ;};
// Open returns tempstorage File object by name
func (_dbc *memStorage )Open (path string )(_ggb .File ,error ){_cg ,_ge :=_dbc ._gf .Load (path );if !_ge {return nil ,_gg .New (_d .Sprintf ("\u0043\u0061\u006eno\u0074\u0020\u006f\u0070\u0065\u006e\u0020\u0074\u0068\u0065\u0020\u0066\u0069\u006c\u0065\u0020\u0025\u0073",path ));};return &memFile {_ff :_cg .(*memDataCell )},nil ;};
// RemoveAll removes all files according to the dir argument prefix
func (_fff *memStorage )RemoveAll (dir string )error {_fff ._gf .Range (func (_ccf ,_dd interface{})bool {_fff ._gf .Delete (_ccf );return true });return nil ;};func _cb (_bb string )string {_ef ,_ :=_gce (6);return _bb +_ef };type memStorage struct{_gf _c .Map };
// TempFile creates a new empty file in the storage and returns it
func (_gaa *memStorage )TempFile (dir ,pattern string )(_ggb .File ,error ){_fd :=dir +"\u002f"+_cb (pattern );_aa :=&memDataCell {_dc :_fd ,_gc :[]byte {}};_ae :=&memFile {_ff :_aa };_gaa ._gf .Store (_fd ,_aa );return _ae ,nil ;};
// Write writes to the end of the underlying memDataCell in order to implement Writer interface
func (_ec *memFile )Write (p []byte )(int ,error ){_ec ._ff ._gc =append (_ec ._ff ._gc ,p ...);_ec ._ff ._fb +=int64 (len (p ));return len (p ),nil ;};
package memstore ;import (_af "encoding/hex";_b "errors";_c "fmt";_dc "github.com/unidoc/unioffice/common/tempstorage";_a "io";_d "io/ioutil";_ee "math/rand";_e "sync";);type memStorage struct{_de _e .Map };
// SetAsStorage sets temp storage as a memory storage
func SetAsStorage (){_gd :=memStorage {_gf :_c .Map {}};_ggb .SetAsStorage (&_gd )};
func SetAsStorage (){_ef :=memStorage {_de :_e .Map {}};_dc .SetAsStorage (&_ef )};type memDataCell struct{_gc string ;_ba []byte ;_ac int64 ;};
// TempFile creates a new empty file in the storage and returns it
func (_dca *memStorage )TempFile (dir ,pattern string )(_dc .File ,error ){_ded :=dir +"\u002f"+_cc (pattern );_fc :=&memDataCell {_gc :_ded ,_ba :[]byte {}};_gd :=&memFile {_ad :_fc };_dca ._de .Store (_ded ,_fc );return _gd ,nil ;};
// Write writes to the end of the underlying memDataCell in order to implement Writer interface
func (_dd *memFile )Write (p []byte )(int ,error ){_dd ._ad ._ba =append (_dd ._ad ._ba ,p ...);_dd ._ad ._ac +=int64 (len (p ));return len (p ),nil ;};
// Name returns the filename of the underlying memDataCell
func (_eec *memFile )Name ()string {return _eec ._ad ._gc };
// Add reads a file from a disk and adds it to the storage
func (_fga *memStorage )Add (path string )error {_ ,_cg :=_fga ._de .Load (path );if _cg {return nil ;};_efe ,_da :=_d .ReadFile (path );if _da !=nil {return _da ;};_fga ._de .Store (path ,&memDataCell {_gc :path ,_ba :_efe ,_ac :int64 (len (_efe ))});return nil ;};func _bae (_edd int )(string ,error ){_eea :=make ([]byte ,_edd );if _ ,_eee :=_ee .Read (_eea );_eee !=nil {return "",_eee ;};return _af .EncodeToString (_eea ),nil ;};
// Read reads from the underlying memDataCell in order to implement Reader interface
func (_fe *memFile )Read (p []byte )(int ,error ){_ff :=_fe ._dg ;_ae :=_fe ._ad ._ac ;_eg :=int64 (len (p ));if _eg > _ae {_eg =_ae ;p =p [:_eg ];};if _ff >=_ae {return 0,_a .EOF ;};_ffa :=_ff +_eg ;if _ffa >=_ae {_ffa =_ae ;};_g :=copy (p ,_fe ._ad ._ba [_ff :_ffa ]);_fe ._dg =_ffa ;return _g ,nil ;};func _cc (_dde string )string {_fd ,_ :=_bae (6);return _dde +_fd };
// RemoveAll removes all files according to the dir argument prefix
func (_cb *memStorage )RemoveAll (dir string )error {_cb ._de .Range (func (_cbb ,_aa interface{})bool {_cb ._de .Delete (_cbb );return true });return nil ;};type memFile struct{_ad *memDataCell ;_dg int64 ;};
// Open returns tempstorage File object by name
func (_bb *memStorage )Open (path string )(_dc .File ,error ){_fg ,_acb :=_bb ._de .Load (path );if !_acb {return nil ,_b .New (_c .Sprintf ("\u0043\u0061\u006eno\u0074\u0020\u006f\u0070\u0065\u006e\u0020\u0074\u0068\u0065\u0020\u0066\u0069\u006c\u0065\u0020\u0025\u0073",path ));};return &memFile {_ad :_fg .(*memDataCell )},nil ;};
// TempDir creates a name for a new temp directory using a pattern argument
func (_be *memStorage )TempDir (pattern string )(string ,error ){return _cc (pattern ),nil };
// Close is not applicable in this implementation
func (_fgg *memFile )Close ()error {return nil };
func (_ed *memFile )Close ()error {return nil };

View File

@ -9,26 +9,26 @@
// 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 tempstorage ;import _gd "io";
package tempstorage ;import _f "io";
// TempFile creates new empty file in the storage and returns it.
func TempFile (dir ,pattern string )(File ,error ){return _b .TempFile (dir ,pattern )};
// Open returns tempstorage File object by name.
func Open (path string )(File ,error ){return _b .Open (path )};
// Add reads a file from a disk and adds it to the storage.
func Add (path string )error {return _b .Add (path )};
// TempDir creates a name for a new temp directory using a pattern argument.
func TempDir (pattern string )(string ,error ){return _b .TempDir (pattern )};
// RemoveAll removes all files according to the dir argument prefix.
func RemoveAll (dir string )error {return _b .RemoveAll (dir )};type storage interface{Open (_fg string )(File ,error );TempFile (_c ,_g string )(File ,error );TempDir (_gb string )(string ,error );RemoveAll (_de string )error ;Add (_a string )error ;};
// File is a representation of a storage file
// with Read, Write, Close and Name methods identical to os.File.
type File interface{_gd .Reader ;_gd .Writer ;_gd .Closer ;Name ()string ;};var _df storage ;type storage interface{Open (_d string )(File ,error );TempFile (_e ,_dg string )(File ,error );TempDir (_ee string )(string ,error );RemoveAll (_c string )error ;Add (_f string )error ;};
// RemoveAll removes all files according to the dir argument prefix.
func RemoveAll (dir string )error {return _df .RemoveAll (dir )};
// Add reads a file from a disk and adds it to the storage.
func Add (path string )error {return _df .Add (path )};
// Open returns tempstorage File object by name.
func Open (path string )(File ,error ){return _df .Open (path )};
type File interface{_f .Reader ;_f .Writer ;_f .Closer ;Name ()string ;};
// SetAsStorage changes temporary storage to newStorage.
func SetAsStorage (newStorage storage ){_df =newStorage };
// TempDir creates a name for a new temp directory using a pattern argument.
func TempDir (pattern string )(string ,error ){return _df .TempDir (pattern )};
// TempFile creates new empty file in the storage and returns it.
func TempFile (dir ,pattern string )(File ,error ){return _df .TempFile (dir ,pattern )};
func SetAsStorage (newStorage storage ){_b =newStorage };var _b storage ;

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -9,119 +9,119 @@
// 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 drawing ;import (_b "github.com/unidoc/unioffice";_d "github.com/unidoc/unioffice/color";_da "github.com/unidoc/unioffice/measurement";_ge "github.com/unidoc/unioffice/schema/soo/dml";);
// ParagraphProperties allows controlling paragraph properties.
type ParagraphProperties struct{_dec *_ge .CT_TextParagraphProperties ;};
// SetJoin sets the line join style.
func (_fg LineProperties )SetJoin (e LineJoin ){_fg ._e .Round =nil ;_fg ._e .Miter =nil ;_fg ._e .Bevel =nil ;switch e {case LineJoinRound :_fg ._e .Round =_ge .NewCT_LineJoinRound ();case LineJoinBevel :_fg ._e .Bevel =_ge .NewCT_LineJoinBevel ();case LineJoinMiter :_fg ._e .Miter =_ge .NewCT_LineJoinMiterProperties ();};};func (_de LineProperties )SetNoFill (){_de .clearFill ();_de ._e .NoFill =_ge .NewCT_NoFillProperties ()};
// X returns the inner wrapped XML type.
func (_bef ParagraphProperties )X ()*_ge .CT_TextParagraphProperties {return _bef ._dec };func (_gg LineProperties )SetSolidFill (c _d .Color ){_gg .clearFill ();_gg ._e .SolidFill =_ge .NewCT_SolidColorFillProperties ();_gg ._e .SolidFill .SrgbClr =_ge .NewCT_SRgbColor ();_gg ._e .SolidFill .SrgbClr .ValAttr =*c .AsRGBString ();};
// MakeParagraphProperties constructs a new ParagraphProperties wrapper.
func MakeParagraphProperties (x *_ge .CT_TextParagraphProperties )ParagraphProperties {return ParagraphProperties {x };};
package drawing ;import (_f "github.com/unidoc/unioffice";_b "github.com/unidoc/unioffice/color";_fc "github.com/unidoc/unioffice/measurement";_fb "github.com/unidoc/unioffice/schema/soo/dml";);
// SetAlign controls the paragraph alignment
func (_a ParagraphProperties )SetAlign (a _ge .ST_TextAlignType ){_a ._dec .AlgnAttr =a };
func (_fbc ParagraphProperties )SetAlign (a _fb .ST_TextAlignType ){_fbc ._ad .AlgnAttr =a };
// MakeRun constructs a new Run wrapper.
func MakeRun (x *_ge .EG_TextRun )Run {return Run {x }};
// Paragraph is a paragraph within a document.
type Paragraph struct{_bg *_ge .CT_TextParagraph };
// SetBold controls the bolding of a run.
func (_fc RunProperties )SetBold (b bool ){_fc ._ag .BAttr =_b .Bool (b )};
// SetBulletChar sets the bullet character for the paragraph.
func (_fe ParagraphProperties )SetBulletChar (c string ){if c ==""{_fe ._dec .BuChar =nil ;}else {_fe ._dec .BuChar =_ge .NewCT_TextCharBullet ();_fe ._dec .BuChar .CharAttr =c ;};};
// MakeParagraph constructs a new paragraph wrapper.
func MakeParagraph (x *_ge .CT_TextParagraph )Paragraph {return Paragraph {x }};
// AddBreak adds a new line break to a paragraph.
func (_bb Paragraph )AddBreak (){_c :=_ge .NewEG_TextRun ();_c .Br =_ge .NewCT_TextLineBreak ();_bb ._bg .EG_TextRun =append (_bb ._bg .EG_TextRun ,_c );};
// X returns the inner wrapped XML type.
func (_ed LineProperties )X ()*_ge .CT_LineProperties {return _ed ._e };
// X returns the inner wrapped XML type.
func (_cf Run )X ()*_ge .EG_TextRun {return _cf ._ac };
// SetSize sets the width and height of the shape.
func (_bf ShapeProperties )SetSize (w ,h _da .Distance ){_bf .SetWidth (w );_bf .SetHeight (h )};
// RunProperties controls the run properties.
type RunProperties struct{_ag *_ge .CT_TextCharacterProperties ;};
// X returns the inner wrapped XML type.
func (_db ShapeProperties )X ()*_ge .CT_ShapeProperties {return _db ._fdd };
// X returns the inner wrapped XML type.
func (_dd Paragraph )X ()*_ge .CT_TextParagraph {return _dd ._bg };
// Properties returns the run's properties.
func (_gc Run )Properties ()RunProperties {if _gc ._ac .R ==nil {_gc ._ac .R =_ge .NewCT_RegularTextRun ();};if _gc ._ac .R .RPr ==nil {_gc ._ac .R .RPr =_ge .NewCT_TextCharacterProperties ();};return RunProperties {_gc ._ac .R .RPr };};const (LineJoinRound LineJoin =iota ;LineJoinBevel ;LineJoinMiter ;);
// SetWidth sets the line width, MS products treat zero as the minimum width
// that can be displayed.
func (_f LineProperties )SetWidth (w _da .Distance ){_f ._e .WAttr =_b .Int32 (int32 (w /_da .EMU ))};
// SetHeight sets the height of the shape.
func (_cd ShapeProperties )SetHeight (h _da .Distance ){_cd .ensureXfrm ();if _cd ._fdd .Xfrm .Ext ==nil {_cd ._fdd .Xfrm .Ext =_ge .NewCT_PositiveSize2D ();};_cd ._fdd .Xfrm .Ext .CyAttr =int64 (h /_da .EMU );};
// SetFlipVertical controls if the shape is flipped vertically.
func (_ab ShapeProperties )SetFlipVertical (b bool ){_ab .ensureXfrm ();if !b {_ab ._fdd .Xfrm .FlipVAttr =nil ;}else {_ab ._fdd .Xfrm .FlipVAttr =_b .Bool (true );};};
// GetPosition gets the position of the shape in EMU.
func (_ce ShapeProperties )GetPosition ()(int64 ,int64 ){_ce .ensureXfrm ();if _ce ._fdd .Xfrm .Off ==nil {_ce ._fdd .Xfrm .Off =_ge .NewCT_Point2D ();};return *_ce ._fdd .Xfrm .Off .XAttr .ST_CoordinateUnqualified ,*_ce ._fdd .Xfrm .Off .YAttr .ST_CoordinateUnqualified ;};
// SetPosition sets the position of the shape.
func (_agd ShapeProperties )SetPosition (x ,y _da .Distance ){_agd .ensureXfrm ();if _agd ._fdd .Xfrm .Off ==nil {_agd ._fdd .Xfrm .Off =_ge .NewCT_Point2D ();};_agd ._fdd .Xfrm .Off .XAttr .ST_CoordinateUnqualified =_b .Int64 (int64 (x /_da .EMU ));_agd ._fdd .Xfrm .Off .YAttr .ST_CoordinateUnqualified =_b .Int64 (int64 (y /_da .EMU ));};
// SetGeometry sets the shape type of the shape
func (_fbd ShapeProperties )SetGeometry (g _fb .ST_ShapeType ){if _fbd ._fa .PrstGeom ==nil {_fbd ._fa .PrstGeom =_fb .NewCT_PresetGeometry2D ();};_fbd ._fa .PrstGeom .PrstAttr =g ;};
// SetSize sets the font size of the run text
func (_gaa RunProperties )SetSize (sz _da .Distance ){_gaa ._ag .SzAttr =_b .Int32 (int32 (sz /_da .HundredthPoint ));};func (_ec ShapeProperties )SetSolidFill (c _d .Color ){_ec .clearFill ();_ec ._fdd .SolidFill =_ge .NewCT_SolidColorFillProperties ();_ec ._fdd .SolidFill .SrgbClr =_ge .NewCT_SRgbColor ();_ec ._fdd .SolidFill .SrgbClr .ValAttr =*c .AsRGBString ();};func (_dcd ShapeProperties )SetNoFill (){_dcd .clearFill ();_dcd ._fdd .NoFill =_ge .NewCT_NoFillProperties ();};
func (_ed RunProperties )SetSize (sz _fc .Distance ){_ed ._eg .SzAttr =_f .Int32 (int32 (sz /_fc .HundredthPoint ));};
// SetLevel sets the level of indentation of a paragraph.
func (_dc ParagraphProperties )SetLevel (idx int32 ){_dc ._dec .LvlAttr =_b .Int32 (idx )};
// Properties returns the paragraph properties.
func (_ge Paragraph )Properties ()ParagraphProperties {if _ge ._bbc .PPr ==nil {_ge ._bbc .PPr =_fb .NewCT_TextParagraphProperties ();};return MakeParagraphProperties (_ge ._bbc .PPr );};
// SetWidth sets the width of the shape.
func (_gbc ShapeProperties )SetWidth (w _da .Distance ){_gbc .ensureXfrm ();if _gbc ._fdd .Xfrm .Ext ==nil {_gbc ._fdd .Xfrm .Ext =_ge .NewCT_PositiveSize2D ();};_gbc ._fdd .Xfrm .Ext .CxAttr =int64 (w /_da .EMU );};
// SetText sets the run's text contents.
func (_ff Run )SetText (s string ){_ff ._bea .Br =nil ;_ff ._bea .Fld =nil ;if _ff ._bea .R ==nil {_ff ._bea .R =_fb .NewCT_RegularTextRun ();};_ff ._bea .R .T =s ;};func (_bb LineProperties )SetSolidFill (c _b .Color ){_bb .clearFill ();_bb ._g .SolidFill =_fb .NewCT_SolidColorFillProperties ();_bb ._g .SolidFill .SrgbClr =_fb .NewCT_SRgbColor ();_bb ._g .SolidFill .SrgbClr .ValAttr =*c .AsRGBString ();};func (_aac ShapeProperties )SetNoFill (){_aac .clearFill ();_aac ._fa .NoFill =_fb .NewCT_NoFillProperties ();};
// SetSolidFill controls the text color of a run.
func (_dbc RunProperties )SetSolidFill (c _b .Color ){_dbc ._eg .NoFill =nil ;_dbc ._eg .BlipFill =nil ;_dbc ._eg .GradFill =nil ;_dbc ._eg .GrpFill =nil ;_dbc ._eg .PattFill =nil ;_dbc ._eg .SolidFill =_fb .NewCT_SolidColorFillProperties ();_dbc ._eg .SolidFill .SrgbClr =_fb .NewCT_SRgbColor ();_dbc ._eg .SolidFill .SrgbClr .ValAttr =*c .AsRGBString ();};
// SetFlipHorizontal controls if the shape is flipped horizontally.
func (_bad ShapeProperties )SetFlipHorizontal (b bool ){_bad .ensureXfrm ();if !b {_bad ._fa .Xfrm .FlipHAttr =nil ;}else {_bad ._fa .Xfrm .FlipHAttr =_f .Bool (true );};};
// MakeParagraph constructs a new paragraph wrapper.
func MakeParagraph (x *_fb .CT_TextParagraph )Paragraph {return Paragraph {x }};
// SetFont controls the font of a run.
func (_gd RunProperties )SetFont (s string ){_gd ._eg .Latin =_fb .NewCT_TextFont ();_gd ._eg .Latin .TypefaceAttr =s ;};
// X returns the inner wrapped XML type.
func (_cb ParagraphProperties )X ()*_fb .CT_TextParagraphProperties {return _cb ._ad };
// SetFlipVertical controls if the shape is flipped vertically.
func (_bfb ShapeProperties )SetFlipVertical (b bool ){_bfb .ensureXfrm ();if !b {_bfb ._fa .Xfrm .FlipVAttr =nil ;}else {_bfb ._fa .Xfrm .FlipVAttr =_f .Bool (true );};};
// Paragraph is a paragraph within a document.
type Paragraph struct{_bbc *_fb .CT_TextParagraph };
// Run is a run within a paragraph.
type Run struct{_bea *_fb .EG_TextRun };
// ParagraphProperties allows controlling paragraph properties.
type ParagraphProperties struct{_ad *_fb .CT_TextParagraphProperties ;};
// SetSize sets the width and height of the shape.
func (_da ShapeProperties )SetSize (w ,h _fc .Distance ){_da .SetWidth (w );_da .SetHeight (h )};
// SetNumbered controls if bullets are numbered or not.
func (_ga ParagraphProperties )SetNumbered (scheme _fb .ST_TextAutonumberScheme ){if scheme ==_fb .ST_TextAutonumberSchemeUnset {_ga ._ad .BuAutoNum =nil ;}else {_ga ._ad .BuAutoNum =_fb .NewCT_TextAutonumberBullet ();_ga ._ad .BuAutoNum .TypeAttr =scheme ;};};
// X returns the inner wrapped XML type.
func (_ba ShapeProperties )X ()*_fb .CT_ShapeProperties {return _ba ._fa };
// RunProperties controls the run properties.
type RunProperties struct{_eg *_fb .CT_TextCharacterProperties ;};func (_ee ShapeProperties )LineProperties ()LineProperties {if _ee ._fa .Ln ==nil {_ee ._fa .Ln =_fb .NewCT_LineProperties ();};return LineProperties {_ee ._fa .Ln };};
// MakeRun constructs a new Run wrapper.
func MakeRun (x *_fb .EG_TextRun )Run {return Run {x }};const (LineJoinRound LineJoin =iota ;LineJoinBevel ;LineJoinMiter ;);func MakeShapeProperties (x *_fb .CT_ShapeProperties )ShapeProperties {return ShapeProperties {x }};func (_ae ShapeProperties )SetSolidFill (c _b .Color ){_ae .clearFill ();_ae ._fa .SolidFill =_fb .NewCT_SolidColorFillProperties ();_ae ._fa .SolidFill .SrgbClr =_fb .NewCT_SRgbColor ();_ae ._fa .SolidFill .SrgbClr .ValAttr =*c .AsRGBString ();};
// SetBulletFont controls the font for the bullet character.
func (_gb ParagraphProperties )SetBulletFont (f string ){if f ==""{_gb ._dec .BuFont =nil ;}else {_gb ._dec .BuFont =_ge .NewCT_TextFont ();_gb ._dec .BuFont .TypefaceAttr =f ;};};
func (_db ParagraphProperties )SetBulletFont (f string ){if f ==""{_db ._ad .BuFont =nil ;}else {_db ._ad .BuFont =_fb .NewCT_TextFont ();_db ._ad .BuFont .TypefaceAttr =f ;};};type ShapeProperties struct{_fa *_fb .CT_ShapeProperties };
// LineJoin is the type of line join
type LineJoin byte ;
// Properties returns the paragraph properties.
func (_be Paragraph )Properties ()ParagraphProperties {if _be ._bg .PPr ==nil {_be ._bg .PPr =_ge .NewCT_TextParagraphProperties ();};return MakeParagraphProperties (_be ._bg .PPr );};
// X returns the inner wrapped XML type.
func (_a LineProperties )X ()*_fb .CT_LineProperties {return _a ._g };
// X returns the inner wrapped XML type.
func (_dd Paragraph )X ()*_fb .CT_TextParagraph {return _dd ._bbc };
// GetPosition gets the position of the shape in EMU.
func (_dg ShapeProperties )GetPosition ()(int64 ,int64 ){_dg .ensureXfrm ();if _dg ._fa .Xfrm .Off ==nil {_dg ._fa .Xfrm .Off =_fb .NewCT_Point2D ();};return *_dg ._fa .Xfrm .Off .XAttr .ST_CoordinateUnqualified ,*_dg ._fa .Xfrm .Off .YAttr .ST_CoordinateUnqualified ;};
// AddRun adds a new run to a paragraph.
func (_eb Paragraph )AddRun ()Run {_ga :=MakeRun (_ge .NewEG_TextRun ());_eb ._bg .EG_TextRun =append (_eb ._bg .EG_TextRun ,_ga .X ());return _ga ;};func (_eeb ShapeProperties )LineProperties ()LineProperties {if _eeb ._fdd .Ln ==nil {_eeb ._fdd .Ln =_ge .NewCT_LineProperties ();};return LineProperties {_eeb ._fdd .Ln };};
func (_gb Paragraph )AddRun ()Run {_c :=MakeRun (_fb .NewEG_TextRun ());_gb ._bbc .EG_TextRun =append (_gb ._bbc .EG_TextRun ,_c .X ());return _c ;};
// Run is a run within a paragraph.
type Run struct{_ac *_ge .EG_TextRun };
// AddBreak adds a new line break to a paragraph.
func (_be Paragraph )AddBreak (){_fbe :=_fb .NewEG_TextRun ();_fbe .Br =_fb .NewCT_TextLineBreak ();_be ._bbc .EG_TextRun =append (_be ._bbc .EG_TextRun ,_fbe );};
// SetFlipHorizontal controls if the shape is flipped horizontally.
func (_fa ShapeProperties )SetFlipHorizontal (b bool ){_fa .ensureXfrm ();if !b {_fa ._fdd .Xfrm .FlipHAttr =nil ;}else {_fa ._fdd .Xfrm .FlipHAttr =_b .Bool (true );};};type ShapeProperties struct{_fdd *_ge .CT_ShapeProperties };
// SetJoin sets the line join style.
func (_e LineProperties )SetJoin (e LineJoin ){_e ._g .Round =nil ;_e ._g .Miter =nil ;_e ._g .Bevel =nil ;switch e {case LineJoinRound :_e ._g .Round =_fb .NewCT_LineJoinRound ();case LineJoinBevel :_e ._g .Bevel =_fb .NewCT_LineJoinBevel ();case LineJoinMiter :_e ._g .Miter =_fb .NewCT_LineJoinMiterProperties ();};};
// SetFont controls the font of a run.
func (_bgf RunProperties )SetFont (s string ){_bgf ._ag .Latin =_ge .NewCT_TextFont ();_bgf ._ag .Latin .TypefaceAttr =s ;};type LineProperties struct{_e *_ge .CT_LineProperties };
// X returns the inner wrapped XML type.
func (_ce Run )X ()*_fb .EG_TextRun {return _ce ._bea };
// SetGeometry sets the shape type of the shape
func (_ca ShapeProperties )SetGeometry (g _ge .ST_ShapeType ){if _ca ._fdd .PrstGeom ==nil {_ca ._fdd .PrstGeom =_ge .NewCT_PresetGeometry2D ();};_ca ._fdd .PrstGeom .PrstAttr =g ;};
// MakeParagraphProperties constructs a new ParagraphProperties wrapper.
func MakeParagraphProperties (x *_fb .CT_TextParagraphProperties )ParagraphProperties {return ParagraphProperties {x };};
// SetNumbered controls if bullets are numbered or not.
func (_bbe ParagraphProperties )SetNumbered (scheme _ge .ST_TextAutonumberScheme ){if scheme ==_ge .ST_TextAutonumberSchemeUnset {_bbe ._dec .BuAutoNum =nil ;}else {_bbe ._dec .BuAutoNum =_ge .NewCT_TextAutonumberBullet ();_bbe ._dec .BuAutoNum .TypeAttr =scheme ;};};func (_ee LineProperties )clearFill (){_ee ._e .NoFill =nil ;_ee ._e .GradFill =nil ;_ee ._e .SolidFill =nil ;_ee ._e .PattFill =nil ;};func MakeShapeProperties (x *_ge .CT_ShapeProperties )ShapeProperties {return ShapeProperties {x }};
// SetSolidFill controls the text color of a run.
func (_fd RunProperties )SetSolidFill (c _d .Color ){_fd ._ag .NoFill =nil ;_fd ._ag .BlipFill =nil ;_fd ._ag .GradFill =nil ;_fd ._ag .GrpFill =nil ;_fd ._ag .PattFill =nil ;_fd ._ag .SolidFill =_ge .NewCT_SolidColorFillProperties ();_fd ._ag .SolidFill .SrgbClr =_ge .NewCT_SRgbColor ();_fd ._ag .SolidFill .SrgbClr .ValAttr =*c .AsRGBString ();};
// SetText sets the run's text contents.
func (_dg Run )SetText (s string ){_dg ._ac .Br =nil ;_dg ._ac .Fld =nil ;if _dg ._ac .R ==nil {_dg ._ac .R =_ge .NewCT_RegularTextRun ();};_dg ._ac .R .T =s ;};
// SetHeight sets the height of the shape.
func (_fcb ShapeProperties )SetHeight (h _fc .Distance ){_fcb .ensureXfrm ();if _fcb ._fa .Xfrm .Ext ==nil {_fcb ._fa .Xfrm .Ext =_fb .NewCT_PositiveSize2D ();};_fcb ._fa .Xfrm .Ext .CyAttr =int64 (h /_fc .EMU );};
// MakeRunProperties constructs a new RunProperties wrapper.
func MakeRunProperties (x *_ge .CT_TextCharacterProperties )RunProperties {return RunProperties {x }};func (_cg ShapeProperties )ensureXfrm (){if _cg ._fdd .Xfrm ==nil {_cg ._fdd .Xfrm =_ge .NewCT_Transform2D ();};};func (_eec ShapeProperties )clearFill (){_eec ._fdd .NoFill =nil ;_eec ._fdd .BlipFill =nil ;_eec ._fdd .GradFill =nil ;_eec ._fdd .GrpFill =nil ;_eec ._fdd .SolidFill =nil ;_eec ._fdd .PattFill =nil ;};
func MakeRunProperties (x *_fb .CT_TextCharacterProperties )RunProperties {return RunProperties {x }};func (_gbb ShapeProperties )clearFill (){_gbb ._fa .NoFill =nil ;_gbb ._fa .BlipFill =nil ;_gbb ._fa .GradFill =nil ;_gbb ._fa .GrpFill =nil ;_gbb ._fa .SolidFill =nil ;_gbb ._fa .PattFill =nil ;};
// SetBold controls the bolding of a run.
func (_ea RunProperties )SetBold (b bool ){_ea ._eg .BAttr =_f .Bool (b )};
// SetBulletChar sets the bullet character for the paragraph.
func (_cg ParagraphProperties )SetBulletChar (c string ){if c ==""{_cg ._ad .BuChar =nil ;}else {_cg ._ad .BuChar =_fb .NewCT_TextCharBullet ();_cg ._ad .BuChar .CharAttr =c ;};};func (_aa LineProperties )SetNoFill (){_aa .clearFill ();_aa ._g .NoFill =_fb .NewCT_NoFillProperties ()};
// SetPosition sets the position of the shape.
func (_cd ShapeProperties )SetPosition (x ,y _fc .Distance ){_cd .ensureXfrm ();if _cd ._fa .Xfrm .Off ==nil {_cd ._fa .Xfrm .Off =_fb .NewCT_Point2D ();};_cd ._fa .Xfrm .Off .XAttr .ST_CoordinateUnqualified =_f .Int64 (int64 (x /_fc .EMU ));_cd ._fa .Xfrm .Off .YAttr .ST_CoordinateUnqualified =_f .Int64 (int64 (y /_fc .EMU ));};type LineProperties struct{_g *_fb .CT_LineProperties };
// SetWidth sets the width of the shape.
func (_bff ShapeProperties )SetWidth (w _fc .Distance ){_bff .ensureXfrm ();if _bff ._fa .Xfrm .Ext ==nil {_bff ._fa .Xfrm .Ext =_fb .NewCT_PositiveSize2D ();};_bff ._fa .Xfrm .Ext .CxAttr =int64 (w /_fc .EMU );};
// SetLevel sets the level of indentation of a paragraph.
func (_eb ParagraphProperties )SetLevel (idx int32 ){_eb ._ad .LvlAttr =_f .Int32 (idx )};
// SetWidth sets the line width, MS products treat zero as the minimum width
// that can be displayed.
func (_bg LineProperties )SetWidth (w _fc .Distance ){_bg ._g .WAttr =_f .Int32 (int32 (w /_fc .EMU ))};
// Properties returns the run's properties.
func (_fca Run )Properties ()RunProperties {if _fca ._bea .R ==nil {_fca ._bea .R =_fb .NewCT_RegularTextRun ();};if _fca ._bea .R .RPr ==nil {_fca ._bea .R .RPr =_fb .NewCT_TextCharacterProperties ();};return RunProperties {_fca ._bea .R .RPr };};func (_dc ShapeProperties )ensureXfrm (){if _dc ._fa .Xfrm ==nil {_dc ._fa .Xfrm =_fb .NewCT_Transform2D ();};};func (_bf LineProperties )clearFill (){_bf ._g .NoFill =nil ;_bf ._g .GradFill =nil ;_bf ._g .SolidFill =nil ;_bf ._g .PattFill =nil ;};

File diff suppressed because one or more lines are too long

View File

@ -9,4 +9,4 @@
// 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 mergesort ;func MergeSort (array []float64 )[]float64 {if len (array )<=1{_a :=make ([]float64 ,len (array ));copy (_a ,array );return _a ;};_bd :=len (array )/2;_af :=MergeSort (array [:_bd ]);_f :=MergeSort (array [_bd :]);_e :=make ([]float64 ,len (array ));_ea :=0;_ab :=0;_ff :=0;for _ab < len (_af )&&_ff < len (_f ){if _af [_ab ]<=_f [_ff ]{_e [_ea ]=_af [_ab ];_ab ++;}else {_e [_ea ]=_f [_ff ];_ff ++;};_ea ++;};for _ab < len (_af ){_e [_ea ]=_af [_ab ];_ab ++;_ea ++;};for _ff < len (_f ){_e [_ea ]=_f [_ff ];_ff ++;_ea ++;};return _e ;};
package mergesort ;func MergeSort (array []float64 )[]float64 {if len (array )<=1{_c :=make ([]float64 ,len (array ));copy (_c ,array );return _c ;};_f :=len (array )/2;_a :=MergeSort (array [:_f ]);_g :=MergeSort (array [_f :]);_b :=make ([]float64 ,len (array ));_bg :=0;_e :=0;_df :=0;for _e < len (_a )&&_df < len (_g ){if _a [_e ]<=_g [_df ]{_b [_bg ]=_a [_e ];_e ++;}else {_b [_bg ]=_g [_df ];_df ++;};_bg ++;};for _e < len (_a ){_b [_bg ]=_a [_e ];_e ++;_bg ++;};for _df < len (_g ){_b [_bg ]=_g [_df ];_df ++;_bg ++;};return _b ;};

View File

@ -9,4 +9,4 @@
// 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 wildcard ;func Match (pattern ,name string )(_ge bool ){if pattern ==""{return name ==pattern ;};if pattern =="\u002a"{return true ;};_gb :=make ([]rune ,0,len (name ));_bc :=make ([]rune ,0,len (pattern ));for _ ,_fe :=range name {_gb =append (_gb ,_fe );};for _ ,_de :=range pattern {_bc =append (_bc ,_de );};_dc :=false ;return _c (_gb ,_bc ,_dc );};func _db (_fcd ,_bg []rune ,_ac int )int {for len (_bg )> 0{switch _bg [0]{default:if len (_fcd )==0{return -1;};if _fcd [0]!=_bg [0]{return _db (_fcd [1:],_bg ,_ac +1);};case '?':if len (_fcd )==0{return -1;};case '*':if len (_fcd )==0{return -1;};_fdc :=_db (_fcd ,_bg [1:],_ac );if _fdc !=-1{return _ac ;}else {_fdc =_db (_fcd [1:],_bg ,_ac );if _fdc !=-1{return _ac ;}else {return -1;};};};_fcd =_fcd [1:];_bg =_bg [1:];};return _ac ;};func Index (pattern ,name string )(_bd int ){if pattern ==""||pattern =="\u002a"{return 0;};_bda :=make ([]rune ,0,len (name ));_da :=make ([]rune ,0,len (pattern ));for _ ,_fg :=range name {_bda =append (_bda ,_fg );};for _ ,_bcd :=range pattern {_da =append (_da ,_bcd );};return _db (_bda ,_da ,0);};func MatchSimple (pattern ,name string )bool {if pattern ==""{return name ==pattern ;};if pattern =="\u002a"{return true ;};_d :=make ([]rune ,0,len (name ));_f :=make ([]rune ,0,len (pattern ));for _ ,_ff :=range name {_d =append (_d ,_ff );};for _ ,_a :=range pattern {_f =append (_f ,_a );};_g :=true ;return _c (_d ,_f ,_g );};func _c (_gf ,_cd []rune ,_fc bool )bool {for len (_cd )> 0{switch _cd [0]{default:if len (_gf )==0||_gf [0]!=_cd [0]{return false ;};case '?':if len (_gf )==0&&!_fc {return false ;};case '*':return _c (_gf ,_cd [1:],_fc )||(len (_gf )> 0&&_c (_gf [1:],_cd ,_fc ));};_gf =_gf [1:];_cd =_cd [1:];};return len (_gf )==0&&len (_cd )==0;};
package wildcard ;func _ce (_df ,_dbgc []rune ,_gbf int )int {for len (_dbgc )> 0{switch _dbgc [0]{default:if len (_df )==0{return -1;};if _df [0]!=_dbgc [0]{return _ce (_df [1:],_dbgc ,_gbf +1);};case '?':if len (_df )==0{return -1;};case '*':if len (_df )==0{return -1;};_aed :=_ce (_df ,_dbgc [1:],_gbf );if _aed !=-1{return _gbf ;}else {_aed =_ce (_df [1:],_dbgc ,_gbf );if _aed !=-1{return _gbf ;}else {return -1;};};};_df =_df [1:];_dbgc =_dbgc [1:];};return _gbf ;};func Index (pattern ,name string )(_fg int ){if pattern ==""||pattern =="\u002a"{return 0;};_dbg :=make ([]rune ,0,len (name ));_gdg :=make ([]rune ,0,len (pattern ));for _ ,_fa :=range name {_dbg =append (_dbg ,_fa );};for _ ,_ed :=range pattern {_gdg =append (_gdg ,_ed );};return _ce (_dbg ,_gdg ,0);};func _agg (_gd ,_egc []rune ,_agf bool )bool {for len (_egc )> 0{switch _egc [0]{default:if len (_gd )==0||_gd [0]!=_egc [0]{return false ;};case '?':if len (_gd )==0&&!_agf {return false ;};case '*':return _agg (_gd ,_egc [1:],_agf )||(len (_gd )> 0&&_agg (_gd [1:],_egc ,_agf ));};_gd =_gd [1:];_egc =_egc [1:];};return len (_gd )==0&&len (_egc )==0;};func Match (pattern ,name string )(_db bool ){if pattern ==""{return name ==pattern ;};if pattern =="\u002a"{return true ;};_eg :=make ([]rune ,0,len (name ));_ec :=make ([]rune ,0,len (pattern ));for _ ,_gb :=range name {_eg =append (_eg ,_gb );};for _ ,_ag :=range pattern {_ec =append (_ec ,_ag );};_aa :=false ;return _agg (_eg ,_ec ,_aa );};func MatchSimple (pattern ,name string )bool {if pattern ==""{return name ==pattern ;};if pattern =="\u002a"{return true ;};_b :=make ([]rune ,0,len (name ));_g :=make ([]rune ,0,len (pattern ));for _ ,_a :=range name {_b =append (_b ,_a );};for _ ,_e :=range pattern {_g =append (_g ,_e );};_d :=true ;return _agg (_b ,_g ,_d );};

View File

@ -9,14 +9,14 @@
// 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 measurement ;const (Zero Distance =0;Point =1;Pixel72 =1.0/72.0*Inch ;Pixel96 =1.0/96.0*Inch ;HalfPoint =1.0/2.0*Point ;Character =7*Point ;Millimeter =2.83465*Point ;Centimeter =10*Millimeter ;Inch =72*Point ;Foot =12*Inch ;Twips =1.0/20.0*Point ;EMU =1.0/914400.0*Inch ;HundredthPoint =1/100.0;Dxa =Twips ;);
package measurement ;
// FromEMU converts int64 ENU units to float64 distance units.
func FromEMU (emu int64 )float64 {return float64 (emu )/914400*Inch };
// ToEMU converts float64 distance units to int64 EMU.
func ToEMU (m float64 )int64 {return int64 (914400.0/Inch *m )};const (Zero Distance =0;Point =1;Pixel72 =1.0/72.0*Inch ;Pixel96 =1.0/96.0*Inch ;HalfPoint =1.0/2.0*Point ;Character =7*Point ;Millimeter =2.83465*Point ;Centimeter =10*Millimeter ;Inch =72*Point ;Foot =12*Inch ;Twips =1.0/20.0*Point ;EMU =1.0/914400.0*Inch ;HundredthPoint =1/100.0;Dxa =Twips ;);
// Distance represents a distance and is automatically converted
// to the units needed internally in the various ECMA 376 formats.
type Distance float64 ;
// ToEMU converts float64 distance units to int64 EMU.
func ToEMU (m float64 )int64 {return int64 (914400.0/Inch *m )};
// FromEMU converts int64 ENU units to float64 distance units.
func FromEMU (emu int64 )float64 {return float64 (emu )/914400*Inch };

File diff suppressed because one or more lines are too long

View File

@ -9,34 +9,34 @@
// 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 elements ;import (_d "encoding/xml";_bg "fmt";_g "github.com/unidoc/unioffice";);
// Validate validates the ElementContainer and its children
func (_aad *ElementContainer )Validate ()error {return _aad .ValidateWithPath ("\u0045\u006ce\u006d\u0065\u006et\u0043\u006f\u006e\u0074\u0061\u0069\u006e\u0065\u0072");};func (_c *Any )UnmarshalXML (d *_d .Decoder ,start _d .StartElement )error {_c .SimpleLiteral =*NewSimpleLiteral ();for {_ca ,_fg :=d .Token ();if _fg !=nil {return _bg .Errorf ("\u0070a\u0072s\u0069\u006e\u0067\u0020\u0041\u006e\u0079\u003a\u0020\u0025\u0073",_fg );};if _a ,_db :=_ca .(_d .EndElement );_db &&_a .Name ==start .Name {break ;};};return nil ;};
// ValidateWithPath validates the Any and its children, prefixing error messages with path
func (_bd *Any )ValidateWithPath (path string )error {if _aa :=_bd .SimpleLiteral .ValidateWithPath (path );_aa !=nil {return _aa ;};return nil ;};
// Validate validates the ElementsGroupChoice and its children
func (_fe *ElementsGroupChoice )Validate ()error {return _fe .ValidateWithPath ("\u0045\u006c\u0065\u006den\u0074\u0073\u0047\u0072\u006f\u0075\u0070\u0043\u0068\u006f\u0069\u0063\u0065");};func (_gg *Any )MarshalXML (e *_d .Encoder ,start _d .StartElement )error {return _gg .SimpleLiteral .MarshalXML (e ,start );};func (_cedg *SimpleLiteral )UnmarshalXML (d *_d .Decoder ,start _d .StartElement )error {for {_ded ,_df :=d .Token ();if _df !=nil {return _bg .Errorf ("\u0070a\u0072\u0073\u0069\u006eg\u0020\u0053\u0069\u006d\u0070l\u0065L\u0069t\u0065\u0072\u0061\u006c\u003a\u0020\u0025s",_df );};if _dg ,_be :=_ded .(_d .EndElement );_be &&_dg .Name ==start .Name {break ;};};return nil ;};
// ValidateWithPath validates the ElementsGroup and its children, prefixing error messages with path
func (_ec *ElementsGroup )ValidateWithPath (path string )error {for _cbbf ,_dd :=range _ec .Choice {if _ad :=_dd .ValidateWithPath (_bg .Sprintf ("\u0025\u0073\u002f\u0043\u0068\u006f\u0069\u0063\u0065\u005b\u0025\u0064\u005d",path ,_cbbf ));_ad !=nil {return _ad ;};};return nil ;};type ElementsGroupChoice struct{Any []*Any ;};func NewElementContainer ()*ElementContainer {_cbb :=&ElementContainer {};return _cbb };func (_cea *SimpleLiteral )MarshalXML (e *_d .Encoder ,start _d .StartElement )error {e .EncodeToken (start );e .EncodeToken (_d .EndElement {Name :start .Name });return nil ;};func NewAny ()*Any {_f :=&Any {};_f .SimpleLiteral =*NewSimpleLiteral ();return _f };
// ValidateWithPath validates the ElementContainer and its children, prefixing error messages with path
func (_gd *ElementContainer )ValidateWithPath (path string )error {for _aadg ,_ggg :=range _gd .Choice {if _ea :=_ggg .ValidateWithPath (_bg .Sprintf ("\u0025\u0073\u002f\u0043\u0068\u006f\u0069\u0063\u0065\u005b\u0025\u0064\u005d",path ,_aadg ));_ea !=nil {return _ea ;};};return nil ;};func NewElementsGroup ()*ElementsGroup {_da :=&ElementsGroup {};return _da };type ElementContainer struct{Choice []*ElementsGroupChoice ;};func (_e *ElementContainer )MarshalXML (e *_d .Encoder ,start _d .StartElement )error {start .Name .Local ="\u0065\u006ce\u006d\u0065\u006et\u0043\u006f\u006e\u0074\u0061\u0069\u006e\u0065\u0072";e .EncodeToken (start );if _e .Choice !=nil {for _ ,_cf :=range _e .Choice {_cf .MarshalXML (e ,_d .StartElement {});};};e .EncodeToken (_d .EndElement {Name :start .Name });return nil ;};
// Validate validates the ElementsGroup and its children
func (_agc *ElementsGroup )Validate ()error {return _agc .ValidateWithPath ("\u0045\u006c\u0065\u006d\u0065\u006e\u0074\u0073\u0047\u0072\u006f\u0075\u0070");};func NewElementsGroupChoice ()*ElementsGroupChoice {_eeb :=&ElementsGroupChoice {};return _eeb };
// Validate validates the Any and its children
func (_cb *Any )Validate ()error {return _cb .ValidateWithPath ("\u0041\u006e\u0079")};type ElementsGroup struct{Choice []*ElementsGroupChoice ;};func (_bga *ElementsGroupChoice )MarshalXML (e *_d .Encoder ,start _d .StartElement )error {if _bga .Any !=nil {_gdb :=_d .StartElement {Name :_d .Name {Local :"\u0064\u0063\u003a\u0061\u006e\u0079"}};for _ ,_cef :=range _bga .Any {e .EncodeElement (_cef ,_gdb );};};return nil ;};
// ValidateWithPath validates the ElementsGroupChoice and its children, prefixing error messages with path
func (_cfc *ElementsGroupChoice )ValidateWithPath (path string )error {for _dcb ,_ada :=range _cfc .Any {if _gf :=_ada .ValidateWithPath (_bg .Sprintf ("\u0025\u0073\u002f\u0041\u006e\u0079\u005b\u0025\u0064\u005d",path ,_dcb ));_gf !=nil {return _gf ;};};return nil ;};func (_bf *ElementsGroup )MarshalXML (e *_d .Encoder ,start _d .StartElement )error {if _bf .Choice !=nil {for _ ,_dea :=range _bf .Choice {_dea .MarshalXML (e ,_d .StartElement {});};};return nil ;};func (_gc *ElementsGroupChoice )UnmarshalXML (d *_d .Decoder ,start _d .StartElement )error {_ced :for {_faa ,_ac :=d .Token ();if _ac !=nil {return _ac ;};switch _gace :=_faa .(type ){case _d .StartElement :switch _gace .Name {case _d .Name {Space :"\u0068\u0074\u0074\u0070\u003a\u002f\u002f\u0070\u0075\u0072\u006c\u002e\u006f\u0072\u0067/\u0064c\u002f\u0065\u006c\u0065\u006d\u0065\u006e\u0074\u0073\u002f\u0031\u002e\u0031\u002f",Local :"\u0061\u006e\u0079"}:_eec :=NewAny ();if _fd :=d .DecodeElement (_eec ,&_gace );_fd !=nil {return _fd ;};_gc .Any =append (_gc .Any ,_eec );default:_g .Log ("\u0073\u006b\u0069\u0070\u0070\u0069\u006e\u0067\u0020\u0075\u006e\u0073\u0075\u0070\u0070o\u0072\u0074\u0065\u0064\u0020\u0065\u006c\u0065\u006d\u0065\u006e\u0074\u0020o\u006e\u0020\u0045\u006c\u0065\u006d\u0065\u006e\u0074\u0073\u0047\u0072ou\u0070\u0043\u0068\u006f\u0069\u0063\u0065\u0020\u0025\u0076",_gace .Name );if _cedc :=d .Skip ();_cedc !=nil {return _cedc ;};};case _d .EndElement :break _ced ;case _d .CharData :};};return nil ;};func NewSimpleLiteral ()*SimpleLiteral {_ef :=&SimpleLiteral {};return _ef };func (_fc *ElementContainer )UnmarshalXML (d *_d .Decoder ,start _d .StartElement )error {_cab :for {_gac ,_fgd :=d .Token ();if _fgd !=nil {return _fgd ;};switch _bgd :=_gac .(type ){case _d .StartElement :switch _bgd .Name {case _d .Name {Space :"\u0068\u0074\u0074\u0070\u003a\u002f\u002f\u0070\u0075\u0072\u006c\u002e\u006f\u0072\u0067/\u0064c\u002f\u0065\u006c\u0065\u006d\u0065\u006e\u0074\u0073\u002f\u0031\u002e\u0031\u002f",Local :"\u0061\u006e\u0079"}:_de :=NewElementsGroupChoice ();if _cd :=d .DecodeElement (&_de .Any ,&_bgd );_cd !=nil {return _cd ;};_fc .Choice =append (_fc .Choice ,_de );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\u0045\u006c\u0065\u006d\u0065\u006e\u0074\u0043\u006f\u006e\u0074\u0061\u0069\u006e\u0065\u0072\u0020\u0025v",_bgd .Name );if _gb :=d .Skip ();_gb !=nil {return _gb ;};};case _d .EndElement :break _cab ;case _d .CharData :};};return nil ;};
package elements ;import (_ef "encoding/xml";_a "fmt";_g "github.com/unidoc/unioffice";);func (_fe *Any )UnmarshalXML (d *_ef .Decoder ,start _ef .StartElement )error {_fe .SimpleLiteral =*NewSimpleLiteral ();for {_d ,_db :=d .Token ();if _db !=nil {return _a .Errorf ("\u0070a\u0072s\u0069\u006e\u0067\u0020\u0041\u006e\u0079\u003a\u0020\u0025\u0073",_db );};if _ga ,_b :=_d .(_ef .EndElement );_b &&_ga .Name ==start .Name {break ;};};return nil ;};
// ValidateWithPath validates the SimpleLiteral and its children, prefixing error messages with path
func (_efb *SimpleLiteral )ValidateWithPath (path string )error {return nil };func (_ce *ElementsGroup )UnmarshalXML (d *_d .Decoder ,start _d .StartElement )error {_gdf :for {_fa ,_dc :=d .Token ();if _dc !=nil {return _dc ;};switch _ee :=_fa .(type ){case _d .StartElement :switch _ee .Name {case _d .Name {Space :"\u0068\u0074\u0074\u0070\u003a\u002f\u002f\u0070\u0075\u0072\u006c\u002e\u006f\u0072\u0067/\u0064c\u002f\u0065\u006c\u0065\u006d\u0065\u006e\u0074\u0073\u002f\u0031\u002e\u0031\u002f",Local :"\u0061\u006e\u0079"}:_ab :=NewElementsGroupChoice ();if _gbe :=d .DecodeElement (&_ab .Any ,&_ee );_gbe !=nil {return _gbe ;};_ce .Choice =append (_ce .Choice ,_ab );default:_g .Log ("\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\u0045\u006c\u0065\u006de\u006e\u0074\u0073\u0047\u0072\u006f\u0075\u0070 \u0025\u0076",_ee .Name );if _ag :=d .Skip ();_ag !=nil {return _ag ;};};case _d .EndElement :break _gdf ;case _d .CharData :};};return nil ;};type Any struct{SimpleLiteral };type SimpleLiteral struct{};
func (_gaee *SimpleLiteral )ValidateWithPath (path string )error {return nil };func NewElementsGroupChoice ()*ElementsGroupChoice {_ac :=&ElementsGroupChoice {};return _ac };type SimpleLiteral struct{};func NewElementContainer ()*ElementContainer {_eg :=&ElementContainer {};return _eg };
// Validate validates the Any and its children
func (_dbe *Any )Validate ()error {return _dbe .ValidateWithPath ("\u0041\u006e\u0079")};
// ValidateWithPath validates the Any and its children, prefixing error messages with path
func (_fc *Any )ValidateWithPath (path string )error {if _ee :=_fc .SimpleLiteral .ValidateWithPath (path );_ee !=nil {return _ee ;};return nil ;};
// ValidateWithPath validates the ElementContainer and its children, prefixing error messages with path
func (_fcc *ElementContainer )ValidateWithPath (path string )error {for _c ,_df :=range _fcc .Choice {if _cf :=_df .ValidateWithPath (_a .Sprintf ("\u0025\u0073\u002f\u0043\u0068\u006f\u0069\u0063\u0065\u005b\u0025\u0064\u005d",path ,_c ));_cf !=nil {return _cf ;};};return nil ;};func (_fef *ElementsGroupChoice )MarshalXML (e *_ef .Encoder ,start _ef .StartElement )error {if _fef .Any !=nil {_cb :=_ef .StartElement {Name :_ef .Name {Local :"\u0064\u0063\u003a\u0061\u006e\u0079"}};for _ ,_gaec :=range _fef .Any {e .EncodeElement (_gaec ,_cb );};};return nil ;};func (_af *ElementsGroup )MarshalXML (e *_ef .Encoder ,start _ef .StartElement )error {if _af .Choice !=nil {for _ ,_fab :=range _af .Choice {_fab .MarshalXML (e ,_ef .StartElement {});};};return nil ;};func (_f *Any )MarshalXML (e *_ef .Encoder ,start _ef .StartElement )error {return _f .SimpleLiteral .MarshalXML (e ,start );};
// Validate validates the ElementContainer and its children
func (_fag *ElementContainer )Validate ()error {return _fag .ValidateWithPath ("\u0045\u006ce\u006d\u0065\u006et\u0043\u006f\u006e\u0074\u0061\u0069\u006e\u0065\u0072");};func (_ba *ElementContainer )UnmarshalXML (d *_ef .Decoder ,start _ef .StartElement )error {_ab :for {_eb ,_gae :=d .Token ();if _gae !=nil {return _gae ;};switch _de :=_eb .(type ){case _ef .StartElement :switch _de .Name {case _ef .Name {Space :"\u0068\u0074\u0074\u0070\u003a\u002f\u002f\u0070\u0075\u0072\u006c\u002e\u006f\u0072\u0067/\u0064c\u002f\u0065\u006c\u0065\u006d\u0065\u006e\u0074\u0073\u002f\u0031\u002e\u0031\u002f",Local :"\u0061\u006e\u0079"}:_fa :=NewElementsGroupChoice ();if _gc :=d .DecodeElement (&_fa .Any ,&_de );_gc !=nil {return _gc ;};_ba .Choice =append (_ba .Choice ,_fa );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\u0045\u006c\u0065\u006d\u0065\u006e\u0074\u0043\u006f\u006e\u0074\u0061\u0069\u006e\u0065\u0072\u0020\u0025v",_de .Name );if _dg :=d .Skip ();_dg !=nil {return _dg ;};};case _ef .EndElement :break _ab ;case _ef .CharData :};};return nil ;};type ElementContainer struct{Choice []*ElementsGroupChoice ;};
// Validate validates the ElementsGroup and its children
func (_aa *ElementsGroup )Validate ()error {return _aa .ValidateWithPath ("\u0045\u006c\u0065\u006d\u0065\u006e\u0074\u0073\u0047\u0072\u006f\u0075\u0070");};
// ValidateWithPath validates the ElementsGroup and its children, prefixing error messages with path
func (_bbb *ElementsGroup )ValidateWithPath (path string )error {for _cfg ,_da :=range _bbb .Choice {if _cff :=_da .ValidateWithPath (_a .Sprintf ("\u0025\u0073\u002f\u0043\u0068\u006f\u0069\u0063\u0065\u005b\u0025\u0064\u005d",path ,_cfg ));_cff !=nil {return _cff ;};};return nil ;};func (_cg *ElementsGroupChoice )UnmarshalXML (d *_ef .Decoder ,start _ef .StartElement )error {_bd :for {_gba ,_aad :=d .Token ();if _aad !=nil {return _aad ;};switch _cgd :=_gba .(type ){case _ef .StartElement :switch _cgd .Name {case _ef .Name {Space :"\u0068\u0074\u0074\u0070\u003a\u002f\u002f\u0070\u0075\u0072\u006c\u002e\u006f\u0072\u0067/\u0064c\u002f\u0065\u006c\u0065\u006d\u0065\u006e\u0074\u0073\u002f\u0031\u002e\u0031\u002f",Local :"\u0061\u006e\u0079"}:_gbb :=NewAny ();if _dfd :=d .DecodeElement (_gbb ,&_cgd );_dfd !=nil {return _dfd ;};_cg .Any =append (_cg .Any ,_gbb );default:_g .Log ("\u0073\u006b\u0069\u0070\u0070\u0069\u006e\u0067\u0020\u0075\u006e\u0073\u0075\u0070\u0070o\u0072\u0074\u0065\u0064\u0020\u0065\u006c\u0065\u006d\u0065\u006e\u0074\u0020o\u006e\u0020\u0045\u006c\u0065\u006d\u0065\u006e\u0074\u0073\u0047\u0072ou\u0070\u0043\u0068\u006f\u0069\u0063\u0065\u0020\u0025\u0076",_cgd .Name );if _bfe :=d .Skip ();_bfe !=nil {return _bfe ;};};case _ef .EndElement :break _bd ;case _ef .CharData :};};return nil ;};func (_gf *ElementContainer )MarshalXML (e *_ef .Encoder ,start _ef .StartElement )error {start .Name .Local ="\u0065\u006ce\u006d\u0065\u006et\u0043\u006f\u006e\u0074\u0061\u0069\u006e\u0065\u0072";e .EncodeToken (start );if _gf .Choice !=nil {for _ ,_bb :=range _gf .Choice {_bb .MarshalXML (e ,_ef .StartElement {});};};e .EncodeToken (_ef .EndElement {Name :start .Name });return nil ;};
// ValidateWithPath validates the ElementsGroupChoice and its children, prefixing error messages with path
func (_deg *ElementsGroupChoice )ValidateWithPath (path string )error {for _dfde ,_fcg :=range _deg .Any {if _dc :=_fcg .ValidateWithPath (_a .Sprintf ("\u0025\u0073\u002f\u0041\u006e\u0079\u005b\u0025\u0064\u005d",path ,_dfde ));_dc !=nil {return _dc ;};};return nil ;};type ElementsGroupChoice struct{Any []*Any ;};type ElementsGroup struct{Choice []*ElementsGroupChoice ;};func NewSimpleLiteral ()*SimpleLiteral {_gcc :=&SimpleLiteral {};return _gcc };func NewElementsGroup ()*ElementsGroup {_ag :=&ElementsGroup {};return _ag };func NewAny ()*Any {_ec :=&Any {};_ec .SimpleLiteral =*NewSimpleLiteral ();return _ec };func (_ecd *SimpleLiteral )MarshalXML (e *_ef .Encoder ,start _ef .StartElement )error {e .EncodeToken (start );e .EncodeToken (_ef .EndElement {Name :start .Name });return nil ;};func (_ea *SimpleLiteral )UnmarshalXML (d *_ef .Decoder ,start _ef .StartElement )error {for {_fea ,_fcgf :=d .Token ();if _fcgf !=nil {return _a .Errorf ("\u0070a\u0072\u0073\u0069\u006eg\u0020\u0053\u0069\u006d\u0070l\u0065L\u0069t\u0065\u0072\u0061\u006c\u003a\u0020\u0025s",_fcgf );};if _dca ,_eca :=_fea .(_ef .EndElement );_eca &&_dca .Name ==start .Name {break ;};};return nil ;};func (_ca *ElementsGroup )UnmarshalXML (d *_ef .Decoder ,start _ef .StartElement )error {_gb :for {_ad ,_feb :=d .Token ();if _feb !=nil {return _feb ;};switch _be :=_ad .(type ){case _ef .StartElement :switch _be .Name {case _ef .Name {Space :"\u0068\u0074\u0074\u0070\u003a\u002f\u002f\u0070\u0075\u0072\u006c\u002e\u006f\u0072\u0067/\u0064c\u002f\u0065\u006c\u0065\u006d\u0065\u006e\u0074\u0073\u002f\u0031\u002e\u0031\u002f",Local :"\u0061\u006e\u0079"}:_bf :=NewElementsGroupChoice ();if _bef :=d .DecodeElement (&_bf .Any ,&_be );_bef !=nil {return _bef ;};_ca .Choice =append (_ca .Choice ,_bf );default:_g .Log ("\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\u0045\u006c\u0065\u006de\u006e\u0074\u0073\u0047\u0072\u006f\u0075\u0070 \u0025\u0076",_be .Name );if _dde :=d .Skip ();_dde !=nil {return _dde ;};};case _ef .EndElement :break _gb ;case _ef .CharData :};};return nil ;};type Any struct{SimpleLiteral };
// Validate validates the SimpleLiteral and its children
func (_gbb *SimpleLiteral )Validate ()error {return _gbb .ValidateWithPath ("\u0053\u0069\u006d\u0070\u006c\u0065\u004c\u0069\u0074\u0065\u0072\u0061\u006c");};func init (){_g .RegisterConstructor ("\u0068\u0074\u0074\u0070\u003a\u002f\u002f\u0070\u0075\u0072\u006c\u002e\u006f\u0072\u0067/\u0064c\u002f\u0065\u006c\u0065\u006d\u0065\u006e\u0074\u0073\u002f\u0031\u002e\u0031\u002f","\u0053\u0069\u006d\u0070\u006c\u0065\u004c\u0069\u0074\u0065\u0072\u0061\u006c",NewSimpleLiteral );_g .RegisterConstructor ("\u0068\u0074\u0074\u0070\u003a\u002f\u002f\u0070\u0075\u0072\u006c\u002e\u006f\u0072\u0067/\u0064c\u002f\u0065\u006c\u0065\u006d\u0065\u006e\u0074\u0073\u002f\u0031\u002e\u0031\u002f","\u0065\u006ce\u006d\u0065\u006et\u0043\u006f\u006e\u0074\u0061\u0069\u006e\u0065\u0072",NewElementContainer );_g .RegisterConstructor ("\u0068\u0074\u0074\u0070\u003a\u002f\u002f\u0070\u0075\u0072\u006c\u002e\u006f\u0072\u0067/\u0064c\u002f\u0065\u006c\u0065\u006d\u0065\u006e\u0074\u0073\u002f\u0031\u002e\u0031\u002f","\u0061\u006e\u0079",NewAny );_g .RegisterConstructor ("\u0068\u0074\u0074\u0070\u003a\u002f\u002f\u0070\u0075\u0072\u006c\u002e\u006f\u0072\u0067/\u0064c\u002f\u0065\u006c\u0065\u006d\u0065\u006e\u0074\u0073\u002f\u0031\u002e\u0031\u002f","\u0065\u006c\u0065\u006d\u0065\u006e\u0074\u0073\u0047\u0072\u006f\u0075\u0070",NewElementsGroup );};
func (_def *SimpleLiteral )Validate ()error {return _def .ValidateWithPath ("\u0053\u0069\u006d\u0070\u006c\u0065\u004c\u0069\u0074\u0065\u0072\u0061\u006c");};
// Validate validates the ElementsGroupChoice and its children
func (_gfe *ElementsGroupChoice )Validate ()error {return _gfe .ValidateWithPath ("\u0045\u006c\u0065\u006den\u0074\u0073\u0047\u0072\u006f\u0075\u0070\u0043\u0068\u006f\u0069\u0063\u0065");};func init (){_g .RegisterConstructor ("\u0068\u0074\u0074\u0070\u003a\u002f\u002f\u0070\u0075\u0072\u006c\u002e\u006f\u0072\u0067/\u0064c\u002f\u0065\u006c\u0065\u006d\u0065\u006e\u0074\u0073\u002f\u0031\u002e\u0031\u002f","\u0053\u0069\u006d\u0070\u006c\u0065\u004c\u0069\u0074\u0065\u0072\u0061\u006c",NewSimpleLiteral );_g .RegisterConstructor ("\u0068\u0074\u0074\u0070\u003a\u002f\u002f\u0070\u0075\u0072\u006c\u002e\u006f\u0072\u0067/\u0064c\u002f\u0065\u006c\u0065\u006d\u0065\u006e\u0074\u0073\u002f\u0031\u002e\u0031\u002f","\u0065\u006ce\u006d\u0065\u006et\u0043\u006f\u006e\u0074\u0061\u0069\u006e\u0065\u0072",NewElementContainer );_g .RegisterConstructor ("\u0068\u0074\u0074\u0070\u003a\u002f\u002f\u0070\u0075\u0072\u006c\u002e\u006f\u0072\u0067/\u0064c\u002f\u0065\u006c\u0065\u006d\u0065\u006e\u0074\u0073\u002f\u0031\u002e\u0031\u002f","\u0061\u006e\u0079",NewAny );_g .RegisterConstructor ("\u0068\u0074\u0074\u0070\u003a\u002f\u002f\u0070\u0075\u0072\u006c\u002e\u006f\u0072\u0067/\u0064c\u002f\u0065\u006c\u0065\u006d\u0065\u006e\u0074\u0073\u002f\u0031\u002e\u0031\u002f","\u0065\u006c\u0065\u006d\u0065\u006e\u0074\u0073\u0047\u0072\u006f\u0075\u0070",NewElementsGroup );};

View File

@ -9,124 +9,124 @@
// 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 terms ;import (_f "encoding/xml";_d "fmt";_fd "github.com/unidoc/unioffice";_ff "github.com/unidoc/unioffice/schema/purl.org/dc/elements";);
// Validate validates the ElementOrRefinementContainer and its children
func (_fb *ElementOrRefinementContainer )Validate ()error {return _fb .ValidateWithPath ("\u0045\u006c\u0065\u006de\u006e\u0074\u004f\u0072\u0052\u0065\u0066\u0069\u006e\u0065m\u0065n\u0074\u0043\u006f\u006e\u0074\u0061\u0069n\u0065\u0072");};
// ValidateWithPath validates the LCSH and its children, prefixing error messages with path
func (_fdb *LCSH )ValidateWithPath (path string )error {return nil };func NewISO639_2 ()*ISO639_2 {_cb :=&ISO639_2 {};return _cb };func (_fef *DDC )UnmarshalXML (d *_f .Decoder ,start _f .StartElement )error {for {_bb ,_bg :=d .Token ();if _bg !=nil {return _d .Errorf ("\u0070a\u0072s\u0069\u006e\u0067\u0020\u0044\u0044\u0043\u003a\u0020\u0025\u0073",_bg );};if _ba ,_ec :=_bb .(_f .EndElement );_ec &&_ba .Name ==start .Name {break ;};};return nil ;};type RFC3066 struct{};
package terms ;import (_a "encoding/xml";_d "fmt";_dg "github.com/unidoc/unioffice";_f "github.com/unidoc/unioffice/schema/purl.org/dc/elements";);
// Validate validates the TGN and its children
func (_ebb *TGN )Validate ()error {return _ebb .ValidateWithPath ("\u0054\u0047\u004e")};
// ValidateWithPath validates the ElementOrRefinementContainer and its children, prefixing error messages with path
func (_cca *ElementOrRefinementContainer )ValidateWithPath (path string )error {for _dfb ,_ed :=range _cca .Choice {if _dbe :=_ed .ValidateWithPath (_d .Sprintf ("\u0025\u0073\u002f\u0043\u0068\u006f\u0069\u0063\u0065\u005b\u0025\u0064\u005d",path ,_dfb ));_dbe !=nil {return _dbe ;};};return nil ;};
// ValidateWithPath validates the UDC and its children, prefixing error messages with path
func (_bfe *UDC )ValidateWithPath (path string )error {return nil };func (_aga *Point )UnmarshalXML (d *_f .Decoder ,start _f .StartElement )error {for {_abb ,_ccg :=d .Token ();if _ccg !=nil {return _d .Errorf ("\u0070\u0061\u0072\u0073\u0069\u006e\u0067\u0020\u0050\u006f\u0069\u006et\u003a\u0020\u0025\u0073",_ccg );};if _gcf ,_ffc :=_abb .(_f .EndElement );_ffc &&_gcf .Name ==start .Name {break ;};};return nil ;};
func (_dcfd *TGN )Validate ()error {return _dcfd .ValidateWithPath ("\u0054\u0047\u004e")};func (_abb *ISO639_2 )MarshalXML (e *_a .Encoder ,start _a .StartElement )error {start .Name .Local ="\u0049\u0053\u004f\u0036\u0033\u0039\u002d\u0032";e .EncodeToken (start );e .EncodeToken (_a .EndElement {Name :start .Name });return nil ;};
// Validate validates the ISO3166 and its children
func (_adc *ISO3166 )Validate ()error {return _adc .ValidateWithPath ("\u0049S\u004f\u0033\u0031\u0036\u0036");};func (_acaa *Point )MarshalXML (e *_f .Encoder ,start _f .StartElement )error {start .Name .Local ="\u0050\u006f\u0069n\u0074";e .EncodeToken (start );e .EncodeToken (_f .EndElement {Name :start .Name });return nil ;};func (_bec *TGN )MarshalXML (e *_f .Encoder ,start _f .StartElement )error {start .Name .Local ="\u0054\u0047\u004e";e .EncodeToken (start );e .EncodeToken (_f .EndElement {Name :start .Name });return nil ;};type ISO639_2 struct{};func (_fede *TGN )UnmarshalXML (d *_f .Decoder ,start _f .StartElement )error {for {_adb ,_ccc :=d .Token ();if _ccc !=nil {return _d .Errorf ("\u0070a\u0072s\u0069\u006e\u0067\u0020\u0054\u0047\u004e\u003a\u0020\u0025\u0073",_ccc );};if _bbg ,_deg :=_adb .(_f .EndElement );_deg &&_bbg .Name ==start .Name {break ;};};return nil ;};type ISO3166 struct{};func NewRFC1766 ()*RFC1766 {_bbb :=&RFC1766 {};return _bbb };
// ValidateWithPath validates the W3CDTF and its children, prefixing error messages with path
func (_fag *W3CDTF )ValidateWithPath (path string )error {return nil };
// ValidateWithPath validates the DDC and its children, prefixing error messages with path
func (_bd *DDC )ValidateWithPath (path string )error {return nil };type RFC1766 struct{};func (_fcc *LCSH )UnmarshalXML (d *_f .Decoder ,start _f .StartElement )error {for {_da ,_eb :=d .Token ();if _eb !=nil {return _d .Errorf ("\u0070\u0061r\u0073\u0069\u006eg\u0020\u004c\u0043\u0053\u0048\u003a\u0020\u0025\u0073",_eb );};if _ecd ,_gda :=_da .(_f .EndElement );_gda &&_ecd .Name ==start .Name {break ;};};return nil ;};
// Validate validates the UDC and its children
func (_ddf *UDC )Validate ()error {return _ddf .ValidateWithPath ("\u0055\u0044\u0043")};func (_afa *RFC3066 )UnmarshalXML (d *_f .Decoder ,start _f .StartElement )error {for {_efg ,_faa :=d .Token ();if _faa !=nil {return _d .Errorf ("\u0070\u0061\u0072\u0073in\u0067\u0020\u0052\u0046\u0043\u0033\u0030\u0036\u0036\u003a\u0020\u0025\u0073",_faa );};if _adgg ,_ffge :=_efg .(_f .EndElement );_ffge &&_adgg .Name ==start .Name {break ;};};return nil ;};func NewPeriod ()*Period {_gaa :=&Period {};return _gaa };func NewRFC3066 ()*RFC3066 {_bda :=&RFC3066 {};return _bda };func (_ag *ElementOrRefinementContainer )UnmarshalXML (d *_f .Decoder ,start _f .StartElement )error {_gd :for {_ece ,_dfa :=d .Token ();if _dfa !=nil {return _dfa ;};switch _ca :=_ece .(type ){case _f .StartElement :switch _ca .Name {case _f .Name {Space :"\u0068\u0074\u0074\u0070\u003a\u002f\u002f\u0070\u0075\u0072\u006c\u002e\u006f\u0072\u0067/\u0064c\u002f\u0065\u006c\u0065\u006d\u0065\u006e\u0074\u0073\u002f\u0031\u002e\u0031\u002f",Local :"\u0061\u006e\u0079"}:_gf :=NewElementsAndRefinementsGroupChoice ();if _gcb :=d .DecodeElement (&_gf .Any ,&_ca );_gcb !=nil {return _gcb ;};_ag .Choice =append (_ag .Choice ,_gf );default:_fd .Log ("\u0073k\u0069\u0070\u0070\u0069\u006e\u0067\u0020un\u0073\u0075\u0070\u0070\u006f\u0072\u0074\u0065\u0064\u0020\u0065\u006c\u0065\u006de\u006e\u0074 \u006f\u006e\u0020E\u006c\u0065\u006d\u0065\u006e\u0074\u004f\u0072\u0052\u0065\u0066\u0069\u006e\u0065\u006d\u0065n\u0074\u0043on\u0074\u0061\u0069n\u0065\u0072\u0020\u0025\u0076",_ca .Name );if _acd :=d .Skip ();_acd !=nil {return _acd ;};};case _f .EndElement :break _gd ;case _f .CharData :};};return nil ;};func (_gdbc *LCC )MarshalXML (e *_f .Encoder ,start _f .StartElement )error {start .Name .Local ="\u004c\u0043\u0043";e .EncodeToken (start );e .EncodeToken (_f .EndElement {Name :start .Name });return nil ;};
// Validate validates the ElementsAndRefinementsGroup and its children
func (_bbe *ElementsAndRefinementsGroup )Validate ()error {return _bbe .ValidateWithPath ("E\u006c\u0065\u006d\u0065\u006e\u0074s\u0041\u006e\u0064\u0052\u0065\u0066\u0069\u006e\u0065m\u0065\u006e\u0074s\u0047r\u006f\u0075\u0070");};
// ValidateWithPath validates the ISO3166 and its children, prefixing error messages with path
func (_fde *ISO3166 )ValidateWithPath (path string )error {return nil };func (_bfa *IMT )MarshalXML (e *_f .Encoder ,start _f .StartElement )error {start .Name .Local ="\u0049\u004d\u0054";e .EncodeToken (start );e .EncodeToken (_f .EndElement {Name :start .Name });return nil ;};func (_aef *MESH )MarshalXML (e *_f .Encoder ,start _f .StartElement )error {start .Name .Local ="\u004d\u0045\u0053\u0048";e .EncodeToken (start );e .EncodeToken (_f .EndElement {Name :start .Name });return nil ;};type UDC struct{};
// Validate validates the ISO639_2 and its children
func (_gdb *ISO639_2 )Validate ()error {return _gdb .ValidateWithPath ("\u0049\u0053\u004f\u0036\u0033\u0039\u005f\u0032");};type DCMIType struct{};func NewElementsAndRefinementsGroup ()*ElementsAndRefinementsGroup {_gcd :=&ElementsAndRefinementsGroup {};return _gcd ;};type ElementOrRefinementContainer struct{Choice []*ElementsAndRefinementsGroupChoice ;};
// Validate validates the ElementsAndRefinementsGroupChoice and its children
func (_bgf *ElementsAndRefinementsGroupChoice )Validate ()error {return _bgf .ValidateWithPath ("\u0045\u006c\u0065\u006d\u0065\u006et\u0073\u0041\u006e\u0064\u0052\u0065\u0066\u0069\u006e\u0065\u006d\u0065\u006et\u0073\u0047\u0072\u006f\u0075\u0070\u0043h\u006f\u0069\u0063\u0065");};type DDC struct{};func (_aa *DDC )MarshalXML (e *_f .Encoder ,start _f .StartElement )error {start .Name .Local ="\u0044\u0044\u0043";e .EncodeToken (start );e .EncodeToken (_f .EndElement {Name :start .Name });return nil ;};func (_fcd *URI )UnmarshalXML (d *_f .Decoder ,start _f .StartElement )error {for {_ege ,_dcd :=d .Token ();if _dcd !=nil {return _d .Errorf ("\u0070a\u0072s\u0069\u006e\u0067\u0020\u0055\u0052\u0049\u003a\u0020\u0025\u0073",_dcd );};if _eeb ,_aeg :=_ege .(_f .EndElement );_aeg &&_eeb .Name ==start .Name {break ;};};return nil ;};func (_cee *MESH )UnmarshalXML (d *_f .Decoder ,start _f .StartElement )error {for {_agg ,_ab :=d .Token ();if _ab !=nil {return _d .Errorf ("\u0070\u0061r\u0073\u0069\u006eg\u0020\u004d\u0045\u0053\u0048\u003a\u0020\u0025\u0073",_ab );};if _fgg ,_gfg :=_agg .(_f .EndElement );_gfg &&_fgg .Name ==start .Name {break ;};};return nil ;};func NewMESH ()*MESH {_dbf :=&MESH {};return _dbf };type IMT struct{};type LCSH struct{};func (_fec *RFC3066 )MarshalXML (e *_f .Encoder ,start _f .StartElement )error {start .Name .Local ="\u0052F\u0043\u0033\u0030\u0036\u0036";e .EncodeToken (start );e .EncodeToken (_f .EndElement {Name :start .Name });return nil ;};func (_ccb *ElementOrRefinementContainer )MarshalXML (e *_f .Encoder ,start _f .StartElement )error {start .Name .Local ="\u0065\u006c\u0065\u006de\u006e\u0074\u004f\u0072\u0052\u0065\u0066\u0069\u006e\u0065m\u0065n\u0074\u0043\u006f\u006e\u0074\u0061\u0069n\u0065\u0072";e .EncodeToken (start );if _ccb .Choice !=nil {for _ ,_ac :=range _ccb .Choice {_ac .MarshalXML (e ,_f .StartElement {});};};e .EncodeToken (_f .EndElement {Name :start .Name });return nil ;};func (_gga *ISO639_2 )UnmarshalXML (d *_f .Decoder ,start _f .StartElement )error {for {_eag ,_dbb :=d .Token ();if _dbb !=nil {return _d .Errorf ("p\u0061r\u0073\u0069\u006e\u0067\u0020\u0049\u0053\u004f6\u0033\u0039\u005f\u0032: \u0025\u0073",_dbb );};if _aca ,_ef :=_eag .(_f .EndElement );_ef &&_aca .Name ==start .Name {break ;};};return nil ;};type LCC struct{};func (_bf *DCMIType )MarshalXML (e *_f .Encoder ,start _f .StartElement )error {start .Name .Local ="\u0044\u0043\u004d\u0049\u0054\u0079\u0070\u0065";e .EncodeToken (start );e .EncodeToken (_f .EndElement {Name :start .Name });return nil ;};type ElementsAndRefinementsGroupChoice struct{Any []*_ff .Any ;};func NewLCC ()*LCC {_eagg :=&LCC {};return _eagg };
// ValidateWithPath validates the LCC and its children, prefixing error messages with path
func (_eaf *LCC )ValidateWithPath (path string )error {return nil };
// ValidateWithPath validates the ISO639_2 and its children, prefixing error messages with path
func (_agd *ISO639_2 )ValidateWithPath (path string )error {return nil };func NewURI ()*URI {_ffd :=&URI {};return _ffd };
// Validate validates the LCSH and its children
func (_ead *LCSH )Validate ()error {return _ead .ValidateWithPath ("\u004c\u0043\u0053\u0048")};func (_ddgf *RFC1766 )MarshalXML (e *_f .Encoder ,start _f .StartElement )error {start .Name .Local ="\u0052F\u0043\u0031\u0037\u0036\u0036";e .EncodeToken (start );e .EncodeToken (_f .EndElement {Name :start .Name });return nil ;};
// Validate validates the RFC1766 and its children
func (_cg *RFC1766 )Validate ()error {return _cg .ValidateWithPath ("\u0052F\u0043\u0031\u0037\u0036\u0036");};func NewIMT ()*IMT {_de :=&IMT {};return _de };
func (_fad *ISO3166 )Validate ()error {return _fad .ValidateWithPath ("\u0049S\u004f\u0033\u0031\u0036\u0036");};
// Validate validates the MESH and its children
func (_gfb *MESH )Validate ()error {return _gfb .ValidateWithPath ("\u004d\u0045\u0053\u0048")};
// Validate validates the Period and its children
func (_fegg *Period )Validate ()error {return _fegg .ValidateWithPath ("\u0050\u0065\u0072\u0069\u006f\u0064");};
// Validate validates the IMT and its children
func (_fee *IMT )Validate ()error {return _fee .ValidateWithPath ("\u0049\u004d\u0054")};func (_acda *Period )MarshalXML (e *_f .Encoder ,start _f .StartElement )error {start .Name .Local ="\u0050\u0065\u0072\u0069\u006f\u0064";e .EncodeToken (start );e .EncodeToken (_f .EndElement {Name :start .Name });return nil ;};func (_ada *IMT )UnmarshalXML (d *_f .Decoder ,start _f .StartElement )error {for {_feff ,_fed :=d .Token ();if _fed !=nil {return _d .Errorf ("\u0070a\u0072s\u0069\u006e\u0067\u0020\u0049\u004d\u0054\u003a\u0020\u0025\u0073",_fed );};if _cae ,_gad :=_feff .(_f .EndElement );_gad &&_cae .Name ==start .Name {break ;};};return nil ;};func NewElementsAndRefinementsGroupChoice ()*ElementsAndRefinementsGroupChoice {_ga :=&ElementsAndRefinementsGroupChoice {};return _ga ;};func (_gbe *LCSH )MarshalXML (e *_f .Encoder ,start _f .StartElement )error {start .Name .Local ="\u004c\u0043\u0053\u0048";e .EncodeToken (start );e .EncodeToken (_f .EndElement {Name :start .Name });return nil ;};
// Validate validates the LCC and its children
func (_ffab *LCC )Validate ()error {return _ffab .ValidateWithPath ("\u004c\u0043\u0043")};type Box struct{};func NewTGN ()*TGN {_cgd :=&TGN {};return _cgd };type TGN struct{};func (_g *Box )UnmarshalXML (d *_f .Decoder ,start _f .StartElement )error {for {_gg ,_fa :=d .Token ();if _fa !=nil {return _d .Errorf ("\u0070a\u0072s\u0069\u006e\u0067\u0020\u0042\u006f\u0078\u003a\u0020\u0025\u0073",_fa );};if _b ,_be :=_gg .(_f .EndElement );_be &&_b .Name ==start .Name {break ;};};return nil ;};func NewW3CDTF ()*W3CDTF {_fea :=&W3CDTF {};return _fea };func (_accc *W3CDTF )UnmarshalXML (d *_f .Decoder ,start _f .StartElement )error {for {_dffg ,_dea :=d .Token ();if _dea !=nil {return _d .Errorf ("\u0070a\u0072s\u0069\u006e\u0067\u0020\u00573\u0043\u0044T\u0046\u003a\u0020\u0025\u0073",_dea );};if _cgg ,_fdgd :=_dffg .(_f .EndElement );_fdgd &&_cgg .Name ==start .Name {break ;};};return nil ;};
// ValidateWithPath validates the MESH and its children, prefixing error messages with path
func (_baf *MESH )ValidateWithPath (path string )error {return nil };
// ValidateWithPath validates the ElementsAndRefinementsGroup and its children, prefixing error messages with path
func (_gcg *ElementsAndRefinementsGroup )ValidateWithPath (path string )error {for _ddg ,_age :=range _gcg .Choice {if _bdc :=_age .ValidateWithPath (_d .Sprintf ("\u0025\u0073\u002f\u0043\u0068\u006f\u0069\u0063\u0065\u005b\u0025\u0064\u005d",path ,_ddg ));_bdc !=nil {return _bdc ;};};return nil ;};func (_ggdg *Period )UnmarshalXML (d *_f .Decoder ,start _f .StartElement )error {for {_ebd ,_aee :=d .Token ();if _aee !=nil {return _d .Errorf ("\u0070a\u0072s\u0069\u006e\u0067\u0020\u0050e\u0072\u0069o\u0064\u003a\u0020\u0025\u0073",_aee );};if _aab ,_bdcf :=_ebd .(_f .EndElement );_bdcf &&_aab .Name ==start .Name {break ;};};return nil ;};func NewDCMIType ()*DCMIType {_df :=&DCMIType {};return _df };func (_fg *ElementsAndRefinementsGroup )UnmarshalXML (d *_f .Decoder ,start _f .StartElement )error {_dc :for {_ggd ,_dd :=d .Token ();if _dd !=nil {return _dd ;};switch _ged :=_ggd .(type ){case _f .StartElement :switch _ged .Name {case _f .Name {Space :"\u0068\u0074\u0074\u0070\u003a\u002f\u002f\u0070\u0075\u0072\u006c\u002e\u006f\u0072\u0067/\u0064c\u002f\u0065\u006c\u0065\u006d\u0065\u006e\u0074\u0073\u002f\u0031\u002e\u0031\u002f",Local :"\u0061\u006e\u0079"}:_add :=NewElementsAndRefinementsGroupChoice ();if _ffg :=d .DecodeElement (&_add .Any ,&_ged );_ffg !=nil {return _ffg ;};_fg .Choice =append (_fg .Choice ,_add );default:_fd .Log ("\u0073\u006b\u0069\u0070\u0070\u0069\u006e\u0067\u0020\u0075\u006e\u0073\u0075\u0070\u0070\u006f\u0072\u0074ed\u0020e\u006c\u0065\u006d\u0065\u006e\u0074\u0020\u006f\u006e\u0020\u0045\u006ce\u006d\u0065\u006e\u0074\u0073\u0041\u006e\u0064\u0052\u0065\u0066\u0069\u006e\u0065\u006d\u0065\u006et\u0073\u0047\u0072\u006f\u0075\u0070\u0020\u0025\u0076",_ged .Name );if _fgf :=d .Skip ();_fgf !=nil {return _fgf ;};};case _f .EndElement :break _dc ;case _f .CharData :};};return nil ;};
// ValidateWithPath validates the RFC1766 and its children, prefixing error messages with path
func (_dffa *RFC1766 )ValidateWithPath (path string )error {return nil };
// Validate validates the DDC and its children
func (_ae *DDC )Validate ()error {return _ae .ValidateWithPath ("\u0044\u0044\u0043")};func NewBox ()*Box {_e :=&Box {};return _e };func (_fc *ISO639_2 )MarshalXML (e *_f .Encoder ,start _f .StartElement )error {start .Name .Local ="\u0049\u0053\u004f\u0036\u0033\u0039\u002d\u0032";e .EncodeToken (start );e .EncodeToken (_f .EndElement {Name :start .Name });return nil ;};type URI struct{};func NewISO3166 ()*ISO3166 {_ade :=&ISO3166 {};return _ade };func (_cd *RFC1766 )UnmarshalXML (d *_f .Decoder ,start _f .StartElement )error {for {_ggc ,_ace :=d .Token ();if _ace !=nil {return _d .Errorf ("\u0070\u0061\u0072\u0073in\u0067\u0020\u0052\u0046\u0043\u0031\u0037\u0036\u0036\u003a\u0020\u0025\u0073",_ace );};if _dg ,_ggf :=_ggc .(_f .EndElement );_ggf &&_dg .Name ==start .Name {break ;};};return nil ;};
// ValidateWithPath validates the Point and its children, prefixing error messages with path
func (_dbac *Point )ValidateWithPath (path string )error {return nil };func (_cef *ElementsAndRefinementsGroupChoice )UnmarshalXML (d *_f .Decoder ,start _f .StartElement )error {_gfc :for {_dff ,_ffa :=d .Token ();if _ffa !=nil {return _ffa ;};switch _bdg :=_dff .(type ){case _f .StartElement :switch _bdg .Name {case _f .Name {Space :"\u0068\u0074\u0074\u0070\u003a\u002f\u002f\u0070\u0075\u0072\u006c\u002e\u006f\u0072\u0067/\u0064c\u002f\u0065\u006c\u0065\u006d\u0065\u006e\u0074\u0073\u002f\u0031\u002e\u0031\u002f",Local :"\u0061\u006e\u0079"}:_ee :=_ff .NewAny ();if _bc :=d .DecodeElement (_ee ,&_bdg );_bc !=nil {return _bc ;};_cef .Any =append (_cef .Any ,_ee );default:_fd .Log ("\u0073\u006b\u0069\u0070\u0070\u0069\u006e\u0067\u0020\u0075\u006e\u0073\u0075\u0070\u0070\u006f\u0072\u0074\u0065\u0064 \u0065\u006c\u0065\u006d\u0065\u006e\u0074\u0020\u006f\u006e\u0020\u0045\u006c\u0065\u006d\u0065\u006e\u0074\u0073\u0041\u006ed\u0052\u0065\u0066\u0069\u006e\u0065\u006d\u0065\u006e\u0074\u0073\u0047\u0072\u006fu\u0070\u0043\u0068o\u0069\u0063\u0065\u0020\u0025\u0076",_bdg .Name );if _ffe :=d .Skip ();_ffe !=nil {return _ffe ;};};case _f .EndElement :break _gfc ;case _f .CharData :};};return nil ;};func NewUDC ()*UDC {_aff :=&UDC {};return _aff };func (_fbc *W3CDTF )MarshalXML (e *_f .Encoder ,start _f .StartElement )error {start .Name .Local ="\u0057\u0033\u0043\u0044\u0054\u0046";e .EncodeToken (start );e .EncodeToken (_f .EndElement {Name :start .Name });return nil ;};func (_dfaa *ElementsAndRefinementsGroup )MarshalXML (e *_f .Encoder ,start _f .StartElement )error {if _dfaa .Choice !=nil {for _ ,_cad :=range _dfaa .Choice {_cad .MarshalXML (e ,_f .StartElement {});};};return nil ;};
// ValidateWithPath validates the IMT and its children, prefixing error messages with path
func (_ecg *IMT )ValidateWithPath (path string )error {return nil };type Period struct{};func NewPoint ()*Point {_baa :=&Point {};return _baa };
// ValidateWithPath validates the ElementsAndRefinementsGroupChoice and its children, prefixing error messages with path
func (_bca *ElementsAndRefinementsGroupChoice )ValidateWithPath (path string )error {for _eab ,_edb :=range _bca .Any {if _eca :=_edb .ValidateWithPath (_d .Sprintf ("\u0025\u0073\u002f\u0041\u006e\u0079\u005b\u0025\u0064\u005d",path ,_eab ));_eca !=nil {return _eca ;};};return nil ;};func (_a *Box )MarshalXML (e *_f .Encoder ,start _f .StartElement )error {start .Name .Local ="\u0042\u006f\u0078";e .EncodeToken (start );e .EncodeToken (_f .EndElement {Name :start .Name });return nil ;};
// Validate validates the Point and its children
func (_dfd *Point )Validate ()error {return _dfd .ValidateWithPath ("\u0050\u006f\u0069n\u0074")};func (_bfd *UDC )MarshalXML (e *_f .Encoder ,start _f .StartElement )error {start .Name .Local ="\u0055\u0044\u0043";e .EncodeToken (start );e .EncodeToken (_f .EndElement {Name :start .Name });return nil ;};func (_fe *DCMIType )UnmarshalXML (d *_f .Decoder ,start _f .StartElement )error {for {_dbd ,_fab :=d .Token ();if _fab !=nil {return _d .Errorf ("p\u0061r\u0073\u0069\u006e\u0067\u0020\u0044\u0043\u004dI\u0054\u0079\u0070\u0065: \u0025\u0073",_fab );};if _ad ,_gb :=_dbd .(_f .EndElement );_gb &&_ad .Name ==start .Name {break ;};};return nil ;};
// ValidateWithPath validates the Box and its children, prefixing error messages with path
func (_db *Box )ValidateWithPath (path string )error {return nil };type Point struct{};func (_acc *ISO3166 )UnmarshalXML (d *_f .Decoder ,start _f .StartElement )error {for {_cfg ,_dba :=d .Token ();if _dba !=nil {return _d .Errorf ("\u0070\u0061\u0072\u0073in\u0067\u0020\u0049\u0053\u004f\u0033\u0031\u0036\u0036\u003a\u0020\u0025\u0073",_dba );};if _gae ,_dfe :=_cfg .(_f .EndElement );_dfe &&_gae .Name ==start .Name {break ;};};return nil ;};
// Validate validates the DCMIType and its children
func (_cc *DCMIType )Validate ()error {return _cc .ValidateWithPath ("\u0044\u0043\u004d\u0049\u0054\u0079\u0070\u0065");};
// ValidateWithPath validates the DCMIType and its children, prefixing error messages with path
func (_gc *DCMIType )ValidateWithPath (path string )error {return nil };func (_ebdd *URI )MarshalXML (e *_f .Encoder ,start _f .StartElement )error {start .Name .Local ="\u0055\u0052\u0049";e .EncodeToken (start );e .EncodeToken (_f .EndElement {Name :start .Name });return nil ;};func (_af *ISO3166 )MarshalXML (e *_f .Encoder ,start _f .StartElement )error {start .Name .Local ="\u0049S\u004f\u0033\u0031\u0036\u0036";e .EncodeToken (start );e .EncodeToken (_f .EndElement {Name :start .Name });return nil ;};func NewElementOrRefinementContainer ()*ElementOrRefinementContainer {_ce :=&ElementOrRefinementContainer {};return _ce ;};type MESH struct{};
// Validate validates the Box and its children
func (_ea *Box )Validate ()error {return _ea .ValidateWithPath ("\u0042\u006f\u0078")};
// ValidateWithPath validates the TGN and its children, prefixing error messages with path
func (_bfg *TGN )ValidateWithPath (path string )error {return nil };func (_bgb *ElementsAndRefinementsGroupChoice )MarshalXML (e *_f .Encoder ,start _f .StartElement )error {if _bgb .Any !=nil {_feg :=_f .StartElement {Name :_f .Name {Local :"\u0064\u0063\u003a\u0061\u006e\u0079"}};for _ ,_eg :=range _bgb .Any {e .EncodeElement (_eg ,_feg );};};return nil ;};
// ValidateWithPath validates the RFC3066 and its children, prefixing error messages with path
func (_edc *RFC3066 )ValidateWithPath (path string )error {return nil };
// Validate validates the RFC3066 and its children
func (_fcae *RFC3066 )Validate ()error {return _fcae .ValidateWithPath ("\u0052F\u0043\u0033\u0030\u0036\u0036");};
// ValidateWithPath validates the URI and its children, prefixing error messages with path
func (_cbf *URI )ValidateWithPath (path string )error {return nil };type W3CDTF struct{};
// Validate validates the URI and its children
func (_ffae *URI )Validate ()error {return _ffae .ValidateWithPath ("\u0055\u0052\u0049")};func NewLCSH ()*LCSH {_ddd :=&LCSH {};return _ddd };type ElementsAndRefinementsGroup struct{Choice []*ElementsAndRefinementsGroupChoice ;};
func (_fdf *MESH )Validate ()error {return _fdf .ValidateWithPath ("\u004d\u0045\u0053\u0048")};type LCSH struct{};func (_dbd *ISO3166 )UnmarshalXML (d *_a .Decoder ,start _a .StartElement )error {for {_ccc ,_aga :=d .Token ();if _aga !=nil {return _d .Errorf ("\u0070\u0061\u0072\u0073in\u0067\u0020\u0049\u0053\u004f\u0033\u0031\u0036\u0036\u003a\u0020\u0025\u0073",_aga );};if _ccgf ,_afb :=_ccc .(_a .EndElement );_afb &&_ccgf .Name ==start .Name {break ;};};return nil ;};
// Validate validates the W3CDTF and its children
func (_fbca *W3CDTF )Validate ()error {return _fbca .ValidateWithPath ("\u0057\u0033\u0043\u0044\u0054\u0046");};func (_aaf *LCC )UnmarshalXML (d *_f .Decoder ,start _f .StartElement )error {for {_dfbf ,_fca :=d .Token ();if _fca !=nil {return _d .Errorf ("\u0070a\u0072s\u0069\u006e\u0067\u0020\u004c\u0043\u0043\u003a\u0020\u0025\u0073",_fca );};if _fdg ,_gada :=_dfbf .(_f .EndElement );_gada &&_fdg .Name ==start .Name {break ;};};return nil ;};func (_ceb *UDC )UnmarshalXML (d *_f .Decoder ,start _f .StartElement )error {for {_fge ,_dca :=d .Token ();if _dca !=nil {return _d .Errorf ("\u0070a\u0072s\u0069\u006e\u0067\u0020\u0055\u0044\u0043\u003a\u0020\u0025\u0073",_dca );};if _bfb ,_bfad :=_fge .(_f .EndElement );_bfad &&_bfb .Name ==start .Name {break ;};};return nil ;};func NewDDC ()*DDC {_adg :=&DDC {};return _adg };
func (_beae *W3CDTF )Validate ()error {return _beae .ValidateWithPath ("\u0057\u0033\u0043\u0044\u0054\u0046");};
// Validate validates the DCMIType and its children
func (_ce *DCMIType )Validate ()error {return _ce .ValidateWithPath ("\u0044\u0043\u004d\u0049\u0054\u0079\u0070\u0065");};func NewW3CDTF ()*W3CDTF {_fdg :=&W3CDTF {};return _fdg };
// Validate validates the Point and its children
func (_eefa *Point )Validate ()error {return _eefa .ValidateWithPath ("\u0050\u006f\u0069n\u0074")};func NewPoint ()*Point {_cdg :=&Point {};return _cdg };func NewLCC ()*LCC {_fbb :=&LCC {};return _fbb };func (_gf *ElementOrRefinementContainer )UnmarshalXML (d *_a .Decoder ,start _a .StartElement )error {_gg :for {_cd ,_ee :=d .Token ();if _ee !=nil {return _ee ;};switch _feb :=_cd .(type ){case _a .StartElement :switch _feb .Name {case _a .Name {Space :"\u0068\u0074\u0074\u0070\u003a\u002f\u002f\u0070\u0075\u0072\u006c\u002e\u006f\u0072\u0067/\u0064c\u002f\u0065\u006c\u0065\u006d\u0065\u006e\u0074\u0073\u002f\u0031\u002e\u0031\u002f",Local :"\u0061\u006e\u0079"}:_ef :=NewElementsAndRefinementsGroupChoice ();if _eac :=d .DecodeElement (&_ef .Any ,&_feb );_eac !=nil {return _eac ;};_gf .Choice =append (_gf .Choice ,_ef );default:_dg .Log ("\u0073k\u0069\u0070\u0070\u0069\u006e\u0067\u0020un\u0073\u0075\u0070\u0070\u006f\u0072\u0074\u0065\u0064\u0020\u0065\u006c\u0065\u006de\u006e\u0074 \u006f\u006e\u0020E\u006c\u0065\u006d\u0065\u006e\u0074\u004f\u0072\u0052\u0065\u0066\u0069\u006e\u0065\u006d\u0065n\u0074\u0043on\u0074\u0061\u0069n\u0065\u0072\u0020\u0025\u0076",_feb .Name );if _ggf :=d .Skip ();_ggf !=nil {return _ggf ;};};case _a .EndElement :break _gg ;case _a .CharData :};};return nil ;};
// ValidateWithPath validates the UDC and its children, prefixing error messages with path
func (_aef *UDC )ValidateWithPath (path string )error {return nil };func (_aad *Period )UnmarshalXML (d *_a .Decoder ,start _a .StartElement )error {for {_babb ,_bgb :=d .Token ();if _bgb !=nil {return _d .Errorf ("\u0070a\u0072s\u0069\u006e\u0067\u0020\u0050e\u0072\u0069o\u0064\u003a\u0020\u0025\u0073",_bgb );};if _ebf ,_ced :=_babb .(_a .EndElement );_ced &&_ebf .Name ==start .Name {break ;};};return nil ;};func NewElementOrRefinementContainer ()*ElementOrRefinementContainer {_ea :=&ElementOrRefinementContainer {};return _ea ;};type ElementsAndRefinementsGroupChoice struct{Any []*_f .Any ;};func (_babd *IMT )MarshalXML (e *_a .Encoder ,start _a .StartElement )error {start .Name .Local ="\u0049\u004d\u0054";e .EncodeToken (start );e .EncodeToken (_a .EndElement {Name :start .Name });return nil ;};func NewUDC ()*UDC {_dce :=&UDC {};return _dce };func (_add *Point )MarshalXML (e *_a .Encoder ,start _a .StartElement )error {start .Name .Local ="\u0050\u006f\u0069n\u0074";e .EncodeToken (start );e .EncodeToken (_a .EndElement {Name :start .Name });return nil ;};func NewPeriod ()*Period {_aac :=&Period {};return _aac };
// Validate validates the LCC and its children
func (_ffe *LCC )Validate ()error {return _ffe .ValidateWithPath ("\u004c\u0043\u0043")};type IMT struct{};func (_aeg *LCSH )MarshalXML (e *_a .Encoder ,start _a .StartElement )error {start .Name .Local ="\u004c\u0043\u0053\u0048";e .EncodeToken (start );e .EncodeToken (_a .EndElement {Name :start .Name });return nil ;};func (_fef *ElementOrRefinementContainer )MarshalXML (e *_a .Encoder ,start _a .StartElement )error {start .Name .Local ="\u0065\u006c\u0065\u006de\u006e\u0074\u004f\u0072\u0052\u0065\u0066\u0069\u006e\u0065m\u0065n\u0074\u0043\u006f\u006e\u0074\u0061\u0069n\u0065\u0072";e .EncodeToken (start );if _fef .Choice !=nil {for _ ,_cef :=range _fef .Choice {_cef .MarshalXML (e ,_a .StartElement {});};};e .EncodeToken (_a .EndElement {Name :start .Name });return nil ;};func (_beg *ElementsAndRefinementsGroup )UnmarshalXML (d *_a .Decoder ,start _a .StartElement )error {_ad :for {_ed ,_aab :=d .Token ();if _aab !=nil {return _aab ;};switch _baf :=_ed .(type ){case _a .StartElement :switch _baf .Name {case _a .Name {Space :"\u0068\u0074\u0074\u0070\u003a\u002f\u002f\u0070\u0075\u0072\u006c\u002e\u006f\u0072\u0067/\u0064c\u002f\u0065\u006c\u0065\u006d\u0065\u006e\u0074\u0073\u002f\u0031\u002e\u0031\u002f",Local :"\u0061\u006e\u0079"}:_cec :=NewElementsAndRefinementsGroupChoice ();if _adc :=d .DecodeElement (&_cec .Any ,&_baf );_adc !=nil {return _adc ;};_beg .Choice =append (_beg .Choice ,_cec );default:_dg .Log ("\u0073\u006b\u0069\u0070\u0070\u0069\u006e\u0067\u0020\u0075\u006e\u0073\u0075\u0070\u0070\u006f\u0072\u0074ed\u0020e\u006c\u0065\u006d\u0065\u006e\u0074\u0020\u006f\u006e\u0020\u0045\u006ce\u006d\u0065\u006e\u0074\u0073\u0041\u006e\u0064\u0052\u0065\u0066\u0069\u006e\u0065\u006d\u0065\u006et\u0073\u0047\u0072\u006f\u0075\u0070\u0020\u0025\u0076",_baf .Name );if _ae :=d .Skip ();_ae !=nil {return _ae ;};};case _a .EndElement :break _ad ;case _a .CharData :};};return nil ;};func (_fgb *RFC3066 )UnmarshalXML (d *_a .Decoder ,start _a .StartElement )error {for {_cfa ,_aba :=d .Token ();if _aba !=nil {return _d .Errorf ("\u0070\u0061\u0072\u0073in\u0067\u0020\u0052\u0046\u0043\u0033\u0030\u0036\u0036\u003a\u0020\u0025\u0073",_aba );};if _adff ,_cdb :=_cfa .(_a .EndElement );_cdb &&_adff .Name ==start .Name {break ;};};return nil ;};
// ValidateWithPath validates the ElementsAndRefinementsGroup and its children, prefixing error messages with path
func (_cb *ElementsAndRefinementsGroup )ValidateWithPath (path string )error {for _eae ,_ead :=range _cb .Choice {if _fc :=_ead .ValidateWithPath (_d .Sprintf ("\u0025\u0073\u002f\u0043\u0068\u006f\u0069\u0063\u0065\u005b\u0025\u0064\u005d",path ,_eae ));_fc !=nil {return _fc ;};};return nil ;};func (_cg *W3CDTF )UnmarshalXML (d *_a .Decoder ,start _a .StartElement )error {for {_afg ,_gfge :=d .Token ();if _gfge !=nil {return _d .Errorf ("\u0070a\u0072s\u0069\u006e\u0067\u0020\u00573\u0043\u0044T\u0046\u003a\u0020\u0025\u0073",_gfge );};if _dgg ,_fee :=_afg .(_a .EndElement );_fee &&_dgg .Name ==start .Name {break ;};};return nil ;};func NewRFC3066 ()*RFC3066 {_dfcd :=&RFC3066 {};return _dfcd };
// Validate validates the ISO639_2 and its children
func (_efe *ISO639_2 )Validate ()error {return _efe .ValidateWithPath ("\u0049\u0053\u004f\u0036\u0033\u0039\u005f\u0032");};type ElementsAndRefinementsGroup struct{Choice []*ElementsAndRefinementsGroupChoice ;};type DCMIType struct{};func (_gdd *LCC )MarshalXML (e *_a .Encoder ,start _a .StartElement )error {start .Name .Local ="\u004c\u0043\u0043";e .EncodeToken (start );e .EncodeToken (_a .EndElement {Name :start .Name });return nil ;};
// Validate validates the DDC and its children
func (_gbc *DDC )Validate ()error {return _gbc .ValidateWithPath ("\u0044\u0044\u0043")};func (_dca *DDC )MarshalXML (e *_a .Encoder ,start _a .StartElement )error {start .Name .Local ="\u0044\u0044\u0043";e .EncodeToken (start );e .EncodeToken (_a .EndElement {Name :start .Name });return nil ;};
// ValidateWithPath validates the ElementsAndRefinementsGroupChoice and its children, prefixing error messages with path
func (_cf *ElementsAndRefinementsGroupChoice )ValidateWithPath (path string )error {for _ade ,_eba :=range _cf .Any {if _ag :=_eba .ValidateWithPath (_d .Sprintf ("\u0025\u0073\u002f\u0041\u006e\u0079\u005b\u0025\u0064\u005d",path ,_ade ));_ag !=nil {return _ag ;};};return nil ;};func NewElementsAndRefinementsGroup ()*ElementsAndRefinementsGroup {_fge :=&ElementsAndRefinementsGroup {};return _fge ;};func (_de *Box )MarshalXML (e *_a .Encoder ,start _a .StartElement )error {start .Name .Local ="\u0042\u006f\u0078";e .EncodeToken (start );e .EncodeToken (_a .EndElement {Name :start .Name });return nil ;};func (_ebgg *Point )UnmarshalXML (d *_a .Decoder ,start _a .StartElement )error {for {_eef ,_dgc :=d .Token ();if _dgc !=nil {return _d .Errorf ("\u0070\u0061\u0072\u0073\u0069\u006e\u0067\u0020\u0050\u006f\u0069\u006et\u003a\u0020\u0025\u0073",_dgc );};if _gfg ,_fadb :=_eef .(_a .EndElement );_fadb &&_gfg .Name ==start .Name {break ;};};return nil ;};type ISO639_2 struct{};func (_fga *MESH )UnmarshalXML (d *_a .Decoder ,start _a .StartElement )error {for {_aed ,_gaa :=d .Token ();if _gaa !=nil {return _d .Errorf ("\u0070\u0061r\u0073\u0069\u006eg\u0020\u004d\u0045\u0053\u0048\u003a\u0020\u0025\u0073",_gaa );};if _ca ,_dgf :=_aed .(_a .EndElement );_dgf &&_ca .Name ==start .Name {break ;};};return nil ;};
// ValidateWithPath validates the RFC1766 and its children, prefixing error messages with path
func (_gef *RFC1766 )ValidateWithPath (path string )error {return nil };
// ValidateWithPath validates the Period and its children, prefixing error messages with path
func (_bgbc *Period )ValidateWithPath (path string )error {return nil };func init (){_fd .RegisterConstructor ("\u0068t\u0074\u0070\u003a\u002f/\u0070\u0075\u0072\u006c\u002eo\u0072g\u002fd\u0063\u002f\u0074\u0065\u0072\u006d\u0073/","\u004c\u0043\u0053\u0048",NewLCSH );_fd .RegisterConstructor ("\u0068t\u0074\u0070\u003a\u002f/\u0070\u0075\u0072\u006c\u002eo\u0072g\u002fd\u0063\u002f\u0074\u0065\u0072\u006d\u0073/","\u004d\u0045\u0053\u0048",NewMESH );_fd .RegisterConstructor ("\u0068t\u0074\u0070\u003a\u002f/\u0070\u0075\u0072\u006c\u002eo\u0072g\u002fd\u0063\u002f\u0074\u0065\u0072\u006d\u0073/","\u0044\u0044\u0043",NewDDC );_fd .RegisterConstructor ("\u0068t\u0074\u0070\u003a\u002f/\u0070\u0075\u0072\u006c\u002eo\u0072g\u002fd\u0063\u002f\u0074\u0065\u0072\u006d\u0073/","\u004c\u0043\u0043",NewLCC );_fd .RegisterConstructor ("\u0068t\u0074\u0070\u003a\u002f/\u0070\u0075\u0072\u006c\u002eo\u0072g\u002fd\u0063\u002f\u0074\u0065\u0072\u006d\u0073/","\u0055\u0044\u0043",NewUDC );_fd .RegisterConstructor ("\u0068t\u0074\u0070\u003a\u002f/\u0070\u0075\u0072\u006c\u002eo\u0072g\u002fd\u0063\u002f\u0074\u0065\u0072\u006d\u0073/","\u0050\u0065\u0072\u0069\u006f\u0064",NewPeriod );_fd .RegisterConstructor ("\u0068t\u0074\u0070\u003a\u002f/\u0070\u0075\u0072\u006c\u002eo\u0072g\u002fd\u0063\u002f\u0074\u0065\u0072\u006d\u0073/","\u0057\u0033\u0043\u0044\u0054\u0046",NewW3CDTF );_fd .RegisterConstructor ("\u0068t\u0074\u0070\u003a\u002f/\u0070\u0075\u0072\u006c\u002eo\u0072g\u002fd\u0063\u002f\u0074\u0065\u0072\u006d\u0073/","\u0044\u0043\u004d\u0049\u0054\u0079\u0070\u0065",NewDCMIType );_fd .RegisterConstructor ("\u0068t\u0074\u0070\u003a\u002f/\u0070\u0075\u0072\u006c\u002eo\u0072g\u002fd\u0063\u002f\u0074\u0065\u0072\u006d\u0073/","\u0049\u004d\u0054",NewIMT );_fd .RegisterConstructor ("\u0068t\u0074\u0070\u003a\u002f/\u0070\u0075\u0072\u006c\u002eo\u0072g\u002fd\u0063\u002f\u0074\u0065\u0072\u006d\u0073/","\u0055\u0052\u0049",NewURI );_fd .RegisterConstructor ("\u0068t\u0074\u0070\u003a\u002f/\u0070\u0075\u0072\u006c\u002eo\u0072g\u002fd\u0063\u002f\u0074\u0065\u0072\u006d\u0073/","\u0049\u0053\u004f\u0036\u0033\u0039\u002d\u0032",NewISO639_2 );_fd .RegisterConstructor ("\u0068t\u0074\u0070\u003a\u002f/\u0070\u0075\u0072\u006c\u002eo\u0072g\u002fd\u0063\u002f\u0074\u0065\u0072\u006d\u0073/","\u0052F\u0043\u0031\u0037\u0036\u0036",NewRFC1766 );_fd .RegisterConstructor ("\u0068t\u0074\u0070\u003a\u002f/\u0070\u0075\u0072\u006c\u002eo\u0072g\u002fd\u0063\u002f\u0074\u0065\u0072\u006d\u0073/","\u0052F\u0043\u0033\u0030\u0036\u0036",NewRFC3066 );_fd .RegisterConstructor ("\u0068t\u0074\u0070\u003a\u002f/\u0070\u0075\u0072\u006c\u002eo\u0072g\u002fd\u0063\u002f\u0074\u0065\u0072\u006d\u0073/","\u0050\u006f\u0069n\u0074",NewPoint );_fd .RegisterConstructor ("\u0068t\u0074\u0070\u003a\u002f/\u0070\u0075\u0072\u006c\u002eo\u0072g\u002fd\u0063\u002f\u0074\u0065\u0072\u006d\u0073/","\u0049S\u004f\u0033\u0031\u0036\u0036",NewISO3166 );_fd .RegisterConstructor ("\u0068t\u0074\u0070\u003a\u002f/\u0070\u0075\u0072\u006c\u002eo\u0072g\u002fd\u0063\u002f\u0074\u0065\u0072\u006d\u0073/","\u0042\u006f\u0078",NewBox );_fd .RegisterConstructor ("\u0068t\u0074\u0070\u003a\u002f/\u0070\u0075\u0072\u006c\u002eo\u0072g\u002fd\u0063\u002f\u0074\u0065\u0072\u006d\u0073/","\u0054\u0047\u004e",NewTGN );_fd .RegisterConstructor ("\u0068t\u0074\u0070\u003a\u002f/\u0070\u0075\u0072\u006c\u002eo\u0072g\u002fd\u0063\u002f\u0074\u0065\u0072\u006d\u0073/","\u0065\u006c\u0065\u006de\u006e\u0074\u004f\u0072\u0052\u0065\u0066\u0069\u006e\u0065m\u0065n\u0074\u0043\u006f\u006e\u0074\u0061\u0069n\u0065\u0072",NewElementOrRefinementContainer );_fd .RegisterConstructor ("\u0068t\u0074\u0070\u003a\u002f/\u0070\u0075\u0072\u006c\u002eo\u0072g\u002fd\u0063\u002f\u0074\u0065\u0072\u006d\u0073/","e\u006c\u0065\u006d\u0065\u006e\u0074s\u0041\u006e\u0064\u0052\u0065\u0066\u0069\u006e\u0065m\u0065\u006e\u0074s\u0047r\u006f\u0075\u0070",NewElementsAndRefinementsGroup );};
func (_fbg *Period )ValidateWithPath (path string )error {return nil };func (_efg *Period )MarshalXML (e *_a .Encoder ,start _a .StartElement )error {start .Name .Local ="\u0050\u0065\u0072\u0069\u006f\u0064";e .EncodeToken (start );e .EncodeToken (_a .EndElement {Name :start .Name });return nil ;};func (_ba *DCMIType )UnmarshalXML (d *_a .Decoder ,start _a .StartElement )error {for {_bb ,_gc :=d .Token ();if _gc !=nil {return _d .Errorf ("p\u0061r\u0073\u0069\u006e\u0067\u0020\u0044\u0043\u004dI\u0054\u0079\u0070\u0065: \u0025\u0073",_gc );};if _dgd ,_dff :=_bb .(_a .EndElement );_dff &&_dgd .Name ==start .Name {break ;};};return nil ;};
// Validate validates the IMT and its children
func (_ebb *IMT )Validate ()error {return _ebb .ValidateWithPath ("\u0049\u004d\u0054")};type Point struct{};func NewDCMIType ()*DCMIType {_db :=&DCMIType {};return _db };type MESH struct{};func (_fde *LCSH )UnmarshalXML (d *_a .Decoder ,start _a .StartElement )error {for {_efc ,_ged :=d .Token ();if _ged !=nil {return _d .Errorf ("\u0070\u0061r\u0073\u0069\u006eg\u0020\u004c\u0043\u0053\u0048\u003a\u0020\u0025\u0073",_ged );};if _egd ,_ggfa :=_efc .(_a .EndElement );_ggfa &&_egd .Name ==start .Name {break ;};};return nil ;};type RFC3066 struct{};
// Validate validates the LCSH and its children
func (_aeb *LCSH )Validate ()error {return _aeb .ValidateWithPath ("\u004c\u0043\u0053\u0048")};func (_bcf *MESH )MarshalXML (e *_a .Encoder ,start _a .StartElement )error {start .Name .Local ="\u004d\u0045\u0053\u0048";e .EncodeToken (start );e .EncodeToken (_a .EndElement {Name :start .Name });return nil ;};func NewLCSH ()*LCSH {_gec :=&LCSH {};return _gec };
// ValidateWithPath validates the ElementOrRefinementContainer and its children, prefixing error messages with path
func (_bee *ElementOrRefinementContainer )ValidateWithPath (path string )error {for _fb ,_bab :=range _bee .Choice {if _dge :=_bab .ValidateWithPath (_d .Sprintf ("\u0025\u0073\u002f\u0043\u0068\u006f\u0069\u0063\u0065\u005b\u0025\u0064\u005d",path ,_fb ));_dge !=nil {return _dge ;};};return nil ;};
// ValidateWithPath validates the RFC3066 and its children, prefixing error messages with path
func (_ecc *RFC3066 )ValidateWithPath (path string )error {return nil };func NewMESH ()*MESH {_ggfb :=&MESH {};return _ggfb };func (_fac *ISO639_2 )UnmarshalXML (d *_a .Decoder ,start _a .StartElement )error {for {_ga ,_facc :=d .Token ();if _facc !=nil {return _d .Errorf ("p\u0061r\u0073\u0069\u006e\u0067\u0020\u0049\u0053\u004f6\u0033\u0039\u005f\u0032: \u0025\u0073",_facc );};if _bac ,_edc :=_ga .(_a .EndElement );_edc &&_bac .Name ==start .Name {break ;};};return nil ;};
// Validate validates the UDC and its children
func (_dfe *UDC )Validate ()error {return _dfe .ValidateWithPath ("\u0055\u0044\u0043")};type ElementOrRefinementContainer struct{Choice []*ElementsAndRefinementsGroupChoice ;};type Period struct{};func (_bea *W3CDTF )MarshalXML (e *_a .Encoder ,start _a .StartElement )error {start .Name .Local ="\u0057\u0033\u0043\u0044\u0054\u0046";e .EncodeToken (start );e .EncodeToken (_a .EndElement {Name :start .Name });return nil ;};func (_ada *RFC3066 )MarshalXML (e *_a .Encoder ,start _a .StartElement )error {start .Name .Local ="\u0052F\u0043\u0033\u0030\u0036\u0036";e .EncodeToken (start );e .EncodeToken (_a .EndElement {Name :start .Name });return nil ;};func NewRFC1766 ()*RFC1766 {_bec :=&RFC1766 {};return _bec };type RFC1766 struct{};func (_eg *DDC )UnmarshalXML (d *_a .Decoder ,start _a .StartElement )error {for {_aa ,_gb :=d .Token ();if _gb !=nil {return _d .Errorf ("\u0070a\u0072s\u0069\u006e\u0067\u0020\u0044\u0044\u0043\u003a\u0020\u0025\u0073",_gb );};if _dd ,_gd :=_aa .(_a .EndElement );_gd &&_dd .Name ==start .Name {break ;};};return nil ;};func (_dde *ElementsAndRefinementsGroup )MarshalXML (e *_a .Encoder ,start _a .StartElement )error {if _dde .Choice !=nil {for _ ,_bf :=range _dde .Choice {_bf .MarshalXML (e ,_a .StartElement {});};};return nil ;};
// ValidateWithPath validates the URI and its children, prefixing error messages with path
func (_babbf *URI )ValidateWithPath (path string )error {return nil };func (_be *DCMIType )MarshalXML (e *_a .Encoder ,start _a .StartElement )error {start .Name .Local ="\u0044\u0043\u004d\u0049\u0054\u0079\u0070\u0065";e .EncodeToken (start );e .EncodeToken (_a .EndElement {Name :start .Name });return nil ;};func (_cca *RFC1766 )UnmarshalXML (d *_a .Decoder ,start _a .StartElement )error {for {_fgf ,_agd :=d .Token ();if _agd !=nil {return _d .Errorf ("\u0070\u0061\u0072\u0073in\u0067\u0020\u0052\u0046\u0043\u0031\u0037\u0036\u0036\u003a\u0020\u0025\u0073",_agd );};if _dga ,_abg :=_fgf .(_a .EndElement );_abg &&_dga .Name ==start .Name {break ;};};return nil ;};
// ValidateWithPath validates the DDC and its children, prefixing error messages with path
func (_fg *DDC )ValidateWithPath (path string )error {return nil };
// Validate validates the URI and its children
func (_fcbb *URI )Validate ()error {return _fcbb .ValidateWithPath ("\u0055\u0052\u0049")};
// ValidateWithPath validates the Point and its children, prefixing error messages with path
func (_adf *Point )ValidateWithPath (path string )error {return nil };
// ValidateWithPath validates the W3CDTF and its children, prefixing error messages with path
func (_dbb *W3CDTF )ValidateWithPath (path string )error {return nil };func NewIMT ()*IMT {_af :=&IMT {};return _af };type Box struct{};func NewBox ()*Box {_g :=&Box {};return _g };type W3CDTF struct{};
// Validate validates the RFC1766 and its children
func (_fca *RFC1766 )Validate ()error {return _fca .ValidateWithPath ("\u0052F\u0043\u0031\u0037\u0036\u0036");};func (_dc *Box )UnmarshalXML (d *_a .Decoder ,start _a .StartElement )error {for {_fe ,_da :=d .Token ();if _da !=nil {return _d .Errorf ("\u0070a\u0072s\u0069\u006e\u0067\u0020\u0042\u006f\u0078\u003a\u0020\u0025\u0073",_da );};if _c ,_e :=_fe .(_a .EndElement );_e &&_c .Name ==start .Name {break ;};};return nil ;};func NewTGN ()*TGN {_eff :=&TGN {};return _eff };
// Validate validates the ElementsAndRefinementsGroup and its children
func (_dcf *ElementsAndRefinementsGroup )Validate ()error {return _dcf .ValidateWithPath ("E\u006c\u0065\u006d\u0065\u006e\u0074s\u0041\u006e\u0064\u0052\u0065\u0066\u0069\u006e\u0065m\u0065\u006e\u0074s\u0047r\u006f\u0075\u0070");};func (_ffd *URI )MarshalXML (e *_a .Encoder ,start _a .StartElement )error {start .Name .Local ="\u0055\u0052\u0049";e .EncodeToken (start );e .EncodeToken (_a .EndElement {Name :start .Name });return nil ;};func NewDDC ()*DDC {_cc :=&DDC {};return _cc };
// Validate validates the ElementsAndRefinementsGroupChoice and its children
func (_gga *ElementsAndRefinementsGroupChoice )Validate ()error {return _gga .ValidateWithPath ("\u0045\u006c\u0065\u006d\u0065\u006et\u0073\u0041\u006e\u0064\u0052\u0065\u0066\u0069\u006e\u0065\u006d\u0065\u006et\u0073\u0047\u0072\u006f\u0075\u0070\u0043h\u006f\u0069\u0063\u0065");};func (_ccd *TGN )MarshalXML (e *_a .Encoder ,start _a .StartElement )error {start .Name .Local ="\u0054\u0047\u004e";e .EncodeToken (start );e .EncodeToken (_a .EndElement {Name :start .Name });return nil ;};
// ValidateWithPath validates the ISO3166 and its children, prefixing error messages with path
func (_ebg *ISO3166 )ValidateWithPath (path string )error {return nil };func (_deg *URI )UnmarshalXML (d *_a .Decoder ,start _a .StartElement )error {for {_cee ,_ecf :=d .Token ();if _ecf !=nil {return _d .Errorf ("\u0070a\u0072s\u0069\u006e\u0067\u0020\u0055\u0052\u0049\u003a\u0020\u0025\u0073",_ecf );};if _fadc ,_afbb :=_cee .(_a .EndElement );_afbb &&_fadc .Name ==start .Name {break ;};};return nil ;};
// ValidateWithPath validates the LCC and its children, prefixing error messages with path
func (_fgeb *LCC )ValidateWithPath (path string )error {return nil };
// Validate validates the Box and its children
func (_ec *Box )Validate ()error {return _ec .ValidateWithPath ("\u0042\u006f\u0078")};func (_bfd *UDC )UnmarshalXML (d *_a .Decoder ,start _a .StartElement )error {for {_agf ,_cbe :=d .Token ();if _cbe !=nil {return _d .Errorf ("\u0070a\u0072s\u0069\u006e\u0067\u0020\u0055\u0044\u0043\u003a\u0020\u0025\u0073",_cbe );};if _fcb ,_ffea :=_agf .(_a .EndElement );_ffea &&_fcb .Name ==start .Name {break ;};};return nil ;};
// ValidateWithPath validates the DCMIType and its children, prefixing error messages with path
func (_eb *DCMIType )ValidateWithPath (path string )error {return nil };
// ValidateWithPath validates the Box and its children, prefixing error messages with path
func (_df *Box )ValidateWithPath (path string )error {return nil };
// ValidateWithPath validates the MESH and its children, prefixing error messages with path
func (_egb *MESH )ValidateWithPath (path string )error {return nil };
// ValidateWithPath validates the LCSH and its children, prefixing error messages with path
func (_dcb *LCSH )ValidateWithPath (path string )error {return nil };
// ValidateWithPath validates the TGN and its children, prefixing error messages with path
func (_geg *TGN )ValidateWithPath (path string )error {return nil };
// ValidateWithPath validates the ISO639_2 and its children, prefixing error messages with path
func (_bc *ISO639_2 )ValidateWithPath (path string )error {return nil };func NewISO3166 ()*ISO3166 {_dfc :=&ISO3166 {};return _dfc };func (_agb *UDC )MarshalXML (e *_a .Encoder ,start _a .StartElement )error {start .Name .Local ="\u0055\u0044\u0043";e .EncodeToken (start );e .EncodeToken (_a .EndElement {Name :start .Name });return nil ;};
// Validate validates the RFC3066 and its children
func (_gac *RFC3066 )Validate ()error {return _gac .ValidateWithPath ("\u0052F\u0043\u0033\u0030\u0036\u0036");};func (_eeg *ElementsAndRefinementsGroupChoice )MarshalXML (e *_a .Encoder ,start _a .StartElement )error {if _eeg .Any !=nil {_gcg :=_a .StartElement {Name :_a .Name {Local :"\u0064\u0063\u003a\u0061\u006e\u0079"}};for _ ,_dba :=range _eeg .Any {e .EncodeElement (_dba ,_gcg );};};return nil ;};func (_ccg *ElementsAndRefinementsGroupChoice )UnmarshalXML (d *_a .Decoder ,start _a .StartElement )error {_aaed :for {_dec ,_dbg :=d .Token ();if _dbg !=nil {return _dbg ;};switch _ac :=_dec .(type ){case _a .StartElement :switch _ac .Name {case _a .Name {Space :"\u0068\u0074\u0074\u0070\u003a\u002f\u002f\u0070\u0075\u0072\u006c\u002e\u006f\u0072\u0067/\u0064c\u002f\u0065\u006c\u0065\u006d\u0065\u006e\u0074\u0073\u002f\u0031\u002e\u0031\u002f",Local :"\u0061\u006e\u0079"}:_gde :=_f .NewAny ();if _cefb :=d .DecodeElement (_gde ,&_ac );_cefb !=nil {return _cefb ;};_ccg .Any =append (_ccg .Any ,_gde );default:_dg .Log ("\u0073\u006b\u0069\u0070\u0070\u0069\u006e\u0067\u0020\u0075\u006e\u0073\u0075\u0070\u0070\u006f\u0072\u0074\u0065\u0064 \u0065\u006c\u0065\u006d\u0065\u006e\u0074\u0020\u006f\u006e\u0020\u0045\u006c\u0065\u006d\u0065\u006e\u0074\u0073\u0041\u006ed\u0052\u0065\u0066\u0069\u006e\u0065\u006d\u0065\u006e\u0074\u0073\u0047\u0072\u006fu\u0070\u0043\u0068o\u0069\u0063\u0065\u0020\u0025\u0076",_ac .Name );if _dag :=d .Skip ();_dag !=nil {return _dag ;};};case _a .EndElement :break _aaed ;case _a .CharData :};};return nil ;};func NewElementsAndRefinementsGroupChoice ()*ElementsAndRefinementsGroupChoice {_fa :=&ElementsAndRefinementsGroupChoice {};return _fa ;};type ISO3166 struct{};func (_bdg *RFC1766 )MarshalXML (e *_a .Encoder ,start _a .StartElement )error {start .Name .Local ="\u0052F\u0043\u0031\u0037\u0036\u0036";e .EncodeToken (start );e .EncodeToken (_a .EndElement {Name :start .Name });return nil ;};
// Validate validates the Period and its children
func (_dae *Period )Validate ()error {return _dae .ValidateWithPath ("\u0050\u0065\u0072\u0069\u006f\u0064");};type TGN struct{};
// ValidateWithPath validates the IMT and its children, prefixing error messages with path
func (_dea *IMT )ValidateWithPath (path string )error {return nil };type URI struct{};func (_abe *TGN )UnmarshalXML (d *_a .Decoder ,start _a .StartElement )error {for {_gfe ,_abba :=d .Token ();if _abba !=nil {return _d .Errorf ("\u0070a\u0072s\u0069\u006e\u0067\u0020\u0054\u0047\u004e\u003a\u0020\u0025\u0073",_abba );};if _cde ,_bcb :=_gfe .(_a .EndElement );_bcb &&_cde .Name ==start .Name {break ;};};return nil ;};func (_gfd *ISO3166 )MarshalXML (e *_a .Encoder ,start _a .StartElement )error {start .Name .Local ="\u0049S\u004f\u0033\u0031\u0036\u0036";e .EncodeToken (start );e .EncodeToken (_a .EndElement {Name :start .Name });return nil ;};func (_ab *IMT )UnmarshalXML (d *_a .Decoder ,start _a .StartElement )error {for {_cdf ,_bg :=d .Token ();if _bg !=nil {return _d .Errorf ("\u0070a\u0072s\u0069\u006e\u0067\u0020\u0049\u004d\u0054\u003a\u0020\u0025\u0073",_bg );};if _febf ,_ge :=_cdf .(_a .EndElement );_ge &&_febf .Name ==start .Name {break ;};};return nil ;};type UDC struct{};func NewURI ()*URI {_bda :=&URI {};return _bda };func (_aaf *LCC )UnmarshalXML (d *_a .Decoder ,start _a .StartElement )error {for {_ded ,_ddf :=d .Token ();if _ddf !=nil {return _d .Errorf ("\u0070a\u0072s\u0069\u006e\u0067\u0020\u004c\u0043\u0043\u003a\u0020\u0025\u0073",_ddf );};if _agg ,_geb :=_ded .(_a .EndElement );_geb &&_agg .Name ==start .Name {break ;};};return nil ;};type LCC struct{};type DDC struct{};
// Validate validates the ElementOrRefinementContainer and its children
func (_fd *ElementOrRefinementContainer )Validate ()error {return _fd .ValidateWithPath ("\u0045\u006c\u0065\u006de\u006e\u0074\u004f\u0072\u0052\u0065\u0066\u0069\u006e\u0065m\u0065n\u0074\u0043\u006f\u006e\u0074\u0061\u0069n\u0065\u0072");};func NewISO639_2 ()*ISO639_2 {_cbg :=&ISO639_2 {};return _cbg };func init (){_dg .RegisterConstructor ("\u0068t\u0074\u0070\u003a\u002f/\u0070\u0075\u0072\u006c\u002eo\u0072g\u002fd\u0063\u002f\u0074\u0065\u0072\u006d\u0073/","\u004c\u0043\u0053\u0048",NewLCSH );_dg .RegisterConstructor ("\u0068t\u0074\u0070\u003a\u002f/\u0070\u0075\u0072\u006c\u002eo\u0072g\u002fd\u0063\u002f\u0074\u0065\u0072\u006d\u0073/","\u004d\u0045\u0053\u0048",NewMESH );_dg .RegisterConstructor ("\u0068t\u0074\u0070\u003a\u002f/\u0070\u0075\u0072\u006c\u002eo\u0072g\u002fd\u0063\u002f\u0074\u0065\u0072\u006d\u0073/","\u0044\u0044\u0043",NewDDC );_dg .RegisterConstructor ("\u0068t\u0074\u0070\u003a\u002f/\u0070\u0075\u0072\u006c\u002eo\u0072g\u002fd\u0063\u002f\u0074\u0065\u0072\u006d\u0073/","\u004c\u0043\u0043",NewLCC );_dg .RegisterConstructor ("\u0068t\u0074\u0070\u003a\u002f/\u0070\u0075\u0072\u006c\u002eo\u0072g\u002fd\u0063\u002f\u0074\u0065\u0072\u006d\u0073/","\u0055\u0044\u0043",NewUDC );_dg .RegisterConstructor ("\u0068t\u0074\u0070\u003a\u002f/\u0070\u0075\u0072\u006c\u002eo\u0072g\u002fd\u0063\u002f\u0074\u0065\u0072\u006d\u0073/","\u0050\u0065\u0072\u0069\u006f\u0064",NewPeriod );_dg .RegisterConstructor ("\u0068t\u0074\u0070\u003a\u002f/\u0070\u0075\u0072\u006c\u002eo\u0072g\u002fd\u0063\u002f\u0074\u0065\u0072\u006d\u0073/","\u0057\u0033\u0043\u0044\u0054\u0046",NewW3CDTF );_dg .RegisterConstructor ("\u0068t\u0074\u0070\u003a\u002f/\u0070\u0075\u0072\u006c\u002eo\u0072g\u002fd\u0063\u002f\u0074\u0065\u0072\u006d\u0073/","\u0044\u0043\u004d\u0049\u0054\u0079\u0070\u0065",NewDCMIType );_dg .RegisterConstructor ("\u0068t\u0074\u0070\u003a\u002f/\u0070\u0075\u0072\u006c\u002eo\u0072g\u002fd\u0063\u002f\u0074\u0065\u0072\u006d\u0073/","\u0049\u004d\u0054",NewIMT );_dg .RegisterConstructor ("\u0068t\u0074\u0070\u003a\u002f/\u0070\u0075\u0072\u006c\u002eo\u0072g\u002fd\u0063\u002f\u0074\u0065\u0072\u006d\u0073/","\u0055\u0052\u0049",NewURI );_dg .RegisterConstructor ("\u0068t\u0074\u0070\u003a\u002f/\u0070\u0075\u0072\u006c\u002eo\u0072g\u002fd\u0063\u002f\u0074\u0065\u0072\u006d\u0073/","\u0049\u0053\u004f\u0036\u0033\u0039\u002d\u0032",NewISO639_2 );_dg .RegisterConstructor ("\u0068t\u0074\u0070\u003a\u002f/\u0070\u0075\u0072\u006c\u002eo\u0072g\u002fd\u0063\u002f\u0074\u0065\u0072\u006d\u0073/","\u0052F\u0043\u0031\u0037\u0036\u0036",NewRFC1766 );_dg .RegisterConstructor ("\u0068t\u0074\u0070\u003a\u002f/\u0070\u0075\u0072\u006c\u002eo\u0072g\u002fd\u0063\u002f\u0074\u0065\u0072\u006d\u0073/","\u0052F\u0043\u0033\u0030\u0036\u0036",NewRFC3066 );_dg .RegisterConstructor ("\u0068t\u0074\u0070\u003a\u002f/\u0070\u0075\u0072\u006c\u002eo\u0072g\u002fd\u0063\u002f\u0074\u0065\u0072\u006d\u0073/","\u0050\u006f\u0069n\u0074",NewPoint );_dg .RegisterConstructor ("\u0068t\u0074\u0070\u003a\u002f/\u0070\u0075\u0072\u006c\u002eo\u0072g\u002fd\u0063\u002f\u0074\u0065\u0072\u006d\u0073/","\u0049S\u004f\u0033\u0031\u0036\u0036",NewISO3166 );_dg .RegisterConstructor ("\u0068t\u0074\u0070\u003a\u002f/\u0070\u0075\u0072\u006c\u002eo\u0072g\u002fd\u0063\u002f\u0074\u0065\u0072\u006d\u0073/","\u0042\u006f\u0078",NewBox );_dg .RegisterConstructor ("\u0068t\u0074\u0070\u003a\u002f/\u0070\u0075\u0072\u006c\u002eo\u0072g\u002fd\u0063\u002f\u0074\u0065\u0072\u006d\u0073/","\u0054\u0047\u004e",NewTGN );_dg .RegisterConstructor ("\u0068t\u0074\u0070\u003a\u002f/\u0070\u0075\u0072\u006c\u002eo\u0072g\u002fd\u0063\u002f\u0074\u0065\u0072\u006d\u0073/","\u0065\u006c\u0065\u006de\u006e\u0074\u004f\u0072\u0052\u0065\u0066\u0069\u006e\u0065m\u0065n\u0074\u0043\u006f\u006e\u0074\u0061\u0069n\u0065\u0072",NewElementOrRefinementContainer );_dg .RegisterConstructor ("\u0068t\u0074\u0070\u003a\u002f/\u0070\u0075\u0072\u006c\u002eo\u0072g\u002fd\u0063\u002f\u0074\u0065\u0072\u006d\u0073/","e\u006c\u0065\u006d\u0065\u006e\u0074s\u0041\u006e\u0064\u0052\u0065\u0066\u0069\u006e\u0065m\u0065\u006e\u0074s\u0047r\u006f\u0075\u0070",NewElementsAndRefinementsGroup );};

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -9,10 +9,10 @@
// 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 lockedCanvas ;import (_e "encoding/xml";_ed "fmt";_g "github.com/unidoc/unioffice";_fb "github.com/unidoc/unioffice/schema/soo/dml";);
// ValidateWithPath validates the LockedCanvas and its children, prefixing error messages with path
func (_d *LockedCanvas )ValidateWithPath (path string )error {if _af :=_d .CT_GvmlGroupShape .ValidateWithPath (path );_af !=nil {return _af ;};return nil ;};type LockedCanvas struct{_fb .CT_GvmlGroupShape };
package lockedCanvas ;import (_d "encoding/xml";_c "fmt";_gd "github.com/unidoc/unioffice";_a "github.com/unidoc/unioffice/schema/soo/dml";);type LockedCanvas struct{_a .CT_GvmlGroupShape };func (_af *LockedCanvas )UnmarshalXML (d *_d .Decoder ,start _d .StartElement )error {_af .CT_GvmlGroupShape =*_a .NewCT_GvmlGroupShape ();for {_b ,_cb :=d .Token ();if _cb !=nil {return _c .Errorf ("\u0070a\u0072\u0073\u0069\u006e\u0067\u0020\u004c\u006f\u0063\u006b\u0065d\u0043\u0061\u006e\u0076\u0061\u0073\u003a\u0020\u0025\u0073",_cb );};if _bb ,_bf :=_b .(_d .EndElement );_bf &&_bb .Name ==start .Name {break ;};};return nil ;};
// Validate validates the LockedCanvas and its children
func (_eg *LockedCanvas )Validate ()error {return _eg .ValidateWithPath ("\u004c\u006f\u0063k\u0065\u0064\u0043\u0061\u006e\u0076\u0061\u0073");};func NewLockedCanvas ()*LockedCanvas {_fg :=&LockedCanvas {};_fg .CT_GvmlGroupShape =*_fb .NewCT_GvmlGroupShape ();return _fg ;};func (_fe *LockedCanvas )MarshalXML (e *_e .Encoder ,start _e .StartElement )error {start .Attr =append (start .Attr ,_e .Attr {Name :_e .Name {Local :"\u0078\u006d\u006cn\u0073"},Value :"h\u0074\u0074\u0070\u003a\u002f\u002f\u0073\u0063\u0068\u0065\u006d\u0061\u0073\u002e\u006f\u0070\u0065\u006e\u0078\u006d\u006c\u0066\u006f\u0072\u006d\u0061t\u0073.\u006f\u0072\u0067\u002fd\u0072\u0061w\u0069\u006e\u0067\u006d\u006c\u002f\u0032\u0030\u0030\u0036\u002f\u006c\u006f\u0063\u006b\u0065\u0064\u0043\u0061\u006e\u0076\u0061\u0073"});start .Attr =append (start .Attr ,_e .Attr {Name :_e .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 ="\u006c\u006f\u0063k\u0065\u0064\u0043\u0061\u006e\u0076\u0061\u0073";return _fe .CT_GvmlGroupShape .MarshalXML (e ,start );};func (_a *LockedCanvas )UnmarshalXML (d *_e .Decoder ,start _e .StartElement )error {_a .CT_GvmlGroupShape =*_fb .NewCT_GvmlGroupShape ();for {_fgc ,_ea :=d .Token ();if _ea !=nil {return _ed .Errorf ("\u0070a\u0072\u0073\u0069\u006e\u0067\u0020\u004c\u006f\u0063\u006b\u0065d\u0043\u0061\u006e\u0076\u0061\u0073\u003a\u0020\u0025\u0073",_ea );};if _c ,_ad :=_fgc .(_e .EndElement );_ad &&_c .Name ==start .Name {break ;};};return nil ;};func init (){_g .RegisterConstructor ("h\u0074\u0074\u0070\u003a\u002f\u002f\u0073\u0063\u0068\u0065\u006d\u0061\u0073\u002e\u006f\u0070\u0065\u006e\u0078\u006d\u006c\u0066\u006f\u0072\u006d\u0061t\u0073.\u006f\u0072\u0067\u002fd\u0072\u0061w\u0069\u006e\u0067\u006d\u006c\u002f\u0032\u0030\u0030\u0036\u002f\u006c\u006f\u0063\u006b\u0065\u0064\u0043\u0061\u006e\u0076\u0061\u0073","\u006c\u006f\u0063k\u0065\u0064\u0043\u0061\u006e\u0076\u0061\u0073",NewLockedCanvas );};
func (_ac *LockedCanvas )Validate ()error {return _ac .ValidateWithPath ("\u004c\u006f\u0063k\u0065\u0064\u0043\u0061\u006e\u0076\u0061\u0073");};func (_ga *LockedCanvas )MarshalXML (e *_d .Encoder ,start _d .StartElement )error {start .Attr =append (start .Attr ,_d .Attr {Name :_d .Name {Local :"\u0078\u006d\u006cn\u0073"},Value :"h\u0074\u0074\u0070\u003a\u002f\u002f\u0073\u0063\u0068\u0065\u006d\u0061\u0073\u002e\u006f\u0070\u0065\u006e\u0078\u006d\u006c\u0066\u006f\u0072\u006d\u0061t\u0073.\u006f\u0072\u0067\u002fd\u0072\u0061w\u0069\u006e\u0067\u006d\u006c\u002f\u0032\u0030\u0030\u0036\u002f\u006c\u006f\u0063\u006b\u0065\u0064\u0043\u0061\u006e\u0076\u0061\u0073"});start .Attr =append (start .Attr ,_d .Attr {Name :_d .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 ="\u006c\u006f\u0063k\u0065\u0064\u0043\u0061\u006e\u0076\u0061\u0073";return _ga .CT_GvmlGroupShape .MarshalXML (e ,start );};
// ValidateWithPath validates the LockedCanvas and its children, prefixing error messages with path
func (_ae *LockedCanvas )ValidateWithPath (path string )error {if _gb :=_ae .CT_GvmlGroupShape .ValidateWithPath (path );_gb !=nil {return _gb ;};return nil ;};func NewLockedCanvas ()*LockedCanvas {_f :=&LockedCanvas {};_f .CT_GvmlGroupShape =*_a .NewCT_GvmlGroupShape ();return _f ;};func init (){_gd .RegisterConstructor ("h\u0074\u0074\u0070\u003a\u002f\u002f\u0073\u0063\u0068\u0065\u006d\u0061\u0073\u002e\u006f\u0070\u0065\u006e\u0078\u006d\u006c\u0066\u006f\u0072\u006d\u0061t\u0073.\u006f\u0072\u0067\u002fd\u0072\u0061w\u0069\u006e\u0067\u006d\u006c\u002f\u0032\u0030\u0030\u0036\u002f\u006c\u006f\u0063\u006b\u0065\u0064\u0043\u0061\u006e\u0076\u0061\u0073","\u006c\u006f\u0063k\u0065\u0064\u0043\u0061\u006e\u0076\u0061\u0073",NewLockedCanvas );};

View File

@ -9,22 +9,22 @@
// 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 picture ;import (_a "encoding/xml";_e "github.com/unidoc/unioffice";_dd "github.com/unidoc/unioffice/schema/soo/dml";);func (_af *CT_PictureNonVisual )UnmarshalXML (d *_a .Decoder ,start _a .StartElement )error {_af .CNvPr =_dd .NewCT_NonVisualDrawingProps ();_af .CNvPicPr =_dd .NewCT_NonVisualPictureProperties ();_ca :for {_ed ,_cg :=d .Token ();if _cg !=nil {return _cg ;};switch _eag :=_ed .(type ){case _a .StartElement :switch _eag .Name {case _a .Name {Space :"\u0068\u0074\u0074\u0070\u003a\u002f/\u0073\u0063\u0068e\u006d\u0061\u0073.\u006f\u0070\u0065\u006e\u0078\u006d\u006c\u0066\u006f\u0072m\u0061\u0074\u0073\u002e\u006frg\u002f\u0064\u0072\u0061\u0077\u0069\u006e\u0067\u006d\u006c\u002f\u0032\u0030\u0030\u0036\u002f\u0070\u0069\u0063\u0074\u0075\u0072\u0065",Local :"\u0063\u004e\u0076P\u0072"},_a .Name {Space :"\u0068t\u0074\u0070:\u002f\u002f\u0070\u0075r\u006c\u002e\u006fc\u006c\u0063\u002e\u006f\u0072\u0067\u002f\u006f\u006fxm\u006c\u002f\u0064r\u0061\u0077i\u006e\u0067\u006d\u006c\u002f\u0070i\u0063\u0074u\u0072\u0065",Local :"\u0063\u004e\u0076P\u0072"}:if _fg :=d .DecodeElement (_af .CNvPr ,&_eag );_fg !=nil {return _fg ;};case _a .Name {Space :"\u0068\u0074\u0074\u0070\u003a\u002f/\u0073\u0063\u0068e\u006d\u0061\u0073.\u006f\u0070\u0065\u006e\u0078\u006d\u006c\u0066\u006f\u0072m\u0061\u0074\u0073\u002e\u006frg\u002f\u0064\u0072\u0061\u0077\u0069\u006e\u0067\u006d\u006c\u002f\u0032\u0030\u0030\u0036\u002f\u0070\u0069\u0063\u0074\u0075\u0072\u0065",Local :"\u0063\u004e\u0076\u0050\u0069\u0063\u0050\u0072"},_a .Name {Space :"\u0068t\u0074\u0070:\u002f\u002f\u0070\u0075r\u006c\u002e\u006fc\u006c\u0063\u002e\u006f\u0072\u0067\u002f\u006f\u006fxm\u006c\u002f\u0064r\u0061\u0077i\u006e\u0067\u006d\u006c\u002f\u0070i\u0063\u0074u\u0072\u0065",Local :"\u0063\u004e\u0076\u0050\u0069\u0063\u0050\u0072"}:if _fgb :=d .DecodeElement (_af .CNvPicPr ,&_eag );_fgb !=nil {return _fgb ;};default:_e .Log ("\u0073\u006b\u0069\u0070\u0070\u0069\u006e\u0067\u0020\u0075\u006e\u0073\u0075\u0070\u0070o\u0072\u0074\u0065\u0064\u0020\u0065\u006c\u0065\u006d\u0065\u006e\u0074\u0020o\u006e\u0020\u0043\u0054\u005f\u0050\u0069\u0063\u0074\u0075\u0072\u0065No\u006e\u0056\u0069\u0073\u0075\u0061\u006c\u0020\u0025\u0076",_eag .Name );if _bf :=d .Skip ();_bf !=nil {return _bf ;};};case _a .EndElement :break _ca ;case _a .CharData :};};return nil ;};type CT_Picture struct{NvPicPr *CT_PictureNonVisual ;BlipFill *_dd .CT_BlipFillProperties ;SpPr *_dd .CT_ShapeProperties ;};func (_b *CT_Picture )MarshalXML (e *_a .Encoder ,start _a .StartElement )error {e .EncodeToken (start );_be :=_a .StartElement {Name :_a .Name {Local :"p\u0069\u0063\u003a\u006e\u0076\u0050\u0069\u0063\u0050\u0072"}};e .EncodeElement (_b .NvPicPr ,_be );_df :=_a .StartElement {Name :_a .Name {Local :"\u0070\u0069\u0063:\u0062\u006c\u0069\u0070\u0046\u0069\u006c\u006c"}};e .EncodeElement (_b .BlipFill ,_df );_ddb :=_a .StartElement {Name :_a .Name {Local :"\u0070\u0069\u0063\u003a\u0073\u0070\u0050\u0072"}};e .EncodeElement (_b .SpPr ,_ddb );e .EncodeToken (_a .EndElement {Name :start .Name });return nil ;};type CT_PictureNonVisual struct{CNvPr *_dd .CT_NonVisualDrawingProps ;CNvPicPr *_dd .CT_NonVisualPictureProperties ;};
// Validate validates the Pic and its children
func (_ba *Pic )Validate ()error {return _ba .ValidateWithPath ("\u0050\u0069\u0063")};func NewPic ()*Pic {_ga :=&Pic {};_ga .CT_Picture =*NewCT_Picture ();return _ga };func NewCT_Picture ()*CT_Picture {_ec :=&CT_Picture {};_ec .NvPicPr =NewCT_PictureNonVisual ();_ec .BlipFill =_dd .NewCT_BlipFillProperties ();_ec .SpPr =_dd .NewCT_ShapeProperties ();return _ec ;};
// Validate validates the CT_Picture and its children
func (_ada *CT_Picture )Validate ()error {return _ada .ValidateWithPath ("\u0043\u0054\u005f\u0050\u0069\u0063\u0074\u0075\u0072\u0065");};func NewCT_PictureNonVisual ()*CT_PictureNonVisual {_bg :=&CT_PictureNonVisual {};_bg .CNvPr =_dd .NewCT_NonVisualDrawingProps ();_bg .CNvPicPr =_dd .NewCT_NonVisualPictureProperties ();return _bg ;};func (_eb *Pic )UnmarshalXML (d *_a .Decoder ,start _a .StartElement )error {_eb .CT_Picture =*NewCT_Picture ();_ff :for {_gd ,_da :=d .Token ();if _da !=nil {return _da ;};switch _de :=_gd .(type ){case _a .StartElement :switch _de .Name {case _a .Name {Space :"\u0068\u0074\u0074\u0070\u003a\u002f/\u0073\u0063\u0068e\u006d\u0061\u0073.\u006f\u0070\u0065\u006e\u0078\u006d\u006c\u0066\u006f\u0072m\u0061\u0074\u0073\u002e\u006frg\u002f\u0064\u0072\u0061\u0077\u0069\u006e\u0067\u006d\u006c\u002f\u0032\u0030\u0030\u0036\u002f\u0070\u0069\u0063\u0074\u0075\u0072\u0065",Local :"\u006ev\u0050\u0069\u0063\u0050\u0072"},_a .Name {Space :"\u0068t\u0074\u0070:\u002f\u002f\u0070\u0075r\u006c\u002e\u006fc\u006c\u0063\u002e\u006f\u0072\u0067\u002f\u006f\u006fxm\u006c\u002f\u0064r\u0061\u0077i\u006e\u0067\u006d\u006c\u002f\u0070i\u0063\u0074u\u0072\u0065",Local :"\u006ev\u0050\u0069\u0063\u0050\u0072"}:if _gag :=d .DecodeElement (_eb .NvPicPr ,&_de );_gag !=nil {return _gag ;};case _a .Name {Space :"\u0068\u0074\u0074\u0070\u003a\u002f/\u0073\u0063\u0068e\u006d\u0061\u0073.\u006f\u0070\u0065\u006e\u0078\u006d\u006c\u0066\u006f\u0072m\u0061\u0074\u0073\u002e\u006frg\u002f\u0064\u0072\u0061\u0077\u0069\u006e\u0067\u006d\u006c\u002f\u0032\u0030\u0030\u0036\u002f\u0070\u0069\u0063\u0074\u0075\u0072\u0065",Local :"\u0062\u006c\u0069\u0070\u0046\u0069\u006c\u006c"},_a .Name {Space :"\u0068t\u0074\u0070:\u002f\u002f\u0070\u0075r\u006c\u002e\u006fc\u006c\u0063\u002e\u006f\u0072\u0067\u002f\u006f\u006fxm\u006c\u002f\u0064r\u0061\u0077i\u006e\u0067\u006d\u006c\u002f\u0070i\u0063\u0074u\u0072\u0065",Local :"\u0062\u006c\u0069\u0070\u0046\u0069\u006c\u006c"}:if _dbb :=d .DecodeElement (_eb .BlipFill ,&_de );_dbb !=nil {return _dbb ;};case _a .Name {Space :"\u0068\u0074\u0074\u0070\u003a\u002f/\u0073\u0063\u0068e\u006d\u0061\u0073.\u006f\u0070\u0065\u006e\u0078\u006d\u006c\u0066\u006f\u0072m\u0061\u0074\u0073\u002e\u006frg\u002f\u0064\u0072\u0061\u0077\u0069\u006e\u0067\u006d\u006c\u002f\u0032\u0030\u0030\u0036\u002f\u0070\u0069\u0063\u0074\u0075\u0072\u0065",Local :"\u0073\u0070\u0050\u0072"},_a .Name {Space :"\u0068t\u0074\u0070:\u002f\u002f\u0070\u0075r\u006c\u002e\u006fc\u006c\u0063\u002e\u006f\u0072\u0067\u002f\u006f\u006fxm\u006c\u002f\u0064r\u0061\u0077i\u006e\u0067\u006d\u006c\u002f\u0070i\u0063\u0074u\u0072\u0065",Local :"\u0073\u0070\u0050\u0072"}:if _ecb :=d .DecodeElement (_eb .SpPr ,&_de );_ecb !=nil {return _ecb ;};default:_e .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\u0050i\u0063\u0020\u0025\u0076",_de .Name );if _eg :=d .Skip ();_eg !=nil {return _eg ;};};case _a .EndElement :break _ff ;case _a .CharData :};};return nil ;};type Pic struct{CT_Picture };func (_cc *Pic )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/\u0073\u0063\u0068e\u006d\u0061\u0073.\u006f\u0070\u0065\u006e\u0078\u006d\u006c\u0066\u006f\u0072m\u0061\u0074\u0073\u002e\u006frg\u002f\u0064\u0072\u0061\u0077\u0069\u006e\u0067\u006d\u006c\u002f\u0032\u0030\u0030\u0036\u002f\u0070\u0069\u0063\u0074\u0075\u0072\u0065"});start .Attr =append (start .Attr ,_a .Attr {Name :_a .Name {Local :"\u0078m\u006c\u006e\u0073\u003a\u0070\u0069c"},Value :"\u0068\u0074\u0074\u0070\u003a\u002f/\u0073\u0063\u0068e\u006d\u0061\u0073.\u006f\u0070\u0065\u006e\u0078\u006d\u006c\u0066\u006f\u0072m\u0061\u0074\u0073\u002e\u006frg\u002f\u0064\u0072\u0061\u0077\u0069\u006e\u0067\u006d\u006c\u002f\u0032\u0030\u0030\u0036\u002f\u0070\u0069\u0063\u0074\u0075\u0072\u0065"});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 ="\u0070i\u0063\u003a\u0070\u0069\u0063";return _cc .CT_Picture .MarshalXML (e ,start );};
// ValidateWithPath validates the Pic and its children, prefixing error messages with path
func (_ded *Pic )ValidateWithPath (path string )error {if _bb :=_ded .CT_Picture .ValidateWithPath (path );_bb !=nil {return _bb ;};return nil ;};func (_ddf *CT_PictureNonVisual )MarshalXML (e *_a .Encoder ,start _a .StartElement )error {e .EncodeToken (start );_agd :=_a .StartElement {Name :_a .Name {Local :"\u0070i\u0063\u003a\u0063\u004e\u0076\u0050r"}};e .EncodeElement (_ddf .CNvPr ,_agd );_ae :=_a .StartElement {Name :_a .Name {Local :"\u0070\u0069\u0063:\u0063\u004e\u0076\u0050\u0069\u0063\u0050\u0072"}};e .EncodeElement (_ddf .CNvPicPr ,_ae );e .EncodeToken (_a .EndElement {Name :start .Name });return nil ;};
package picture ;import (_g "encoding/xml";_c "github.com/unidoc/unioffice";_f "github.com/unidoc/unioffice/schema/soo/dml";);type CT_Picture struct{NvPicPr *CT_PictureNonVisual ;BlipFill *_f .CT_BlipFillProperties ;SpPr *_f .CT_ShapeProperties ;};func (_gf *CT_Picture )UnmarshalXML (d *_g .Decoder ,start _g .StartElement )error {_gf .NvPicPr =NewCT_PictureNonVisual ();_gf .BlipFill =_f .NewCT_BlipFillProperties ();_gf .SpPr =_f .NewCT_ShapeProperties ();_dg :for {_gff ,_e :=d .Token ();if _e !=nil {return _e ;};switch _cc :=_gff .(type ){case _g .StartElement :switch _cc .Name {case _g .Name {Space :"\u0068\u0074\u0074\u0070\u003a\u002f/\u0073\u0063\u0068e\u006d\u0061\u0073.\u006f\u0070\u0065\u006e\u0078\u006d\u006c\u0066\u006f\u0072m\u0061\u0074\u0073\u002e\u006frg\u002f\u0064\u0072\u0061\u0077\u0069\u006e\u0067\u006d\u006c\u002f\u0032\u0030\u0030\u0036\u002f\u0070\u0069\u0063\u0074\u0075\u0072\u0065",Local :"\u006ev\u0050\u0069\u0063\u0050\u0072"},_g .Name {Space :"\u0068t\u0074\u0070:\u002f\u002f\u0070\u0075r\u006c\u002e\u006fc\u006c\u0063\u002e\u006f\u0072\u0067\u002f\u006f\u006fxm\u006c\u002f\u0064r\u0061\u0077i\u006e\u0067\u006d\u006c\u002f\u0070i\u0063\u0074u\u0072\u0065",Local :"\u006ev\u0050\u0069\u0063\u0050\u0072"}:if _ed :=d .DecodeElement (_gf .NvPicPr ,&_cc );_ed !=nil {return _ed ;};case _g .Name {Space :"\u0068\u0074\u0074\u0070\u003a\u002f/\u0073\u0063\u0068e\u006d\u0061\u0073.\u006f\u0070\u0065\u006e\u0078\u006d\u006c\u0066\u006f\u0072m\u0061\u0074\u0073\u002e\u006frg\u002f\u0064\u0072\u0061\u0077\u0069\u006e\u0067\u006d\u006c\u002f\u0032\u0030\u0030\u0036\u002f\u0070\u0069\u0063\u0074\u0075\u0072\u0065",Local :"\u0062\u006c\u0069\u0070\u0046\u0069\u006c\u006c"},_g .Name {Space :"\u0068t\u0074\u0070:\u002f\u002f\u0070\u0075r\u006c\u002e\u006fc\u006c\u0063\u002e\u006f\u0072\u0067\u002f\u006f\u006fxm\u006c\u002f\u0064r\u0061\u0077i\u006e\u0067\u006d\u006c\u002f\u0070i\u0063\u0074u\u0072\u0065",Local :"\u0062\u006c\u0069\u0070\u0046\u0069\u006c\u006c"}:if _gg :=d .DecodeElement (_gf .BlipFill ,&_cc );_gg !=nil {return _gg ;};case _g .Name {Space :"\u0068\u0074\u0074\u0070\u003a\u002f/\u0073\u0063\u0068e\u006d\u0061\u0073.\u006f\u0070\u0065\u006e\u0078\u006d\u006c\u0066\u006f\u0072m\u0061\u0074\u0073\u002e\u006frg\u002f\u0064\u0072\u0061\u0077\u0069\u006e\u0067\u006d\u006c\u002f\u0032\u0030\u0030\u0036\u002f\u0070\u0069\u0063\u0074\u0075\u0072\u0065",Local :"\u0073\u0070\u0050\u0072"},_g .Name {Space :"\u0068t\u0074\u0070:\u002f\u002f\u0070\u0075r\u006c\u002e\u006fc\u006c\u0063\u002e\u006f\u0072\u0067\u002f\u006f\u006fxm\u006c\u002f\u0064r\u0061\u0077i\u006e\u0067\u006d\u006c\u002f\u0070i\u0063\u0074u\u0072\u0065",Local :"\u0073\u0070\u0050\u0072"}:if _cda :=d .DecodeElement (_gf .SpPr ,&_cc );_cda !=nil {return _cda ;};default:_c .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\u0043\u0054\u005fP\u0069\u0063\u0074\u0075\u0072\u0065\u0020\u0025\u0076",_cc .Name );if _cef :=d .Skip ();_cef !=nil {return _cef ;};};case _g .EndElement :break _dg ;case _g .CharData :};};return nil ;};func NewCT_PictureNonVisual ()*CT_PictureNonVisual {_bb :=&CT_PictureNonVisual {};_bb .CNvPr =_f .NewCT_NonVisualDrawingProps ();_bb .CNvPicPr =_f .NewCT_NonVisualPictureProperties ();return _bb ;};
// ValidateWithPath validates the CT_Picture and its children, prefixing error messages with path
func (_ea *CT_Picture )ValidateWithPath (path string )error {if _cb :=_ea .NvPicPr .ValidateWithPath (path +"\u002f\u004e\u0076\u0050\u0069\u0063\u0050\u0072");_cb !=nil {return _cb ;};if _fc :=_ea .BlipFill .ValidateWithPath (path +"\u002fB\u006c\u0069\u0070\u0046\u0069\u006cl");_fc !=nil {return _fc ;};if _ecc :=_ea .SpPr .ValidateWithPath (path +"\u002f\u0053\u0070P\u0072");_ecc !=nil {return _ecc ;};return nil ;};func (_ag *CT_Picture )UnmarshalXML (d *_a .Decoder ,start _a .StartElement )error {_ag .NvPicPr =NewCT_PictureNonVisual ();_ag .BlipFill =_dd .NewCT_BlipFillProperties ();_ag .SpPr =_dd .NewCT_ShapeProperties ();_c :for {_cd ,_f :=d .Token ();if _f !=nil {return _f ;};switch _aa :=_cd .(type ){case _a .StartElement :switch _aa .Name {case _a .Name {Space :"\u0068\u0074\u0074\u0070\u003a\u002f/\u0073\u0063\u0068e\u006d\u0061\u0073.\u006f\u0070\u0065\u006e\u0078\u006d\u006c\u0066\u006f\u0072m\u0061\u0074\u0073\u002e\u006frg\u002f\u0064\u0072\u0061\u0077\u0069\u006e\u0067\u006d\u006c\u002f\u0032\u0030\u0030\u0036\u002f\u0070\u0069\u0063\u0074\u0075\u0072\u0065",Local :"\u006ev\u0050\u0069\u0063\u0050\u0072"},_a .Name {Space :"\u0068t\u0074\u0070:\u002f\u002f\u0070\u0075r\u006c\u002e\u006fc\u006c\u0063\u002e\u006f\u0072\u0067\u002f\u006f\u006fxm\u006c\u002f\u0064r\u0061\u0077i\u006e\u0067\u006d\u006c\u002f\u0070i\u0063\u0074u\u0072\u0065",Local :"\u006ev\u0050\u0069\u0063\u0050\u0072"}:if _dc :=d .DecodeElement (_ag .NvPicPr ,&_aa );_dc !=nil {return _dc ;};case _a .Name {Space :"\u0068\u0074\u0074\u0070\u003a\u002f/\u0073\u0063\u0068e\u006d\u0061\u0073.\u006f\u0070\u0065\u006e\u0078\u006d\u006c\u0066\u006f\u0072m\u0061\u0074\u0073\u002e\u006frg\u002f\u0064\u0072\u0061\u0077\u0069\u006e\u0067\u006d\u006c\u002f\u0032\u0030\u0030\u0036\u002f\u0070\u0069\u0063\u0074\u0075\u0072\u0065",Local :"\u0062\u006c\u0069\u0070\u0046\u0069\u006c\u006c"},_a .Name {Space :"\u0068t\u0074\u0070:\u002f\u002f\u0070\u0075r\u006c\u002e\u006fc\u006c\u0063\u002e\u006f\u0072\u0067\u002f\u006f\u006fxm\u006c\u002f\u0064r\u0061\u0077i\u006e\u0067\u006d\u006c\u002f\u0070i\u0063\u0074u\u0072\u0065",Local :"\u0062\u006c\u0069\u0070\u0046\u0069\u006c\u006c"}:if _db :=d .DecodeElement (_ag .BlipFill ,&_aa );_db !=nil {return _db ;};case _a .Name {Space :"\u0068\u0074\u0074\u0070\u003a\u002f/\u0073\u0063\u0068e\u006d\u0061\u0073.\u006f\u0070\u0065\u006e\u0078\u006d\u006c\u0066\u006f\u0072m\u0061\u0074\u0073\u002e\u006frg\u002f\u0064\u0072\u0061\u0077\u0069\u006e\u0067\u006d\u006c\u002f\u0032\u0030\u0030\u0036\u002f\u0070\u0069\u0063\u0074\u0075\u0072\u0065",Local :"\u0073\u0070\u0050\u0072"},_a .Name {Space :"\u0068t\u0074\u0070:\u002f\u002f\u0070\u0075r\u006c\u002e\u006fc\u006c\u0063\u002e\u006f\u0072\u0067\u002f\u006f\u006fxm\u006c\u002f\u0064r\u0061\u0077i\u006e\u0067\u006d\u006c\u002f\u0070i\u0063\u0074u\u0072\u0065",Local :"\u0073\u0070\u0050\u0072"}:if _ad :=d .DecodeElement (_ag .SpPr ,&_aa );_ad !=nil {return _ad ;};default:_e .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\u0043\u0054\u005fP\u0069\u0063\u0074\u0075\u0072\u0065\u0020\u0025\u0076",_aa .Name );if _dcg :=d .Skip ();_dcg !=nil {return _dcg ;};};case _a .EndElement :break _c ;case _a .CharData :};};return nil ;};
func (_ab *CT_Picture )ValidateWithPath (path string )error {if _efc :=_ab .NvPicPr .ValidateWithPath (path +"\u002f\u004e\u0076\u0050\u0069\u0063\u0050\u0072");_efc !=nil {return _efc ;};if _feg :=_ab .BlipFill .ValidateWithPath (path +"\u002fB\u006c\u0069\u0070\u0046\u0069\u006cl");_feg !=nil {return _feg ;};if _fb :=_ab .SpPr .ValidateWithPath (path +"\u002f\u0053\u0070P\u0072");_fb !=nil {return _fb ;};return nil ;};type CT_PictureNonVisual struct{CNvPr *_f .CT_NonVisualDrawingProps ;CNvPicPr *_f .CT_NonVisualPictureProperties ;};type Pic struct{CT_Picture };func NewCT_Picture ()*CT_Picture {_d :=&CT_Picture {};_d .NvPicPr =NewCT_PictureNonVisual ();_d .BlipFill =_f .NewCT_BlipFillProperties ();_d .SpPr =_f .NewCT_ShapeProperties ();return _d ;};func (_be *CT_PictureNonVisual )MarshalXML (e *_g .Encoder ,start _g .StartElement )error {e .EncodeToken (start );_cf :=_g .StartElement {Name :_g .Name {Local :"\u0070i\u0063\u003a\u0063\u004e\u0076\u0050r"}};e .EncodeElement (_be .CNvPr ,_cf );_bg :=_g .StartElement {Name :_g .Name {Local :"\u0070\u0069\u0063:\u0063\u004e\u0076\u0050\u0069\u0063\u0050\u0072"}};e .EncodeElement (_be .CNvPicPr ,_bg );e .EncodeToken (_g .EndElement {Name :start .Name });return nil ;};func (_bd *Pic )MarshalXML (e *_g .Encoder ,start _g .StartElement )error {start .Attr =append (start .Attr ,_g .Attr {Name :_g .Name {Local :"\u0078\u006d\u006cn\u0073"},Value :"\u0068\u0074\u0074\u0070\u003a\u002f/\u0073\u0063\u0068e\u006d\u0061\u0073.\u006f\u0070\u0065\u006e\u0078\u006d\u006c\u0066\u006f\u0072m\u0061\u0074\u0073\u002e\u006frg\u002f\u0064\u0072\u0061\u0077\u0069\u006e\u0067\u006d\u006c\u002f\u0032\u0030\u0030\u0036\u002f\u0070\u0069\u0063\u0074\u0075\u0072\u0065"});start .Attr =append (start .Attr ,_g .Attr {Name :_g .Name {Local :"\u0078m\u006c\u006e\u0073\u003a\u0070\u0069c"},Value :"\u0068\u0074\u0074\u0070\u003a\u002f/\u0073\u0063\u0068e\u006d\u0061\u0073.\u006f\u0070\u0065\u006e\u0078\u006d\u006c\u0066\u006f\u0072m\u0061\u0074\u0073\u002e\u006frg\u002f\u0064\u0072\u0061\u0077\u0069\u006e\u0067\u006d\u006c\u002f\u0032\u0030\u0030\u0036\u002f\u0070\u0069\u0063\u0074\u0075\u0072\u0065"});start .Attr =append (start .Attr ,_g .Attr {Name :_g .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 ="\u0070i\u0063\u003a\u0070\u0069\u0063";return _bd .CT_Picture .MarshalXML (e ,start );};
// Validate validates the CT_Picture and its children
func (_ef *CT_Picture )Validate ()error {return _ef .ValidateWithPath ("\u0043\u0054\u005f\u0050\u0069\u0063\u0074\u0075\u0072\u0065");};func (_ebc *Pic )UnmarshalXML (d *_g .Decoder ,start _g .StartElement )error {_ebc .CT_Picture =*NewCT_Picture ();_gcd :for {_fc ,_ec :=d .Token ();if _ec !=nil {return _ec ;};switch _ee :=_fc .(type ){case _g .StartElement :switch _ee .Name {case _g .Name {Space :"\u0068\u0074\u0074\u0070\u003a\u002f/\u0073\u0063\u0068e\u006d\u0061\u0073.\u006f\u0070\u0065\u006e\u0078\u006d\u006c\u0066\u006f\u0072m\u0061\u0074\u0073\u002e\u006frg\u002f\u0064\u0072\u0061\u0077\u0069\u006e\u0067\u006d\u006c\u002f\u0032\u0030\u0030\u0036\u002f\u0070\u0069\u0063\u0074\u0075\u0072\u0065",Local :"\u006ev\u0050\u0069\u0063\u0050\u0072"},_g .Name {Space :"\u0068t\u0074\u0070:\u002f\u002f\u0070\u0075r\u006c\u002e\u006fc\u006c\u0063\u002e\u006f\u0072\u0067\u002f\u006f\u006fxm\u006c\u002f\u0064r\u0061\u0077i\u006e\u0067\u006d\u006c\u002f\u0070i\u0063\u0074u\u0072\u0065",Local :"\u006ev\u0050\u0069\u0063\u0050\u0072"}:if _ag :=d .DecodeElement (_ebc .NvPicPr ,&_ee );_ag !=nil {return _ag ;};case _g .Name {Space :"\u0068\u0074\u0074\u0070\u003a\u002f/\u0073\u0063\u0068e\u006d\u0061\u0073.\u006f\u0070\u0065\u006e\u0078\u006d\u006c\u0066\u006f\u0072m\u0061\u0074\u0073\u002e\u006frg\u002f\u0064\u0072\u0061\u0077\u0069\u006e\u0067\u006d\u006c\u002f\u0032\u0030\u0030\u0036\u002f\u0070\u0069\u0063\u0074\u0075\u0072\u0065",Local :"\u0062\u006c\u0069\u0070\u0046\u0069\u006c\u006c"},_g .Name {Space :"\u0068t\u0074\u0070:\u002f\u002f\u0070\u0075r\u006c\u002e\u006fc\u006c\u0063\u002e\u006f\u0072\u0067\u002f\u006f\u006fxm\u006c\u002f\u0064r\u0061\u0077i\u006e\u0067\u006d\u006c\u002f\u0070i\u0063\u0074u\u0072\u0065",Local :"\u0062\u006c\u0069\u0070\u0046\u0069\u006c\u006c"}:if _fdd :=d .DecodeElement (_ebc .BlipFill ,&_ee );_fdd !=nil {return _fdd ;};case _g .Name {Space :"\u0068\u0074\u0074\u0070\u003a\u002f/\u0073\u0063\u0068e\u006d\u0061\u0073.\u006f\u0070\u0065\u006e\u0078\u006d\u006c\u0066\u006f\u0072m\u0061\u0074\u0073\u002e\u006frg\u002f\u0064\u0072\u0061\u0077\u0069\u006e\u0067\u006d\u006c\u002f\u0032\u0030\u0030\u0036\u002f\u0070\u0069\u0063\u0074\u0075\u0072\u0065",Local :"\u0073\u0070\u0050\u0072"},_g .Name {Space :"\u0068t\u0074\u0070:\u002f\u002f\u0070\u0075r\u006c\u002e\u006fc\u006c\u0063\u002e\u006f\u0072\u0067\u002f\u006f\u006fxm\u006c\u002f\u0064r\u0061\u0077i\u006e\u0067\u006d\u006c\u002f\u0070i\u0063\u0074u\u0072\u0065",Local :"\u0073\u0070\u0050\u0072"}:if _ad :=d .DecodeElement (_ebc .SpPr ,&_ee );_ad !=nil {return _ad ;};default:_c .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\u0050i\u0063\u0020\u0025\u0076",_ee .Name );if _aa :=d .Skip ();_aa !=nil {return _aa ;};};case _g .EndElement :break _gcd ;case _g .CharData :};};return nil ;};func NewPic ()*Pic {_af :=&Pic {};_af .CT_Picture =*NewCT_Picture ();return _af };
// Validate validates the Pic and its children
func (_egd *Pic )Validate ()error {return _egd .ValidateWithPath ("\u0050\u0069\u0063")};
// Validate validates the CT_PictureNonVisual and its children
func (_ef *CT_PictureNonVisual )Validate ()error {return _ef .ValidateWithPath ("\u0043\u0054\u005f\u0050ic\u0074\u0075\u0072\u0065\u004e\u006f\u006e\u0056\u0069\u0073\u0075\u0061\u006c");};
func (_fd *CT_PictureNonVisual )Validate ()error {return _fd .ValidateWithPath ("\u0043\u0054\u005f\u0050ic\u0074\u0075\u0072\u0065\u004e\u006f\u006e\u0056\u0069\u0073\u0075\u0061\u006c");};func (_cd *CT_Picture )MarshalXML (e *_g .Encoder ,start _g .StartElement )error {e .EncodeToken (start );_fe :=_g .StartElement {Name :_g .Name {Local :"p\u0069\u0063\u003a\u006e\u0076\u0050\u0069\u0063\u0050\u0072"}};e .EncodeElement (_cd .NvPicPr ,_fe );_a :=_g .StartElement {Name :_g .Name {Local :"\u0070\u0069\u0063:\u0062\u006c\u0069\u0070\u0046\u0069\u006c\u006c"}};e .EncodeElement (_cd .BlipFill ,_a );_ce :=_g .StartElement {Name :_g .Name {Local :"\u0070\u0069\u0063\u003a\u0073\u0070\u0050\u0072"}};e .EncodeElement (_cd .SpPr ,_ce );e .EncodeToken (_g .EndElement {Name :start .Name });return nil ;};
// ValidateWithPath validates the Pic and its children, prefixing error messages with path
func (_da *Pic )ValidateWithPath (path string )error {if _dga :=_da .CT_Picture .ValidateWithPath (path );_dga !=nil {return _dga ;};return nil ;};
// ValidateWithPath validates the CT_PictureNonVisual and its children, prefixing error messages with path
func (_g *CT_PictureNonVisual )ValidateWithPath (path string )error {if _fd :=_g .CNvPr .ValidateWithPath (path +"\u002f\u0043\u004e\u0076\u0050\u0072");_fd !=nil {return _fd ;};if _gb :=_g .CNvPicPr .ValidateWithPath (path +"\u002fC\u004e\u0076\u0050\u0069\u0063\u0050r");_gb !=nil {return _gb ;};return nil ;};func init (){_e .RegisterConstructor ("\u0068\u0074\u0074\u0070\u003a\u002f/\u0073\u0063\u0068e\u006d\u0061\u0073.\u006f\u0070\u0065\u006e\u0078\u006d\u006c\u0066\u006f\u0072m\u0061\u0074\u0073\u002e\u006frg\u002f\u0064\u0072\u0061\u0077\u0069\u006e\u0067\u006d\u006c\u002f\u0032\u0030\u0030\u0036\u002f\u0070\u0069\u0063\u0074\u0075\u0072\u0065","\u0043\u0054\u005f\u0050ic\u0074\u0075\u0072\u0065\u004e\u006f\u006e\u0056\u0069\u0073\u0075\u0061\u006c",NewCT_PictureNonVisual );_e .RegisterConstructor ("\u0068\u0074\u0074\u0070\u003a\u002f/\u0073\u0063\u0068e\u006d\u0061\u0073.\u006f\u0070\u0065\u006e\u0078\u006d\u006c\u0066\u006f\u0072m\u0061\u0074\u0073\u002e\u006frg\u002f\u0064\u0072\u0061\u0077\u0069\u006e\u0067\u006d\u006c\u002f\u0032\u0030\u0030\u0036\u002f\u0070\u0069\u0063\u0074\u0075\u0072\u0065","\u0043\u0054\u005f\u0050\u0069\u0063\u0074\u0075\u0072\u0065",NewCT_Picture );_e .RegisterConstructor ("\u0068\u0074\u0074\u0070\u003a\u002f/\u0073\u0063\u0068e\u006d\u0061\u0073.\u006f\u0070\u0065\u006e\u0078\u006d\u006c\u0066\u006f\u0072m\u0061\u0074\u0073\u002e\u006frg\u002f\u0064\u0072\u0061\u0077\u0069\u006e\u0067\u006d\u006c\u002f\u0032\u0030\u0030\u0036\u002f\u0070\u0069\u0063\u0074\u0075\u0072\u0065","\u0070\u0069\u0063",NewPic );};
func (_cce *CT_PictureNonVisual )ValidateWithPath (path string )error {if _gc :=_cce .CNvPr .ValidateWithPath (path +"\u002f\u0043\u004e\u0076\u0050\u0072");_gc !=nil {return _gc ;};if _eda :=_cce .CNvPicPr .ValidateWithPath (path +"\u002fC\u004e\u0076\u0050\u0069\u0063\u0050r");_eda !=nil {return _eda ;};return nil ;};func (_fef *CT_PictureNonVisual )UnmarshalXML (d *_g .Decoder ,start _g .StartElement )error {_fef .CNvPr =_f .NewCT_NonVisualDrawingProps ();_fef .CNvPicPr =_f .NewCT_NonVisualPictureProperties ();_bgd :for {_dd ,_eb :=d .Token ();if _eb !=nil {return _eb ;};switch _ca :=_dd .(type ){case _g .StartElement :switch _ca .Name {case _g .Name {Space :"\u0068\u0074\u0074\u0070\u003a\u002f/\u0073\u0063\u0068e\u006d\u0061\u0073.\u006f\u0070\u0065\u006e\u0078\u006d\u006c\u0066\u006f\u0072m\u0061\u0074\u0073\u002e\u006frg\u002f\u0064\u0072\u0061\u0077\u0069\u006e\u0067\u006d\u006c\u002f\u0032\u0030\u0030\u0036\u002f\u0070\u0069\u0063\u0074\u0075\u0072\u0065",Local :"\u0063\u004e\u0076P\u0072"},_g .Name {Space :"\u0068t\u0074\u0070:\u002f\u002f\u0070\u0075r\u006c\u002e\u006fc\u006c\u0063\u002e\u006f\u0072\u0067\u002f\u006f\u006fxm\u006c\u002f\u0064r\u0061\u0077i\u006e\u0067\u006d\u006c\u002f\u0070i\u0063\u0074u\u0072\u0065",Local :"\u0063\u004e\u0076P\u0072"}:if _ba :=d .DecodeElement (_fef .CNvPr ,&_ca );_ba !=nil {return _ba ;};case _g .Name {Space :"\u0068\u0074\u0074\u0070\u003a\u002f/\u0073\u0063\u0068e\u006d\u0061\u0073.\u006f\u0070\u0065\u006e\u0078\u006d\u006c\u0066\u006f\u0072m\u0061\u0074\u0073\u002e\u006frg\u002f\u0064\u0072\u0061\u0077\u0069\u006e\u0067\u006d\u006c\u002f\u0032\u0030\u0030\u0036\u002f\u0070\u0069\u0063\u0074\u0075\u0072\u0065",Local :"\u0063\u004e\u0076\u0050\u0069\u0063\u0050\u0072"},_g .Name {Space :"\u0068t\u0074\u0070:\u002f\u002f\u0070\u0075r\u006c\u002e\u006fc\u006c\u0063\u002e\u006f\u0072\u0067\u002f\u006f\u006fxm\u006c\u002f\u0064r\u0061\u0077i\u006e\u0067\u006d\u006c\u002f\u0070i\u0063\u0074u\u0072\u0065",Local :"\u0063\u004e\u0076\u0050\u0069\u0063\u0050\u0072"}:if _eg :=d .DecodeElement (_fef .CNvPicPr ,&_ca );_eg !=nil {return _eg ;};default:_c .Log ("\u0073\u006b\u0069\u0070\u0070\u0069\u006e\u0067\u0020\u0075\u006e\u0073\u0075\u0070\u0070o\u0072\u0074\u0065\u0064\u0020\u0065\u006c\u0065\u006d\u0065\u006e\u0074\u0020o\u006e\u0020\u0043\u0054\u005f\u0050\u0069\u0063\u0074\u0075\u0072\u0065No\u006e\u0056\u0069\u0073\u0075\u0061\u006c\u0020\u0025\u0076",_ca .Name );if _cad :=d .Skip ();_cad !=nil {return _cad ;};};case _g .EndElement :break _bgd ;case _g .CharData :};};return nil ;};func init (){_c .RegisterConstructor ("\u0068\u0074\u0074\u0070\u003a\u002f/\u0073\u0063\u0068e\u006d\u0061\u0073.\u006f\u0070\u0065\u006e\u0078\u006d\u006c\u0066\u006f\u0072m\u0061\u0074\u0073\u002e\u006frg\u002f\u0064\u0072\u0061\u0077\u0069\u006e\u0067\u006d\u006c\u002f\u0032\u0030\u0030\u0036\u002f\u0070\u0069\u0063\u0074\u0075\u0072\u0065","\u0043\u0054\u005f\u0050ic\u0074\u0075\u0072\u0065\u004e\u006f\u006e\u0056\u0069\u0073\u0075\u0061\u006c",NewCT_PictureNonVisual );_c .RegisterConstructor ("\u0068\u0074\u0074\u0070\u003a\u002f/\u0073\u0063\u0068e\u006d\u0061\u0073.\u006f\u0070\u0065\u006e\u0078\u006d\u006c\u0066\u006f\u0072m\u0061\u0074\u0073\u002e\u006frg\u002f\u0064\u0072\u0061\u0077\u0069\u006e\u0067\u006d\u006c\u002f\u0032\u0030\u0030\u0036\u002f\u0070\u0069\u0063\u0074\u0075\u0072\u0065","\u0043\u0054\u005f\u0050\u0069\u0063\u0074\u0075\u0072\u0065",NewCT_Picture );_c .RegisterConstructor ("\u0068\u0074\u0074\u0070\u003a\u002f/\u0073\u0063\u0068e\u006d\u0061\u0073.\u006f\u0070\u0065\u006e\u0078\u006d\u006c\u0066\u006f\u0072m\u0061\u0074\u0073\u002e\u006frg\u002f\u0064\u0072\u0061\u0077\u0069\u006e\u0067\u006d\u006c\u002f\u0032\u0030\u0030\u0036\u002f\u0070\u0069\u0063\u0074\u0075\u0072\u0065","\u0070\u0069\u0063",NewPic );};

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -9,40 +9,40 @@
// 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 content_types ;import (_c "encoding/xml";_e "fmt";_cg "github.com/unidoc/unioffice";_g "regexp";);func (_eg *CT_Override )MarshalXML (e *_c .Encoder ,start _c .StartElement )error {start .Attr =append (start .Attr ,_c .Attr {Name :_c .Name {Local :"C\u006f\u006e\u0074\u0065\u006e\u0074\u0054\u0079\u0070\u0065"},Value :_e .Sprintf ("\u0025\u0076",_eg .ContentTypeAttr )});start .Attr =append (start .Attr ,_c .Attr {Name :_c .Name {Local :"\u0050\u0061\u0072\u0074\u004e\u0061\u006d\u0065"},Value :_e .Sprintf ("\u0025\u0076",_eg .PartNameAttr )});e .EncodeToken (start );e .EncodeToken (_c .EndElement {Name :start .Name });return nil ;};
// ValidateWithPath validates the Types and its children, prefixing error messages with path
func (_babf *Types )ValidateWithPath (path string )error {if _ef :=_babf .CT_Types .ValidateWithPath (path );_ef !=nil {return _ef ;};return nil ;};func (_fad *Types )MarshalXML (e *_c .Encoder ,start _c .StartElement )error {start .Attr =append (start .Attr ,_c .Attr {Name :_c .Name {Local :"\u0078\u006d\u006cn\u0073"},Value :"ht\u0074\u0070:\u002f\u002f\u0073\u0063\u0068\u0065\u006d\u0061\u0073.\u006f\u0070\u0065\u006e\u0078\u006d\u006c\u0066\u006f\u0072\u006d\u0061\u0074\u0073\u002e\u006f\u0072\u0067\u002f\u0070\u0061\u0063\u006b\u0061\u0067\u0065\u002f\u00320\u00306\u002f\u0063\u006f\u006e\u0074\u0065\u006e\u0074-\u0074y\u0070\u0065s"});start .Attr =append (start .Attr ,_c .Attr {Name :_c .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 ="\u0054\u0079\u0070e\u0073";return _fad .CT_Types .MarshalXML (e ,start );};
// ValidateWithPath validates the Default and its children, prefixing error messages with path
func (_abf *Default )ValidateWithPath (path string )error {if _dgg :=_abf .CT_Default .ValidateWithPath (path );_dgg !=nil {return _dgg ;};return nil ;};
package content_types ;import (_b "encoding/xml";_f "fmt";_bf "github.com/unidoc/unioffice";_ea "regexp";);func (_g *CT_Default )MarshalXML (e *_b .Encoder ,start _b .StartElement )error {start .Attr =append (start .Attr ,_b .Attr {Name :_b .Name {Local :"\u0045x\u0074\u0065\u006e\u0073\u0069\u006fn"},Value :_f .Sprintf ("\u0025\u0076",_g .ExtensionAttr )});start .Attr =append (start .Attr ,_b .Attr {Name :_b .Name {Local :"C\u006f\u006e\u0074\u0065\u006e\u0074\u0054\u0079\u0070\u0065"},Value :_f .Sprintf ("\u0025\u0076",_g .ContentTypeAttr )});e .EncodeToken (start );e .EncodeToken (_b .EndElement {Name :start .Name });return nil ;};
// ValidateWithPath validates the CT_Default and its children, prefixing error messages with path
func (_ga *CT_Default )ValidateWithPath (path string )error {if !ST_ExtensionPatternRe .MatchString (_ga .ExtensionAttr ){return _e .Errorf ("\u0025s\u002f\u006d.\u0045\u0078\u0074\u0065n\u0073\u0069\u006fn\u0041\u0074\u0074\u0072\u0020\u006d\u0075\u0073\u0074 m\u0061\u0074\u0063h\u0020\u0027%\u0073\u0027\u0020\u0028\u0068\u0061v\u0065\u0020%\u0076\u0029",path ,ST_ExtensionPatternRe ,_ga .ExtensionAttr );};if !ST_ContentTypePatternRe .MatchString (_ga .ContentTypeAttr ){return _e .Errorf ("\u0025\u0073/\u006d\u002e\u0043\u006f\u006e\u0074\u0065\u006e\u0074\u0054\u0079\u0070\u0065\u0041\u0074\u0074\u0072\u0020\u006d\u0075\u0073\u0074\u0020\u006d\u0061\u0074\u0063\u0068\u0020\u0027\u0025\u0073\u0027\u0020\u0028\u0068\u0061\u0076\u0065\u0020\u0025\u0076\u0029",path ,ST_ContentTypePatternRe ,_ga .ContentTypeAttr );};return nil ;};func (_bgg *Override )MarshalXML (e *_c .Encoder ,start _c .StartElement )error {return _bgg .CT_Override .MarshalXML (e ,start );};
// ValidateWithPath validates the CT_Types and its children, prefixing error messages with path
func (_ag *CT_Types )ValidateWithPath (path string )error {for _gbf ,_bb :=range _ag .Default {if _ba :=_bb .ValidateWithPath (_e .Sprintf ("\u0025\u0073\u002f\u0044\u0065\u0066\u0061\u0075\u006ct\u005b\u0025\u0064\u005d",path ,_gbf ));_ba !=nil {return _ba ;};};for _add ,_aef :=range _ag .Override {if _daa :=_aef .ValidateWithPath (_e .Sprintf ("\u0025s\u002fO\u0076\u0065\u0072\u0072\u0069\u0064\u0065\u005b\u0025\u0064\u005d",path ,_add ));_daa !=nil {return _daa ;};};return nil ;};const ST_ContentTypePattern ="\u005e\\\u0070{\u004c\u0061\u0074\u0069\u006e\u007d\u002b\u002f\u002e\u002a\u0024";
// Validate validates the CT_Override and its children
func (_ae *CT_Override )Validate ()error {return _ae .ValidateWithPath ("C\u0054\u005f\u004f\u0076\u0065\u0072\u0072\u0069\u0064\u0065");};type CT_Default struct{ExtensionAttr string ;ContentTypeAttr string ;};
// Validate validates the Default and its children
func (_gda *Default )Validate ()error {return _gda .ValidateWithPath ("\u0044e\u0066\u0061\u0075\u006c\u0074");};
func (_cg *CT_Default )ValidateWithPath (path string )error {if !ST_ExtensionPatternRe .MatchString (_cg .ExtensionAttr ){return _f .Errorf ("\u0025s\u002f\u006d.\u0045\u0078\u0074\u0065n\u0073\u0069\u006fn\u0041\u0074\u0074\u0072\u0020\u006d\u0075\u0073\u0074 m\u0061\u0074\u0063h\u0020\u0027%\u0073\u0027\u0020\u0028\u0068\u0061v\u0065\u0020%\u0076\u0029",path ,ST_ExtensionPatternRe ,_cg .ExtensionAttr );};if !ST_ContentTypePatternRe .MatchString (_cg .ContentTypeAttr ){return _f .Errorf ("\u0025\u0073/\u006d\u002e\u0043\u006f\u006e\u0074\u0065\u006e\u0074\u0054\u0079\u0070\u0065\u0041\u0074\u0074\u0072\u0020\u006d\u0075\u0073\u0074\u0020\u006d\u0061\u0074\u0063\u0068\u0020\u0027\u0025\u0073\u0027\u0020\u0028\u0068\u0061\u0076\u0065\u0020\u0025\u0076\u0029",path ,ST_ContentTypePatternRe ,_cg .ContentTypeAttr );};return nil ;};func NewDefault ()*Default {_fef :=&Default {};_fef .CT_Default =*NewCT_Default ();return _fef };
// Validate validates the CT_Default and its children
func (_gd *CT_Default )Validate ()error {return _gd .ValidateWithPath ("\u0043\u0054\u005f\u0044\u0065\u0066\u0061\u0075\u006c\u0074");};
func (_gb *CT_Default )Validate ()error {return _gb .ValidateWithPath ("\u0043\u0054\u005f\u0044\u0065\u0066\u0061\u0075\u006c\u0074");};
// Validate validates the CT_Types and its children
func (_eda *CT_Types )Validate ()error {return _eda .ValidateWithPath ("\u0043\u0054\u005f\u0054\u0079\u0070\u0065\u0073");};func NewCT_Types ()*CT_Types {_aec :=&CT_Types {};return _aec };type Default struct{CT_Default };func (_db *Types )UnmarshalXML (d *_c .Decoder ,start _c .StartElement )error {_db .CT_Types =*NewCT_Types ();_bac :for {_ebc ,_dcc :=d .Token ();if _dcc !=nil {return _dcc ;};switch _ebeg :=_ebc .(type ){case _c .StartElement :switch _ebeg .Name {case _c .Name {Space :"ht\u0074\u0070:\u002f\u002f\u0073\u0063\u0068\u0065\u006d\u0061\u0073.\u006f\u0070\u0065\u006e\u0078\u006d\u006c\u0066\u006f\u0072\u006d\u0061\u0074\u0073\u002e\u006f\u0072\u0067\u002f\u0070\u0061\u0063\u006b\u0061\u0067\u0065\u002f\u00320\u00306\u002f\u0063\u006f\u006e\u0074\u0065\u006e\u0074-\u0074y\u0070\u0065s",Local :"\u0044e\u0066\u0061\u0075\u006c\u0074"}:_ebfb :=NewDefault ();if _aefe :=d .DecodeElement (_ebfb ,&_ebeg );_aefe !=nil {return _aefe ;};_db .Default =append (_db .Default ,_ebfb );case _c .Name {Space :"ht\u0074\u0070:\u002f\u002f\u0073\u0063\u0068\u0065\u006d\u0061\u0073.\u006f\u0070\u0065\u006e\u0078\u006d\u006c\u0066\u006f\u0072\u006d\u0061\u0074\u0073\u002e\u006f\u0072\u0067\u002f\u0070\u0061\u0063\u006b\u0061\u0067\u0065\u002f\u00320\u00306\u002f\u0063\u006f\u006e\u0074\u0065\u006e\u0074-\u0074y\u0070\u0065s",Local :"\u004f\u0076\u0065\u0072\u0072\u0069\u0064\u0065"}:_bba :=NewOverride ();if _aad :=d .DecodeElement (_bba ,&_ebeg );_aad !=nil {return _aad ;};_db .Override =append (_db .Override ,_bba );default:_cg .Log ("s\u006b\u0069\u0070\u0070\u0069\u006e\u0067\u0020\u0075\u006e\u0073\u0075\u0070\u0070\u006f\u0072\u0074\u0065d\u0020\u0065\u006c\u0065\u006d\u0065\u006e\u0074\u0020\u006fn \u0054\u0079\u0070e\u0073 \u0025\u0076",_ebeg .Name );if _gbcc :=d .Skip ();_gbcc !=nil {return _gbcc ;};};case _c .EndElement :break _bac ;case _c .CharData :};};return nil ;};func (_ebe *Override )UnmarshalXML (d *_c .Decoder ,start _c .StartElement )error {_ebe .CT_Override =*NewCT_Override ();for _ ,_fd :=range start .Attr {if _fd .Name .Local =="C\u006f\u006e\u0074\u0065\u006e\u0074\u0054\u0079\u0070\u0065"{_bab ,_ded :=_fd .Value ,error (nil );if _ded !=nil {return _ded ;};_ebe .ContentTypeAttr =_bab ;continue ;};if _fd .Name .Local =="\u0050\u0061\u0072\u0074\u004e\u0061\u006d\u0065"{_cgc ,_deg :=_fd .Value ,error (nil );if _deg !=nil {return _deg ;};_ebe .PartNameAttr =_cgc ;continue ;};};for {_ea ,_ebf :=d .Token ();if _ebf !=nil {return _e .Errorf ("p\u0061r\u0073\u0069\u006e\u0067\u0020\u004f\u0076\u0065r\u0072\u0069\u0064\u0065: \u0025\u0073",_ebf );};if _ecc ,_bdg :=_ea .(_c .EndElement );_bdg &&_ecc .Name ==start .Name {break ;};};return nil ;};func NewDefault ()*Default {_aea :=&Default {};_aea .CT_Default =*NewCT_Default ();return _aea };type CT_Override struct{ContentTypeAttr string ;PartNameAttr string ;};func (_cc *CT_Default )UnmarshalXML (d *_c .Decoder ,start _c .StartElement )error {_cc .ExtensionAttr ="\u0078\u006d\u006c";_cc .ContentTypeAttr ="\u0061p\u0070l\u0069\u0063\u0061\u0074\u0069\u006f\u006e\u002f\u0078\u006d\u006c";for _ ,_bc :=range start .Attr {if _bc .Name .Local =="\u0045x\u0074\u0065\u006e\u0073\u0069\u006fn"{_bgf ,_ee :=_bc .Value ,error (nil );if _ee !=nil {return _ee ;};_cc .ExtensionAttr =_bgf ;continue ;};if _bc .Name .Local =="C\u006f\u006e\u0074\u0065\u006e\u0074\u0054\u0079\u0070\u0065"{_af ,_d :=_bc .Value ,error (nil );if _d !=nil {return _d ;};_cc .ContentTypeAttr =_af ;continue ;};};for {_fc ,_ca :=d .Token ();if _ca !=nil {return _e .Errorf ("\u0070\u0061\u0072\u0073in\u0067\u0020\u0043\u0054\u005f\u0044\u0065\u0066\u0061\u0075\u006c\u0074\u003a\u0020%\u0073",_ca );};if _afd ,_ed :=_fc .(_c .EndElement );_ed &&_afd .Name ==start .Name {break ;};};return nil ;};func NewOverride ()*Override {_gf :=&Override {};_gf .CT_Override =*NewCT_Override ();return _gf };func NewTypes ()*Types {_fce :=&Types {};_fce .CT_Types =*NewCT_Types ();return _fce };func (_bge *CT_Types )MarshalXML (e *_c .Encoder ,start _c .StartElement )error {e .EncodeToken (start );if _bge .Default !=nil {_ab :=_c .StartElement {Name :_c .Name {Local :"\u0044e\u0066\u0061\u0075\u006c\u0074"}};for _ ,_eef :=range _bge .Default {e .EncodeElement (_eef ,_ab );};};if _bge .Override !=nil {_aa :=_c .StartElement {Name :_c .Name {Local :"\u004f\u0076\u0065\u0072\u0072\u0069\u0064\u0065"}};for _ ,_ec :=range _bge .Override {e .EncodeElement (_ec ,_aa );};};e .EncodeToken (_c .EndElement {Name :start .Name });return nil ;};type Override struct{CT_Override };
// ValidateWithPath validates the Default and its children, prefixing error messages with path
func (_bfg *Default )ValidateWithPath (path string )error {if _de :=_bfg .CT_Default .ValidateWithPath (path );_de !=nil {return _de ;};return nil ;};
// Validate validates the Override and its children
func (_fab *Override )Validate ()error {return _fab .ValidateWithPath ("\u004f\u0076\u0065\u0072\u0072\u0069\u0064\u0065");};const ST_ExtensionPattern ="\u0028\u005b\u0021\u0024\u0026\u0027\\\u0028\u005c\u0029\u005c\u002a\\\u002b\u002c\u003a\u003d\u005d\u007c(\u0025\u005b\u0030\u002d\u0039a\u002d\u0066\u0041\u002d\u0046\u005d\u005b\u0030\u002d\u0039\u0061\u002df\u0041\u002d\u0046\u005d\u0029\u007c\u005b\u003a\u0040\u005d\u007c\u005b\u0061\u002d\u007aA\u002d\u005a\u0030\u002d\u0039\u005c\u002d\u005f~\u005d\u0029\u002b";type CT_Types struct{Default []*Default ;Override []*Override ;};func (_a *CT_Default )MarshalXML (e *_c .Encoder ,start _c .StartElement )error {start .Attr =append (start .Attr ,_c .Attr {Name :_c .Name {Local :"\u0045x\u0074\u0065\u006e\u0073\u0069\u006fn"},Value :_e .Sprintf ("\u0025\u0076",_a .ExtensionAttr )});start .Attr =append (start .Attr ,_c .Attr {Name :_c .Name {Local :"C\u006f\u006e\u0074\u0065\u006e\u0074\u0054\u0079\u0070\u0065"},Value :_e .Sprintf ("\u0025\u0076",_a .ContentTypeAttr )});e .EncodeToken (start );e .EncodeToken (_c .EndElement {Name :start .Name });return nil ;};func (_dg *Default )MarshalXML (e *_c .Encoder ,start _c .StartElement )error {return _dg .CT_Default .MarshalXML (e ,start );};type Types struct{CT_Types };func NewCT_Default ()*CT_Default {_f :=&CT_Default {};_f .ExtensionAttr ="\u0078\u006d\u006c";_f .ContentTypeAttr ="\u0061p\u0070l\u0069\u0063\u0061\u0074\u0069\u006f\u006e\u002f\u0078\u006d\u006c";return _f ;};func NewCT_Override ()*CT_Override {_cgg :=&CT_Override {};_cgg .ContentTypeAttr ="\u0061p\u0070l\u0069\u0063\u0061\u0074\u0069\u006f\u006e\u002f\u0078\u006d\u006c";return _cgg ;};var ST_ContentTypePatternRe =_g .MustCompile (ST_ContentTypePattern );
func (_eca *Override )Validate ()error {return _eca .ValidateWithPath ("\u004f\u0076\u0065\u0072\u0072\u0069\u0064\u0065");};type CT_Types struct{Default []*Default ;Override []*Override ;};func (_fbd *CT_Types )MarshalXML (e *_b .Encoder ,start _b .StartElement )error {e .EncodeToken (start );if _fbd .Default !=nil {_ced :=_b .StartElement {Name :_b .Name {Local :"\u0044e\u0066\u0061\u0075\u006c\u0074"}};for _ ,_dd :=range _fbd .Default {e .EncodeElement (_dd ,_ced );};};if _fbd .Override !=nil {_dgf :=_b .StartElement {Name :_b .Name {Local :"\u004f\u0076\u0065\u0072\u0072\u0069\u0064\u0065"}};for _ ,_ffa :=range _fbd .Override {e .EncodeElement (_ffa ,_dgf );};};e .EncodeToken (_b .EndElement {Name :start .Name });return nil ;};func NewCT_Types ()*CT_Types {_ef :=&CT_Types {};return _ef };type CT_Override struct{ContentTypeAttr string ;PartNameAttr string ;};func (_bag *Override )MarshalXML (e *_b .Encoder ,start _b .StartElement )error {return _bag .CT_Override .MarshalXML (e ,start );};func NewCT_Override ()*CT_Override {_fa :=&CT_Override {};_fa .ContentTypeAttr ="\u0061p\u0070l\u0069\u0063\u0061\u0074\u0069\u006f\u006e\u002f\u0078\u006d\u006c";return _fa ;};
// Validate validates the Types and its children
func (_cga *Types )Validate ()error {return _cga .ValidateWithPath ("\u0054\u0079\u0070e\u0073")};
// Validate validates the Default and its children
func (_gccf *Default )Validate ()error {return _gccf .ValidateWithPath ("\u0044e\u0066\u0061\u0075\u006c\u0074");};func (_bg *Types )UnmarshalXML (d *_b .Decoder ,start _b .StartElement )error {_bg .CT_Types =*NewCT_Types ();_ffdd :for {_def ,_be :=d .Token ();if _be !=nil {return _be ;};switch _bbg :=_def .(type ){case _b .StartElement :switch _bbg .Name {case _b .Name {Space :"ht\u0074\u0070:\u002f\u002f\u0073\u0063\u0068\u0065\u006d\u0061\u0073.\u006f\u0070\u0065\u006e\u0078\u006d\u006c\u0066\u006f\u0072\u006d\u0061\u0074\u0073\u002e\u006f\u0072\u0067\u002f\u0070\u0061\u0063\u006b\u0061\u0067\u0065\u002f\u00320\u00306\u002f\u0063\u006f\u006e\u0074\u0065\u006e\u0074-\u0074y\u0070\u0065s",Local :"\u0044e\u0066\u0061\u0075\u006c\u0074"}:_gdf :=NewDefault ();if _cbg :=d .DecodeElement (_gdf ,&_bbg );_cbg !=nil {return _cbg ;};_bg .Default =append (_bg .Default ,_gdf );case _b .Name {Space :"ht\u0074\u0070:\u002f\u002f\u0073\u0063\u0068\u0065\u006d\u0061\u0073.\u006f\u0070\u0065\u006e\u0078\u006d\u006c\u0066\u006f\u0072\u006d\u0061\u0074\u0073\u002e\u006f\u0072\u0067\u002f\u0070\u0061\u0063\u006b\u0061\u0067\u0065\u002f\u00320\u00306\u002f\u0063\u006f\u006e\u0074\u0065\u006e\u0074-\u0074y\u0070\u0065s",Local :"\u004f\u0076\u0065\u0072\u0072\u0069\u0064\u0065"}:_cedb :=NewOverride ();if _abb :=d .DecodeElement (_cedb ,&_bbg );_abb !=nil {return _abb ;};_bg .Override =append (_bg .Override ,_cedb );default:_bf .Log ("s\u006b\u0069\u0070\u0070\u0069\u006e\u0067\u0020\u0075\u006e\u0073\u0075\u0070\u0070\u006f\u0072\u0074\u0065d\u0020\u0065\u006c\u0065\u006d\u0065\u006e\u0074\u0020\u006fn \u0054\u0079\u0070e\u0073 \u0025\u0076",_bbg .Name );if _fcb :=d .Skip ();_fcb !=nil {return _fcb ;};};case _b .EndElement :break _ffdd ;case _b .CharData :};};return nil ;};func (_ffg *Override )UnmarshalXML (d *_b .Decoder ,start _b .StartElement )error {_ffg .CT_Override =*NewCT_Override ();for _ ,_dga :=range start .Attr {if _dga .Name .Local =="C\u006f\u006e\u0074\u0065\u006e\u0074\u0054\u0079\u0070\u0065"{_ed ,_fefg :=_dga .Value ,error (nil );if _fefg !=nil {return _fefg ;};_ffg .ContentTypeAttr =_ed ;continue ;};if _dga .Name .Local =="\u0050\u0061\u0072\u0074\u004e\u0061\u006d\u0065"{_eed ,_ag :=_dga .Value ,error (nil );if _ag !=nil {return _ag ;};_ffg .PartNameAttr =_eed ;continue ;};};for {_eb ,_gdd :=d .Token ();if _gdd !=nil {return _f .Errorf ("p\u0061r\u0073\u0069\u006e\u0067\u0020\u004f\u0076\u0065r\u0072\u0069\u0064\u0065: \u0025\u0073",_gdd );};if _fee ,_bbd :=_eb .(_b .EndElement );_bbd &&_fee .Name ==start .Name {break ;};};return nil ;};
// ValidateWithPath validates the CT_Types and its children, prefixing error messages with path
func (_fcd *CT_Types )ValidateWithPath (path string )error {for _cfg ,_fdg :=range _fcd .Default {if _cgf :=_fdg .ValidateWithPath (_f .Sprintf ("\u0025\u0073\u002f\u0044\u0065\u0066\u0061\u0075\u006ct\u005b\u0025\u0064\u005d",path ,_cfg ));_cgf !=nil {return _cgf ;};};for _ac ,_fbf :=range _fcd .Override {if _ffd :=_fbf .ValidateWithPath (_f .Sprintf ("\u0025s\u002fO\u0076\u0065\u0072\u0072\u0069\u0064\u0065\u005b\u0025\u0064\u005d",path ,_ac ));_ffd !=nil {return _ffd ;};};return nil ;};func NewTypes ()*Types {_cfe :=&Types {};_cfe .CT_Types =*NewCT_Types ();return _cfe };type Types struct{CT_Types };const ST_ExtensionPattern ="\u0028\u005b\u0021\u0024\u0026\u0027\\\u0028\u005c\u0029\u005c\u002a\\\u002b\u002c\u003a\u003d\u005d\u007c(\u0025\u005b\u0030\u002d\u0039a\u002d\u0066\u0041\u002d\u0046\u005d\u005b\u0030\u002d\u0039\u0061\u002df\u0041\u002d\u0046\u005d\u0029\u007c\u005b\u003a\u0040\u005d\u007c\u005b\u0061\u002d\u007aA\u002d\u005a\u0030\u002d\u0039\u005c\u002d\u005f~\u005d\u0029\u002b";func (_bb *CT_Types )UnmarshalXML (d *_b .Decoder ,start _b .StartElement )error {_ab :for {_ca ,_fbg :=d .Token ();if _fbg !=nil {return _fbg ;};switch _fg :=_ca .(type ){case _b .StartElement :switch _fg .Name {case _b .Name {Space :"ht\u0074\u0070:\u002f\u002f\u0073\u0063\u0068\u0065\u006d\u0061\u0073.\u006f\u0070\u0065\u006e\u0078\u006d\u006c\u0066\u006f\u0072\u006d\u0061\u0074\u0073\u002e\u006f\u0072\u0067\u002f\u0070\u0061\u0063\u006b\u0061\u0067\u0065\u002f\u00320\u00306\u002f\u0063\u006f\u006e\u0074\u0065\u006e\u0074-\u0074y\u0070\u0065s",Local :"\u0044e\u0066\u0061\u0075\u006c\u0074"}:_dbc :=NewDefault ();if _ege :=d .DecodeElement (_dbc ,&_fg );_ege !=nil {return _ege ;};_bb .Default =append (_bb .Default ,_dbc );case _b .Name {Space :"ht\u0074\u0070:\u002f\u002f\u0073\u0063\u0068\u0065\u006d\u0061\u0073.\u006f\u0070\u0065\u006e\u0078\u006d\u006c\u0066\u006f\u0072\u006d\u0061\u0074\u0073\u002e\u006f\u0072\u0067\u002f\u0070\u0061\u0063\u006b\u0061\u0067\u0065\u002f\u00320\u00306\u002f\u0063\u006f\u006e\u0074\u0065\u006e\u0074-\u0074y\u0070\u0065s",Local :"\u004f\u0076\u0065\u0072\u0072\u0069\u0064\u0065"}:_gd :=NewOverride ();if _gg :=d .DecodeElement (_gd ,&_fg );_gg !=nil {return _gg ;};_bb .Override =append (_bb .Override ,_gd );default:_bf .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\u0054\u0079\u0070\u0065\u0073\u0020\u0025\u0076",_fg .Name );if _bfab :=d .Skip ();_bfab !=nil {return _bfab ;};};case _b .EndElement :break _ab ;case _b .CharData :};};return nil ;};
// ValidateWithPath validates the CT_Override and its children, prefixing error messages with path
func (_ad *CT_Override )ValidateWithPath (path string )error {if !ST_ContentTypePatternRe .MatchString (_ad .ContentTypeAttr ){return _e .Errorf ("\u0025\u0073/\u006d\u002e\u0043\u006f\u006e\u0074\u0065\u006e\u0074\u0054\u0079\u0070\u0065\u0041\u0074\u0074\u0072\u0020\u006d\u0075\u0073\u0074\u0020\u006d\u0061\u0074\u0063\u0068\u0020\u0027\u0025\u0073\u0027\u0020\u0028\u0068\u0061\u0076\u0065\u0020\u0025\u0076\u0029",path ,ST_ContentTypePatternRe ,_ad .ContentTypeAttr );};return nil ;};func (_cf *CT_Types )UnmarshalXML (d *_c .Decoder ,start _c .StartElement )error {_fg :for {_ebb ,_eed :=d .Token ();if _eed !=nil {return _eed ;};switch _aff :=_ebb .(type ){case _c .StartElement :switch _aff .Name {case _c .Name {Space :"ht\u0074\u0070:\u002f\u002f\u0073\u0063\u0068\u0065\u006d\u0061\u0073.\u006f\u0070\u0065\u006e\u0078\u006d\u006c\u0066\u006f\u0072\u006d\u0061\u0074\u0073\u002e\u006f\u0072\u0067\u002f\u0070\u0061\u0063\u006b\u0061\u0067\u0065\u002f\u00320\u00306\u002f\u0063\u006f\u006e\u0074\u0065\u006e\u0074-\u0074y\u0070\u0065s",Local :"\u0044e\u0066\u0061\u0075\u006c\u0074"}:_gb :=NewDefault ();if _fb :=d .DecodeElement (_gb ,&_aff );_fb !=nil {return _fb ;};_cf .Default =append (_cf .Default ,_gb );case _c .Name {Space :"ht\u0074\u0070:\u002f\u002f\u0073\u0063\u0068\u0065\u006d\u0061\u0073.\u006f\u0070\u0065\u006e\u0078\u006d\u006c\u0066\u006f\u0072\u006d\u0061\u0074\u0073\u002e\u006f\u0072\u0067\u002f\u0070\u0061\u0063\u006b\u0061\u0067\u0065\u002f\u00320\u00306\u002f\u0063\u006f\u006e\u0074\u0065\u006e\u0074-\u0074y\u0070\u0065s",Local :"\u004f\u0076\u0065\u0072\u0072\u0069\u0064\u0065"}:_dc :=NewOverride ();if _de :=d .DecodeElement (_dc ,&_aff );_de !=nil {return _de ;};_cf .Override =append (_cf .Override ,_dc );default:_cg .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\u0054\u0079\u0070\u0065\u0073\u0020\u0025\u0076",_aff .Name );if _ac :=d .Skip ();_ac !=nil {return _ac ;};};case _c .EndElement :break _fg ;case _c .CharData :};};return nil ;};func (_fe *CT_Override )UnmarshalXML (d *_c .Decoder ,start _c .StartElement )error {_fe .ContentTypeAttr ="\u0061p\u0070l\u0069\u0063\u0061\u0074\u0069\u006f\u006e\u002f\u0078\u006d\u006c";for _ ,_fa :=range start .Attr {if _fa .Name .Local =="C\u006f\u006e\u0074\u0065\u006e\u0074\u0054\u0079\u0070\u0065"{_da ,_faf :=_fa .Value ,error (nil );if _faf !=nil {return _faf ;};_fe .ContentTypeAttr =_da ;continue ;};if _fa .Name .Local =="\u0050\u0061\u0072\u0074\u004e\u0061\u006d\u0065"{_eb ,_ccc :=_fa .Value ,error (nil );if _ccc !=nil {return _ccc ;};_fe .PartNameAttr =_eb ;continue ;};};for {_fed ,_gdb :=d .Token ();if _gdb !=nil {return _e .Errorf ("\u0070\u0061\u0072si\u006e\u0067\u0020\u0043\u0054\u005f\u004f\u0076\u0065\u0072\u0072\u0069\u0064\u0065\u003a\u0020\u0025\u0073",_gdb );};if _bd ,_edc :=_fed .(_c .EndElement );_edc &&_bd .Name ==start .Name {break ;};};return nil ;};var ST_ExtensionPatternRe =_g .MustCompile (ST_ExtensionPattern );
func (_ff *CT_Override )ValidateWithPath (path string )error {if !ST_ContentTypePatternRe .MatchString (_ff .ContentTypeAttr ){return _f .Errorf ("\u0025\u0073/\u006d\u002e\u0043\u006f\u006e\u0074\u0065\u006e\u0074\u0054\u0079\u0070\u0065\u0041\u0074\u0074\u0072\u0020\u006d\u0075\u0073\u0074\u0020\u006d\u0061\u0074\u0063\u0068\u0020\u0027\u0025\u0073\u0027\u0020\u0028\u0068\u0061\u0076\u0065\u0020\u0025\u0076\u0029",path ,ST_ContentTypePatternRe ,_ff .ContentTypeAttr );};return nil ;};var ST_ContentTypePatternRe =_ea .MustCompile (ST_ContentTypePattern );type Default struct{CT_Default };const ST_ContentTypePattern ="\u005e\\\u0070{\u004c\u0061\u0074\u0069\u006e\u007d\u002b\u002f\u002e\u002a\u0024";func (_cgb *Types )MarshalXML (e *_b .Encoder ,start _b .StartElement )error {start .Attr =append (start .Attr ,_b .Attr {Name :_b .Name {Local :"\u0078\u006d\u006cn\u0073"},Value :"ht\u0074\u0070:\u002f\u002f\u0073\u0063\u0068\u0065\u006d\u0061\u0073.\u006f\u0070\u0065\u006e\u0078\u006d\u006c\u0066\u006f\u0072\u006d\u0061\u0074\u0073\u002e\u006f\u0072\u0067\u002f\u0070\u0061\u0063\u006b\u0061\u0067\u0065\u002f\u00320\u00306\u002f\u0063\u006f\u006e\u0074\u0065\u006e\u0074-\u0074y\u0070\u0065s"});start .Attr =append (start .Attr ,_b .Attr {Name :_b .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 ="\u0054\u0079\u0070e\u0073";return _cgb .CT_Types .MarshalXML (e ,start );};func (_bfa *CT_Default )UnmarshalXML (d *_b .Decoder ,start _b .StartElement )error {_bfa .ExtensionAttr ="\u0078\u006d\u006c";_bfa .ContentTypeAttr ="\u0061p\u0070l\u0069\u0063\u0061\u0074\u0069\u006f\u006e\u002f\u0078\u006d\u006c";for _ ,_d :=range start .Attr {if _d .Name .Local =="\u0045x\u0074\u0065\u006e\u0073\u0069\u006fn"{_c ,_fd :=_d .Value ,error (nil );if _fd !=nil {return _fd ;};_bfa .ExtensionAttr =_c ;continue ;};if _d .Name .Local =="C\u006f\u006e\u0074\u0065\u006e\u0074\u0054\u0079\u0070\u0065"{_dg ,_ee :=_d .Value ,error (nil );if _ee !=nil {return _ee ;};_bfa .ContentTypeAttr =_dg ;continue ;};};for {_df ,_ba :=d .Token ();if _ba !=nil {return _f .Errorf ("\u0070\u0061\u0072\u0073in\u0067\u0020\u0043\u0054\u005f\u0044\u0065\u0066\u0061\u0075\u006c\u0074\u003a\u0020%\u0073",_ba );};if _cc ,_db :=_df .(_b .EndElement );_db &&_cc .Name ==start .Name {break ;};};return nil ;};func (_gf *Default )UnmarshalXML (d *_b .Decoder ,start _b .StartElement )error {_gf .CT_Default =*NewCT_Default ();for _ ,_cgc :=range start .Attr {if _cgc .Name .Local =="\u0045x\u0074\u0065\u006e\u0073\u0069\u006fn"{_abd ,_gfa :=_cgc .Value ,error (nil );if _gfa !=nil {return _gfa ;};_gf .ExtensionAttr =_abd ;continue ;};if _cgc .Name .Local =="C\u006f\u006e\u0074\u0065\u006e\u0074\u0054\u0079\u0070\u0065"{_dbe ,_bbe :=_cgc .Value ,error (nil );if _bbe !=nil {return _bbe ;};_gf .ContentTypeAttr =_dbe ;continue ;};};for {_fgc ,_egc :=d .Token ();if _egc !=nil {return _f .Errorf ("\u0070\u0061\u0072\u0073in\u0067\u0020\u0044\u0065\u0066\u0061\u0075\u006c\u0074\u003a\u0020\u0025\u0073",_egc );};if _aa ,_bbef :=_fgc .(_b .EndElement );_bbef &&_aa .Name ==start .Name {break ;};};return nil ;};
// ValidateWithPath validates the Override and its children, prefixing error messages with path
func (_bbd *Override )ValidateWithPath (path string )error {if _egf :=_bbd .CT_Override .ValidateWithPath (path );_egf !=nil {return _egf ;};return nil ;};func (_ff *Default )UnmarshalXML (d *_c .Decoder ,start _c .StartElement )error {_ff .CT_Default =*NewCT_Default ();for _ ,_fcc :=range start .Attr {if _fcc .Name .Local =="\u0045x\u0074\u0065\u006e\u0073\u0069\u006fn"{_abb ,_ecf :=_fcc .Value ,error (nil );if _ecf !=nil {return _ecf ;};_ff .ExtensionAttr =_abb ;continue ;};if _fcc .Name .Local =="C\u006f\u006e\u0074\u0065\u006e\u0074\u0054\u0079\u0070\u0065"{_dd ,_eca :=_fcc .Value ,error (nil );if _eca !=nil {return _eca ;};_ff .ContentTypeAttr =_dd ;continue ;};};for {_ebd ,_bfd :=d .Token ();if _bfd !=nil {return _e .Errorf ("\u0070\u0061\u0072\u0073in\u0067\u0020\u0044\u0065\u0066\u0061\u0075\u006c\u0074\u003a\u0020\u0025\u0073",_bfd );};if _gbc ,_aca :=_ebd .(_c .EndElement );_aca &&_gbc .Name ==start .Name {break ;};};return nil ;};func init (){_cg .RegisterConstructor ("ht\u0074\u0070:\u002f\u002f\u0073\u0063\u0068\u0065\u006d\u0061\u0073.\u006f\u0070\u0065\u006e\u0078\u006d\u006c\u0066\u006f\u0072\u006d\u0061\u0074\u0073\u002e\u006f\u0072\u0067\u002f\u0070\u0061\u0063\u006b\u0061\u0067\u0065\u002f\u00320\u00306\u002f\u0063\u006f\u006e\u0074\u0065\u006e\u0074-\u0074y\u0070\u0065s","\u0043\u0054\u005f\u0054\u0079\u0070\u0065\u0073",NewCT_Types );_cg .RegisterConstructor ("ht\u0074\u0070:\u002f\u002f\u0073\u0063\u0068\u0065\u006d\u0061\u0073.\u006f\u0070\u0065\u006e\u0078\u006d\u006c\u0066\u006f\u0072\u006d\u0061\u0074\u0073\u002e\u006f\u0072\u0067\u002f\u0070\u0061\u0063\u006b\u0061\u0067\u0065\u002f\u00320\u00306\u002f\u0063\u006f\u006e\u0074\u0065\u006e\u0074-\u0074y\u0070\u0065s","\u0043\u0054\u005f\u0044\u0065\u0066\u0061\u0075\u006c\u0074",NewCT_Default );_cg .RegisterConstructor ("ht\u0074\u0070:\u002f\u002f\u0073\u0063\u0068\u0065\u006d\u0061\u0073.\u006f\u0070\u0065\u006e\u0078\u006d\u006c\u0066\u006f\u0072\u006d\u0061\u0074\u0073\u002e\u006f\u0072\u0067\u002f\u0070\u0061\u0063\u006b\u0061\u0067\u0065\u002f\u00320\u00306\u002f\u0063\u006f\u006e\u0074\u0065\u006e\u0074-\u0074y\u0070\u0065s","C\u0054\u005f\u004f\u0076\u0065\u0072\u0072\u0069\u0064\u0065",NewCT_Override );_cg .RegisterConstructor ("ht\u0074\u0070:\u002f\u002f\u0073\u0063\u0068\u0065\u006d\u0061\u0073.\u006f\u0070\u0065\u006e\u0078\u006d\u006c\u0066\u006f\u0072\u006d\u0061\u0074\u0073\u002e\u006f\u0072\u0067\u002f\u0070\u0061\u0063\u006b\u0061\u0067\u0065\u002f\u00320\u00306\u002f\u0063\u006f\u006e\u0074\u0065\u006e\u0074-\u0074y\u0070\u0065s","\u0054\u0079\u0070e\u0073",NewTypes );_cg .RegisterConstructor ("ht\u0074\u0070:\u002f\u002f\u0073\u0063\u0068\u0065\u006d\u0061\u0073.\u006f\u0070\u0065\u006e\u0078\u006d\u006c\u0066\u006f\u0072\u006d\u0061\u0074\u0073\u002e\u006f\u0072\u0067\u002f\u0070\u0061\u0063\u006b\u0061\u0067\u0065\u002f\u00320\u00306\u002f\u0063\u006f\u006e\u0074\u0065\u006e\u0074-\u0074y\u0070\u0065s","\u0044e\u0066\u0061\u0075\u006c\u0074",NewDefault );_cg .RegisterConstructor ("ht\u0074\u0070:\u002f\u002f\u0073\u0063\u0068\u0065\u006d\u0061\u0073.\u006f\u0070\u0065\u006e\u0078\u006d\u006c\u0066\u006f\u0072\u006d\u0061\u0074\u0073\u002e\u006f\u0072\u0067\u002f\u0070\u0061\u0063\u006b\u0061\u0067\u0065\u002f\u00320\u00306\u002f\u0063\u006f\u006e\u0074\u0065\u006e\u0074-\u0074y\u0070\u0065s","\u004f\u0076\u0065\u0072\u0072\u0069\u0064\u0065",NewOverride );};
func (_efc *Override )ValidateWithPath (path string )error {if _agf :=_efc .CT_Override .ValidateWithPath (path );_agf !=nil {return _agf ;};return nil ;};func (_bd *CT_Override )UnmarshalXML (d *_b .Decoder ,start _b .StartElement )error {_bd .ContentTypeAttr ="\u0061p\u0070l\u0069\u0063\u0061\u0074\u0069\u006f\u006e\u002f\u0078\u006d\u006c";for _ ,_cb :=range start .Attr {if _cb .Name .Local =="C\u006f\u006e\u0074\u0065\u006e\u0074\u0054\u0079\u0070\u0065"{_eg ,_fc :=_cb .Value ,error (nil );if _fc !=nil {return _fc ;};_bd .ContentTypeAttr =_eg ;continue ;};if _cb .Name .Local =="\u0050\u0061\u0072\u0074\u004e\u0061\u006d\u0065"{_ce ,_ec :=_cb .Value ,error (nil );if _ec !=nil {return _ec ;};_bd .PartNameAttr =_ce ;continue ;};};for {_egf ,_bdg :=d .Token ();if _bdg !=nil {return _f .Errorf ("\u0070\u0061\u0072si\u006e\u0067\u0020\u0043\u0054\u005f\u004f\u0076\u0065\u0072\u0072\u0069\u0064\u0065\u003a\u0020\u0025\u0073",_bdg );};if _a ,_feg :=_egf .(_b .EndElement );_feg &&_a .Name ==start .Name {break ;};};return nil ;};
// Validate validates the CT_Override and its children
func (_da *CT_Override )Validate ()error {return _da .ValidateWithPath ("C\u0054\u005f\u004f\u0076\u0065\u0072\u0072\u0069\u0064\u0065");};func NewOverride ()*Override {_cgd :=&Override {};_cgd .CT_Override =*NewCT_Override ();return _cgd };
// Validate validates the CT_Types and its children
func (_cf *CT_Types )Validate ()error {return _cf .ValidateWithPath ("\u0043\u0054\u005f\u0054\u0079\u0070\u0065\u0073");};var ST_ExtensionPatternRe =_ea .MustCompile (ST_ExtensionPattern );
// Validate validates the Types and its children
func (_beb *Types )Validate ()error {return _beb .ValidateWithPath ("\u0054\u0079\u0070e\u0073")};func (_dbg *Default )MarshalXML (e *_b .Encoder ,start _b .StartElement )error {return _dbg .CT_Default .MarshalXML (e ,start );};func NewCT_Default ()*CT_Default {_fe :=&CT_Default {};_fe .ExtensionAttr ="\u0078\u006d\u006c";_fe .ContentTypeAttr ="\u0061p\u0070l\u0069\u0063\u0061\u0074\u0069\u006f\u006e\u002f\u0078\u006d\u006c";return _fe ;};func (_eeb *CT_Override )MarshalXML (e *_b .Encoder ,start _b .StartElement )error {start .Attr =append (start .Attr ,_b .Attr {Name :_b .Name {Local :"C\u006f\u006e\u0074\u0065\u006e\u0074\u0054\u0079\u0070\u0065"},Value :_f .Sprintf ("\u0025\u0076",_eeb .ContentTypeAttr )});start .Attr =append (start .Attr ,_b .Attr {Name :_b .Name {Local :"\u0050\u0061\u0072\u0074\u004e\u0061\u006d\u0065"},Value :_f .Sprintf ("\u0025\u0076",_eeb .PartNameAttr )});e .EncodeToken (start );e .EncodeToken (_b .EndElement {Name :start .Name });return nil ;};
// ValidateWithPath validates the Types and its children, prefixing error messages with path
func (_bebd *Types )ValidateWithPath (path string )error {if _gce :=_bebd .CT_Types .ValidateWithPath (path );_gce !=nil {return _gce ;};return nil ;};type Override struct{CT_Override };type CT_Default struct{ExtensionAttr string ;ContentTypeAttr string ;};func init (){_bf .RegisterConstructor ("ht\u0074\u0070:\u002f\u002f\u0073\u0063\u0068\u0065\u006d\u0061\u0073.\u006f\u0070\u0065\u006e\u0078\u006d\u006c\u0066\u006f\u0072\u006d\u0061\u0074\u0073\u002e\u006f\u0072\u0067\u002f\u0070\u0061\u0063\u006b\u0061\u0067\u0065\u002f\u00320\u00306\u002f\u0063\u006f\u006e\u0074\u0065\u006e\u0074-\u0074y\u0070\u0065s","\u0043\u0054\u005f\u0054\u0079\u0070\u0065\u0073",NewCT_Types );_bf .RegisterConstructor ("ht\u0074\u0070:\u002f\u002f\u0073\u0063\u0068\u0065\u006d\u0061\u0073.\u006f\u0070\u0065\u006e\u0078\u006d\u006c\u0066\u006f\u0072\u006d\u0061\u0074\u0073\u002e\u006f\u0072\u0067\u002f\u0070\u0061\u0063\u006b\u0061\u0067\u0065\u002f\u00320\u00306\u002f\u0063\u006f\u006e\u0074\u0065\u006e\u0074-\u0074y\u0070\u0065s","\u0043\u0054\u005f\u0044\u0065\u0066\u0061\u0075\u006c\u0074",NewCT_Default );_bf .RegisterConstructor ("ht\u0074\u0070:\u002f\u002f\u0073\u0063\u0068\u0065\u006d\u0061\u0073.\u006f\u0070\u0065\u006e\u0078\u006d\u006c\u0066\u006f\u0072\u006d\u0061\u0074\u0073\u002e\u006f\u0072\u0067\u002f\u0070\u0061\u0063\u006b\u0061\u0067\u0065\u002f\u00320\u00306\u002f\u0063\u006f\u006e\u0074\u0065\u006e\u0074-\u0074y\u0070\u0065s","C\u0054\u005f\u004f\u0076\u0065\u0072\u0072\u0069\u0064\u0065",NewCT_Override );_bf .RegisterConstructor ("ht\u0074\u0070:\u002f\u002f\u0073\u0063\u0068\u0065\u006d\u0061\u0073.\u006f\u0070\u0065\u006e\u0078\u006d\u006c\u0066\u006f\u0072\u006d\u0061\u0074\u0073\u002e\u006f\u0072\u0067\u002f\u0070\u0061\u0063\u006b\u0061\u0067\u0065\u002f\u00320\u00306\u002f\u0063\u006f\u006e\u0074\u0065\u006e\u0074-\u0074y\u0070\u0065s","\u0054\u0079\u0070e\u0073",NewTypes );_bf .RegisterConstructor ("ht\u0074\u0070:\u002f\u002f\u0073\u0063\u0068\u0065\u006d\u0061\u0073.\u006f\u0070\u0065\u006e\u0078\u006d\u006c\u0066\u006f\u0072\u006d\u0061\u0074\u0073\u002e\u006f\u0072\u0067\u002f\u0070\u0061\u0063\u006b\u0061\u0067\u0065\u002f\u00320\u00306\u002f\u0063\u006f\u006e\u0074\u0065\u006e\u0074-\u0074y\u0070\u0065s","\u0044e\u0066\u0061\u0075\u006c\u0074",NewDefault );_bf .RegisterConstructor ("ht\u0074\u0070:\u002f\u002f\u0073\u0063\u0068\u0065\u006d\u0061\u0073.\u006f\u0070\u0065\u006e\u0078\u006d\u006c\u0066\u006f\u0072\u006d\u0061\u0074\u0073\u002e\u006f\u0072\u0067\u002f\u0070\u0061\u0063\u006b\u0061\u0067\u0065\u002f\u00320\u00306\u002f\u0063\u006f\u006e\u0074\u0065\u006e\u0074-\u0074y\u0070\u0065s","\u004f\u0076\u0065\u0072\u0072\u0069\u0064\u0065",NewOverride );};

File diff suppressed because one or more lines are too long

View File

@ -9,28 +9,28 @@
// 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 relationships ;import (_f "encoding/xml";_a "fmt";_c "github.com/unidoc/unioffice";);type Relationship struct{CT_Relationship };func (_ddga *CT_Relationships )MarshalXML (e *_f .Encoder ,start _f .StartElement )error {e .EncodeToken (start );if _ddga .Relationship !=nil {_agf :=_f .StartElement {Name :_f .Name {Local :"\u0052\u0065\u006ca\u0074\u0069\u006f\u006e\u0073\u0068\u0069\u0070"}};for _ ,_ee :=range _ddga .Relationship {e .EncodeElement (_ee ,_agf );};};e .EncodeToken (_f .EndElement {Name :start .Name });return nil ;};
// Validate validates the CT_Relationships and its children
func (_ef *CT_Relationships )Validate ()error {return _ef .ValidateWithPath ("\u0043\u0054_\u0052\u0065\u006ca\u0074\u0069\u006f\u006e\u0073\u0068\u0069\u0070\u0073");};func (_ddd *ST_TargetMode )UnmarshalXMLAttr (attr _f .Attr )error {switch attr .Value {case "":*_ddd =0;case "\u0045\u0078\u0074\u0065\u0072\u006e\u0061\u006c":*_ddd =1;case "\u0049\u006e\u0074\u0065\u0072\u006e\u0061\u006c":*_ddd =2;};return nil ;};
// ValidateWithPath validates the Relationships and its children, prefixing error messages with path
func (_gfd *Relationships )ValidateWithPath (path string )error {if _ddgae :=_gfd .CT_Relationships .ValidateWithPath (path );_ddgae !=nil {return _ddgae ;};return nil ;};type CT_Relationships struct{Relationship []*Relationship ;};func (_fce *Relationships )MarshalXML (e *_f .Encoder ,start _f .StartElement )error {start .Attr =append (start .Attr ,_f .Attr {Name :_f .Name {Local :"\u0078\u006d\u006cn\u0073"},Value :"ht\u0074\u0070:\u002f\u002f\u0073\u0063\u0068\u0065\u006d\u0061\u0073.\u006f\u0070\u0065\u006e\u0078\u006d\u006c\u0066\u006f\u0072\u006d\u0061\u0074\u0073\u002e\u006f\u0072\u0067\u002f\u0070\u0061\u0063\u006b\u0061\u0067\u0065\u002f\u00320\u00306\u002f\u0072\u0065\u006c\u0061\u0074\u0069\u006fn\u0073h\u0069\u0070s"});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 ="\u0052\u0065\u006c\u0061\u0074\u0069\u006f\u006e\u0073\u0068\u0069\u0070\u0073";return _fce .CT_Relationships .MarshalXML (e ,start );};const (ST_TargetModeUnset ST_TargetMode =0;ST_TargetModeExternal ST_TargetMode =1;ST_TargetModeInternal ST_TargetMode =2;);func NewRelationship ()*Relationship {_bf :=&Relationship {};_bf .CT_Relationship =*NewCT_Relationship ();return _bf ;};
package relationships ;import (_g "encoding/xml";_d "fmt";_gd "github.com/unidoc/unioffice";);func (_a *CT_Relationship )UnmarshalXML (d *_g .Decoder ,start _g .StartElement )error {for _ ,_ga :=range start .Attr {if _ga .Name .Local =="\u0054\u0061\u0072\u0067\u0065\u0074\u004d\u006f\u0064\u0065"{_a .TargetModeAttr .UnmarshalXMLAttr (_ga );continue ;};if _ga .Name .Local =="\u0054\u0061\u0072\u0067\u0065\u0074"{_ed ,_dd :=_ga .Value ,error (nil );if _dd !=nil {return _dd ;};_a .TargetAttr =_ed ;continue ;};if _ga .Name .Local =="\u0054\u0079\u0070\u0065"{_bd ,_df :=_ga .Value ,error (nil );if _df !=nil {return _df ;};_a .TypeAttr =_bd ;continue ;};if _ga .Name .Local =="\u0049\u0064"{_ee ,_bc :=_ga .Value ,error (nil );if _bc !=nil {return _bc ;};_a .IdAttr =_ee ;continue ;};};for {_ca ,_f :=d .Token ();if _f !=nil {return _d .Errorf ("p\u0061\u0072\u0073\u0069\u006e\u0067 \u0043\u0054\u005f\u0052\u0065\u006c\u0061\u0074\u0069o\u006e\u0073\u0068i\u0070:\u0020\u0025\u0073",_f );};if _ef ,_ad :=_ca .(_g .CharData );_ad {_a .Content =string (_ef );};if _ge ,_gf :=_ca .(_g .EndElement );_gf &&_ge .Name ==start .Name {break ;};};return nil ;};func (_ea *CT_Relationship )MarshalXML (e *_g .Encoder ,start _g .StartElement )error {if _ea .TargetModeAttr !=ST_TargetModeUnset {_c ,_cg :=_ea .TargetModeAttr .MarshalXMLAttr (_g .Name {Local :"\u0054\u0061\u0072\u0067\u0065\u0074\u004d\u006f\u0064\u0065"});if _cg !=nil {return _cg ;};start .Attr =append (start .Attr ,_c );};start .Attr =append (start .Attr ,_g .Attr {Name :_g .Name {Local :"\u0054\u0061\u0072\u0067\u0065\u0074"},Value :_d .Sprintf ("\u0025\u0076",_ea .TargetAttr )});start .Attr =append (start .Attr ,_g .Attr {Name :_g .Name {Local :"\u0054\u0079\u0070\u0065"},Value :_d .Sprintf ("\u0025\u0076",_ea .TypeAttr )});start .Attr =append (start .Attr ,_g .Attr {Name :_g .Name {Local :"\u0049\u0064"},Value :_d .Sprintf ("\u0025\u0076",_ea .IdAttr )});e .EncodeElement (_ea .Content ,start );e .EncodeToken (_g .EndElement {Name :start .Name });return nil ;};
// Validate validates the CT_Relationship and its children
func (_cb *CT_Relationship )Validate ()error {return _cb .ValidateWithPath ("\u0043T\u005fR\u0065\u006c\u0061\u0074\u0069\u006f\u006e\u0073\u0068\u0069\u0070");};func (_cfb ST_TargetMode )String ()string {switch _cfb {case 0:return "";case 1:return "\u0045\u0078\u0074\u0065\u0072\u006e\u0061\u006c";case 2:return "\u0049\u006e\u0074\u0065\u0072\u006e\u0061\u006c";};return "";};func (_df *Relationship )UnmarshalXML (d *_f .Decoder ,start _f .StartElement )error {_df .CT_Relationship =*NewCT_Relationship ();for _ ,_ce :=range start .Attr {if _ce .Name .Local =="\u0054\u0061\u0072\u0067\u0065\u0074\u004d\u006f\u0064\u0065"{_df .TargetModeAttr .UnmarshalXMLAttr (_ce );continue ;};if _ce .Name .Local =="\u0054\u0061\u0072\u0067\u0065\u0074"{_bg ,_ced :=_ce .Value ,error (nil );if _ced !=nil {return _ced ;};_df .TargetAttr =_bg ;continue ;};if _ce .Name .Local =="\u0054\u0079\u0070\u0065"{_abd ,_abf :=_ce .Value ,error (nil );if _abf !=nil {return _abf ;};_df .TypeAttr =_abd ;continue ;};if _ce .Name .Local =="\u0049\u0064"{_ca ,_dfa :=_ce .Value ,error (nil );if _dfa !=nil {return _dfa ;};_df .IdAttr =_ca ;continue ;};};for {_fc ,_af :=d .Token ();if _af !=nil {return _a .Errorf ("\u0070a\u0072\u0073\u0069\u006e\u0067\u0020\u0052\u0065\u006c\u0061\u0074i\u006f\u006e\u0073\u0068\u0069\u0070\u003a\u0020\u0025\u0073",_af );};if _cd ,_bga :=_fc .(_f .EndElement );_bga &&_cd .Name ==start .Name {break ;};};return nil ;};func (_gec *Relationships )UnmarshalXML (d *_f .Decoder ,start _f .StartElement )error {_gec .CT_Relationships =*NewCT_Relationships ();_be :for {_aa ,_fe :=d .Token ();if _fe !=nil {return _fe ;};switch _ega :=_aa .(type ){case _f .StartElement :switch _ega .Name {case _f .Name {Space :"ht\u0074\u0070:\u002f\u002f\u0073\u0063\u0068\u0065\u006d\u0061\u0073.\u006f\u0070\u0065\u006e\u0078\u006d\u006c\u0066\u006f\u0072\u006d\u0061\u0074\u0073\u002e\u006f\u0072\u0067\u002f\u0070\u0061\u0063\u006b\u0061\u0067\u0065\u002f\u00320\u00306\u002f\u0072\u0065\u006c\u0061\u0074\u0069\u006fn\u0073h\u0069\u0070s",Local :"\u0052\u0065\u006ca\u0074\u0069\u006f\u006e\u0073\u0068\u0069\u0070"}:_ege :=NewRelationship ();if _cdc :=d .DecodeElement (_ege ,&_ega );_cdc !=nil {return _cdc ;};_gec .Relationship =append (_gec .Relationship ,_ege );default:_c .Log ("\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\u0052\u0065\u006c\u0061t\u0069\u006f\u006e\u0073\u0068\u0069\u0070\u0073 \u0025\u0076",_ega .Name );if _ac :=d .Skip ();_ac !=nil {return _ac ;};};case _f .EndElement :break _be ;case _f .CharData :};};return nil ;};func (_gda *ST_TargetMode )UnmarshalXML (d *_f .Decoder ,start _f .StartElement )error {_eee ,_adg :=d .Token ();if _adg !=nil {return _adg ;};if _bcb ,_bdg :=_eee .(_f .EndElement );_bdg &&_bcb .Name ==start .Name {*_gda =1;return nil ;};if _cg ,_cgc :=_eee .(_f .CharData );!_cgc {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",_eee );}else {switch string (_cg ){case "":*_gda =0;case "\u0045\u0078\u0074\u0065\u0072\u006e\u0061\u006c":*_gda =1;case "\u0049\u006e\u0074\u0065\u0072\u006e\u0061\u006c":*_gda =2;};};_eee ,_adg =d .Token ();if _adg !=nil {return _adg ;};if _fef ,_fbd :=_eee .(_f .EndElement );_fbd &&_fef .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",_eee );};
func (_ce *CT_Relationship )Validate ()error {return _ce .ValidateWithPath ("\u0043T\u005fR\u0065\u006c\u0061\u0074\u0069\u006f\u006e\u0073\u0068\u0069\u0070");};const (ST_TargetModeUnset ST_TargetMode =0;ST_TargetModeExternal ST_TargetMode =1;ST_TargetModeInternal ST_TargetMode =2;);
// ValidateWithPath validates the CT_Relationships and its children, prefixing error messages with path
func (_dde *CT_Relationships )ValidateWithPath (path string )error {for _dc ,_dgd :=range _dde .Relationship {if _eg :=_dgd .ValidateWithPath (_a .Sprintf ("\u0025\u0073\u002f\u0052el\u0061\u0074\u0069\u006f\u006e\u0073\u0068\u0069\u0070\u005b\u0025\u0064\u005d",path ,_dc ));_eg !=nil {return _eg ;};};return nil ;};func (_fab *CT_Relationship )UnmarshalXML (d *_f .Decoder ,start _f .StartElement )error {for _ ,_gc :=range start .Attr {if _gc .Name .Local =="\u0054\u0061\u0072\u0067\u0065\u0074\u004d\u006f\u0064\u0065"{_fab .TargetModeAttr .UnmarshalXMLAttr (_gc );continue ;};if _gc .Name .Local =="\u0054\u0061\u0072\u0067\u0065\u0074"{_dg ,_cc :=_gc .Value ,error (nil );if _cc !=nil {return _cc ;};_fab .TargetAttr =_dg ;continue ;};if _gc .Name .Local =="\u0054\u0079\u0070\u0065"{_gd ,_fg :=_gc .Value ,error (nil );if _fg !=nil {return _fg ;};_fab .TypeAttr =_gd ;continue ;};if _gc .Name .Local =="\u0049\u0064"{_b ,_dd :=_gc .Value ,error (nil );if _dd !=nil {return _dd ;};_fab .IdAttr =_b ;continue ;};};for {_ag ,_e :=d .Token ();if _e !=nil {return _a .Errorf ("p\u0061\u0072\u0073\u0069\u006e\u0067 \u0043\u0054\u005f\u0052\u0065\u006c\u0061\u0074\u0069o\u006e\u0073\u0068i\u0070:\u0020\u0025\u0073",_e );};if _fb ,_ab :=_ag .(_f .CharData );_ab {_fab .Content =string (_fb );};if _ga ,_ddg :=_ag .(_f .EndElement );_ddg &&_ga .Name ==start .Name {break ;};};return nil ;};func NewRelationships ()*Relationships {_dbg :=&Relationships {};_dbg .CT_Relationships =*NewCT_Relationships ();return _dbg ;};func (_caa ST_TargetMode )Validate ()error {return _caa .ValidateWithPath ("")};func NewCT_Relationship ()*CT_Relationship {_cf :=&CT_Relationship {};return _cf };func (_ae *CT_Relationship )MarshalXML (e *_f .Encoder ,start _f .StartElement )error {if _ae .TargetModeAttr !=ST_TargetModeUnset {_gg ,_fa :=_ae .TargetModeAttr .MarshalXMLAttr (_f .Name {Local :"\u0054\u0061\u0072\u0067\u0065\u0074\u004d\u006f\u0064\u0065"});if _fa !=nil {return _fa ;};start .Attr =append (start .Attr ,_gg );};start .Attr =append (start .Attr ,_f .Attr {Name :_f .Name {Local :"\u0054\u0061\u0072\u0067\u0065\u0074"},Value :_a .Sprintf ("\u0025\u0076",_ae .TargetAttr )});start .Attr =append (start .Attr ,_f .Attr {Name :_f .Name {Local :"\u0054\u0079\u0070\u0065"},Value :_a .Sprintf ("\u0025\u0076",_ae .TypeAttr )});start .Attr =append (start .Attr ,_f .Attr {Name :_f .Name {Local :"\u0049\u0064"},Value :_a .Sprintf ("\u0025\u0076",_ae .IdAttr )});e .EncodeElement (_ae .Content ,start );e .EncodeToken (_f .EndElement {Name :start .Name });return nil ;};func (_gga *Relationship )MarshalXML (e *_f .Encoder ,start _f .StartElement )error {return _gga .CT_Relationship .MarshalXML (e ,start );};type ST_TargetMode byte ;func (_gf *CT_Relationships )UnmarshalXML (d *_f .Decoder ,start _f .StartElement )error {_gaf :for {_ad ,_fbc :=d .Token ();if _fbc !=nil {return _fbc ;};switch _ge :=_ad .(type ){case _f .StartElement :switch _ge .Name {case _f .Name {Space :"ht\u0074\u0070:\u002f\u002f\u0073\u0063\u0068\u0065\u006d\u0061\u0073.\u006f\u0070\u0065\u006e\u0078\u006d\u006c\u0066\u006f\u0072\u006d\u0061\u0074\u0073\u002e\u006f\u0072\u0067\u002f\u0070\u0061\u0063\u006b\u0061\u0067\u0065\u002f\u00320\u00306\u002f\u0072\u0065\u006c\u0061\u0074\u0069\u006fn\u0073h\u0069\u0070s",Local :"\u0052\u0065\u006ca\u0074\u0069\u006f\u006e\u0073\u0068\u0069\u0070"}:_ff :=NewRelationship ();if _gce :=d .DecodeElement (_ff ,&_ge );_gce !=nil {return _gce ;};_gf .Relationship =append (_gf .Relationship ,_ff );default:_c .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\u0052\u0065\u006c\u0061\u0074\u0069\u006f\u006e\u0073\u0068\u0069\u0070\u0073\u0020\u0025v",_ge .Name );if _fgd :=d .Skip ();_fgd !=nil {return _fgd ;};};case _f .EndElement :break _gaf ;case _f .CharData :};};return nil ;};func (_de ST_TargetMode )MarshalXML (e *_f .Encoder ,start _f .StartElement )error {return e .EncodeElement (_de .String (),start );};
// Validate validates the Relationships and its children
func (_gb *Relationships )Validate ()error {return _gb .ValidateWithPath ("\u0052\u0065\u006c\u0061\u0074\u0069\u006f\u006e\u0073\u0068\u0069\u0070\u0073");};func (_cbg ST_TargetMode )ValidateWithPath (path string )error {switch _cbg {case 0,1,2: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 (_cbg ));};return nil ;};
// Validate validates the CT_Relationships and its children
func (_eb *CT_Relationships )Validate ()error {return _eb .ValidateWithPath ("\u0043\u0054_\u0052\u0065\u006ca\u0074\u0069\u006f\u006e\u0073\u0068\u0069\u0070\u0073");};func (_bad ST_TargetMode )Validate ()error {return _bad .ValidateWithPath ("")};func NewCT_Relationships ()*CT_Relationships {_gdf :=&CT_Relationships {};return _gdf };func (_dca *ST_TargetMode )UnmarshalXMLAttr (attr _g .Attr )error {switch attr .Value {case "":*_dca =0;case "\u0045\u0078\u0074\u0065\u0072\u006e\u0061\u006c":*_dca =1;case "\u0049\u006e\u0074\u0065\u0072\u006e\u0061\u006c":*_dca =2;};return nil ;};func (_cad *Relationship )MarshalXML (e *_g .Encoder ,start _g .StartElement )error {return _cad .CT_Relationship .MarshalXML (e ,start );};
// ValidateWithPath validates the CT_Relationship and its children, prefixing error messages with path
func (_db *CT_Relationship )ValidateWithPath (path string )error {if _cfg :=_db .TargetModeAttr .ValidateWithPath (path +"\u002fT\u0061r\u0067\u0065\u0074\u004d\u006f\u0064\u0065\u0041\u0074\u0074\u0072");_cfg !=nil {return _cfg ;};return nil ;};type Relationships struct{CT_Relationships };func (_fee ST_TargetMode )MarshalXMLAttr (name _f .Name )(_f .Attr ,error ){_bce :=_f .Attr {};_bce .Name =name ;switch _fee {case ST_TargetModeUnset :_bce .Value ="";case ST_TargetModeExternal :_bce .Value ="\u0045\u0078\u0074\u0065\u0072\u006e\u0061\u006c";case ST_TargetModeInternal :_bce .Value ="\u0049\u006e\u0074\u0065\u0072\u006e\u0061\u006c";};return _bce ,nil ;};type CT_Relationship struct{TargetModeAttr ST_TargetMode ;TargetAttr string ;TypeAttr string ;IdAttr string ;Content string ;};
// ValidateWithPath validates the Relationship and its children, prefixing error messages with path
func (_bc *Relationship )ValidateWithPath (path string )error {if _cdf :=_bc .CT_Relationship .ValidateWithPath (path );_cdf !=nil {return _cdf ;};return nil ;};func NewCT_Relationships ()*CT_Relationships {_fge :=&CT_Relationships {};return _fge };
func (_cc *CT_Relationship )ValidateWithPath (path string )error {if _ba :=_cc .TargetModeAttr .ValidateWithPath (path +"\u002fT\u0061r\u0067\u0065\u0074\u004d\u006f\u0064\u0065\u0041\u0074\u0074\u0072");_ba !=nil {return _ba ;};return nil ;};func NewRelationship ()*Relationship {_cf :=&Relationship {};_cf .CT_Relationship =*NewCT_Relationship ();return _cf ;};
// Validate validates the Relationship and its children
func (_ed *Relationship )Validate ()error {return _ed .ValidateWithPath ("\u0052\u0065\u006ca\u0074\u0069\u006f\u006e\u0073\u0068\u0069\u0070");};func init (){_c .RegisterConstructor ("ht\u0074\u0070:\u002f\u002f\u0073\u0063\u0068\u0065\u006d\u0061\u0073.\u006f\u0070\u0065\u006e\u0078\u006d\u006c\u0066\u006f\u0072\u006d\u0061\u0074\u0073\u002e\u006f\u0072\u0067\u002f\u0070\u0061\u0063\u006b\u0061\u0067\u0065\u002f\u00320\u00306\u002f\u0072\u0065\u006c\u0061\u0074\u0069\u006fn\u0073h\u0069\u0070s","\u0043\u0054_\u0052\u0065\u006ca\u0074\u0069\u006f\u006e\u0073\u0068\u0069\u0070\u0073",NewCT_Relationships );_c .RegisterConstructor ("ht\u0074\u0070:\u002f\u002f\u0073\u0063\u0068\u0065\u006d\u0061\u0073.\u006f\u0070\u0065\u006e\u0078\u006d\u006c\u0066\u006f\u0072\u006d\u0061\u0074\u0073\u002e\u006f\u0072\u0067\u002f\u0070\u0061\u0063\u006b\u0061\u0067\u0065\u002f\u00320\u00306\u002f\u0072\u0065\u006c\u0061\u0074\u0069\u006fn\u0073h\u0069\u0070s","\u0043T\u005fR\u0065\u006c\u0061\u0074\u0069\u006f\u006e\u0073\u0068\u0069\u0070",NewCT_Relationship );_c .RegisterConstructor ("ht\u0074\u0070:\u002f\u002f\u0073\u0063\u0068\u0065\u006d\u0061\u0073.\u006f\u0070\u0065\u006e\u0078\u006d\u006c\u0066\u006f\u0072\u006d\u0061\u0074\u0073\u002e\u006f\u0072\u0067\u002f\u0070\u0061\u0063\u006b\u0061\u0067\u0065\u002f\u00320\u00306\u002f\u0072\u0065\u006c\u0061\u0074\u0069\u006fn\u0073h\u0069\u0070s","\u0052\u0065\u006c\u0061\u0074\u0069\u006f\u006e\u0073\u0068\u0069\u0070\u0073",NewRelationships );_c .RegisterConstructor ("ht\u0074\u0070:\u002f\u002f\u0073\u0063\u0068\u0065\u006d\u0061\u0073.\u006f\u0070\u0065\u006e\u0078\u006d\u006c\u0066\u006f\u0072\u006d\u0061\u0074\u0073\u002e\u006f\u0072\u0067\u002f\u0070\u0061\u0063\u006b\u0061\u0067\u0065\u002f\u00320\u00306\u002f\u0072\u0065\u006c\u0061\u0074\u0069\u006fn\u0073h\u0069\u0070s","\u0052\u0065\u006ca\u0074\u0069\u006f\u006e\u0073\u0068\u0069\u0070",NewRelationship );};
func (_ff *Relationship )Validate ()error {return _ff .ValidateWithPath ("\u0052\u0065\u006ca\u0074\u0069\u006f\u006e\u0073\u0068\u0069\u0070");};func (_ege *ST_TargetMode )UnmarshalXML (d *_g .Decoder ,start _g .StartElement )error {_feg ,_gefb :=d .Token ();if _gefb !=nil {return _gefb ;};if _adf ,_aaa :=_feg .(_g .EndElement );_aaa &&_adf .Name ==start .Name {*_ege =1;return nil ;};if _acd ,_egc :=_feg .(_g .CharData );!_egc {return _d .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",_feg );}else {switch string (_acd ){case "":*_ege =0;case "\u0045\u0078\u0074\u0065\u0072\u006e\u0061\u006c":*_ege =1;case "\u0049\u006e\u0074\u0065\u0072\u006e\u0061\u006c":*_ege =2;};};_feg ,_gefb =d .Token ();if _gefb !=nil {return _gefb ;};if _cab ,_egg :=_feg .(_g .EndElement );_egg &&_cab .Name ==start .Name {return nil ;};return _d .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",_feg );};type ST_TargetMode byte ;func NewRelationships ()*Relationships {_faf :=&Relationships {};_faf .CT_Relationships =*NewCT_Relationships ();return _faf ;};func (_bgcf *Relationships )MarshalXML (e *_g .Encoder ,start _g .StartElement )error {start .Attr =append (start .Attr ,_g .Attr {Name :_g .Name {Local :"\u0078\u006d\u006cn\u0073"},Value :"ht\u0074\u0070:\u002f\u002f\u0073\u0063\u0068\u0065\u006d\u0061\u0073.\u006f\u0070\u0065\u006e\u0078\u006d\u006c\u0066\u006f\u0072\u006d\u0061\u0074\u0073\u002e\u006f\u0072\u0067\u002f\u0070\u0061\u0063\u006b\u0061\u0067\u0065\u002f\u00320\u00306\u002f\u0072\u0065\u006c\u0061\u0074\u0069\u006fn\u0073h\u0069\u0070s"});start .Attr =append (start .Attr ,_g .Attr {Name :_g .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 ="\u0052\u0065\u006c\u0061\u0074\u0069\u006f\u006e\u0073\u0068\u0069\u0070\u0073";return _bgcf .CT_Relationships .MarshalXML (e ,start );};func (_db ST_TargetMode )MarshalXML (e *_g .Encoder ,start _g .StartElement )error {return e .EncodeElement (_db .String (),start );};func (_ac *CT_Relationships )UnmarshalXML (d *_g .Decoder ,start _g .StartElement )error {_fe :for {_ega ,_bcg :=d .Token ();if _bcg !=nil {return _bcg ;};switch _bb :=_ega .(type ){case _g .StartElement :switch _bb .Name {case _g .Name {Space :"ht\u0074\u0070:\u002f\u002f\u0073\u0063\u0068\u0065\u006d\u0061\u0073.\u006f\u0070\u0065\u006e\u0078\u006d\u006c\u0066\u006f\u0072\u006d\u0061\u0074\u0073\u002e\u006f\u0072\u0067\u002f\u0070\u0061\u0063\u006b\u0061\u0067\u0065\u002f\u00320\u00306\u002f\u0072\u0065\u006c\u0061\u0074\u0069\u006fn\u0073h\u0069\u0070s",Local :"\u0052\u0065\u006ca\u0074\u0069\u006f\u006e\u0073\u0068\u0069\u0070"}:_ab :=NewRelationship ();if _bg :=d .DecodeElement (_ab ,&_bb );_bg !=nil {return _bg ;};_ac .Relationship =append (_ac .Relationship ,_ab );default:_gd .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\u0052\u0065\u006c\u0061\u0074\u0069\u006f\u006e\u0073\u0068\u0069\u0070\u0073\u0020\u0025v",_bb .Name );if _fc :=d .Skip ();_fc !=nil {return _fc ;};};case _g .EndElement :break _fe ;case _g .CharData :};};return nil ;};func (_ae *CT_Relationships )MarshalXML (e *_g .Encoder ,start _g .StartElement )error {e .EncodeToken (start );if _ae .Relationship !=nil {_eab :=_g .StartElement {Name :_g .Name {Local :"\u0052\u0065\u006ca\u0074\u0069\u006f\u006e\u0073\u0068\u0069\u0070"}};for _ ,_eg :=range _ae .Relationship {e .EncodeElement (_eg ,_eab );};};e .EncodeToken (_g .EndElement {Name :start .Name });return nil ;};func (_dcd ST_TargetMode )ValidateWithPath (path string )error {switch _dcd {case 0,1,2:default:return _d .Errorf ("\u0025s\u003a\u0020\u006f\u0075t\u0020\u006f\u0066\u0020\u0072a\u006eg\u0065 \u0076\u0061\u006c\u0075\u0065\u0020\u0025d",path ,int (_dcd ));};return nil ;};
// ValidateWithPath validates the CT_Relationships and its children, prefixing error messages with path
func (_fd *CT_Relationships )ValidateWithPath (path string )error {for _fg ,_gdg :=range _fd .Relationship {if _ccf :=_gdg .ValidateWithPath (_d .Sprintf ("\u0025\u0073\u002f\u0052el\u0061\u0074\u0069\u006f\u006e\u0073\u0068\u0069\u0070\u005b\u0025\u0064\u005d",path ,_fg ));_ccf !=nil {return _ccf ;};};return nil ;};
// ValidateWithPath validates the Relationships and its children, prefixing error messages with path
func (_dc *Relationships )ValidateWithPath (path string )error {if _fef :=_dc .CT_Relationships .ValidateWithPath (path );_fef !=nil {return _fef ;};return nil ;};func (_gef ST_TargetMode )MarshalXMLAttr (name _g .Name )(_g .Attr ,error ){_ddac :=_g .Attr {};_ddac .Name =name ;switch _gef {case ST_TargetModeUnset :_ddac .Value ="";case ST_TargetModeExternal :_ddac .Value ="\u0045\u0078\u0074\u0065\u0072\u006e\u0061\u006c";case ST_TargetModeInternal :_ddac .Value ="\u0049\u006e\u0074\u0065\u0072\u006e\u0061\u006c";};return _ddac ,nil ;};type Relationship struct{CT_Relationship };func (_fa *Relationship )UnmarshalXML (d *_g .Decoder ,start _g .StartElement )error {_fa .CT_Relationship =*NewCT_Relationship ();for _ ,_bgg :=range start .Attr {if _bgg .Name .Local =="\u0054\u0061\u0072\u0067\u0065\u0074\u004d\u006f\u0064\u0065"{_fa .TargetModeAttr .UnmarshalXMLAttr (_bgg );continue ;};if _bgg .Name .Local =="\u0054\u0061\u0072\u0067\u0065\u0074"{_cfe ,_bbc :=_bgg .Value ,error (nil );if _bbc !=nil {return _bbc ;};_fa .TargetAttr =_cfe ;continue ;};if _bgg .Name .Local =="\u0054\u0079\u0070\u0065"{_cbg ,_aa :=_bgg .Value ,error (nil );if _aa !=nil {return _aa ;};_fa .TypeAttr =_cbg ;continue ;};if _bgg .Name .Local =="\u0049\u0064"{_geb ,_bce :=_bgg .Value ,error (nil );if _bce !=nil {return _bce ;};_fa .IdAttr =_geb ;continue ;};};for {_fb ,_bgc :=d .Token ();if _bgc !=nil {return _d .Errorf ("\u0070a\u0072\u0073\u0069\u006e\u0067\u0020\u0052\u0065\u006c\u0061\u0074i\u006f\u006e\u0073\u0068\u0069\u0070\u003a\u0020\u0025\u0073",_bgc );};if _fee ,_cd :=_fb .(_g .EndElement );_cd &&_fee .Name ==start .Name {break ;};};return nil ;};type CT_Relationship struct{TargetModeAttr ST_TargetMode ;TargetAttr string ;TypeAttr string ;IdAttr string ;Content string ;};type Relationships struct{CT_Relationships };type CT_Relationships struct{Relationship []*Relationship ;};
// ValidateWithPath validates the Relationship and its children, prefixing error messages with path
func (_bdg *Relationship )ValidateWithPath (path string )error {if _bf :=_bdg .CT_Relationship .ValidateWithPath (path );_bf !=nil {return _bf ;};return nil ;};func (_fafg ST_TargetMode )String ()string {switch _fafg {case 0:return "";case 1:return "\u0045\u0078\u0074\u0065\u0072\u006e\u0061\u006c";case 2:return "\u0049\u006e\u0074\u0065\u0072\u006e\u0061\u006c";};return "";};func (_bbb *Relationships )UnmarshalXML (d *_g .Decoder ,start _g .StartElement )error {_bbb .CT_Relationships =*NewCT_Relationships ();_fec :for {_eff ,_bfd :=d .Token ();if _bfd !=nil {return _bfd ;};switch _ced :=_eff .(type ){case _g .StartElement :switch _ced .Name {case _g .Name {Space :"ht\u0074\u0070:\u002f\u002f\u0073\u0063\u0068\u0065\u006d\u0061\u0073.\u006f\u0070\u0065\u006e\u0078\u006d\u006c\u0066\u006f\u0072\u006d\u0061\u0074\u0073\u002e\u006f\u0072\u0067\u002f\u0070\u0061\u0063\u006b\u0061\u0067\u0065\u002f\u00320\u00306\u002f\u0072\u0065\u006c\u0061\u0074\u0069\u006fn\u0073h\u0069\u0070s",Local :"\u0052\u0065\u006ca\u0074\u0069\u006f\u006e\u0073\u0068\u0069\u0070"}:_gdfc :=NewRelationship ();if _dda :=d .DecodeElement (_gdfc ,&_ced );_dda !=nil {return _dda ;};_bbb .Relationship =append (_bbb .Relationship ,_gdfc );default:_gd .Log ("\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\u0052\u0065\u006c\u0061t\u0069\u006f\u006e\u0073\u0068\u0069\u0070\u0073 \u0025\u0076",_ced .Name );if _bda :=d .Skip ();_bda !=nil {return _bda ;};};case _g .EndElement :break _fec ;case _g .CharData :};};return nil ;};
// Validate validates the Relationships and its children
func (_bfg *Relationships )Validate ()error {return _bfg .ValidateWithPath ("\u0052\u0065\u006c\u0061\u0074\u0069\u006f\u006e\u0073\u0068\u0069\u0070\u0073");};func NewCT_Relationship ()*CT_Relationship {_e :=&CT_Relationship {};return _e };func init (){_gd .RegisterConstructor ("ht\u0074\u0070:\u002f\u002f\u0073\u0063\u0068\u0065\u006d\u0061\u0073.\u006f\u0070\u0065\u006e\u0078\u006d\u006c\u0066\u006f\u0072\u006d\u0061\u0074\u0073\u002e\u006f\u0072\u0067\u002f\u0070\u0061\u0063\u006b\u0061\u0067\u0065\u002f\u00320\u00306\u002f\u0072\u0065\u006c\u0061\u0074\u0069\u006fn\u0073h\u0069\u0070s","\u0043\u0054_\u0052\u0065\u006ca\u0074\u0069\u006f\u006e\u0073\u0068\u0069\u0070\u0073",NewCT_Relationships );_gd .RegisterConstructor ("ht\u0074\u0070:\u002f\u002f\u0073\u0063\u0068\u0065\u006d\u0061\u0073.\u006f\u0070\u0065\u006e\u0078\u006d\u006c\u0066\u006f\u0072\u006d\u0061\u0074\u0073\u002e\u006f\u0072\u0067\u002f\u0070\u0061\u0063\u006b\u0061\u0067\u0065\u002f\u00320\u00306\u002f\u0072\u0065\u006c\u0061\u0074\u0069\u006fn\u0073h\u0069\u0070s","\u0043T\u005fR\u0065\u006c\u0061\u0074\u0069\u006f\u006e\u0073\u0068\u0069\u0070",NewCT_Relationship );_gd .RegisterConstructor ("ht\u0074\u0070:\u002f\u002f\u0073\u0063\u0068\u0065\u006d\u0061\u0073.\u006f\u0070\u0065\u006e\u0078\u006d\u006c\u0066\u006f\u0072\u006d\u0061\u0074\u0073\u002e\u006f\u0072\u0067\u002f\u0070\u0061\u0063\u006b\u0061\u0067\u0065\u002f\u00320\u00306\u002f\u0072\u0065\u006c\u0061\u0074\u0069\u006fn\u0073h\u0069\u0070s","\u0052\u0065\u006c\u0061\u0074\u0069\u006f\u006e\u0073\u0068\u0069\u0070\u0073",NewRelationships );_gd .RegisterConstructor ("ht\u0074\u0070:\u002f\u002f\u0073\u0063\u0068\u0065\u006d\u0061\u0073.\u006f\u0070\u0065\u006e\u0078\u006d\u006c\u0066\u006f\u0072\u006d\u0061\u0074\u0073\u002e\u006f\u0072\u0067\u002f\u0070\u0061\u0063\u006b\u0061\u0067\u0065\u002f\u00320\u00306\u002f\u0072\u0065\u006c\u0061\u0074\u0069\u006fn\u0073h\u0069\u0070s","\u0052\u0065\u006ca\u0074\u0069\u006f\u006e\u0073\u0068\u0069\u0070",NewRelationship );};

File diff suppressed because one or more lines are too long

View File

@ -9,22 +9,22 @@
// 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 schemaLibrary ;import (_c "encoding/xml";_e "fmt";_ea "github.com/unidoc/unioffice";);func (_dc *CT_SchemaLibrary )MarshalXML (e *_c .Encoder ,start _c .StartElement )error {e .EncodeToken (start );if _dc .Schema !=nil {_ebg :=_c .StartElement {Name :_c .Name {Local :"\u006da\u003a\u0073\u0063\u0068\u0065\u006da"}};for _ ,_fg :=range _dc .Schema {e .EncodeElement (_fg ,_ebg );};};e .EncodeToken (_c .EndElement {Name :start .Name });return nil ;};func (_cd *CT_Schema )UnmarshalXML (d *_c .Decoder ,start _c .StartElement )error {for _ ,_b :=range start .Attr {if _b .Name .Local =="\u0075\u0072\u0069"{_gg ,_af :=_b .Value ,error (nil );if _af !=nil {return _af ;};_cd .UriAttr =&_gg ;continue ;};if _b .Name .Local =="\u006d\u0061n\u0069\u0066\u0065s\u0074\u004c\u006f\u0063\u0061\u0074\u0069\u006f\u006e"{_gb ,_ag :=_b .Value ,error (nil );if _ag !=nil {return _ag ;};_cd .ManifestLocationAttr =&_gb ;continue ;};if _b .Name .Local =="\u0073\u0063\u0068\u0065\u006d\u0061\u004c\u006f\u0063a\u0074\u0069\u006f\u006e"{_gd ,_f :=_b .Value ,error (nil );if _f !=nil {return _f ;};_cd .SchemaLocationAttr =&_gd ;continue ;};if _b .Name .Local =="\u0073\u0063\u0068\u0065\u006d\u0061\u004c\u0061\u006eg\u0075\u0061\u0067\u0065"{_ca ,_fc :=_b .Value ,error (nil );if _fc !=nil {return _fc ;};_cd .SchemaLanguageAttr =&_ca ;continue ;};};for {_eb ,_bb :=d .Token ();if _bb !=nil {return _e .Errorf ("p\u0061\u0072\u0073\u0069ng\u0020C\u0054\u005f\u0053\u0063\u0068e\u006d\u0061\u003a\u0020\u0025\u0073",_bb );};if _cf ,_eae :=_eb .(_c .EndElement );_eae &&_cf .Name ==start .Name {break ;};};return nil ;};
package schemaLibrary ;import (_b "encoding/xml";_c "fmt";_a "github.com/unidoc/unioffice";);func NewSchemaLibrary ()*SchemaLibrary {_ggb :=&SchemaLibrary {};_ggb .CT_SchemaLibrary =*NewCT_SchemaLibrary ();return _ggb ;};func NewCT_Schema ()*CT_Schema {_d :=&CT_Schema {};return _d };
// Validate validates the CT_Schema and its children
func (_gf *CT_Schema )Validate ()error {return _gf .ValidateWithPath ("\u0043T\u005f\u0053\u0063\u0068\u0065\u006da");};func NewCT_SchemaLibrary ()*CT_SchemaLibrary {_gc :=&CT_SchemaLibrary {};return _gc };func (_gfa *CT_SchemaLibrary )UnmarshalXML (d *_c .Decoder ,start _c .StartElement )error {_bc :for {_cb ,_ae :=d .Token ();if _ae !=nil {return _ae ;};switch _ee :=_cb .(type ){case _c .StartElement :switch _ee .Name {case _c .Name {Space :"\u0068\u0074\u0074\u0070:\u002f\u002f\u0073\u0063\u0068\u0065\u006d\u0061\u0073.\u006f\u0070\u0065\u006e\u0078\u006d\u006c\u0066\u006f\u0072\u006d\u0061\u0074\u0073\u002e\u006f\u0072\u0067/\u0073\u0063\u0068\u0065\u006da\u004c\u0069\u0062\u0072\u0061\u0072\u0079\u002f\u0032\u0030\u0030\u0036\u002f\u006d\u0061\u0069\u006e",Local :"\u0073\u0063\u0068\u0065\u006d\u0061"}:_ceg :=NewCT_Schema ();if _ggd :=d .DecodeElement (_ceg ,&_ee );_ggd !=nil {return _ggd ;};_gfa .Schema =append (_gfa .Schema ,_ceg );default:_ea .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\u0053\u0063\u0068\u0065\u006d\u0061\u004c\u0069\u0062\u0072\u0061\u0072\u0079\u0020\u0025v",_ee .Name );if _da :=d .Skip ();_da !=nil {return _da ;};};case _c .EndElement :break _bc ;case _c .CharData :};};return nil ;};
// Validate validates the CT_SchemaLibrary and its children
func (_ga *CT_SchemaLibrary )Validate ()error {return _ga .ValidateWithPath ("\u0043\u0054_\u0053\u0063\u0068e\u006d\u0061\u004c\u0069\u0062\u0072\u0061\u0072\u0079");};type CT_Schema struct{UriAttr *string ;ManifestLocationAttr *string ;SchemaLocationAttr *string ;SchemaLanguageAttr *string ;};
// ValidateWithPath validates the CT_Schema and its children, prefixing error messages with path
func (_de *CT_Schema )ValidateWithPath (path string )error {return nil };
func (_cb *CT_Schema )Validate ()error {return _cb .ValidateWithPath ("\u0043T\u005f\u0053\u0063\u0068\u0065\u006da");};
// Validate validates the SchemaLibrary and its children
func (_dcc *SchemaLibrary )Validate ()error {return _dcc .ValidateWithPath ("\u0053\u0063\u0068\u0065\u006d\u0061\u004c\u0069\u0062\u0072\u0061\u0072\u0079");};func (_a *CT_Schema )MarshalXML (e *_c .Encoder ,start _c .StartElement )error {if _a .UriAttr !=nil {start .Attr =append (start .Attr ,_c .Attr {Name :_c .Name {Local :"\u006d\u0061\u003a\u0075\u0072\u0069"},Value :_e .Sprintf ("\u0025\u0076",*_a .UriAttr )});};if _a .ManifestLocationAttr !=nil {start .Attr =append (start .Attr ,_c .Attr {Name :_c .Name {Local :"\u006d\u0061\u003a\u006dan\u0069\u0066\u0065\u0073\u0074\u004c\u006f\u0063\u0061\u0074\u0069\u006f\u006e"},Value :_e .Sprintf ("\u0025\u0076",*_a .ManifestLocationAttr )});};if _a .SchemaLocationAttr !=nil {start .Attr =append (start .Attr ,_c .Attr {Name :_c .Name {Local :"\u006d\u0061\u003a\u0073\u0063\u0068\u0065\u006d\u0061\u004c\u006f\u0063a\u0074\u0069\u006f\u006e"},Value :_e .Sprintf ("\u0025\u0076",*_a .SchemaLocationAttr )});};if _a .SchemaLanguageAttr !=nil {start .Attr =append (start .Attr ,_c .Attr {Name :_c .Name {Local :"\u006d\u0061\u003a\u0073\u0063\u0068\u0065\u006d\u0061\u004c\u0061\u006eg\u0075\u0061\u0067\u0065"},Value :_e .Sprintf ("\u0025\u0076",*_a .SchemaLanguageAttr )});};e .EncodeToken (start );e .EncodeToken (_c .EndElement {Name :start .Name });return nil ;};func (_be *SchemaLibrary )UnmarshalXML (d *_c .Decoder ,start _c .StartElement )error {_be .CT_SchemaLibrary =*NewCT_SchemaLibrary ();_ba :for {_aff ,_cegg :=d .Token ();if _cegg !=nil {return _cegg ;};switch _cg :=_aff .(type ){case _c .StartElement :switch _cg .Name {case _c .Name {Space :"\u0068\u0074\u0074\u0070:\u002f\u002f\u0073\u0063\u0068\u0065\u006d\u0061\u0073.\u006f\u0070\u0065\u006e\u0078\u006d\u006c\u0066\u006f\u0072\u006d\u0061\u0074\u0073\u002e\u006f\u0072\u0067/\u0073\u0063\u0068\u0065\u006da\u004c\u0069\u0062\u0072\u0061\u0072\u0079\u002f\u0032\u0030\u0030\u0036\u002f\u006d\u0061\u0069\u006e",Local :"\u0073\u0063\u0068\u0065\u006d\u0061"}:_cde :=NewCT_Schema ();if _aeg :=d .DecodeElement (_cde ,&_cg );_aeg !=nil {return _aeg ;};_be .Schema =append (_be .Schema ,_cde );default:_ea .Log ("\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\u0053\u0063\u0068\u0065m\u0061\u004c\u0069\u0062\u0072\u0061\u0072\u0079 \u0025\u0076",_cg .Name );if _cc :=d .Skip ();_cc !=nil {return _cc ;};};case _c .EndElement :break _ba ;case _c .CharData :};};return nil ;};type CT_SchemaLibrary struct{Schema []*CT_Schema ;};func NewCT_Schema ()*CT_Schema {_d :=&CT_Schema {};return _d };
func (_db *SchemaLibrary )Validate ()error {return _db .ValidateWithPath ("\u0053\u0063\u0068\u0065\u006d\u0061\u004c\u0069\u0062\u0072\u0061\u0072\u0079");};func (_af *CT_Schema )UnmarshalXML (d *_b .Decoder ,start _b .StartElement )error {for _ ,_gd :=range start .Attr {if _gd .Name .Local =="\u0075\u0072\u0069"{_ag ,_cf :=_gd .Value ,error (nil );if _cf !=nil {return _cf ;};_af .UriAttr =&_ag ;continue ;};if _gd .Name .Local =="\u006d\u0061n\u0069\u0066\u0065s\u0074\u004c\u006f\u0063\u0061\u0074\u0069\u006f\u006e"{_fc ,_gc :=_gd .Value ,error (nil );if _gc !=nil {return _gc ;};_af .ManifestLocationAttr =&_fc ;continue ;};if _gd .Name .Local =="\u0073\u0063\u0068\u0065\u006d\u0061\u004c\u006f\u0063a\u0074\u0069\u006f\u006e"{_ef ,_dg :=_gd .Value ,error (nil );if _dg !=nil {return _dg ;};_af .SchemaLocationAttr =&_ef ;continue ;};if _gd .Name .Local =="\u0073\u0063\u0068\u0065\u006d\u0061\u004c\u0061\u006eg\u0075\u0061\u0067\u0065"{_gg ,_cfa :=_gd .Value ,error (nil );if _cfa !=nil {return _cfa ;};_af .SchemaLanguageAttr =&_gg ;continue ;};};for {_dge ,_da :=d .Token ();if _da !=nil {return _c .Errorf ("p\u0061\u0072\u0073\u0069ng\u0020C\u0054\u005f\u0053\u0063\u0068e\u006d\u0061\u003a\u0020\u0025\u0073",_da );};if _fca ,_ac :=_dge .(_b .EndElement );_ac &&_fca .Name ==start .Name {break ;};};return nil ;};func NewCT_SchemaLibrary ()*CT_SchemaLibrary {_cab :=&CT_SchemaLibrary {};return _cab };func (_efa *CT_SchemaLibrary )UnmarshalXML (d *_b .Decoder ,start _b .StartElement )error {_ge :for {_cdf ,_df :=d .Token ();if _df !=nil {return _df ;};switch _cff :=_cdf .(type ){case _b .StartElement :switch _cff .Name {case _b .Name {Space :"\u0068\u0074\u0074\u0070:\u002f\u002f\u0073\u0063\u0068\u0065\u006d\u0061\u0073.\u006f\u0070\u0065\u006e\u0078\u006d\u006c\u0066\u006f\u0072\u006d\u0061\u0074\u0073\u002e\u006f\u0072\u0067/\u0073\u0063\u0068\u0065\u006da\u004c\u0069\u0062\u0072\u0061\u0072\u0079\u002f\u0032\u0030\u0030\u0036\u002f\u006d\u0061\u0069\u006e",Local :"\u0073\u0063\u0068\u0065\u006d\u0061"}:_cbc :=NewCT_Schema ();if _cabb :=d .DecodeElement (_cbc ,&_cff );_cabb !=nil {return _cabb ;};_efa .Schema =append (_efa .Schema ,_cbc );default:_a .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\u0053\u0063\u0068\u0065\u006d\u0061\u004c\u0069\u0062\u0072\u0061\u0072\u0079\u0020\u0025v",_cff .Name );if _bc :=d .Skip ();_bc !=nil {return _bc ;};};case _b .EndElement :break _ge ;case _b .CharData :};};return nil ;};type SchemaLibrary struct{CT_SchemaLibrary };func (_fbf *SchemaLibrary )MarshalXML (e *_b .Encoder ,start _b .StartElement )error {start .Attr =append (start .Attr ,_b .Attr {Name :_b .Name {Local :"\u0078\u006d\u006cn\u0073"},Value :"\u0068\u0074\u0074\u0070:\u002f\u002f\u0073\u0063\u0068\u0065\u006d\u0061\u0073.\u006f\u0070\u0065\u006e\u0078\u006d\u006c\u0066\u006f\u0072\u006d\u0061\u0074\u0073\u002e\u006f\u0072\u0067/\u0073\u0063\u0068\u0065\u006da\u004c\u0069\u0062\u0072\u0061\u0072\u0079\u002f\u0032\u0030\u0030\u0036\u002f\u006d\u0061\u0069\u006e"});start .Attr =append (start .Attr ,_b .Attr {Name :_b .Name {Local :"\u0078\u006d\u006c\u006e\u0073\u003a\u006d\u0061"},Value :"\u0068\u0074\u0074\u0070:\u002f\u002f\u0073\u0063\u0068\u0065\u006d\u0061\u0073.\u006f\u0070\u0065\u006e\u0078\u006d\u006c\u0066\u006f\u0072\u006d\u0061\u0074\u0073\u002e\u006f\u0072\u0067/\u0073\u0063\u0068\u0065\u006da\u004c\u0069\u0062\u0072\u0061\u0072\u0079\u002f\u0032\u0030\u0030\u0036\u002f\u006d\u0061\u0069\u006e"});start .Attr =append (start .Attr ,_b .Attr {Name :_b .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 ="\u006d\u0061:\u0073\u0063\u0068e\u006d\u0061\u004c\u0069\u0062\u0072\u0061\u0072\u0079";return _fbf .CT_SchemaLibrary .MarshalXML (e ,start );};
// Validate validates the CT_SchemaLibrary and its children
func (_ea *CT_SchemaLibrary )Validate ()error {return _ea .ValidateWithPath ("\u0043\u0054_\u0053\u0063\u0068e\u006d\u0061\u004c\u0069\u0062\u0072\u0061\u0072\u0079");};
// ValidateWithPath validates the CT_Schema and its children, prefixing error messages with path
func (_ca *CT_Schema )ValidateWithPath (path string )error {return nil };
// ValidateWithPath validates the SchemaLibrary and its children, prefixing error messages with path
func (_cdb *SchemaLibrary )ValidateWithPath (path string )error {if _fgb :=_cdb .CT_SchemaLibrary .ValidateWithPath (path );_fgb !=nil {return _fgb ;};return nil ;};
func (_ggf *SchemaLibrary )ValidateWithPath (path string )error {if _bb :=_ggf .CT_SchemaLibrary .ValidateWithPath (path );_bb !=nil {return _bb ;};return nil ;};
// ValidateWithPath validates the CT_SchemaLibrary and its children, prefixing error messages with path
func (_gab *CT_SchemaLibrary )ValidateWithPath (path string )error {for _cea ,_ceb :=range _gab .Schema {if _aa :=_ceb .ValidateWithPath (_e .Sprintf ("\u0025\u0073\u002f\u0053\u0063\u0068\u0065\u006d\u0061\u005b\u0025\u0064\u005d",path ,_cea ));_aa !=nil {return _aa ;};};return nil ;};type SchemaLibrary struct{CT_SchemaLibrary };func (_dg *SchemaLibrary )MarshalXML (e *_c .Encoder ,start _c .StartElement )error {start .Attr =append (start .Attr ,_c .Attr {Name :_c .Name {Local :"\u0078\u006d\u006cn\u0073"},Value :"\u0068\u0074\u0074\u0070:\u002f\u002f\u0073\u0063\u0068\u0065\u006d\u0061\u0073.\u006f\u0070\u0065\u006e\u0078\u006d\u006c\u0066\u006f\u0072\u006d\u0061\u0074\u0073\u002e\u006f\u0072\u0067/\u0073\u0063\u0068\u0065\u006da\u004c\u0069\u0062\u0072\u0061\u0072\u0079\u002f\u0032\u0030\u0030\u0036\u002f\u006d\u0061\u0069\u006e"});start .Attr =append (start .Attr ,_c .Attr {Name :_c .Name {Local :"\u0078\u006d\u006c\u006e\u0073\u003a\u006d\u0061"},Value :"\u0068\u0074\u0074\u0070:\u002f\u002f\u0073\u0063\u0068\u0065\u006d\u0061\u0073.\u006f\u0070\u0065\u006e\u0078\u006d\u006c\u0066\u006f\u0072\u006d\u0061\u0074\u0073\u002e\u006f\u0072\u0067/\u0073\u0063\u0068\u0065\u006da\u004c\u0069\u0062\u0072\u0061\u0072\u0079\u002f\u0032\u0030\u0030\u0036\u002f\u006d\u0061\u0069\u006e"});start .Attr =append (start .Attr ,_c .Attr {Name :_c .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 ="\u006d\u0061:\u0073\u0063\u0068e\u006d\u0061\u004c\u0069\u0062\u0072\u0061\u0072\u0079";return _dg .CT_SchemaLibrary .MarshalXML (e ,start );};func NewSchemaLibrary ()*SchemaLibrary {_cfe :=&SchemaLibrary {};_cfe .CT_SchemaLibrary =*NewCT_SchemaLibrary ();return _cfe ;};func init (){_ea .RegisterConstructor ("\u0068\u0074\u0074\u0070:\u002f\u002f\u0073\u0063\u0068\u0065\u006d\u0061\u0073.\u006f\u0070\u0065\u006e\u0078\u006d\u006c\u0066\u006f\u0072\u006d\u0061\u0074\u0073\u002e\u006f\u0072\u0067/\u0073\u0063\u0068\u0065\u006da\u004c\u0069\u0062\u0072\u0061\u0072\u0079\u002f\u0032\u0030\u0030\u0036\u002f\u006d\u0061\u0069\u006e","\u0043T\u005f\u0053\u0063\u0068\u0065\u006da",NewCT_Schema );_ea .RegisterConstructor ("\u0068\u0074\u0074\u0070:\u002f\u002f\u0073\u0063\u0068\u0065\u006d\u0061\u0073.\u006f\u0070\u0065\u006e\u0078\u006d\u006c\u0066\u006f\u0072\u006d\u0061\u0074\u0073\u002e\u006f\u0072\u0067/\u0073\u0063\u0068\u0065\u006da\u004c\u0069\u0062\u0072\u0061\u0072\u0079\u002f\u0032\u0030\u0030\u0036\u002f\u006d\u0061\u0069\u006e","\u0043\u0054_\u0053\u0063\u0068e\u006d\u0061\u004c\u0069\u0062\u0072\u0061\u0072\u0079",NewCT_SchemaLibrary );_ea .RegisterConstructor ("\u0068\u0074\u0074\u0070:\u002f\u002f\u0073\u0063\u0068\u0065\u006d\u0061\u0073.\u006f\u0070\u0065\u006e\u0078\u006d\u006c\u0066\u006f\u0072\u006d\u0061\u0074\u0073\u002e\u006f\u0072\u0067/\u0073\u0063\u0068\u0065\u006da\u004c\u0069\u0062\u0072\u0061\u0072\u0079\u002f\u0032\u0030\u0030\u0036\u002f\u006d\u0061\u0069\u006e","\u0073\u0063\u0068\u0065\u006d\u0061\u004c\u0069\u0062\u0072\u0061\u0072\u0079",NewSchemaLibrary );};
func (_fb *CT_SchemaLibrary )ValidateWithPath (path string )error {for _ec ,_aff :=range _fb .Schema {if _aca :=_aff .ValidateWithPath (_c .Sprintf ("\u0025\u0073\u002f\u0053\u0063\u0068\u0065\u006d\u0061\u005b\u0025\u0064\u005d",path ,_ec ));_aca !=nil {return _aca ;};};return nil ;};func (_cabd *SchemaLibrary )UnmarshalXML (d *_b .Decoder ,start _b .StartElement )error {_cabd .CT_SchemaLibrary =*NewCT_SchemaLibrary ();_fba :for {_cfc ,_ee :=d .Token ();if _ee !=nil {return _ee ;};switch _gb :=_cfc .(type ){case _b .StartElement :switch _gb .Name {case _b .Name {Space :"\u0068\u0074\u0074\u0070:\u002f\u002f\u0073\u0063\u0068\u0065\u006d\u0061\u0073.\u006f\u0070\u0065\u006e\u0078\u006d\u006c\u0066\u006f\u0072\u006d\u0061\u0074\u0073\u002e\u006f\u0072\u0067/\u0073\u0063\u0068\u0065\u006da\u004c\u0069\u0062\u0072\u0061\u0072\u0079\u002f\u0032\u0030\u0030\u0036\u002f\u006d\u0061\u0069\u006e",Local :"\u0073\u0063\u0068\u0065\u006d\u0061"}:_eb :=NewCT_Schema ();if _cg :=d .DecodeElement (_eb ,&_gb );_cg !=nil {return _cg ;};_cabd .Schema =append (_cabd .Schema ,_eb );default:_a .Log ("\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\u0053\u0063\u0068\u0065m\u0061\u004c\u0069\u0062\u0072\u0061\u0072\u0079 \u0025\u0076",_gb .Name );if _ga :=d .Skip ();_ga !=nil {return _ga ;};};case _b .EndElement :break _fba ;case _b .CharData :};};return nil ;};func (_g *CT_Schema )MarshalXML (e *_b .Encoder ,start _b .StartElement )error {if _g .UriAttr !=nil {start .Attr =append (start .Attr ,_b .Attr {Name :_b .Name {Local :"\u006d\u0061\u003a\u0075\u0072\u0069"},Value :_c .Sprintf ("\u0025\u0076",*_g .UriAttr )});};if _g .ManifestLocationAttr !=nil {start .Attr =append (start .Attr ,_b .Attr {Name :_b .Name {Local :"\u006d\u0061\u003a\u006dan\u0069\u0066\u0065\u0073\u0074\u004c\u006f\u0063\u0061\u0074\u0069\u006f\u006e"},Value :_c .Sprintf ("\u0025\u0076",*_g .ManifestLocationAttr )});};if _g .SchemaLocationAttr !=nil {start .Attr =append (start .Attr ,_b .Attr {Name :_b .Name {Local :"\u006d\u0061\u003a\u0073\u0063\u0068\u0065\u006d\u0061\u004c\u006f\u0063a\u0074\u0069\u006f\u006e"},Value :_c .Sprintf ("\u0025\u0076",*_g .SchemaLocationAttr )});};if _g .SchemaLanguageAttr !=nil {start .Attr =append (start .Attr ,_b .Attr {Name :_b .Name {Local :"\u006d\u0061\u003a\u0073\u0063\u0068\u0065\u006d\u0061\u004c\u0061\u006eg\u0075\u0061\u0067\u0065"},Value :_c .Sprintf ("\u0025\u0076",*_g .SchemaLanguageAttr )});};e .EncodeToken (start );e .EncodeToken (_b .EndElement {Name :start .Name });return nil ;};type CT_SchemaLibrary struct{Schema []*CT_Schema ;};func (_dc *CT_SchemaLibrary )MarshalXML (e *_b .Encoder ,start _b .StartElement )error {e .EncodeToken (start );if _dc .Schema !=nil {_cd :=_b .StartElement {Name :_b .Name {Local :"\u006da\u003a\u0073\u0063\u0068\u0065\u006da"}};for _ ,_efe :=range _dc .Schema {e .EncodeElement (_efe ,_cd );};};e .EncodeToken (_b .EndElement {Name :start .Name });return nil ;};type CT_Schema struct{UriAttr *string ;ManifestLocationAttr *string ;SchemaLocationAttr *string ;SchemaLanguageAttr *string ;};func init (){_a .RegisterConstructor ("\u0068\u0074\u0074\u0070:\u002f\u002f\u0073\u0063\u0068\u0065\u006d\u0061\u0073.\u006f\u0070\u0065\u006e\u0078\u006d\u006c\u0066\u006f\u0072\u006d\u0061\u0074\u0073\u002e\u006f\u0072\u0067/\u0073\u0063\u0068\u0065\u006da\u004c\u0069\u0062\u0072\u0061\u0072\u0079\u002f\u0032\u0030\u0030\u0036\u002f\u006d\u0061\u0069\u006e","\u0043T\u005f\u0053\u0063\u0068\u0065\u006da",NewCT_Schema );_a .RegisterConstructor ("\u0068\u0074\u0074\u0070:\u002f\u002f\u0073\u0063\u0068\u0065\u006d\u0061\u0073.\u006f\u0070\u0065\u006e\u0078\u006d\u006c\u0066\u006f\u0072\u006d\u0061\u0074\u0073\u002e\u006f\u0072\u0067/\u0073\u0063\u0068\u0065\u006da\u004c\u0069\u0062\u0072\u0061\u0072\u0079\u002f\u0032\u0030\u0030\u0036\u002f\u006d\u0061\u0069\u006e","\u0043\u0054_\u0053\u0063\u0068e\u006d\u0061\u004c\u0069\u0062\u0072\u0061\u0072\u0079",NewCT_SchemaLibrary );_a .RegisterConstructor ("\u0068\u0074\u0074\u0070:\u002f\u002f\u0073\u0063\u0068\u0065\u006d\u0061\u0073.\u006f\u0070\u0065\u006e\u0078\u006d\u006c\u0066\u006f\u0072\u006d\u0061\u0074\u0073\u002e\u006f\u0072\u0067/\u0073\u0063\u0068\u0065\u006da\u004c\u0069\u0062\u0072\u0061\u0072\u0079\u002f\u0032\u0030\u0030\u0036\u002f\u006d\u0061\u0069\u006e","\u0073\u0063\u0068\u0065\u006d\u0061\u004c\u0069\u0062\u0072\u0061\u0072\u0079",NewSchemaLibrary );};

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -9,28 +9,28 @@
// 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 powerpoint ;import (_a "encoding/xml";_c "fmt";_f "github.com/unidoc/unioffice";);func (_ca *Iscomment )MarshalXML (e *_a .Encoder ,start _a .StartElement )error {start .Attr =append (start .Attr ,_a .Attr {Name :_a .Name {Local :"\u0078\u006d\u006cn\u0073"},Value :"\u0075\u0072\u006e\u003a\u0073\u0063\u0068e\u006d\u0061\u0073-\u006d\u0069\u0063\u0072o\u0073\u006f\u0066\u0074\u002d\u0063\u006f\u006d\u003a\u006f\u0066\u0066\u0069\u0063\u0065\u003a\u0070\u006f\u0077\u0065\u0072\u0070\u006f\u0069\u006e\u0074"});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 ="\u0069s\u0063\u006f\u006d\u006d\u0065\u006et";return _ca .CT_Empty .MarshalXML (e ,start );};func (_e *CT_Empty )MarshalXML (e *_a .Encoder ,start _a .StartElement )error {e .EncodeToken (start );e .EncodeToken (_a .EndElement {Name :start .Name });return nil ;};
package powerpoint ;import (_d "encoding/xml";_a "fmt";_f "github.com/unidoc/unioffice";);
// ValidateWithPath validates the CT_Empty and its children, prefixing error messages with path
func (_eb *CT_Empty )ValidateWithPath (path string )error {return nil };func NewCT_Rel ()*CT_Rel {_bd :=&CT_Rel {};return _bd };func (_cee *Textdata )UnmarshalXML (d *_a .Decoder ,start _a .StartElement )error {_cee .CT_Rel =*NewCT_Rel ();for _ ,_aec :=range start .Attr {if _aec .Name .Local =="\u0069\u0064"{_fc ,_bbd :=_aec .Value ,error (nil );if _bbd !=nil {return _bbd ;};_cee .IdAttr =&_fc ;continue ;};};for {_gcg ,_eee :=d .Token ();if _eee !=nil {return _c .Errorf ("p\u0061r\u0073\u0069\u006e\u0067\u0020\u0054\u0065\u0078t\u0064\u0061\u0074\u0061: \u0025\u0073",_eee );};if _ccc ,_ea :=_gcg .(_a .EndElement );_ea &&_ccc .Name ==start .Name {break ;};};return nil ;};func NewCT_Empty ()*CT_Empty {_b :=&CT_Empty {};return _b };
// ValidateWithPath validates the CT_Rel and its children, prefixing error messages with path
func (_ff *CT_Rel )ValidateWithPath (path string )error {return nil };func NewIscomment ()*Iscomment {_da :=&Iscomment {};_da .CT_Empty =*NewCT_Empty ();return _da };
// Validate validates the CT_Rel and its children
func (_ag *CT_Rel )Validate ()error {return _ag .ValidateWithPath ("\u0043\u0054\u005f\u0052\u0065\u006c");};func NewTextdata ()*Textdata {_gg :=&Textdata {};_gg .CT_Rel =*NewCT_Rel ();return _gg };
// Validate validates the Iscomment and its children
func (_ef *Iscomment )Validate ()error {return _ef .ValidateWithPath ("\u0049s\u0063\u006f\u006d\u006d\u0065\u006et");};
// Validate validates the Textdata and its children
func (_eba *Textdata )Validate ()error {return _eba .ValidateWithPath ("\u0054\u0065\u0078\u0074\u0064\u0061\u0074\u0061");};func (_ee *CT_Rel )MarshalXML (e *_a .Encoder ,start _a .StartElement )error {if _ee .IdAttr !=nil {start .Attr =append (start .Attr ,_a .Attr {Name :_a .Name {Local :"\u0069\u0064"},Value :_c .Sprintf ("\u0025\u0076",*_ee .IdAttr )});};e .EncodeToken (start );e .EncodeToken (_a .EndElement {Name :start .Name });return nil ;};
// ValidateWithPath validates the Textdata and its children, prefixing error messages with path
func (_fd *Textdata )ValidateWithPath (path string )error {if _dg :=_fd .CT_Rel .ValidateWithPath (path );_dg !=nil {return _dg ;};return nil ;};func (_eg *CT_Empty )UnmarshalXML (d *_a .Decoder ,start _a .StartElement )error {for {_fa ,_d :=d .Token ();if _d !=nil {return _c .Errorf ("p\u0061r\u0073\u0069\u006e\u0067\u0020\u0043\u0054\u005fE\u006d\u0070\u0074\u0079: \u0025\u0073",_d );};if _af ,_ab :=_fa .(_a .EndElement );_ab &&_af .Name ==start .Name {break ;};};return nil ;};type CT_Empty struct{};func (_ae *CT_Rel )UnmarshalXML (d *_a .Decoder ,start _a .StartElement )error {for _ ,_bfe :=range start .Attr {if _bfe .Name .Local =="\u0069\u0064"{_fbc ,_gc :=_bfe .Value ,error (nil );if _gc !=nil {return _gc ;};_ae .IdAttr =&_fbc ;continue ;};};for {_ed ,_bg :=d .Token ();if _bg !=nil {return _c .Errorf ("\u0070a\u0072s\u0069\u006e\u0067\u0020\u0043T\u005f\u0052e\u006c\u003a\u0020\u0025\u0073",_bg );};if _aa ,_cf :=_ed .(_a .EndElement );_cf &&_aa .Name ==start .Name {break ;};};return nil ;};
func (_ef *CT_Empty )ValidateWithPath (path string )error {return nil };type Iscomment struct{CT_Empty };func (_bf *Iscomment )MarshalXML (e *_d .Encoder ,start _d .StartElement )error {start .Attr =append (start .Attr ,_d .Attr {Name :_d .Name {Local :"\u0078\u006d\u006cn\u0073"},Value :"\u0075\u0072\u006e\u003a\u0073\u0063\u0068e\u006d\u0061\u0073-\u006d\u0069\u0063\u0072o\u0073\u006f\u0066\u0074\u002d\u0063\u006f\u006d\u003a\u006f\u0066\u0066\u0069\u0063\u0065\u003a\u0070\u006f\u0077\u0065\u0072\u0070\u006f\u0069\u006e\u0074"});start .Attr =append (start .Attr ,_d .Attr {Name :_d .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 ="\u0069s\u0063\u006f\u006d\u006d\u0065\u006et";return _bf .CT_Empty .MarshalXML (e ,start );};func NewCT_Empty ()*CT_Empty {_ag :=&CT_Empty {};return _ag };func (_efc *CT_Rel )MarshalXML (e *_d .Encoder ,start _d .StartElement )error {if _efc .IdAttr !=nil {start .Attr =append (start .Attr ,_d .Attr {Name :_d .Name {Local :"\u0069\u0064"},Value :_a .Sprintf ("\u0025\u0076",*_efc .IdAttr )});};e .EncodeToken (start );e .EncodeToken (_d .EndElement {Name :start .Name });return nil ;};
// ValidateWithPath validates the Iscomment and its children, prefixing error messages with path
func (_bb *Iscomment )ValidateWithPath (path string )error {if _be :=_bb .CT_Empty .ValidateWithPath (path );_be !=nil {return _be ;};return nil ;};func (_bfb *Iscomment )UnmarshalXML (d *_a .Decoder ,start _a .StartElement )error {_bfb .CT_Empty =*NewCT_Empty ();for {_aad ,_ba :=d .Token ();if _ba !=nil {return _c .Errorf ("p\u0061\u0072\u0073\u0069ng\u0020I\u0073\u0063\u006f\u006d\u006de\u006e\u0074\u003a\u0020\u0025\u0073",_ba );};if _df ,_cc :=_aad .(_a .EndElement );_cc &&_df .Name ==start .Name {break ;};};return nil ;};type Textdata struct{CT_Rel };
func (_bfa *Iscomment )ValidateWithPath (path string )error {if _bbc :=_bfa .CT_Empty .ValidateWithPath (path );_bbc !=nil {return _bbc ;};return nil ;};
// ValidateWithPath validates the Textdata and its children, prefixing error messages with path
func (_def *Textdata )ValidateWithPath (path string )error {if _fc :=_def .CT_Rel .ValidateWithPath (path );_fc !=nil {return _fc ;};return nil ;};type Textdata struct{CT_Rel };type CT_Empty struct{};func (_db *Iscomment )UnmarshalXML (d *_d .Decoder ,start _d .StartElement )error {_db .CT_Empty =*NewCT_Empty ();for {_fb ,_ce :=d .Token ();if _ce !=nil {return _a .Errorf ("p\u0061\u0072\u0073\u0069ng\u0020I\u0073\u0063\u006f\u006d\u006de\u006e\u0074\u003a\u0020\u0025\u0073",_ce );};if _agg ,_de :=_fb .(_d .EndElement );_de &&_agg .Name ==start .Name {break ;};};return nil ;};
// Validate validates the Iscomment and its children
func (_df *Iscomment )Validate ()error {return _df .ValidateWithPath ("\u0049s\u0063\u006f\u006d\u006d\u0065\u006et");};type CT_Rel struct{IdAttr *string ;};func (_ad *CT_Empty )MarshalXML (e *_d .Encoder ,start _d .StartElement )error {e .EncodeToken (start );e .EncodeToken (_d .EndElement {Name :start .Name });return nil ;};func (_c *CT_Empty )UnmarshalXML (d *_d .Decoder ,start _d .StartElement )error {for {_b ,_cb :=d .Token ();if _cb !=nil {return _a .Errorf ("p\u0061r\u0073\u0069\u006e\u0067\u0020\u0043\u0054\u005fE\u006d\u0070\u0074\u0079: \u0025\u0073",_cb );};if _e ,_eg :=_b .(_d .EndElement );_eg &&_e .Name ==start .Name {break ;};};return nil ;};func NewTextdata ()*Textdata {_ccb :=&Textdata {};_ccb .CT_Rel =*NewCT_Rel ();return _ccb };func (_ec *CT_Rel )UnmarshalXML (d *_d .Decoder ,start _d .StartElement )error {for _ ,_gf :=range start .Attr {if _gf .Name .Local =="\u0069\u0064"{_ae ,_ca :=_gf .Value ,error (nil );if _ca !=nil {return _ca ;};_ec .IdAttr =&_ae ;continue ;};};for {_dc ,_cf :=d .Token ();if _cf !=nil {return _a .Errorf ("\u0070a\u0072s\u0069\u006e\u0067\u0020\u0043T\u005f\u0052e\u006c\u003a\u0020\u0025\u0073",_cf );};if _cc ,_bg :=_dc .(_d .EndElement );_bg &&_cc .Name ==start .Name {break ;};};return nil ;};func NewCT_Rel ()*CT_Rel {_eb :=&CT_Rel {};return _eb };func (_bbg *Textdata )MarshalXML (e *_d .Encoder ,start _d .StartElement )error {start .Attr =append (start .Attr ,_d .Attr {Name :_d .Name {Local :"\u0078\u006d\u006cn\u0073"},Value :"\u0075\u0072\u006e\u003a\u0073\u0063\u0068e\u006d\u0061\u0073-\u006d\u0069\u0063\u0072o\u0073\u006f\u0066\u0074\u002d\u0063\u006f\u006d\u003a\u006f\u0066\u0066\u0069\u0063\u0065\u003a\u0070\u006f\u0077\u0065\u0072\u0070\u006f\u0069\u006e\u0074"});start .Attr =append (start .Attr ,_d .Attr {Name :_d .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 ="\u0074\u0065\u0078\u0074\u0064\u0061\u0074\u0061";return _bbg .CT_Rel .MarshalXML (e ,start );};func NewIscomment ()*Iscomment {_dg :=&Iscomment {};_dg .CT_Empty =*NewCT_Empty ();return _dg };
// ValidateWithPath validates the CT_Rel and its children, prefixing error messages with path
func (_efcg *CT_Rel )ValidateWithPath (path string )error {return nil };func (_ea *Textdata )UnmarshalXML (d *_d .Decoder ,start _d .StartElement )error {_ea .CT_Rel =*NewCT_Rel ();for _ ,_fgf :=range start .Attr {if _fgf .Name .Local =="\u0069\u0064"{_ba ,_ge :=_fgf .Value ,error (nil );if _ge !=nil {return _ge ;};_ea .IdAttr =&_ba ;continue ;};};for {_fe ,_be :=d .Token ();if _be !=nil {return _a .Errorf ("p\u0061r\u0073\u0069\u006e\u0067\u0020\u0054\u0065\u0078t\u0064\u0061\u0074\u0061: \u0025\u0073",_be );};if _dfc ,_fa :=_fe .(_d .EndElement );_fa &&_dfc .Name ==start .Name {break ;};};return nil ;};
// Validate validates the Textdata and its children
func (_geb *Textdata )Validate ()error {return _geb .ValidateWithPath ("\u0054\u0065\u0078\u0074\u0064\u0061\u0074\u0061");};
// Validate validates the CT_Rel and its children
func (_fg *CT_Rel )Validate ()error {return _fg .ValidateWithPath ("\u0043\u0054\u005f\u0052\u0065\u006c");};
// Validate validates the CT_Empty and its children
func (_bf *CT_Empty )Validate ()error {return _bf .ValidateWithPath ("\u0043\u0054\u005f\u0045\u006d\u0070\u0074\u0079");};type Iscomment struct{CT_Empty };type CT_Rel struct{IdAttr *string ;};func (_ce *Textdata )MarshalXML (e *_a .Encoder ,start _a .StartElement )error {start .Attr =append (start .Attr ,_a .Attr {Name :_a .Name {Local :"\u0078\u006d\u006cn\u0073"},Value :"\u0075\u0072\u006e\u003a\u0073\u0063\u0068e\u006d\u0061\u0073-\u006d\u0069\u0063\u0072o\u0073\u006f\u0066\u0074\u002d\u0063\u006f\u006d\u003a\u006f\u0066\u0066\u0069\u0063\u0065\u003a\u0070\u006f\u0077\u0065\u0072\u0070\u006f\u0069\u006e\u0074"});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 ="\u0074\u0065\u0078\u0074\u0064\u0061\u0074\u0061";return _ce .CT_Rel .MarshalXML (e ,start );};func init (){_f .RegisterConstructor ("\u0075\u0072\u006e\u003a\u0073\u0063\u0068e\u006d\u0061\u0073-\u006d\u0069\u0063\u0072o\u0073\u006f\u0066\u0074\u002d\u0063\u006f\u006d\u003a\u006f\u0066\u0066\u0069\u0063\u0065\u003a\u0070\u006f\u0077\u0065\u0072\u0070\u006f\u0069\u006e\u0074","\u0043\u0054\u005f\u0045\u006d\u0070\u0074\u0079",NewCT_Empty );_f .RegisterConstructor ("\u0075\u0072\u006e\u003a\u0073\u0063\u0068e\u006d\u0061\u0073-\u006d\u0069\u0063\u0072o\u0073\u006f\u0066\u0074\u002d\u0063\u006f\u006d\u003a\u006f\u0066\u0066\u0069\u0063\u0065\u003a\u0070\u006f\u0077\u0065\u0072\u0070\u006f\u0069\u006e\u0074","\u0043\u0054\u005f\u0052\u0065\u006c",NewCT_Rel );_f .RegisterConstructor ("\u0075\u0072\u006e\u003a\u0073\u0063\u0068e\u006d\u0061\u0073-\u006d\u0069\u0063\u0072o\u0073\u006f\u0066\u0074\u002d\u0063\u006f\u006d\u003a\u006f\u0066\u0066\u0069\u0063\u0065\u003a\u0070\u006f\u0077\u0065\u0072\u0070\u006f\u0069\u006e\u0074","\u0069s\u0063\u006f\u006d\u006d\u0065\u006et",NewIscomment );_f .RegisterConstructor ("\u0075\u0072\u006e\u003a\u0073\u0063\u0068e\u006d\u0061\u0073-\u006d\u0069\u0063\u0072o\u0073\u006f\u0066\u0074\u002d\u0063\u006f\u006d\u003a\u006f\u0066\u0066\u0069\u0063\u0065\u003a\u0070\u006f\u0077\u0065\u0072\u0070\u006f\u0069\u006e\u0074","\u0074\u0065\u0078\u0074\u0064\u0061\u0074\u0061",NewTextdata );};
func (_bc *CT_Empty )Validate ()error {return _bc .ValidateWithPath ("\u0043\u0054\u005f\u0045\u006d\u0070\u0074\u0079");};func init (){_f .RegisterConstructor ("\u0075\u0072\u006e\u003a\u0073\u0063\u0068e\u006d\u0061\u0073-\u006d\u0069\u0063\u0072o\u0073\u006f\u0066\u0074\u002d\u0063\u006f\u006d\u003a\u006f\u0066\u0066\u0069\u0063\u0065\u003a\u0070\u006f\u0077\u0065\u0072\u0070\u006f\u0069\u006e\u0074","\u0043\u0054\u005f\u0045\u006d\u0070\u0074\u0079",NewCT_Empty );_f .RegisterConstructor ("\u0075\u0072\u006e\u003a\u0073\u0063\u0068e\u006d\u0061\u0073-\u006d\u0069\u0063\u0072o\u0073\u006f\u0066\u0074\u002d\u0063\u006f\u006d\u003a\u006f\u0066\u0066\u0069\u0063\u0065\u003a\u0070\u006f\u0077\u0065\u0072\u0070\u006f\u0069\u006e\u0074","\u0043\u0054\u005f\u0052\u0065\u006c",NewCT_Rel );_f .RegisterConstructor ("\u0075\u0072\u006e\u003a\u0073\u0063\u0068e\u006d\u0061\u0073-\u006d\u0069\u0063\u0072o\u0073\u006f\u0066\u0074\u002d\u0063\u006f\u006d\u003a\u006f\u0066\u0066\u0069\u0063\u0065\u003a\u0070\u006f\u0077\u0065\u0072\u0070\u006f\u0069\u006e\u0074","\u0069s\u0063\u006f\u006d\u006d\u0065\u006et",NewIscomment );_f .RegisterConstructor ("\u0075\u0072\u006e\u003a\u0073\u0063\u0068e\u006d\u0061\u0073-\u006d\u0069\u0063\u0072o\u0073\u006f\u0066\u0074\u002d\u0063\u006f\u006d\u003a\u006f\u0066\u0066\u0069\u0063\u0065\u003a\u0070\u006f\u0077\u0065\u0072\u0070\u006f\u0069\u006e\u0074","\u0074\u0065\u0078\u0074\u0064\u0061\u0074\u0061",NewTextdata );};

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -9,46 +9,46 @@
// 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 reference ;import (_ed "errors";_g "fmt";_ge "github.com/unidoc/unioffice/spreadsheet/update";_ee "regexp";_b "strconv";_ea "strings";);
// String returns a string representation of CellReference.
func (_f CellReference )String ()string {_ef :=make ([]byte ,0,4);if _f .AbsoluteColumn {_ef =append (_ef ,'$');};_ef =append (_ef ,_f .Column ...);if _f .AbsoluteRow {_ef =append (_ef ,'$');};_ef =_b .AppendInt (_ef ,int64 (_f .RowIdx ),10);return string (_ef );};
// ParseColumnRangeReference splits a range reference of the form "A:B" into its
// components.
func ParseColumnRangeReference (s string )(_acb ,_gbf ColumnReference ,_ca error ){_aee :="";_cbd :=_ea .Split (s ,"\u0021");if len (_cbd )==2{_aee =_cbd [0];s =_cbd [1];};_bbc :=_ea .Split (s ,"\u003a");if len (_bbc )!=2{return ColumnReference {},ColumnReference {},_ed .New ("i\u006ev\u0061\u006c\u0069\u0064\u0020\u0072\u0061\u006eg\u0065\u0020\u0066\u006frm\u0061\u0074");};if _aee !=""{_bbc [0]=_aee +"\u0021"+_bbc [0];_bbc [1]=_aee +"\u0021"+_bbc [1];};_eed ,_ca :=ParseColumnReference (_bbc [0]);if _ca !=nil {return ColumnReference {},ColumnReference {},_ca ;};_edg ,_ca :=ParseColumnReference (_bbc [1]);if _ca !=nil {return ColumnReference {},ColumnReference {},_ca ;};return _eed ,_edg ,nil ;};func _fbe (_acc string )(string ,string ,error ){_geg :="";_ecc :=_ea .LastIndex (_acc ,"\u0021");if _ecc > -1{_geg =_acc [:_ecc ];_acc =_acc [_ecc +1:];if _geg ==""{return "","",_ed .New ("\u0049n\u0076a\u006c\u0069\u0064\u0020\u0073h\u0065\u0065t\u0020\u006e\u0061\u006d\u0065");};};return _geg ,_acc ,nil ;};
package reference ;import (_b "errors";_e "fmt";_f "github.com/unidoc/unioffice/spreadsheet/update";_cc "regexp";_d "strconv";_bb "strings";);
// ParseCellReference parses a cell reference of the form 'A10' and splits it
// into column/row segments.
func ParseCellReference (s string )(CellReference ,error ){s =_ea .TrimSpace (s );if len (s )< 2{return CellReference {},_ed .New ("\u0063\u0065\u006c\u006c\u0020\u0072\u0065\u0066e\u0072\u0065\u006ece\u0020\u006d\u0075\u0073\u0074\u0020h\u0061\u0076\u0065\u0020\u0061\u0074\u0020\u006c\u0065\u0061\u0073\u0074\u0020\u0074\u0077o\u0020\u0063\u0068\u0061\u0072\u0061\u0063\u0074e\u0072\u0073");};_c :=CellReference {};_cb ,_fa ,_gb :=_fbe (s );if _gb !=nil {return CellReference {},_gb ;};if _cb !=""{_c .SheetName =_cb ;};if s [0]=='$'{_c .AbsoluteColumn =true ;_fa =_fa [1:];};_fd :=-1;_cba :for _efb :=0;_efb < len (_fa );_efb ++{switch {case _fa [_efb ]>='0'&&_fa [_efb ]<='9'||_fa [_efb ]=='$':_fd =_efb ;break _cba ;};};switch _fd {case 0:return CellReference {},_g .Errorf ("\u006e\u006f\u0020\u006cet\u0074\u0065\u0072\u0020\u0070\u0072\u0065\u0066\u0069\u0078\u0020\u0069\u006e\u0020%\u0073",_fa );case -1:return CellReference {},_g .Errorf ("\u006eo\u0020d\u0069\u0067\u0069\u0074\u0073\u0020\u0069\u006e\u0020\u0025\u0073",_fa );};_c .Column =_fa [0:_fd ];if _fa [_fd ]=='$'{_c .AbsoluteRow =true ;_fd ++;};_c .ColumnIdx =ColumnToIndex (_c .Column );_eg ,_gb :=_b .ParseUint (_fa [_fd :],10,32);if _gb !=nil {return CellReference {},_g .Errorf ("e\u0072\u0072\u006f\u0072 p\u0061r\u0073\u0069\u006e\u0067\u0020r\u006f\u0077\u003a\u0020\u0025\u0073",_gb );};if _eg ==0{return CellReference {},_g .Errorf ("\u0065\u0072\u0072\u006f\u0072\u0020\u0070\u0061\u0072\u0073i\u006e\u0067\u0020\u0072\u006f\u0077\u003a \u0063\u0061\u006e\u006e\u006f\u0074\u0020\u0062\u0065\u0020\u0030");};_c .RowIdx =uint32 (_eg );return _c ,nil ;};
func ParseCellReference (s string )(CellReference ,error ){s =_bb .TrimSpace (s );if len (s )< 2{return CellReference {},_b .New ("\u0063\u0065\u006c\u006c\u0020\u0072\u0065\u0066e\u0072\u0065\u006ece\u0020\u006d\u0075\u0073\u0074\u0020h\u0061\u0076\u0065\u0020\u0061\u0074\u0020\u006c\u0065\u0061\u0073\u0074\u0020\u0074\u0077o\u0020\u0063\u0068\u0061\u0072\u0061\u0063\u0074e\u0072\u0073");};_ed :=CellReference {};_ec ,_cb ,_bd :=_bce (s );if _bd !=nil {return CellReference {},_bd ;};if _ec !=""{_ed .SheetName =_ec ;};if s [0]=='$'{_ed .AbsoluteColumn =true ;_cb =_cb [1:];};_cd :=-1;_dd :for _a :=0;_a < len (_cb );_a ++{switch {case _cb [_a ]>='0'&&_cb [_a ]<='9'||_cb [_a ]=='$':_cd =_a ;break _dd ;};};switch _cd {case 0:return CellReference {},_e .Errorf ("\u006e\u006f\u0020\u006cet\u0074\u0065\u0072\u0020\u0070\u0072\u0065\u0066\u0069\u0078\u0020\u0069\u006e\u0020%\u0073",_cb );case -1:return CellReference {},_e .Errorf ("\u006eo\u0020d\u0069\u0067\u0069\u0074\u0073\u0020\u0069\u006e\u0020\u0025\u0073",_cb );};_ed .Column =_cb [0:_cd ];if _cb [_cd ]=='$'{_ed .AbsoluteRow =true ;_cd ++;};_ed .ColumnIdx =ColumnToIndex (_ed .Column );_cg ,_bd :=_d .ParseUint (_cb [_cd :],10,32);if _bd !=nil {return CellReference {},_e .Errorf ("e\u0072\u0072\u006f\u0072 p\u0061r\u0073\u0069\u006e\u0067\u0020r\u006f\u0077\u003a\u0020\u0025\u0073",_bd );};if _cg ==0{return CellReference {},_e .Errorf ("\u0065\u0072\u0072\u006f\u0072\u0020\u0070\u0061\u0072\u0073i\u006e\u0067\u0020\u0072\u006f\u0077\u003a \u0063\u0061\u006e\u006e\u006f\u0074\u0020\u0062\u0065\u0020\u0030");};_ed .RowIdx =uint32 (_cg );return _ed ,nil ;};
// Update updates reference to point one of the neighboring cells with respect to the update type after removing a row/column.
func (_gbe *CellReference )Update (updateType _ge .UpdateAction )*CellReference {switch updateType {case _ge .UpdateActionRemoveColumn :_d :=_gbe ;_d .ColumnIdx =_gbe .ColumnIdx -1;_d .Column =IndexToColumn (_d .ColumnIdx );return _d ;default:return _gbe ;};};
// Update updates reference to point one of the neighboring columns with respect to the update type after removing a row/column.
func (_cc *ColumnReference )Update (updateType _ge .UpdateAction )*ColumnReference {switch updateType {case _ge .UpdateActionRemoveColumn :_aa :=_cc ;_aa .ColumnIdx =_cc .ColumnIdx -1;_aa .Column =IndexToColumn (_aa .ColumnIdx );return _aa ;default:return _cc ;};};
// ColumnToIndex maps a column to a zero based index (e.g. A = 0, B = 1, AA = 26)
func ColumnToIndex (col string )uint32 {col =_ea .ToUpper (col );_eeg :=uint32 (0);for _ ,_de :=range col {_eeg *=26;_eeg +=uint32 (_de -'A'+1);};return _eeg -1;};
// CellReference is a parsed reference to a cell. Input is of the form 'A1',
// '$C$2', etc.
type CellReference struct{RowIdx uint32 ;ColumnIdx uint32 ;Column string ;AbsoluteColumn bool ;AbsoluteRow bool ;SheetName string ;};
// ColumnReference is a parsed reference to a column. Input is of the form 'A',
// '$C', etc.
type ColumnReference struct{ColumnIdx uint32 ;Column string ;AbsoluteColumn bool ;SheetName string ;};
// CellReference is a parsed reference to a cell. Input is of the form 'A1',
// '$C$2', etc.
type CellReference struct{RowIdx uint32 ;ColumnIdx uint32 ;Column string ;AbsoluteColumn bool ;AbsoluteRow bool ;SheetName string ;};var _gea =_ee .MustCompile ("^\u005b\u0061\u002d\u007aA-\u005a]\u0028\u005b\u0061\u002d\u007aA\u002d\u005a\u005d\u003f\u0029\u0024");
// ParseColumnReference parses a column reference of the form 'Sheet1!A' and splits it
// into sheet name and column segments.
func ParseColumnReference (s string )(ColumnReference ,error ){s =_bb .TrimSpace (s );if len (s )< 1{return ColumnReference {},_b .New ("\u0063\u006f\u006c\u0075\u006d\u006e \u0072\u0065\u0066\u0065\u0072\u0065\u006e\u0063\u0065\u0020\u006d\u0075\u0073\u0074\u0020\u0068\u0061\u0076\u0065\u0020a\u0074\u0020\u006c\u0065\u0061\u0073\u0074\u0020\u006f\u006e\u0065\u0020\u0063\u0068a\u0072a\u0063\u0074\u0065\u0072");};_de :=ColumnReference {};_ece ,_eb ,_df :=_bce (s );if _df !=nil {return ColumnReference {},_df ;};if _ece !=""{_de .SheetName =_ece ;};if _eb [0]=='$'{_de .AbsoluteColumn =true ;_eb =_eb [1:];};if !_bbg .MatchString (_eb ){return ColumnReference {},_b .New ("\u0063\u006f\u006c\u0075\u006dn\u0020\u0072\u0065\u0066\u0065\u0072\u0065\u006e\u0063\u0065\u0020\u006d\u0075s\u0074\u0020\u0062\u0065\u0020\u0062\u0065\u0074\u0077\u0065\u0065\u006e\u0020\u0041\u0020\u0061\u006e\u0064\u0020\u005a\u005a");};_de .Column =_eb ;_de .ColumnIdx =ColumnToIndex (_de .Column );return _de ,nil ;};
// ParseColumnRangeReference splits a range reference of the form "A:B" into its
// components.
func ParseColumnRangeReference (s string )(_fcb ,_eaf ColumnReference ,_ca error ){_bde :="";_dbd :=_bb .Split (s ,"\u0021");if len (_dbd )==2{_bde =_dbd [0];s =_dbd [1];};_ad :=_bb .Split (s ,"\u003a");if len (_ad )!=2{return ColumnReference {},ColumnReference {},_b .New ("i\u006ev\u0061\u006c\u0069\u0064\u0020\u0072\u0061\u006eg\u0065\u0020\u0066\u006frm\u0061\u0074");};if _bde !=""{_ad [0]=_bde +"\u0021"+_ad [0];_ad [1]=_bde +"\u0021"+_ad [1];};_fg ,_ca :=ParseColumnReference (_ad [0]);if _ca !=nil {return ColumnReference {},ColumnReference {},_ca ;};_ddd ,_ca :=ParseColumnReference (_ad [1]);if _ca !=nil {return ColumnReference {},ColumnReference {},_ca ;};return _fg ,_ddd ,nil ;};
// String returns a string representation of CellReference.
func (_ea CellReference )String ()string {_bc :=make ([]byte ,0,4);if _ea .AbsoluteColumn {_bc =append (_bc ,'$');};_bc =append (_bc ,_ea .Column ...);if _ea .AbsoluteRow {_bc =append (_bc ,'$');};_bc =_d .AppendInt (_bc ,int64 (_ea .RowIdx ),10);return string (_bc );};
// ColumnToIndex maps a column to a zero based index (e.g. A = 0, B = 1, AA = 26)
func ColumnToIndex (col string )uint32 {col =_bb .ToUpper (col );_ef :=uint32 (0);for _ ,_fd :=range col {_ef *=26;_ef +=uint32 (_fd -'A'+1);};return _ef -1;};
// Update updates reference to point one of the neighboring columns with respect to the update type after removing a row/column.
func (_eae *ColumnReference )Update (updateType _f .UpdateAction )*ColumnReference {switch updateType {case _f .UpdateActionRemoveColumn :_eba :=_eae ;_eba .ColumnIdx =_eae .ColumnIdx -1;_eba .Column =IndexToColumn (_eba .ColumnIdx );return _eba ;default:return _eae ;};};func _bce (_gd string )(string ,string ,error ){_ebg :="";_be :=_bb .LastIndex (_gd ,"\u0021");if _be > -1{_ebg =_gd [:_be ];_gd =_gd [_be +1:];if _ebg ==""{return "","",_b .New ("\u0049n\u0076a\u006c\u0069\u0064\u0020\u0073h\u0065\u0065t\u0020\u006e\u0061\u006d\u0065");};};return _ebg ,_gd ,nil ;};
// Update updates reference to point one of the neighboring cells with respect to the update type after removing a row/column.
func (_bdc *CellReference )Update (updateType _f .UpdateAction )*CellReference {switch updateType {case _f .UpdateActionRemoveColumn :_cbe :=_bdc ;_cbe .ColumnIdx =_bdc .ColumnIdx -1;_cbe .Column =IndexToColumn (_cbe .ColumnIdx );return _cbe ;default:return _bdc ;};};
// ParseRangeReference splits a range reference of the form "A1:B5" into its
// components.
func ParseRangeReference (s string )(_ae ,_bg CellReference ,_eccf error ){_ga ,_gab ,_eccf :=_fbe (s );if _eccf !=nil {return CellReference {},CellReference {},_eccf ;};_bfc :=_ea .Split (_gab ,"\u003a");if len (_bfc )!=2{return CellReference {},CellReference {},_ed .New ("i\u006ev\u0061\u006c\u0069\u0064\u0020\u0072\u0061\u006eg\u0065\u0020\u0066\u006frm\u0061\u0074");};if _ga !=""{_bfc [0]=_ga +"\u0021"+_bfc [0];_bfc [1]=_ga +"\u0021"+_bfc [1];};_gc ,_eccf :=ParseCellReference (_bfc [0]);if _eccf !=nil {return CellReference {},CellReference {},_eccf ;};_gegg ,_eccf :=ParseCellReference (_bfc [1]);if _eccf !=nil {return CellReference {},CellReference {},_eccf ;};return _gc ,_gegg ,nil ;};
// String returns a string representation of ColumnReference.
func (_a ColumnReference )String ()string {_ac :=make ([]byte ,0,4);if _a .AbsoluteColumn {_ac =append (_ac ,'$');};_ac =append (_ac ,_a .Column ...);return string (_ac );};
func ParseRangeReference (s string )(_cgf ,_ab CellReference ,_fc error ){_dea ,_cdd ,_fc :=_bce (s );if _fc !=nil {return CellReference {},CellReference {},_fc ;};_fe :=_bb .Split (_cdd ,"\u003a");if len (_fe )!=2{return CellReference {},CellReference {},_b .New ("i\u006ev\u0061\u006c\u0069\u0064\u0020\u0072\u0061\u006eg\u0065\u0020\u0066\u006frm\u0061\u0074");};if _dea !=""{_fe [0]=_dea +"\u0021"+_fe [0];_fe [1]=_dea +"\u0021"+_fe [1];};_ga ,_fc :=ParseCellReference (_fe [0]);if _fc !=nil {return CellReference {},CellReference {},_fc ;};_gdb ,_fc :=ParseCellReference (_fe [1]);if _fc !=nil {return CellReference {},CellReference {},_fc ;};return _ga ,_gdb ,nil ;};
// IndexToColumn maps a column number to a column name (e.g. 0 = A, 1 = B, 26 = AA)
func IndexToColumn (col uint32 )string {var _da [64+1]byte ;_bb :=len (_da );_df :=col ;const _af =26;for _df >=_af {_bb --;_edd :=_df /_af ;_da [_bb ]=byte ('A'+uint (_df -_edd *_af ));_df =_edd -1;};_bb --;_da [_bb ]=byte ('A'+uint (_df ));return string (_da [_bb :]);};
func IndexToColumn (col uint32 )string {var _bcb [64+1]byte ;_ce :=len (_bcb );_bg :=col ;const _cde =26;for _bg >=_cde {_ce --;_db :=_bg /_cde ;_bcb [_ce ]=byte ('A'+uint (_bg -_db *_cde ));_bg =_db -1;};_ce --;_bcb [_ce ]=byte ('A'+uint (_bg ));return string (_bcb [_ce :]);};
// ParseColumnReference parses a column reference of the form 'Sheet1!A' and splits it
// into sheet name and column segments.
func ParseColumnReference (s string )(ColumnReference ,error ){s =_ea .TrimSpace (s );if len (s )< 1{return ColumnReference {},_ed .New ("\u0063\u006f\u006c\u0075\u006d\u006e \u0072\u0065\u0066\u0065\u0072\u0065\u006e\u0063\u0065\u0020\u006d\u0075\u0073\u0074\u0020\u0068\u0061\u0076\u0065\u0020a\u0074\u0020\u006c\u0065\u0061\u0073\u0074\u0020\u006f\u006e\u0065\u0020\u0063\u0068a\u0072a\u0063\u0074\u0065\u0072");};_dc :=ColumnReference {};_ec ,_dd ,_bf :=_fbe (s );if _bf !=nil {return ColumnReference {},_bf ;};if _ec !=""{_dc .SheetName =_ec ;};if _dd [0]=='$'{_dc .AbsoluteColumn =true ;_dd =_dd [1:];};if !_gea .MatchString (_dd ){return ColumnReference {},_ed .New ("\u0063\u006f\u006c\u0075\u006dn\u0020\u0072\u0065\u0066\u0065\u0072\u0065\u006e\u0063\u0065\u0020\u006d\u0075s\u0074\u0020\u0062\u0065\u0020\u0062\u0065\u0074\u0077\u0065\u0065\u006e\u0020\u0041\u0020\u0061\u006e\u0064\u0020\u005a\u005a");};_dc .Column =_dd ;_dc .ColumnIdx =ColumnToIndex (_dc .Column );return _dc ,nil ;};
// String returns a string representation of ColumnReference.
func (_dc ColumnReference )String ()string {_g :=make ([]byte ,0,4);if _dc .AbsoluteColumn {_g =append (_g ,'$');};_g =append (_g ,_dc .Column ...);return string (_g );};var _bbg =_cc .MustCompile ("^\u005b\u0061\u002d\u007aA-\u005a]\u0028\u005b\u0061\u002d\u007aA\u002d\u005a\u005d\u003f\u0029\u0024");

File diff suppressed because one or more lines are too long

View File

@ -10,10 +10,10 @@
// terms that can be accessed at https://unidoc.io/eula/
// Package update contains definitions needed for updating references after removing rows/columns.
package update ;const (UpdateActionRemoveColumn UpdateAction =iota ;);
package update ;
// UpdateAction is the type for update types constants.
type UpdateAction byte ;
type UpdateAction byte ;const (UpdateActionRemoveColumn UpdateAction =iota ;);
// UpdateQuery contains terms of how to update references after removing row/column.
type UpdateQuery struct{

File diff suppressed because one or more lines are too long

View File

@ -9,11 +9,11 @@
// 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 vmldrawing ;import (_c "encoding/xml";_e "fmt";_f "github.com/unidoc/unioffice";_b "github.com/unidoc/unioffice/schema/soo/ofc/sharedTypes";_ff "github.com/unidoc/unioffice/schema/urn/schemas_microsoft_com/office/excel";_a "github.com/unidoc/unioffice/schema/urn/schemas_microsoft_com/vml";);
// NewCommentDrawing constructs a new comment drawing.
func NewCommentDrawing ()*Container {_gb :=NewContainer ();_gb .Layout =_a .NewOfcShapelayout ();_gb .Layout .ExtAttr =_a .ST_ExtEdit ;_gb .Layout .Idmap =_a .NewOfcCT_IdMap ();_gb .Layout .Idmap .DataAttr =_f .String ("\u0031");_gb .Layout .Idmap .ExtAttr =_a .ST_ExtEdit ;_gb .ShapeType =_a .NewShapetype ();_gb .ShapeType .IdAttr =_f .String ("_\u0078\u0030\u0030\u0030\u0030\u005f\u0074\u0032\u0030\u0032");_gb .ShapeType .CoordsizeAttr =_f .String ("2\u0031\u0036\u0030\u0030\u002c\u0032\u0031\u0036\u0030\u0030");_gb .ShapeType .SptAttr =_f .Float32 (202);_gb .ShapeType .PathAttr =_f .String ("\u006d\u0030\u002c0l\u0030\u002c\u0032\u0031\u0036\u0030\u0030\u002c\u00321\u00360\u0030,\u00321\u0036\u0030\u0030\u002c\u0032\u0031\u0036\u0030\u0030\u002c\u0030\u0078\u0065");_gf :=_a .NewEG_ShapeElements ();_gb .ShapeType .EG_ShapeElements =append (_gb .ShapeType .EG_ShapeElements ,_gf );_gf .Path =_a .NewPath ();_gf .Path .GradientshapeokAttr =_b .ST_TrueFalseT ;_gf .Path .ConnecttypeAttr =_a .OfcST_ConnectTypeRect ;return _gb ;};type Container struct{Layout *_a .OfcShapelayout ;ShapeType *_a .Shapetype ;Shape []*_a .Shape ;};func (_ffd *Container )MarshalXML (e *_c .Encoder ,start _c .StartElement )error {start .Attr =append (start .Attr ,_c .Attr {Name :_c .Name {Local :"\u0078m\u006c\u006e\u0073\u003a\u0076"},Value :"\u0075\u0072n\u003a\u0073\u0063\u0068\u0065\u006d\u0061\u0073\u002d\u006d\u0069\u0063\u0072\u006f\u0073\u006f\u0066\u0074\u002d\u0063\u006f\u006d:v\u006d\u006c"});start .Attr =append (start .Attr ,_c .Attr {Name :_c .Name {Local :"\u0078m\u006c\u006e\u0073\u003a\u006f"},Value :"\u0075\u0072\u006e\u003a\u0073\u0063\u0068\u0065\u006d\u0061\u0073\u002d\u006di\u0063\u0072\u006f\u0073\u006f\u0066t\u002d\u0063\u006f\u006d\u003a\u006f\u0066\u0066\u0069\u0063\u0065\u003a\u006ff\u0066\u0069\u0063\u0065"});start .Attr =append (start .Attr ,_c .Attr {Name :_c .Name {Local :"\u0078m\u006c\u006e\u0073\u003a\u0078"},Value :"\u0075\u0072\u006e\u003a\u0073\u0063\u0068\u0065\u006d\u0061\u0073\u002d\u006d\u0069\u0063\u0072\u006f\u0073\u006f\u0066\u0074\u002d\u0063\u006fm\u003a\u006f\u0066\u0066\u0069c\u0065\u003ae\u0078\u0063\u0065\u006c"});start .Name .Local ="\u0078\u006d\u006c";e .EncodeToken (start );if _ffd .Layout !=nil {_df :=_c .StartElement {Name :_c .Name {Local :"\u006f\u003a\u0073\u0068\u0061\u0070\u0065\u006c\u0061\u0079\u006f\u0075\u0074"}};e .EncodeElement (_ffd .Layout ,_df );};if _ffd .ShapeType !=nil {_dd :=_c .StartElement {Name :_c .Name {Local :"v\u003a\u0073\u0068\u0061\u0070\u0065\u0074\u0079\u0070\u0065"}};e .EncodeElement (_ffd .ShapeType ,_dd );};for _ ,_gfe :=range _ffd .Shape {_ea :=_c .StartElement {Name :_c .Name {Local :"\u0076:\u0073\u0068\u0061\u0070\u0065"}};e .EncodeElement (_gfe ,_ea );};return e .EncodeToken (_c .EndElement {Name :start .Name });};func NewContainer ()*Container {return &Container {}};
package vmldrawing ;import (_c "encoding/xml";_fe "fmt";_g "github.com/unidoc/unioffice";_d "github.com/unidoc/unioffice/schema/soo/ofc/sharedTypes";_a "github.com/unidoc/unioffice/schema/urn/schemas_microsoft_com/office/excel";_b "github.com/unidoc/unioffice/schema/urn/schemas_microsoft_com/vml";);
// NewCommentShape creates a new comment shape for a given cell index. The
// indices here are zero based.
func NewCommentShape (col ,row int64 )*_a .Shape {_d :=_a .NewShape ();_d .IdAttr =_f .String (_e .Sprintf ("\u0063\u0073\u005f\u0025\u0064\u005f\u0025\u0064",col ,row ));_d .TypeAttr =_f .String ("\u0023\u005f\u00780\u0030\u0030\u0030\u005f\u0074\u0032\u0030\u0032");_d .StyleAttr =_f .String ("\u0070\u006f\u0073i\u0074\u0069\u006f\u006e\u003a\u0061\u0062\u0073\u006f\u006cu\u0074\u0065\u003b\u006d\u0061\u0072\u0067\u0069\u006e\u002d\u006c\u0065\u0066\u0074:\u0038\u0030\u0070\u0074;\u006d\u0061\u0072\u0067\u0069n-\u0074o\u0070\u003a\u0032pt\u003b\u0077\u0069\u0064\u0074\u0068\u003a1\u0030\u0034\u0070\u0074\u003b\u0068\u0065\u0069\u0067\u0068\u0074\u003a\u0037\u0036\u0070\u0074\u003b\u007a\u002d\u0069\u006e\u0064\u0065x\u003a\u0031\u003bv\u0069\u0073\u0069\u0062\u0069\u006c\u0069t\u0079\u003a\u0068\u0069\u0064\u0064\u0065\u006e");_d .FillcolorAttr =_f .String ("\u0023f\u0062\u0066\u0036\u0064\u0036");_d .StrokecolorAttr =_f .String ("\u0023e\u0064\u0065\u0061\u0061\u0031");_cf :=_a .NewEG_ShapeElements ();_cf .Fill =_a .NewFill ();_cf .Fill .Color2Attr =_f .String ("\u0023f\u0062\u0066\u0065\u0038\u0032");_cf .Fill .AngleAttr =_f .Float64 (-180);_cf .Fill .TypeAttr =_a .ST_FillTypeGradient ;_cf .Fill .Fill =_a .NewOfcFill ();_cf .Fill .Fill .ExtAttr =_a .ST_ExtView ;_cf .Fill .Fill .TypeAttr =_a .OfcST_FillTypeGradientUnscaled ;_d .EG_ShapeElements =append (_d .EG_ShapeElements ,_cf );_cg :=_a .NewEG_ShapeElements ();_cg .Shadow =_a .NewShadow ();_cg .Shadow .OnAttr =_b .ST_TrueFalseT ;_cg .Shadow .ObscuredAttr =_b .ST_TrueFalseT ;_d .EG_ShapeElements =append (_d .EG_ShapeElements ,_cg );_ad :=_a .NewEG_ShapeElements ();_ad .Path =_a .NewPath ();_ad .Path .ConnecttypeAttr =_a .OfcST_ConnectTypeNone ;_d .EG_ShapeElements =append (_d .EG_ShapeElements ,_ad );_cfc :=_a .NewEG_ShapeElements ();_cfc .Textbox =_a .NewTextbox ();_cfc .Textbox .StyleAttr =_f .String ("\u006d\u0073\u006f\u002ddi\u0072\u0065\u0063\u0074\u0069\u006f\u006e\u002d\u0061\u006c\u0074\u003a\u0061\u0075t\u006f");_d .EG_ShapeElements =append (_d .EG_ShapeElements ,_cfc );_de :=_a .NewEG_ShapeElements ();_de .ClientData =_ff .NewClientData ();_de .ClientData .ObjectTypeAttr =_ff .ST_ObjectTypeNote ;_de .ClientData .MoveWithCells =_b .ST_TrueFalseBlankT ;_de .ClientData .SizeWithCells =_b .ST_TrueFalseBlankT ;_de .ClientData .Anchor =_f .String ("\u0031,\u0020\u0031\u0035\u002c\u0020\u0030\u002c\u0020\u0032\u002c\u00202\u002c\u0020\u0035\u0034\u002c\u0020\u0035\u002c\u0020\u0033");_de .ClientData .AutoFill =_b .ST_TrueFalseBlankFalse ;_de .ClientData .Row =_f .Int64 (row );_de .ClientData .Column =_f .Int64 (col );_d .EG_ShapeElements =append (_d .EG_ShapeElements ,_de );return _d ;};func (_bb *Container )UnmarshalXML (d *_c .Decoder ,start _c .StartElement )error {_bb .Shape =nil ;_ca :for {_gg ,_fc :=d .Token ();if _fc !=nil {return _fc ;};switch _ae :=_gg .(type ){case _c .StartElement :switch _ae .Name .Local {case "s\u0068\u0061\u0070\u0065\u006c\u0061\u0079\u006f\u0075\u0074":_bb .Layout =_a .NewOfcShapelayout ();if _ed :=d .DecodeElement (_bb .Layout ,&_ae );_ed !=nil {return _ed ;};case "\u0073h\u0061\u0070\u0065\u0074\u0079\u0070e":_bb .ShapeType =_a .NewShapetype ();if _fg :=d .DecodeElement (_bb .ShapeType ,&_ae );_fg !=nil {return _fg ;};case "\u0073\u0068\u0061p\u0065":_cfd :=_a .NewShape ();if _ebd :=d .DecodeElement (_cfd ,&_ae );_ebd !=nil {return _ebd ;};_bb .Shape =append (_bb .Shape ,_cfd );};case _c .EndElement :break _ca ;};};return nil ;};
func NewCommentShape (col ,row int64 )*_b .Shape {_bd :=_b .NewShape ();_bd .IdAttr =_g .String (_fe .Sprintf ("\u0063\u0073\u005f\u0025\u0064\u005f\u0025\u0064",col ,row ));_bd .TypeAttr =_g .String ("\u0023\u005f\u00780\u0030\u0030\u0030\u005f\u0074\u0032\u0030\u0032");_bd .StyleAttr =_g .String ("\u0070\u006f\u0073i\u0074\u0069\u006f\u006e\u003a\u0061\u0062\u0073\u006f\u006cu\u0074\u0065\u003b\u006d\u0061\u0072\u0067\u0069\u006e\u002d\u006c\u0065\u0066\u0074:\u0038\u0030\u0070\u0074;\u006d\u0061\u0072\u0067\u0069n-\u0074o\u0070\u003a\u0032pt\u003b\u0077\u0069\u0064\u0074\u0068\u003a1\u0030\u0034\u0070\u0074\u003b\u0068\u0065\u0069\u0067\u0068\u0074\u003a\u0037\u0036\u0070\u0074\u003b\u007a\u002d\u0069\u006e\u0064\u0065x\u003a\u0031\u003bv\u0069\u0073\u0069\u0062\u0069\u006c\u0069t\u0079\u003a\u0068\u0069\u0064\u0064\u0065\u006e");_bd .FillcolorAttr =_g .String ("\u0023f\u0062\u0066\u0036\u0064\u0036");_bd .StrokecolorAttr =_g .String ("\u0023e\u0064\u0065\u0061\u0061\u0031");_af :=_b .NewEG_ShapeElements ();_af .Fill =_b .NewFill ();_af .Fill .Color2Attr =_g .String ("\u0023f\u0062\u0066\u0065\u0038\u0032");_af .Fill .AngleAttr =_g .Float64 (-180);_af .Fill .TypeAttr =_b .ST_FillTypeGradient ;_af .Fill .Fill =_b .NewOfcFill ();_af .Fill .Fill .ExtAttr =_b .ST_ExtView ;_af .Fill .Fill .TypeAttr =_b .OfcST_FillTypeGradientUnscaled ;_bd .EG_ShapeElements =append (_bd .EG_ShapeElements ,_af );_aa :=_b .NewEG_ShapeElements ();_aa .Shadow =_b .NewShadow ();_aa .Shadow .OnAttr =_d .ST_TrueFalseT ;_aa .Shadow .ObscuredAttr =_d .ST_TrueFalseT ;_bd .EG_ShapeElements =append (_bd .EG_ShapeElements ,_aa );_afd :=_b .NewEG_ShapeElements ();_afd .Path =_b .NewPath ();_afd .Path .ConnecttypeAttr =_b .OfcST_ConnectTypeNone ;_bd .EG_ShapeElements =append (_bd .EG_ShapeElements ,_afd );_e :=_b .NewEG_ShapeElements ();_e .Textbox =_b .NewTextbox ();_e .Textbox .StyleAttr =_g .String ("\u006d\u0073\u006f\u002ddi\u0072\u0065\u0063\u0074\u0069\u006f\u006e\u002d\u0061\u006c\u0074\u003a\u0061\u0075t\u006f");_bd .EG_ShapeElements =append (_bd .EG_ShapeElements ,_e );_ff :=_b .NewEG_ShapeElements ();_ff .ClientData =_a .NewClientData ();_ff .ClientData .ObjectTypeAttr =_a .ST_ObjectTypeNote ;_ff .ClientData .MoveWithCells =_d .ST_TrueFalseBlankT ;_ff .ClientData .SizeWithCells =_d .ST_TrueFalseBlankT ;_ff .ClientData .Anchor =_g .String ("\u0031,\u0020\u0031\u0035\u002c\u0020\u0030\u002c\u0020\u0032\u002c\u00202\u002c\u0020\u0035\u0034\u002c\u0020\u0035\u002c\u0020\u0033");_ff .ClientData .AutoFill =_d .ST_TrueFalseBlankFalse ;_ff .ClientData .Row =_g .Int64 (row );_ff .ClientData .Column =_g .Int64 (col );_bd .EG_ShapeElements =append (_bd .EG_ShapeElements ,_ff );return _bd ;};type Container struct{Layout *_b .OfcShapelayout ;ShapeType *_b .Shapetype ;Shape []*_b .Shape ;};func NewContainer ()*Container {return &Container {}};func (_bgd *Container )UnmarshalXML (d *_c .Decoder ,start _c .StartElement )error {_bgd .Shape =nil ;_dc :for {_gc ,_afb :=d .Token ();if _afb !=nil {return _afb ;};switch _dd :=_gc .(type ){case _c .StartElement :switch _dd .Name .Local {case "s\u0068\u0061\u0070\u0065\u006c\u0061\u0079\u006f\u0075\u0074":_bgd .Layout =_b .NewOfcShapelayout ();if _bf :=d .DecodeElement (_bgd .Layout ,&_dd );_bf !=nil {return _bf ;};case "\u0073h\u0061\u0070\u0065\u0074\u0079\u0070e":_bgd .ShapeType =_b .NewShapetype ();if _da :=d .DecodeElement (_bgd .ShapeType ,&_dd );_da !=nil {return _da ;};case "\u0073\u0068\u0061p\u0065":_bab :=_b .NewShape ();if _be :=d .DecodeElement (_bab ,&_dd );_be !=nil {return _be ;};_bgd .Shape =append (_bgd .Shape ,_bab );};case _c .EndElement :break _dc ;};};return nil ;};
// NewCommentDrawing constructs a new comment drawing.
func NewCommentDrawing ()*Container {_ge :=NewContainer ();_ge .Layout =_b .NewOfcShapelayout ();_ge .Layout .ExtAttr =_b .ST_ExtEdit ;_ge .Layout .Idmap =_b .NewOfcCT_IdMap ();_ge .Layout .Idmap .DataAttr =_g .String ("\u0031");_ge .Layout .Idmap .ExtAttr =_b .ST_ExtEdit ;_ge .ShapeType =_b .NewShapetype ();_ge .ShapeType .IdAttr =_g .String ("_\u0078\u0030\u0030\u0030\u0030\u005f\u0074\u0032\u0030\u0032");_ge .ShapeType .CoordsizeAttr =_g .String ("2\u0031\u0036\u0030\u0030\u002c\u0032\u0031\u0036\u0030\u0030");_ge .ShapeType .SptAttr =_g .Float32 (202);_ge .ShapeType .PathAttr =_g .String ("\u006d\u0030\u002c0l\u0030\u002c\u0032\u0031\u0036\u0030\u0030\u002c\u00321\u00360\u0030,\u00321\u0036\u0030\u0030\u002c\u0032\u0031\u0036\u0030\u0030\u002c\u0030\u0078\u0065");_ad :=_b .NewEG_ShapeElements ();_ge .ShapeType .EG_ShapeElements =append (_ge .ShapeType .EG_ShapeElements ,_ad );_ad .Path =_b .NewPath ();_ad .Path .GradientshapeokAttr =_d .ST_TrueFalseT ;_ad .Path .ConnecttypeAttr =_b .OfcST_ConnectTypeRect ;return _ge ;};func (_ae *Container )MarshalXML (e *_c .Encoder ,start _c .StartElement )error {start .Attr =append (start .Attr ,_c .Attr {Name :_c .Name {Local :"\u0078m\u006c\u006e\u0073\u003a\u0076"},Value :"\u0075\u0072n\u003a\u0073\u0063\u0068\u0065\u006d\u0061\u0073\u002d\u006d\u0069\u0063\u0072\u006f\u0073\u006f\u0066\u0074\u002d\u0063\u006f\u006d:v\u006d\u006c"});start .Attr =append (start .Attr ,_c .Attr {Name :_c .Name {Local :"\u0078m\u006c\u006e\u0073\u003a\u006f"},Value :"\u0075\u0072\u006e\u003a\u0073\u0063\u0068\u0065\u006d\u0061\u0073\u002d\u006di\u0063\u0072\u006f\u0073\u006f\u0066t\u002d\u0063\u006f\u006d\u003a\u006f\u0066\u0066\u0069\u0063\u0065\u003a\u006ff\u0066\u0069\u0063\u0065"});start .Attr =append (start .Attr ,_c .Attr {Name :_c .Name {Local :"\u0078m\u006c\u006e\u0073\u003a\u0078"},Value :"\u0075\u0072\u006e\u003a\u0073\u0063\u0068\u0065\u006d\u0061\u0073\u002d\u006d\u0069\u0063\u0072\u006f\u0073\u006f\u0066\u0074\u002d\u0063\u006fm\u003a\u006f\u0066\u0066\u0069c\u0065\u003ae\u0078\u0063\u0065\u006c"});start .Name .Local ="\u0078\u006d\u006c";e .EncodeToken (start );if _ae .Layout !=nil {_ea :=_c .StartElement {Name :_c .Name {Local :"\u006f\u003a\u0073\u0068\u0061\u0070\u0065\u006c\u0061\u0079\u006f\u0075\u0074"}};e .EncodeElement (_ae .Layout ,_ea );};if _ae .ShapeType !=nil {_bg :=_c .StartElement {Name :_c .Name {Local :"v\u003a\u0073\u0068\u0061\u0070\u0065\u0074\u0079\u0070\u0065"}};e .EncodeElement (_ae .ShapeType ,_bg );};for _ ,_bga :=range _ae .Shape {_de :=_c .StartElement {Name :_c .Name {Local :"\u0076:\u0073\u0068\u0061\u0070\u0065"}};e .EncodeElement (_bga ,_de );};return e .EncodeToken (_c .EndElement {Name :start .Name });};

View File

@ -9,32 +9,13 @@
// 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 zippkg ;import (_g "archive/zip";_dab "bytes";_da "encoding/xml";_f "fmt";_a "github.com/unidoc/unioffice";_cc "github.com/unidoc/unioffice/algo";_cg "github.com/unidoc/unioffice/common/tempstorage";_ee "github.com/unidoc/unioffice/schema/soo/pkg/relationships";_cb "io";_b "path";_c "sort";_db "strings";_d "time";);
package zippkg ;import (_g "archive/zip";_a "bytes";_bc "encoding/xml";_c "fmt";_ae "github.com/unidoc/unioffice";_fd "github.com/unidoc/unioffice/algo";_eg "github.com/unidoc/unioffice/common/tempstorage";_eb "github.com/unidoc/unioffice/schema/soo/pkg/relationships";_gd "io";_fb "path";_f "sort";_e "strings";_b "time";);func (_deb SelfClosingWriter )Write (b []byte )(int ,error ){_fbff :=0;_gdec :=0;for _af :=0;_af < len (b )-2;_af ++{if b [_af ]=='>'&&b [_af +1]=='<'&&b [_af +2]=='/'{_ed :=[]byte {};_ede :=_af ;for _edee :=_af ;_edee >=0;_edee --{if b [_edee ]==' '{_ede =_edee ;}else if b [_edee ]=='<'{_ed =b [_edee +1:_ede ];break ;};};_fbfb :=[]byte {};for _abc :=_af +3;_abc < len (b );_abc ++{if b [_abc ]=='>'{_fbfb =b [_af +3:_abc ];break ;};};if !_a .Equal (_ed ,_fbfb ){continue ;};_agd ,_eca :=_deb .W .Write (b [_fbff :_af ]);if _eca !=nil {return _gdec +_agd ,_eca ;};_gdec +=_agd ;_ ,_eca =_deb .W .Write (_bce );if _eca !=nil {return _gdec ,_eca ;};_gdec +=3;for _bcb :=_af +2;_bcb < len (b )&&b [_bcb ]!='>';_bcb ++{_gdec ++;_fbff =_bcb +2;_af =_fbff ;};};};_dad ,_fg :=_deb .W .Write (b [_fbff :]);return _dad +_gdec ,_fg ;};func (_fe *DecodeMap )IndexFor (path string )int {return _fe ._agf [path ]};func (_aeg *DecodeMap )RecordIndex (path string ,idx int ){_aeg ._agf [path ]=idx };func MarshalXMLByType (z *_g .Writer ,dt _ae .DocType ,typ string ,v interface{})error {_bgb :=_ae .AbsoluteFilename (dt ,typ ,0);return MarshalXML (z ,_bgb ,v );};
// MarshalXML creates a file inside of a zip and marshals an object as xml, prefixing it
// with a standard XML header.
func MarshalXML (z *_g .Writer ,filename string ,v interface{})error {_af :=&_g .FileHeader {};_af .Method =_g .Deflate ;_af .Name =filename ;_af .SetModTime (_d .Now ());_ddde ,_agf :=z .CreateHeader (_af );if _agf !=nil {return _f .Errorf ("\u0063\u0072\u0065\u0061ti\u006e\u0067\u0020\u0025\u0073\u0020\u0069\u006e\u0020\u007a\u0069\u0070\u003a\u0020%\u0073",filename ,_agf );};_ ,_agf =_ddde .Write ([]byte (XMLHeader ));if _agf !=nil {return _f .Errorf ("\u0063\u0072e\u0061\u0074\u0069\u006e\u0067\u0020\u0078\u006d\u006c\u0020\u0068\u0065\u0061\u0064\u0065\u0072\u0020\u0074\u006f\u0020\u0025\u0073: \u0025\u0073",filename ,_agf );};if _agf =_da .NewEncoder (SelfClosingWriter {_ddde }).Encode (v );_agf !=nil {return _f .Errorf ("\u006d\u0061\u0072\u0073\u0068\u0061\u006c\u0069\u006e\u0067\u0020\u0025s\u003a\u0020\u0025\u0073",filename ,_agf );};_ ,_agf =_ddde .Write (_ge );return _agf ;};
// Decode loops decoding targets registered with AddTarget and calling th
func (_fcb *DecodeMap )Decode (files []*_g .File )error {_gdg :=1;for _gdg > 0{for len (_fcb ._ea )> 0{_ddd :=_fcb ._ea [len (_fcb ._ea )-1];_fcb ._ea =_fcb ._ea [0:len (_fcb ._ea )-1];_dc :=_ddd .Ifc .(*_ee .Relationships );for _ ,_dag :=range _dc .Relationship {_cbe ,_ :=_fcb ._ab [_dc ];_fcb ._dg (_fcb ,_cbe +_dag .TargetAttr ,_dag .TypeAttr ,files ,_dag ,_ddd );};};for _dae ,_fcc :=range files {if _fcc ==nil {continue ;};if _dfd ,_ddb :=_fcb ._eed [_fcc .Name ];_ddb {delete (_fcb ._eed ,_fcc .Name );if _cff :=Decode (_fcc ,_dfd .Ifc );_cff !=nil {return _cff ;};files [_dae ]=nil ;if _ca ,_be :=_dfd .Ifc .(*_ee .Relationships );_be {_fcb ._ea =append (_fcb ._ea ,_dfd );_dea ,_ :=_b .Split (_b .Clean (_fcc .Name +"\u002f\u002e\u002e\u002f"));_fcb ._ab [_ca ]=_dea ;_gdg ++;};};};_gdg --;};return nil ;};func MarshalXMLByType (z *_g .Writer ,dt _a .DocType ,typ string ,v interface{})error {_gb :=_a .AbsoluteFilename (dt ,typ ,0);return MarshalXML (z ,_gb ,v );};
// RelationsPathFor returns the relations path for a given filename.
func RelationsPathFor (path string )string {_ccb :=_db .Split (path ,"\u002f");_cbb :=_db .Join (_ccb [0:len (_ccb )-1],"\u002f");_eab :=_ccb [len (_ccb )-1];_cbb +="\u002f_\u0072\u0065\u006c\u0073\u002f";_eab +="\u002e\u0072\u0065l\u0073";return _cbb +_eab ;};func (_bc *DecodeMap )RecordIndex (path string ,idx int ){_bc ._ff [path ]=idx };
// AddFileFromDisk reads a file from internal storage and adds it at a given path to a zip file.
// TODO: Rename to AddFileFromStorage in next major version release (v2).
// NOTE: If disk storage cannot be used, memory storage can be used instead by calling memstore.SetAsStorage().
func AddFileFromDisk (z *_g .Writer ,zipPath ,storagePath string )error {_fda ,_dagg :=z .Create (zipPath );if _dagg !=nil {return _f .Errorf ("e\u0072\u0072\u006f\u0072 c\u0072e\u0061\u0074\u0069\u006e\u0067 \u0025\u0073\u003a\u0020\u0025\u0073",zipPath ,_dagg );};_ag ,_dagg :=_cg .Open (storagePath );if _dagg !=nil {return _f .Errorf ("e\u0072r\u006f\u0072\u0020\u006f\u0070\u0065\u006e\u0069n\u0067\u0020\u0025\u0073: \u0025\u0073",storagePath ,_dagg );};defer _ag .Close ();_ ,_dagg =_cb .Copy (_fda ,_ag );return _dagg ;};
// AddFileFromBytes takes a byte array and adds it at a given path to a zip file.
func AddFileFromBytes (z *_g .Writer ,zipPath string ,data []byte )error {_bf ,_cb :=z .Create (zipPath );if _cb !=nil {return _c .Errorf ("e\u0072\u0072\u006f\u0072 c\u0072e\u0061\u0074\u0069\u006e\u0067 \u0025\u0073\u003a\u0020\u0025\u0073",zipPath ,_cb );};_ ,_cb =_gd .Copy (_bf ,_a .NewReader (data ));return _cb ;};
// Decode unmarshals the content of a *zip.File as XML to a given destination.
func Decode (f *_g .File ,dest interface{})error {_fde ,_beg :=f .Open ();if _beg !=nil {return _f .Errorf ("e\u0072r\u006f\u0072\u0020\u0072\u0065\u0061\u0064\u0069n\u0067\u0020\u0025\u0073: \u0025\u0073",f .Name ,_beg );};defer _fde .Close ();_cde :=_da .NewDecoder (_fde );if _baf :=_cde .Decode (dest );_baf !=nil {return _f .Errorf ("e\u0072\u0072\u006f\u0072 d\u0065c\u006f\u0064\u0069\u006e\u0067 \u0025\u0073\u003a\u0020\u0025\u0073",f .Name ,_baf );};if _dba ,_fg :=dest .(*_ee .Relationships );_fg {for _gcf ,_ccc :=range _dba .Relationship {switch _ccc .TypeAttr {case _a .OfficeDocumentTypeStrict :_dba .Relationship [_gcf ].TypeAttr =_a .OfficeDocumentType ;case _a .StylesTypeStrict :_dba .Relationship [_gcf ].TypeAttr =_a .StylesType ;case _a .ThemeTypeStrict :_dba .Relationship [_gcf ].TypeAttr =_a .ThemeType ;case _a .ControlTypeStrict :_dba .Relationship [_gcf ].TypeAttr =_a .ControlType ;case _a .SettingsTypeStrict :_dba .Relationship [_gcf ].TypeAttr =_a .SettingsType ;case _a .ImageTypeStrict :_dba .Relationship [_gcf ].TypeAttr =_a .ImageType ;case _a .CommentsTypeStrict :_dba .Relationship [_gcf ].TypeAttr =_a .CommentsType ;case _a .ThumbnailTypeStrict :_dba .Relationship [_gcf ].TypeAttr =_a .ThumbnailType ;case _a .DrawingTypeStrict :_dba .Relationship [_gcf ].TypeAttr =_a .DrawingType ;case _a .ChartTypeStrict :_dba .Relationship [_gcf ].TypeAttr =_a .ChartType ;case _a .ExtendedPropertiesTypeStrict :_dba .Relationship [_gcf ].TypeAttr =_a .ExtendedPropertiesType ;case _a .CustomXMLTypeStrict :_dba .Relationship [_gcf ].TypeAttr =_a .CustomXMLType ;case _a .WorksheetTypeStrict :_dba .Relationship [_gcf ].TypeAttr =_a .WorksheetType ;case _a .SharedStringsTypeStrict :_dba .Relationship [_gcf ].TypeAttr =_a .SharedStringsType ;case _a .TableTypeStrict :_dba .Relationship [_gcf ].TypeAttr =_a .TableType ;case _a .HeaderTypeStrict :_dba .Relationship [_gcf ].TypeAttr =_a .HeaderType ;case _a .FooterTypeStrict :_dba .Relationship [_gcf ].TypeAttr =_a .FooterType ;case _a .NumberingTypeStrict :_dba .Relationship [_gcf ].TypeAttr =_a .NumberingType ;case _a .FontTableTypeStrict :_dba .Relationship [_gcf ].TypeAttr =_a .FontTableType ;case _a .WebSettingsTypeStrict :_dba .Relationship [_gcf ].TypeAttr =_a .WebSettingsType ;case _a .FootNotesTypeStrict :_dba .Relationship [_gcf ].TypeAttr =_a .FootNotesType ;case _a .EndNotesTypeStrict :_dba .Relationship [_gcf ].TypeAttr =_a .EndNotesType ;case _a .SlideTypeStrict :_dba .Relationship [_gcf ].TypeAttr =_a .SlideType ;case _a .VMLDrawingTypeStrict :_dba .Relationship [_gcf ].TypeAttr =_a .VMLDrawingType ;};};_c .Slice (_dba .Relationship ,func (_bf ,_bfc int )bool {_abd :=_dba .Relationship [_bf ];_ffgg :=_dba .Relationship [_bfc ];return _cc .NaturalLess (_abd .IdAttr ,_ffgg .IdAttr );});};return nil ;};
// AddTarget allows documents to register decode targets. Path is a path that
// will be found in the zip file and ifc is an XML element that the file will be
// unmarshaled to. filePath is the absolute path to the target, ifc is the
// object to decode into, sourceFileType is the type of file that the reference
// was discovered in, and index is the index of the source file type.
func (_df *DecodeMap )AddTarget (filePath string ,ifc interface{},sourceFileType string ,idx uint32 )bool {if _df ._eed ==nil {_df ._eed =make (map[string ]Target );_df ._ab =make (map[*_ee .Relationships ]string );_df ._cf =make (map[string ]struct{});_df ._ff =make (map[string ]int );};_fa :=_b .Clean (filePath );if _ ,_gd :=_df ._cf [_fa ];_gd {return false ;};_df ._cf [_fa ]=struct{}{};_df ._eed [_fa ]=Target {Path :filePath ,Typ :sourceFileType ,Ifc :ifc ,Index :idx };return true ;};func (_ec SelfClosingWriter )Write (b []byte )(int ,error ){_fb :=0;_bd :=0;for _aed :=0;_aed < len (b )-2;_aed ++{if b [_aed ]=='>'&&b [_aed +1]=='<'&&b [_aed +2]=='/'{_eac :=[]byte {};_ffc :=_aed ;for _ebe :=_aed ;_ebe >=0;_ebe --{if b [_ebe ]==' '{_ffc =_ebe ;}else if b [_ebe ]=='<'{_eac =b [_ebe +1:_ffc ];break ;};};_fbc :=[]byte {};for _ac :=_aed +3;_ac < len (b );_ac ++{if b [_ac ]=='>'{_fbc =b [_aed +3:_ac ];break ;};};if !_dab .Equal (_eac ,_fbc ){continue ;};_fge ,_fba :=_ec .W .Write (b [_fb :_aed ]);if _fba !=nil {return _bd +_fge ,_fba ;};_bd +=_fge ;_ ,_fba =_ec .W .Write (_eba );if _fba !=nil {return _bd ,_fba ;};_bd +=3;for _afa :=_aed +2;_afa < len (b )&&b [_afa ]!='>';_afa ++{_bd ++;_fb =_afa +2;_aed =_fb ;};};};_cccg ,_gbd :=_ec .W .Write (b [_fb :]);return _cccg +_bd ,_gbd ;};func MarshalXMLByTypeIndex (z *_g .Writer ,dt _a .DocType ,typ string ,idx int ,v interface{})error {_gdb :=_a .AbsoluteFilename (dt ,typ ,idx );return MarshalXML (z ,_gdb ,v );};const XMLHeader ="\u003c\u003f\u0078\u006d\u006c\u0020\u0076e\u0072\u0073\u0069o\u006e\u003d\u00221\u002e\u0030\"\u0020\u0065\u006e\u0063\u006f\u0064i\u006eg=\u0022\u0055\u0054\u0046\u002d\u0038\u0022\u0020\u0073\u0074\u0061\u006e\u0064\u0061\u006c\u006f\u006e\u0065\u003d\u0022\u0079\u0065\u0073\u0022\u003f\u003e"+"\u000a";
func Decode (f *_g .File ,dest interface{})error {_ecc ,_ded :=f .Open ();if _ded !=nil {return _c .Errorf ("e\u0072r\u006f\u0072\u0020\u0072\u0065\u0061\u0064\u0069n\u0067\u0020\u0025\u0073: \u0025\u0073",f .Name ,_ded );};defer _ecc .Close ();_bg :=_bc .NewDecoder (_ecc );if _gf :=_bg .Decode (dest );_gf !=nil {return _c .Errorf ("e\u0072\u0072\u006f\u0072 d\u0065c\u006f\u0064\u0069\u006e\u0067 \u0025\u0073\u003a\u0020\u0025\u0073",f .Name ,_gf );};if _aef ,_aae :=dest .(*_eb .Relationships );_aae {for _gbe ,_ccg :=range _aef .Relationship {switch _ccg .TypeAttr {case _ae .OfficeDocumentTypeStrict :_aef .Relationship [_gbe ].TypeAttr =_ae .OfficeDocumentType ;case _ae .StylesTypeStrict :_aef .Relationship [_gbe ].TypeAttr =_ae .StylesType ;case _ae .ThemeTypeStrict :_aef .Relationship [_gbe ].TypeAttr =_ae .ThemeType ;case _ae .ControlTypeStrict :_aef .Relationship [_gbe ].TypeAttr =_ae .ControlType ;case _ae .SettingsTypeStrict :_aef .Relationship [_gbe ].TypeAttr =_ae .SettingsType ;case _ae .ImageTypeStrict :_aef .Relationship [_gbe ].TypeAttr =_ae .ImageType ;case _ae .CommentsTypeStrict :_aef .Relationship [_gbe ].TypeAttr =_ae .CommentsType ;case _ae .ThumbnailTypeStrict :_aef .Relationship [_gbe ].TypeAttr =_ae .ThumbnailType ;case _ae .DrawingTypeStrict :_aef .Relationship [_gbe ].TypeAttr =_ae .DrawingType ;case _ae .ChartTypeStrict :_aef .Relationship [_gbe ].TypeAttr =_ae .ChartType ;case _ae .ExtendedPropertiesTypeStrict :_aef .Relationship [_gbe ].TypeAttr =_ae .ExtendedPropertiesType ;case _ae .CustomXMLTypeStrict :_aef .Relationship [_gbe ].TypeAttr =_ae .CustomXMLType ;case _ae .WorksheetTypeStrict :_aef .Relationship [_gbe ].TypeAttr =_ae .WorksheetType ;case _ae .SharedStringsTypeStrict :_aef .Relationship [_gbe ].TypeAttr =_ae .SharedStringsType ;case _ae .TableTypeStrict :_aef .Relationship [_gbe ].TypeAttr =_ae .TableType ;case _ae .HeaderTypeStrict :_aef .Relationship [_gbe ].TypeAttr =_ae .HeaderType ;case _ae .FooterTypeStrict :_aef .Relationship [_gbe ].TypeAttr =_ae .FooterType ;case _ae .NumberingTypeStrict :_aef .Relationship [_gbe ].TypeAttr =_ae .NumberingType ;case _ae .FontTableTypeStrict :_aef .Relationship [_gbe ].TypeAttr =_ae .FontTableType ;case _ae .WebSettingsTypeStrict :_aef .Relationship [_gbe ].TypeAttr =_ae .WebSettingsType ;case _ae .FootNotesTypeStrict :_aef .Relationship [_gbe ].TypeAttr =_ae .FootNotesType ;case _ae .EndNotesTypeStrict :_aef .Relationship [_gbe ].TypeAttr =_ae .EndNotesType ;case _ae .SlideTypeStrict :_aef .Relationship [_gbe ].TypeAttr =_ae .SlideType ;case _ae .VMLDrawingTypeStrict :_aef .Relationship [_gbe ].TypeAttr =_ae .VMLDrawingType ;};};_f .Slice (_aef .Relationship ,func (_adg ,_cgd int )bool {_dce :=_aef .Relationship [_adg ];_ggd :=_aef .Relationship [_cgd ];return _fd .NaturalLess (_dce .IdAttr ,_ggd .IdAttr );});};return nil ;};
// OnNewRelationshipFunc is called when a new relationship has been discovered.
//
@ -48,23 +29,42 @@ func (_df *DecodeMap )AddTarget (filePath string ,ifc interface{},sourceFileType
// target doesn't match where unioffice will write the file (e.g. read in
// 'xl/worksheets/MyWorksheet.xml' and we'll write out
// 'xl/worksheets/sheet1.xml')
type OnNewRelationshipFunc func (_gc *DecodeMap ,_fd ,_fc string ,_ae []*_g .File ,_cd *_ee .Relationship ,_ba Target )error ;
// SelfClosingWriter wraps a writer and replaces XML tags of the
// type <foo></foo> with <foo/>
type SelfClosingWriter struct{W _cb .Writer ;};func (_ffg *DecodeMap )IndexFor (path string )int {return _ffg ._ff [path ]};
type OnNewRelationshipFunc func (_aa *DecodeMap ,_gg ,_cf string ,_ag []*_g .File ,_ea *_eb .Relationship ,_fbf Target )error ;
// SetOnNewRelationshipFunc sets the function to be called when a new
// relationship has been discovered.
func (_dd *DecodeMap )SetOnNewRelationshipFunc (fn OnNewRelationshipFunc ){_dd ._dg =fn };var _eba =[]byte {'/','>'};
// ExtractToDiskTmp extracts a zip file to a temporary file in a given path,
// returning the name of the file.
func ExtractToDiskTmp (f *_g .File ,path string )(string ,error ){_egc ,_dfb :=_cg .TempFile (path ,"\u007a\u007a");if _dfb !=nil {return "",_dfb ;};defer _egc .Close ();_ffe ,_dfb :=f .Open ();if _dfb !=nil {return "",_dfb ;};defer _ffe .Close ();_ ,_dfb =_cb .Copy (_egc ,_ffe );if _dfb !=nil {return "",_dfb ;};return _egc .Name (),nil ;};type Target struct{Path string ;Typ string ;Ifc interface{};Index uint32 ;};
func (_gge *DecodeMap )SetOnNewRelationshipFunc (fn OnNewRelationshipFunc ){_gge ._cc =fn };
// DecodeMap is used to walk a tree of relationships, decoding files and passing
// control back to the document.
type DecodeMap struct{_eed map[string ]Target ;_ab map[*_ee .Relationships ]string ;_ea []Target ;_dg OnNewRelationshipFunc ;_cf map[string ]struct{};_ff map[string ]int ;};var _ge =[]byte {'\r','\n'};
type DecodeMap struct{_eae map[string ]Target ;_dc map[*_eb .Relationships ]string ;_fc []Target ;_cc OnNewRelationshipFunc ;_ga map[string ]struct{};_agf map[string ]int ;};var _bce =[]byte {'/','>'};
// AddFileFromBytes takes a byte array and adds it at a given path to a zip file.
func AddFileFromBytes (z *_g .Writer ,zipPath string ,data []byte )error {_eg ,_deg :=z .Create (zipPath );if _deg !=nil {return _f .Errorf ("e\u0072\u0072\u006f\u0072 c\u0072e\u0061\u0074\u0069\u006e\u0067 \u0025\u0073\u003a\u0020\u0025\u0073",zipPath ,_deg );};_ ,_deg =_cb .Copy (_eg ,_dab .NewReader (data ));return _deg ;};
// RelationsPathFor returns the relations path for a given filename.
func RelationsPathFor (path string )string {_gc :=_e .Split (path ,"\u002f");_ba :=_e .Join (_gc [0:len (_gc )-1],"\u002f");_da :=_gc [len (_gc )-1];_ba +="\u002f_\u0072\u0065\u006c\u0073\u002f";_da +="\u002e\u0072\u0065l\u0073";return _ba +_da ;};var _ccc =[]byte {'\r','\n'};
// Decode loops decoding targets registered with AddTarget and calling th
func (_cd *DecodeMap )Decode (files []*_g .File )error {_cg :=1;for _cg > 0{for len (_cd ._fc )> 0{_ecf :=_cd ._fc [len (_cd ._fc )-1];_cd ._fc =_cd ._fc [0:len (_cd ._fc )-1];_ge :=_ecf .Ifc .(*_eb .Relationships );for _ ,_ad :=range _ge .Relationship {_ee ,_ :=_cd ._dc [_ge ];_cd ._cc (_cd ,_ee +_ad .TargetAttr ,_ad .TypeAttr ,files ,_ad ,_ecf );};};for _ebca ,_gad :=range files {if _gad ==nil {continue ;};if _ege ,_adf :=_cd ._eae [_gad .Name ];_adf {delete (_cd ._eae ,_gad .Name );if _gb :=Decode (_gad ,_ege .Ifc );_gb !=nil {return _gb ;};files [_ebca ]=nil ;if _gae ,_gag :=_ege .Ifc .(*_eb .Relationships );_gag {_cd ._fc =append (_cd ._fc ,_ege );_bb ,_ :=_fb .Split (_fb .Clean (_gad .Name +"\u002f\u002e\u002e\u002f"));_cd ._dc [_gae ]=_bb ;_cg ++;};};};_cg --;};return nil ;};
// ExtractToDiskTmp extracts a zip file to a temporary file in a given path,
// returning the name of the file.
func ExtractToDiskTmp (f *_g .File ,path string )(string ,error ){_adfe ,_cfa :=_eg .TempFile (path ,"\u007a\u007a");if _cfa !=nil {return "",_cfa ;};defer _adfe .Close ();_eac ,_cfa :=f .Open ();if _cfa !=nil {return "",_cfa ;};defer _eac .Close ();_ ,_cfa =_gd .Copy (_adfe ,_eac );if _cfa !=nil {return "",_cfa ;};return _adfe .Name (),nil ;};type Target struct{Path string ;Typ string ;Ifc interface{};Index uint32 ;};
// MarshalXML creates a file inside of a zip and marshals an object as xml, prefixing it
// with a standard XML header.
func MarshalXML (z *_g .Writer ,filename string ,v interface{})error {_ab :=&_g .FileHeader {};_ab .Method =_g .Deflate ;_ab .Name =filename ;_ab .SetModTime (_b .Now ());_agb ,_egc :=z .CreateHeader (_ab );if _egc !=nil {return _c .Errorf ("\u0063\u0072\u0065\u0061ti\u006e\u0067\u0020\u0025\u0073\u0020\u0069\u006e\u0020\u007a\u0069\u0070\u003a\u0020%\u0073",filename ,_egc );};_ ,_egc =_agb .Write ([]byte (XMLHeader ));if _egc !=nil {return _c .Errorf ("\u0063\u0072e\u0061\u0074\u0069\u006e\u0067\u0020\u0078\u006d\u006c\u0020\u0068\u0065\u0061\u0064\u0065\u0072\u0020\u0074\u006f\u0020\u0025\u0073: \u0025\u0073",filename ,_egc );};if _egc =_bc .NewEncoder (SelfClosingWriter {_agb }).Encode (v );_egc !=nil {return _c .Errorf ("\u006d\u0061\u0072\u0073\u0068\u0061\u006c\u0069\u006e\u0067\u0020\u0025s\u003a\u0020\u0025\u0073",filename ,_egc );};_ ,_egc =_agb .Write (_ccc );return _egc ;};
// AddTarget allows documents to register decode targets. Path is a path that
// will be found in the zip file and ifc is an XML element that the file will be
// unmarshaled to. filePath is the absolute path to the target, ifc is the
// object to decode into, sourceFileType is the type of file that the reference
// was discovered in, and index is the index of the source file type.
func (_gde *DecodeMap )AddTarget (filePath string ,ifc interface{},sourceFileType string ,idx uint32 )bool {if _gde ._eae ==nil {_gde ._eae =make (map[string ]Target );_gde ._dc =make (map[*_eb .Relationships ]string );_gde ._ga =make (map[string ]struct{});_gde ._agf =make (map[string ]int );};_de :=_fb .Clean (filePath );if _ ,_ebc :=_gde ._ga [_de ];_ebc {return false ;};_gde ._ga [_de ]=struct{}{};_gde ._eae [_de ]=Target {Path :filePath ,Typ :sourceFileType ,Ifc :ifc ,Index :idx };return true ;};func MarshalXMLByTypeIndex (z *_g .Writer ,dt _ae .DocType ,typ string ,idx int ,v interface{})error {_ca :=_ae .AbsoluteFilename (dt ,typ ,idx );return MarshalXML (z ,_ca ,v );};const XMLHeader ="\u003c\u003f\u0078\u006d\u006c\u0020\u0076e\u0072\u0073\u0069o\u006e\u003d\u00221\u002e\u0030\"\u0020\u0065\u006e\u0063\u006f\u0064i\u006eg=\u0022\u0055\u0054\u0046\u002d\u0038\u0022\u0020\u0073\u0074\u0061\u006e\u0064\u0061\u006c\u006f\u006e\u0065\u003d\u0022\u0079\u0065\u0073\u0022\u003f\u003e"+"\u000a";
// SelfClosingWriter wraps a writer and replaces XML tags of the
// type <foo></foo> with <foo/>
type SelfClosingWriter struct{W _gd .Writer ;};
// AddFileFromDisk reads a file from internal storage and adds it at a given path to a zip file.
// TODO: Rename to AddFileFromStorage in next major version release (v2).
// NOTE: If disk storage cannot be used, memory storage can be used instead by calling memstore.SetAsStorage().
func AddFileFromDisk (z *_g .Writer ,zipPath ,storagePath string )error {_ac ,_fca :=z .Create (zipPath );if _fca !=nil {return _c .Errorf ("e\u0072\u0072\u006f\u0072 c\u0072e\u0061\u0074\u0069\u006e\u0067 \u0025\u0073\u003a\u0020\u0025\u0073",zipPath ,_fca );};_fa ,_fca :=_eg .Open (storagePath );if _fca !=nil {return _c .Errorf ("e\u0072r\u006f\u0072\u0020\u006f\u0070\u0065\u006e\u0069n\u0067\u0020\u0025\u0073: \u0025\u0073",storagePath ,_fca );};defer _fa .Close ();_ ,_fca =_gd .Copy (_ac ,_fa );return _fca ;};