prepare release

This commit is contained in:
UniDoc Build 2021-06-16 07:10:52 +00:00
parent ccc7f1a065
commit af0572acdd
50 changed files with 24278 additions and 24181 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 _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'};
package algo ;import _c "strconv";
// NaturalLess compares two strings in a human manner so rId2 sorts less than rId10
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 );};
func NaturalLess (lhs ,rhs string )bool {_g ,_b :=0,0;for _g < len (lhs )&&_b < len (rhs ){_ga :=lhs [_g ];_ae :=rhs [_b ];_cb :=_f (_ga );_fe :=_f (_ae );switch {case _cb &&!_fe :return true ;case !_cb &&_fe :return false ;case !_cb &&!_fe :if _ga !=_ae {return _ga < _ae ;};_g ++;_b ++;default:_cd :=_g +1;_aeb :=_b +1;for _cd < len (lhs )&&_f (lhs [_cd ]){_cd ++;};for _aeb < len (rhs )&&_f (rhs [_aeb ]){_aeb ++;};_e ,_ :=_c .ParseUint (lhs [_g :_cd ],10,64);_da ,_ :=_c .ParseUint (rhs [_g :_aeb ],10,64);if _e !=_da {return _e < _da ;};_g =_cd ;_b =_aeb ;};};return len (lhs )< len (rhs );};func _f (_d byte )bool {return _d >='0'&&_d <='9'};func RepeatString (s string ,cnt int )string {if cnt <=0{return "";};_ea :=make ([]byte ,len (s )*cnt );_eg :=[]byte (s );for _ac :=0;_ac < cnt ;_ac ++{copy (_ea [_ac :],_eg );};return string (_ea );};

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 (_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 (_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 ;};
package chart ;import (_g "fmt";_d "github.com/unidoc/unioffice";_gg "github.com/unidoc/unioffice/color";_ab "github.com/unidoc/unioffice/drawing";_af "github.com/unidoc/unioffice/measurement";_da "github.com/unidoc/unioffice/schema/soo/dml";_a "github.com/unidoc/unioffice/schema/soo/dml/chart";_aa "math/rand";);type nullAxis byte ;
// 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 (_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 (_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 (_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 (_ddg GridLines )X ()*_e .CT_ChartLines {return _ddg ._fgcf };
// 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 ;};};
func (_edf BubbleChartSeries )X ()*_a .CT_BubbleSer {return _edf ._bf };
// SetLabelReference is used to set the source data to a range of cells
// containing strings.
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 ;};
func (_cddc CategoryAxisDataSource )SetLabelReference (s string ){_cddc ._efb .Choice =_a .NewCT_AxDataSourceChoice ();_cddc ._efb .Choice .StrRef =_a .NewCT_StrRef ();_cddc ._efb .Choice .StrRef .F =s ;};func (_gbf DateAxis )SetPosition (p _a .ST_AxPos ){_gbf ._ffgc .AxPos =_a .NewCT_AxPos ();_gbf ._ffgc .AxPos .ValAttr =p ;};
// InitializeDefaults the bar chart to its defaults
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 (_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 (_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 ;};
// 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 };};
// SetOrder sets the order of the series
func (_gfd ScatterChartSeries )SetOrder (idx uint32 ){_gfd ._abfbf .Order .ValAttr =idx };
// Index returns the index of the series
func (_fbg ScatterChartSeries )Index ()uint32 {return _fbg ._egge .Idx .ValAttr };
func (_cac LineChartSeries )Index ()uint32 {return _cac ._cddd .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 ;};
// CategoryAxis returns the category data source.
func (_bde RadarChartSeries )CategoryAxis ()CategoryAxisDataSource {if _bde ._dafe .Cat ==nil {_bde ._dafe .Cat =_a .NewCT_AxDataSource ();};return MakeAxisDataSource (_bde ._dafe .Cat );};func (_ec CategoryAxis )SetPosition (p _a .ST_AxPos ){_ec ._abe .AxPos =_a .NewCT_AxPos ();_ec ._abe .AxPos .ValAttr =p ;};func (_ea nullAxis )AxisID ()uint32 {return 0};
// 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 ;};};
func (_agc RadarChartSeries )Values ()NumberDataSource {if _agc ._dafe .Val ==nil {_agc ._dafe .Val =_a .NewCT_NumDataSource ();};return MakeNumberDataSource (_agc ._dafe .Val );};
// 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 ;};
// AddBar3DChart adds a new 3D bar chart to a chart.
func (_fc Chart )AddBar3DChart ()Bar3DChart {_dad (_fc ._bcd .Chart );_cff :=_a .NewCT_PlotAreaChoice ();_fc ._bcd .Chart .PlotArea .Choice =append (_fc ._bcd .Chart .PlotArea .Choice ,_cff );_cff .Bar3DChart =_a .NewCT_Bar3DChart ();_cff .Bar3DChart .Grouping =_a .NewCT_BarGrouping ();_cff .Bar3DChart .Grouping .ValAttr =_a .ST_BarGroupingStandard ;_dfe :=Bar3DChart {_ed :_cff .Bar3DChart };_dfe .InitializeDefaults ();return _dfe ;};
// 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 };};
// BubbleChart is a 2D Bubble chart.
type BubbleChart struct{chartBase ;_gcg *_a .CT_BubbleChart ;};
// 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 ;};
// Properties returns the line chart series shape properties.
func (_deb SurfaceChartSeries )Properties ()_ab .ShapeProperties {if _deb ._bdd .SpPr ==nil {_deb ._bdd .SpPr =_da .NewCT_ShapeProperties ();};return _ab .MakeShapeProperties (_deb ._bdd .SpPr );};type NumberDataSource struct{_feb *_a .CT_NumDataSource };func MakeLegend (l *_a .CT_Legend )Legend {return Legend {l }};
// 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 ;};
// AddArea3DChart adds a new area chart to a chart.
func (_bae Chart )AddArea3DChart ()Area3DChart {_dad (_bae ._bcd .Chart );_ggf :=_a .NewCT_PlotAreaChoice ();_bae ._bcd .Chart .PlotArea .Choice =append (_bae ._bcd .Chart .PlotArea .Choice ,_ggf );_ggf .Area3DChart =_a .NewCT_Area3DChart ();_ddf :=Area3DChart {_gb :_ggf .Area3DChart };_ddf .InitializeDefaults ();return _ddf ;};
// X returns the inner wrapped XML type.
func (_fcd SeriesAxis )X ()*_e .CT_SerAx {return _fcd ._faac };
func (_bggd SurfaceChartSeries )X ()*_a .CT_SurfaceSer {return _bggd ._bdd };
// SetIndex sets the index of the series
func (_gadf ScatterChartSeries )SetIndex (idx uint32 ){_gadf ._abfbf .Idx .ValAttr =idx };
// BarChartSeries is a series to be used on a bar chart.
type BarChartSeries struct{_gfg *_a .CT_BarSer };
// InitializeDefaults the Stock chart to its defaults
func (_bda StockChart )InitializeDefaults (){_bda ._acge .HiLowLines =_a .NewCT_ChartLines ();_bda ._acge .UpDownBars =_a .NewCT_UpDownBars ();_bda ._acge .UpDownBars .GapWidth =_a .NewCT_GapAmount ();_bda ._acge .UpDownBars .GapWidth .ValAttr =&_a .ST_GapAmount {};_bda ._acge .UpDownBars .GapWidth .ValAttr .ST_GapAmountUShort =_d .Uint16 (150);_bda ._acge .UpDownBars .UpBars =_a .NewCT_UpDownBar ();_bda ._acge .UpDownBars .DownBars =_a .NewCT_UpDownBar ();};func (_cabd ValueAxis )Properties ()_ab .ShapeProperties {if _cabd ._adaf .SpPr ==nil {_cabd ._adaf .SpPr =_da .NewCT_ShapeProperties ();};return _ab .MakeShapeProperties (_cabd ._adaf .SpPr );};func MakeValueAxis (x *_a .CT_ValAx )ValueAxis {return ValueAxis {x }};
// RadarChart is an Radar chart that has a shaded Radar underneath a curve.
type RadarChart struct{chartBase ;_edc *_a .CT_RadarChart ;};func (_cgb Legend )SetPosition (p _a .ST_LegendPos ){if p ==_a .ST_LegendPosUnset {_cgb ._eedf .LegendPos =nil ;}else {_cgb ._eedf .LegendPos =_a .NewCT_LegendPos ();_cgb ._eedf .LegendPos .ValAttr =p ;};};func (_ge Bar3DChart )AddAxis (axis Axis ){_aad :=_a .NewCT_UnsignedInt ();_aad .ValAttr =axis .AxisID ();_ge ._ed .AxId =append (_ge ._ed .AxId ,_aad );};
// SetNumberReference is used to set the source data to a range of cells containing
// numbers.
func (_ba CategoryAxisDataSource )SetNumberReference (s string ){_ba ._efb .Choice =_a .NewCT_AxDataSourceChoice ();_ba ._efb .Choice .NumRef =_a .NewCT_NumRef ();_ba ._efb .Choice .NumRef .F =s ;};type DataLabels struct{_ddb *_a .CT_DLbls };func (_gab chartBase )nextColor (_ada int )_gg .Color {return _eed [_ada %len (_eed )]};func (_faa DateAxis )SetMinorTickMark (m _a .ST_TickMark ){if m ==_a .ST_TickMarkUnset {_faa ._ffgc .MinorTickMark =nil ;}else {_faa ._ffgc .MinorTickMark =_a .NewCT_TickMark ();_faa ._ffgc .MinorTickMark .ValAttr =m ;};};type Legend struct{_eedf *_a .CT_Legend };
// Properties returns the bar chart series shape properties.
func (_be AreaChartSeries )Properties ()_ab .ShapeProperties {if _be ._dg .SpPr ==nil {_be ._dg .SpPr =_da .NewCT_ShapeProperties ();};return _ab .MakeShapeProperties (_be ._dg .SpPr );};
// 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 ;};
func (_gdg Line3DChart )X ()*_a .CT_Line3DChart {return _gdg ._cde };func (_fef DateAxis )SetTickLabelPosition (p _a .ST_TickLblPos ){if p ==_a .ST_TickLblPosUnset {_fef ._ffgc .TickLblPos =nil ;}else {_fef ._ffgc .TickLblPos =_a .NewCT_TickLblPos ();_fef ._ffgc .TickLblPos .ValAttr =p ;};};
// ScatterChartSeries is the data series for a scatter chart.
type ScatterChartSeries struct{_egge *_e .CT_ScatterSer };
type ScatterChartSeries struct{_abfbf *_a .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 ;};};
// AddPieChart adds a new pie chart to a chart.
func (_agb Chart )AddPieChart ()PieChart {_gdac :=_a .NewCT_PlotAreaChoice ();_agb ._bcd .Chart .PlotArea .Choice =append (_agb ._bcd .Chart .PlotArea .Choice ,_gdac );_gdac .PieChart =_a .NewCT_PieChart ();_dga :=PieChart {_efd :_gdac .PieChart };_dga .InitializeDefaults ();return _dga ;};func (_add DateAxis )Properties ()_ab .ShapeProperties {if _add ._ffgc .SpPr ==nil {_add ._ffgc .SpPr =_da .NewCT_ShapeProperties ();};return _ab .MakeShapeProperties (_add ._ffgc .SpPr );};
// CategoryAxis returns the category data source.
func (_gc BarChartSeries )CategoryAxis ()CategoryAxisDataSource {if _gc ._gfg .Cat ==nil {_gc ._gfg .Cat =_a .NewCT_AxDataSource ();};return MakeAxisDataSource (_gc ._gfg .Cat );};
// PieChart is a Pie chart.
type PieChart struct{chartBase ;_efd *_a .CT_PieChart ;};func (_dbd Marker )SetSymbol (s _a .ST_MarkerStyle ){if s ==_a .ST_MarkerStyleUnset {_dbd ._gac .Symbol =nil ;}else {_dbd ._gac .Symbol =_a .NewCT_MarkerStyle ();_dbd ._gac .Symbol .ValAttr =s ;};};func _dad (_bbf *_a .CT_Chart ){_bbf .View3D =_a .NewCT_View3D ();_bbf .View3D .RotX =_a .NewCT_RotX ();_bbf .View3D .RotX .ValAttr =_d .Int8 (15);_bbf .View3D .RotY =_a .NewCT_RotY ();_bbf .View3D .RotY .ValAttr =_d .Uint16 (20);_bbf .View3D .RAngAx =_a .NewCT_Boolean ();_bbf .View3D .RAngAx .ValAttr =_d .Bool (false );_bbf .Floor =_a .NewCT_Surface ();_bbf .Floor .Thickness =_a .NewCT_Thickness ();_bbf .Floor .Thickness .ValAttr .Uint32 =_d .Uint32 (0);_bbf .SideWall =_a .NewCT_Surface ();_bbf .SideWall .Thickness =_a .NewCT_Thickness ();_bbf .SideWall .Thickness .ValAttr .Uint32 =_d .Uint32 (0);_bbf .BackWall =_a .NewCT_Surface ();_bbf .BackWall .Thickness =_a .NewCT_Thickness ();_bbf .BackWall .Thickness .ValAttr .Uint32 =_d .Uint32 (0);};func (_gee CategoryAxis )Properties ()_ab .ShapeProperties {if _gee ._abe .SpPr ==nil {_gee ._abe .SpPr =_da .NewCT_ShapeProperties ();};return _ab .MakeShapeProperties (_gee ._abe .SpPr );};func (_bcb LineChartSeries )InitializeDefaults (){_bcb .Properties ().LineProperties ().SetWidth (1*_af .Point );_bcb .Properties ().LineProperties ().SetSolidFill (_gg .Black );_bcb .Properties ().LineProperties ().SetJoin (_ab .LineJoinRound );_bcb .Marker ().SetSymbol (_a .ST_MarkerStyleNone );_bcb .Labels ().SetShowLegendKey (false );_bcb .Labels ().SetShowValue (false );_bcb .Labels ().SetShowPercent (false );_bcb .Labels ().SetShowCategoryName (false );_bcb .Labels ().SetShowSeriesName (false );_bcb .Labels ().SetShowLeaderLines (false );};func (_gfbbc NumberDataSource )SetReference (s string ){_gfbbc .ensureChoice ();if _gfbbc ._feb .Choice .NumRef ==nil {_gfbbc ._feb .Choice .NumRef =_a .NewCT_NumRef ();};_gfbbc ._feb .Choice .NumRef .F =s ;};
// PieChartSeries is a series to be used on an Pie chart.
type PieChartSeries struct{_afeg *_a .CT_PieSer };func (_eaa Surface3DChart )InitializeDefaults (){_eaa ._bef .Wireframe =_a .NewCT_Boolean ();_eaa ._bef .Wireframe .ValAttr =_d .Bool (false );_eaa ._bef .BandFmts =_a .NewCT_BandFmts ();for _aef :=0;_aef < 15;_aef ++{_fceb :=_a .NewCT_BandFmt ();_fceb .Idx .ValAttr =uint32 (_aef );_fceb .SpPr =_da .NewCT_ShapeProperties ();_ggcg :=_ab .MakeShapeProperties (_fceb .SpPr );_ggcg .SetSolidFill (_eaa .nextColor (_aef ));_eaa ._bef .BandFmts .BandFmt =append (_eaa ._bef .BandFmts .BandFmt ,_fceb );};};func (_bedg DataLabels )SetShowSeriesName (b bool ){_bedg .ensureChoice ();_bedg ._ddb .Choice .ShowSerName =_a .NewCT_Boolean ();_bedg ._ddb .Choice .ShowSerName .ValAttr =_d .Bool (b );};
// AddDoughnutChart adds a new doughnut (pie with a hole in the center) chart to a chart.
func (_gbg Chart )AddDoughnutChart ()DoughnutChart {_ggc :=_a .NewCT_PlotAreaChoice ();_gbg ._bcd .Chart .PlotArea .Choice =append (_gbg ._bcd .Chart .PlotArea .Choice ,_ggc );_ggc .DoughnutChart =_a .NewCT_DoughnutChart ();_ffd :=DoughnutChart {_bbc :_ggc .DoughnutChart };_ffd .InitializeDefaults ();return _ffd ;};
// InitializeDefaults the bar chart to its defaults
func (_fce Pie3DChart )InitializeDefaults (){_fce ._cacc .VaryColors =_e .NewCT_Boolean ();_fce ._cacc .VaryColors .ValAttr =_fe .Bool (true );};
func (_dcaa Pie3DChart )InitializeDefaults (){_dcaa ._aae .VaryColors =_a .NewCT_Boolean ();_dcaa ._aae .VaryColors .ValAttr =_d .Bool (true );};func (_gae Legend )InitializeDefaults (){_gae .SetPosition (_a .ST_LegendPosR );_gae .SetOverlay (false );_gae .Properties ().SetNoFill ();_gae .Properties ().LineProperties ().SetNoFill ();};func (_egbd ValueAxis )SetMajorTickMark (m _a .ST_TickMark ){if m ==_a .ST_TickMarkUnset {_egbd ._adaf .MajorTickMark =nil ;}else {_egbd ._adaf .MajorTickMark =_a .NewCT_TickMark ();_egbd ._adaf .MajorTickMark .ValAttr =m ;};};
// X returns the inner wrapped XML type.
func (_b Area3DChart )X ()*_e .CT_Area3DChart {return _b ._cg };
func (_cdd BubbleChart )X ()*_a .CT_BubbleChart {return _cdd ._gcg };func (_eee BubbleChart )AddAxis (axis Axis ){_edb :=_a .NewCT_UnsignedInt ();_edb .ValAttr =axis .AxisID ();_eee ._gcg .AxId =append (_eee ._gcg .AxId ,_edb );};func (_ddea ScatterChart )InitializeDefaults (){_ddea ._ecf .ScatterStyle .ValAttr =_a .ST_ScatterStyleMarker ;};
// 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 (_fgb SurfaceChartSeries )SetText (s string ){_fgb ._bdd .Tx =_a .NewCT_SerTx ();_fgb ._bdd .Tx .Choice .V =&s ;};
// X returns the inner wrapped XML type.
func (_ced LineChartSeries )X ()*_a .CT_LineSer {return _ced ._cddd };
// Values returns the value data source.
func (_gbee BubbleChartSeries )Values ()NumberDataSource {if _gbee ._bf .YVal ==nil {_gbee ._bf .YVal =_a .NewCT_NumDataSource ();};return MakeNumberDataSource (_gbee ._bf .YVal );};
// AddDateAxis adds a value axis to the chart.
func (_fa Chart )AddDateAxis ()DateAxis {_dda :=_a .NewCT_DateAx ();if _fa ._bcd .Chart .PlotArea .CChoice ==nil {_fa ._bcd .Chart .PlotArea .CChoice =_a .NewCT_PlotAreaChoice1 ();};_dda .AxId =_a .NewCT_UnsignedInt ();_dda .AxId .ValAttr =0x7FFFFFFF&_aa .Uint32 ();_fa ._bcd .Chart .PlotArea .CChoice .DateAx =append (_fa ._bcd .Chart .PlotArea .CChoice .DateAx ,_dda );_dda .Delete =_a .NewCT_Boolean ();_dda .Delete .ValAttr =_d .Bool (false );_dda .Scaling =_a .NewCT_Scaling ();_dda .Scaling .Orientation =_a .NewCT_Orientation ();_dda .Scaling .Orientation .ValAttr =_a .ST_OrientationMinMax ;_dda .Choice =&_a .EG_AxSharedChoice {};_dda .Choice .Crosses =_a .NewCT_Crosses ();_dda .Choice .Crosses .ValAttr =_a .ST_CrossesAutoZero ;_ecc :=DateAxis {_dda };_ecc .MajorGridLines ().Properties ().LineProperties ().SetSolidFill (_gg .LightGray );_ecc .SetMajorTickMark (_a .ST_TickMarkOut );_ecc .SetMinorTickMark (_a .ST_TickMarkIn );_ecc .SetTickLabelPosition (_a .ST_TickLblPosNextTo );_ecc .Properties ().LineProperties ().SetSolidFill (_gg .Black );_ecc .SetPosition (_a .ST_AxPosL );return _ecc ;};
// AreaChart is an area chart that has a shaded area underneath a curve.
type AreaChart struct{chartBase ;_ggg *_a .CT_AreaChart ;};
// 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)};
func (_fcbf PieChartSeries )SetText (s string ){_fcbf ._afeg .Tx =_a .NewCT_SerTx ();_fcbf ._afeg .Tx .Choice .V =&s ;};func (_gbdc DataLabels )SetShowPercent (b bool ){_gbdc .ensureChoice ();_gbdc ._ddb .Choice .ShowPercent =_a .NewCT_Boolean ();_gbdc ._ddb .Choice .ShowPercent .ValAttr =_d .Bool (b );};
// X returns the inner wrapped XML type.
func (_gcf ScatterChartSeries )X ()*_a .CT_ScatterSer {return _gcf ._abfbf };
// X returns the inner wrapped XML type.
func (_dbg Legend )X ()*_a .CT_Legend {return _dbg ._eedf };func (_cgbg StockChart )AddAxis (axis Axis ){_ccda :=_a .NewCT_UnsignedInt ();_ccda .ValAttr =axis .AxisID ();_cgbg ._acge .AxId =append (_cgbg ._acge .AxId ,_ccda );};func (_gage DateAxis )SetMajorTickMark (m _a .ST_TickMark ){if m ==_a .ST_TickMarkUnset {_gage ._ffgc .MajorTickMark =nil ;}else {_gage ._ffgc .MajorTickMark =_a .NewCT_TickMark ();_gage ._ffgc .MajorTickMark .ValAttr =m ;};};
// AddAreaChart adds a new area chart to a chart.
func (_cb Chart )AddAreaChart ()AreaChart {_cgc :=_a .NewCT_PlotAreaChoice ();_cb ._bcd .Chart .PlotArea .Choice =append (_cb ._bcd .Chart .PlotArea .Choice ,_cgc );_cgc .AreaChart =_a .NewCT_AreaChart ();_fee :=AreaChart {_ggg :_cgc .AreaChart };_fee .InitializeDefaults ();return _fee ;};type SurfaceChartSeries struct{_bdd *_a .CT_SurfaceSer };
// AddPie3DChart adds a new pie chart to a chart.
func (_dcf Chart )AddPie3DChart ()Pie3DChart {_dad (_dcf ._bcd .Chart );_afc :=_a .NewCT_PlotAreaChoice ();_dcf ._bcd .Chart .PlotArea .Choice =append (_dcf ._bcd .Chart .PlotArea .Choice ,_afc );_afc .Pie3DChart =_a .NewCT_Pie3DChart ();_fce :=Pie3DChart {_aae :_afc .Pie3DChart };_fce .InitializeDefaults ();return _fce ;};func MakeDataLabels (x *_a .CT_DLbls )DataLabels {return DataLabels {x }};
// AddCategoryAxis adds a category axis.
func (_gbb Chart )AddCategoryAxis ()CategoryAxis {_abb :=_a .NewCT_CatAx ();if _gbb ._bcd .Chart .PlotArea .CChoice ==nil {_gbb ._bcd .Chart .PlotArea .CChoice =_a .NewCT_PlotAreaChoice1 ();};_abb .AxId =_a .NewCT_UnsignedInt ();_abb .AxId .ValAttr =0x7FFFFFFF&_aa .Uint32 ();_gbb ._bcd .Chart .PlotArea .CChoice .CatAx =append (_gbb ._bcd .Chart .PlotArea .CChoice .CatAx ,_abb );_abb .Auto =_a .NewCT_Boolean ();_abb .Auto .ValAttr =_d .Bool (true );_abb .Delete =_a .NewCT_Boolean ();_abb .Delete .ValAttr =_d .Bool (false );_acf :=MakeCategoryAxis (_abb );_acf .InitializeDefaults ();return _acf ;};
// PieOfPieChart is a Pie chart with an extra Pie chart.
type PieOfPieChart struct{chartBase ;_dbb *_a .CT_OfPieChart ;};func (_beg Marker )Properties ()_ab .ShapeProperties {if _beg ._gac .SpPr ==nil {_beg ._gac .SpPr =_da .NewCT_ShapeProperties ();};return _ab .MakeShapeProperties (_beg ._gac .SpPr );};func (_efbc SurfaceChartSeries )InitializeDefaults (){_efbc .Properties ().LineProperties ().SetWidth (1*_af .Point );_efbc .Properties ().LineProperties ().SetSolidFill (_gg .Black );_efbc .Properties ().LineProperties ().SetJoin (_ab .LineJoinRound );};
// X returns the inner wrapped XML type.
func (_ee Bar3DChart )X ()*_a .CT_Bar3DChart {return _ee ._ed };
// MakeAxisDataSource constructs an AxisDataSource wrapper.
func MakeAxisDataSource (x *_a .CT_AxDataSource )CategoryAxisDataSource {return CategoryAxisDataSource {x };};
// AreaChartSeries is a series to be used on an area chart.
type AreaChartSeries struct{_dg *_a .CT_AreaSer };
// AddLegend adds a legend to a chart, replacing any existing legend.
func (_fcb Chart )AddLegend ()Legend {_fcb ._bcd .Chart .Legend =_a .NewCT_Legend ();_fac :=MakeLegend (_fcb ._bcd .Chart .Legend );_fac .InitializeDefaults ();return _fac ;};
// SetExplosion sets the value that the segements of the pie are 'exploded' by
func (_acb PieChartSeries )SetExplosion (v uint32 ){_acb ._afeg .Explosion =_a .NewCT_UnsignedInt ();_acb ._afeg .Explosion .ValAttr =v ;};
// Properties returns the chart's shape properties.
func (_agba Chart )Properties ()_ab .ShapeProperties {if _agba ._bcd .SpPr ==nil {_agba ._bcd .SpPr =_da .NewCT_ShapeProperties ();};return _ab .MakeShapeProperties (_agba ._bcd .SpPr );};
// SetHoleSize controls the hole size in the pie chart and is measured in percent.
func (_cdca DoughnutChart )SetHoleSize (pct uint8 ){if _cdca ._bbc .HoleSize ==nil {_cdca ._bbc .HoleSize =_a .NewCT_HoleSize ();};if _cdca ._bbc .HoleSize .ValAttr ==nil {_cdca ._bbc .HoleSize .ValAttr =&_a .ST_HoleSize {};};_cdca ._bbc .HoleSize .ValAttr .ST_HoleSizeUByte =&pct ;};
// BarChart is a 2D bar chart.
type BarChart struct{chartBase ;_ffg *_a .CT_BarChart ;};
// AddSeries adds a default series to an Radar chart.
func (_gfbea RadarChart )AddSeries ()RadarChartSeries {_aac :=_gfbea .nextColor (len (_gfbea ._edc .Ser ));_cfe :=_a .NewCT_RadarSer ();_gfbea ._edc .Ser =append (_gfbea ._edc .Ser ,_cfe );_cfe .Idx .ValAttr =uint32 (len (_gfbea ._edc .Ser )-1);_cfe .Order .ValAttr =uint32 (len (_gfbea ._edc .Ser )-1);_fadd :=RadarChartSeries {_cfe };_fadd .InitializeDefaults ();_fadd .Properties ().SetSolidFill (_aac );return _fadd ;};
// X returns the inner wrapped XML type.
func (_afff Chart )X ()*_a .ChartSpace {return _afff ._bcd };type ValueAxis struct{_adaf *_a .CT_ValAx };func (_bffbb ValueAxis )AxisID ()uint32 {return _bffbb ._adaf .AxId .ValAttr };
// InitializeDefaults the Bubble chart to its defaults
func (_aec BubbleChart )InitializeDefaults (){};
// AddAxis adds an axis to a line chart.
func (_abeg Line3DChart )AddAxis (axis Axis ){_gcb :=_a .NewCT_UnsignedInt ();_gcb .ValAttr =axis .AxisID ();_abeg ._cde .AxId =append (_abeg ._cde .AxId ,_gcb );};func (_gge DateAxis )AxisID ()uint32 {return _gge ._ffgc .AxId .ValAttr };
// AddSeries adds a default series to an Pie3D chart.
func (_bdb Pie3DChart )AddSeries ()PieChartSeries {_cfa :=_a .NewCT_PieSer ();_bdb ._aae .Ser =append (_bdb ._aae .Ser ,_cfa );_cfa .Idx .ValAttr =uint32 (len (_bdb ._aae .Ser )-1);_cfa .Order .ValAttr =uint32 (len (_bdb ._aae .Ser )-1);_bcaf :=PieChartSeries {_cfa };_bcaf .InitializeDefaults ();return _bcaf ;};
// Values returns the value data source.
func (_gfgb PieChartSeries )Values ()NumberDataSource {if _gfgb ._afeg .Val ==nil {_gfgb ._afeg .Val =_a .NewCT_NumDataSource ();};return MakeNumberDataSource (_gfgb ._afeg .Val );};func (_bdef ScatterChartSeries )InitializeDefaults (){_bdef .Properties ().LineProperties ().SetNoFill ();_bdef .Marker ().SetSymbol (_a .ST_MarkerStyleAuto );_bdef .Labels ().SetShowLegendKey (false );_bdef .Labels ().SetShowValue (true );_bdef .Labels ().SetShowPercent (false );_bdef .Labels ().SetShowCategoryName (false );_bdef .Labels ().SetShowSeriesName (false );_bdef .Labels ().SetShowLeaderLines (false );};
// 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 }};
func (_fcbd ScatterChartSeries )Marker ()Marker {if _fcbd ._abfbf .Marker ==nil {_fcbd ._abfbf .Marker =_a .NewCT_Marker ();};return MakeMarker (_fcbd ._abfbf .Marker );};
// Properties returns the bar chart series shape properties.
func (_fg BarChartSeries )Properties ()_ab .ShapeProperties {if _fg ._gfg .SpPr ==nil {_fg ._gfg .SpPr =_da .NewCT_ShapeProperties ();};return _ab .MakeShapeProperties (_fg ._gfg .SpPr );};
// Bar3DChart is a 3D bar chart.
type Bar3DChart struct{chartBase ;_ed *_a .CT_Bar3DChart ;};
// X returns the inner wrapped XML type.
func (_fad PieOfPieChart )X ()*_a .CT_OfPieChart {return _fad ._dbb };
// AddLine3DChart adds a new 3D line chart to a chart.
func (_gag Chart )AddLine3DChart ()Line3DChart {_dad (_gag ._bcd .Chart );_gda :=_a .NewCT_PlotAreaChoice ();_gag ._bcd .Chart .PlotArea .Choice =append (_gag ._bcd .Chart .PlotArea .Choice ,_gda );_gda .Line3DChart =_a .NewCT_Line3DChart ();_gda .Line3DChart .Grouping =_a .NewCT_Grouping ();_gda .Line3DChart .Grouping .ValAttr =_a .ST_GroupingStandard ;return Line3DChart {_cde :_gda .Line3DChart };};
// X returns the inner wrapped XML type.
func (_ce DoughnutChart )X ()*_a .CT_DoughnutChart {return _ce ._bbc };func (_cfb AreaChart )AddAxis (axis Axis ){_cce :=_a .NewCT_UnsignedInt ();_cce .ValAttr =axis .AxisID ();_cfb ._ggg .AxId =append (_cfb ._ggg .AxId ,_cce );};
// RadarChartSeries is a series to be used on an Radar chart.
type RadarChartSeries struct{_dafe *_a .CT_RadarSer };var _eed =[]_gg .Color {_gg .RGB (0x33,0x66,0xcc),_gg .RGB (0xDC,0x39,0x12),_gg .RGB (0xFF,0x99,0x00),_gg .RGB (0x10,0x96,0x18),_gg .RGB (0x99,0x00,0x99),_gg .RGB (0x3B,0x3E,0xAC),_gg .RGB (0x00,0x99,0xC6),_gg .RGB (0xDD,0x44,0x77),_gg .RGB (0x66,0xAA,0x00),_gg .RGB (0xB8,0x2E,0x2E),_gg .RGB (0x31,0x63,0x95),_gg .RGB (0x99,0x44,0x99),_gg .RGB (0x22,0xAA,0x99),_gg .RGB (0xAA,0xAA,0x11),_gg .RGB (0x66,0x33,0xCC),_gg .RGB (0xE6,0x73,0x00),_gg .RGB (0x8B,0x07,0x07),_gg .RGB (0x32,0x92,0x62),_gg .RGB (0x55,0x74,0xA6),_gg .RGB (0x3B,0x3E,0xAC)};
// X returns the inner wrapped XML type.
func (_dfc BarChart )X ()*_a .CT_BarChart {return _dfc ._ffg };func (_ega CategoryAxis )MajorGridLines ()GridLines {if _ega ._abe .MajorGridlines ==nil {_ega ._abe .MajorGridlines =_a .NewCT_ChartLines ();};return GridLines {_ega ._abe .MajorGridlines };};
// Values returns the bubble size data source.
func (_cfc BubbleChartSeries )BubbleSizes ()NumberDataSource {if _cfc ._bf .BubbleSize ==nil {_cfc ._bf .BubbleSize =_a .NewCT_NumDataSource ();};return MakeNumberDataSource (_cfc ._bf .BubbleSize );};func MakeMarker (x *_a .CT_Marker )Marker {return Marker {x }};func (_ead CategoryAxis )SetMinorTickMark (m _a .ST_TickMark ){if m ==_a .ST_TickMarkUnset {_ead ._abe .MinorTickMark =nil ;}else {_ead ._abe .MinorTickMark =_a .NewCT_TickMark ();_ead ._abe .MinorTickMark .ValAttr =m ;};};
// InitializeDefaults the bar chart to its defaults
func (_eb AreaChart )InitializeDefaults (){};func (_gef LineChartSeries )SetSmooth (b bool ){_gef ._cddd .Smooth =_a .NewCT_Boolean ();_gef ._cddd .Smooth .ValAttr =&b ;};
// SetDirection changes the direction of the bar chart (bar or column).
func (_gfb Bar3DChart )SetDirection (d _a .ST_BarDir ){_gfb ._ed .BarDir .ValAttr =d };func MakeNumberDataSource (x *_a .CT_NumDataSource )NumberDataSource {return NumberDataSource {x }};func (_bba LineChartSeries )Values ()NumberDataSource {if _bba ._cddd .Val ==nil {_bba ._cddd .Val =_a .NewCT_NumDataSource ();};return MakeNumberDataSource (_bba ._cddd .Val );};func (_abgb CategoryAxis )SetTickLabelPosition (p _a .ST_TickLblPos ){if p ==_a .ST_TickLblPosUnset {_abgb ._abe .TickLblPos =nil ;}else {_abgb ._abe .TickLblPos =_a .NewCT_TickLblPos ();_abgb ._abe .TickLblPos .ValAttr =p ;};};
// AddValueAxis adds a value axis to the chart.
func (_acc Chart )AddValueAxis ()ValueAxis {_cgg :=_a .NewCT_ValAx ();if _acc ._bcd .Chart .PlotArea .CChoice ==nil {_acc ._bcd .Chart .PlotArea .CChoice =_a .NewCT_PlotAreaChoice1 ();};_cgg .AxId =_a .NewCT_UnsignedInt ();_cgg .AxId .ValAttr =0x7FFFFFFF&_aa .Uint32 ();_acc ._bcd .Chart .PlotArea .CChoice .ValAx =append (_acc ._bcd .Chart .PlotArea .CChoice .ValAx ,_cgg );_cgg .Delete =_a .NewCT_Boolean ();_cgg .Delete .ValAttr =_d .Bool (false );_cgg .Scaling =_a .NewCT_Scaling ();_cgg .Scaling .Orientation =_a .NewCT_Orientation ();_cgg .Scaling .Orientation .ValAttr =_a .ST_OrientationMinMax ;_cgg .Choice =&_a .EG_AxSharedChoice {};_cgg .Choice .Crosses =_a .NewCT_Crosses ();_cgg .Choice .Crosses .ValAttr =_a .ST_CrossesAutoZero ;_cgg .CrossBetween =_a .NewCT_CrossBetween ();_cgg .CrossBetween .ValAttr =_a .ST_CrossBetweenBetween ;_ede :=MakeValueAxis (_cgg );_ede .MajorGridLines ().Properties ().LineProperties ().SetSolidFill (_gg .LightGray );_ede .SetMajorTickMark (_a .ST_TickMarkOut );_ede .SetMinorTickMark (_a .ST_TickMarkIn );_ede .SetTickLabelPosition (_a .ST_TickLblPosNextTo );_ede .Properties ().LineProperties ().SetSolidFill (_gg .Black );_ede .SetPosition (_a .ST_AxPosL );return _ede ;};func (_dcca DateAxis )MajorGridLines ()GridLines {if _dcca ._ffgc .MajorGridlines ==nil {_dcca ._ffgc .MajorGridlines =_a .NewCT_ChartLines ();};return GridLines {_dcca ._ffgc .MajorGridlines };};type LineChart struct{chartBase ;_gad *_a .CT_LineChart ;};func (_de Area3DChart )AddAxis (axis Axis ){_eg :=_a .NewCT_UnsignedInt ();_eg .ValAttr =axis .AxisID ();_de ._gb .AxId =append (_de ._gb .AxId ,_eg );};
// Area3DChart is an area chart that has a shaded area underneath a curve.
type Area3DChart struct{chartBase ;_gb *_a .CT_Area3DChart ;};type SeriesAxis struct{_cab *_a .CT_SerAx };
// SetOrder sets the order of the series
func (_dce SurfaceChartSeries )SetOrder (idx uint32 ){_dce ._bdd .Order .ValAttr =idx };func (_dgf NumberDataSource )ensureChoice (){if _dgf ._feb .Choice ==nil {_dgf ._feb .Choice =_a .NewCT_NumDataSourceChoice ();};};type ScatterChart struct{chartBase ;_ecf *_a .CT_ScatterChart ;};type Marker struct{_gac *_a .CT_Marker };
// AddScatterChart adds a scatter (X/Y) chart.
func (_edg Chart )AddScatterChart ()ScatterChart {_aadb :=_a .NewCT_PlotAreaChoice ();_edg ._bcd .Chart .PlotArea .Choice =append (_edg ._bcd .Chart .PlotArea .Choice ,_aadb );_aadb .ScatterChart =_a .NewCT_ScatterChart ();_ffe :=ScatterChart {_ecf :_aadb .ScatterChart };_ffe .InitializeDefaults ();return _ffe ;};func (_dee CategoryAxis )SetCrosses (axis Axis ){_dee ._abe .Choice =_a .NewEG_AxSharedChoice ();_dee ._abe .Choice .Crosses =_a .NewCT_Crosses ();_dee ._abe .Choice .Crosses .ValAttr =_a .ST_CrossesAutoZero ;_dee ._abe .CrossAx .ValAttr =axis .AxisID ();};
// AddBarChart adds a new bar chart to a chart.
func (_aeg Chart )AddBarChart ()BarChart {_gga :=_a .NewCT_PlotAreaChoice ();_aeg ._bcd .Chart .PlotArea .Choice =append (_aeg ._bcd .Chart .PlotArea .Choice ,_gga );_gga .BarChart =_a .NewCT_BarChart ();_gga .BarChart .Grouping =_a .NewCT_BarGrouping ();_gga .BarChart .Grouping .ValAttr =_a .ST_BarGroupingStandard ;_eab :=BarChart {_ffg :_gga .BarChart };_eab .InitializeDefaults ();return _eab ;};
// X returns the inner wrapped XML type.
func (_edbc StockChart )X ()*_a .CT_StockChart {return _edbc ._acge };func (_fddc Title )InitializeDefaults (){_fddc .SetText ("\u0054\u0069\u0074l\u0065");_fddc .RunProperties ().SetSize (16*_af .Point );_fddc .RunProperties ().SetSolidFill (_gg .Black );_fddc .RunProperties ().SetFont ("\u0043\u0061\u006c\u0069\u0062\u0020\u0072\u0069");_fddc .RunProperties ().SetBold (false );};func (_ag CategoryAxis )AxisID ()uint32 {return _ag ._abe .AxId .ValAttr };
// X returns the inner wrapped XML type.
func (_abfb Marker )X ()*_a .CT_Marker {return _abfb ._gac };
// BubbleChartSeries is a series to be used on a Bubble chart.
type BubbleChartSeries struct{_bf *_a .CT_BubbleSer };type CategoryAxis struct{_abe *_a .CT_CatAx };func (_edgg ValueAxis )SetMinorTickMark (m _a .ST_TickMark ){if m ==_a .ST_TickMarkUnset {_edgg ._adaf .MinorTickMark =nil ;}else {_edgg ._adaf .MinorTickMark =_a .NewCT_TickMark ();_edgg ._adaf .MinorTickMark .ValAttr =m ;};};func (_dgeb ValueAxis )MajorGridLines ()GridLines {if _dgeb ._adaf .MajorGridlines ==nil {_dgeb ._adaf .MajorGridlines =_a .NewCT_ChartLines ();};return GridLines {_dgeb ._adaf .MajorGridlines };};
// Properties returns the bar chart series shape properties.
func (_ddaf RadarChartSeries )Properties ()_ab .ShapeProperties {if _ddaf ._dafe .SpPr ==nil {_ddaf ._dafe .SpPr =_da .NewCT_ShapeProperties ();};return _ab .MakeShapeProperties (_ddaf ._dafe .SpPr );};
// AddSeries adds a default series to a Bubble chart.
func (_ccd BubbleChart )AddSeries ()BubbleChartSeries {_gfa :=_ccd .nextColor (len (_ccd ._gcg .Ser ));_cdc :=_a .NewCT_BubbleSer ();_ccd ._gcg .Ser =append (_ccd ._gcg .Ser ,_cdc );_cdc .Idx .ValAttr =uint32 (len (_ccd ._gcg .Ser )-1);_cdc .Order .ValAttr =uint32 (len (_ccd ._gcg .Ser )-1);_bd :=BubbleChartSeries {_cdc };_bd .InitializeDefaults ();_bd .Properties ().SetSolidFill (_gfa );return _bd ;};
// Properties returns the line chart series shape properties.
func (_aab LineChartSeries )Properties ()_ab .ShapeProperties {if _aab ._cddd .SpPr ==nil {_aab ._cddd .SpPr =_da .NewCT_ShapeProperties ();};return _ab .MakeShapeProperties (_aab ._cddd .SpPr );};func (_gdff Legend )Properties ()_ab .ShapeProperties {if _gdff ._eedf .SpPr ==nil {_gdff ._eedf .SpPr =_da .NewCT_ShapeProperties ();};return _ab .MakeShapeProperties (_gdff ._eedf .SpPr );};
// X returns the inner wrapped XML type.
func (_bdc Pie3DChart )X ()*_a .CT_Pie3DChart {return _bdc ._aae };
// X returns the inner wrapped XML type.
func (_fff Title )X ()*_a .CT_Title {return _fff ._dae };func (_ffcab Title )SetText (s string ){if _ffcab ._dae .Tx ==nil {_ffcab ._dae .Tx =_a .NewCT_Tx ();};if _ffcab ._dae .Tx .Choice .Rich ==nil {_ffcab ._dae .Tx .Choice .Rich =_da .NewCT_TextBody ();};var _gbfd *_da .CT_TextParagraph ;if len (_ffcab ._dae .Tx .Choice .Rich .P )==0{_gbfd =_da .NewCT_TextParagraph ();_ffcab ._dae .Tx .Choice .Rich .P =[]*_da .CT_TextParagraph {_gbfd };}else {_gbfd =_ffcab ._dae .Tx .Choice .Rich .P [0];};var _ccg *_da .EG_TextRun ;if len (_gbfd .EG_TextRun )==0{_ccg =_da .NewEG_TextRun ();_gbfd .EG_TextRun =[]*_da .EG_TextRun {_ccg };}else {_ccg =_gbfd .EG_TextRun [0];};if _ccg .R ==nil {_ccg .R =_da .NewCT_RegularTextRun ();};_ccg .R .T =s ;};
// Properties returns the bar chart series shape properties.
func (_beda PieChartSeries )Properties ()_ab .ShapeProperties {if _beda ._afeg .SpPr ==nil {_beda ._afeg .SpPr =_da .NewCT_ShapeProperties ();};return _ab .MakeShapeProperties (_beda ._afeg .SpPr );};
// CategoryAxis returns the category data source.
func (_adb PieChartSeries )CategoryAxis ()CategoryAxisDataSource {if _adb ._afeg .Cat ==nil {_adb ._afeg .Cat =_a .NewCT_AxDataSource ();};return MakeAxisDataSource (_adb ._afeg .Cat );};
// 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 (_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 };
// 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 (_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 ;};
// 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 );};
func (_cad NumberDataSource )CreateEmptyNumberCache (){_cad .ensureChoice ();if _cad ._feb .Choice .NumRef ==nil {_cad ._feb .Choice .NumRef =_a .NewCT_NumRef ();};_cad ._feb .Choice .NumLit =nil ;_cad ._feb .Choice .NumRef .NumCache =_a .NewCT_NumData ();_cad ._feb .Choice .NumRef .NumCache .PtCount =_a .NewCT_UnsignedInt ();_cad ._feb .Choice .NumRef .NumCache .PtCount .ValAttr =0;};
// 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 );};
func (_gbbg ScatterChart )AddAxis (axis Axis ){_dfd :=_a .NewCT_UnsignedInt ();_dfd .ValAttr =axis .AxisID ();_gbbg ._ecf .AxId =append (_gbbg ._ecf .AxId ,_dfd );};
// SetText sets the series text.
func (_cdg PieChartSeries )SetText (s string ){_cdg ._faag .Tx =_e .NewCT_SerTx ();_cdg ._faag .Tx .Choice .V =&s ;};
func (_bc BubbleChartSeries )SetText (s string ){_bc ._bf .Tx =_a .NewCT_SerTx ();_bc ._bf .Tx .Choice .V =&s ;};
// 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 );};
// X returns the inner wrapped XML type.
func (_fdd DateAxis )X ()*_a .CT_DateAx {return _fdd ._ffgc };func (_ca DataLabels )SetShowCategoryName (b bool ){_ca .ensureChoice ();_ca ._ddb .Choice .ShowCatName =_a .NewCT_Boolean ();_ca ._ddb .Choice .ShowCatName .ValAttr =_d .Bool (b );};func (_gbbe LineChartSeries )CategoryAxis ()CategoryAxisDataSource {if _gbbe ._cddd .Cat ==nil {_gbbe ._cddd .Cat =_a .NewCT_AxDataSource ();};return MakeAxisDataSource (_gbbe ._cddd .Cat );};
// X returns the inner wrapped XML type.
func (_gcfb SeriesAxis )X ()*_a .CT_SerAx {return _gcfb ._cab };
// AddLineChart adds a new line chart to a chart.
func (_dca Chart )AddLineChart ()LineChart {_dfcc :=_a .NewCT_PlotAreaChoice ();_dca ._bcd .Chart .PlotArea .Choice =append (_dca ._bcd .Chart .PlotArea .Choice ,_dfcc );_dfcc .LineChart =_a .NewCT_LineChart ();_dfcc .LineChart .Grouping =_a .NewCT_Grouping ();_dfcc .LineChart .Grouping .ValAttr =_a .ST_GroupingStandard ;return LineChart {_gad :_dfcc .LineChart };};func (_ggaa DataLabels )ensureChoice (){if _ggaa ._ddb .Choice ==nil {_ggaa ._ddb .Choice =_a .NewCT_DLblsChoice ();};};
// X returns the inner wrapped XML type.
func (_ddff ScatterChart )X ()*_a .CT_ScatterChart {return _ddff ._ecf };func MakeChart (x *_a .ChartSpace )Chart {return Chart {x }};
// Labels returns the data label properties.
func (_ffc LineChartSeries )Labels ()DataLabels {if _ffc ._cddd .DLbls ==nil {_ffc ._cddd .DLbls =_a .NewCT_DLbls ();};return MakeDataLabels (_ffc ._cddd .DLbls );};
// AddStockChart adds a new stock chart.
func (_bed Chart )AddStockChart ()StockChart {_gbd :=_a .NewCT_PlotAreaChoice ();_bed ._bcd .Chart .PlotArea .Choice =append (_bed ._bcd .Chart .PlotArea .Choice ,_gbd );_gbd .StockChart =_a .NewCT_StockChart ();_bg :=StockChart {_acge :_gbd .StockChart };_bg .InitializeDefaults ();return _bg ;};
// LineChartSeries is the data series for a line chart.
type LineChartSeries struct{_cddd *_a .CT_LineSer };
// InitializeDefaults initializes a Bubble chart series to the default values.
func (_db BubbleChartSeries )InitializeDefaults (){};
// Marker returns the marker properties.
func (_bca LineChartSeries )Marker ()Marker {if _bca ._cddd .Marker ==nil {_bca ._cddd .Marker =_a .NewCT_Marker ();};return MakeMarker (_bca ._cddd .Marker );};
// X returns the inner wrapped XML type.
func (_abg Area3DChart )X ()*_a .CT_Area3DChart {return _abg ._gb };
// InitializeDefaults the bar chart to its defaults
func (_gfbe PieOfPieChart )InitializeDefaults (){_gfbe ._dbb .VaryColors =_a .NewCT_Boolean ();_gfbe ._dbb .VaryColors .ValAttr =_d .Bool (true );_gfbe .SetType (_a .ST_OfPieTypePie );_gfbe ._dbb .SecondPieSize =_a .NewCT_SecondPieSize ();_gfbe ._dbb .SecondPieSize .ValAttr =&_a .ST_SecondPieSize {};_gfbe ._dbb .SecondPieSize .ValAttr .ST_SecondPieSizeUShort =_d .Uint16 (75);_bce :=_a .NewCT_ChartLines ();_bce .SpPr =_da .NewCT_ShapeProperties ();_ffca :=_ab .MakeShapeProperties (_bce .SpPr );_ffca .LineProperties ().SetSolidFill (_gg .Auto );_gfbe ._dbb .SerLines =append (_gfbe ._dbb .SerLines ,_bce );};func (_gade SeriesAxis )AxisID ()uint32 {return _gade ._cab .AxId .ValAttr };
// AddBubbleChart adds a new bubble chart.
func (_edd Chart )AddBubbleChart ()BubbleChart {_fdf :=_a .NewCT_PlotAreaChoice ();_edd ._bcd .Chart .PlotArea .Choice =append (_edd ._bcd .Chart .PlotArea .Choice ,_fdf );_fdf .BubbleChart =_a .NewCT_BubbleChart ();_gfbb :=BubbleChart {_gcg :_fdf .BubbleChart };_gfbb .InitializeDefaults ();return _gfbb ;};func (_bad DataLabels )SetShowLeaderLines (b bool ){_bad .ensureChoice ();_bad ._ddb .Choice .ShowLeaderLines =_a .NewCT_Boolean ();_bad ._ddb .Choice .ShowLeaderLines .ValAttr =_d .Bool (b );};func (_adaa SeriesAxis )InitializeDefaults (){};
// SurfaceChart is a 3D surface chart, viewed from the top-down.
type SurfaceChart struct{chartBase ;_egb *_a .CT_SurfaceChart ;};
// SetValues is used to set the source data to a set of values.
func (_dde CategoryAxisDataSource )SetValues (v []string ){_dde ._efb .Choice =_a .NewCT_AxDataSourceChoice ();_dde ._efb .Choice .StrLit =_a .NewCT_StrData ();_dde ._efb .Choice .StrLit .PtCount =_a .NewCT_UnsignedInt ();_dde ._efb .Choice .StrLit .PtCount .ValAttr =uint32 (len (v ));for _eef ,_bff :=range v {_dde ._efb .Choice .StrLit .Pt =append (_dde ._efb .Choice .StrLit .Pt ,&_a .CT_StrVal {IdxAttr :uint32 (_eef ),V :_bff });};};
// SetIndex sets the index of the series
func (_edab SurfaceChartSeries )SetIndex (idx uint32 ){_edab ._bdd .Idx .ValAttr =idx };type DateAxis struct{_ffgc *_a .CT_DateAx };
// AddSeries adds a default series to a line chart.
func (_eac Line3DChart )AddSeries ()LineChartSeries {_bgc :=_eac .nextColor (len (_eac ._cde .Ser ));_cfg :=_a .NewCT_LineSer ();_eac ._cde .Ser =append (_eac ._cde .Ser ,_cfg );_cfg .Idx .ValAttr =uint32 (len (_eac ._cde .Ser )-1);_cfg .Order .ValAttr =uint32 (len (_eac ._cde .Ser )-1);_eddc :=LineChartSeries {_cfg };_eddc .InitializeDefaults ();_eddc .Properties ().LineProperties ().SetSolidFill (_bgc );_eddc .Properties ().SetSolidFill (_bgc );return _eddc ;};
// InitializeDefaults initializes an area series to the default values.
func (_ga AreaChartSeries )InitializeDefaults (){};func (_agd Legend )SetOverlay (b bool ){_agd ._eedf .Overlay =_a .NewCT_Boolean ();_agd ._eedf .Overlay .ValAttr =_d .Bool (b );};
// AddSeries adds a default series to a Surface chart.
func (_aaba Surface3DChart )AddSeries ()SurfaceChartSeries {_bdf :=_aaba .nextColor (len (_aaba ._bef .Ser ));_ffgd :=_a .NewCT_SurfaceSer ();_aaba ._bef .Ser =append (_aaba ._bef .Ser ,_ffgd );_ffgd .Idx .ValAttr =uint32 (len (_aaba ._bef .Ser )-1);_ffgd .Order .ValAttr =uint32 (len (_aaba ._bef .Ser )-1);_eccc :=SurfaceChartSeries {_ffgd };_eccc .InitializeDefaults ();_eccc .Properties ().LineProperties ().SetSolidFill (_bdf );return _eccc ;};
// Values returns the value data source.
func (_bb BarChartSeries )Values ()NumberDataSource {if _bb ._gfg .Val ==nil {_bb ._gfg .Val =_a .NewCT_NumDataSource ();};return MakeNumberDataSource (_bb ._gfg .Val );};func (_aggd ValueAxis )SetCrosses (axis Axis ){_aggd ._adaf .CrossAx .ValAttr =axis .AxisID ()};
// X returns the inner wrapped XML type.
func (_aegb GridLines )X ()*_a .CT_ChartLines {return _aegb ._gbdd };
// InitializeDefaults initializes an Pie series to the default values.
func (_efbd PieChartSeries )InitializeDefaults (){};
// SetDirection changes the direction of the bar chart (bar or column).
func (_egfd BarChart )SetDirection (d _a .ST_BarDir ){_egfd ._ffg .BarDir .ValAttr =d };func (_facb RadarChart )AddAxis (axis Axis ){_acfg :=_a .NewCT_UnsignedInt ();_acfg .ValAttr =axis .AxisID ();_facb ._edc .AxId =append (_facb ._edc .AxId ,_acfg );};
// StockChart is a 2D Stock chart.
type StockChart struct{chartBase ;_acge *_a .CT_StockChart ;};
// X returns the inner wrapped XML type.
func (_bdce SurfaceChart )X ()*_a .CT_SurfaceChart {return _bdce ._egb };
// Order returns the order of the series
func (_edfc SurfaceChartSeries )Order ()uint32 {return _edfc ._bdd .Order .ValAttr };func (_bge Title )ParagraphProperties ()_ab .ParagraphProperties {if _bge ._dae .Tx ==nil {_bge .SetText ("");};if _bge ._dae .Tx .Choice .Rich .P [0].PPr ==nil {_bge ._dae .Tx .Choice .Rich .P [0].PPr =_da .NewCT_TextParagraphProperties ();};return _ab .MakeParagraphProperties (_bge ._dae .Tx .Choice .Rich .P [0].PPr );};
// AddTitle sets a new title on the chart.
func (_eag Chart )AddTitle ()Title {_eag ._bcd .Chart .Title =_a .NewCT_Title ();_eag ._bcd .Chart .Title .Overlay =_a .NewCT_Boolean ();_eag ._bcd .Chart .Title .Overlay .ValAttr =_d .Bool (false );_eag ._bcd .Chart .AutoTitleDeleted =_a .NewCT_Boolean ();_eag ._bcd .Chart .AutoTitleDeleted .ValAttr =_d .Bool (false );_gdf :=MakeTitle (_eag ._bcd .Chart .Title );_gdf .InitializeDefaults ();return _gdf ;};
// Index returns the index of the series
func (_egc SurfaceChartSeries )Index ()uint32 {return _egc ._bdd .Idx .ValAttr };
// InitializeDefaults the bar chart to its defaults
func (_fcf RadarChart )InitializeDefaults (){_fcf ._edc .RadarStyle .ValAttr =_a .ST_RadarStyleMarker };func (_bffa ScatterChartSeries )Values ()NumberDataSource {if _bffa ._abfbf .YVal ==nil {_bffa ._abfbf .YVal =_a .NewCT_NumDataSource ();};return MakeNumberDataSource (_bffa ._abfbf .YVal );};
// SetText sets the series text.
func (_afe AreaChartSeries )SetText (s string ){_afe ._dg .Tx =_a .NewCT_SerTx ();_afe ._dg .Tx .Choice .V =&s ;};
// AddSeries adds a default series to a Scatter chart.
func (_deg ScatterChart )AddSeries ()ScatterChartSeries {_eea :=_deg .nextColor (len (_deg ._ecf .Ser ));_efba :=_a .NewCT_ScatterSer ();_deg ._ecf .Ser =append (_deg ._ecf .Ser ,_efba );_efba .Idx .ValAttr =uint32 (len (_deg ._ecf .Ser )-1);_efba .Order .ValAttr =uint32 (len (_deg ._ecf .Ser )-1);_eddd :=ScatterChartSeries {_efba };_eddd .InitializeDefaults ();_eddd .Marker ().Properties ().LineProperties ().SetSolidFill (_eea );_eddd .Marker ().Properties ().SetSolidFill (_eea );return _eddd ;};
// AddSeries adds a default series to a Stock chart.
func (_gea StockChart )AddSeries ()LineChartSeries {_cfcg :=_a .NewCT_LineSer ();_gea ._acge .Ser =append (_gea ._acge .Ser ,_cfcg );_cfcg .Idx .ValAttr =uint32 (len (_gea ._acge .Ser )-1);_cfcg .Order .ValAttr =uint32 (len (_gea ._acge .Ser )-1);_gff :=LineChartSeries {_cfcg };_gff .Values ().CreateEmptyNumberCache ();_gff .Properties ().LineProperties ().SetNoFill ();return _gff ;};
// X returns the inner wrapped XML type.
func (_cf AreaChart )X ()*_a .CT_AreaChart {return _cf ._ggg };
// Surface3DChart is a 3D view of a surface chart.
type Surface3DChart struct{chartBase ;_bef *_a .CT_Surface3DChart ;};
// SetType sets the type the secone pie to either pie or bar
func (_fb PieOfPieChart )SetType (t _a .ST_OfPieType ){_fb ._dbb .OfPieType .ValAttr =t };
// AddRadarChart adds a new radar chart to a chart.
func (_ged Chart )AddRadarChart ()RadarChart {_efe :=_a .NewCT_PlotAreaChoice ();_ged ._bcd .Chart .PlotArea .Choice =append (_ged ._bcd .Chart .PlotArea .Choice ,_efe );_efe .RadarChart =_a .NewCT_RadarChart ();_cbe :=RadarChart {_edc :_efe .RadarChart };_cbe .InitializeDefaults ();return _cbe ;};
// AddAxis adds an axis to a Surface chart.
func (_fcfb Surface3DChart )AddAxis (axis Axis ){_dbe :=_a .NewCT_UnsignedInt ();_dbe .ValAttr =axis .AxisID ();_fcfb ._bef .AxId =append (_fcfb ._bef .AxId ,_dbe );};
// X returns the inner wrapped XML type.
func (_fea PieChart )X ()*_a .CT_PieChart {return _fea ._efd };
// X returns the inner wrapped XML type.
func (_ebc PieChartSeries )X ()*_a .CT_PieSer {return _ebc ._afeg };
// AddSeries adds a default series to an area chart.
func (_cc AreaChart )AddSeries ()AreaChartSeries {_f :=_cc .nextColor (len (_cc ._ggg .Ser ));_dea :=_a .NewCT_AreaSer ();_cc ._ggg .Ser =append (_cc ._ggg .Ser ,_dea );_dea .Idx .ValAttr =uint32 (len (_cc ._ggg .Ser )-1);_dea .Order .ValAttr =uint32 (len (_cc ._ggg .Ser )-1);_cd :=AreaChartSeries {_dea };_cd .InitializeDefaults ();_cd .Properties ().SetSolidFill (_f );return _cd ;};
// InitializeDefaults initializes an Radar series to the default values.
func (_dcff RadarChartSeries )InitializeDefaults (){};
// 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{_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 );};
type CategoryAxisDataSource struct{_efb *_a .CT_AxDataSource };type Line3DChart struct{chartBase ;_cde *_a .CT_Line3DChart ;};func (_dfec ValueAxis )SetPosition (p _a .ST_AxPos ){_dfec ._adaf .AxPos =_a .NewCT_AxPos ();_dfec ._adaf .AxPos .ValAttr =p ;};
// AddSeries adds a default series to a Stock chart.
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 ;};
// 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 ;};
// AddSeries adds a default series to an Doughnut chart.
func (_afea DoughnutChart )AddSeries ()PieChartSeries {_bgb :=_a .NewCT_PieSer ();_afea ._bbc .Ser =append (_afea ._bbc .Ser ,_bgb );_bgb .Idx .ValAttr =uint32 (len (_afea ._bbc .Ser )-1);_bgb .Order .ValAttr =uint32 (len (_afea ._bbc .Ser )-1);_faad :=PieChartSeries {_bgb };_faad .InitializeDefaults ();return _faad ;};
// RemoveLegend removes the legend if the chart has one.
func (_aca Chart )RemoveLegend (){_aca ._gdd .Chart .Legend =nil };
func (_dge Chart )RemoveLegend (){_dge ._bcd .Chart .Legend =nil };
// 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 (_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 (_fcdg Title )X ()*_e .CT_Title {return _fcdg ._afaa };
// BarChart is a 2D bar chart.
type BarChart struct{chartBase ;_fa *_e .CT_BarChart ;};func (_ace SeriesAxis )InitializeDefaults (){};
// X returns the inner wrapped XML type.
func (_fed Pie3DChart )X ()*_e .CT_Pie3DChart {return _fed ._cacc };
// 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 };};
// 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 );};
// 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 ;};
// 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 ;};
// 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 (_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 ;};
// InitializeDefaults initializes a bar chart series to the default values.
func (_adg BarChartSeries )InitializeDefaults (){};func MakeSeriesAxis (x *_a .CT_SerAx )SeriesAxis {return SeriesAxis {x }};
// 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 ;};
func (_e Area3DChart )AddSeries ()AreaChartSeries {_cg :=_e .nextColor (len (_e ._gb .Ser ));_dd :=_a .NewCT_AreaSer ();_e ._gb .Ser =append (_e ._gb .Ser ,_dd );_dd .Idx .ValAttr =uint32 (len (_e ._gb .Ser )-1);_dd .Order .ValAttr =uint32 (len (_e ._gb .Ser )-1);_aff :=AreaChartSeries {_dd };_aff .InitializeDefaults ();_aff .Properties ().SetSolidFill (_cg );return _aff ;};
// AreaChart is an area chart that has a shaded area underneath a curve.
type AreaChart struct{chartBase ;_cc *_e .CT_AreaChart ;};
// X returns the inner wrapped XML type.
func (_gfaa RadarChartSeries )X ()*_a .CT_RadarSer {return _gfaa ._dafe };func (_eaba SurfaceChart )InitializeDefaults (){_eaba ._egb .Wireframe =_a .NewCT_Boolean ();_eaba ._egb .Wireframe .ValAttr =_d .Bool (false );_eaba ._egb .BandFmts =_a .NewCT_BandFmts ();for _cadg :=0;_cadg < 15;_cadg ++{_geb :=_a .NewCT_BandFmt ();_geb .Idx .ValAttr =uint32 (_cadg );_geb .SpPr =_da .NewCT_ShapeProperties ();_gfce :=_ab .MakeShapeProperties (_geb .SpPr );_gfce .SetSolidFill (_eaba .nextColor (_cadg ));_eaba ._egb .BandFmts .BandFmt =append (_eaba ._egb .BandFmts .BandFmt ,_geb );};};
// Properties returns the Bubble chart series shape properties.
func (_gd BubbleChartSeries )Properties ()_ab .ShapeProperties {if _gd ._bf .SpPr ==nil {_gd ._bf .SpPr =_da .NewCT_ShapeProperties ();};return _ab .MakeShapeProperties (_gd ._bf .SpPr );};
// X returns the inner wrapped XML type.
func (_abbg Surface3DChart )X ()*_a .CT_Surface3DChart {return _abbg ._bef };
// Index returns the index of the series
func (_bgfa ScatterChartSeries )Index ()uint32 {return _bgfa ._abfbf .Idx .ValAttr };
// X returns the inner wrapped XML type.
func (_aba LineChart )X ()*_a .CT_LineChart {return _aba ._gad };
// AddSeries adds a default series to a bar chart.
func (_ad Bar3DChart )AddSeries ()BarChartSeries {_ae :=_ad .nextColor (len (_ad ._ed .Ser ));_eaf :=_a .NewCT_BarSer ();_ad ._ed .Ser =append (_ad ._ed .Ser ,_eaf );_eaf .Idx .ValAttr =uint32 (len (_ad ._ed .Ser )-1);_eaf .Order .ValAttr =uint32 (len (_ad ._ed .Ser )-1);_gaf :=BarChartSeries {_eaf };_gaf .InitializeDefaults ();_gaf .Properties ().SetSolidFill (_ae );return _gaf ;};func (_acd Chart )AddSeriesAxis ()SeriesAxis {_cfd :=_a .NewCT_SerAx ();if _acd ._bcd .Chart .PlotArea .CChoice ==nil {_acd ._bcd .Chart .PlotArea .CChoice =_a .NewCT_PlotAreaChoice1 ();};_cfd .AxId =_a .NewCT_UnsignedInt ();_cfd .AxId .ValAttr =0x7FFFFFFF&_aa .Uint32 ();_acd ._bcd .Chart .PlotArea .CChoice .SerAx =append (_acd ._bcd .Chart .PlotArea .CChoice .SerAx ,_cfd );_cfd .Delete =_a .NewCT_Boolean ();_cfd .Delete .ValAttr =_d .Bool (false );_dcc :=MakeSeriesAxis (_cfd );_dcc .InitializeDefaults ();return _dcc ;};
// AddAxis adds an axis to a line chart.
func (_aea LineChart )AddAxis (axis Axis ){_abf :=_a .NewCT_UnsignedInt ();_abf .ValAttr =axis .AxisID ();_aea ._gad .AxId =append (_aea ._gad .AxId ,_abf );};
// 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 (_ff AreaChartSeries )Values ()NumberDataSource {if _ff ._dg .Val ==nil {_ff ._dg .Val =_a .NewCT_NumDataSource ();};return MakeNumberDataSource (_ff ._dg .Val );};type chartBase struct{};func (_cffa SeriesAxis )SetCrosses (axis Axis ){_cffa ._cab .CrossAx .ValAttr =axis .AxisID ()};
// 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 );};
func (_gbff LineChart )AddSeries ()LineChartSeries {_fde :=_gbff .nextColor (len (_gbff ._gad .Ser ));_fed :=_a .NewCT_LineSer ();_gbff ._gad .Ser =append (_gbff ._gad .Ser ,_fed );_fed .Idx .ValAttr =uint32 (len (_gbff ._gad .Ser )-1);_fed .Order .ValAttr =uint32 (len (_gbff ._gad .Ser )-1);_eeb :=LineChartSeries {_fed };_eeb .InitializeDefaults ();_eeb .Properties ().LineProperties ().SetSolidFill (_fde );return _eeb ;};func (_afg DataLabels )SetPosition (p _a .ST_DLblPos ){_afg .ensureChoice ();_afg ._ddb .Choice .DLblPos =_a .NewCT_DLblPos ();_afg ._ddb .Choice .DLblPos .ValAttr =p ;};
// X returns the inner wrapped XML type.
func (_gbg DoughnutChart )X ()*_e .CT_DoughnutChart {return _gbg ._gebe };
// InitializeDefaults the bar chart to its defaults
func (_egf BarChart )InitializeDefaults (){_egf .SetDirection (_a .ST_BarDirCol )};
// AddSurface3DChart adds a new 3D surface chart to a chart.
func (_fd Chart )AddSurface3DChart ()Surface3DChart {_aaa :=_a .NewCT_PlotAreaChoice ();_fd ._bcd .Chart .PlotArea .Choice =append (_fd ._bcd .Chart .PlotArea .Choice ,_aaa );_aaa .Surface3DChart =_a .NewCT_Surface3DChart ();_dad (_fd ._bcd .Chart );_bfb :=Surface3DChart {_bef :_aaa .Surface3DChart };_bfb .InitializeDefaults ();return _bfb ;};func (_gbgg DataLabels )SetShowLegendKey (b bool ){_gbgg .ensureChoice ();_gbgg ._ddb .Choice .ShowLegendKey =_a .NewCT_Boolean ();_gbgg ._ddb .Choice .ShowLegendKey .ValAttr =_d .Bool (b );};var NullAxis Axis =nullAxis (0);
// SetText sets the series text.
func (_fefd RadarChartSeries )SetText (s string ){_fefd ._dafe .Tx =_a .NewCT_SerTx ();_fefd ._dafe .Tx .Choice .V =&s ;};
// AddSeries adds a default series to a bar chart.
func (_ef BarChart )AddSeries ()BarChartSeries {_gec :=_ef .nextColor (len (_ef ._ffg .Ser ));_gbc :=_a .NewCT_BarSer ();_ef ._ffg .Ser =append (_ef ._ffg .Ser ,_gbc );_gbc .Idx .ValAttr =uint32 (len (_ef ._ffg .Ser )-1);_gbc .Order .ValAttr =uint32 (len (_ef ._ffg .Ser )-1);_dfa :=BarChartSeries {_gbc };_dfa .InitializeDefaults ();_dfa .Properties ().SetSolidFill (_gec );return _dfa ;};func (_bffb SurfaceChartSeries )Values ()NumberDataSource {if _bffb ._bdd .Val ==nil {_bffb ._bdd .Val =_a .NewCT_NumDataSource ();};_ecg :=MakeNumberDataSource (_bffb ._bdd .Val );_ecg .CreateEmptyNumberCache ();return _ecg ;};
// SetText sets the series text
func (_aaf LineChartSeries )SetText (s string ){_aaf ._cddd .Tx =_a .NewCT_SerTx ();_aaf ._cddd .Tx .Choice .V =&s ;};
// Chart is a generic chart.
type Chart struct{_bcd *_a .ChartSpace };
// AddAxis adds an axis to a Surface chart.
func (_bfa SurfaceChart )AddAxis (axis Axis ){_gdd :=_a .NewCT_UnsignedInt ();_gdd .ValAttr =axis .AxisID ();_bfa ._egb .AxId =append (_bfa ._egb .AxId ,_gdd );};
// InitializeDefaults the bar chart to its defaults
func (_gf Bar3DChart )InitializeDefaults (){_gf .SetDirection (_a .ST_BarDirCol )};func (_fade SurfaceChartSeries )CategoryAxis ()CategoryAxisDataSource {if _fade ._bdd .Cat ==nil {_fade ._bdd .Cat =_a .NewCT_AxDataSource ();};return MakeAxisDataSource (_fade ._bdd .Cat );};
// SetValues sets values directly on a source.
func (_afd NumberDataSource )SetValues (v []float64 ){_afd .ensureChoice ();_afd ._feb .Choice .NumRef =nil ;_afd ._feb .Choice .NumLit =_a .NewCT_NumData ();_afd ._feb .Choice .NumLit .PtCount =_a .NewCT_UnsignedInt ();_afd ._feb .Choice .NumLit .PtCount .ValAttr =uint32 (len (v ));for _bfg ,_gbca :=range v {_afd ._feb .Choice .NumLit .Pt =append (_afd ._feb .Choice .NumLit .Pt ,&_a .CT_NumVal {IdxAttr :uint32 (_bfg ),V :_g .Sprintf ("\u0025\u0067",_gbca )});};};
// SetOrder sets the order of the series
func (_daf LineChartSeries )SetOrder (idx uint32 ){_daf ._cddd .Order .ValAttr =idx };func (_fca DataLabels )SetShowValue (b bool ){_fca .ensureChoice ();_fca ._ddb .Choice .ShowVal =_a .NewCT_Boolean ();_fca ._ddb .Choice .ShowVal .ValAttr =_d .Bool (b );};
// SetDisplayBlanksAs controls how missing values are displayed.
func (_fgg Chart )SetDisplayBlanksAs (v _a .ST_DispBlanksAs ){_fgg ._bcd .Chart .DispBlanksAs =_a .NewCT_DispBlanksAs ();_fgg ._bcd .Chart .DispBlanksAs .ValAttr =v ;};
// SetIndex sets the index of the series
func (_eeba LineChartSeries )SetIndex (idx uint32 ){_eeba ._cddd .Idx .ValAttr =idx };
// Labels returns the data label properties.
func (_acg ScatterChartSeries )Labels ()DataLabels {if _acg ._abfbf .DLbls ==nil {_acg ._abfbf .DLbls =_a .NewCT_DLbls ();};return MakeDataLabels (_acg ._abfbf .DLbls );};
// AddSeries adds a default series to an Pie chart.
func (_gagg PieChart )AddSeries ()PieChartSeries {_gdc :=_a .NewCT_PieSer ();_gagg ._efd .Ser =append (_gagg ._efd .Ser ,_gdc );_gdc .Idx .ValAttr =uint32 (len (_gagg ._efd .Ser )-1);_gdc .Order .ValAttr =uint32 (len (_gagg ._efd .Ser )-1);_geda :=PieChartSeries {_gdc };_geda .InitializeDefaults ();return _geda ;};func (_fda DateAxis )SetCrosses (axis Axis ){_fda ._ffgc .CrossAx .ValAttr =axis .AxisID ()};
// InitializeDefaults the bar chart to its defaults
func (_bea PieChart )InitializeDefaults (){_bea ._efd .VaryColors =_a .NewCT_Boolean ();_bea ._efd .VaryColors .ValAttr =_d .Bool (true );};
// InitializeDefaults the bar chart to its defaults
func (_ebf DoughnutChart )InitializeDefaults (){_ebf ._bbc .VaryColors =_a .NewCT_Boolean ();_ebf ._bbc .VaryColors .ValAttr =_d .Bool (true );_ebf ._bbc .HoleSize =_a .NewCT_HoleSize ();_ebf ._bbc .HoleSize .ValAttr =&_a .ST_HoleSize {};_ebf ._bbc .HoleSize .ValAttr .ST_HoleSizeUByte =_d .Uint8 (50);};
// 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 );};
func (_df AreaChartSeries )CategoryAxis ()CategoryAxisDataSource {if _df ._dg .Cat ==nil {_df ._dg .Cat =_a .NewCT_AxDataSource ();};return MakeAxisDataSource (_df ._dg .Cat );};
// X returns the inner wrapped XML type.
func (_bda BarChartSeries )X ()*_e .CT_BarSer {return _bda ._fc };
func (_fcg RadarChart )X ()*_a .CT_RadarChart {return _fcg ._edc };
// 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 ;};
// AddSeries adds a default series to an Pie chart.
func (_caa PieOfPieChart )AddSeries ()PieChartSeries {_abfd :=_a .NewCT_PieSer ();_caa ._dbb .Ser =append (_caa ._dbb .Ser ,_abfd );_abfd .Idx .ValAttr =uint32 (len (_caa ._dbb .Ser )-1);_abfd .Order .ValAttr =uint32 (len (_caa ._dbb .Ser )-1);_gfc :=PieChartSeries {_abfd };_gfc .InitializeDefaults ();return _gfc ;};func (_cdeb ValueAxis )SetTickLabelPosition (p _a .ST_TickLblPos ){if p ==_a .ST_TickLblPosUnset {_cdeb ._adaf .TickLblPos =nil ;}else {_cdeb ._adaf .TickLblPos =_a .NewCT_TickLblPos ();_cdeb ._adaf .TickLblPos .ValAttr =p ;};};
// Pie3DChart is a Pie3D chart.
type Pie3DChart struct{chartBase ;_aae *_a .CT_Pie3DChart ;};
// AddPieOfPieChart adds a new pie chart to a chart.
func (_bgf Chart )AddPieOfPieChart ()PieOfPieChart {_dec :=_a .NewCT_PlotAreaChoice ();_bgf ._bcd .Chart .PlotArea .Choice =append (_bgf ._bcd .Chart .PlotArea .Choice ,_dec );_dec .OfPieChart =_a .NewCT_OfPieChart ();_fga :=PieOfPieChart {_dbb :_dec .OfPieChart };_fga .InitializeDefaults ();return _fga ;};func (_fe CategoryAxis )InitializeDefaults (){_fe .SetPosition (_a .ST_AxPosB );_fe .SetMajorTickMark (_a .ST_TickMarkOut );_fe .SetMinorTickMark (_a .ST_TickMarkIn );_fe .SetTickLabelPosition (_a .ST_TickLblPosNextTo );_fe .MajorGridLines ().Properties ().LineProperties ().SetSolidFill (_gg .LightGray );_fe .Properties ().LineProperties ().SetSolidFill (_gg .Black );};
// AddSeries adds a default series to a Surface chart.
func (_feg SurfaceChart )AddSeries ()SurfaceChartSeries {_eca :=_feg .nextColor (len (_feg ._egb .Ser ));_fdea :=_a .NewCT_SurfaceSer ();_feg ._egb .Ser =append (_feg ._egb .Ser ,_fdea );_fdea .Idx .ValAttr =uint32 (len (_feg ._egb .Ser )-1);_fdea .Order .ValAttr =uint32 (len (_feg ._egb .Ser )-1);_ecaf :=SurfaceChartSeries {_fdea };_ecaf .InitializeDefaults ();_ecaf .Properties ().LineProperties ().SetSolidFill (_eca );return _ecaf ;};
// InitializeDefaults the bar chart to its defaults
func (_b Area3DChart )InitializeDefaults (){};func MakeTitle (x *_a .CT_Title )Title {return Title {x }};
// CategoryAxis returns the category data source.
func (_gfe BubbleChartSeries )CategoryAxis ()CategoryAxisDataSource {if _gfe ._bf .XVal ==nil {_gfe ._bf .XVal =_a .NewCT_AxDataSource ();};return MakeAxisDataSource (_gfe ._bf .XVal );};func MakeCategoryAxis (x *_a .CT_CatAx )CategoryAxis {return CategoryAxis {x }};func (_cbef GridLines )Properties ()_ab .ShapeProperties {if _cbef ._gbdd .SpPr ==nil {_cbef ._gbdd .SpPr =_da .NewCT_ShapeProperties ();};return _ab .MakeShapeProperties (_cbef ._gbdd .SpPr );};
// Order returns the order of the series
func (_cgde ScatterChartSeries )Order ()uint32 {return _cgde ._egge .Order .ValAttr };
func (_cba LineChartSeries )Order ()uint32 {return _cba ._cddd .Order .ValAttr };
// DoughnutChart is a Doughnut chart.
type DoughnutChart struct{chartBase ;_bbc *_a .CT_DoughnutChart ;};func (_bgg ScatterChartSeries )CategoryAxis ()CategoryAxisDataSource {if _bgg ._abfbf .XVal ==nil {_bgg ._abfbf .XVal =_a .NewCT_AxDataSource ();};return MakeAxisDataSource (_bgg ._abfbf .XVal );};
// AddSurfaceChart adds a new surface chart to a chart.
func (_agg Chart )AddSurfaceChart ()SurfaceChart {_cffe :=_a .NewCT_PlotAreaChoice ();_agg ._bcd .Chart .PlotArea .Choice =append (_agg ._bcd .Chart .PlotArea .Choice ,_cffe );_cffe .SurfaceChart =_a .NewCT_SurfaceChart ();_dad (_agg ._bcd .Chart );_agg ._bcd .Chart .View3D .RotX .ValAttr =_d .Int8 (90);_agg ._bcd .Chart .View3D .RotY .ValAttr =_d .Uint16 (0);_agg ._bcd .Chart .View3D .Perspective =_a .NewCT_Perspective ();_agg ._bcd .Chart .View3D .Perspective .ValAttr =_d .Uint8 (0);_ac :=SurfaceChart {_egb :_cffe .SurfaceChart };_ac .InitializeDefaults ();return _ac ;};type GridLines struct{_gbdd *_a .CT_ChartLines };func (_aggf Title )RunProperties ()_ab .RunProperties {if _aggf ._dae .Tx ==nil {_aggf .SetText ("");};if _aggf ._dae .Tx .Choice .Rich .P [0].EG_TextRun [0].R .RPr ==nil {_aggf ._dae .Tx .Choice .Rich .P [0].EG_TextRun [0].R .RPr =_da .NewCT_TextCharacterProperties ();};return _ab .MakeRunProperties (_aggf ._dae .Tx .Choice .Rich .P [0].EG_TextRun [0].R .RPr );};func (_gdb CategoryAxis )SetMajorTickMark (m _a .ST_TickMark ){if m ==_a .ST_TickMarkUnset {_gdb ._abe .MajorTickMark =nil ;}else {_gdb ._abe .MajorTickMark =_a .NewCT_TickMark ();_gdb ._abe .MajorTickMark .ValAttr =m ;};};
// X returns the inner wrapped XML type.
func (_gbe BarChartSeries )X ()*_a .CT_BarSer {return _gbe ._gfg };func (_ebd BarChart )AddAxis (axis Axis ){_dc :=_a .NewCT_UnsignedInt ();_dc .ValAttr =axis .AxisID ();_ebd ._ffg .AxId =append (_ebd ._ffg .AxId ,_dc );};func (_bega ScatterChartSeries )SetSmooth (b bool ){_bega ._abfbf .Smooth =_a .NewCT_Boolean ();_bega ._abfbf .Smooth .ValAttr =&b ;};
// Order returns the order of the series
func (_cdg ScatterChartSeries )Order ()uint32 {return _cdg ._abfbf .Order .ValAttr };
// X returns the inner wrapped XML type.
func (_cca AreaChartSeries )X ()*_a .CT_AreaSer {return _cca ._dg };
// Properties returns the line chart series shape properties.
func (_eccb ScatterChartSeries )Properties ()_ab .ShapeProperties {if _eccb ._abfbf .SpPr ==nil {_eccb ._abfbf .SpPr =_da .NewCT_ShapeProperties ();};return _ab .MakeShapeProperties (_eccb ._abfbf .SpPr );};
// X returns the inner wrapped XML type.
func (_ege ValueAxis )X ()*_a .CT_ValAx {return _ege ._adaf };
// RemoveTitle removes any existing title from the chart.
func (_eda Chart )RemoveTitle (){_eda ._bcd .Chart .Title =nil ;_eda ._bcd .Chart .AutoTitleDeleted =_a .NewCT_Boolean ();_eda ._bcd .Chart .AutoTitleDeleted .ValAttr =_d .Bool (true );};func (_eedc Marker )SetSize (sz uint8 ){_eedc ._gac .Size =_a .NewCT_MarkerSize ();_eedc ._gac .Size .ValAttr =&sz ;};type Title struct{_dae *_a .CT_Title };
// SetText sets the series text
func (_aca ScatterChartSeries )SetText (s string ){_aca ._abfbf .Tx =_a .NewCT_SerTx ();_aca ._abfbf .Tx .Choice .V =&s ;};
// SetText sets the series text.
func (_dcd BarChartSeries )SetText (s string ){_dcd ._gfg .Tx =_a .NewCT_SerTx ();_dcd ._gfg .Tx .Choice .V =&s ;};

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

View File

@ -13,395 +13,395 @@
// OOXML document formats.
//
// Package common contains common properties used by the subpackages.
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";);
package common ;import (_d "archive/zip";_ef "bytes";_ee "encoding/xml";_b "errors";_ea "fmt";_fae "github.com/unidoc/unioffice";_bgf "github.com/unidoc/unioffice/common/tempstorage";_ec "github.com/unidoc/unioffice/common/tempstorage/diskstore";_bg "github.com/unidoc/unioffice/measurement";_fcf "github.com/unidoc/unioffice/schema/soo/dml";_cg "github.com/unidoc/unioffice/schema/soo/ofc/custom_properties";_fb "github.com/unidoc/unioffice/schema/soo/ofc/docPropsVTypes";_ca "github.com/unidoc/unioffice/schema/soo/ofc/extended_properties";_fa "github.com/unidoc/unioffice/schema/soo/pkg/content_types";_gc "github.com/unidoc/unioffice/schema/soo/pkg/metadata/core_properties";_df "github.com/unidoc/unioffice/schema/soo/pkg/relationships";_ge "github.com/unidoc/unioffice/zippkg";_fc "image";_ "image/gif";_ "image/jpeg";_ "image/png";_ab "os";_f "reflect";_de "regexp";_ac "strconv";_gd "strings";_dc "time";);
// SetDescription records the description of the document.
func (_cdg CoreProperties )SetDescription (s string ){if _cdg ._fea .Description ==nil {_cdg ._fea .Description =&_fae .XSDAny {XMLName :_ee .Name {Local :"\u0064\u0063\u003a\u0064\u0065\u0073\u0063\u0072\u0069p\u0074\u0069\u006f\u006e"}};};_cdg ._fea .Description .Data =[]byte (s );};const _dg ="2\u00300\u0036\u002d\u0030\u0031\u002d\u0030\u0032\u00541\u0035\u003a\u0030\u0034:0\u0035\u005a";
// 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 ;};
func NewAppProperties ()AppProperties {_dfa :=AppProperties {_bddg :_ca .NewProperties ()};_dfa .SetCompany ("\u0046\u006f\u0078\u0079\u0055\u0074\u0069\u006c\u0073\u0020\u0065\u0068\u0066");_dfa .SetApplication ("g\u0069\u0074\u0068\u0075\u0062\u002ec\u006f\u006d\u002f\u0075\u006e\u0069\u0064\u006f\u0063/\u0075\u006e\u0069o\u0066f\u0069\u0063\u0065");_dfa .SetDocSecurity (0);_dfa .SetLinksUpToDate (false );var _faf ,_afe ,_gcd int64 ;_ea .Sscanf (Version ,"\u0025\u0064\u002e\u0025\u0064\u002e\u0025\u0064",&_faf ,&_afe ,&_gcd );_edf :=float64 (_faf )+float64 (_afe )/10000.0;_dfa .SetApplicationVersion (_ea .Sprintf ("\u0025\u0030\u0037\u002e\u0034\u0066",_edf ));return _dfa ;};func (_dfae CustomProperties )SetPropertyAsBool (name string ,b bool ){_dcgc :=_dfae .getNewProperty (name );_dcgc .Bool =&b ;_dfae .setOrReplaceProperty (_dcgc );};
// 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 };
// EnsureOverride ensures that an override for the given path exists, adding it if necessary
func (_gdf ContentTypes )EnsureOverride (path ,contentType string ){for _ ,_eff :=range _gdf ._cda .Override {if _eff .PartNameAttr ==path {if _gd .HasPrefix (contentType ,"\u0068\u0074\u0074\u0070"){_fae .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 );};_eff .ContentTypeAttr =contentType ;return ;};};_gdf .AddOverride (path ,contentType );};const Version ="\u0031\u002e\u0031\u0032\u002e\u0030";
// 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 );};
// WriteExtraFiles writes the extra files to the zip package.
func (_ecb *DocBase )WriteExtraFiles (z *_d .Writer )error {for _ ,_gcgc :=range _ecb .ExtraFiles {if _faff :=_ge .AddFileFromDisk (z ,_gcgc .ZipPath ,_gcgc .DiskPath );_faff !=nil {return _faff ;};};return nil ;};
// 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 (_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 "";};
// 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 (_ebcc *DocBase )AddExtraFileFromZip (f *_d .File )error {_fbg ,_efed :=_ge .ExtractToDiskTmp (f ,_ebcc .TmpPath );if _efed !=nil {return _ea .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",_efed );};_ebcc .ExtraFiles =append (_ebcc .ExtraFiles ,ExtraFile {ZipPath :f .Name ,DiskPath :_fbg });return nil ;};
// ExtraFile is an unsupported file type extracted from, or to be written to a
// zip package
type ExtraFile struct{ZipPath string ;DiskPath string ;};
type ExtraFile struct{ZipPath string ;DiskPath string ;};var ReleasedAt =_dc .Date (_bfa ,_efgb ,_def ,_adb ,_beg ,0,0,_dc .UTC );
// 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");};
// Target returns the target (path) of a relationship.
func (_bbb Relationship )Target ()string {return _bbb ._deba .TargetAttr };func (_faa CustomProperties )SetPropertyAsNull (name string ){_cca :=_faa .getNewProperty (name );_cca .Null =_fb .NewNull ();_faa .setOrReplaceProperty (_cca );};
// 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 ;};
// SetLinksUpToDate sets the links up to date flag.
func (_eaa AppProperties )SetLinksUpToDate (v bool ){_eaa ._bddg .LinksUpToDate =_fae .Bool (v )};
// 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"};
// CustomProperty contains document specific property.
// Using of this type is deprecated.
type CustomProperty struct{_decg *_cg .CT_Property };
// 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 ()}};
// 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 (_ebe ImageRef )RelativeHeight (w _bg .Distance )_bg .Distance {_fga :=float64 (_ebe .Size ().Y )/float64 (_ebe .Size ().X );return w *_bg .Distance (_fga );};func (_bfdd CustomProperties )SetPropertyAsStream (name string ,stream string ){_gdc :=_bfdd .getNewProperty (name );_gdc .Stream =&stream ;_bfdd .setOrReplaceProperty (_gdc );};
// 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");
func (_bag CoreProperties )SetContentStatus (s string ){_bag ._fea .ContentStatus =&s };
// 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 };};
// SetCompany sets the name of the company that created the document.
func (_ccg AppProperties )SetCompany (s string ){_ccg ._bddg .Company =&s };const _def =15;func (_gaf CustomProperties )SetPropertyAsLpstr (name string ,lpstr string ){_ffa :=_gaf .getNewProperty (name );_ffa .Lpstr =&lpstr ;_gaf .setOrReplaceProperty (_ffa );};
// Rows returns all table rows.
func (_bfbf Table )Rows ()[]*TableRow {_gceb :=_bfbf ._cafd .Tr ;_fcdf :=[]*TableRow {};for _ ,_agbf :=range _gceb {_fcdf =append (_fcdf ,&TableRow {_bgfd :_agbf });};return _fcdf ;};func (_edb CustomProperties )SetPropertyAsUi8 (name string ,ui8 uint64 ){_fgbb :=_edb .getNewProperty (name );_fgbb .Ui8 =&ui8 ;_edb .setOrReplaceProperty (_fgbb );};func (_dcf CustomProperties )SetPropertyAsUint (name string ,ui uint ){_bafa :=_dcf .getNewProperty (name );_bae :=uint32 (ui );_bafa .Uint =&_bae ;_dcf .setOrReplaceProperty (_bafa );};
// SetTitle records the title of the document.
func (_abad CoreProperties )SetTitle (s string ){if _abad ._fea .Title ==nil {_abad ._fea .Title =&_fae .XSDAny {XMLName :_ee .Name {Local :"\u0064\u0063\u003a\u0074\u0069\u0074\u006c\u0065"}};};_abad ._fea .Title .Data =[]byte (s );};const _beg =30;func (_caf CustomProperties )SetPropertyAsR4 (name string ,r4 float32 ){_aad :=_caf .getNewProperty (name );_aad .R4 =&r4 ;_caf .setOrReplaceProperty (_aad );};
// FindRIDForN returns the relationship ID for the i'th relationship of type t.
func (_gbe Relationships )FindRIDForN (i int ,t string )string {for _ ,_babg :=range _gbe ._bgfb .CT_Relationships .Relationship {if _babg .TypeAttr ==t {if i ==0{return _babg .IdAttr ;};i --;};};return "";};func (_baf CustomProperties )setOrReplaceProperty (_bfd *_cg .CT_Property ){_baf .setPropertyHelper (_bfd ,true );};func (_daba CustomProperties )SetPropertyAsLpwstr (name string ,lpwstr string ){_bca :=_daba .getNewProperty (name );_bca .Lpwstr =&lpwstr ;_daba .setOrReplaceProperty (_bca );};func (_geg CustomProperties )SetPropertyAsCy (name string ,cy string ){_cbf :=_geg .getNewProperty (name );_cbf .Cy =&cy ;_geg .setOrReplaceProperty (_cbf );};
// 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 ){_ccbf :=Image {};_cgfe ,_fdbf :=_bgf .Open (path );if _fdbf !=nil {return _ccbf ,_ea .Errorf ("\u0065\u0072\u0072or\u0020\u0072\u0065\u0061\u0064\u0069\u006e\u0067\u0020\u0069\u006d\u0061\u0067\u0065\u003a\u0020\u0025\u0073",_fdbf );};defer _cgfe .Close ();_bbe ,_cdf ,_fdbf :=_fc .Decode (_cgfe );if _fdbf !=nil {return _ccbf ,_ea .Errorf ("\u0075n\u0061\u0062\u006c\u0065 \u0074\u006f\u0020\u0070\u0061r\u0073e\u0020i\u006d\u0061\u0067\u0065\u003a\u0020\u0025s",_fdbf );};_ccbf .Path =path ;_ccbf .Format =_cdf ;_ccbf .Size =_bbe .Bounds ().Size ();return _ccbf ,nil ;};
// Data returns the data of an image file, if any.
func (_faee ImageRef )Data ()*[]byte {return _faee ._ebf .Data };func (_ffdg CustomProperties )SetPropertyAsError (name string ,error string ){_efebe :=_ffdg .getNewProperty (name );_efebe .Error =&error ;_ffdg .setOrReplaceProperty (_efebe );};
// GetOrCreateCustomProperties returns the custom properties of the document (and if they not exist yet, creating them first).
func (_bfba *DocBase )GetOrCreateCustomProperties ()CustomProperties {if _bfba .CustomProperties .X ()==nil {_bfba .CreateCustomProperties ();};return _bfba .CustomProperties ;};
// SetStyle assigns TableStyle to a table.
func (_edfg Table )SetStyle (style *_fcf .CT_TableStyle ){if _edfg ._cafd .TblPr ==nil {_edfg ._cafd .TblPr =_fcf .NewCT_TableProperties ();};if _edfg ._cafd .TblPr .Choice ==nil {_edfg ._cafd .TblPr .Choice =_fcf .NewCT_TablePropertiesChoice ();};_edfg ._cafd .TblPr .Choice .TableStyle =style ;};
// Theme is a drawingml theme.
type Theme struct{_ddg *_fcf .Theme };
// X returns the inner wrapped XML type.
func (_gegf Theme )X ()*_fcf .Theme {return _gegf ._ddg };
// DefAttr returns the DefAttr property.
func (_ebaf TableStyles )DefAttr ()string {return _ebaf ._agg .DefAttr };func (_gdb CustomProperties )setPropertyHelper (_fgf *_cg .CT_Property ,_fcd bool ){_daa :=_gdb .GetPropertyByName (*_fgf .NameAttr );if (_daa ==CustomProperty {}){_gdb ._gad .Property =append (_gdb ._gad .Property ,_fgf );}else if _fcd {_fgf .FmtidAttr =_daa ._decg .FmtidAttr ;if _daa ._decg .PidAttr ==0{_fgf .PidAttr =_daa ._decg .PidAttr ;};_fgf .LinkTargetAttr =_daa ._decg .LinkTargetAttr ;*_daa ._decg =*_fgf ;};};
// NewTableWithXfrm makes a new table with a pointer to its parent Xfrm for changing its offset and size.
func NewTableWithXfrm (xfrm *_fcf .CT_Transform2D )*Table {_fcff :=_fcf .NewTbl ();_fcff .TblPr =_fcf .NewCT_TableProperties ();return &Table {_cafd :_fcff ,_aaa :xfrm };};
// ContentStatus returns the content status of the document (e.g. "Final", "Draft")
func (_gge CoreProperties )ContentStatus ()string {if _gge ._fea .ContentStatus !=nil {return *_gge ._fea .ContentStatus ;};return "";};
// GetPropertyByName returns a custom property selected by it's name.
func (_bdc CustomProperties )GetPropertyByName (name string )CustomProperty {_edca :=_bdc ._gad .Property ;for _ ,_eabf :=range _edca {if *_eabf .NameAttr ==name {return CustomProperty {_decg :_eabf };};};return CustomProperty {};};
// AddDefault registers a default content type for a given file extension.
func (_fbe ContentTypes )AddDefault (fileExtension string ,contentType string ){fileExtension =_gd .ToLower (fileExtension );for _ ,_cbg :=range _fbe ._cda .Default {if _cbg .ExtensionAttr ==fileExtension &&_cbg .ContentTypeAttr ==contentType {return ;};};_geb :=_fa .NewDefault ();_geb .ExtensionAttr =fileExtension ;_geb .ContentTypeAttr =contentType ;_fbe ._cda .Default =append (_fbe ._cda .Default ,_geb );};func (_gba CustomProperties )SetPropertyAsArray (name string ,array *_fb .Array ){_efe :=_gba .getNewProperty (name );_efe .Array =array ;_gba .setOrReplaceProperty (_efe );};
// GetTargetByRelId returns a target path with the associated relation ID.
func (_ece Relationships )GetTargetByRelId (idAttr string )string {for _ ,_cgcg :=range _ece ._bgfb .Relationship {if _cgcg .IdAttr ==idAttr {return _cgcg .TargetAttr ;};};return "";};func (_cff TableRow )addCell ()*_fcf .CT_TableCell {_dbe :=_fcf .NewCT_TableCell ();_cff ._bgfd .Tc =append (_cff ._bgfd .Tc ,_dbe );return _dbe ;};func (_feaf CustomProperties )SetPropertyAsClsid (name string ,clsid string ){_cfga :=_feaf .getNewProperty (name );_cfga .Clsid =&clsid ;_feaf .setOrReplaceProperty (_cfga );};
// SetApplication sets the name of the application that created the document.
func (_gcee AppProperties )SetApplication (s string ){_gcee ._bddg .Application =&s };
// PropertiesList returns the list of all custom properties of the document.
func (_fbef CustomProperties )PropertiesList ()[]*_cg .CT_Property {return _fbef ._gad .Property };
// 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 (_bcae ImageRef )RelativeWidth (h _bg .Distance )_bg .Distance {_egc :=float64 (_bcae .Size ().X )/float64 (_bcae .Size ().Y );return h *_bg .Distance (_egc );};func (_aee CustomProperties )SetPropertyAsBlob (name ,blob string ){_eeb :=_aee .getNewProperty (name );_eeb .Blob =&blob ;_aee .setOrReplaceProperty (_eeb );};
// ContentTypes is the top level "[Content_Types].xml" in a zip package.
type ContentTypes struct{_cda *_fa .Types };
// Relationships returns a slice of all of the relationships.
func (_ggc Relationships )Relationships ()[]Relationship {_cbc :=[]Relationship {};for _ ,_cece :=range _ggc ._bgfb .Relationship {_cbc =append (_cbc ,Relationship {_deba :_cece });};return _cbc ;};
// RemoveOverrideByIndex removes an override given a path and override index.
func (_cba ContentTypes )RemoveOverrideByIndex (path string ,indexToFind int )error {_bfbc :=path [0:len (path )-5];if !_gd .HasPrefix (_bfbc ,"\u002f"){_bfbc ="\u002f"+_bfbc ;};_fcfb ,_dec :=_de .Compile (_bfbc +"\u0028\u005b\u0030-\u0039\u005d\u002b\u0029\u002e\u0078\u006d\u006c");if _dec !=nil {return _dec ;};_ad :=0;_baa :=-1;for _eab ,_cgb :=range _cba ._cda .Override {if _ce :=_fcfb .FindStringSubmatch (_cgb .PartNameAttr );len (_ce )> 1{if _ad ==indexToFind {_baa =_eab ;}else if _ad > indexToFind {_fdg ,_ :=_ac .Atoi (_ce [1]);_fdg --;_cgb .PartNameAttr =_ea .Sprintf ("\u0025\u0073\u0025\u0064\u002e\u0078\u006d\u006c",_bfbc ,_fdg );};_ad ++;};};if _baa > -1{copy (_cba ._cda .Override [_baa :],_cba ._cda .Override [_baa +1:]);_cba ._cda .Override =_cba ._cda .Override [0:len (_cba ._cda .Override )-1];};return nil ;};
// Format returns the format of the underlying image
func (_bfbe ImageRef )Format ()string {return _bfbe ._ebf .Format };
// X returns the inner wrapped XML type.
func (_bfdf Table )X ()*_fcf .Tbl {return _bfdf ._cafd };
// CoreProperties contains document specific properties.
type CoreProperties struct{_fea *_gc .CoreProperties };
// Title returns the Title of the document
func (_ccb CoreProperties )Title ()string {if _ccb ._fea .Title !=nil {return string (_ccb ._fea .Title .Data );};return "";};
// CopyOverride copies override content type for a given `path` and puts it with a path `newPath`.
func (_dae ContentTypes )CopyOverride (path ,newPath string ){if !_gd .HasPrefix (path ,"\u002f"){path ="\u002f"+path ;};if !_gd .HasPrefix (newPath ,"\u002f"){newPath ="\u002f"+newPath ;};for _fgb :=range _dae ._cda .Override {if _dae ._cda .Override [_fgb ].PartNameAttr ==path {_fad :=*_dae ._cda .Override [_fgb ];_fad .PartNameAttr =newPath ;_dae ._cda .Override =append (_dae ._cda .Override ,&_fad );};};};
// Modified returns the time that the document was modified.
func (_gf CoreProperties )Modified ()_dc .Time {return _eaf (_gf ._fea .Modified )};
// TableCol represents a column in a table.
type TableCol struct{_dabe *_fcf .CT_TableCol };func (_ecc *ImageRef )SetRelID (id string ){_ecc ._agb =id };func (_bgce CustomProperties )SetPropertyAsFiletime (name string ,filetime _dc .Time ){_ggec :=_bgce .getNewProperty (name );_ggec .Filetime =&filetime ;_bgce .setOrReplaceProperty (_ggec );};
// SetOffsetX sets horizontal offset of a table in distance units (see measurement package).
func (_bbbf Table )SetOffsetX (offX float64 ){if _bbbf ._aaa .Off ==nil {_bbbf ._aaa .Off =_fcf .NewCT_Point2D ();_bfda :=int64 (0);_bbbf ._aaa .Off .YAttr =_fcf .ST_Coordinate {ST_CoordinateUnqualified :&_bfda };};_gea :=_bg .ToEMU (offX );_bbbf ._aaa .Off .XAttr =_fcf .ST_Coordinate {ST_CoordinateUnqualified :&_gea };};
// X returns the inner wrapped XML type.
func (_cee CustomProperties )X ()*_cg .Properties {return _cee ._gad };
// 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 _fc .Image ;Images []ImageRef ;ExtraFiles []ExtraFile ;TmpPath string ;};
// ID returns the ID of a relationship.
func (_gac Relationship )ID ()string {return _gac ._deba .IdAttr };
// Target returns the target attrubute of the image reference (a path where the image file is located in the document structure).
func (_ecf *ImageRef )Target ()string {return _ecf ._eca };
// NewTheme constructs a new theme.
func NewTheme ()Theme {return Theme {_fcf .NewTheme ()}};
// Hyperlink is just an appropriately configured relationship.
type Hyperlink Relationship ;func (_fagb CustomProperties )SetPropertyAsUi4 (name string ,ui4 uint32 ){_eaec :=_fagb .getNewProperty (name );_eaec .Ui4 =&ui4 ;_fagb .setOrReplaceProperty (_eaec );};
// Properties returns table properties.
func (_ddc Table )Properties ()*_fcf .CT_TableProperties {return _ddc ._cafd .TblPr };
// RelID returns the relationship ID.
func (_bfbb ImageRef )RelID ()string {return _bfbb ._agb };
// NewRelationshipsCopy creates a new relationships wrapper as a copy of passed in instance.
func NewRelationshipsCopy (rels Relationships )Relationships {_aab :=*rels ._bgfb ;return Relationships {_bgfb :&_aab };};
// AddCol adds a column to a table.
func (_gaaf Table )AddCol ()*TableCol {_aaca :=_fcf .NewCT_TableCol ();_gaaf ._cafd .TblGrid .GridCol =append (_gaaf ._cafd .TblGrid .GridCol ,_aaca );for _ ,_faaa :=range _gaaf ._cafd .Tr {_bfdff :=_fcf .NewCT_TableCell ();_faaa .Tc =append (_faaa .Tc ,_bfdff );};return &TableCol {_dabe :_aaca };};func (_bff CustomProperties )SetPropertyAsVector (name string ,vector *_fb .Vector ){_eac :=_bff .getNewProperty (name );_eac .Vector =vector ;_bff .setOrReplaceProperty (_eac );};
// NewContentTypes returns a wrapper around a newly constructed content-types.
func NewContentTypes ()ContentTypes {_eg :=ContentTypes {_cda :_fa .NewTypes ()};_eg .AddDefault ("\u0078\u006d\u006c","\u0061p\u0070l\u0069\u0063\u0061\u0074\u0069\u006f\u006e\u002f\u0078\u006d\u006c");_eg .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");_eg .AddDefault ("\u0070\u006e\u0067","\u0069m\u0061\u0067\u0065\u002f\u0070\u006eg");_eg .AddDefault ("\u006a\u0070\u0065\u0067","\u0069\u006d\u0061\u0067\u0065\u002f\u006a\u0070\u0065\u0067");_eg .AddDefault ("\u006a\u0070\u0067","\u0069m\u0061\u0067\u0065\u002f\u006a\u0070g");_eg .AddDefault ("\u0077\u006d\u0066","i\u006d\u0061\u0067\u0065\u002f\u0078\u002d\u0077\u006d\u0066");_eg .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");_eg .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 _eg ;};const _efgb =6;func (_aag CustomProperties )SetPropertyAsI4 (name string ,i4 int32 ){_cfg :=_aag .getNewProperty (name );_cfg .I4 =&i4 ;_aag .setOrReplaceProperty (_cfg );};
// NewTableStyles constructs a new TableStyles.
func NewTableStyles ()TableStyles {return TableStyles {_agg :_fcf .NewTblStyleLst ()}};
// Type returns the type of a relationship.
func (_gag Relationship )Type ()string {return _gag ._deba .TypeAttr };func (_gcdb CustomProperties )SetPropertyAsI8 (name string ,i8 int64 ){_dgf :=_gcdb .getNewProperty (name );_dgf .I8 =&i8 ;_gcdb .setOrReplaceProperty (_dgf );};func (_fdb CustomProperties )SetPropertyAsDate (name string ,date _dc .Time ){date =date .UTC ();_aac ,_aed ,_gdce :=date .Date ();_gcg ,_bee ,_ccge :=date .Clock ();_ebb :=_dc .Date (_aac ,_aed ,_gdce ,_gcg ,_bee ,_ccge ,0,_dc .UTC );_ffg :=_fdb .getNewProperty (name );_ffg .Filetime =&_ebb ;_fdb .setOrReplaceProperty (_ffg );};func (_gfc Relationship )String ()string {return _ea .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",_gfc .ID (),_gfc .Target (),_gfc .Type ());};
// AddImageToZip adds an image (either from bytes or from disk) and adds it to the zip file.
func AddImageToZip (z *_d .Writer ,img ImageRef ,imageNum int ,dt _fae .DocType )error {_afcb :=_fae .AbsoluteImageFilename (dt ,imageNum ,_gd .ToLower (img .Format ()));if img .Data ()!=nil &&len (*img .Data ())> 0{if _gafb :=_ge .AddFileFromBytes (z ,_afcb ,*img .Data ());_gafb !=nil {return _gafb ;};}else if img .Path ()!=""{if _ada :=_ge .AddFileFromDisk (z ,_afcb ,img .Path ());_ada !=nil {return _ada ;};}else {return _ea .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 ;};
// TableStyles contains document specific properties.
type TableStyles struct{_agg *_fcf .TblStyleLst };
// X returns the inner wrapped XML type.
func (_afc AppProperties )X ()*_ca .Properties {return _afc ._bddg };func (_dab CustomProperties )SetPropertyAsUi2 (name string ,ui2 uint16 ){_afca :=_dab .getNewProperty (name );_afca .Ui2 =&ui2 ;_dab .setOrReplaceProperty (_afca );};
// SetCreated sets the time that the document was created.
func (_cgba CoreProperties )SetCreated (t _dc .Time ){_cgba ._fea .Created =_fba (t ,"\u0064c\u0074e\u0072\u006d\u0073\u003a\u0063\u0072\u0065\u0061\u0074\u0065\u0064");};const _adb =15;func (_fde CustomProperties )SetPropertyAsR8 (name string ,r8 float64 ){_adf :=_fde .getNewProperty (name );_adf .R8 =&r8 ;_fde .setOrReplaceProperty (_adf );};
// Application returns the name of the application that created the document.
// For unioffice created documents, it defaults to github.com/unidoc/unioffice
func (_gb AppProperties )Application ()string {if _gb ._bddg .Application !=nil {return *_gb ._bddg .Application ;};return "";};func (_afa CustomProperties )SetPropertyAsInt (name string ,i int ){_gca :=_afa .getNewProperty (name );_gbg :=int32 (i );_gca .Int =&_gbg ;_afa .setOrReplaceProperty (_gca );};
// X returns the inner wrapped XML type of CustomProperty.
func (_ggga CustomProperty )X ()*_cg .CT_Property {return _ggga ._decg };
// SetOffsetY sets vertical offset of a table in distance units (see measurement package).
func (_gccfd Table )SetOffsetY (offY float64 ){if _gccfd ._aaa .Off ==nil {_gccfd ._aaa .Off =_fcf .NewCT_Point2D ();_baab :=int64 (0);_gccfd ._aaa .Off .XAttr =_fcf .ST_Coordinate {ST_CoordinateUnqualified :&_baab };};_acggf :=_bg .ToEMU (offY );_gccfd ._aaa .Off .YAttr =_fcf .ST_Coordinate {ST_CoordinateUnqualified :&_acggf };};
// NewRelationship constructs a new relationship.
func NewRelationship ()Relationship {return Relationship {_deba :_df .NewRelationship ()}};
// NewCustomProperties constructs a new CustomProperties.
func NewCustomProperties ()CustomProperties {return CustomProperties {_gad :_cg .NewProperties ()}};
// 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 ){_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 ;};
// 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 "";};
// RelID returns the relationship ID.
func (_eaf ImageRef )RelID ()string {return _eaf ._fefg };
// 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 (_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";
// 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 );};
// 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 );};
// 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 {};};
// NewRelationship constructs a new relationship.
func NewRelationship ()Relationship {return Relationship {_edd :_bb .NewRelationship ()}};
// X returns the inner wrapped XML type.
func (_bdab Relationship )X ()*_bb .Relationship {return _bdab ._edd };
// Format returns the format of the underlying image
func (_acd ImageRef )Format ()string {return _acd ._gdg .Format };
// Properties returns table properties.
func (_dfb Table )Grid ()*_ag .CT_TableGrid {return _dfb ._fege .TblGrid };
// 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 (_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 };};
// 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 (_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 (_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 (_dag CoreProperties )SetCreated (t _ba .Time ){_dag ._baega .Created =_beb (t ,"\u0064c\u0074e\u0072\u006d\u0073\u003a\u0063\u0072\u0065\u0061\u0074\u0065\u0064");};
// 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 );};
// 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 (_dfg AppProperties )SetApplication (s string ){_dfg ._aff .Application =&s };const _dcb =31;
// 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 );};
// 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 (_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 (_dede TableStyles )X ()*_ag .TblStyleLst {return _dede ._bfgf };
// 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};
func ImageFromFile (path string )(Image ,error ){_cab ,_faga :=_ab .Open (path );_eacb :=Image {};if _faga !=nil {return _eacb ,_ea .Errorf ("\u0065\u0072\u0072or\u0020\u0072\u0065\u0061\u0064\u0069\u006e\u0067\u0020\u0069\u006d\u0061\u0067\u0065\u003a\u0020\u0025\u0073",_faga );};defer _cab .Close ();_cbd ,_eafa ,_faga :=_fc .Decode (_cab );if _faga !=nil {return _eacb ,_ea .Errorf ("\u0075n\u0061\u0062\u006c\u0065 \u0074\u006f\u0020\u0070\u0061r\u0073e\u0020i\u006d\u0061\u0067\u0065\u003a\u0020\u0025s",_faga );};_eacb .Path =path ;_eacb .Format =_eafa ;_eacb .Size =_cbd .Bounds ().Size ();return _eacb ,nil ;};
// Category returns the category of the document
func (_dab CoreProperties )Category ()string {if _dab ._baega .Category !=nil {return *_dab ._baega .Category ;};return "";};
func (_bce CoreProperties )Category ()string {if _bce ._fea .Category !=nil {return *_bce ._fea .Category ;};return "";};const _bcb ="\u0032\u0020\u004aan\u0075\u0061\u0072\u0079\u0020\u0032\u0030\u0030\u0036\u0020\u0061\u0074\u0020\u0031\u0035\u003a\u0030\u0034";func (_caag CustomProperties )SetPropertyAsStorage (name string ,storage string ){_dde :=_caag .getNewProperty (name );_dde .Storage =&storage ;_caag .setOrReplaceProperty (_dde );};
// 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 *_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 };
// Relationships represents a .rels file.
type Relationships struct{_bgfb *_df .Relationships };
// 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 };};
func MakeImageRef (img Image ,d *DocBase ,rels Relationships )ImageRef {return ImageRef {_ebf :img ,_cgd :d ,_bgdf :rels };};func UtcTimeFormat (t _dc .Time )string {return t .Format (_bcb )+"\u0020\u0055\u0054\u0043"};
// IsEmpty returns true if there are no relationships.
func (_gafa Relationships )IsEmpty ()bool {return _gafa ._bgfb ==nil ||len (_gafa ._bgfb .Relationship )==0;};
// EnsureDefault esnures that an extension and default content type exist,
// adding it if necessary.
func (_bfb ContentTypes )EnsureDefault (ext ,contentType string ){ext =_gd .ToLower (ext );for _ ,_aae :=range _bfb ._cda .Default {if _aae .ExtensionAttr ==ext {_aae .ContentTypeAttr =contentType ;return ;};};_caa :=&_fa .Default {};_caa .ContentTypeAttr =contentType ;_caa .ExtensionAttr =ext ;_bfb ._cda .Default =append (_bfb ._cda .Default ,_caa );};
// SetWidth sets column width, see measurement package.
func (_bcg TableCol )SetWidth (m _bg .Distance ){_dac :=_bg .ToEMU (float64 (m ));_bcg ._dabe .WAttr =_fcf .ST_Coordinate {ST_CoordinateUnqualified :&_dac };};func (_fgbe CustomProperties )SetPropertyAsBstr (name string ,bstr string ){_deb :=_fgbe .getNewProperty (name );_deb .Bstr =&bstr ;_fgbe .setOrReplaceProperty (_deb );};
// NewCoreProperties constructs a new CoreProperties.
func NewCoreProperties ()CoreProperties {return CoreProperties {_fea :_gc .NewCoreProperties ()}};
// 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 (_dcec Relationships )AddAutoRelationship (dt _fd .DocType ,src string ,idx int ,ctype string )Relationship {return _dcec .AddRelationship (_fd .RelativeFilename (dt ,src ,ctype ,idx ),ctype );};
func (_cag Relationships )AddAutoRelationship (dt _fae .DocType ,src string ,idx int ,ctype string )Relationship {return _cag .AddRelationship (_fae .RelativeFilename (dt ,src ,ctype ,idx ),ctype );};
// SetModified sets the time that the document was modified.
func (_fab CoreProperties )SetModified (t _dc .Time ){_fab ._fea .Modified =_fba (t ,"\u0064\u0063t\u0065\u0072\u006ds\u003a\u006d\u006f\u0064\u0069\u0066\u0069\u0065\u0064");};
// Author returns the author of the document
func (_gcb CoreProperties )Author ()string {if _gcb ._fea .Creator !=nil {return string (_gcb ._fea .Creator .Data );};return "";};
// TableRow represents a row in a table.
type TableRow struct{_bgfd *_fcf .CT_TableRow };
// Remove removes an existing relationship.
func (_ffgc Relationships )Remove (rel Relationship )bool {for _eaff ,_egfc :=range _ffgc ._bgfb .Relationship {if _egfc ==rel ._deba {copy (_ffgc ._bgfb .Relationship [_eaff :],_ffgc ._bgfb .Relationship [_eaff +1:]);_ffgc ._bgfb .Relationship =_ffgc ._bgfb .Relationship [0:len (_ffgc ._bgfb .Relationship )-1];return true ;};};return false ;};
// Company returns the name of the company that created the document.
// For unioffice created documents, it defaults to github.com/unidoc/unioffice
func (_gccf AppProperties )Company ()string {if _gccf ._bddg .Company !=nil {return *_gccf ._bddg .Company ;};return "";};func (_daed CustomProperties )SetPropertyAsI2 (name string ,i2 int16 ){_fgg :=_daed .getNewProperty (name );_fgg .I2 =&i2 ;_daed .setOrReplaceProperty (_fgg );};
// AddRow adds a row to a table.
func (_bbgc Table )AddRow ()*TableRow {_gcdg :=_fcf .NewCT_TableRow ();for _bdfa :=0;_bdfa < len (_bbgc ._cafd .TblGrid .GridCol );_bdfa ++{_gcdg .Tc =append (_gcdg .Tc ,_fcf .NewCT_TableCell ());};_bbgc ._cafd .Tr =append (_bbgc ._cafd .Tr ,_gcdg );return &TableRow {_bgfd :_gcdg };};func _eaf (_ebc *_fae .XSDAny )_dc .Time {if _ebc ==nil {return _dc .Time {};};_bab ,_gcec :=_dc .Parse (_dg ,string (_ebc .Data ));if _gcec !=nil {_fae .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 (_ebc .Data ),_gcec );};return _bab ;};const _bfa =2021;
// X returns the underlying raw XML data.
func (_egf Relationships )X ()*_df .Relationships {return _egf ._bgfb };
// 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 );};
func (_cc AppProperties )SetDocSecurity (v int32 ){_cc ._bddg .DocSecurity =_fae .Int32 (v )};
// 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 };
// Clear removes any existing relationships.
func (_ggf Relationships )Clear (){_ggf ._bgfb .Relationship =nil };
// Append appends DocBase part of an office document to another DocBase.
func (_cb DocBase )Append (docBase1 DocBase )DocBase {_dcd :=docBase1 .ContentTypes .X ();for _ ,_gda :=range _dcd .Default {_cb .ContentTypes .AddDefault (_gda .ExtensionAttr ,_gda .ContentTypeAttr );};for _ ,_bd :=range _dcd .Override {_cb .ContentTypes .AddOverride (_bd .PartNameAttr ,_bd .ContentTypeAttr );};_gg :=_cb .AppProperties .X ();_ed :=docBase1 .AppProperties .X ();if _gg .Pages !=nil {if _ed .Pages !=nil {*_gg .Pages +=*_ed .Pages ;};}else if _ed .Pages !=nil {_gg .Pages =_ed .Pages ;};if _gg .Words !=nil {if _ed .Words !=nil {*_gg .Words +=*_ed .Words ;};}else if _ed .Words !=nil {_gg .Words =_ed .Words ;};if _gg .Characters !=nil {if _ed .Characters !=nil {*_gg .Characters +=*_ed .Characters ;};}else if _ed .Characters !=nil {_gg .Characters =_ed .Characters ;};if _gg .Lines !=nil {if _ed .Lines !=nil {*_gg .Lines +=*_ed .Lines ;};}else if _ed .Lines !=nil {_gg .Lines =_ed .Lines ;};if _gg .Paragraphs !=nil {if _ed .Paragraphs !=nil {*_gg .Paragraphs +=*_ed .Paragraphs ;};}else if _ed .Paragraphs !=nil {_gg .Paragraphs =_ed .Paragraphs ;};if _gg .Notes !=nil {if _ed .Notes !=nil {*_gg .Notes +=*_ed .Notes ;};}else if _ed .Notes !=nil {_gg .Notes =_ed .Notes ;};if _gg .HiddenSlides !=nil {if _ed .HiddenSlides !=nil {*_gg .HiddenSlides +=*_ed .HiddenSlides ;};}else if _ed .HiddenSlides !=nil {_gg .HiddenSlides =_ed .HiddenSlides ;};if _gg .MMClips !=nil {if _ed .MMClips !=nil {*_gg .MMClips +=*_ed .MMClips ;};}else if _ed .MMClips !=nil {_gg .MMClips =_ed .MMClips ;};if _gg .LinksUpToDate !=nil {if _ed .LinksUpToDate !=nil {*_gg .LinksUpToDate =*_gg .LinksUpToDate &&*_ed .LinksUpToDate ;};}else if _ed .LinksUpToDate !=nil {_gg .LinksUpToDate =_ed .LinksUpToDate ;};if _gg .CharactersWithSpaces !=nil {if _ed .CharactersWithSpaces !=nil {*_gg .CharactersWithSpaces +=*_ed .CharactersWithSpaces ;};}else if _ed .CharactersWithSpaces !=nil {_gg .CharactersWithSpaces =_ed .CharactersWithSpaces ;};if _gg .SharedDoc !=nil {if _ed .SharedDoc !=nil {*_gg .SharedDoc =*_gg .SharedDoc ||*_ed .SharedDoc ;};}else if _ed .SharedDoc !=nil {_gg .SharedDoc =_ed .SharedDoc ;};if _gg .HyperlinksChanged !=nil {if _ed .HyperlinksChanged !=nil {*_gg .HyperlinksChanged =*_gg .HyperlinksChanged ||*_ed .HyperlinksChanged ;};}else if _ed .HyperlinksChanged !=nil {_gg .HyperlinksChanged =_ed .HyperlinksChanged ;};_gg .DigSig =nil ;if _gg .TitlesOfParts ==nil &&_ed .TitlesOfParts !=nil {_gg .TitlesOfParts =_ed .TitlesOfParts ;};if _gg .HeadingPairs !=nil {if _ed .HeadingPairs !=nil {_aba :=_gg .HeadingPairs .Vector ;_eae :=_ed .HeadingPairs .Vector ;_gcf :=_aba .Variant ;_gcef :=_eae .Variant ;_fcg :=[]*_fb .Variant {};for _eb :=0;_eb < len (_gcef );_eb +=2{_cad :=_gcef [_eb ].Lpstr ;_aa :=false ;for _cf :=0;_cf < len (_gcf );_cf +=2{_eec :=_gcf [_cf ].Lpstr ;if _eec !=nil &&_cad !=nil &&*_eec ==*_cad {*_gcf [_cf +1].I4 =*_gcf [_cf +1].I4 +*_gcef [_eb +1].I4 ;_aa =true ;break ;};};if !_aa {_fcg =append (_fcg ,&_fb .Variant {CT_Variant :_fb .CT_Variant {Lpstr :_gcef [_eb ].Lpstr }});_fcg =append (_fcg ,&_fb .Variant {CT_Variant :_fb .CT_Variant {I4 :_gcef [_eb ].I4 }});};};_gcf =append (_gcf ,_fcg ...);_aba .SizeAttr =uint32 (len (_gcf ));};}else if _ed .HeadingPairs !=nil {_gg .HeadingPairs =_ed .HeadingPairs ;};if _gg .HLinks !=nil {if _ed .HLinks !=nil {_ace :=_gg .HLinks .Vector ;_eea :=_ed .HLinks .Vector ;_ged :=_ace .Variant ;_ba :=_eea .Variant ;for _ ,_cd :=range _ba {_edc :=true ;for _ ,_bdd :=range _ged {if _f .DeepEqual (_bdd ,_cd ){_edc =false ;break ;};};if _edc {_ged =append (_ged ,_cd );_ace .SizeAttr ++;};};};}else if _ed .HLinks !=nil {_gg .HLinks =_ed .HLinks ;};_acg :=_cb .GetOrCreateCustomProperties ();_fcc :=docBase1 .GetOrCreateCustomProperties ();for _ ,_gcc :=range _fcc .PropertiesList (){_acg .setProperty (_gcc );};_cb .CustomProperties =_acg ;_cgc :=_cb .Rels .X ().Relationship ;for _ ,_fg :=range docBase1 .Rels .X ().Relationship {_dee :=true ;for _ ,_fd :=range _cgc {if _fd .TargetAttr ==_fg .TargetAttr &&_fd .TypeAttr ==_fg .TypeAttr {_dee =false ;break ;};};if _dee {_cb .Rels .AddRelationship (_fg .TargetAttr ,_fg .TypeAttr );};};for _ ,_eed :=range docBase1 .ExtraFiles {_ga :=_eed .ZipPath ;_bfe :=true ;for _ ,_ggg :=range _cb .ExtraFiles {if _ggg .ZipPath ==_ga {_bfe =false ;break ;};};if _bfe {_cb .ExtraFiles =append (_cb .ExtraFiles ,_eed );};};return _cb ;};
// Table represents a table in the document.
type Table struct{_cafd *_fcf .Tbl ;_aaa *_fcf .CT_Transform2D ;};func (_bac CustomProperties )SetPropertyAsUi1 (name string ,ui1 uint8 ){_eeda :=_bac .getNewProperty (name );_eeda .Ui1 =&ui1 ;_bac .setOrReplaceProperty (_eeda );};func _fba (_bb _dc .Time ,_aaf string )*_fae .XSDAny {_afd :=&_fae .XSDAny {XMLName :_ee .Name {Local :_aaf }};_afd .Attrs =append (_afd .Attrs ,_ee .Attr {Name :_ee .Name {Local :"\u0078\u0073\u0069\u003a\u0074\u0079\u0070\u0065"},Value :"\u0064\u0063\u0074\u0065\u0072\u006d\u0073\u003a\u00573\u0043\u0044\u0054\u0046"});_afd .Attrs =append (_afd .Attrs ,_ee .Attr {Name :_ee .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"});_afd .Attrs =append (_afd .Attrs ,_ee .Attr {Name :_ee .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/"});_afd .Data =[]byte (_bb .Format (_dg ));return _afd ;};
// NewTable makes a new table.
func NewTable ()*Table {_fbf :=_fcf .NewTbl ();_fbf .TblPr =_fcf .NewCT_TableProperties ();return &Table {_cafd :_fbf };};
// X returns the inner raw content types.
func (_gee ContentTypes )X ()*_fa .Types {return _gee ._cda };
// SetCategory records the category of the document.
func (_ag CoreProperties )SetCategory (s string ){_ag ._fea .Category =&s };
// AddHyperlink adds an external hyperlink relationship.
func (_dge Relationships )AddHyperlink (target string )Hyperlink {_bfbca :=_dge .AddRelationship (target ,_fae .HyperLinkType );_bfbca ._deba .TargetModeAttr =_df .ST_TargetModeExternal ;return Hyperlink (_bfbca );};
// SetTarget set the target (path) of a relationship.
func (_agbb Relationship )SetTarget (s string ){_agbb ._deba .TargetAttr =s };
// ApplicationVersion returns the version of the application that created the
// document.
func (_fca AppProperties )ApplicationVersion ()string {if _fca ._bddg .AppVersion !=nil {return *_fca ._bddg .AppVersion ;};return "";};func (_fgbf CustomProperties )SetPropertyAsOstream (name string ,ostream string ){_gdfg :=_fgbf .getNewProperty (name );_gdfg .Ostream =&ostream ;_fgbf .setOrReplaceProperty (_gdfg );};
// 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 (_ecae *ImageRef )SetTarget (target string ){_ecae ._eca =target };
// CopyRelationship copies the relationship.
func (_bdb Relationships )CopyRelationship (idAttr string )(Relationship ,bool ){for _bda :=range _bdb ._bgfb .Relationship {if _bdb ._bgfb .Relationship [_bda ].IdAttr ==idAttr {_ddf :=*_bdb ._bgfb .Relationship [_bda ];_ebbe :=len (_bdb ._bgfb .Relationship )+1;_edd :=map[string ]struct{}{};for _ ,_ege :=range _bdb ._bgfb .Relationship {_edd [_ege .IdAttr ]=struct{}{};};for _ ,_daaa :=_edd [_ea .Sprintf ("\u0072\u0049\u0064%\u0064",_ebbe )];_daaa ;_ ,_daaa =_edd [_ea .Sprintf ("\u0072\u0049\u0064%\u0064",_ebbe )]{_ebbe ++;};_ddf .IdAttr =_ea .Sprintf ("\u0072\u0049\u0064%\u0064",_ebbe );_bdb ._bgfb .Relationship =append (_bdb ._bgfb .Relationship ,&_ddf );return Relationship {_deba :&_ddf },true ;};};return Relationship {},false ;};
// Cells returns an array of row cells.
func (_dea TableRow )Cells ()[]*_fcf .CT_TableCell {return _dea ._bgfd .Tc };
// GetImageBytesByTarget returns Image object with Data bytes read from its target.
func (_cec *DocBase )GetImageBytesByTarget (target string )(Image ,error ){if target !=""{target ="\u0077\u006f\u0072d\u002f"+target ;for _ ,_gaa :=range _cec .Images {if _gaa .Target ()==target {return ImageFromStorage (_gaa .Path ());};};};return Image {},_fgfg ;};
// AddOverride adds an override content type for a given path name.
func (_ff ContentTypes )AddOverride (path ,contentType string ){if !_gd .HasPrefix (path ,"\u002f"){path ="\u002f"+path ;};if _gd .HasPrefix (contentType ,"\u0068\u0074\u0074\u0070"){_fae .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 _ ,_eeag :=range _ff ._cda .Override {if _eeag .PartNameAttr ==path &&_eeag .ContentTypeAttr ==contentType {return ;};};_fbed :=_fa .NewOverride ();_fbed .PartNameAttr =path ;_fbed .ContentTypeAttr =contentType ;_ff ._cda .Override =append (_ff ._cda .Override ,_fbed );};
// SetLastModifiedBy records the last person to modify the document.
func (_cfc CoreProperties )SetLastModifiedBy (s string ){_cfc ._fea .LastModifiedBy =&s };func init (){_ec .SetAsStorage ()};
// SetApplicationVersion sets the version of the application that created the
// document. Per MS, the verison string mut be in the form 'XX.YYYY'.
func (_bdf AppProperties )SetApplicationVersion (s string ){_bdf ._bddg .AppVersion =&s };
// RemoveOverride removes an override given a path.
func (_be ContentTypes )RemoveOverride (path string ){if !_gd .HasPrefix (path ,"\u002f"){path ="\u002f"+path ;};for _cga ,_faef :=range _be ._cda .Override {if _faef .PartNameAttr ==path {copy (_be ._cda .Override [_cga :],_be ._cda .Override [_cga +1:]);_be ._cda .Override =_be ._cda .Override [0:len (_be ._cda .Override )-1];};};};
// 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 );};
type AppProperties struct{_bddg *_ca .Properties };
// Path returns the path to an image file, if any.
func (_edc ImageRef )Path ()string {return _edc ._gdg .Path };
func (_fge ImageRef )Path ()string {return _fge ._ebf .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 };};
// SetAuthor records the author of the document.
func (_dcg CoreProperties )SetAuthor (s string ){if _dcg ._fea .Creator ==nil {_dcg ._fea .Creator =&_fae .XSDAny {XMLName :_ee .Name {Local :"\u0064\u0063\u003a\u0063\u0072\u0065\u0061\u0074\u006f\u0072"}};};_dcg ._fea .Creator .Data =[]byte (s );};
// 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 );};
func (_bfdg Relationship )X ()*_df .Relationship {return _bfdg ._deba };
// 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 );};
// AddRelationship adds a relationship.
func (_bbg Relationships )AddRelationship (target ,ctype string )Relationship {if !_gd .HasPrefix (ctype ,"\u0068t\u0074\u0070\u003a\u002f\u002f"){_fae .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 );};_dcdg :=_df .NewRelationship ();_cddd :=len (_bbg ._bgfb .Relationship )+1;_eedf :=map[string ]struct{}{};for _ ,_dcde :=range _bbg ._bgfb .Relationship {_eedf [_dcde .IdAttr ]=struct{}{};};for _ ,_fbgd :=_eedf [_ea .Sprintf ("\u0072\u0049\u0064%\u0064",_cddd )];_fbgd ;_ ,_fbgd =_eedf [_ea .Sprintf ("\u0072\u0049\u0064%\u0064",_cddd )]{_cddd ++;};_dcdg .IdAttr =_ea .Sprintf ("\u0072\u0049\u0064%\u0064",_cddd );_dcdg .TargetAttr =target ;_dcdg .TypeAttr =ctype ;_bbg ._bgfb .Relationship =append (_bbg ._bgfb .Relationship ,_dcdg );return Relationship {_deba :_dcdg };};var _fgfg =_b .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");
// Properties returns table properties.
func (_gab Table )Properties ()*_ag .CT_TableProperties {return _gab ._fege .TblPr };
// X returns the inner wrapped XML type.
func (_ggcg TableStyles )X ()*_fcf .TblStyleLst {return _ggcg ._agg };
// 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 );};
// ImageRef is a reference to an image within a document.
type ImageRef struct{_cgd *DocBase ;_bgdf Relationships ;_ebf Image ;_agb string ;_eca string ;};
// 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 );};
// NewRelationships creates a new relationship wrapper.
func NewRelationships ()Relationships {return Relationships {_bgfb :_df .NewRelationships ()}};func (_bgc CustomProperties )SetPropertyAsOstorage (name string ,ostorage string ){_gab :=_bgc .getNewProperty (name );_gab .Ostorage =&ostorage ;_bgc .setOrReplaceProperty (_gab );};func (_cgf CustomProperties )SetPropertyAsVstream (name string ,vstream *_fb .Vstream ){_ggd :=_cgf .getNewProperty (name );_ggd .Vstream =vstream ;_cgf .setOrReplaceProperty (_ggd );};
// 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 ;};
// SetLanguage records the language of the document.
func (_efg CoreProperties )SetLanguage (s string ){_efg ._fea .Language =&_fae .XSDAny {XMLName :_ee .Name {Local :"d\u0063\u003a\u006c\u0061\u006e\u0067\u0075\u0061\u0067\u0065"}};_efg ._fea .Language .Data =[]byte (s );};
// Relationship is a relationship within a .rels file.
type Relationship struct{_deba *_df .Relationship };
// 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 (_fe AppProperties )Pages ()int32 {if _fe ._bddg .Pages !=nil {return *_fe ._bddg .Pages ;};return 0;};
// 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";
func ImageFromBytes (data []byte )(Image ,error ){_eabb :=Image {};_gdbe ,_gbb ,_bfg :=_fc .Decode (_ef .NewReader (data ));if _bfg !=nil {return _eabb ,_ea .Errorf ("\u0075n\u0061\u0062\u006c\u0065 \u0074\u006f\u0020\u0070\u0061r\u0073e\u0020i\u006d\u0061\u0067\u0065\u003a\u0020\u0025s",_bfg );};_eabb .Data =&data ;_eabb .Format =_gbb ;_eabb .Size =_gdbe .Bounds ().Size ();return _eabb ,nil ;};
// NewCustomProperties constructs a new CustomProperties.
func NewCustomProperties ()CustomProperties {return CustomProperties {_bdd :_eg .NewProperties ()}};
// Size returns the size of an image
func (_dfd ImageRef )Size ()_fc .Point {return _dfd ._ebf .Size };func (_cac CustomProperties )SetPropertyAsI1 (name string ,i1 int8 ){_ffd :=_cac .getNewProperty (name );_ffd .I1 =&i1 ;_cac .setOrReplaceProperty (_ffd );};
// Hyperlink is just an appropriately configured relationship.
type Hyperlink Relationship ;
// LastModifiedBy returns the name of the last person to modify the document
func (_gae CoreProperties )LastModifiedBy ()string {if _gae ._fea .LastModifiedBy !=nil {return *_gae ._fea .LastModifiedBy ;};return "";};func (_cdd CustomProperties )SetPropertyAsOblob (name ,oblob string ){_efeb :=_cdd .getNewProperty (name );_efeb .Oblob =&oblob ;_cdd .setOrReplaceProperty (_efeb );};
// 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 );};
// CreateCustomProperties creates the custom properties of the document.
func (_bdcd *DocBase )CreateCustomProperties (){_bdcd .CustomProperties =NewCustomProperties ();_bdcd .AddCustomRelationships ();};
// 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 ;};
// Properties returns table properties.
func (_fcfa Table )Grid ()*_fcf .CT_TableGrid {return _fcfa ._cafd .TblGrid };
// Created returns the time that the document was created.
func (_fed CoreProperties )Created ()_dc .Time {return _eaf (_fed ._fea .Created )};
// TblStyle returns the TblStyle property.
func (_aafa TableStyles )TblStyle ()[]*_fcf .CT_TableStyle {return _aafa ._agg .TblStyle };func (_cdb CustomProperties )SetPropertyAsDecimal (name string ,decimal float64 ){_aeb :=_cdb .getNewProperty (name );_aeb .Decimal =&decimal ;_cdb .setOrReplaceProperty (_aeb );};
// Description returns the description of the document
func (_acgg CoreProperties )Description ()string {if _acgg ._fea .Description !=nil {return string (_acgg ._fea .Description .Data );};return "";};func (_aef CustomProperties )getNewProperty (_feda string )*_cg .CT_Property {_eee :=_aef ._gad .Property ;_fccb :=int32 (1);for _ ,_abb :=range _eee {if _abb .PidAttr > _fccb {_fccb =_abb .PidAttr ;};};_gcdd :=_cg .NewCT_Property ();_gcdd .NameAttr =&_feda ;_gcdd .PidAttr =_fccb +1;_gcdd .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 _gcdd ;};
// X returns the inner wrapped XML type.
func (_bgd CoreProperties )X ()*_gc .CoreProperties {return _bgd ._fea };
// 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 _fc .Point ;Format string ;Path string ;Data *[]byte ;};
// AddCustomRelationships adds relationships related to custom properties to the document.
func (_fef *DocBase )AddCustomRelationships (){_fef .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");_fef .Rels .AddRelationship ("\u0064\u006f\u0063\u0050ro\u0070\u0073\u002f\u0063\u0075\u0073\u0074\u006f\u006d\u002e\u0078\u006d\u006c",_fae .CustomPropertiesType );};func (_gfb CustomProperties )setProperty (_agc *_cg .CT_Property ){_gfb .setPropertyHelper (_agc ,false )};func (_abae CustomProperties )SetPropertyAsEmpty (name string ){_fag :=_abae .getNewProperty (name );_fag .Empty =_fb .NewEmpty ();_abae .setOrReplaceProperty (_fag );};
// CustomProperties contains document specific properties.
type CustomProperties struct{_gad *_cg .Properties };
// SetHeight sets row height, see measurement package.
func (_fefb TableRow )SetHeight (m _bg .Distance ){_acb :=_bg .ToEMU (float64 (m ));_fefb ._bgfd .HAttr =_fcf .ST_Coordinate {ST_CoordinateUnqualified :&_acb };};

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 _g "github.com/unidoc/unioffice/internal/license";
package license ;import _fc "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 _g .SetMeteredKey (apiKey )};
// GetMeteredState checks the currently used metered document usage status,
// documents used and credits available.
func GetMeteredState ()(_g .MeteredStatus ,error ){return _g .GetMeteredState ()};
// MakeUnlicensedKey returns a default key.
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 ;
func SetMeteredKey (apiKey string )error {return _fc .SetMeteredKey (apiKey )};
// GetLicenseKey returns the currently loaded license key.
func GetLicenseKey ()*LicenseKey {return _g .GetLicenseKey ()};
func GetLicenseKey ()*LicenseKey {return _fc .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 )};
func SetLegacyLicenseKey (s string )error {return _fc .SetLegacyLicenseKey (s )};
// MakeUnlicensedKey returns a default key.
func MakeUnlicensedKey ()*LicenseKey {return _fc .MakeUnlicensedKey ()};
// SetLicenseKey sets and validates the license key.
func SetLicenseKey (content string ,customerName string )error {return _fc .SetLicenseKey (content ,customerName );};
// LegacyLicenseType is the type of license
type LegacyLicenseType =_fc .LegacyLicenseType ;
// LegacyLicense holds the old-style unioffice license information.
type LegacyLicense =_fc .LegacyLicense ;
// GetMeteredState checks the currently used metered document usage status,
// documents used and credits available.
func GetMeteredState ()(_fc .MeteredStatus ,error ){return _fc .GetMeteredState ()};
// LicenseKey represents a loaded license key.
type LicenseKey =_fc .LicenseKey ;const (LicenseTierUnlicensed =_fc .LicenseTierUnlicensed ;LicenseTierCommunity =_fc .LicenseTierCommunity ;LicenseTierIndividual =_fc .LicenseTierIndividual ;LicenseTierBusiness =_fc .LicenseTierBusiness ;);

View File

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

View File

@ -11,34 +11,34 @@
// Package memstore implements tempStorage interface
// by using memory as a storage
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 (){_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 ;};
package memstore ;import (_be "encoding/hex";_a "errors";_fe "fmt";_ad "github.com/unidoc/unioffice/common/tempstorage";_bf "io";_d "io/ioutil";_f "math/rand";_g "sync";);func _gd (_gbf string )string {_dg ,_ :=_dbcg (6);return _gbf +_dg };
// 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 };
func (_febe *memFile )Name ()string {return _febe ._ae ._ba };
// Close is not applicable in this implementation
func (_ed *memFile )Close ()error {return nil };
func (_e *memFile )Close ()error {return nil };
// TempFile creates a new empty file in the storage and returns it
func (_dc *memStorage )TempFile (dir ,pattern string )(_ad .File ,error ){_ag :=dir +"\u002f"+_gd (pattern );_cg :=&memDataCell {_ba :_ag ,_gf :[]byte {}};_df :=&memFile {_ae :_cg };_dc ._dbc .Store (_ag ,_cg );return _df ,nil ;};
// TempDir creates a name for a new temp directory using a pattern argument
func (_bdc *memStorage )TempDir (pattern string )(string ,error ){return _gd (pattern ),nil };
// SetAsStorage sets temp storage as a memory storage
func SetAsStorage (){_cc :=memStorage {_dbc :_g .Map {}};_ad .SetAsStorage (&_cc )};
// Write writes to the end of the underlying memDataCell in order to implement Writer interface
func (_fb *memFile )Write (p []byte )(int ,error ){_fb ._ae ._gf =append (_fb ._ae ._gf ,p ...);_fb ._ae ._ab +=int64 (len (p ));return len (p ),nil ;};type memFile struct{_ae *memDataCell ;_ade int64 ;};
// Open returns tempstorage File object by name
func (_ca *memStorage )Open (path string )(_ad .File ,error ){_eg ,_bdb :=_ca ._dbc .Load (path );if !_bdb {return nil ,_a .New (_fe .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 {_ae :_eg .(*memDataCell )},nil ;};
// RemoveAll removes all files according to the dir argument prefix
func (_adb *memStorage )RemoveAll (dir string )error {_adb ._dbc .Range (func (_gb ,_dfc interface{})bool {_adb ._dbc .Delete (_gb );return true });return nil ;};func _dbcg (_ee int )(string ,error ){_fea :=make ([]byte ,_ee );if _ ,_ea :=_f .Read (_fea );_ea !=nil {return "",_ea ;};return _be .EncodeToString (_fea ),nil ;};type memStorage struct{_dbc _g .Map };type memDataCell struct{_ba string ;_gf []byte ;_ab int64 ;};
// Add reads a file from a disk and adds it to the storage
func (_bfa *memStorage )Add (path string )error {_ ,_dfd :=_bfa ._dbc .Load (path );if _dfd {return nil ;};_beg ,_bg :=_d .ReadFile (path );if _bg !=nil {return _bg ;};_bfa ._dbc .Store (path ,&memDataCell {_ba :path ,_gf :_beg ,_ab :int64 (len (_beg ))});return nil ;};
// Read reads from the underlying memDataCell in order to implement Reader interface
func (_fef *memFile )Read (p []byte )(int ,error ){_de :=_fef ._ade ;_feb :=_fef ._ae ._ab ;_c :=int64 (len (p ));if _c > _feb {_c =_feb ;p =p [:_c ];};if _de >=_feb {return 0,_bf .EOF ;};_bd :=_de +_c ;if _bd >=_feb {_bd =_feb ;};_db :=copy (p ,_fef ._ae ._gf [_de :_bd ]);_fef ._ade =_bd ;return _db ,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 _f "io";
package tempstorage ;import _g "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 )};
// SetAsStorage changes temporary storage to newStorage.
func SetAsStorage (newStorage storage ){_a =newStorage };
// 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 ;};
func RemoveAll (dir string )error {return _a .RemoveAll (dir )};
// TempDir creates a name for a new temp directory using a pattern argument.
func TempDir (pattern string )(string ,error ){return _a .TempDir (pattern )};type storage interface{Open (_gb string )(File ,error );TempFile (_d ,_c string )(File ,error );TempDir (_de string )(string ,error );RemoveAll (_gf string )error ;Add (_cf string )error ;};
// File is a representation of a storage file
// with Read, Write, Close and Name methods identical to os.File.
type File interface{_f .Reader ;_f .Writer ;_f .Closer ;Name ()string ;};
type File interface{_g .Reader ;_g .Writer ;_g .Closer ;Name ()string ;};var _a storage ;
// SetAsStorage changes temporary storage to newStorage.
func SetAsStorage (newStorage storage ){_b =newStorage };var _b storage ;
// Add reads a file from a disk and adds it to the storage.
func Add (path string )error {return _a .Add (path )};
// Open returns tempstorage File object by name.
func Open (path string )(File ,error ){return _a .Open (path )};
// TempFile creates new empty file in the storage and returns it.
func TempFile (dir ,pattern string )(File ,error ){return _a .TempFile (dir ,pattern )};

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

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{_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 ;};
package mergesort ;func MergeSort (array []float64 )[]float64 {if len (array )<=1{_b :=make ([]float64 ,len (array ));copy (_b ,array );return _b ;};_g :=len (array )/2;_ef :=MergeSort (array [:_g ]);_c :=MergeSort (array [_g :]);_d :=make ([]float64 ,len (array ));_cb :=0;_ga :=0;_f :=0;for _ga < len (_ef )&&_f < len (_c ){if _ef [_ga ]<=_c [_f ]{_d [_cb ]=_ef [_ga ];_ga ++;}else {_d [_cb ]=_c [_f ];_f ++;};_cb ++;};for _ga < len (_ef ){_d [_cb ]=_ef [_ga ];_ga ++;_cb ++;};for _f < len (_c ){_d [_cb ]=_c [_f ];_f ++;_cb ++;};return _d ;};

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 _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 );};
package wildcard ;func MatchSimple (pattern ,name string )bool {if pattern ==""{return name ==pattern ;};if pattern =="\u002a"{return true ;};_e :=make ([]rune ,0,len (name ));_c :=make ([]rune ,0,len (pattern ));for _ ,_b :=range name {_e =append (_e ,_b );};for _ ,_da :=range pattern {_c =append (_c ,_da );};_g :=true ;return _ab (_e ,_c ,_g );};func Match (pattern ,name string )(_fca bool ){if pattern ==""{return name ==pattern ;};if pattern =="\u002a"{return true ;};_de :=make ([]rune ,0,len (name ));_ef :=make ([]rune ,0,len (pattern ));for _ ,_dc :=range name {_de =append (_de ,_dc );};for _ ,_ge :=range pattern {_ef =append (_ef ,_ge );};_cg :=false ;return _ab (_de ,_ef ,_cg );};func _ab (_gb ,_ae []rune ,_ca bool )bool {for len (_ae )> 0{switch _ae [0]{default:if len (_gb )==0||_gb [0]!=_ae [0]{return false ;};case '?':if len (_gb )==0&&!_ca {return false ;};case '*':return _ab (_gb ,_ae [1:],_ca )||(len (_gb )> 0&&_ab (_gb [1:],_ae ,_ca ));};_gb =_gb [1:];_ae =_ae [1:];};return len (_gb )==0&&len (_ae )==0;};func Index (pattern ,name string )(_cb int ){if pattern ==""||pattern =="\u002a"{return 0;};_ad :=make ([]rune ,0,len (name ));_be :=make ([]rune ,0,len (pattern ));for _ ,_dee :=range name {_ad =append (_ad ,_dee );};for _ ,_adg :=range pattern {_be =append (_be ,_adg );};return _add (_ad ,_be ,0);};func _add (_bc ,_ag []rune ,_gec int )int {for len (_ag )> 0{switch _ag [0]{default:if len (_bc )==0{return -1;};if _bc [0]!=_ag [0]{return _add (_bc [1:],_ag ,_gec +1);};case '?':if len (_bc )==0{return -1;};case '*':if len (_bc )==0{return -1;};_cf :=_add (_bc ,_ag [1:],_gec );if _cf !=-1{return _gec ;}else {_cf =_add (_bc [1:],_ag ,_gec );if _cf !=-1{return _gec ;}else {return -1;};};};_bc =_bc [1:];_ag =_ag [1:];};return _gec ;};

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 measurement ;
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 ;);
// 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 ;);
func ToEMU (m float64 )int64 {return int64 (914400.0/Inch *m )};
// Distance represents a distance and is automatically converted
// to the units needed internally in the various ECMA 376 formats.

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 (_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 (_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 };
package elements ;import (_f "encoding/xml";_b "fmt";_a "github.com/unidoc/unioffice";);
// 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 ;};
func (_fa *Any )Validate ()error {return _fa .ValidateWithPath ("\u0041\u006e\u0079")};func (_dbf *ElementsGroupChoice )UnmarshalXML (d *_f .Decoder ,start _f .StartElement )error {_bged :for {_acb ,_dbc :=d .Token ();if _dbc !=nil {return _dbc ;};switch _dc :=_acb .(type ){case _f .StartElement :switch _dc .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"}:_cf :=NewAny ();if _gd :=d .DecodeElement (_cf ,&_dc );_gd !=nil {return _gd ;};_dbf .Any =append (_dbf .Any ,_cf );default:_a .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",_dc .Name );if _caa :=d .Skip ();_caa !=nil {return _caa ;};};case _f .EndElement :break _bged ;case _f .CharData :};};return nil ;};func (_bcd *SimpleLiteral )UnmarshalXML (d *_f .Decoder ,start _f .StartElement )error {for {_cb ,_adg :=d .Token ();if _adg !=nil {return _b .Errorf ("\u0070a\u0072\u0073\u0069\u006eg\u0020\u0053\u0069\u006d\u0070l\u0065L\u0069t\u0065\u0072\u0061\u006c\u003a\u0020\u0025s",_adg );};if _fad ,_ccg :=_cb .(_f .EndElement );_ccg &&_fad .Name ==start .Name {break ;};};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 ;};
func (_ada *ElementContainer )ValidateWithPath (path string )error {for _bg ,_bge :=range _ada .Choice {if _de :=_bge .ValidateWithPath (_b .Sprintf ("\u0025\u0073\u002f\u0043\u0068\u006f\u0069\u0063\u0065\u005b\u0025\u0064\u005d",path ,_bg ));_de !=nil {return _de ;};};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 (_def *SimpleLiteral )Validate ()error {return _def .ValidateWithPath ("\u0053\u0069\u006d\u0070\u006c\u0065\u004c\u0069\u0074\u0065\u0072\u0061\u006c");};
func (_gf *ElementsGroup )Validate ()error {return _gf .ValidateWithPath ("\u0045\u006c\u0065\u006d\u0065\u006e\u0074\u0073\u0047\u0072\u006f\u0075\u0070");};type Any struct{SimpleLiteral };func (_ee *ElementContainer )MarshalXML (e *_f .Encoder ,start _f .StartElement )error {start .Name .Local ="\u0065\u006ce\u006d\u0065\u006et\u0043\u006f\u006e\u0074\u0061\u0069\u006e\u0065\u0072";e .EncodeToken (start );if _ee .Choice !=nil {for _ ,_bb :=range _ee .Choice {_bb .MarshalXML (e ,_f .StartElement {});};};e .EncodeToken (_f .EndElement {Name :start .Name });return nil ;};type ElementsGroupChoice struct{Any []*Any ;};
// 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 );};
func (_gc *ElementsGroupChoice )Validate ()error {return _gc .ValidateWithPath ("\u0045\u006c\u0065\u006den\u0074\u0073\u0047\u0072\u006f\u0075\u0070\u0043\u0068\u006f\u0069\u0063\u0065");};
// Validate validates the ElementContainer and its children
func (_bf *ElementContainer )Validate ()error {return _bf .ValidateWithPath ("\u0045\u006ce\u006d\u0065\u006et\u0043\u006f\u006e\u0074\u0061\u0069\u006e\u0065\u0072");};func NewElementsGroup ()*ElementsGroup {_db :=&ElementsGroup {};return _db };func NewSimpleLiteral ()*SimpleLiteral {_aba :=&SimpleLiteral {};return _aba };
// ValidateWithPath validates the ElementsGroup and its children, prefixing error messages with path
func (_abf *ElementsGroup )ValidateWithPath (path string )error {for _ba ,_deg :=range _abf .Choice {if _fac :=_deg .ValidateWithPath (_b .Sprintf ("\u0025\u0073\u002f\u0043\u0068\u006f\u0069\u0063\u0065\u005b\u0025\u0064\u005d",path ,_ba ));_fac !=nil {return _fac ;};};return nil ;};
// ValidateWithPath validates the ElementsGroupChoice and its children, prefixing error messages with path
func (_ceb *ElementsGroupChoice )ValidateWithPath (path string )error {for _fd ,_afa :=range _ceb .Any {if _ga :=_afa .ValidateWithPath (_b .Sprintf ("\u0025\u0073\u002f\u0041\u006e\u0079\u005b\u0025\u0064\u005d",path ,_fd ));_ga !=nil {return _ga ;};};return nil ;};type ElementsGroup struct{Choice []*ElementsGroupChoice ;};func (_af *ElementsGroup )UnmarshalXML (d *_f .Decoder ,start _f .StartElement )error {_bd :for {_add ,_cd :=d .Token ();if _cd !=nil {return _cd ;};switch _ce :=_add .(type ){case _f .StartElement :switch _ce .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"}:_eb :=NewElementsGroupChoice ();if _cdc :=d .DecodeElement (&_eb .Any ,&_ce );_cdc !=nil {return _cdc ;};_af .Choice =append (_af .Choice ,_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\u0045\u006c\u0065\u006de\u006e\u0074\u0073\u0047\u0072\u006f\u0075\u0070 \u0025\u0076",_ce .Name );if _fgb :=d .Skip ();_fgb !=nil {return _fgb ;};};case _f .EndElement :break _bd ;case _f .CharData :};};return nil ;};func NewElementContainer ()*ElementContainer {_fce :=&ElementContainer {};return _fce };type SimpleLiteral struct{};func NewElementsGroupChoice ()*ElementsGroupChoice {_ccb :=&ElementsGroupChoice {};return _ccb };
// ValidateWithPath validates the Any and its children, prefixing error messages with path
func (_dde *Any )ValidateWithPath (path string )error {if _cc :=_dde .SimpleLiteral .ValidateWithPath (path );_cc !=nil {return _cc ;};return nil ;};func (_fc *Any )UnmarshalXML (d *_f .Decoder ,start _f .StartElement )error {_fc .SimpleLiteral =*NewSimpleLiteral ();for {_d ,_fb :=d .Token ();if _fb !=nil {return _b .Errorf ("\u0070a\u0072s\u0069\u006e\u0067\u0020\u0041\u006e\u0079\u003a\u0020\u0025\u0073",_fb );};if _dd ,_ca :=_d .(_f .EndElement );_ca &&_dd .Name ==start .Name {break ;};};return nil ;};func (_ab *ElementsGroup )MarshalXML (e *_f .Encoder ,start _f .StartElement )error {if _ab .Choice !=nil {for _ ,_eeg :=range _ab .Choice {_eeg .MarshalXML (e ,_f .StartElement {});};};return nil ;};
// ValidateWithPath validates the SimpleLiteral and its children, prefixing error messages with path
func (_gcg *SimpleLiteral )ValidateWithPath (path string )error {return nil };func (_ae *ElementContainer )UnmarshalXML (d *_f .Decoder ,start _f .StartElement )error {_ec :for {_da ,_fge :=d .Token ();if _fge !=nil {return _fge ;};switch _ece :=_da .(type ){case _f .StartElement :switch _ece .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"}:_bbc :=NewElementsGroupChoice ();if _g :=d .DecodeElement (&_bbc .Any ,&_ece );_g !=nil {return _g ;};_ae .Choice =append (_ae .Choice ,_bbc );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\u0045\u006c\u0065\u006d\u0065\u006e\u0074\u0043\u006f\u006e\u0074\u0061\u0069\u006e\u0065\u0072\u0020\u0025v",_ece .Name );if _aeb :=d .Skip ();_aeb !=nil {return _aeb ;};};case _f .EndElement :break _ec ;case _f .CharData :};};return nil ;};func NewAny ()*Any {_e :=&Any {};_e .SimpleLiteral =*NewSimpleLiteral ();return _e };func (_aa *ElementsGroupChoice )MarshalXML (e *_f .Encoder ,start _f .StartElement )error {if _aa .Any !=nil {_ac :=_f .StartElement {Name :_f .Name {Local :"\u0064\u0063\u003a\u0061\u006e\u0079"}};for _ ,_afg :=range _aa .Any {e .EncodeElement (_afg ,_ac );};};return nil ;};func (_ad *Any )MarshalXML (e *_f .Encoder ,start _f .StartElement )error {return _ad .SimpleLiteral .MarshalXML (e ,start );};func (_dbg *SimpleLiteral )MarshalXML (e *_f .Encoder ,start _f .StartElement )error {e .EncodeToken (start );e .EncodeToken (_f .EndElement {Name :start .Name });return nil ;};
// Validate validates the SimpleLiteral and its children
func (_dbfc *SimpleLiteral )Validate ()error {return _dbfc .ValidateWithPath ("\u0053\u0069\u006d\u0070\u006c\u0065\u004c\u0069\u0074\u0065\u0072\u0061\u006c");};func init (){_a .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 );_a .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 );_a .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 );_a .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 (_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 (_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 (_fad *ISO3166 )Validate ()error {return _fad .ValidateWithPath ("\u0049S\u004f\u0033\u0031\u0036\u0036");};
// Validate validates the MESH and its children
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 (_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 ;};
package terms ;import (_e "encoding/xml";_f "fmt";_ed "github.com/unidoc/unioffice";_eg "github.com/unidoc/unioffice/schema/purl.org/dc/elements";);
// 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 (_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 ;};
func (_be *ElementsAndRefinementsGroupChoice )ValidateWithPath (path string )error {for _cdc ,_bcd :=range _be .Any {if _cg :=_bcd .ValidateWithPath (_f .Sprintf ("\u0025\u0073\u002f\u0041\u006e\u0079\u005b\u0025\u0064\u005d",path ,_cdc ));_cg !=nil {return _cg ;};};return nil ;};func NewRFC3066 ()*RFC3066 {_fccb :=&RFC3066 {};return _fccb };func (_fc *Box )MarshalXML (e *_e .Encoder ,start _e .StartElement )error {start .Name .Local ="\u0042\u006f\u0078";e .EncodeToken (start );e .EncodeToken (_e .EndElement {Name :start .Name });return nil ;};
// ValidateWithPath validates the LCC and its children, prefixing error messages with path
func (_fgeb *LCC )ValidateWithPath (path string )error {return nil };
func (_fcgc *LCC )ValidateWithPath (path string )error {return nil };type RFC1766 struct{};
// Validate validates the RFC1766 and its children
func (_bgb *RFC1766 )Validate ()error {return _bgb .ValidateWithPath ("\u0052F\u0043\u0031\u0037\u0036\u0036");};
// ValidateWithPath validates the ElementsAndRefinementsGroup and its children, prefixing error messages with path
func (_aa *ElementsAndRefinementsGroup )ValidateWithPath (path string )error {for _dce ,_de :=range _aa .Choice {if _ccd :=_de .ValidateWithPath (_f .Sprintf ("\u0025\u0073\u002f\u0043\u0068\u006f\u0069\u0063\u0065\u005b\u0025\u0064\u005d",path ,_dce ));_ccd !=nil {return _ccd ;};};return nil ;};func (_bdea *MESH )UnmarshalXML (d *_e .Decoder ,start _e .StartElement )error {for {_bcb ,_bfbg :=d .Token ();if _bfbg !=nil {return _f .Errorf ("\u0070\u0061r\u0073\u0069\u006eg\u0020\u004d\u0045\u0053\u0048\u003a\u0020\u0025\u0073",_bfbg );};if _ece ,_dca :=_bcb .(_e .EndElement );_dca &&_ece .Name ==start .Name {break ;};};return nil ;};func NewISO3166 ()*ISO3166 {_ad :=&ISO3166 {};return _ad };
// ValidateWithPath validates the ISO3166 and its children, prefixing error messages with path
func (_bff *ISO3166 )ValidateWithPath (path string )error {return nil };func (_fbe *Period )MarshalXML (e *_e .Encoder ,start _e .StartElement )error {start .Name .Local ="\u0050\u0065\u0072\u0069\u006f\u0064";e .EncodeToken (start );e .EncodeToken (_e .EndElement {Name :start .Name });return nil ;};
// Validate validates the ElementsAndRefinementsGroupChoice and its children
func (_cd *ElementsAndRefinementsGroupChoice )Validate ()error {return _cd .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 (_bcg *ElementOrRefinementContainer )MarshalXML (e *_e .Encoder ,start _e .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 _bcg .Choice !=nil {for _ ,_gd :=range _bcg .Choice {_gd .MarshalXML (e ,_e .StartElement {});};};e .EncodeToken (_e .EndElement {Name :start .Name });return nil ;};func (_dcg *Period )UnmarshalXML (d *_e .Decoder ,start _e .StartElement )error {for {_gge ,_ggc :=d .Token ();if _ggc !=nil {return _f .Errorf ("\u0070a\u0072s\u0069\u006e\u0067\u0020\u0050e\u0072\u0069o\u0064\u003a\u0020\u0025\u0073",_ggc );};if _dfg ,_afab :=_gge .(_e .EndElement );_afab &&_dfg .Name ==start .Name {break ;};};return nil ;};type DCMIType struct{};type RFC3066 struct{};type ISO639_2 struct{};
// Validate validates the ISO639_2 and its children
func (_acd *ISO639_2 )Validate ()error {return _acd .ValidateWithPath ("\u0049\u0053\u004f\u0036\u0033\u0039\u005f\u0032");};type LCC struct{};
// 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 ;};
func (_df *Box )Validate ()error {return _df .ValidateWithPath ("\u0042\u006f\u0078")};func NewUDC ()*UDC {_dabf :=&UDC {};return _dabf };func (_dab *IMT )UnmarshalXML (d *_e .Decoder ,start _e .StartElement )error {for {_cde ,_edf :=d .Token ();if _edf !=nil {return _f .Errorf ("\u0070a\u0072s\u0069\u006e\u0067\u0020\u0049\u004d\u0054\u003a\u0020\u0025\u0073",_edf );};if _cdb ,_dbfg :=_cde .(_e .EndElement );_dbfg &&_cdb .Name ==start .Name {break ;};};return nil ;};func (_b *Box )UnmarshalXML (d *_e .Decoder ,start _e .StartElement )error {for {_d ,_ba :=d .Token ();if _ba !=nil {return _f .Errorf ("\u0070a\u0072s\u0069\u006e\u0067\u0020\u0042\u006f\u0078\u003a\u0020\u0025\u0073",_ba );};if _bd ,_ff :=_d .(_e .EndElement );_ff &&_bd .Name ==start .Name {break ;};};return nil ;};func (_gda *UDC )UnmarshalXML (d *_e .Decoder ,start _e .StartElement )error {for {_aab ,_fac :=d .Token ();if _fac !=nil {return _f .Errorf ("\u0070a\u0072s\u0069\u006e\u0067\u0020\u0055\u0044\u0043\u003a\u0020\u0025\u0073",_fac );};if _fbdb ,_eca :=_aab .(_e .EndElement );_eca &&_fbdb .Name ==start .Name {break ;};};return nil ;};type ISO3166 struct{};
// ValidateWithPath validates the DCMIType and its children, prefixing error messages with path
func (_eb *DCMIType )ValidateWithPath (path string )error {return nil };
// Validate validates the LCC and its children
func (_fdc *LCC )Validate ()error {return _fdc .ValidateWithPath ("\u004c\u0043\u0043")};
// ValidateWithPath validates the Box and its children, prefixing error messages with path
func (_df *Box )ValidateWithPath (path string )error {return nil };
// Validate validates the URI and its children
func (_bgd *URI )Validate ()error {return _bgd .ValidateWithPath ("\u0055\u0052\u0049")};func (_dff *Point )MarshalXML (e *_e .Encoder ,start _e .StartElement )error {start .Name .Local ="\u0050\u006f\u0069n\u0074";e .EncodeToken (start );e .EncodeToken (_e .EndElement {Name :start .Name });return nil ;};func (_ddb *ISO3166 )UnmarshalXML (d *_e .Decoder ,start _e .StartElement )error {for {_aca ,_gfa :=d .Token ();if _gfa !=nil {return _f .Errorf ("\u0070\u0061\u0072\u0073in\u0067\u0020\u0049\u0053\u004f\u0033\u0031\u0036\u0036\u003a\u0020\u0025\u0073",_gfa );};if _cf ,_bdc :=_aca .(_e .EndElement );_bdc &&_cf .Name ==start .Name {break ;};};return nil ;};func (_cba *LCSH )MarshalXML (e *_e .Encoder ,start _e .StartElement )error {start .Name .Local ="\u004c\u0043\u0053\u0048";e .EncodeToken (start );e .EncodeToken (_e .EndElement {Name :start .Name });return nil ;};
// ValidateWithPath validates the MESH and its children, prefixing error messages with path
func (_egb *MESH )ValidateWithPath (path string )error {return nil };
// Validate validates the TGN and its children
func (_dbe *TGN )Validate ()error {return _dbe .ValidateWithPath ("\u0054\u0047\u004e")};func (_cac *IMT )MarshalXML (e *_e .Encoder ,start _e .StartElement )error {start .Name .Local ="\u0049\u004d\u0054";e .EncodeToken (start );e .EncodeToken (_e .EndElement {Name :start .Name });return nil ;};func (_dc *DDC )MarshalXML (e *_e .Encoder ,start _e .StartElement )error {start .Name .Local ="\u0044\u0044\u0043";e .EncodeToken (start );e .EncodeToken (_e .EndElement {Name :start .Name });return nil ;};
// ValidateWithPath validates the LCSH and its children, prefixing error messages with path
func (_dcb *LCSH )ValidateWithPath (path string )error {return nil };
// Validate validates the LCSH and its children
func (_fdg *LCSH )Validate ()error {return _fdg .ValidateWithPath ("\u004c\u0043\u0053\u0048")};func (_cag *ISO639_2 )UnmarshalXML (d *_e .Decoder ,start _e .StartElement )error {for {_cfc ,_cgf :=d .Token ();if _cgf !=nil {return _f .Errorf ("p\u0061r\u0073\u0069\u006e\u0067\u0020\u0049\u0053\u004f6\u0033\u0039\u005f\u0032: \u0025\u0073",_cgf );};if _eb ,_bfb :=_cfc .(_e .EndElement );_bfb &&_eb .Name ==start .Name {break ;};};return nil ;};
// ValidateWithPath validates the TGN and its children, prefixing error messages with path
func (_geg *TGN )ValidateWithPath (path string )error {return nil };
// Validate validates the DDC and its children
func (_gg *DDC )Validate ()error {return _gg .ValidateWithPath ("\u0044\u0044\u0043")};type TGN struct{};
// 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 IMT and its children
func (_bba *IMT )Validate ()error {return _bba .ValidateWithPath ("\u0049\u004d\u0054")};func NewDCMIType ()*DCMIType {_c :=&DCMIType {};return _c };type ElementsAndRefinementsGroup struct{Choice []*ElementsAndRefinementsGroupChoice ;};type URI struct{};
// 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 ;};
// ValidateWithPath validates the W3CDTF and its children, prefixing error messages with path
func (_acb *W3CDTF )ValidateWithPath (path string )error {return nil };func (_eff *LCC )UnmarshalXML (d *_e .Decoder ,start _e .StartElement )error {for {_cff ,_fcc :=d .Token ();if _fcc !=nil {return _f .Errorf ("\u0070a\u0072s\u0069\u006e\u0067\u0020\u004c\u0043\u0043\u003a\u0020\u0025\u0073",_fcc );};if _fbg ,_gcg :=_cff .(_e .EndElement );_gcg &&_fbg .Name ==start .Name {break ;};};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{};
// Validate validates the MESH and its children
func (_fbda *MESH )Validate ()error {return _fbda .ValidateWithPath ("\u004d\u0045\u0053\u0048")};
// Validate validates the DCMIType and its children
func (_bf *DCMIType )Validate ()error {return _bf .ValidateWithPath ("\u0044\u0043\u004d\u0049\u0054\u0079\u0070\u0065");};func (_eaea *RFC3066 )MarshalXML (e *_e .Encoder ,start _e .StartElement )error {start .Name .Local ="\u0052F\u0043\u0033\u0030\u0036\u0036";e .EncodeToken (start );e .EncodeToken (_e .EndElement {Name :start .Name });return nil ;};func (_fdea *LCSH )UnmarshalXML (d *_e .Decoder ,start _e .StartElement )error {for {_acg ,_faf :=d .Token ();if _faf !=nil {return _f .Errorf ("\u0070\u0061r\u0073\u0069\u006eg\u0020\u004c\u0043\u0053\u0048\u003a\u0020\u0025\u0073",_faf );};if _gb ,_afdf :=_acg .(_e .EndElement );_afdf &&_gb .Name ==start .Name {break ;};};return nil ;};type Box struct{};type LCSH 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{};
func (_aag *IMT )ValidateWithPath (path string )error {return nil };func NewElementOrRefinementContainer ()*ElementOrRefinementContainer {_dbf :=&ElementOrRefinementContainer {};return _dbf ;};
// ValidateWithPath validates the MESH and its children, prefixing error messages with path
func (_bffg *MESH )ValidateWithPath (path string )error {return nil };func NewBox ()*Box {_g :=&Box {};return _g };func (_da *ElementsAndRefinementsGroup )MarshalXML (e *_e .Encoder ,start _e .StartElement )error {if _da .Choice !=nil {for _ ,_afa :=range _da .Choice {_afa .MarshalXML (e ,_e .StartElement {});};};return nil ;};
// ValidateWithPath validates the Period and its children, prefixing error messages with path
func (_bffc *Period )ValidateWithPath (path string )error {return nil };func NewLCC ()*LCC {_gde :=&LCC {};return _gde };func NewPoint ()*Point {_bdf :=&Point {};return _bdf };
// ValidateWithPath validates the DDC and its children, prefixing error messages with path
func (_ac *DDC )ValidateWithPath (path string )error {return nil };
// ValidateWithPath validates the Box and its children, prefixing error messages with path
func (_ffa *Box )ValidateWithPath (path string )error {return nil };func NewLCSH ()*LCSH {_ccf :=&LCSH {};return _ccf };
// Validate validates the Point and its children
func (_edg *Point )Validate ()error {return _edg .ValidateWithPath ("\u0050\u006f\u0069n\u0074")};func (_bac *ElementsAndRefinementsGroupChoice )UnmarshalXML (d *_e .Decoder ,start _e .StartElement )error {_aee :for {_affe ,_dfc :=d .Token ();if _dfc !=nil {return _dfc ;};switch _cca :=_affe .(type ){case _e .StartElement :switch _cca .Name {case _e .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"}:_gaf :=_eg .NewAny ();if _afe :=d .DecodeElement (_gaf ,&_cca );_afe !=nil {return _afe ;};_bac .Any =append (_bac .Any ,_gaf );default:_ed .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",_cca .Name );if _gef :=d .Skip ();_gef !=nil {return _gef ;};};case _e .EndElement :break _aee ;case _e .CharData :};};return nil ;};func NewDDC ()*DDC {_bc :=&DDC {};return _bc };func (_geb *RFC1766 )UnmarshalXML (d *_e .Decoder ,start _e .StartElement )error {for {_cdg ,_afaf :=d .Token ();if _afaf !=nil {return _f .Errorf ("\u0070\u0061\u0072\u0073in\u0067\u0020\u0052\u0046\u0043\u0031\u0037\u0036\u0036\u003a\u0020\u0025\u0073",_afaf );};if _ee ,_fff :=_cdg .(_e .EndElement );_fff &&_ee .Name ==start .Name {break ;};};return nil ;};func (_bde *ElementsAndRefinementsGroup )UnmarshalXML (d *_e .Decoder ,start _e .StartElement )error {_dcd :for {_ag ,_fcg :=d .Token ();if _fcg !=nil {return _fcg ;};switch _afd :=_ag .(type ){case _e .StartElement :switch _afd .Name {case _e .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"}:_eae :=NewElementsAndRefinementsGroupChoice ();if _ca :=d .DecodeElement (&_eae .Any ,&_afd );_ca !=nil {return _ca ;};_bde .Choice =append (_bde .Choice ,_eae );default:_ed .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",_afd .Name );if _dcdd :=d .Skip ();_dcdd !=nil {return _dcdd ;};};case _e .EndElement :break _dcd ;case _e .CharData :};};return nil ;};func NewRFC1766 ()*RFC1766 {_agg :=&RFC1766 {};return _agg };type Point struct{};
// ValidateWithPath validates the ISO639_2 and its children, prefixing error messages with path
func (_ec *ISO639_2 )ValidateWithPath (path string )error {return nil };func (_ef *DDC )UnmarshalXML (d *_e .Decoder ,start _e .StartElement )error {for {_ega ,_bg :=d .Token ();if _bg !=nil {return _f .Errorf ("\u0070a\u0072s\u0069\u006e\u0067\u0020\u0044\u0044\u0043\u003a\u0020\u0025\u0073",_bg );};if _dgg ,_cc :=_ega .(_e .EndElement );_cc &&_dgg .Name ==start .Name {break ;};};return nil ;};
// Validate validates the ISO3166 and its children
func (_gefa *ISO3166 )Validate ()error {return _gefa .ValidateWithPath ("\u0049S\u004f\u0033\u0031\u0036\u0036");};func (_efa *Point )UnmarshalXML (d *_e .Decoder ,start _e .StartElement )error {for {_gec ,_ggf :=d .Token ();if _ggf !=nil {return _f .Errorf ("\u0070\u0061\u0072\u0073\u0069\u006e\u0067\u0020\u0050\u006f\u0069\u006et\u003a\u0020\u0025\u0073",_ggf );};if _fbb ,_eag :=_gec .(_e .EndElement );_eag &&_fbb .Name ==start .Name {break ;};};return nil ;};
// Validate validates the RFC3066 and its children
func (_aeec *RFC3066 )Validate ()error {return _aeec .ValidateWithPath ("\u0052F\u0043\u0033\u0030\u0036\u0036");};func (_cb *ElementOrRefinementContainer )UnmarshalXML (d *_e .Decoder ,start _e .StartElement )error {_fe :for {_fde ,_gdf :=d .Token ();if _gdf !=nil {return _gdf ;};switch _ea :=_fde .(type ){case _e .StartElement :switch _ea .Name {case _e .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"}:_bb :=NewElementsAndRefinementsGroupChoice ();if _af :=d .DecodeElement (&_bb .Any ,&_ea );_af !=nil {return _af ;};_cb .Choice =append (_cb .Choice ,_bb );default:_ed .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",_ea .Name );if _aff :=d .Skip ();_aff !=nil {return _aff ;};};case _e .EndElement :break _fe ;case _e .CharData :};};return nil ;};func (_acfg *TGN )UnmarshalXML (d *_e .Decoder ,start _e .StartElement )error {for {_aba ,_cbd :=d .Token ();if _cbd !=nil {return _f .Errorf ("\u0070a\u0072s\u0069\u006e\u0067\u0020\u0054\u0047\u004e\u003a\u0020\u0025\u0073",_cbd );};if _dfgg ,_fcce :=_aba .(_e .EndElement );_fcce &&_dfgg .Name ==start .Name {break ;};};return nil ;};
// Validate validates the UDC and its children
func (_bgc *UDC )Validate ()error {return _bgc .ValidateWithPath ("\u0055\u0044\u0043")};func (_db *DCMIType )MarshalXML (e *_e .Encoder ,start _e .StartElement )error {start .Name .Local ="\u0044\u0043\u004d\u0049\u0054\u0079\u0070\u0065";e .EncodeToken (start );e .EncodeToken (_e .EndElement {Name :start .Name });return nil ;};
// Validate validates the W3CDTF and its children
func (_abf *W3CDTF )Validate ()error {return _abf .ValidateWithPath ("\u0057\u0033\u0043\u0044\u0054\u0046");};func NewMESH ()*MESH {_eda :=&MESH {};return _eda };
// ValidateWithPath validates the RFC1766 and its children, prefixing error messages with path
func (_acad *RFC1766 )ValidateWithPath (path string )error {return nil };func (_ddd *TGN )MarshalXML (e *_e .Encoder ,start _e .StartElement )error {start .Name .Local ="\u0054\u0047\u004e";e .EncodeToken (start );e .EncodeToken (_e .EndElement {Name :start .Name });return nil ;};func NewIMT ()*IMT {_fag :=&IMT {};return _fag };func (_ggga *UDC )MarshalXML (e *_e .Encoder ,start _e .StartElement )error {start .Name .Local ="\u0055\u0044\u0043";e .EncodeToken (start );e .EncodeToken (_e .EndElement {Name :start .Name });return nil ;};
// ValidateWithPath validates the Point and its children, prefixing error messages with path
func (_ebc *Point )ValidateWithPath (path string )error {return nil };
// Validate validates the ElementsAndRefinementsGroup and its children
func (_geg *ElementsAndRefinementsGroup )Validate ()error {return _geg .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 (_bea *ISO639_2 )MarshalXML (e *_e .Encoder ,start _e .StartElement )error {start .Name .Local ="\u0049\u0053\u004f\u0036\u0033\u0039\u002d\u0032";e .EncodeToken (start );e .EncodeToken (_e .EndElement {Name :start .Name });return nil ;};func (_fad *ElementsAndRefinementsGroupChoice )MarshalXML (e *_e .Encoder ,start _e .StartElement )error {if _fad .Any !=nil {_fbd :=_e .StartElement {Name :_e .Name {Local :"\u0064\u0063\u003a\u0061\u006e\u0079"}};for _ ,_dd :=range _fad .Any {e .EncodeElement (_dd ,_fbd );};};return nil ;};func (_bgg *URI )MarshalXML (e *_e .Encoder ,start _e .StartElement )error {start .Name .Local ="\u0055\u0052\u0049";e .EncodeToken (start );e .EncodeToken (_e .EndElement {Name :start .Name });return nil ;};func (_bag *W3CDTF )UnmarshalXML (d *_e .Decoder ,start _e .StartElement )error {for {_bacg ,_ded :=d .Token ();if _ded !=nil {return _f .Errorf ("\u0070a\u0072s\u0069\u006e\u0067\u0020\u00573\u0043\u0044T\u0046\u003a\u0020\u0025\u0073",_ded );};if _cda ,_ecc :=_bacg .(_e .EndElement );_ecc &&_cda .Name ==start .Name {break ;};};return nil ;};func (_fee *W3CDTF )MarshalXML (e *_e .Encoder ,start _e .StartElement )error {start .Name .Local ="\u0057\u0033\u0043\u0044\u0054\u0046";e .EncodeToken (start );e .EncodeToken (_e .EndElement {Name :start .Name });return nil ;};func NewW3CDTF ()*W3CDTF {_dfd :=&W3CDTF {};return _dfd };func (_adf *RFC3066 )UnmarshalXML (d *_e .Decoder ,start _e .StartElement )error {for {_eab ,_ggg :=d .Token ();if _ggg !=nil {return _f .Errorf ("\u0070\u0061\u0072\u0073in\u0067\u0020\u0052\u0046\u0043\u0033\u0030\u0036\u0036\u003a\u0020\u0025\u0073",_ggg );};if _efe ,_dad :=_eab .(_e .EndElement );_dad &&_efe .Name ==start .Name {break ;};};return nil ;};func NewPeriod ()*Period {_add :=&Period {};return _add };
// ValidateWithPath validates the RFC3066 and its children, prefixing error messages with path
func (_gdc *RFC3066 )ValidateWithPath (path string )error {return nil };
// ValidateWithPath validates the UDC and its children, prefixing error messages with path
func (_ffb *UDC )ValidateWithPath (path string )error {return nil };type W3CDTF struct{};type ElementsAndRefinementsGroupChoice struct{Any []*_eg .Any ;};type DDC struct{};func (_gged *RFC1766 )MarshalXML (e *_e .Encoder ,start _e .StartElement )error {start .Name .Local ="\u0052F\u0043\u0031\u0037\u0036\u0036";e .EncodeToken (start );e .EncodeToken (_e .EndElement {Name :start .Name });return nil ;};type IMT struct{};
// ValidateWithPath validates the DCMIType and its children, prefixing error messages with path
func (_dgb *DCMIType )ValidateWithPath (path string )error {return nil };func NewElementsAndRefinementsGroupChoice ()*ElementsAndRefinementsGroupChoice {_gab :=&ElementsAndRefinementsGroupChoice {};return _gab ;};func NewTGN ()*TGN {_ab :=&TGN {};return _ab };type ElementOrRefinementContainer struct{Choice []*ElementsAndRefinementsGroupChoice ;};func NewElementsAndRefinementsGroup ()*ElementsAndRefinementsGroup {_fdb :=&ElementsAndRefinementsGroup {};return _fdb ;};func (_ffdd *MESH )MarshalXML (e *_e .Encoder ,start _e .StartElement )error {start .Name .Local ="\u004d\u0045\u0053\u0048";e .EncodeToken (start );e .EncodeToken (_e .EndElement {Name :start .Name });return nil ;};func (_bce *URI )UnmarshalXML (d *_e .Decoder ,start _e .StartElement )error {for {_cacb ,_fgg :=d .Token ();if _fgg !=nil {return _f .Errorf ("\u0070a\u0072s\u0069\u006e\u0067\u0020\u0055\u0052\u0049\u003a\u0020\u0025\u0073",_fgg );};if _aeb ,_ce :=_cacb .(_e .EndElement );_ce &&_aeb .Name ==start .Name {break ;};};return nil ;};func NewURI ()*URI {_dfa :=&URI {};return _dfa };
// Validate validates the Period and its children
func (_gee *Period )Validate ()error {return _gee .ValidateWithPath ("\u0050\u0065\u0072\u0069\u006f\u0064");};func (_fg *LCC )MarshalXML (e *_e .Encoder ,start _e .StartElement )error {start .Name .Local ="\u004c\u0043\u0043";e .EncodeToken (start );e .EncodeToken (_e .EndElement {Name :start .Name });return nil ;};
// ValidateWithPath validates the URI and its children, prefixing error messages with path
func (_gdb *URI )ValidateWithPath (path string )error {return nil };type UDC struct{};
// ValidateWithPath validates the LCSH and its children, prefixing error messages with path
func (_egb *LCSH )ValidateWithPath (path string )error {return nil };type Period struct{};
// ValidateWithPath validates the ElementOrRefinementContainer and its children, prefixing error messages with path
func (_ge *ElementOrRefinementContainer )ValidateWithPath (path string )error {for _feg ,_eaa :=range _ge .Choice {if _ffd :=_eaa .ValidateWithPath (_f .Sprintf ("\u0025\u0073\u002f\u0043\u0068\u006f\u0069\u0063\u0065\u005b\u0025\u0064\u005d",path ,_feg ));_ffd !=nil {return _ffd ;};};return nil ;};func NewISO639_2 ()*ISO639_2 {_ccc :=&ISO639_2 {};return _ccc };func (_fb *DCMIType )UnmarshalXML (d *_e .Decoder ,start _e .StartElement )error {for {_ga ,_gf :=d .Token ();if _gf !=nil {return _f .Errorf ("p\u0061r\u0073\u0069\u006e\u0067\u0020\u0044\u0043\u004dI\u0054\u0079\u0070\u0065: \u0025\u0073",_gf );};if _gc ,_dg :=_ga .(_e .EndElement );_dg &&_gc .Name ==start .Name {break ;};};return nil ;};type MESH struct{};func (_acf *ISO3166 )MarshalXML (e *_e .Encoder ,start _e .StartElement )error {start .Name .Local ="\u0049S\u004f\u0033\u0031\u0036\u0036";e .EncodeToken (start );e .EncodeToken (_e .EndElement {Name :start .Name });return nil ;};
// ValidateWithPath validates the TGN and its children, prefixing error messages with path
func (_fge *TGN )ValidateWithPath (path string )error {return nil };
// 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 );};
func (_bcgc *ElementOrRefinementContainer )Validate ()error {return _bcgc .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 init (){_ed .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 );_ed .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 );_ed .RegisterConstructor ("\u0068t\u0074\u0070\u003a\u002f/\u0070\u0075\u0072\u006c\u002eo\u0072g\u002fd\u0063\u002f\u0074\u0065\u0072\u006d\u0073/","\u0044\u0044\u0043",NewDDC );_ed .RegisterConstructor ("\u0068t\u0074\u0070\u003a\u002f/\u0070\u0075\u0072\u006c\u002eo\u0072g\u002fd\u0063\u002f\u0074\u0065\u0072\u006d\u0073/","\u004c\u0043\u0043",NewLCC );_ed .RegisterConstructor ("\u0068t\u0074\u0070\u003a\u002f/\u0070\u0075\u0072\u006c\u002eo\u0072g\u002fd\u0063\u002f\u0074\u0065\u0072\u006d\u0073/","\u0055\u0044\u0043",NewUDC );_ed .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 );_ed .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 );_ed .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 );_ed .RegisterConstructor ("\u0068t\u0074\u0070\u003a\u002f/\u0070\u0075\u0072\u006c\u002eo\u0072g\u002fd\u0063\u002f\u0074\u0065\u0072\u006d\u0073/","\u0049\u004d\u0054",NewIMT );_ed .RegisterConstructor ("\u0068t\u0074\u0070\u003a\u002f/\u0070\u0075\u0072\u006c\u002eo\u0072g\u002fd\u0063\u002f\u0074\u0065\u0072\u006d\u0073/","\u0055\u0052\u0049",NewURI );_ed .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 );_ed .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 );_ed .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 );_ed .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 );_ed .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 );_ed .RegisterConstructor ("\u0068t\u0074\u0070\u003a\u002f/\u0070\u0075\u0072\u006c\u002eo\u0072g\u002fd\u0063\u002f\u0074\u0065\u0072\u006d\u0073/","\u0042\u006f\u0078",NewBox );_ed .RegisterConstructor ("\u0068t\u0074\u0070\u003a\u002f/\u0070\u0075\u0072\u006c\u002eo\u0072g\u002fd\u0063\u002f\u0074\u0065\u0072\u006d\u0073/","\u0054\u0047\u004e",NewTGN );_ed .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 );_ed .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 (_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 (_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 );};
package lockedCanvas ;import (_d "encoding/xml";_g "fmt";_fc "github.com/unidoc/unioffice";_f "github.com/unidoc/unioffice/schema/soo/dml";);func (_a *LockedCanvas )UnmarshalXML (d *_d .Decoder ,start _d .StartElement )error {_a .CT_GvmlGroupShape =*_f .NewCT_GvmlGroupShape ();for {_e ,_b :=d .Token ();if _b !=nil {return _g .Errorf ("\u0070a\u0072\u0073\u0069\u006e\u0067\u0020\u004c\u006f\u0063\u006b\u0065d\u0043\u0061\u006e\u0076\u0061\u0073\u003a\u0020\u0025\u0073",_b );};if _bb ,_bc :=_e .(_d .EndElement );_bc &&_bb .Name ==start .Name {break ;};};return nil ;};type LockedCanvas struct{_f .CT_GvmlGroupShape };
// 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 );};
func (_ea *LockedCanvas )ValidateWithPath (path string )error {if _eg :=_ea .CT_GvmlGroupShape .ValidateWithPath (path );_eg !=nil {return _eg ;};return nil ;};func NewLockedCanvas ()*LockedCanvas {_de :=&LockedCanvas {};_de .CT_GvmlGroupShape =*_f .NewCT_GvmlGroupShape ();return _de ;};
// Validate validates the LockedCanvas and its children
func (_dc *LockedCanvas )Validate ()error {return _dc .ValidateWithPath ("\u004c\u006f\u0063k\u0065\u0064\u0043\u0061\u006e\u0076\u0061\u0073");};func (_db *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 _db .CT_GvmlGroupShape .MarshalXML (e ,start );};func init (){_fc .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 (_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 ;};
package picture ;import (_ef "encoding/xml";_a "github.com/unidoc/unioffice";_f "github.com/unidoc/unioffice/schema/soo/dml";);func (_aa *CT_PictureNonVisual )UnmarshalXML (d *_ef .Decoder ,start _ef .StartElement )error {_aa .CNvPr =_f .NewCT_NonVisualDrawingProps ();_aa .CNvPicPr =_f .NewCT_NonVisualPictureProperties ();_dc :for {_ba ,_de :=d .Token ();if _de !=nil {return _de ;};switch _ce :=_ba .(type ){case _ef .StartElement :switch _ce .Name {case _ef .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"},_ef .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 _cf :=d .DecodeElement (_aa .CNvPr ,&_ce );_cf !=nil {return _cf ;};case _ef .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"},_ef .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 _gd :=d .DecodeElement (_aa .CNvPicPr ,&_ce );_gd !=nil {return _gd ;};default:_a .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",_ce .Name );if _be :=d .Skip ();_be !=nil {return _be ;};};case _ef .EndElement :break _dc ;case _ef .CharData :};};return nil ;};
// ValidateWithPath validates the CT_Picture and its children, prefixing error messages with path
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 };
func (_ga *CT_Picture )ValidateWithPath (path string )error {if _c :=_ga .NvPicPr .ValidateWithPath (path +"\u002f\u004e\u0076\u0050\u0069\u0063\u0050\u0072");_c !=nil {return _c ;};if _ddd :=_ga .BlipFill .ValidateWithPath (path +"\u002fB\u006c\u0069\u0070\u0046\u0069\u006cl");_ddd !=nil {return _ddd ;};if _fef :=_ga .SpPr .ValidateWithPath (path +"\u002f\u0053\u0070P\u0072");_fef !=nil {return _fef ;};return nil ;};type CT_PictureNonVisual struct{CNvPr *_f .CT_NonVisualDrawingProps ;CNvPicPr *_f .CT_NonVisualPictureProperties ;};
// 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 (_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 ;};
func (_eded *Pic )Validate ()error {return _eded .ValidateWithPath ("\u0050\u0069\u0063")};
// 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 ;};
func (_egf *Pic )ValidateWithPath (path string )error {if _deb :=_egf .CT_Picture .ValidateWithPath (path );_deb !=nil {return _deb ;};return nil ;};type Pic struct{CT_Picture };func NewCT_PictureNonVisual ()*CT_PictureNonVisual {_age :=&CT_PictureNonVisual {};_age .CNvPr =_f .NewCT_NonVisualDrawingProps ();_age .CNvPicPr =_f .NewCT_NonVisualPictureProperties ();return _age ;};func (_fd *Pic )MarshalXML (e *_ef .Encoder ,start _ef .StartElement )error {start .Attr =append (start .Attr ,_ef .Attr {Name :_ef .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 ,_ef .Attr {Name :_ef .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 ,_ef .Attr {Name :_ef .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 _fd .CT_Picture .MarshalXML (e ,start );};
// Validate validates the CT_PictureNonVisual and its children
func (_cb *CT_PictureNonVisual )Validate ()error {return _cb .ValidateWithPath ("\u0043\u0054\u005f\u0050ic\u0074\u0075\u0072\u0065\u004e\u006f\u006e\u0056\u0069\u0073\u0075\u0061\u006c");};type CT_Picture struct{NvPicPr *CT_PictureNonVisual ;BlipFill *_f .CT_BlipFillProperties ;SpPr *_f .CT_ShapeProperties ;};func (_d *CT_Picture )MarshalXML (e *_ef .Encoder ,start _ef .StartElement )error {e .EncodeToken (start );_g :=_ef .StartElement {Name :_ef .Name {Local :"p\u0069\u0063\u003a\u006e\u0076\u0050\u0069\u0063\u0050\u0072"}};e .EncodeElement (_d .NvPicPr ,_g );_df :=_ef .StartElement {Name :_ef .Name {Local :"\u0070\u0069\u0063:\u0062\u006c\u0069\u0070\u0046\u0069\u006c\u006c"}};e .EncodeElement (_d .BlipFill ,_df );_ac :=_ef .StartElement {Name :_ef .Name {Local :"\u0070\u0069\u0063\u003a\u0073\u0070\u0050\u0072"}};e .EncodeElement (_d .SpPr ,_ac );e .EncodeToken (_ef .EndElement {Name :start .Name });return nil ;};
// ValidateWithPath validates the CT_PictureNonVisual and its children, prefixing error messages with path
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 );};
func (_ede *CT_PictureNonVisual )ValidateWithPath (path string )error {if _edg :=_ede .CNvPr .ValidateWithPath (path +"\u002f\u0043\u004e\u0076\u0050\u0072");_edg !=nil {return _edg ;};if _efd :=_ede .CNvPicPr .ValidateWithPath (path +"\u002fC\u004e\u0076\u0050\u0069\u0063\u0050r");_efd !=nil {return _efd ;};return nil ;};func NewPic ()*Pic {_cgc :=&Pic {};_cgc .CT_Picture =*NewCT_Picture ();return _cgc };func (_fe *CT_Picture )UnmarshalXML (d *_ef .Decoder ,start _ef .StartElement )error {_fe .NvPicPr =NewCT_PictureNonVisual ();_fe .BlipFill =_f .NewCT_BlipFillProperties ();_fe .SpPr =_f .NewCT_ShapeProperties ();_af :for {_eg ,_ff :=d .Token ();if _ff !=nil {return _ff ;};switch _b :=_eg .(type ){case _ef .StartElement :switch _b .Name {case _ef .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"},_ef .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 (_fe .NvPicPr ,&_b );_ed !=nil {return _ed ;};case _ef .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"},_ef .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 _fa :=d .DecodeElement (_fe .BlipFill ,&_b );_fa !=nil {return _fa ;};case _ef .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"},_ef .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 _dd :=d .DecodeElement (_fe .SpPr ,&_b );_dd !=nil {return _dd ;};default:_a .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",_b .Name );if _ag :=d .Skip ();_ag !=nil {return _ag ;};};case _ef .EndElement :break _af ;case _ef .CharData :};};return nil ;};
// Validate validates the CT_Picture and its children
func (_ffc *CT_Picture )Validate ()error {return _ffc .ValidateWithPath ("\u0043\u0054\u005f\u0050\u0069\u0063\u0074\u0075\u0072\u0065");};func (_da *Pic )UnmarshalXML (d *_ef .Decoder ,start _ef .StartElement )error {_da .CT_Picture =*NewCT_Picture ();_bee :for {_aca ,_ffd :=d .Token ();if _ffd !=nil {return _ffd ;};switch _aae :=_aca .(type ){case _ef .StartElement :switch _aae .Name {case _ef .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"},_ef .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 _bb :=d .DecodeElement (_da .NvPicPr ,&_aae );_bb !=nil {return _bb ;};case _ef .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"},_ef .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 _fgd :=d .DecodeElement (_da .BlipFill ,&_aae );_fgd !=nil {return _fgd ;};case _ef .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"},_ef .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 _ca :=d .DecodeElement (_da .SpPr ,&_aae );_ca !=nil {return _ca ;};default:_a .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",_aae .Name );if _ec :=d .Skip ();_ec !=nil {return _ec ;};};case _ef .EndElement :break _bee ;case _ef .CharData :};};return nil ;};func NewCT_Picture ()*CT_Picture {_ab :=&CT_Picture {};_ab .NvPicPr =NewCT_PictureNonVisual ();_ab .BlipFill =_f .NewCT_BlipFillProperties ();_ab .SpPr =_f .NewCT_ShapeProperties ();return _ab ;};func (_bd *CT_PictureNonVisual )MarshalXML (e *_ef .Encoder ,start _ef .StartElement )error {e .EncodeToken (start );_cg :=_ef .StartElement {Name :_ef .Name {Local :"\u0070i\u0063\u003a\u0063\u004e\u0076\u0050r"}};e .EncodeElement (_bd .CNvPr ,_cg );_fg :=_ef .StartElement {Name :_ef .Name {Local :"\u0070\u0069\u0063:\u0063\u004e\u0076\u0050\u0069\u0063\u0050\u0072"}};e .EncodeElement (_bd .CNvPicPr ,_fg );e .EncodeToken (_ef .EndElement {Name :start .Name });return nil ;};func init (){_a .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 );_a .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 );_a .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 (_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 (_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 (_gb *CT_Default )Validate ()error {return _gb .ValidateWithPath ("\u0043\u0054\u005f\u0044\u0065\u0066\u0061\u0075\u006c\u0074");};
// 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 (_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 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 (_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 (_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 );
package content_types ;import (_c "encoding/xml";_d "fmt";_b "github.com/unidoc/unioffice";_cf "regexp";);func (_cb *CT_Types )MarshalXML (e *_c .Encoder ,start _c .StartElement )error {e .EncodeToken (start );if _cb .Default !=nil {_dd :=_c .StartElement {Name :_c .Name {Local :"\u0044e\u0066\u0061\u0075\u006c\u0074"}};for _ ,_eda :=range _cb .Default {e .EncodeElement (_eda ,_dd );};};if _cb .Override !=nil {_fgg :=_c .StartElement {Name :_c .Name {Local :"\u004f\u0076\u0065\u0072\u0072\u0069\u0064\u0065"}};for _ ,_ceg :=range _cb .Override {e .EncodeElement (_ceg ,_fgg );};};e .EncodeToken (_c .EndElement {Name :start .Name });return nil ;};func NewOverride ()*Override {_eg :=&Override {};_eg .CT_Override =*NewCT_Override ();return _eg };
// 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 ;};
func (_gca *Types )Validate ()error {return _gca .ValidateWithPath ("\u0054\u0079\u0070e\u0073")};func (_gcf *Default )MarshalXML (e *_c .Encoder ,start _c .StartElement )error {return _gcf .CT_Default .MarshalXML (e ,start );};func NewCT_Types ()*CT_Types {_ag :=&CT_Types {};return _ag };func NewDefault ()*Default {_bea :=&Default {};_bea .CT_Default =*NewCT_Default ();return _bea };
// ValidateWithPath validates the CT_Default and its children, prefixing error messages with path
func (_de *CT_Default )ValidateWithPath (path string )error {if !ST_ExtensionPatternRe .MatchString (_de .ExtensionAttr ){return _d .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 ,_de .ExtensionAttr );};if !ST_ContentTypePatternRe .MatchString (_de .ContentTypeAttr ){return _d .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 ,_de .ContentTypeAttr );};return nil ;};func (_bg *CT_Types )UnmarshalXML (d *_c .Decoder ,start _c .StartElement )error {_be :for {_ee ,_dfe :=d .Token ();if _dfe !=nil {return _dfe ;};switch _gd :=_ee .(type ){case _c .StartElement :switch _gd .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"}:_acf :=NewDefault ();if _gb :=d .DecodeElement (_acf ,&_gd );_gb !=nil {return _gb ;};_bg .Default =append (_bg .Default ,_acf );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"}:_fdc :=NewOverride ();if _dgf :=d .DecodeElement (_fdc ,&_gd );_dgf !=nil {return _dgf ;};_bg .Override =append (_bg .Override ,_fdc );default:_b .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",_gd .Name );if _daa :=d .Skip ();_daa !=nil {return _daa ;};};case _c .EndElement :break _be ;case _c .CharData :};};return nil ;};
// ValidateWithPath validates the CT_Override and its children, prefixing error messages with path
func (_abe *CT_Override )ValidateWithPath (path string )error {if !ST_ContentTypePatternRe .MatchString (_abe .ContentTypeAttr ){return _d .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 ,_abe .ContentTypeAttr );};return nil ;};
// Validate validates the CT_Types and its children
func (_fdb *CT_Types )Validate ()error {return _fdb .ValidateWithPath ("\u0043\u0054\u005f\u0054\u0079\u0070\u0065\u0073");};const ST_ContentTypePattern ="\u005e\\\u0070{\u004c\u0061\u0074\u0069\u006e\u007d\u002b\u002f\u002e\u002a\u0024";
// Validate validates the Override and its children
func (_fcf *Override )Validate ()error {return _fcf .ValidateWithPath ("\u004f\u0076\u0065\u0072\u0072\u0069\u0064\u0065");};
// ValidateWithPath validates the CT_Types and its children, prefixing error messages with path
func (_dfeb *CT_Types )ValidateWithPath (path string )error {for _db ,_fgb :=range _dfeb .Default {if _ded :=_fgb .ValidateWithPath (_d .Sprintf ("\u0025\u0073\u002f\u0044\u0065\u0066\u0061\u0075\u006ct\u005b\u0025\u0064\u005d",path ,_db ));_ded !=nil {return _ded ;};};for _dae ,_bcc :=range _dfeb .Override {if _ae :=_bcc .ValidateWithPath (_d .Sprintf ("\u0025s\u002fO\u0076\u0065\u0072\u0072\u0069\u0064\u0065\u005b\u0025\u0064\u005d",path ,_dae ));_ae !=nil {return _ae ;};};return nil ;};type Types struct{CT_Types };func (_ea *Types )UnmarshalXML (d *_c .Decoder ,start _c .StartElement )error {_ea .CT_Types =*NewCT_Types ();_fe :for {_bcf ,_aa :=d .Token ();if _aa !=nil {return _aa ;};switch _fdg :=_bcf .(type ){case _c .StartElement :switch _fdg .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"}:_cd :=NewDefault ();if _cdd :=d .DecodeElement (_cd ,&_fdg );_cdd !=nil {return _cdd ;};_ea .Default =append (_ea .Default ,_cd );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"}:_dcg :=NewOverride ();if _efc :=d .DecodeElement (_dcg ,&_fdg );_efc !=nil {return _efc ;};_ea .Override =append (_ea .Override ,_dcg );default:_b .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",_fdg .Name );if _efcg :=d .Skip ();_efcg !=nil {return _efcg ;};};case _c .EndElement :break _fe ;case _c .CharData :};};return nil ;};func (_fdcd *Override )MarshalXML (e *_c .Encoder ,start _c .StartElement )error {return _fdcd .CT_Override .MarshalXML (e ,start );};func (_gcb *Override )UnmarshalXML (d *_c .Decoder ,start _c .StartElement )error {_gcb .CT_Override =*NewCT_Override ();for _ ,_cfd :=range start .Attr {if _cfd .Name .Local =="C\u006f\u006e\u0074\u0065\u006e\u0074\u0054\u0079\u0070\u0065"{_gee ,_bba :=_cfd .Value ,error (nil );if _bba !=nil {return _bba ;};_gcb .ContentTypeAttr =_gee ;continue ;};if _cfd .Name .Local =="\u0050\u0061\u0072\u0074\u004e\u0061\u006d\u0065"{_geef ,_ef :=_cfd .Value ,error (nil );if _ef !=nil {return _ef ;};_gcb .PartNameAttr =_geef ;continue ;};};for {_abc ,_bcb :=d .Token ();if _bcb !=nil {return _d .Errorf ("p\u0061r\u0073\u0069\u006e\u0067\u0020\u004f\u0076\u0065r\u0072\u0069\u0064\u0065: \u0025\u0073",_bcb );};if _acb ,_bd :=_abc .(_c .EndElement );_bd &&_acb .Name ==start .Name {break ;};};return nil ;};
// Validate validates the CT_Override and its children
func (_ec *CT_Override )Validate ()error {return _ec .ValidateWithPath ("C\u0054\u005f\u004f\u0076\u0065\u0072\u0072\u0069\u0064\u0065");};func NewCT_Override ()*CT_Override {_fd :=&CT_Override {};_fd .ContentTypeAttr ="\u0061p\u0070l\u0069\u0063\u0061\u0074\u0069\u006f\u006e\u002f\u0078\u006d\u006c";return _fd ;};func (_a *CT_Default )UnmarshalXML (d *_c .Decoder ,start _c .StartElement )error {_a .ExtensionAttr ="\u0078\u006d\u006c";_a .ContentTypeAttr ="\u0061p\u0070l\u0069\u0063\u0061\u0074\u0069\u006f\u006e\u002f\u0078\u006d\u006c";for _ ,_e :=range start .Attr {if _e .Name .Local =="\u0045x\u0074\u0065\u006e\u0073\u0069\u006fn"{_da ,_dab :=_e .Value ,error (nil );if _dab !=nil {return _dab ;};_a .ExtensionAttr =_da ;continue ;};if _e .Name .Local =="C\u006f\u006e\u0074\u0065\u006e\u0074\u0054\u0079\u0070\u0065"{_fg ,_bb :=_e .Value ,error (nil );if _bb !=nil {return _bb ;};_a .ContentTypeAttr =_fg ;continue ;};};for {_fa ,_dg :=d .Token ();if _dg !=nil {return _d .Errorf ("\u0070\u0061\u0072\u0073in\u0067\u0020\u0043\u0054\u005f\u0044\u0065\u0066\u0061\u0075\u006c\u0074\u003a\u0020%\u0073",_dg );};if _abd ,_ac :=_fa .(_c .EndElement );_ac &&_abd .Name ==start .Name {break ;};};return nil ;};var ST_ExtensionPatternRe =_cf .MustCompile (ST_ExtensionPattern );func (_cce *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 :_d .Sprintf ("\u0025\u0076",_cce .ContentTypeAttr )});start .Attr =append (start .Attr ,_c .Attr {Name :_c .Name {Local :"\u0050\u0061\u0072\u0074\u004e\u0061\u006d\u0065"},Value :_d .Sprintf ("\u0025\u0076",_cce .PartNameAttr )});e .EncodeToken (start );e .EncodeToken (_c .EndElement {Name :start .Name });return nil ;};type CT_Default struct{ExtensionAttr string ;ContentTypeAttr string ;};func NewTypes ()*Types {_bf :=&Types {};_bf .CT_Types =*NewCT_Types ();return _bf };type Default struct{CT_Default };
// Validate validates the CT_Default and its children
func (_cc *CT_Default )Validate ()error {return _cc .ValidateWithPath ("\u0043\u0054\u005f\u0044\u0065\u0066\u0061\u0075\u006c\u0074");};func (_df *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 :_d .Sprintf ("\u0025\u0076",_df .ExtensionAttr )});start .Attr =append (start .Attr ,_c .Attr {Name :_c .Name {Local :"C\u006f\u006e\u0074\u0065\u006e\u0074\u0054\u0079\u0070\u0065"},Value :_d .Sprintf ("\u0025\u0076",_df .ContentTypeAttr )});e .EncodeToken (start );e .EncodeToken (_c .EndElement {Name :start .Name });return nil ;};func (_gc *CT_Override )UnmarshalXML (d *_c .Decoder ,start _c .StartElement )error {_gc .ContentTypeAttr ="\u0061p\u0070l\u0069\u0063\u0061\u0074\u0069\u006f\u006e\u002f\u0078\u006d\u006c";for _ ,_bc :=range start .Attr {if _bc .Name .Local =="C\u006f\u006e\u0074\u0065\u006e\u0074\u0054\u0079\u0070\u0065"{_dee ,_ce :=_bc .Value ,error (nil );if _ce !=nil {return _ce ;};_gc .ContentTypeAttr =_dee ;continue ;};if _bc .Name .Local =="\u0050\u0061\u0072\u0074\u004e\u0061\u006d\u0065"{_fc ,_fb :=_bc .Value ,error (nil );if _fb !=nil {return _fb ;};_gc .PartNameAttr =_fc ;continue ;};};for {_gcg ,_ed :=d .Token ();if _ed !=nil {return _d .Errorf ("\u0070\u0061\u0072si\u006e\u0067\u0020\u0043\u0054\u005f\u004f\u0076\u0065\u0072\u0072\u0069\u0064\u0065\u003a\u0020\u0025\u0073",_ed );};if _gf ,_af :=_gcg .(_c .EndElement );_af &&_gf .Name ==start .Name {break ;};};return nil ;};func NewCT_Default ()*CT_Default {_g :=&CT_Default {};_g .ExtensionAttr ="\u0078\u006d\u006c";_g .ContentTypeAttr ="\u0061p\u0070l\u0069\u0063\u0061\u0074\u0069\u006f\u006e\u002f\u0078\u006d\u006c";return _g ;};
// 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 );};
func (_dbd *Types )ValidateWithPath (path string )error {if _bdb :=_dbd .CT_Types .ValidateWithPath (path );_bdb !=nil {return _bdb ;};return nil ;};func (_bce *Default )UnmarshalXML (d *_c .Decoder ,start _c .StartElement )error {_bce .CT_Default =*NewCT_Default ();for _ ,_ba :=range start .Attr {if _ba .Name .Local =="\u0045x\u0074\u0065\u006e\u0073\u0069\u006fn"{_cac ,_cg :=_ba .Value ,error (nil );if _cg !=nil {return _cg ;};_bce .ExtensionAttr =_cac ;continue ;};if _ba .Name .Local =="C\u006f\u006e\u0074\u0065\u006e\u0074\u0054\u0079\u0070\u0065"{_ad ,_dc :=_ba .Value ,error (nil );if _dc !=nil {return _dc ;};_bce .ContentTypeAttr =_ad ;continue ;};};for {_ge ,_ff :=d .Token ();if _ff !=nil {return _d .Errorf ("\u0070\u0061\u0072\u0073in\u0067\u0020\u0044\u0065\u0066\u0061\u0075\u006c\u0074\u003a\u0020\u0025\u0073",_ff );};if _ddg ,_dcd :=_ge .(_c .EndElement );_dcd &&_ddg .Name ==start .Name {break ;};};return nil ;};
// ValidateWithPath validates the Default and its children, prefixing error messages with path
func (_bge *Default )ValidateWithPath (path string )error {if _eb :=_bge .CT_Default .ValidateWithPath (path );_eb !=nil {return _eb ;};return nil ;};type Override struct{CT_Override };type CT_Types struct{Default []*Default ;Override []*Override ;};var ST_ContentTypePatternRe =_cf .MustCompile (ST_ContentTypePattern );func (_geg *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 _geg .CT_Types .MarshalXML (e ,start );};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_Override struct{ContentTypeAttr string ;PartNameAttr string ;};
// Validate validates the Default and its children
func (_gfa *Default )Validate ()error {return _gfa .ValidateWithPath ("\u0044e\u0066\u0061\u0075\u006c\u0074");};
// ValidateWithPath validates the Override and its children, prefixing error messages with path
func (_dba *Override )ValidateWithPath (path string )error {if _ddd :=_dba .CT_Override .ValidateWithPath (path );_ddd !=nil {return _ddd ;};return nil ;};func init (){_b .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 );_b .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 );_b .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 );_b .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 );_b .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 );_b .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

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,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 (_d "encoding/xml";_a "fmt";_f "github.com/unidoc/unioffice";);
package powerpoint ;import (_a "encoding/xml";_ag "fmt";_ec "github.com/unidoc/unioffice";);func (_d *CT_Rel )MarshalXML (e *_a .Encoder ,start _a .StartElement )error {if _d .IdAttr !=nil {start .Attr =append (start .Attr ,_a .Attr {Name :_a .Name {Local :"\u0069\u0064"},Value :_ag .Sprintf ("\u0025\u0076",*_d .IdAttr )});};e .EncodeToken (start );e .EncodeToken (_a .EndElement {Name :start .Name });return nil ;};func (_b *CT_Empty )UnmarshalXML (d *_a .Decoder ,start _a .StartElement )error {for {_ed ,_aa :=d .Token ();if _aa !=nil {return _ag .Errorf ("p\u0061r\u0073\u0069\u006e\u0067\u0020\u0043\u0054\u005fE\u006d\u0070\u0074\u0079: \u0025\u0073",_aa );};if _fg ,_ad :=_ed .(_a .EndElement );_ad &&_fg .Name ==start .Name {break ;};};return nil ;};func (_eb *Iscomment )UnmarshalXML (d *_a .Decoder ,start _a .StartElement )error {_eb .CT_Empty =*NewCT_Empty ();for {_gb ,_dd :=d .Token ();if _dd !=nil {return _ag .Errorf ("p\u0061\u0072\u0073\u0069ng\u0020I\u0073\u0063\u006f\u006d\u006de\u006e\u0074\u003a\u0020\u0025\u0073",_dd );};if _db ,_fd :=_gb .(_a .EndElement );_fd &&_db .Name ==start .Name {break ;};};return nil ;};
// ValidateWithPath validates the CT_Empty and its children, prefixing error messages with path
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 (_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");};
func (_g *CT_Empty )ValidateWithPath (path string )error {return nil };func NewIscomment ()*Iscomment {_fe :=&Iscomment {};_fe .CT_Empty =*NewCT_Empty ();return _fe };
// Validate validates the CT_Empty and its children
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 );};
func (_c *CT_Empty )Validate ()error {return _c .ValidateWithPath ("\u0043\u0054\u005f\u0045\u006d\u0070\u0074\u0079");};
// ValidateWithPath validates the Textdata and its children, prefixing error messages with path
func (_gc *Textdata )ValidateWithPath (path string )error {if _ebc :=_gc .CT_Rel .ValidateWithPath (path );_ebc !=nil {return _ebc ;};return nil ;};
// ValidateWithPath validates the CT_Rel and its children, prefixing error messages with path
func (_bac *CT_Rel )ValidateWithPath (path string )error {return nil };type CT_Empty struct{};func NewCT_Rel ()*CT_Rel {_agg :=&CT_Rel {};return _agg };
// Validate validates the Textdata and its children
func (_gd *Textdata )Validate ()error {return _gd .ValidateWithPath ("\u0054\u0065\u0078\u0074\u0064\u0061\u0074\u0061");};type Textdata struct{CT_Rel };func NewCT_Empty ()*CT_Empty {_f :=&CT_Empty {};return _f };
// Validate validates the Iscomment and its children
func (_gbe *Iscomment )Validate ()error {return _gbe .ValidateWithPath ("\u0049s\u0063\u006f\u006d\u006d\u0065\u006et");};func NewTextdata ()*Textdata {_cf :=&Textdata {};_cf .CT_Rel =*NewCT_Rel ();return _cf };func (_fc *Textdata )UnmarshalXML (d *_a .Decoder ,start _a .StartElement )error {_fc .CT_Rel =*NewCT_Rel ();for _ ,_deg :=range start .Attr {if _deg .Name .Local =="\u0069\u0064"{_bd ,_ged :=_deg .Value ,error (nil );if _ged !=nil {return _ged ;};_fc .IdAttr =&_bd ;continue ;};};for {_ede ,_df :=d .Token ();if _df !=nil {return _ag .Errorf ("p\u0061r\u0073\u0069\u006e\u0067\u0020\u0054\u0065\u0078t\u0064\u0061\u0074\u0061: \u0025\u0073",_df );};if _bc ,_cb :=_ede .(_a .EndElement );_cb &&_bc .Name ==start .Name {break ;};};return nil ;};
// ValidateWithPath validates the Iscomment and its children, prefixing error messages with path
func (_dc *Iscomment )ValidateWithPath (path string )error {if _ab :=_dc .CT_Empty .ValidateWithPath (path );_ab !=nil {return _ab ;};return nil ;};type Iscomment struct{CT_Empty };func (_ee *CT_Empty )MarshalXML (e *_a .Encoder ,start _a .StartElement )error {e .EncodeToken (start );e .EncodeToken (_a .EndElement {Name :start .Name });return nil ;};func (_ef *CT_Rel )UnmarshalXML (d *_a .Decoder ,start _a .StartElement )error {for _ ,_ac :=range start .Attr {if _ac .Name .Local =="\u0069\u0064"{_efc ,_af :=_ac .Value ,error (nil );if _af !=nil {return _af ;};_ef .IdAttr =&_efc ;continue ;};};for {_cd ,_eca :=d .Token ();if _eca !=nil {return _ag .Errorf ("\u0070a\u0072s\u0069\u006e\u0067\u0020\u0043T\u005f\u0052e\u006c\u003a\u0020\u0025\u0073",_eca );};if _add ,_ge :=_cd .(_a .EndElement );_ge &&_add .Name ==start .Name {break ;};};return nil ;};type CT_Rel struct{IdAttr *string ;};
// Validate validates the CT_Rel and its children
func (_ba *CT_Rel )Validate ()error {return _ba .ValidateWithPath ("\u0043\u0054\u005f\u0052\u0065\u006c");};func (_de *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 _de .CT_Empty .MarshalXML (e ,start );};func (_dca *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 _dca .CT_Rel .MarshalXML (e ,start );};func init (){_ec .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 );_ec .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 );_ec .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 );_ec .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,11 +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 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 =_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 ;};
package reference ;import (_g "errors";_da "fmt";_gf "github.com/unidoc/unioffice/spreadsheet/update";_d "regexp";_c "strconv";_f "strings";);
// CellReference is a parsed reference to a cell. Input is of the form 'A1',
// '$C$2', etc.
@ -23,32 +19,36 @@ type CellReference struct{RowIdx uint32 ;ColumnIdx uint32 ;Column string ;Absolu
// '$C', etc.
type ColumnReference struct{ColumnIdx uint32 ;Column string ;AbsoluteColumn bool ;SheetName string ;};
// 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 ;};
// ParseCellReference parses a cell reference of the form 'A10' and splits it
// into column/row segments.
func ParseCellReference (s string )(CellReference ,error ){s =_f .TrimSpace (s );if len (s )< 2{return CellReference {},_g .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");};_b :=CellReference {};_cc ,_ba ,_af :=_cef (s );if _af !=nil {return CellReference {},_af ;};if _cc !=""{_b .SheetName =_cc ;};if s [0]=='$'{_b .AbsoluteColumn =true ;_ba =_ba [1:];};_cca :=-1;_e :for _gc :=0;_gc < len (_ba );_gc ++{switch {case _ba [_gc ]>='0'&&_ba [_gc ]<='9'||_ba [_gc ]=='$':_cca =_gc ;break _e ;};};switch _cca {case 0:return CellReference {},_da .Errorf ("\u006e\u006f\u0020\u006cet\u0074\u0065\u0072\u0020\u0070\u0072\u0065\u0066\u0069\u0078\u0020\u0069\u006e\u0020%\u0073",_ba );case -1:return CellReference {},_da .Errorf ("\u006eo\u0020d\u0069\u0067\u0069\u0074\u0073\u0020\u0069\u006e\u0020\u0025\u0073",_ba );};_b .Column =_ba [0:_cca ];if _ba [_cca ]=='$'{_b .AbsoluteRow =true ;_cca ++;};_b .ColumnIdx =ColumnToIndex (_b .Column );_ae ,_af :=_c .ParseUint (_ba [_cca :],10,32);if _af !=nil {return CellReference {},_da .Errorf ("e\u0072\u0072\u006f\u0072 p\u0061r\u0073\u0069\u006e\u0067\u0020r\u006f\u0077\u003a\u0020\u0025\u0073",_af );};if _ae ==0{return CellReference {},_da .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");};_b .RowIdx =uint32 (_ae );return _b ,nil ;};var _ag =_d .MustCompile ("^\u005b\u0061\u002d\u007aA-\u005a]\u0028\u005b\u0061\u002d\u007aA\u002d\u005a\u005d\u003f\u0029\u0024");
// 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;};
func (_db CellReference )String ()string {_fc :=make ([]byte ,0,4);if _db .AbsoluteColumn {_fc =append (_fc ,'$');};_fc =append (_fc ,_db .Column ...);if _db .AbsoluteRow {_fc =append (_fc ,'$');};_fc =_c .AppendInt (_fc ,int64 (_db .RowIdx ),10);return string (_fc );};
// 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 ;};};
func (_be *ColumnReference )Update (updateType _gf .UpdateAction )*ColumnReference {switch updateType {case _gf .UpdateActionRemoveColumn :_gg :=_be ;_gg .ColumnIdx =_be .ColumnIdx -1;_gg .Column =IndexToColumn (_gg .ColumnIdx );return _gg ;default:return _be ;};};
// ParseRangeReference splits a range reference of the form "A1:B5" into its
// components.
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 ;};
func ParseRangeReference (s string )(_gfe ,_eg CellReference ,_cd error ){_bg ,_bac ,_cd :=_cef (s );if _cd !=nil {return CellReference {},CellReference {},_cd ;};_ab :=_f .Split (_bac ,"\u003a");if len (_ab )!=2{return CellReference {},CellReference {},_g .New ("i\u006ev\u0061\u006c\u0069\u0064\u0020\u0072\u0061\u006eg\u0065\u0020\u0066\u006frm\u0061\u0074");};if _bg !=""{_ab [0]=_bg +"\u0021"+_ab [0];_ab [1]=_bg +"\u0021"+_ab [1];};_fg ,_cd :=ParseCellReference (_ab [0]);if _cd !=nil {return CellReference {},CellReference {},_cd ;};_fcb ,_cd :=ParseCellReference (_ab [1]);if _cd !=nil {return CellReference {},CellReference {},_cd ;};return _fg ,_fcb ,nil ;};
// IndexToColumn maps a column number to a column name (e.g. 0 = A, 1 = B, 26 = AA)
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 :]);};
// ColumnToIndex maps a column to a zero based index (e.g. A = 0, B = 1, AA = 26)
func ColumnToIndex (col string )uint32 {col =_f .ToUpper (col );_ca :=uint32 (0);for _ ,_bc :=range col {_ca *=26;_ca +=uint32 (_bc -'A'+1);};return _ca -1;};
// Update updates reference to point one of the neighboring cells with respect to the update type after removing a row/column.
func (_fcf *CellReference )Update (updateType _gf .UpdateAction )*CellReference {switch updateType {case _gf .UpdateActionRemoveColumn :_gd :=_fcf ;_gd .ColumnIdx =_fcf .ColumnIdx -1;_gd .Column =IndexToColumn (_gd .ColumnIdx );return _gd ;default:return _fcf ;};};
// ParseColumnRangeReference splits a range reference of the form "A:B" into its
// components.
func ParseColumnRangeReference (s string )(_ccca ,_dag ColumnReference ,_ccb error ){_fd :="";_caa :=_f .Split (s ,"\u0021");if len (_caa )==2{_fd =_caa [0];s =_caa [1];};_ccd :=_f .Split (s ,"\u003a");if len (_ccd )!=2{return ColumnReference {},ColumnReference {},_g .New ("i\u006ev\u0061\u006c\u0069\u0064\u0020\u0072\u0061\u006eg\u0065\u0020\u0066\u006frm\u0061\u0074");};if _fd !=""{_ccd [0]=_fd +"\u0021"+_ccd [0];_ccd [1]=_fd +"\u0021"+_ccd [1];};_egd ,_ccb :=ParseColumnReference (_ccd [0]);if _ccb !=nil {return ColumnReference {},ColumnReference {},_ccb ;};_fcg ,_ccb :=ParseColumnReference (_ccd [1]);if _ccb !=nil {return ColumnReference {},ColumnReference {},_ccb ;};return _egd ,_fcg ,nil ;};func _cef (_eb string )(string ,string ,error ){_beb :="";_fb :=_f .LastIndex (_eb ,"\u0021");if _fb > -1{_beb =_eb [:_fb ];_eb =_eb [_fb +1:];if _beb ==""{return "","",_g .New ("\u0049n\u0076a\u006c\u0069\u0064\u0020\u0073h\u0065\u0065t\u0020\u006e\u0061\u006d\u0065");};};return _beb ,_eb ,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");
func (_ee ColumnReference )String ()string {_ff :=make ([]byte ,0,4);if _ee .AbsoluteColumn {_ff =append (_ff ,'$');};_ff =append (_ff ,_ee .Column ...);return string (_ff );};
// IndexToColumn maps a column number to a column name (e.g. 0 = A, 1 = B, 26 = AA)
func IndexToColumn (col uint32 )string {var _ce [64+1]byte ;_afb :=len (_ce );_bae :=col ;const _bca =26;for _bae >=_bca {_afb --;_cb :=_bae /_bca ;_ce [_afb ]=byte ('A'+uint (_bae -_cb *_bca ));_bae =_cb -1;};_afb --;_ce [_afb ]=byte ('A'+uint (_bae ));return string (_ce [_afb :]);};
// 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 =_f .TrimSpace (s );if len (s )< 1{return ColumnReference {},_g .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");};_ccc :=ColumnReference {};_gb ,_gbe ,_ef :=_cef (s );if _ef !=nil {return ColumnReference {},_ef ;};if _gb !=""{_ccc .SheetName =_gb ;};if _gbe [0]=='$'{_ccc .AbsoluteColumn =true ;_gbe =_gbe [1:];};if !_ag .MatchString (_gbe ){return ColumnReference {},_g .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");};_ccc .Column =_gbe ;_ccc .ColumnIdx =ColumnToIndex (_ccc .Column );return _ccc ,nil ;};

File diff suppressed because one or more lines are too long

View File

@ -10,10 +10,7 @@
// terms that can be accessed at https://unidoc.io/eula/
// Package update contains definitions needed for updating references after removing rows/columns.
package update ;
// UpdateAction is the type for update types constants.
type UpdateAction byte ;const (UpdateActionRemoveColumn UpdateAction =iota ;);
package update ;const (UpdateActionRemoveColumn UpdateAction =iota ;);
// UpdateQuery contains terms of how to update references after removing row/column.
type UpdateQuery struct{
@ -28,4 +25,7 @@ ColumnIdx uint32 ;
SheetToUpdate string ;
// UpdateCurrentSheet is true if references without sheet prefix should be updated as well.
UpdateCurrentSheet bool ;};
UpdateCurrentSheet bool ;};
// UpdateAction is the type for update types constants.
type UpdateAction byte ;

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";_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";);
package vmldrawing ;import (_g "encoding/xml";_e "fmt";_f "github.com/unidoc/unioffice";_c "github.com/unidoc/unioffice/schema/soo/ofc/sharedTypes";_fe "github.com/unidoc/unioffice/schema/urn/schemas_microsoft_com/office/excel";_bg "github.com/unidoc/unioffice/schema/urn/schemas_microsoft_com/vml";);type Container struct{Layout *_bg .OfcShapelayout ;ShapeType *_bg .Shapetype ;Shape []*_bg .Shape ;};func (_ca *Container )UnmarshalXML (d *_g .Decoder ,start _g .StartElement )error {_ca .Shape =nil ;_ffc :for {_af ,_gbg :=d .Token ();if _gbg !=nil {return _gbg ;};switch _beb :=_af .(type ){case _g .StartElement :switch _beb .Name .Local {case "s\u0068\u0061\u0070\u0065\u006c\u0061\u0079\u006f\u0075\u0074":_ca .Layout =_bg .NewOfcShapelayout ();if _ag :=d .DecodeElement (_ca .Layout ,&_beb );_ag !=nil {return _ag ;};case "\u0073h\u0061\u0070\u0065\u0074\u0079\u0070e":_ca .ShapeType =_bg .NewShapetype ();if _abg :=d .DecodeElement (_ca .ShapeType ,&_beb );_abg !=nil {return _abg ;};case "\u0073\u0068\u0061p\u0065":_ffb :=_bg .NewShape ();if _ffe :=d .DecodeElement (_ffb ,&_beb );_ffe !=nil {return _ffe ;};_ca .Shape =append (_ca .Shape ,_ffb );};case _g .EndElement :break _ffc ;};};return nil ;};
// NewCommentDrawing constructs a new comment drawing.
func NewCommentDrawing ()*Container {_fc :=NewContainer ();_fc .Layout =_bg .NewOfcShapelayout ();_fc .Layout .ExtAttr =_bg .ST_ExtEdit ;_fc .Layout .Idmap =_bg .NewOfcCT_IdMap ();_fc .Layout .Idmap .DataAttr =_f .String ("\u0031");_fc .Layout .Idmap .ExtAttr =_bg .ST_ExtEdit ;_fc .ShapeType =_bg .NewShapetype ();_fc .ShapeType .IdAttr =_f .String ("_\u0078\u0030\u0030\u0030\u0030\u005f\u0074\u0032\u0030\u0032");_fc .ShapeType .CoordsizeAttr =_f .String ("2\u0031\u0036\u0030\u0030\u002c\u0032\u0031\u0036\u0030\u0030");_fc .ShapeType .SptAttr =_f .Float32 (202);_fc .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");_ge :=_bg .NewEG_ShapeElements ();_fc .ShapeType .EG_ShapeElements =append (_fc .ShapeType .EG_ShapeElements ,_ge );_ge .Path =_bg .NewPath ();_ge .Path .GradientshapeokAttr =_c .ST_TrueFalseT ;_ge .Path .ConnecttypeAttr =_bg .OfcST_ConnectTypeRect ;return _fc ;};
// NewCommentShape creates a new comment shape for a given cell index. The
// indices here are zero based.
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 });};
func NewCommentShape (col ,row int64 )*_bg .Shape {_bc :=_bg .NewShape ();_bc .IdAttr =_f .String (_e .Sprintf ("\u0063\u0073\u005f\u0025\u0064\u005f\u0025\u0064",col ,row ));_bc .TypeAttr =_f .String ("\u0023\u005f\u00780\u0030\u0030\u0030\u005f\u0074\u0032\u0030\u0032");_bc .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");_bc .FillcolorAttr =_f .String ("\u0023f\u0062\u0066\u0036\u0064\u0036");_bc .StrokecolorAttr =_f .String ("\u0023e\u0064\u0065\u0061\u0061\u0031");_cc :=_bg .NewEG_ShapeElements ();_cc .Fill =_bg .NewFill ();_cc .Fill .Color2Attr =_f .String ("\u0023f\u0062\u0066\u0065\u0038\u0032");_cc .Fill .AngleAttr =_f .Float64 (-180);_cc .Fill .TypeAttr =_bg .ST_FillTypeGradient ;_cc .Fill .Fill =_bg .NewOfcFill ();_cc .Fill .Fill .ExtAttr =_bg .ST_ExtView ;_cc .Fill .Fill .TypeAttr =_bg .OfcST_FillTypeGradientUnscaled ;_bc .EG_ShapeElements =append (_bc .EG_ShapeElements ,_cc );_gd :=_bg .NewEG_ShapeElements ();_gd .Shadow =_bg .NewShadow ();_gd .Shadow .OnAttr =_c .ST_TrueFalseT ;_gd .Shadow .ObscuredAttr =_c .ST_TrueFalseT ;_bc .EG_ShapeElements =append (_bc .EG_ShapeElements ,_gd );_eb :=_bg .NewEG_ShapeElements ();_eb .Path =_bg .NewPath ();_eb .Path .ConnecttypeAttr =_bg .OfcST_ConnectTypeNone ;_bc .EG_ShapeElements =append (_bc .EG_ShapeElements ,_eb );_a :=_bg .NewEG_ShapeElements ();_a .Textbox =_bg .NewTextbox ();_a .Textbox .StyleAttr =_f .String ("\u006d\u0073\u006f\u002ddi\u0072\u0065\u0063\u0074\u0069\u006f\u006e\u002d\u0061\u006c\u0074\u003a\u0061\u0075t\u006f");_bc .EG_ShapeElements =append (_bc .EG_ShapeElements ,_a );_eg :=_bg .NewEG_ShapeElements ();_eg .ClientData =_fe .NewClientData ();_eg .ClientData .ObjectTypeAttr =_fe .ST_ObjectTypeNote ;_eg .ClientData .MoveWithCells =_c .ST_TrueFalseBlankT ;_eg .ClientData .SizeWithCells =_c .ST_TrueFalseBlankT ;_eg .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");_eg .ClientData .AutoFill =_c .ST_TrueFalseBlankFalse ;_eg .ClientData .Row =_f .Int64 (row );_eg .ClientData .Column =_f .Int64 (col );_bc .EG_ShapeElements =append (_bc .EG_ShapeElements ,_eg );return _bc ;};func NewContainer ()*Container {return &Container {}};func (_ba *Container )MarshalXML (e *_g .Encoder ,start _g .StartElement )error {start .Attr =append (start .Attr ,_g .Attr {Name :_g .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 ,_g .Attr {Name :_g .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 ,_g .Attr {Name :_g .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 _ba .Layout !=nil {_gb :=_g .StartElement {Name :_g .Name {Local :"\u006f\u003a\u0073\u0068\u0061\u0070\u0065\u006c\u0061\u0079\u006f\u0075\u0074"}};e .EncodeElement (_ba .Layout ,_gb );};if _ba .ShapeType !=nil {_ff :=_g .StartElement {Name :_g .Name {Local :"v\u003a\u0073\u0068\u0061\u0070\u0065\u0074\u0079\u0070\u0065"}};e .EncodeElement (_ba .ShapeType ,_ff );};for _ ,_ged :=range _ba .Shape {_be :=_g .StartElement {Name :_g .Name {Local :"\u0076:\u0073\u0068\u0061\u0070\u0065"}};e .EncodeElement (_ged ,_be );};return e .EncodeToken (_g .EndElement {Name :start .Name });};

View File

@ -9,13 +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 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 );};
// 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 {_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 ;};
package zippkg ;import (_ab "archive/zip";_gf "bytes";_c "encoding/xml";_bd "fmt";_cb "github.com/unidoc/unioffice";_ca "github.com/unidoc/unioffice/algo";_ee "github.com/unidoc/unioffice/common/tempstorage";_gcd "github.com/unidoc/unioffice/schema/soo/pkg/relationships";_gc "io";_ba "path";_b "sort";_e "strings";_g "time";);
// OnNewRelationshipFunc is called when a new relationship has been discovered.
//
@ -29,42 +23,48 @@ func Decode (f *_g .File ,dest interface{})error {_ecc ,_ded :=f .Open ();if _de
// 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 (_aa *DecodeMap ,_gg ,_cf string ,_ag []*_g .File ,_ea *_eb .Relationship ,_fbf Target )error ;
type OnNewRelationshipFunc func (_f *DecodeMap ,_bc ,_baf string ,_ae []*_ab .File ,_gcg *_gcd .Relationship ,_bg Target )error ;type Target struct{Path string ;Typ string ;Ifc interface{};Index uint32 ;};
// SetOnNewRelationshipFunc sets the function to be called when a new
// relationship has been discovered.
func (_gge *DecodeMap )SetOnNewRelationshipFunc (fn OnNewRelationshipFunc ){_gge ._cc =fn };
// AddFileFromBytes takes a byte array and adds it at a given path to a zip file.
func AddFileFromBytes (z *_ab .Writer ,zipPath string ,data []byte )error {_da ,_cca :=z .Create (zipPath );if _cca !=nil {return _bd .Errorf ("e\u0072\u0072\u006f\u0072 c\u0072e\u0061\u0074\u0069\u006e\u0067 \u0025\u0073\u003a\u0020\u0025\u0073",zipPath ,_cca );};_ ,_cca =_gc .Copy (_da ,_gf .NewReader (data ));return _cca ;};
// DecodeMap is used to walk a tree of relationships, decoding files and passing
// control back to the document.
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 {'/','>'};
// SelfClosingWriter wraps a writer and replaces XML tags of the
// type <foo></foo> with <foo/>
type SelfClosingWriter struct{W _gc .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 *_ab .Writer ,zipPath ,storagePath string )error {_cdfg ,_bbd :=z .Create (zipPath );if _bbd !=nil {return _bd .Errorf ("e\u0072\u0072\u006f\u0072 c\u0072e\u0061\u0074\u0069\u006e\u0067 \u0025\u0073\u003a\u0020\u0025\u0073",zipPath ,_bbd );};_eb ,_bbd :=_ee .Open (storagePath );if _bbd !=nil {return _bd .Errorf ("e\u0072r\u006f\u0072\u0020\u006f\u0070\u0065\u006e\u0069n\u0067\u0020\u0025\u0073: \u0025\u0073",storagePath ,_bbd );};defer _eb .Close ();_ ,_bbd =_gc .Copy (_cdfg ,_eb );return _bbd ;};
// Decode unmarshals the content of a *zip.File as XML to a given destination.
func Decode (f *_ab .File ,dest interface{})error {_cg ,_abe :=f .Open ();if _abe !=nil {return _bd .Errorf ("e\u0072r\u006f\u0072\u0020\u0072\u0065\u0061\u0064\u0069n\u0067\u0020\u0025\u0073: \u0025\u0073",f .Name ,_abe );};defer _cg .Close ();_gb :=_c .NewDecoder (_cg );if _aba :=_gb .Decode (dest );_aba !=nil {return _bd .Errorf ("e\u0072\u0072\u006f\u0072 d\u0065c\u006f\u0064\u0069\u006e\u0067 \u0025\u0073\u003a\u0020\u0025\u0073",f .Name ,_aba );};if _ga ,_ge :=dest .(*_gcd .Relationships );_ge {for _eed ,_ddc :=range _ga .Relationship {switch _ddc .TypeAttr {case _cb .OfficeDocumentTypeStrict :_ga .Relationship [_eed ].TypeAttr =_cb .OfficeDocumentType ;case _cb .StylesTypeStrict :_ga .Relationship [_eed ].TypeAttr =_cb .StylesType ;case _cb .ThemeTypeStrict :_ga .Relationship [_eed ].TypeAttr =_cb .ThemeType ;case _cb .ControlTypeStrict :_ga .Relationship [_eed ].TypeAttr =_cb .ControlType ;case _cb .SettingsTypeStrict :_ga .Relationship [_eed ].TypeAttr =_cb .SettingsType ;case _cb .ImageTypeStrict :_ga .Relationship [_eed ].TypeAttr =_cb .ImageType ;case _cb .CommentsTypeStrict :_ga .Relationship [_eed ].TypeAttr =_cb .CommentsType ;case _cb .ThumbnailTypeStrict :_ga .Relationship [_eed ].TypeAttr =_cb .ThumbnailType ;case _cb .DrawingTypeStrict :_ga .Relationship [_eed ].TypeAttr =_cb .DrawingType ;case _cb .ChartTypeStrict :_ga .Relationship [_eed ].TypeAttr =_cb .ChartType ;case _cb .ExtendedPropertiesTypeStrict :_ga .Relationship [_eed ].TypeAttr =_cb .ExtendedPropertiesType ;case _cb .CustomXMLTypeStrict :_ga .Relationship [_eed ].TypeAttr =_cb .CustomXMLType ;case _cb .WorksheetTypeStrict :_ga .Relationship [_eed ].TypeAttr =_cb .WorksheetType ;case _cb .SharedStringsTypeStrict :_ga .Relationship [_eed ].TypeAttr =_cb .SharedStringsType ;case _cb .TableTypeStrict :_ga .Relationship [_eed ].TypeAttr =_cb .TableType ;case _cb .HeaderTypeStrict :_ga .Relationship [_eed ].TypeAttr =_cb .HeaderType ;case _cb .FooterTypeStrict :_ga .Relationship [_eed ].TypeAttr =_cb .FooterType ;case _cb .NumberingTypeStrict :_ga .Relationship [_eed ].TypeAttr =_cb .NumberingType ;case _cb .FontTableTypeStrict :_ga .Relationship [_eed ].TypeAttr =_cb .FontTableType ;case _cb .WebSettingsTypeStrict :_ga .Relationship [_eed ].TypeAttr =_cb .WebSettingsType ;case _cb .FootNotesTypeStrict :_ga .Relationship [_eed ].TypeAttr =_cb .FootNotesType ;case _cb .EndNotesTypeStrict :_ga .Relationship [_eed ].TypeAttr =_cb .EndNotesType ;case _cb .SlideTypeStrict :_ga .Relationship [_eed ].TypeAttr =_cb .SlideType ;case _cb .VMLDrawingTypeStrict :_ga .Relationship [_eed ].TypeAttr =_cb .VMLDrawingType ;};};_b .Slice (_ga .Relationship ,func (_fba ,_efe int )bool {_dge :=_ga .Relationship [_fba ];_cac :=_ga .Relationship [_efe ];return _ca .NaturalLess (_dge .IdAttr ,_cac .IdAttr );});};return nil ;};
// 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'};
func RelationsPathFor (path string )string {_dg :=_e .Split (path ,"\u002f");_cfb :=_e .Join (_dg [0:len (_dg )-1],"\u002f");_ef :=_dg [len (_dg )-1];_cfb +="\u002f_\u0072\u0065\u006c\u0073\u002f";_ef +="\u002e\u0072\u0065l\u0073";return _cfb +_ef ;};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";var _bec =[]byte {'\r','\n'};func (_fbad SelfClosingWriter )Write (b []byte )(int ,error ){_gbd :=0;_eec :=0;for _bab :=0;_bab < len (b )-2;_bab ++{if b [_bab ]=='>'&&b [_bab +1]=='<'&&b [_bab +2]=='/'{_fgc :=[]byte {};_fbb :=_bab ;for _gd :=_bab ;_gd >=0;_gd --{if b [_gd ]==' '{_fbb =_gd ;}else if b [_gd ]=='<'{_fgc =b [_gd +1:_fbb ];break ;};};_bbdg :=[]byte {};for _abd :=_bab +3;_abd < len (b );_abd ++{if b [_abd ]=='>'{_bbdg =b [_bab +3:_abd ];break ;};};if !_gf .Equal (_fgc ,_bbdg ){continue ;};_cbb ,_cbbf :=_fbad .W .Write (b [_gbd :_bab ]);if _cbbf !=nil {return _eec +_cbb ,_cbbf ;};_eec +=_cbb ;_ ,_cbbf =_fbad .W .Write (_abea );if _cbbf !=nil {return _eec ,_cbbf ;};_eec +=3;for _gdb :=_bab +2;_gdb < len (b )&&b [_gdb ]!='>';_gdb ++{_eec ++;_gbd =_gdb +2;_bab =_gbd ;};};};_dgef ,_bdb :=_fbad .W .Write (b [_gbd :]);return _dgef +_eec ,_bdb ;};func (_cag *DecodeMap )RecordIndex (path string ,idx int ){_cag ._d [path ]=idx };
// 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 ;};
func (_abf *DecodeMap )Decode (files []*_ab .File )error {_bbf :=1;for _bbf > 0{for len (_abf ._cf )> 0{_fdc :=_abf ._cf [len (_abf ._cf )-1];_abf ._cf =_abf ._cf [0:len (_abf ._cf )-1];_fb :=_fdc .Ifc .(*_gcd .Relationships );for _ ,_dd :=range _fb .Relationship {_cdf ,_ :=_abf ._aa [_fb ];_abf ._be (_abf ,_cdf +_dd .TargetAttr ,_dd .TypeAttr ,files ,_dd ,_fdc );};};for _db ,_ec :=range files {if _ec ==nil {continue ;};if _af ,_ace :=_abf ._fg [_ec .Name ];_ace {delete (_abf ._fg ,_ec .Name );if _eg :=Decode (_ec ,_af .Ifc );_eg !=nil {return _eg ;};files [_db ]=nil ;if _cc ,_cda :=_af .Ifc .(*_gcd .Relationships );_cda {_abf ._cf =append (_abf ._cf ,_af );_cfe ,_ :=_ba .Split (_ba .Clean (_ec .Name +"\u002f\u002e\u002e\u002f"));_abf ._aa [_cc ]=_cfe ;_bbf ++;};};};_bbf --;};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 ;};
func ExtractToDiskTmp (f *_ab .File ,path string )(string ,error ){_ea ,_bdc :=_ee .TempFile (path ,"\u007a\u007a");if _bdc !=nil {return "",_bdc ;};defer _ea .Close ();_fdg ,_bdc :=f .Open ();if _bdc !=nil {return "",_bdc ;};defer _fdg .Close ();_ ,_bdc =_gc .Copy (_ea ,_fdg );if _bdc !=nil {return "",_bdc ;};return _ea .Name (),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 (_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";
func (_aef *DecodeMap )AddTarget (filePath string ,ifc interface{},sourceFileType string ,idx uint32 )bool {if _aef ._fg ==nil {_aef ._fg =make (map[string ]Target );_aef ._aa =make (map[*_gcd .Relationships ]string );_aef ._caf =make (map[string ]struct{});_aef ._d =make (map[string ]int );};_bb :=_ba .Clean (filePath );if _ ,_fd :=_aef ._caf [_bb ];_fd {return false ;};_aef ._caf [_bb ]=struct{}{};_aef ._fg [_bb ]=Target {Path :filePath ,Typ :sourceFileType ,Ifc :ifc ,Index :idx };return true ;};
// SelfClosingWriter wraps a writer and replaces XML tags of the
// type <foo></foo> with <foo/>
type SelfClosingWriter struct{W _gd .Writer ;};
// DecodeMap is used to walk a tree of relationships, decoding files and passing
// control back to the document.
type DecodeMap struct{_fg map[string ]Target ;_aa map[*_gcd .Relationships ]string ;_cf []Target ;_be OnNewRelationshipFunc ;_caf map[string ]struct{};_d map[string ]int ;};func (_cd *DecodeMap )IndexFor (path string )int {return _cd ._d [path ]};
// 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 ;};
// MarshalXML creates a file inside of a zip and marshals an object as xml, prefixing it
// with a standard XML header.
func MarshalXML (z *_ab .Writer ,filename string ,v interface{})error {_fge :=&_ab .FileHeader {};_fge .Method =_ab .Deflate ;_fge .Name =filename ;_fge .SetModTime (_g .Now ());_bf ,_fe :=z .CreateHeader (_fge );if _fe !=nil {return _bd .Errorf ("\u0063\u0072\u0065\u0061ti\u006e\u0067\u0020\u0025\u0073\u0020\u0069\u006e\u0020\u007a\u0069\u0070\u003a\u0020%\u0073",filename ,_fe );};_ ,_fe =_bf .Write ([]byte (XMLHeader ));if _fe !=nil {return _bd .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 ,_fe );};if _fe =_c .NewEncoder (SelfClosingWriter {_bf }).Encode (v );_fe !=nil {return _bd .Errorf ("\u006d\u0061\u0072\u0073\u0068\u0061\u006c\u0069\u006e\u0067\u0020\u0025s\u003a\u0020\u0025\u0073",filename ,_fe );};_ ,_fe =_bf .Write (_bec );return _fe ;};var _abea =[]byte {'/','>'};func MarshalXMLByType (z *_ab .Writer ,dt _cb .DocType ,typ string ,v interface{})error {_gfeb :=_cb .AbsoluteFilename (dt ,typ ,0);return MarshalXML (z ,_gfeb ,v );};func MarshalXMLByTypeIndex (z *_ab .Writer ,dt _cb .DocType ,typ string ,idx int ,v interface{})error {_ddg :=_cb .AbsoluteFilename (dt ,typ ,idx );return MarshalXML (z ,_ddg ,v );};
// SetOnNewRelationshipFunc sets the function to be called when a new
// relationship has been discovered.
func (_fgf *DecodeMap )SetOnNewRelationshipFunc (fn OnNewRelationshipFunc ){_fgf ._be =fn };