Merge pull request #466 from unidoc-build/prep-rc-v1.19.0

prepare release 1.19.0
This commit is contained in:
Gunnsteinn Hall 2022-04-09 15:35:39 +00:00 committed by GitHub
commit e7ef58899b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
59 changed files with 24954 additions and 24915 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 _f "strconv";func RepeatString (s string ,cnt int )string {if cnt <=0{return "";};_ag :=make ([]byte ,len (s )*cnt );_fce :=[]byte (s );for _e :=0;_e < cnt ;_e ++{copy (_ag [_e :],_fce );};return string (_ag );};func _g (_a byte )bool {return _a >='0'&&_a <='9'};
package algo ;import _g "strconv";func _a (_d byte )bool {return _d >='0'&&_d <='9'};func RepeatString (s string ,cnt int )string {if cnt <=0{return "";};_ac :=make ([]byte ,len (s )*cnt );_gf :=[]byte (s );for _gd :=0;_gd < cnt ;_gd ++{copy (_ac [_gd :],_gf );};return string (_ac );};
// NaturalLess compares two strings in a human manner so rId2 sorts less than rId10
func NaturalLess (lhs ,rhs string )bool {_cg ,_d :=0,0;for _cg < len (lhs )&&_d < len (rhs ){_fc :=lhs [_cg ];_cd :=rhs [_d ];_af :=_g (_fc );_ce :=_g (_cd );switch {case _af &&!_ce :return true ;case !_af &&_ce :return false ;case !_af &&!_ce :if _fc !=_cd {return _fc < _cd ;};_cg ++;_d ++;default:_dc :=_cg +1;_df :=_d +1;for _dc < len (lhs )&&_g (lhs [_dc ]){_dc ++;};for _df < len (rhs )&&_g (rhs [_df ]){_df ++;};_aff ,_ :=_f .ParseUint (lhs [_cg :_dc ],10,64);_b ,_ :=_f .ParseUint (rhs [_cg :_df ],10,64);if _aff !=_b {return _aff < _b ;};_cg =_dc ;_d =_df ;};};return len (lhs )< len (rhs );};
func NaturalLess (lhs ,rhs string )bool {_c ,_ad :=0,0;for _c < len (lhs )&&_ad < len (rhs ){_e :=lhs [_c ];_b :=rhs [_ad ];_ef :=_a (_e );_cb :=_a (_b );switch {case _ef &&!_cb :return true ;case !_ef &&_cb :return false ;case !_ef &&!_cb :if _e !=_b {return _e < _b ;};_c ++;_ad ++;default:_fb :=_c +1;_be :=_ad +1;for _fb < len (lhs )&&_a (lhs [_fb ]){_fb ++;};for _be < len (rhs )&&_a (rhs [_be ]){_be ++;};_bb ,_ :=_g .ParseUint (lhs [_c :_fb ],10,64);_cbe ,_ :=_g .ParseUint (rhs [_c :_be ],10,64);if _bb !=_cbe {return _bb < _cbe ;};_c =_fb ;_ad =_be ;};};return len (lhs )< len (rhs );};

View File

@ -9,523 +9,523 @@
// Use of this source code is governed by the UniDoc End User License Agreement
// terms that can be accessed at https://unidoc.io/eula/
package chart ;import (_d "fmt";_c "github.com/unidoc/unioffice";_fa "github.com/unidoc/unioffice/color";_af "github.com/unidoc/unioffice/drawing";_b "github.com/unidoc/unioffice/measurement";_e "github.com/unidoc/unioffice/schema/soo/dml";_f "github.com/unidoc/unioffice/schema/soo/dml/chart";_ag "math/rand";);
package chart ;import (_b "fmt";_f "github.com/unidoc/unioffice";_cf "github.com/unidoc/unioffice/color";_bc "github.com/unidoc/unioffice/drawing";_d "github.com/unidoc/unioffice/measurement";_g "github.com/unidoc/unioffice/schema/soo/dml";_c "github.com/unidoc/unioffice/schema/soo/dml/chart";_dd "math/rand";);
// AddArea3DChart adds a new area chart to a chart.
func (_eeg Chart )AddArea3DChart ()Area3DChart {_fbc (_eeg ._cfad .Chart );_efe :=_f .NewCT_PlotAreaChoice ();_eeg ._cfad .Chart .PlotArea .Choice =append (_eeg ._cfad .Chart .PlotArea .Choice ,_efe );_efe .Area3DChart =_f .NewCT_Area3DChart ();_efd :=Area3DChart {_da :_efe .Area3DChart };_efd .InitializeDefaults ();return _efd ;};func (_gff CategoryAxis )SetMinorTickMark (m _f .ST_TickMark ){if m ==_f .ST_TickMarkUnset {_gff ._gfb .MinorTickMark =nil ;}else {_gff ._gfb .MinorTickMark =_f .NewCT_TickMark ();_gff ._gfb .MinorTickMark .ValAttr =m ;};};func (_gcdb SurfaceChartSeries )CategoryAxis ()CategoryAxisDataSource {if _gcdb ._bfe .Cat ==nil {_gcdb ._bfe .Cat =_f .NewCT_AxDataSource ();};return MakeAxisDataSource (_gcdb ._bfe .Cat );};func (_add LineChartSeries )SetSmooth (b bool ){_add ._eee .Smooth =_f .NewCT_Boolean ();_add ._eee .Smooth .ValAttr =&b ;};type CategoryAxis struct{_gfb *_f .CT_CatAx };func (_adab DataLabels )SetShowPercent (b bool ){_adab .ensureChoice ();_adab ._aeg .Choice .ShowPercent =_f .NewCT_Boolean ();_adab ._aeg .Choice .ShowPercent .ValAttr =_c .Bool (b );};func (_ccab SurfaceChartSeries )Values ()NumberDataSource {if _ccab ._bfe .Val ==nil {_ccab ._bfe .Val =_f .NewCT_NumDataSource ();};_gea :=MakeNumberDataSource (_ccab ._bfe .Val );_gea .CreateEmptyNumberCache ();return _gea ;};
// AddSeries adds a default series to a bar chart.
func (_fe Bar3DChart )AddSeries ()BarChartSeries {_ec :=_fe .nextColor (len (_fe ._ef .Ser ));_ff :=_f .NewCT_BarSer ();_fe ._ef .Ser =append (_fe ._ef .Ser ,_ff );_ff .Idx .ValAttr =uint32 (len (_fe ._ef .Ser )-1);_ff .Order .ValAttr =uint32 (len (_fe ._ef .Ser )-1);_fga :=BarChartSeries {_ff };_fga .InitializeDefaults ();_fga .Properties ().SetSolidFill (_ec );return _fga ;};
// X returns the inner wrapped XML type.
func (_baag PieChart )X ()*_f .CT_PieChart {return _baag ._gbf };func (_fgcg DateAxis )SetTickLabelPosition (p _f .ST_TickLblPos ){if p ==_f .ST_TickLblPosUnset {_fgcg ._geee .TickLblPos =nil ;}else {_fgcg ._geee .TickLblPos =_f .NewCT_TickLblPos ();_fgcg ._geee .TickLblPos .ValAttr =p ;};};
// CategoryAxis returns the category data source.
func (_bb BarChartSeries )CategoryAxis ()CategoryAxisDataSource {if _bb ._bad .Cat ==nil {_bb ._bad .Cat =_f .NewCT_AxDataSource ();};return MakeAxisDataSource (_bb ._bad .Cat );};func (_gfgee Title )SetText (s string ){if _gfgee ._dgf .Tx ==nil {_gfgee ._dgf .Tx =_f .NewCT_Tx ();};if _gfgee ._dgf .Tx .Choice .Rich ==nil {_gfgee ._dgf .Tx .Choice .Rich =_e .NewCT_TextBody ();};var _fce *_e .CT_TextParagraph ;if len (_gfgee ._dgf .Tx .Choice .Rich .P )==0{_fce =_e .NewCT_TextParagraph ();_gfgee ._dgf .Tx .Choice .Rich .P =[]*_e .CT_TextParagraph {_fce };}else {_fce =_gfgee ._dgf .Tx .Choice .Rich .P [0];};var _bcbb *_e .EG_TextRun ;if len (_fce .EG_TextRun )==0{_bcbb =_e .NewEG_TextRun ();_fce .EG_TextRun =[]*_e .EG_TextRun {_bcbb };}else {_bcbb =_fce .EG_TextRun [0];};if _bcbb .R ==nil {_bcbb .R =_e .NewCT_RegularTextRun ();};_bcbb .R .T =s ;};func (_fbg CategoryAxis )SetPosition (p _f .ST_AxPos ){_fbg ._gfb .AxPos =_f .NewCT_AxPos ();_fbg ._gfb .AxPos .ValAttr =p ;};
// X returns the inner wrapped XML type.
func (_abf Line3DChart )X ()*_f .CT_Line3DChart {return _abf ._ddc };
// InitializeDefaults initializes an Pie series to the default values.
func (_fdb PieChartSeries )InitializeDefaults (){};
// AreaChartSeries is a series to be used on an area chart.
type AreaChartSeries struct{_fg *_f .CT_AreaSer };
// SetOrder sets the order of the series
func (_ggd SurfaceChartSeries )SetOrder (idx uint32 ){_ggd ._bfe .Order .ValAttr =idx };
// Bar3DChart is a 3D bar chart.
type Bar3DChart struct{chartBase ;_ef *_f .CT_Bar3DChart ;};type DataLabels struct{_aeg *_f .CT_DLbls };func (_gb CategoryAxis )MajorGridLines ()GridLines {if _gb ._gfb .MajorGridlines ==nil {_gb ._gfb .MajorGridlines =_f .NewCT_ChartLines ();};return GridLines {_gb ._gfb .MajorGridlines };};
// X returns the inner wrapped XML type.
func (_bfb ScatterChartSeries )X ()*_f .CT_ScatterSer {return _bfb ._abd };func (_ged nullAxis )AxisID ()uint32 {return 0};
// X returns the inner wrapped XML type.
func (_fdgc Chart )X ()*_f .ChartSpace {return _fdgc ._cfad };
// Values returns the bubble size data source.
func (_cfa BubbleChartSeries )BubbleSizes ()NumberDataSource {if _cfa ._agca .BubbleSize ==nil {_cfa ._agca .BubbleSize =_f .NewCT_NumDataSource ();};return MakeNumberDataSource (_cfa ._agca .BubbleSize );};
// Marker returns the marker properties.
func (_be LineChartSeries )Marker ()Marker {if _be ._eee .Marker ==nil {_be ._eee .Marker =_f .NewCT_Marker ();};return MakeMarker (_be ._eee .Marker );};func (_gdf LineChartSeries )CategoryAxis ()CategoryAxisDataSource {if _gdf ._eee .Cat ==nil {_gdf ._eee .Cat =_f .NewCT_AxDataSource ();};return MakeAxisDataSource (_gdf ._eee .Cat );};func (_ggc Chart )AddSeriesAxis ()SeriesAxis {_agg :=_f .NewCT_SerAx ();if _ggc ._cfad .Chart .PlotArea .CChoice ==nil {_ggc ._cfad .Chart .PlotArea .CChoice =_f .NewCT_PlotAreaChoice1 ();};_agg .AxId =_f .NewCT_UnsignedInt ();_agg .AxId .ValAttr =0x7FFFFFFF&_ag .Uint32 ();_ggc ._cfad .Chart .PlotArea .CChoice .SerAx =append (_ggc ._cfad .Chart .PlotArea .CChoice .SerAx ,_agg );_agg .Delete =_f .NewCT_Boolean ();_agg .Delete .ValAttr =_c .Bool (false );_bcde :=MakeSeriesAxis (_agg );_bcde .InitializeDefaults ();return _bcde ;};
// AddValueAxis adds a value axis to the chart.
func (_fgc Chart )AddValueAxis ()ValueAxis {_cfec :=_f .NewCT_ValAx ();if _fgc ._cfad .Chart .PlotArea .CChoice ==nil {_fgc ._cfad .Chart .PlotArea .CChoice =_f .NewCT_PlotAreaChoice1 ();};_cfec .AxId =_f .NewCT_UnsignedInt ();_cfec .AxId .ValAttr =0x7FFFFFFF&_ag .Uint32 ();_fgc ._cfad .Chart .PlotArea .CChoice .ValAx =append (_fgc ._cfad .Chart .PlotArea .CChoice .ValAx ,_cfec );_cfec .Delete =_f .NewCT_Boolean ();_cfec .Delete .ValAttr =_c .Bool (false );_cfec .Scaling =_f .NewCT_Scaling ();_cfec .Scaling .Orientation =_f .NewCT_Orientation ();_cfec .Scaling .Orientation .ValAttr =_f .ST_OrientationMinMax ;_cfec .Choice =&_f .EG_AxSharedChoice {};_cfec .Choice .Crosses =_f .NewCT_Crosses ();_cfec .Choice .Crosses .ValAttr =_f .ST_CrossesAutoZero ;_cfec .CrossBetween =_f .NewCT_CrossBetween ();_cfec .CrossBetween .ValAttr =_f .ST_CrossBetweenBetween ;_dbc :=MakeValueAxis (_cfec );_dbc .MajorGridLines ().Properties ().LineProperties ().SetSolidFill (_fa .LightGray );_dbc .SetMajorTickMark (_f .ST_TickMarkOut );_dbc .SetMinorTickMark (_f .ST_TickMarkIn );_dbc .SetTickLabelPosition (_f .ST_TickLblPosNextTo );_dbc .Properties ().LineProperties ().SetSolidFill (_fa .Black );_dbc .SetPosition (_f .ST_AxPosL );return _dbc ;};
// SetValues sets values directly on a source.
func (_gba NumberDataSource )SetValues (v []float64 ){_gba .ensureChoice ();_gba ._gbe .Choice .NumRef =nil ;_gba ._gbe .Choice .NumLit =_f .NewCT_NumData ();_gba ._gbe .Choice .NumLit .PtCount =_f .NewCT_UnsignedInt ();_gba ._gbe .Choice .NumLit .PtCount .ValAttr =uint32 (len (v ));for _dggd ,_ebc :=range v {_gba ._gbe .Choice .NumLit .Pt =append (_gba ._gbe .Choice .NumLit .Pt ,&_f .CT_NumVal {IdxAttr :uint32 (_dggd ),V :_d .Sprintf ("\u0025\u0067",_ebc )});};};
// AddSeries adds a default series to an Pie chart.
func (_eegc PieOfPieChart )AddSeries ()PieChartSeries {_acbf :=_f .NewCT_PieSer ();_eegc ._cge .Ser =append (_eegc ._cge .Ser ,_acbf );_acbf .Idx .ValAttr =uint32 (len (_eegc ._cge .Ser )-1);_acbf .Order .ValAttr =uint32 (len (_eegc ._cge .Ser )-1);_gda :=PieChartSeries {_acbf };_gda .InitializeDefaults ();return _gda ;};
// X returns the inner wrapped XML type.
func (_bgg RadarChartSeries )X ()*_f .CT_RadarSer {return _bgg ._abe };func (_gggc GridLines )Properties ()_af .ShapeProperties {if _gggc ._aee .SpPr ==nil {_gggc ._aee .SpPr =_e .NewCT_ShapeProperties ();};return _af .MakeShapeProperties (_gggc ._aee .SpPr );};
// PieOfPieChart is a Pie chart with an extra Pie chart.
type PieOfPieChart struct{chartBase ;_cge *_f .CT_OfPieChart ;};
// AddAxis adds an axis to a line chart.
func (_fgg Line3DChart )AddAxis (axis Axis ){_bdb :=_f .NewCT_UnsignedInt ();_bdb .ValAttr =axis .AxisID ();_fgg ._ddc .AxId =append (_fgg ._ddc .AxId ,_bdb );};func (_bfa NumberDataSource )ensureChoice (){if _bfa ._gbe .Choice ==nil {_bfa ._gbe .Choice =_f .NewCT_NumDataSourceChoice ();};};
// AddBubbleChart adds a new bubble chart.
func (_dea Chart )AddBubbleChart ()BubbleChart {_egd :=_f .NewCT_PlotAreaChoice ();_dea ._cfad .Chart .PlotArea .Choice =append (_dea ._cfad .Chart .PlotArea .Choice ,_egd );_egd .BubbleChart =_f .NewCT_BubbleChart ();_dcc :=BubbleChart {_efb :_egd .BubbleChart };_dcc .InitializeDefaults ();return _dcc ;};func (_fdg CategoryAxis )AxisID ()uint32 {return _fdg ._gfb .AxId .ValAttr };
// AddDoughnutChart adds a new doughnut (pie with a hole in the center) chart to a chart.
func (_ceaf Chart )AddDoughnutChart ()DoughnutChart {_cacc :=_f .NewCT_PlotAreaChoice ();_ceaf ._cfad .Chart .PlotArea .Choice =append (_ceaf ._cfad .Chart .PlotArea .Choice ,_cacc );_cacc .DoughnutChart =_f .NewCT_DoughnutChart ();_gde :=DoughnutChart {_gcef :_cacc .DoughnutChart };_gde .InitializeDefaults ();return _gde ;};
// AddCategoryAxis adds a category axis.
func (_gcd Chart )AddCategoryAxis ()CategoryAxis {_fab :=_f .NewCT_CatAx ();if _gcd ._cfad .Chart .PlotArea .CChoice ==nil {_gcd ._cfad .Chart .PlotArea .CChoice =_f .NewCT_PlotAreaChoice1 ();};_fab .AxId =_f .NewCT_UnsignedInt ();_fab .AxId .ValAttr =0x7FFFFFFF&_ag .Uint32 ();_gcd ._cfad .Chart .PlotArea .CChoice .CatAx =append (_gcd ._cfad .Chart .PlotArea .CChoice .CatAx ,_fab );_fab .Auto =_f .NewCT_Boolean ();_fab .Auto .ValAttr =_c .Bool (true );_fab .Delete =_f .NewCT_Boolean ();_fab .Delete .ValAttr =_c .Bool (false );_agf :=MakeCategoryAxis (_fab );_agf .InitializeDefaults ();return _agf ;};
// X returns the inner wrapped XML type.
func (_eae PieChartSeries )X ()*_f .CT_PieSer {return _eae ._dafg };
// Properties returns the bar chart series shape properties.
func (_bcccd RadarChartSeries )Properties ()_af .ShapeProperties {if _bcccd ._abe .SpPr ==nil {_bcccd ._abe .SpPr =_e .NewCT_ShapeProperties ();};return _af .MakeShapeProperties (_bcccd ._abe .SpPr );};func MakeMarker (x *_f .CT_Marker )Marker {return Marker {x }};
// Area3DChart is an area chart that has a shaded area underneath a curve.
type Area3DChart struct{chartBase ;_da *_f .CT_Area3DChart ;};
// X returns the inner wrapped XML type.
func (_ceed SurfaceChart )X ()*_f .CT_SurfaceChart {return _ceed ._aaaa };
// AddSeries adds a default series to a Bubble chart.
func (_dg BubbleChart )AddSeries ()BubbleChartSeries {_gf :=_dg .nextColor (len (_dg ._efb .Ser ));_cac :=_f .NewCT_BubbleSer ();_dg ._efb .Ser =append (_dg ._efb .Ser ,_cac );_cac .Idx .ValAttr =uint32 (len (_dg ._efb .Ser )-1);_cac .Order .ValAttr =uint32 (len (_dg ._efb .Ser )-1);_bc :=BubbleChartSeries {_cac };_bc .InitializeDefaults ();_bc .Properties ().SetSolidFill (_gf );return _bc ;};
// AddSurfaceChart adds a new surface chart to a chart.
func (_db Chart )AddSurfaceChart ()SurfaceChart {_aaa :=_f .NewCT_PlotAreaChoice ();_db ._cfad .Chart .PlotArea .Choice =append (_db ._cfad .Chart .PlotArea .Choice ,_aaa );_aaa .SurfaceChart =_f .NewCT_SurfaceChart ();_fbc (_db ._cfad .Chart );_db ._cfad .Chart .View3D .RotX .ValAttr =_c .Int8 (90);_db ._cfad .Chart .View3D .RotY .ValAttr =_c .Uint16 (0);_db ._cfad .Chart .View3D .Perspective =_f .NewCT_Perspective ();_db ._cfad .Chart .View3D .Perspective .ValAttr =_c .Uint8 (0);_ebb :=SurfaceChart {_aaaa :_aaa .SurfaceChart };_ebb .InitializeDefaults ();return _ebb ;};
// Properties returns the chart's shape properties.
func (_acg Chart )Properties ()_af .ShapeProperties {if _acg ._cfad .SpPr ==nil {_acg ._cfad .SpPr =_e .NewCT_ShapeProperties ();};return _af .MakeShapeProperties (_acg ._cfad .SpPr );};type SurfaceChartSeries struct{_bfe *_f .CT_SurfaceSer };
// SetDirection changes the direction of the bar chart (bar or column).
func (_dab BarChart )SetDirection (d _f .ST_BarDir ){_dab ._ed .BarDir .ValAttr =d };
// Order returns the order of the series
func (_fae LineChartSeries )Order ()uint32 {return _fae ._eee .Order .ValAttr };
// SetValues is used to set the source data to a set of values.
func (_dadb CategoryAxisDataSource )SetValues (v []string ){_dadb ._dag .Choice =_f .NewCT_AxDataSourceChoice ();_dadb ._dag .Choice .StrLit =_f .NewCT_StrData ();_dadb ._dag .Choice .StrLit .PtCount =_f .NewCT_UnsignedInt ();_dadb ._dag .Choice .StrLit .PtCount .ValAttr =uint32 (len (v ));for _agce ,_bdd :=range v {_dadb ._dag .Choice .StrLit .Pt =append (_dadb ._dag .Choice .StrLit .Pt ,&_f .CT_StrVal {IdxAttr :uint32 (_agce ),V :_bdd });};};func (_dfgg DateAxis )AxisID ()uint32 {return _dfgg ._geee .AxId .ValAttr };
// Properties returns the bar chart series shape properties.
func (_edc BarChartSeries )Properties ()_af .ShapeProperties {if _edc ._bad .SpPr ==nil {_edc ._bad .SpPr =_e .NewCT_ShapeProperties ();};return _af .MakeShapeProperties (_edc ._bad .SpPr );};
// AddPie3DChart adds a new pie chart to a chart.
func (_geb Chart )AddPie3DChart ()Pie3DChart {_fbc (_geb ._cfad .Chart );_ggfd :=_f .NewCT_PlotAreaChoice ();_geb ._cfad .Chart .PlotArea .Choice =append (_geb ._cfad .Chart .PlotArea .Choice ,_ggfd );_ggfd .Pie3DChart =_f .NewCT_Pie3DChart ();_bcd :=Pie3DChart {_acbg :_ggfd .Pie3DChart };_bcd .InitializeDefaults ();return _bcd ;};
// InitializeDefaults the bar chart to its defaults
func (_ad AreaChart )InitializeDefaults (){};func (_gca SurfaceChart )InitializeDefaults (){_gca ._aaaa .Wireframe =_f .NewCT_Boolean ();_gca ._aaaa .Wireframe .ValAttr =_c .Bool (false );_gca ._aaaa .BandFmts =_f .NewCT_BandFmts ();for _agb :=0;_agb < 15;_agb ++{_dee :=_f .NewCT_BandFmt ();_dee .Idx .ValAttr =uint32 (_agb );_dee .SpPr =_e .NewCT_ShapeProperties ();_ggbg :=_af .MakeShapeProperties (_dee .SpPr );_ggbg .SetSolidFill (_gca .nextColor (_agb ));_gca ._aaaa .BandFmts .BandFmt =append (_gca ._aaaa .BandFmts .BandFmt ,_dee );};};func (_aad Legend )SetPosition (p _f .ST_LegendPos ){if p ==_f .ST_LegendPosUnset {_aad ._bff .LegendPos =nil ;}else {_aad ._bff .LegendPos =_f .NewCT_LegendPos ();_aad ._bff .LegendPos .ValAttr =p ;};};
// X returns the inner wrapped XML type.
func (_cbb ValueAxis )X ()*_f .CT_ValAx {return _cbb ._abdb };
// X returns the inner wrapped XML type.
func (_fad BarChartSeries )X ()*_f .CT_BarSer {return _fad ._bad };
// Order returns the order of the series
func (_edg ScatterChartSeries )Order ()uint32 {return _edg ._abd .Order .ValAttr };
// X returns the inner wrapped XML type.
func (_gad StockChart )X ()*_f .CT_StockChart {return _gad ._cgff };func (_cc Bar3DChart )AddAxis (axis Axis ){_ffg :=_f .NewCT_UnsignedInt ();_ffg .ValAttr =axis .AxisID ();_cc ._ef .AxId =append (_cc ._ef .AxId ,_ffg );};func (_abg DataLabels )SetShowSeriesName (b bool ){_abg .ensureChoice ();_abg ._aeg .Choice .ShowSerName =_f .NewCT_Boolean ();_abg ._aeg .Choice .ShowSerName .ValAttr =_c .Bool (b );};var _fec =[]_fa .Color {_fa .RGB (0x33,0x66,0xcc),_fa .RGB (0xDC,0x39,0x12),_fa .RGB (0xFF,0x99,0x00),_fa .RGB (0x10,0x96,0x18),_fa .RGB (0x99,0x00,0x99),_fa .RGB (0x3B,0x3E,0xAC),_fa .RGB (0x00,0x99,0xC6),_fa .RGB (0xDD,0x44,0x77),_fa .RGB (0x66,0xAA,0x00),_fa .RGB (0xB8,0x2E,0x2E),_fa .RGB (0x31,0x63,0x95),_fa .RGB (0x99,0x44,0x99),_fa .RGB (0x22,0xAA,0x99),_fa .RGB (0xAA,0xAA,0x11),_fa .RGB (0x66,0x33,0xCC),_fa .RGB (0xE6,0x73,0x00),_fa .RGB (0x8B,0x07,0x07),_fa .RGB (0x32,0x92,0x62),_fa .RGB (0x55,0x74,0xA6),_fa .RGB (0x3B,0x3E,0xAC)};
// AddAxis adds an axis to a Scatter chart.
func (_afbb ScatterChart )AddAxis (axis Axis ){_abef :=_f .NewCT_UnsignedInt ();_abef .ValAttr =axis .AxisID ();_afbb ._bdbd .AxId =append (_afbb ._bdbd .AxId ,_abef );};
// X returns the inner wrapped XML type.
func (_gcgca Title )X ()*_f .CT_Title {return _gcgca ._dgf };func (_dcgga SeriesAxis )AxisID ()uint32 {return _dcgga ._fbda .AxId .ValAttr };
// AddScatterChart adds a scatter (X/Y) chart.
func (_dca Chart )AddScatterChart ()ScatterChart {_aea :=_f .NewCT_PlotAreaChoice ();_dca ._cfad .Chart .PlotArea .Choice =append (_dca ._cfad .Chart .PlotArea .Choice ,_aea );_aea .ScatterChart =_f .NewCT_ScatterChart ();_dbg :=ScatterChart {_bdbd :_aea .ScatterChart };_dbg .InitializeDefaults ();return _dbg ;};var NullAxis Axis =nullAxis (0);
// X returns the inner wrapped XML type.
func (_ddb PieOfPieChart )X ()*_f .CT_OfPieChart {return _ddb ._cge };
// ScatterChartSeries is the data series for a scatter chart.
type ScatterChartSeries struct{_fbgg *_c .CT_ScatterSer };
// SetText sets the series text
func (_dcbdf SurfaceChartSeries )SetText (s string ){_dcbdf ._bfe .Tx =_f .NewCT_SerTx ();_dcbdf ._bfe .Tx .Choice .V =&s ;};
// Properties returns the line chart series shape properties.
func (_dbfe LineChartSeries )Properties ()_af .ShapeProperties {if _dbfe ._eee .SpPr ==nil {_dbfe ._eee .SpPr =_e .NewCT_ShapeProperties ();};return _af .MakeShapeProperties (_dbfe ._eee .SpPr );};
// Labels returns the data label properties.
func (_ebdb ScatterChartSeries )Labels ()DataLabels {if _ebdb ._abd .DLbls ==nil {_ebdb ._abd .DLbls =_f .NewCT_DLbls ();};return MakeDataLabels (_ebdb ._abd .DLbls );};func (_dce DateAxis )SetPosition (p _f .ST_AxPos ){_dce ._geee .AxPos =_f .NewCT_AxPos ();_dce ._geee .AxPos .ValAttr =p ;};type Marker struct{_dcg *_f .CT_Marker };
// InitializeDefaults the bar chart to its defaults
func (_gcefb DoughnutChart )InitializeDefaults (){_gcefb ._gcef .VaryColors =_f .NewCT_Boolean ();_gcefb ._gcef .VaryColors .ValAttr =_c .Bool (true );_gcefb ._gcef .HoleSize =_f .NewCT_HoleSize ();_gcefb ._gcef .HoleSize .ValAttr =&_f .ST_HoleSize {};_gcefb ._gcef .HoleSize .ValAttr .ST_HoleSizeUByte =_c .Uint8 (50);};func (_gga Title )RunProperties ()_af .RunProperties {if _gga ._dgf .Tx ==nil {_gga .SetText ("");};if _gga ._dgf .Tx .Choice .Rich .P [0].EG_TextRun [0].R .RPr ==nil {_gga ._dgf .Tx .Choice .Rich .P [0].EG_TextRun [0].R .RPr =_e .NewCT_TextCharacterProperties ();};return _af .MakeRunProperties (_gga ._dgf .Tx .Choice .Rich .P [0].EG_TextRun [0].R .RPr );};func MakeTitle (x *_f .CT_Title )Title {return Title {x }};
// BubbleChart is a 2D Bubble chart.
type BubbleChart struct{chartBase ;_efb *_f .CT_BubbleChart ;};func (_bcbc ValueAxis )SetCrosses (axis Axis ){_bcbc ._abdb .CrossAx .ValAttr =axis .AxisID ()};
// SurfaceChart is a 3D surface chart, viewed from the top-down.
type SurfaceChart struct{chartBase ;_aaaa *_f .CT_SurfaceChart ;};func _fbc (_aaf *_f .CT_Chart ){_aaf .View3D =_f .NewCT_View3D ();_aaf .View3D .RotX =_f .NewCT_RotX ();_aaf .View3D .RotX .ValAttr =_c .Int8 (15);_aaf .View3D .RotY =_f .NewCT_RotY ();_aaf .View3D .RotY .ValAttr =_c .Uint16 (20);_aaf .View3D .RAngAx =_f .NewCT_Boolean ();_aaf .View3D .RAngAx .ValAttr =_c .Bool (false );_aaf .Floor =_f .NewCT_Surface ();_aaf .Floor .Thickness =_f .NewCT_Thickness ();_aaf .Floor .Thickness .ValAttr .Uint32 =_c .Uint32 (0);_aaf .SideWall =_f .NewCT_Surface ();_aaf .SideWall .Thickness =_f .NewCT_Thickness ();_aaf .SideWall .Thickness .ValAttr .Uint32 =_c .Uint32 (0);_aaf .BackWall =_f .NewCT_Surface ();_aaf .BackWall .Thickness =_f .NewCT_Thickness ();_aaf .BackWall .Thickness .ValAttr .Uint32 =_c .Uint32 (0);};func (_dae Title )ParagraphProperties ()_af .ParagraphProperties {if _dae ._dgf .Tx ==nil {_dae .SetText ("");};if _dae ._dgf .Tx .Choice .Rich .P [0].PPr ==nil {_dae ._dgf .Tx .Choice .Rich .P [0].PPr =_e .NewCT_TextParagraphProperties ();};return _af .MakeParagraphProperties (_dae ._dgf .Tx .Choice .Rich .P [0].PPr );};
// AddSeries adds a default series to a Stock chart.
func (_efbg StockChart )AddSeries ()LineChartSeries {_ebfe :=_f .NewCT_LineSer ();_efbg ._cgff .Ser =append (_efbg ._cgff .Ser ,_ebfe );_ebfe .Idx .ValAttr =uint32 (len (_efbg ._cgff .Ser )-1);_ebfe .Order .ValAttr =uint32 (len (_efbg ._cgff .Ser )-1);_fcg :=LineChartSeries {_ebfe };_fcg .Values ().CreateEmptyNumberCache ();_fcg .Properties ().LineProperties ().SetNoFill ();return _fcg ;};func (_ead DataLabels )ensureChoice (){if _ead ._aeg .Choice ==nil {_ead ._aeg .Choice =_f .NewCT_DLblsChoice ();};};func (_gcc DateAxis )MajorGridLines ()GridLines {if _gcc ._geee .MajorGridlines ==nil {_gcc ._geee .MajorGridlines =_f .NewCT_ChartLines ();};return GridLines {_gcc ._geee .MajorGridlines };};
// AddSeries adds a default series to an Pie3D chart.
func (_ebd Pie3DChart )AddSeries ()PieChartSeries {_dcb :=_f .NewCT_PieSer ();_ebd ._acbg .Ser =append (_ebd ._acbg .Ser ,_dcb );_dcb .Idx .ValAttr =uint32 (len (_ebd ._acbg .Ser )-1);_dcb .Order .ValAttr =uint32 (len (_ebd ._acbg .Ser )-1);_cbda :=PieChartSeries {_dcb };_cbda .InitializeDefaults ();return _cbda ;};type Legend struct{_bff *_f .CT_Legend };
// X returns the inner wrapped XML type.
func (_gfe SurfaceChartSeries )X ()*_f .CT_SurfaceSer {return _gfe ._bfe };func (_caf Marker )SetSize (sz uint8 ){_caf ._dcg .Size =_f .NewCT_MarkerSize ();_caf ._dcg .Size .ValAttr =&sz ;};
// SetText sets the series text.
func (_fb BarChartSeries )SetText (s string ){_fb ._bad .Tx =_f .NewCT_SerTx ();_fb ._bad .Tx .Choice .V =&s ;};
// AddSeries adds a default series to an Pie chart.
func (_gcgc PieChart )AddSeries ()PieChartSeries {_bccc :=_f .NewCT_PieSer ();_gcgc ._gbf .Ser =append (_gcgc ._gbf .Ser ,_bccc );_bccc .Idx .ValAttr =uint32 (len (_gcgc ._gbf .Ser )-1);_bccc .Order .ValAttr =uint32 (len (_gcgc ._gbf .Ser )-1);_cddf :=PieChartSeries {_bccc };_cddf .InitializeDefaults ();return _cddf ;};func (_ecc DataLabels )SetShowLeaderLines (b bool ){_ecc .ensureChoice ();_ecc ._aeg .Choice .ShowLeaderLines =_f .NewCT_Boolean ();_ecc ._aeg .Choice .ShowLeaderLines .ValAttr =_c .Bool (b );};func (_bcb DateAxis )Properties ()_af .ShapeProperties {if _bcb ._geee .SpPr ==nil {_bcb ._geee .SpPr =_e .NewCT_ShapeProperties ();};return _af .MakeShapeProperties (_bcb ._geee .SpPr );};
// LineChartSeries is the data series for a line chart.
type LineChartSeries struct{_eee *_f .CT_LineSer };
// X returns the inner wrapped XML type.
func (_dgg BubbleChartSeries )X ()*_f .CT_BubbleSer {return _dgg ._agca };
// CategoryAxis returns the category data source.
func (_ded BubbleChartSeries )CategoryAxis ()CategoryAxisDataSource {if _ded ._agca .XVal ==nil {_ded ._agca .XVal =_f .NewCT_AxDataSource ();};return MakeAxisDataSource (_ded ._agca .XVal );};func MakeSeriesAxis (x *_f .CT_SerAx )SeriesAxis {return SeriesAxis {x }};
// AddAreaChart adds a new area chart to a chart.
func (_bbe Chart )AddAreaChart ()AreaChart {_bga :=_f .NewCT_PlotAreaChoice ();_bbe ._cfad .Chart .PlotArea .Choice =append (_bbe ._cfad .Chart .PlotArea .Choice ,_bga );_bga .AreaChart =_f .NewCT_AreaChart ();_ggb :=AreaChart {_cg :_bga .AreaChart };_ggb .InitializeDefaults ();return _ggb ;};func (_gedd DateAxis )SetCrosses (axis Axis ){_gedd ._geee .CrossAx .ValAttr =axis .AxisID ()};
// SetIndex sets the index of the series
func (_aabg SurfaceChartSeries )SetIndex (idx uint32 ){_aabg ._bfe .Idx .ValAttr =idx };func (_bbgb ValueAxis )SetPosition (p _f .ST_AxPos ){_bbgb ._abdb .AxPos =_f .NewCT_AxPos ();_bbgb ._abdb .AxPos .ValAttr =p ;};func (_fdge DataLabels )SetShowCategoryName (b bool ){_fdge .ensureChoice ();_fdge ._aeg .Choice .ShowCatName =_f .NewCT_Boolean ();_fdge ._aeg .Choice .ShowCatName .ValAttr =_c .Bool (b );};
// Surface3DChart is a 3D view of a surface chart.
type Surface3DChart struct{chartBase ;_dcbd *_f .CT_Surface3DChart ;};func (_eagd DataLabels )SetShowLegendKey (b bool ){_eagd .ensureChoice ();_eagd ._aeg .Choice .ShowLegendKey =_f .NewCT_Boolean ();_eagd ._aeg .Choice .ShowLegendKey .ValAttr =_c .Bool (b );};func (_gc CategoryAxis )Properties ()_af .ShapeProperties {if _gc ._gfb .SpPr ==nil {_gc ._gfb .SpPr =_e .NewCT_ShapeProperties ();};return _af .MakeShapeProperties (_gc ._gfb .SpPr );};
// SetText sets the series text.
func (_baf AreaChartSeries )SetText (s string ){_baf ._fg .Tx =_f .NewCT_SerTx ();_baf ._fg .Tx .Choice .V =&s ;};func (_cdg CategoryAxis )SetMajorTickMark (m _f .ST_TickMark ){if m ==_f .ST_TickMarkUnset {_cdg ._gfb .MajorTickMark =nil ;}else {_cdg ._gfb .MajorTickMark =_f .NewCT_TickMark ();_cdg ._gfb .MajorTickMark .ValAttr =m ;};};type chartBase struct{};
// AddStockChart adds a new stock chart.
func (_gbg Chart )AddStockChart ()StockChart {_fgd :=_f .NewCT_PlotAreaChoice ();_gbg ._cfad .Chart .PlotArea .Choice =append (_gbg ._cfad .Chart .PlotArea .Choice ,_fgd );_fgd .StockChart =_f .NewCT_StockChart ();_ee :=StockChart {_cgff :_fgd .StockChart };_ee .InitializeDefaults ();return _ee ;};
// SetHoleSize controls the hole size in the pie chart and is measured in percent.
func (_aff DoughnutChart )SetHoleSize (pct uint8 ){if _aff ._gcef .HoleSize ==nil {_aff ._gcef .HoleSize =_f .NewCT_HoleSize ();};if _aff ._gcef .HoleSize .ValAttr ==nil {_aff ._gcef .HoleSize .ValAttr =&_f .ST_HoleSize {};};_aff ._gcef .HoleSize .ValAttr .ST_HoleSizeUByte =&pct ;};
// X returns the inner wrapped XML type.
func (_dfa LineChart )X ()*_f .CT_LineChart {return _dfa ._aae };
// BubbleChartSeries is a series to be used on a Bubble chart.
type BubbleChartSeries struct{_agca *_f .CT_BubbleSer };
// AreaChart is an area chart that has a shaded area underneath a curve.
type AreaChart struct{chartBase ;_cg *_f .CT_AreaChart ;};func (_aeea ScatterChartSeries )SetSmooth (b bool ){_aeea ._abd .Smooth =_f .NewCT_Boolean ();_aeea ._abd .Smooth .ValAttr =&b ;};func (_eff LineChartSeries )InitializeDefaults (){_eff .Properties ().LineProperties ().SetWidth (1*_b .Point );_eff .Properties ().LineProperties ().SetSolidFill (_fa .Black );_eff .Properties ().LineProperties ().SetJoin (_af .LineJoinRound );_eff .Marker ().SetSymbol (_f .ST_MarkerStyleNone );_eff .Labels ().SetShowLegendKey (false );_eff .Labels ().SetShowValue (false );_eff .Labels ().SetShowPercent (false );_eff .Labels ().SetShowCategoryName (false );_eff .Labels ().SetShowSeriesName (false );_eff .Labels ().SetShowLeaderLines (false );};
// AddSeries adds a default series to a Surface chart.
func (_ddf SurfaceChart )AddSeries ()SurfaceChartSeries {_effa :=_ddf .nextColor (len (_ddf ._aaaa .Ser ));_bab :=_f .NewCT_SurfaceSer ();_ddf ._aaaa .Ser =append (_ddf ._aaaa .Ser ,_bab );_bab .Idx .ValAttr =uint32 (len (_ddf ._aaaa .Ser )-1);_bab .Order .ValAttr =uint32 (len (_ddf ._aaaa .Ser )-1);_fdd :=SurfaceChartSeries {_bab };_fdd .InitializeDefaults ();_fdd .Properties ().LineProperties ().SetSolidFill (_effa );return _fdd ;};
// X returns the inner wrapped XML type.
func (_fcdb DateAxis )X ()*_f .CT_DateAx {return _fcdb ._geee };func (_ace Marker )Properties ()_af .ShapeProperties {if _ace ._dcg .SpPr ==nil {_ace ._dcg .SpPr =_e .NewCT_ShapeProperties ();};return _af .MakeShapeProperties (_ace ._dcg .SpPr );};
// X returns the inner wrapped XML type.
func (_aa Bar3DChart )X ()*_f .CT_Bar3DChart {return _aa ._ef };
// AddLineChart adds a new line chart to a chart.
func (_adb Chart )AddLineChart ()LineChart {_fac :=_f .NewCT_PlotAreaChoice ();_adb ._cfad .Chart .PlotArea .Choice =append (_adb ._cfad .Chart .PlotArea .Choice ,_fac );_fac .LineChart =_f .NewCT_LineChart ();_fac .LineChart .Grouping =_f .NewCT_Grouping ();_fac .LineChart .Grouping .ValAttr =_f .ST_GroupingStandard ;return LineChart {_aae :_fac .LineChart };};
// SetLabelReference is used to set the source data to a range of cells
// containing strings.
func (_gag CategoryAxisDataSource )SetLabelReference (s string ){_gag ._dag .Choice =_f .NewCT_AxDataSourceChoice ();_gag ._dag .Choice .StrRef =_f .NewCT_StrRef ();_gag ._dag .Choice .StrRef .F =s ;};
// AddSeries adds a default series to a Surface chart.
func (_afg Surface3DChart )AddSeries ()SurfaceChartSeries {_bdf :=_afg .nextColor (len (_afg ._dcbd .Ser ));_eab :=_f .NewCT_SurfaceSer ();_afg ._dcbd .Ser =append (_afg ._dcbd .Ser ,_eab );_eab .Idx .ValAttr =uint32 (len (_afg ._dcbd .Ser )-1);_eab .Order .ValAttr =uint32 (len (_afg ._dcbd .Ser )-1);_cdf :=SurfaceChartSeries {_eab };_cdf .InitializeDefaults ();_cdf .Properties ().LineProperties ().SetSolidFill (_bdf );return _cdf ;};
// InitializeDefaults the bar chart to its defaults
func (_ac BarChart )InitializeDefaults (){_ac .SetDirection (_f .ST_BarDirCol )};type Title struct{_dgf *_f .CT_Title };func (_cfed Marker )SetSymbol (s _f .ST_MarkerStyle ){if s ==_f .ST_MarkerStyleUnset {_cfed ._dcg .Symbol =nil ;}else {_cfed ._dcg .Symbol =_f .NewCT_MarkerStyle ();_cfed ._dcg .Symbol .ValAttr =s ;};};
// AddSeries adds a default series to an area chart.
func (_fc Area3DChart )AddSeries ()AreaChartSeries {_fca :=_fc .nextColor (len (_fc ._da .Ser ));_de :=_f .NewCT_AreaSer ();_fc ._da .Ser =append (_fc ._da .Ser ,_de );_de .Idx .ValAttr =uint32 (len (_fc ._da .Ser )-1);_de .Order .ValAttr =uint32 (len (_fc ._da .Ser )-1);_bg :=AreaChartSeries {_de };_bg .InitializeDefaults ();_bg .Properties ().SetSolidFill (_fca );return _bg ;};
// InitializeDefaults the bar chart to its defaults
func (_caa Pie3DChart )InitializeDefaults (){_caa ._acbg .VaryColors =_f .NewCT_Boolean ();_caa ._acbg .VaryColors .ValAttr =_c .Bool (true );};func (_fea NumberDataSource )SetReference (s string ){_fea .ensureChoice ();if _fea ._gbe .Choice .NumRef ==nil {_fea ._gbe .Choice .NumRef =_f .NewCT_NumRef ();};_fea ._gbe .Choice .NumRef .F =s ;};func (_fbd DateAxis )SetMajorTickMark (m _f .ST_TickMark ){if m ==_f .ST_TickMarkUnset {_fbd ._geee .MajorTickMark =nil ;}else {_fbd ._geee .MajorTickMark =_f .NewCT_TickMark ();_fbd ._geee .MajorTickMark .ValAttr =m ;};};
// BarChartSeries is a series to be used on a bar chart.
type BarChartSeries struct{_bad *_f .CT_BarSer };func (_cbdg ScatterChartSeries )Values ()NumberDataSource {if _cbdg ._abd .YVal ==nil {_cbdg ._abd .YVal =_f .NewCT_NumDataSource ();};return MakeNumberDataSource (_cbdg ._abd .YVal );};
func (_cdga ScatterChartSeries )SetText (s string ){_cdga ._fbgg .Tx =_c .NewCT_SerTx ();_cdga ._fbgg .Tx .Choice .V =&s ;};func (_gdf CategoryAxis )MajorGridLines ()GridLines {if _gdf ._bacf .MajorGridlines ==nil {_gdf ._bacf .MajorGridlines =_c .NewCT_ChartLines ();};return GridLines {_gdf ._bacf .MajorGridlines };};func (_gf Area3DChart )AddAxis (axis Axis ){_ba :=_c .NewCT_UnsignedInt ();_ba .ValAttr =axis .AxisID ();_gf ._dda .AxId =append (_gf ._dda .AxId ,_ba );};type LineChart struct{chartBase ;_bgd *_c .CT_LineChart ;};type DateAxis struct{_efc *_c .CT_DateAx };func MakeValueAxis (x *_c .CT_ValAx )ValueAxis {return ValueAxis {x }};func (_add CategoryAxis )SetCrosses (axis Axis ){_add ._bacf .Choice =_c .NewEG_AxSharedChoice ();_add ._bacf .Choice .Crosses =_c .NewCT_Crosses ();_add ._bacf .Choice .Crosses .ValAttr =_c .ST_CrossesAutoZero ;_add ._bacf .CrossAx .ValAttr =axis .AxisID ();};
// Order returns the order of the series
func (_acfd SurfaceChartSeries )Order ()uint32 {return _acfd ._bfe .Order .ValAttr };
func (_gcca SurfaceChartSeries )Order ()uint32 {return _gcca ._abe .Order .ValAttr };
// AddSeries adds a default series to a Scatter chart.
func (_faf ScatterChart )AddSeries ()ScatterChartSeries {_fbae :=_faf .nextColor (len (_faf ._bdbd .Ser ));_dgc :=_f .NewCT_ScatterSer ();_faf ._bdbd .Ser =append (_faf ._bdbd .Ser ,_dgc );_dgc .Idx .ValAttr =uint32 (len (_faf ._bdbd .Ser )-1);_dgc .Order .ValAttr =uint32 (len (_faf ._bdbd .Ser )-1);_fdbg :=ScatterChartSeries {_dgc };_fdbg .InitializeDefaults ();_fdbg .Marker ().Properties ().LineProperties ().SetSolidFill (_fbae );_fdbg .Marker ().Properties ().SetSolidFill (_fbae );return _fdbg ;};
// AddAreaChart adds a new area chart to a chart.
func (_fg Chart )AddAreaChart ()AreaChart {_aagc :=_c .NewCT_PlotAreaChoice ();_fg ._dgb .Chart .PlotArea .Choice =append (_fg ._dgb .Chart .PlotArea .Choice ,_aagc );_aagc .AreaChart =_c .NewCT_AreaChart ();_fdfg :=AreaChart {_ca :_aagc .AreaChart };_fdfg .InitializeDefaults ();return _fdfg ;};func (_ddc DateAxis )AxisID ()uint32 {return _ddc ._efc .AxId .ValAttr };func (_ece DateAxis )SetMajorTickMark (m _c .ST_TickMark ){if m ==_c .ST_TickMarkUnset {_ece ._efc .MajorTickMark =nil ;}else {_ece ._efc .MajorTickMark =_c .NewCT_TickMark ();_ece ._efc .MajorTickMark .ValAttr =m ;};};type nullAxis byte ;
// MakeAxisDataSource constructs an AxisDataSource wrapper.
func MakeAxisDataSource (x *_f .CT_AxDataSource )CategoryAxisDataSource {return CategoryAxisDataSource {x };};
// AddLegend adds a legend to a chart, replacing any existing legend.
func (_debb Chart )AddLegend ()Legend {_debb ._dgb .Chart .Legend =_c .NewCT_Legend ();_bag :=MakeLegend (_debb ._dgb .Chart .Legend );_bag .InitializeDefaults ();return _bag ;};
// Labels returns the data label properties.
func (_dfac LineChartSeries )Labels ()DataLabels {if _dfac ._eee .DLbls ==nil {_dfac ._eee .DLbls =_f .NewCT_DLbls ();};return MakeDataLabels (_dfac ._eee .DLbls );};func (_edb DataLabels )SetShowValue (b bool ){_edb .ensureChoice ();_edb ._aeg .Choice .ShowVal =_f .NewCT_Boolean ();_edb ._aeg .Choice .ShowVal .ValAttr =_c .Bool (b );};type nullAxis byte ;
// Values returns the value data source.
func (_cdae RadarChartSeries )Values ()NumberDataSource {if _cdae ._dceb .Val ==nil {_cdae ._dceb .Val =_c .NewCT_NumDataSource ();};return MakeNumberDataSource (_cdae ._dceb .Val );};
// InitializeDefaults initializes an Radar series to the default values.
func (_bed RadarChartSeries )InitializeDefaults (){};
// RemoveTitle removes any existing title from the chart.
func (_gfb Chart )RemoveTitle (){_gfb ._dgb .Chart .Title =nil ;_gfb ._dgb .Chart .AutoTitleDeleted =_c .NewCT_Boolean ();_gfb ._dgb .Chart .AutoTitleDeleted .ValAttr =_f .Bool (true );};
// AddSeries adds a default series to an Pie chart.
func (_ecca PieOfPieChart )AddSeries ()PieChartSeries {_debe :=_c .NewCT_PieSer ();_ecca ._ggcd .Ser =append (_ecca ._ggcd .Ser ,_debe );_debe .Idx .ValAttr =uint32 (len (_ecca ._ggcd .Ser )-1);_debe .Order .ValAttr =uint32 (len (_ecca ._ggcd .Ser )-1);_dac :=PieChartSeries {_debe };_dac .InitializeDefaults ();return _dac ;};
// SetText sets the series text.
func (_bgda PieChartSeries )SetText (s string ){_bgda ._dbc .Tx =_c .NewCT_SerTx ();_bgda ._dbc .Tx .Choice .V =&s ;};
// AddStockChart adds a new stock chart.
func (_gcc Chart )AddStockChart ()StockChart {_ag :=_c .NewCT_PlotAreaChoice ();_gcc ._dgb .Chart .PlotArea .Choice =append (_gcc ._dgb .Chart .PlotArea .Choice ,_ag );_ag .StockChart =_c .NewCT_StockChart ();_ege :=StockChart {_bfa :_ag .StockChart };_ege .InitializeDefaults ();return _ege ;};
// Properties returns the Bubble chart series shape properties.
func (_ad BubbleChartSeries )Properties ()_bc .ShapeProperties {if _ad ._eae .SpPr ==nil {_ad ._eae .SpPr =_g .NewCT_ShapeProperties ();};return _bc .MakeShapeProperties (_ad ._eae .SpPr );};
// AddSeries adds a default series to an area chart.
func (_fc AreaChart )AddSeries ()AreaChartSeries {_bad :=_fc .nextColor (len (_fc ._ca .Ser ));_gc :=_c .NewCT_AreaSer ();_fc ._ca .Ser =append (_fc ._ca .Ser ,_gc );_gc .Idx .ValAttr =uint32 (len (_fc ._ca .Ser )-1);_gc .Order .ValAttr =uint32 (len (_fc ._ca .Ser )-1);_de :=AreaChartSeries {_gc };_de .InitializeDefaults ();_de .Properties ().SetSolidFill (_bad );return _de ;};
// X returns the inner wrapped XML type.
func (_ffe GridLines )X ()*_c .CT_ChartLines {return _ffe ._bda };
// Values returns the value data source.
func (_ae AreaChartSeries )Values ()NumberDataSource {if _ae ._eg .Val ==nil {_ae ._eg .Val =_c .NewCT_NumDataSource ();};return MakeNumberDataSource (_ae ._eg .Val );};func (_baad Title )ParagraphProperties ()_bc .ParagraphProperties {if _baad ._eafe .Tx ==nil {_baad .SetText ("");};if _baad ._eafe .Tx .Choice .Rich .P [0].PPr ==nil {_baad ._eafe .Tx .Choice .Rich .P [0].PPr =_g .NewCT_TextParagraphProperties ();};return _bc .MakeParagraphProperties (_baad ._eafe .Tx .Choice .Rich .P [0].PPr );};func (_eeb Legend )Properties ()_bc .ShapeProperties {if _eeb ._gfe .SpPr ==nil {_eeb ._gfe .SpPr =_g .NewCT_ShapeProperties ();};return _bc .MakeShapeProperties (_eeb ._gfe .SpPr );};type Marker struct{_afb *_c .CT_Marker };
// AddRadarChart adds a new radar chart to a chart.
func (_ecb Chart )AddRadarChart ()RadarChart {_fea :=_c .NewCT_PlotAreaChoice ();_ecb ._dgb .Chart .PlotArea .Choice =append (_ecb ._dgb .Chart .PlotArea .Choice ,_fea );_fea .RadarChart =_c .NewCT_RadarChart ();_be :=RadarChart {_ede :_fea .RadarChart };_be .InitializeDefaults ();return _be ;};func (_agc NumberDataSource )SetReference (s string ){_agc .ensureChoice ();if _agc ._badd .Choice .NumRef ==nil {_agc ._badd .Choice .NumRef =_c .NewCT_NumRef ();};_agc ._badd .Choice .NumRef .F =s ;};
// Index returns the index of the series
func (_aaab ScatterChartSeries )Index ()uint32 {return _aaab ._fbgg .Idx .ValAttr };
// X returns the inner wrapped XML type.
func (_gedf ValueAxis )X ()*_c .CT_ValAx {return _gedf ._ffga };
// Surface3DChart is a 3D view of a surface chart.
type Surface3DChart struct{chartBase ;_egae *_c .CT_Surface3DChart ;};func MakeChart (x *_c .ChartSpace )Chart {return Chart {x }};
// Properties returns the line chart series shape properties.
func (_fcee ScatterChartSeries )Properties ()_bc .ShapeProperties {if _fcee ._fbgg .SpPr ==nil {_fcee ._fbgg .SpPr =_g .NewCT_ShapeProperties ();};return _bc .MakeShapeProperties (_fcee ._fbgg .SpPr );};
// Values returns the value data source.
func (_ed BarChartSeries )Values ()NumberDataSource {if _ed ._aaf .Val ==nil {_ed ._aaf .Val =_c .NewCT_NumDataSource ();};return MakeNumberDataSource (_ed ._aaf .Val );};
// X returns the inner wrapped XML type.
func (_fbed DateAxis )X ()*_c .CT_DateAx {return _fbed ._efc };type SeriesAxis struct{_gdfa *_c .CT_SerAx };
// AddSeries adds a default series to a Bubble chart.
func (_fdb BubbleChart )AddSeries ()BubbleChartSeries {_egc :=_fdb .nextColor (len (_fdb ._ea .Ser ));_bfe :=_c .NewCT_BubbleSer ();_fdb ._ea .Ser =append (_fdb ._ea .Ser ,_bfe );_bfe .Idx .ValAttr =uint32 (len (_fdb ._ea .Ser )-1);_bfe .Order .ValAttr =uint32 (len (_fdb ._ea .Ser )-1);_da :=BubbleChartSeries {_bfe };_da .InitializeDefaults ();_da .Properties ().SetSolidFill (_egc );return _da ;};
// 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{_faad *_c .CT_AxDataSource };
// Marker returns the marker properties.
func (_ebdd LineChartSeries )Marker ()Marker {if _ebdd ._gaa .Marker ==nil {_ebdd ._gaa .Marker =_c .NewCT_Marker ();};return MakeMarker (_ebdd ._gaa .Marker );};
// SetText sets the series text.
func (_df BubbleChartSeries )SetText (s string ){_df ._eae .Tx =_c .NewCT_SerTx ();_df ._eae .Tx .Choice .V =&s ;};func (_dfbbf ScatterChartSeries )CategoryAxis ()CategoryAxisDataSource {if _dfbbf ._fbgg .XVal ==nil {_dfbbf ._fbgg .XVal =_c .NewCT_AxDataSource ();};return MakeAxisDataSource (_dfbbf ._fbgg .XVal );};func (_bab Title )SetText (s string ){if _bab ._eafe .Tx ==nil {_bab ._eafe .Tx =_c .NewCT_Tx ();};if _bab ._eafe .Tx .Choice .Rich ==nil {_bab ._eafe .Tx .Choice .Rich =_g .NewCT_TextBody ();};var _deef *_g .CT_TextParagraph ;if len (_bab ._eafe .Tx .Choice .Rich .P )==0{_deef =_g .NewCT_TextParagraph ();_bab ._eafe .Tx .Choice .Rich .P =[]*_g .CT_TextParagraph {_deef };}else {_deef =_bab ._eafe .Tx .Choice .Rich .P [0];};var _gbd *_g .EG_TextRun ;if len (_deef .EG_TextRun )==0{_gbd =_g .NewEG_TextRun ();_deef .EG_TextRun =[]*_g .EG_TextRun {_gbd };}else {_gbd =_deef .EG_TextRun [0];};if _gbd .R ==nil {_gbd .R =_g .NewCT_RegularTextRun ();};_gbd .R .T =s ;};
// Axis is the interface implemented by different axes when assigning to a
// chart.
type Axis interface{AxisID ()uint32 ;};
// AddSeries adds a default series to an area chart.
func (_cd AreaChart )AddSeries ()AreaChartSeries {_gg :=_cd .nextColor (len (_cd ._cg .Ser ));_df :=_f .NewCT_AreaSer ();_cd ._cg .Ser =append (_cd ._cg .Ser ,_df );_df .Idx .ValAttr =uint32 (len (_cd ._cg .Ser )-1);_df .Order .ValAttr =uint32 (len (_cd ._cg .Ser )-1);_ge :=AreaChartSeries {_df };_ge .InitializeDefaults ();_ge .Properties ().SetSolidFill (_gg );return _ge ;};
// SetText sets the series text.
func (_bee RadarChartSeries )SetText (s string ){_bee ._abe .Tx =_f .NewCT_SerTx ();_bee ._abe .Tx .Choice .V =&s ;};func (_gcg Legend )Properties ()_af .ShapeProperties {if _gcg ._bff .SpPr ==nil {_gcg ._bff .SpPr =_e .NewCT_ShapeProperties ();};return _af .MakeShapeProperties (_gcg ._bff .SpPr );};
// CategoryAxis returns the category data source.
func (_aab PieChartSeries )CategoryAxis ()CategoryAxisDataSource {if _aab ._dafg .Cat ==nil {_aab ._dafg .Cat =_f .NewCT_AxDataSource ();};return MakeAxisDataSource (_aab ._dafg .Cat );};
// X returns the inner wrapped XML type.
func (_cacd SeriesAxis )X ()*_f .CT_SerAx {return _cacd ._fbda };type DateAxis struct{_geee *_f .CT_DateAx };
// AddRadarChart adds a new radar chart to a chart.
func (_aec Chart )AddRadarChart ()RadarChart {_cfc :=_f .NewCT_PlotAreaChoice ();_aec ._cfad .Chart .PlotArea .Choice =append (_aec ._cfad .Chart .PlotArea .Choice ,_cfc );_cfc .RadarChart =_f .NewCT_RadarChart ();_cea :=RadarChart {_ggfda :_cfc .RadarChart };_cea .InitializeDefaults ();return _cea ;};func (_gce DateAxis )SetMinorTickMark (m _f .ST_TickMark ){if m ==_f .ST_TickMarkUnset {_gce ._geee .MinorTickMark =nil ;}else {_gce ._geee .MinorTickMark =_f .NewCT_TickMark ();_gce ._geee .MinorTickMark .ValAttr =m ;};};func (_dcd LineChartSeries )Values ()NumberDataSource {if _dcd ._eee .Val ==nil {_dcd ._eee .Val =_f .NewCT_NumDataSource ();};return MakeNumberDataSource (_dcd ._eee .Val );};
// CategoryAxis returns the category data source.
func (_cdb AreaChartSeries )CategoryAxis ()CategoryAxisDataSource {if _cdb ._fg .Cat ==nil {_cdb ._fg .Cat =_f .NewCT_AxDataSource ();};return MakeAxisDataSource (_cdb ._fg .Cat );};
// InitializeDefaults the bar chart to its defaults
func (_g Area3DChart )InitializeDefaults (){};
// InitializeDefaults the bar chart to its defaults
func (_ae Bar3DChart )InitializeDefaults (){_ae .SetDirection (_f .ST_BarDirCol )};
// X returns the inner wrapped XML type.
func (_eege ScatterChart )X ()*_f .CT_ScatterChart {return _eege ._bdbd };
// SetNumberReference is used to set the source data to a range of cells containing
// numbers.
func (_gfd CategoryAxisDataSource )SetNumberReference (s string ){_gfd ._dag .Choice =_f .NewCT_AxDataSourceChoice ();_gfd ._dag .Choice .NumRef =_f .NewCT_NumRef ();_gfd ._dag .Choice .NumRef .F =s ;};
// RemoveTitle removes any existing title from the chart.
func (_egc Chart )RemoveTitle (){_egc ._cfad .Chart .Title =nil ;_egc ._cfad .Chart .AutoTitleDeleted =_f .NewCT_Boolean ();_egc ._cfad .Chart .AutoTitleDeleted .ValAttr =_c .Bool (true );};
// AddSeries adds a default series to a bar chart.
func (_ga BarChart )AddSeries ()BarChartSeries {_ada :=_ga .nextColor (len (_ga ._ed .Ser ));_gd :=_f .NewCT_BarSer ();_ga ._ed .Ser =append (_ga ._ed .Ser ,_gd );_gd .Idx .ValAttr =uint32 (len (_ga ._ed .Ser )-1);_gd .Order .ValAttr =uint32 (len (_ga ._ed .Ser )-1);_gab :=BarChartSeries {_gd };_gab .InitializeDefaults ();_gab .Properties ().SetSolidFill (_ada );return _gab ;};
// X returns the inner wrapped XML type.
func (_cgfe RadarChart )X ()*_f .CT_RadarChart {return _cgfe ._ggfda };
// SetOrder sets the order of the series
func (_gddd ScatterChartSeries )SetOrder (idx uint32 ){_gddd ._abd .Order .ValAttr =idx };
// CategoryAxis returns the category data source.
func (_gbd RadarChartSeries )CategoryAxis ()CategoryAxisDataSource {if _gbd ._abe .Cat ==nil {_gbd ._abe .Cat =_f .NewCT_AxDataSource ();};return MakeAxisDataSource (_gbd ._abe .Cat );};func (_eb BarChart )AddAxis (axis Axis ){_dfg :=_f .NewCT_UnsignedInt ();_dfg .ValAttr =axis .AxisID ();_eb ._ed .AxId =append (_eb ._ed .AxId ,_dfg );};
// SetText sets the series text.
func (_eag BubbleChartSeries )SetText (s string ){_eag ._agca .Tx =_f .NewCT_SerTx ();_eag ._agca .Tx .Choice .V =&s ;};
// AddPieChart adds a new pie chart to a chart.
func (_acb Chart )AddPieChart ()PieChart {_fdf :=_f .NewCT_PlotAreaChoice ();_acb ._cfad .Chart .PlotArea .Choice =append (_acb ._cfad .Chart .PlotArea .Choice ,_fdf );_fdf .PieChart =_f .NewCT_PieChart ();_gcf :=PieChart {_gbf :_fdf .PieChart };_gcf .InitializeDefaults ();return _gcf ;};
func (_cfcca Legend )X ()*_c .CT_Legend {return _cfcca ._gfe };type Title struct{_eafe *_c .CT_Title };
// Pie3DChart is a Pie3D chart.
type Pie3DChart struct{chartBase ;_acbg *_f .CT_Pie3DChart ;};
type Pie3DChart struct{chartBase ;_eba *_c .CT_Pie3DChart ;};
// BarChart is a 2D bar chart.
type BarChart struct{chartBase ;_ed *_f .CT_BarChart ;};
// Values returns the value data source.
func (_acc BubbleChartSeries )Values ()NumberDataSource {if _acc ._agca .YVal ==nil {_acc ._agca .YVal =_f .NewCT_NumDataSource ();};return MakeNumberDataSource (_acc ._agca .YVal );};
// SetText sets the series text
func (_fcf LineChartSeries )SetText (s string ){_fcf ._eee .Tx =_f .NewCT_SerTx ();_fcf ._eee .Tx .Choice .V =&s ;};
// RadarChartSeries is a series to be used on an Radar chart.
type RadarChartSeries struct{_abe *_f .CT_RadarSer };
// AddDoughnutChart adds a new doughnut (pie with a hole in the center) chart to a chart.
func (_gbfa Chart )AddDoughnutChart ()DoughnutChart {_aga :=_c .NewCT_PlotAreaChoice ();_gbfa ._dgb .Chart .PlotArea .Choice =append (_gbfa ._dgb .Chart .PlotArea .Choice ,_aga );_aga .DoughnutChart =_c .NewCT_DoughnutChart ();_eac :=DoughnutChart {_deg :_aga .DoughnutChart };_eac .InitializeDefaults ();return _eac ;};func (_fdbe Marker )SetSize (sz uint8 ){_fdbe ._afb .Size =_c .NewCT_MarkerSize ();_fdbe ._afb .Size .ValAttr =&sz ;};
// X returns the inner wrapped XML type.
func (_bd BubbleChart )X ()*_f .CT_BubbleChart {return _bd ._efb };func (_fcgc SurfaceChartSeries )InitializeDefaults (){_fcgc .Properties ().LineProperties ().SetWidth (1*_b .Point );_fcgc .Properties ().LineProperties ().SetSolidFill (_fa .Black );_fcgc .Properties ().LineProperties ().SetJoin (_af .LineJoinRound );};func (_aebe Surface3DChart )InitializeDefaults (){_aebe ._dcbd .Wireframe =_f .NewCT_Boolean ();_aebe ._dcbd .Wireframe .ValAttr =_c .Bool (false );_aebe ._dcbd .BandFmts =_f .NewCT_BandFmts ();for _def :=0;_def < 15;_def ++{_dcad :=_f .NewCT_BandFmt ();_dcad .Idx .ValAttr =uint32 (_def );_dcad .SpPr =_e .NewCT_ShapeProperties ();_cbe :=_af .MakeShapeProperties (_dcad .SpPr );_cbe .SetSolidFill (_aebe .nextColor (_def ));_aebe ._dcbd .BandFmts .BandFmt =append (_aebe ._dcbd .BandFmts .BandFmt ,_dcad );};};
// Properties returns the line chart series shape properties.
func (_cafa ScatterChartSeries )Properties ()_af .ShapeProperties {if _cafa ._abd .SpPr ==nil {_cafa ._abd .SpPr =_e .NewCT_ShapeProperties ();};return _af .MakeShapeProperties (_cafa ._abd .SpPr );};
// Properties returns the bar chart series shape properties.
func (_cf AreaChartSeries )Properties ()_af .ShapeProperties {if _cf ._fg .SpPr ==nil {_cf ._fg .SpPr =_e .NewCT_ShapeProperties ();};return _af .MakeShapeProperties (_cf ._fg .SpPr );};func (_cca SeriesAxis )InitializeDefaults (){};func (_fgb ScatterChartSeries )CategoryAxis ()CategoryAxisDataSource {if _fgb ._abd .XVal ==nil {_fgb ._abd .XVal =_f .NewCT_AxDataSource ();};return MakeAxisDataSource (_fgb ._abd .XVal );};type ValueAxis struct{_abdb *_f .CT_ValAx };
// AddAxis adds an axis to a Surface chart.
func (_eedc Surface3DChart )AddAxis (axis Axis ){_ddcg :=_f .NewCT_UnsignedInt ();_ddcg .ValAttr =axis .AxisID ();_eedc ._dcbd .AxId =append (_eedc ._dcbd .AxId ,_ddcg );};
// AddLegend adds a legend to a chart, replacing any existing legend.
func (_bbf Chart )AddLegend ()Legend {_bbf ._cfad .Chart .Legend =_f .NewCT_Legend ();_ebe :=MakeLegend (_bbf ._cfad .Chart .Legend );_ebe .InitializeDefaults ();return _ebe ;};
// X returns the inner wrapped XML type.
func (_eba Legend )X ()*_f .CT_Legend {return _eba ._bff };func (_fdce CategoryAxis )SetCrosses (axis Axis ){_fdce ._gfb .Choice =_f .NewEG_AxSharedChoice ();_fdce ._gfb .Choice .Crosses =_f .NewCT_Crosses ();_fdce ._gfb .Choice .Crosses .ValAttr =_f .ST_CrossesAutoZero ;_fdce ._gfb .CrossAx .ValAttr =axis .AxisID ();};
// InitializeDefaults the bar chart to its defaults
func (_gfge RadarChart )InitializeDefaults (){_gfge ._ggfda .RadarStyle .ValAttr =_f .ST_RadarStyleMarker ;};
// InitializeDefaults the Stock chart to its defaults
func (_cdga StockChart )InitializeDefaults (){_cdga ._cgff .HiLowLines =_f .NewCT_ChartLines ();_cdga ._cgff .UpDownBars =_f .NewCT_UpDownBars ();_cdga ._cgff .UpDownBars .GapWidth =_f .NewCT_GapAmount ();_cdga ._cgff .UpDownBars .GapWidth .ValAttr =&_f .ST_GapAmount {};_cdga ._cgff .UpDownBars .GapWidth .ValAttr .ST_GapAmountUShort =_c .Uint16 (150);_cdga ._cgff .UpDownBars .UpBars =_f .NewCT_UpDownBar ();_cdga ._cgff .UpDownBars .DownBars =_f .NewCT_UpDownBar ();};
// Values returns the value data source.
func (_dgb RadarChartSeries )Values ()NumberDataSource {if _dgb ._abe .Val ==nil {_dgb ._abe .Val =_f .NewCT_NumDataSource ();};return MakeNumberDataSource (_dgb ._abe .Val );};
// AddPieOfPieChart adds a new pie chart to a chart.
func (_bbg Chart )AddPieOfPieChart ()PieOfPieChart {_cbd :=_f .NewCT_PlotAreaChoice ();_bbg ._cfad .Chart .PlotArea .Choice =append (_bbg ._cfad .Chart .PlotArea .Choice ,_cbd );_cbd .OfPieChart =_f .NewCT_OfPieChart ();_ggg :=PieOfPieChart {_cge :_cbd .OfPieChart };_ggg .InitializeDefaults ();return _ggg ;};
// X returns the inner wrapped XML type.
func (_ebee Surface3DChart )X ()*_f .CT_Surface3DChart {return _ebee ._dcbd };
// Properties returns the Bubble chart series shape properties.
func (_fdc BubbleChartSeries )Properties ()_af .ShapeProperties {if _fdc ._agca .SpPr ==nil {_fdc ._agca .SpPr =_e .NewCT_ShapeProperties ();};return _af .MakeShapeProperties (_fdc ._agca .SpPr );};func (_ebff ValueAxis )SetMajorTickMark (m _f .ST_TickMark ){if m ==_f .ST_TickMarkUnset {_ebff ._abdb .MajorTickMark =nil ;}else {_ebff ._abdb .MajorTickMark =_f .NewCT_TickMark ();_ebff ._abdb .MajorTickMark .ValAttr =m ;};};func (_aabd Title )InitializeDefaults (){_aabd .SetText ("\u0054\u0069\u0074l\u0065");_aabd .RunProperties ().SetSize (16*_b .Point );_aabd .RunProperties ().SetSolidFill (_fa .Black );_aabd .RunProperties ().SetFont ("\u0043\u0061\u006c\u0069\u0062\u0020\u0072\u0069");_aabd .RunProperties ().SetBold (false );};
// InitializeDefaults the bar chart to its defaults
func (_ecb PieOfPieChart )InitializeDefaults (){_ecb ._cge .VaryColors =_f .NewCT_Boolean ();_ecb ._cge .VaryColors .ValAttr =_c .Bool (true );_ecb .SetType (_f .ST_OfPieTypePie );_ecb ._cge .SecondPieSize =_f .NewCT_SecondPieSize ();_ecb ._cge .SecondPieSize .ValAttr =&_f .ST_SecondPieSize {};_ecb ._cge .SecondPieSize .ValAttr .ST_SecondPieSizeUShort =_c .Uint16 (75);_fba :=_f .NewCT_ChartLines ();_fba .SpPr =_e .NewCT_ShapeProperties ();_bacc :=_af .MakeShapeProperties (_fba .SpPr );_bacc .LineProperties ().SetSolidFill (_fa .Auto );_ecb ._cge .SerLines =append (_ecb ._cge .SerLines ,_fba );};
// Values returns the value data source.
func (_fd BarChartSeries )Values ()NumberDataSource {if _fd ._bad .Val ==nil {_fd ._bad .Val =_f .NewCT_NumDataSource ();};return MakeNumberDataSource (_fd ._bad .Val );};
func (_debg Surface3DChart )X ()*_c .CT_Surface3DChart {return _debg ._egae };func (_cfc DataLabels )SetShowCategoryName (b bool ){_cfc .ensureChoice ();_cfc ._fge .Choice .ShowCatName =_c .NewCT_Boolean ();_cfc ._fge .Choice .ShowCatName .ValAttr =_f .Bool (b );};func (_bfef LineChartSeries )Values ()NumberDataSource {if _bfef ._gaa .Val ==nil {_bfef ._gaa .Val =_c .NewCT_NumDataSource ();};return MakeNumberDataSource (_bfef ._gaa .Val );};
// 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 (_deaa NumberDataSource )CreateEmptyNumberCache (){_deaa .ensureChoice ();if _deaa ._gbe .Choice .NumRef ==nil {_deaa ._gbe .Choice .NumRef =_f .NewCT_NumRef ();};_deaa ._gbe .Choice .NumLit =nil ;_deaa ._gbe .Choice .NumRef .NumCache =_f .NewCT_NumData ();_deaa ._gbe .Choice .NumRef .NumCache .PtCount =_f .NewCT_UnsignedInt ();_deaa ._gbe .Choice .NumRef .NumCache .PtCount .ValAttr =0;};func (_dcf RadarChart )AddAxis (axis Axis ){_bdbg :=_f .NewCT_UnsignedInt ();_bdbg .ValAttr =axis .AxisID ();_dcf ._ggfda .AxId =append (_dcf ._ggfda .AxId ,_bdbg );};
func (_fcd NumberDataSource )CreateEmptyNumberCache (){_fcd .ensureChoice ();if _fcd ._badd .Choice .NumRef ==nil {_fcd ._badd .Choice .NumRef =_c .NewCT_NumRef ();};_fcd ._badd .Choice .NumLit =nil ;_fcd ._badd .Choice .NumRef .NumCache =_c .NewCT_NumData ();_fcd ._badd .Choice .NumRef .NumCache .PtCount =_c .NewCT_UnsignedInt ();_fcd ._badd .Choice .NumRef .NumCache .PtCount .ValAttr =0;};
// X returns the inner wrapped XML type.
func (_fcd AreaChartSeries )X ()*_f .CT_AreaSer {return _fcd ._fg };type LineChart struct{chartBase ;_aae *_f .CT_LineChart ;};
// AddSeries adds a default series to a line chart.
func (_aca LineChart )AddSeries ()LineChartSeries {_ece :=_aca .nextColor (len (_aca ._aae .Ser ));_cba :=_f .NewCT_LineSer ();_aca ._aae .Ser =append (_aca ._aae .Ser ,_cba );_cba .Idx .ValAttr =uint32 (len (_aca ._aae .Ser )-1);_cba .Order .ValAttr =uint32 (len (_aca ._aae .Ser )-1);_dbf :=LineChartSeries {_cba };_dbf .InitializeDefaults ();_dbf .Properties ().LineProperties ().SetSolidFill (_ece );return _dbf ;};
// ScatterChartSeries is the data series for a scatter chart.
type ScatterChartSeries struct{_abd *_f .CT_ScatterSer };
// AddAxis adds an axis to a line chart.
func (_aggg LineChart )AddAxis (axis Axis ){_bcc :=_f .NewCT_UnsignedInt ();_bcc .ValAttr =axis .AxisID ();_aggg ._aae .AxId =append (_aggg ._aae .AxId ,_bcc );};func (_gcaa ValueAxis )SetMinorTickMark (m _f .ST_TickMark ){if m ==_f .ST_TickMarkUnset {_gcaa ._abdb .MinorTickMark =nil ;}else {_gcaa ._abdb .MinorTickMark =_f .NewCT_TickMark ();_gcaa ._abdb .MinorTickMark .ValAttr =m ;};};
// X returns the inner wrapped XML type.
func (_cgb BarChart )X ()*_f .CT_BarChart {return _cgb ._ed };
// PieChartSeries is a series to be used on an Pie chart.
type PieChartSeries struct{_dafg *_f .CT_PieSer };
// SetText sets the series text
func (_edbc ScatterChartSeries )SetText (s string ){_edbc ._abd .Tx =_f .NewCT_SerTx ();_edbc ._abd .Tx .Choice .V =&s ;};type SeriesAxis struct{_fbda *_f .CT_SerAx };
// X returns the inner wrapped XML type.
func (_bbd LineChartSeries )X ()*_f .CT_LineSer {return _bbd ._eee };
// InitializeDefaults initializes a Bubble chart series to the default values.
func (_cgf BubbleChartSeries )InitializeDefaults (){};
// X returns the inner wrapped XML type.
func (_cfade Marker )X ()*_f .CT_Marker {return _cfade ._dcg };func (_aeb BubbleChart )AddAxis (axis Axis ){_gfg :=_f .NewCT_UnsignedInt ();_gfg .ValAttr =axis .AxisID ();_aeb ._efb .AxId =append (_aeb ._efb .AxId ,_gfg );};
// PieChart is a Pie chart.
type PieChart struct{chartBase ;_gbf *_f .CT_PieChart ;};func (_gdb CategoryAxis )SetTickLabelPosition (p _f .ST_TickLblPos ){if p ==_f .ST_TickLblPosUnset {_gdb ._gfb .TickLblPos =nil ;}else {_gdb ._gfb .TickLblPos =_f .NewCT_TickLblPos ();_gdb ._gfb .TickLblPos .ValAttr =p ;};};
// InitializeDefaults the Bubble chart to its defaults
func (_dad BubbleChart )InitializeDefaults (){};type Line3DChart struct{chartBase ;_ddc *_f .CT_Line3DChart ;};
// X returns the inner wrapped XML type.
func (_dcgg Pie3DChart )X ()*_f .CT_Pie3DChart {return _dcgg ._acbg };
// SetDisplayBlanksAs controls how missing values are displayed.
func (_bca Chart )SetDisplayBlanksAs (v _f .ST_DispBlanksAs ){_bca ._cfad .Chart .DispBlanksAs =_f .NewCT_DispBlanksAs ();_bca ._cfad .Chart .DispBlanksAs .ValAttr =v ;};func (_dac DataLabels )SetPosition (p _f .ST_DLblPos ){_dac .ensureChoice ();_dac ._aeg .Choice .DLblPos =_f .NewCT_DLblPos ();_dac ._aeg .Choice .DLblPos .ValAttr =p ;};func (_acf ScatterChart )InitializeDefaults (){_acf ._bdbd .ScatterStyle .ValAttr =_f .ST_ScatterStyleMarker ;};func (_bbed SeriesAxis )SetCrosses (axis Axis ){_bbed ._fbda .CrossAx .ValAttr =axis .AxisID ()};
// InitializeDefaults initializes a bar chart series to the default values.
func (_ggf BarChartSeries )InitializeDefaults (){};
// RemoveLegend removes the legend if the chart has one.
func (_cee Chart )RemoveLegend (){_cee ._cfad .Chart .Legend =nil };
// Values returns the value data source.
func (_facd PieChartSeries )Values ()NumberDataSource {if _facd ._dafg .Val ==nil {_facd ._dafg .Val =_f .NewCT_NumDataSource ();};return MakeNumberDataSource (_facd ._dafg .Val );};func (_fcdc ValueAxis )Properties ()_af .ShapeProperties {if _fcdc ._abdb .SpPr ==nil {_fcdc ._abdb .SpPr =_e .NewCT_ShapeProperties ();};return _af .MakeShapeProperties (_fcdc ._abdb .SpPr );};
// Index returns the index of the series
func (_afb LineChartSeries )Index ()uint32 {return _afb ._eee .Idx .ValAttr };
// Chart is a generic chart.
type Chart struct{_cfad *_f .ChartSpace };
// AddBarChart adds a new bar chart to a chart.
func (_cdge Chart )AddBarChart ()BarChart {_ce :=_f .NewCT_PlotAreaChoice ();_cdge ._cfad .Chart .PlotArea .Choice =append (_cdge ._cfad .Chart .PlotArea .Choice ,_ce );_ce .BarChart =_f .NewCT_BarChart ();_ce .BarChart .Grouping =_f .NewCT_BarGrouping ();_ce .BarChart .Grouping .ValAttr =_f .ST_BarGroupingStandard ;_cad :=BarChart {_ed :_ce .BarChart };_cad .InitializeDefaults ();return _cad ;};
// AddSeries adds a default series to a line chart.
func (_fef Line3DChart )AddSeries ()LineChartSeries {_gdd :=_fef .nextColor (len (_fef ._ddc .Ser ));_fadb :=_f .NewCT_LineSer ();_fef ._ddc .Ser =append (_fef ._ddc .Ser ,_fadb );_fadb .Idx .ValAttr =uint32 (len (_fef ._ddc .Ser )-1);_fadb .Order .ValAttr =uint32 (len (_fef ._ddc .Ser )-1);_gcdf :=LineChartSeries {_fadb };_gcdf .InitializeDefaults ();_gcdf .Properties ().LineProperties ().SetSolidFill (_gdd );_gcdf .Properties ().SetSolidFill (_gdd );return _gcdf ;};func MakeChart (x *_f .ChartSpace )Chart {return Chart {x }};
// 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{_dag *_f .CT_AxDataSource };func (_edf ValueAxis )SetTickLabelPosition (p _f .ST_TickLblPos ){if p ==_f .ST_TickLblPosUnset {_edf ._abdb .TickLblPos =nil ;}else {_edf ._abdb .TickLblPos =_f .NewCT_TickLblPos ();_edf ._abdb .TickLblPos .ValAttr =p ;};};
// Index returns the index of the series
func (_bef ScatterChartSeries )Index ()uint32 {return _bef ._abd .Idx .ValAttr };
// DoughnutChart is a Doughnut chart.
type DoughnutChart struct{chartBase ;_gcef *_f .CT_DoughnutChart ;};
// AddSeries adds a default series to an Doughnut chart.
func (_bddg DoughnutChart )AddSeries ()PieChartSeries {_bcdg :=_f .NewCT_PieSer ();_bddg ._gcef .Ser =append (_bddg ._gcef .Ser ,_bcdg );_bcdg .Idx .ValAttr =uint32 (len (_bddg ._gcef .Ser )-1);_bcdg .Order .ValAttr =uint32 (len (_bddg ._gcef .Ser )-1);_gbga :=PieChartSeries {_bcdg };_gbga .InitializeDefaults ();return _gbga ;};
// AddAxis adds an axis to a Surface chart.
func (_aed SurfaceChart )AddAxis (axis Axis ){_deea :=_f .NewCT_UnsignedInt ();_deea .ValAttr =axis .AxisID ();_aed ._aaaa .AxId =append (_aed ._aaaa .AxId ,_deea );};
// Properties returns the line chart series shape properties.
func (_cbdf SurfaceChartSeries )Properties ()_af .ShapeProperties {if _cbdf ._bfe .SpPr ==nil {_cbdf ._bfe .SpPr =_e .NewCT_ShapeProperties ();};return _af .MakeShapeProperties (_cbdf ._bfe .SpPr );};func (_daf Area3DChart )AddAxis (axis Axis ){_ba :=_f .NewCT_UnsignedInt ();_ba .ValAttr =axis .AxisID ();_daf ._da .AxId =append (_daf ._da .AxId ,_ba );};func (_geae ValueAxis )MajorGridLines ()GridLines {if _geae ._abdb .MajorGridlines ==nil {_geae ._abdb .MajorGridlines =_f .NewCT_ChartLines ();};return GridLines {_geae ._abdb .MajorGridlines };};func (_abb chartBase )nextColor (_aac int )_fa .Color {return _fec [_aac %len (_fec )]};
// AddBar3DChart adds a new 3D bar chart to a chart.
func (_cb Chart )AddBar3DChart ()Bar3DChart {_fbc (_cb ._cfad .Chart );_ffa :=_f .NewCT_PlotAreaChoice ();_cb ._cfad .Chart .PlotArea .Choice =append (_cb ._cfad .Chart .PlotArea .Choice ,_ffa );_ffa .Bar3DChart =_f .NewCT_Bar3DChart ();_ffa .Bar3DChart .Grouping =_f .NewCT_BarGrouping ();_ffa .Bar3DChart .Grouping .ValAttr =_f .ST_BarGroupingStandard ;_cfe :=Bar3DChart {_ef :_ffa .Bar3DChart };_cfe .InitializeDefaults ();return _cfe ;};func MakeCategoryAxis (x *_f .CT_CatAx )CategoryAxis {return CategoryAxis {x }};func (_ebeb Legend )InitializeDefaults (){_ebeb .SetPosition (_f .ST_LegendPosR );_ebeb .SetOverlay (false );_ebeb .Properties ().SetNoFill ();_ebeb .Properties ().LineProperties ().SetNoFill ();};
// SetIndex sets the index of the series
func (_dfe LineChartSeries )SetIndex (idx uint32 ){_dfe ._eee .Idx .ValAttr =idx };func MakeDataLabels (x *_f .CT_DLbls )DataLabels {return DataLabels {x }};func MakeLegend (l *_f .CT_Legend )Legend {return Legend {l }};
// AddTitle sets a new title on the chart.
func (_ab Chart )AddTitle ()Title {_ab ._cfad .Chart .Title =_f .NewCT_Title ();_ab ._cfad .Chart .Title .Overlay =_f .NewCT_Boolean ();_ab ._cfad .Chart .Title .Overlay .ValAttr =_c .Bool (false );_ab ._cfad .Chart .AutoTitleDeleted =_f .NewCT_Boolean ();_ab ._cfad .Chart .AutoTitleDeleted .ValAttr =_c .Bool (false );_bdc :=MakeTitle (_ab ._cfad .Chart .Title );_bdc .InitializeDefaults ();return _bdc ;};
// SetText sets the series text.
func (_fdfc PieChartSeries )SetText (s string ){_fdfc ._dafg .Tx =_f .NewCT_SerTx ();_fdfc ._dafg .Tx .Choice .V =&s ;};
// SetValues is used to set the source data to a set of values.
func (_cgc CategoryAxisDataSource )SetValues (v []string ){_cgc ._faad .Choice =_c .NewCT_AxDataSourceChoice ();_cgc ._faad .Choice .StrLit =_c .NewCT_StrData ();_cgc ._faad .Choice .StrLit .PtCount =_c .NewCT_UnsignedInt ();_cgc ._faad .Choice .StrLit .PtCount .ValAttr =uint32 (len (v ));for _ebf ,_feb :=range v {_cgc ._faad .Choice .StrLit .Pt =append (_cgc ._faad .Choice .StrLit .Pt ,&_c .CT_StrVal {IdxAttr :uint32 (_ebf ),V :_feb });};};
// InitializeDefaults the bar chart to its defaults
func (_ebf PieChart )InitializeDefaults (){_ebf ._gbf .VaryColors =_f .NewCT_Boolean ();_ebf ._gbf .VaryColors .ValAttr =_c .Bool (true );};
func (_gab PieChart )InitializeDefaults (){_gab ._bdb .VaryColors =_c .NewCT_Boolean ();_gab ._bdb .VaryColors .ValAttr =_f .Bool (true );};
// AddSeries adds a default series to a Stock chart.
func (_eggd StockChart )AddSeries ()LineChartSeries {_ggd :=_c .NewCT_LineSer ();_eggd ._bfa .Ser =append (_eggd ._bfa .Ser ,_ggd );_ggd .Idx .ValAttr =uint32 (len (_eggd ._bfa .Ser )-1);_ggd .Order .ValAttr =uint32 (len (_eggd ._bfa .Ser )-1);_eee :=LineChartSeries {_ggd };_eee .Values ().CreateEmptyNumberCache ();_eee .Properties ().LineProperties ().SetNoFill ();return _eee ;};
// X returns the inner wrapped XML type.
func (_bf BarChart )X ()*_c .CT_BarChart {return _bf ._ab };
// InitializeDefaults the bar chart to its defaults
func (_cd Area3DChart )InitializeDefaults (){};
// X returns the inner wrapped XML type.
func (_ac AreaChart )X ()*_c .CT_AreaChart {return _ac ._ca };func (_edd ValueAxis )SetTickLabelPosition (p _c .ST_TickLblPos ){if p ==_c .ST_TickLblPosUnset {_edd ._ffga .TickLblPos =nil ;}else {_edd ._ffga .TickLblPos =_c .NewCT_TickLblPos ();_edd ._ffga .TickLblPos .ValAttr =p ;};};func (_gac SurfaceChartSeries )InitializeDefaults (){_gac .Properties ().LineProperties ().SetWidth (1*_d .Point );_gac .Properties ().LineProperties ().SetSolidFill (_cf .Black );_gac .Properties ().LineProperties ().SetJoin (_bc .LineJoinRound );};
// BarChartSeries is a series to be used on a bar chart.
type BarChartSeries struct{_aaf *_c .CT_BarSer };
// SetOrder sets the order of the series
func (_eed LineChartSeries )SetOrder (idx uint32 ){_eed ._eee .Order .ValAttr =idx };type NumberDataSource struct{_gbe *_f .CT_NumDataSource };type GridLines struct{_aee *_f .CT_ChartLines };
func (_dde ScatterChartSeries )SetOrder (idx uint32 ){_dde ._fbgg .Order .ValAttr =idx };
// X returns the inner wrapped XML type.
func (_dcaf GridLines )X ()*_f .CT_ChartLines {return _dcaf ._aee };
func (_becg ScatterChartSeries )X ()*_c .CT_ScatterSer {return _becg ._fbgg };func (_abd ValueAxis )AxisID ()uint32 {return _abd ._ffga .AxId .ValAttr };func (_cgab chartBase )nextColor (_gadc int )_cf .Color {return _cdg [_gadc %len (_cdg )]};
// AddSeries adds a default series to an Radar chart.
func (_dff RadarChart )AddSeries ()RadarChartSeries {_cfb :=_dff .nextColor (len (_dff ._ggfda .Ser ));_gbgf :=_f .NewCT_RadarSer ();_dff ._ggfda .Ser =append (_dff ._ggfda .Ser ,_gbgf );_gbgf .Idx .ValAttr =uint32 (len (_dff ._ggfda .Ser )-1);_gbgf .Order .ValAttr =uint32 (len (_dff ._ggfda .Ser )-1);_dfeb :=RadarChartSeries {_gbgf };_dfeb .InitializeDefaults ();_dfeb .Properties ().SetSolidFill (_cfb );return _dfeb ;};
// AddPie3DChart adds a new pie chart to a chart.
func (_bcc Chart )AddPie3DChart ()Pie3DChart {_caa (_bcc ._dgb .Chart );_gfc :=_c .NewCT_PlotAreaChoice ();_bcc ._dgb .Chart .PlotArea .Choice =append (_bcc ._dgb .Chart .PlotArea .Choice ,_gfc );_gfc .Pie3DChart =_c .NewCT_Pie3DChart ();_adf :=Pie3DChart {_eba :_gfc .Pie3DChart };_adf .InitializeDefaults ();return _adf ;};
// AddDateAxis adds a value axis to the chart.
func (_bgb Chart )AddDateAxis ()DateAxis {_baa :=_f .NewCT_DateAx ();if _bgb ._cfad .Chart .PlotArea .CChoice ==nil {_bgb ._cfad .Chart .PlotArea .CChoice =_f .NewCT_PlotAreaChoice1 ();};_baa .AxId =_f .NewCT_UnsignedInt ();_baa .AxId .ValAttr =0x7FFFFFFF&_ag .Uint32 ();_bgb ._cfad .Chart .PlotArea .CChoice .DateAx =append (_bgb ._cfad .Chart .PlotArea .CChoice .DateAx ,_baa );_baa .Delete =_f .NewCT_Boolean ();_baa .Delete .ValAttr =_c .Bool (false );_baa .Scaling =_f .NewCT_Scaling ();_baa .Scaling .Orientation =_f .NewCT_Orientation ();_baa .Scaling .Orientation .ValAttr =_f .ST_OrientationMinMax ;_baa .Choice =&_f .EG_AxSharedChoice {};_baa .Choice .Crosses =_f .NewCT_Crosses ();_baa .Choice .Crosses .ValAttr =_f .ST_CrossesAutoZero ;_bgc :=DateAxis {_baa };_bgc .MajorGridLines ().Properties ().LineProperties ().SetSolidFill (_fa .LightGray );_bgc .SetMajorTickMark (_f .ST_TickMarkOut );_bgc .SetMinorTickMark (_f .ST_TickMarkIn );_bgc .SetTickLabelPosition (_f .ST_TickLblPosNextTo );_bgc .Properties ().LineProperties ().SetSolidFill (_fa .Black );_bgc .SetPosition (_f .ST_AxPosL );return _bgc ;};
func (_dfbb Chart )AddDateAxis ()DateAxis {_ebc :=_c .NewCT_DateAx ();if _dfbb ._dgb .Chart .PlotArea .CChoice ==nil {_dfbb ._dgb .Chart .PlotArea .CChoice =_c .NewCT_PlotAreaChoice1 ();};_ebc .AxId =_c .NewCT_UnsignedInt ();_ebc .AxId .ValAttr =0x7FFFFFFF&_dd .Uint32 ();_dfbb ._dgb .Chart .PlotArea .CChoice .DateAx =append (_dfbb ._dgb .Chart .PlotArea .CChoice .DateAx ,_ebc );_ebc .Delete =_c .NewCT_Boolean ();_ebc .Delete .ValAttr =_f .Bool (false );_ebc .Scaling =_c .NewCT_Scaling ();_ebc .Scaling .Orientation =_c .NewCT_Orientation ();_ebc .Scaling .Orientation .ValAttr =_c .ST_OrientationMinMax ;_ebc .Choice =&_c .EG_AxSharedChoice {};_ebc .Choice .Crosses =_c .NewCT_Crosses ();_ebc .Choice .Crosses .ValAttr =_c .ST_CrossesAutoZero ;_fbaf :=DateAxis {_ebc };_fbaf .MajorGridLines ().Properties ().LineProperties ().SetSolidFill (_cf .LightGray );_fbaf .SetMajorTickMark (_c .ST_TickMarkOut );_fbaf .SetMinorTickMark (_c .ST_TickMarkIn );_fbaf .SetTickLabelPosition (_c .ST_TickLblPosNextTo );_fbaf .Properties ().LineProperties ().SetSolidFill (_cf .Black );_fbaf .SetPosition (_c .ST_AxPosL );return _fbaf ;};
// Properties returns the bar chart series shape properties.
func (_adc PieChartSeries )Properties ()_af .ShapeProperties {if _adc ._dafg .SpPr ==nil {_adc ._dafg .SpPr =_e .NewCT_ShapeProperties ();};return _af .MakeShapeProperties (_adc ._dafg .SpPr );};
// AddBubbleChart adds a new bubble chart.
func (_cda Chart )AddBubbleChart ()BubbleChart {_bbb :=_c .NewCT_PlotAreaChoice ();_cda ._dgb .Chart .PlotArea .Choice =append (_cda ._dgb .Chart .PlotArea .Choice ,_bbb );_bbb .BubbleChart =_c .NewCT_BubbleChart ();_bff :=BubbleChart {_ea :_bbb .BubbleChart };_bff .InitializeDefaults ();return _bff ;};
// StockChart is a 2D Stock chart.
type StockChart struct{chartBase ;_cgff *_f .CT_StockChart ;};
// InitializeDefaults the bar chart to its defaults
func (_eb BarChart )InitializeDefaults (){_eb .SetDirection (_c .ST_BarDirCol )};
// X returns the inner wrapped XML type.
func (_eg AreaChart )X ()*_f .CT_AreaChart {return _eg ._cg };func (_dba ValueAxis )AxisID ()uint32 {return _dba ._abdb .AxId .ValAttr };func (_bgce StockChart )AddAxis (axis Axis ){_cbg :=_f .NewCT_UnsignedInt ();_cbg .ValAttr =axis .AxisID ();_bgce ._cgff .AxId =append (_bgce ._cgff .AxId ,_cbg );};func MakeValueAxis (x *_f .CT_ValAx )ValueAxis {return ValueAxis {x }};func (_ca AreaChart )AddAxis (axis Axis ){_dfd :=_f .NewCT_UnsignedInt ();_dfd .ValAttr =axis .AxisID ();_ca ._cg .AxId =append (_ca ._cg .AxId ,_dfd );};
// SetDirection changes the direction of the bar chart (bar or column).
func (_gee Bar3DChart )SetDirection (d _f .ST_BarDir ){_gee ._ef .BarDir .ValAttr =d };type ScatterChart struct{chartBase ;_bdbd *_f .CT_ScatterChart ;};
// AddLine3DChart adds a new 3D line chart to a chart.
func (_dc Chart )AddLine3DChart ()Line3DChart {_fbc (_dc ._cfad .Chart );_bac :=_f .NewCT_PlotAreaChoice ();_dc ._cfad .Chart .PlotArea .Choice =append (_dc ._cfad .Chart .PlotArea .Choice ,_bac );_bac .Line3DChart =_f .NewCT_Line3DChart ();_bac .Line3DChart .Grouping =_f .NewCT_Grouping ();_bac .Line3DChart .Grouping .ValAttr =_f .ST_GroupingStandard ;return Line3DChart {_ddc :_bac .Line3DChart };};
// X returns the inner wrapped XML type.
func (_aga Area3DChart )X ()*_f .CT_Area3DChart {return _aga ._da };func (_fag ScatterChartSeries )InitializeDefaults (){_fag .Properties ().LineProperties ().SetNoFill ();_fag .Marker ().SetSymbol (_f .ST_MarkerStyleAuto );_fag .Labels ().SetShowLegendKey (false );_fag .Labels ().SetShowValue (true );_fag .Labels ().SetShowPercent (false );_fag .Labels ().SetShowCategoryName (false );_fag .Labels ().SetShowSeriesName (false );_fag .Labels ().SetShowLeaderLines (false );};
// Values returns the value data source.
func (_agc AreaChartSeries )Values ()NumberDataSource {if _agc ._fg .Val ==nil {_agc ._fg .Val =_f .NewCT_NumDataSource ();};return MakeNumberDataSource (_agc ._fg .Val );};
// AddScatterChart adds a scatter (X/Y) chart.
func (_cagf Chart )AddScatterChart ()ScatterChart {_ded :=_c .NewCT_PlotAreaChoice ();_cagf ._dgb .Chart .PlotArea .Choice =append (_cagf ._dgb .Chart .PlotArea .Choice ,_ded );_ded .ScatterChart =_c .NewCT_ScatterChart ();_aeb :=ScatterChart {_gda :_ded .ScatterChart };_aeb .InitializeDefaults ();return _aeb ;};
// Index returns the index of the series
func (_gec SurfaceChartSeries )Index ()uint32 {return _gec ._bfe .Idx .ValAttr };
func (_aed LineChartSeries )Index ()uint32 {return _aed ._gaa .Idx .ValAttr };
// RadarChart is an Radar chart that has a shaded Radar underneath a curve.
type RadarChart struct{chartBase ;_ggfda *_f .CT_RadarChart ;};
// RemoveLegend removes the legend if the chart has one.
func (_bed Chart )RemoveLegend (){_bed ._dgb .Chart .Legend =nil };
// InitializeDefaults initializes an area series to the default values.
func (_ea AreaChartSeries )InitializeDefaults (){};
// SetText sets the series text
func (_fffe LineChartSeries )SetText (s string ){_fffe ._gaa .Tx =_c .NewCT_SerTx ();_fffe ._gaa .Tx .Choice .V =&s ;};
// Marker returns the marker properties.
func (_ccd ScatterChartSeries )Marker ()Marker {if _ccd ._abd .Marker ==nil {_ccd ._abd .Marker =_f .NewCT_Marker ();};return MakeMarker (_ccd ._abd .Marker );};
// SetExplosion sets the value that the segements of the pie are 'exploded' by
func (_acbd PieChartSeries )SetExplosion (v uint32 ){_acbd ._dafg .Explosion =_f .NewCT_UnsignedInt ();_acbd ._dafg .Explosion .ValAttr =v ;};func MakeNumberDataSource (x *_f .CT_NumDataSource )NumberDataSource {return NumberDataSource {x }};func (_gef Legend )SetOverlay (b bool ){_gef ._bff .Overlay =_f .NewCT_Boolean ();_gef ._bff .Overlay .ValAttr =_c .Bool (b );};
// SetType sets the type the secone pie to either pie or bar
func (_gcgcg PieOfPieChart )SetType (t _f .ST_OfPieType ){_gcgcg ._cge .OfPieType .ValAttr =t };
// AddCategoryAxis adds a category axis.
func (_dff Chart )AddCategoryAxis ()CategoryAxis {_bfd :=_c .NewCT_CatAx ();if _dff ._dgb .Chart .PlotArea .CChoice ==nil {_dff ._dgb .Chart .PlotArea .CChoice =_c .NewCT_PlotAreaChoice1 ();};_bfd .AxId =_c .NewCT_UnsignedInt ();_bfd .AxId .ValAttr =0x7FFFFFFF&_dd .Uint32 ();_dff ._dgb .Chart .PlotArea .CChoice .CatAx =append (_dff ._dgb .Chart .PlotArea .CChoice .CatAx ,_bfd );_bfd .Auto =_c .NewCT_Boolean ();_bfd .Auto .ValAttr =_f .Bool (true );_bfd .Delete =_c .NewCT_Boolean ();_bfd .Delete .ValAttr =_f .Bool (false );_dfe :=MakeCategoryAxis (_bfd );_dfe .InitializeDefaults ();return _dfe ;};type DataLabels struct{_fge *_c .CT_DLbls };func (_gdfaf ValueAxis )SetMajorTickMark (m _c .ST_TickMark ){if m ==_c .ST_TickMarkUnset {_gdfaf ._ffga .MajorTickMark =nil ;}else {_gdfaf ._ffga .MajorTickMark =_c .NewCT_TickMark ();_gdfaf ._ffga .MajorTickMark .ValAttr =m ;};};
// X returns the inner wrapped XML type.
func (_cdd DoughnutChart )X ()*_f .CT_DoughnutChart {return _cdd ._gcef };
func (_gfce Title )X ()*_c .CT_Title {return _gfce ._eafe };func (_db nullAxis )AxisID ()uint32 {return 0};
// Order returns the order of the series
func (_ccdf LineChartSeries )Order ()uint32 {return _ccdf ._gaa .Order .ValAttr };
// AddValueAxis adds a value axis to the chart.
func (_gad Chart )AddValueAxis ()ValueAxis {_cb :=_c .NewCT_ValAx ();if _gad ._dgb .Chart .PlotArea .CChoice ==nil {_gad ._dgb .Chart .PlotArea .CChoice =_c .NewCT_PlotAreaChoice1 ();};_cb .AxId =_c .NewCT_UnsignedInt ();_cb .AxId .ValAttr =0x7FFFFFFF&_dd .Uint32 ();_gad ._dgb .Chart .PlotArea .CChoice .ValAx =append (_gad ._dgb .Chart .PlotArea .CChoice .ValAx ,_cb );_cb .Delete =_c .NewCT_Boolean ();_cb .Delete .ValAttr =_f .Bool (false );_cb .Scaling =_c .NewCT_Scaling ();_cb .Scaling .Orientation =_c .NewCT_Orientation ();_cb .Scaling .Orientation .ValAttr =_c .ST_OrientationMinMax ;_cb .Choice =&_c .EG_AxSharedChoice {};_cb .Choice .Crosses =_c .NewCT_Crosses ();_cb .Choice .Crosses .ValAttr =_c .ST_CrossesAutoZero ;_cb .CrossBetween =_c .NewCT_CrossBetween ();_cb .CrossBetween .ValAttr =_c .ST_CrossBetweenBetween ;_bdeg :=MakeValueAxis (_cb );_bdeg .MajorGridLines ().Properties ().LineProperties ().SetSolidFill (_cf .LightGray );_bdeg .SetMajorTickMark (_c .ST_TickMarkOut );_bdeg .SetMinorTickMark (_c .ST_TickMarkIn );_bdeg .SetTickLabelPosition (_c .ST_TickLblPosNextTo );_bdeg .Properties ().LineProperties ().SetSolidFill (_cf .Black );_bdeg .SetPosition (_c .ST_AxPosL );return _bdeg ;};func MakeLegend (l *_c .CT_Legend )Legend {return Legend {l }};func (_bgdf ScatterChartSeries )InitializeDefaults (){_bgdf .Properties ().LineProperties ().SetNoFill ();_bgdf .Marker ().SetSymbol (_c .ST_MarkerStyleAuto );_bgdf .Labels ().SetShowLegendKey (false );_bgdf .Labels ().SetShowValue (true );_bgdf .Labels ().SetShowPercent (false );_bgdf .Labels ().SetShowCategoryName (false );_bgdf .Labels ().SetShowSeriesName (false );_bgdf .Labels ().SetShowLeaderLines (false );};
// Labels returns the data label properties.
func (_dee ScatterChartSeries )Labels ()DataLabels {if _dee ._fbgg .DLbls ==nil {_dee ._fbgg .DLbls =_c .NewCT_DLbls ();};return MakeDataLabels (_dee ._fbgg .DLbls );};
// X returns the inner wrapped XML type.
func (_bge LineChart )X ()*_c .CT_LineChart {return _bge ._bgd };
// SetText sets the series text.
func (_fa AreaChartSeries )SetText (s string ){_fa ._eg .Tx =_c .NewCT_SerTx ();_fa ._eg .Tx .Choice .V =&s };func (_bced ValueAxis )SetMinorTickMark (m _c .ST_TickMark ){if m ==_c .ST_TickMarkUnset {_bced ._ffga .MinorTickMark =nil ;}else {_bced ._ffga .MinorTickMark =_c .NewCT_TickMark ();_bced ._ffga .MinorTickMark .ValAttr =m ;};};func (_egcfc NumberDataSource )ensureChoice (){if _egcfc ._badd .Choice ==nil {_egcfc ._badd .Choice =_c .NewCT_NumDataSourceChoice ();};};
// SetDisplayBlanksAs controls how missing values are displayed.
func (_eda Chart )SetDisplayBlanksAs (v _c .ST_DispBlanksAs ){_eda ._dgb .Chart .DispBlanksAs =_c .NewCT_DispBlanksAs ();_eda ._dgb .Chart .DispBlanksAs .ValAttr =v ;};
// AddSeries adds a default series to a Surface chart.
func (_ebag SurfaceChart )AddSeries ()SurfaceChartSeries {_gee :=_ebag .nextColor (len (_ebag ._afda .Ser ));_bbfd :=_c .NewCT_SurfaceSer ();_ebag ._afda .Ser =append (_ebag ._afda .Ser ,_bbfd );_bbfd .Idx .ValAttr =uint32 (len (_ebag ._afda .Ser )-1);_bbfd .Order .ValAttr =uint32 (len (_ebag ._afda .Ser )-1);_feg :=SurfaceChartSeries {_bbfd };_feg .InitializeDefaults ();_feg .Properties ().LineProperties ().SetSolidFill (_gee );return _feg ;};func (_egg Legend )SetOverlay (b bool ){_egg ._gfe .Overlay =_c .NewCT_Boolean ();_egg ._gfe .Overlay .ValAttr =_f .Bool (b );};
// SetIndex sets the index of the series
func (_deaae ScatterChartSeries )SetIndex (idx uint32 ){_deaae ._abd .Idx .ValAttr =idx };
func (_fff LineChartSeries )SetIndex (idx uint32 ){_fff ._gaa .Idx .ValAttr =idx };func (_bae CategoryAxis )SetMajorTickMark (m _c .ST_TickMark ){if m ==_c .ST_TickMarkUnset {_bae ._bacf .MajorTickMark =nil ;}else {_bae ._bacf .MajorTickMark =_c .NewCT_TickMark ();_bae ._bacf .MajorTickMark .ValAttr =m ;};};
// InitializeDefaults the bar chart to its defaults
func (_egf PieOfPieChart )InitializeDefaults (){_egf ._ggcd .VaryColors =_c .NewCT_Boolean ();_egf ._ggcd .VaryColors .ValAttr =_f .Bool (true );_egf .SetType (_c .ST_OfPieTypePie );_egf ._ggcd .SecondPieSize =_c .NewCT_SecondPieSize ();_egf ._ggcd .SecondPieSize .ValAttr =&_c .ST_SecondPieSize {};_egf ._ggcd .SecondPieSize .ValAttr .ST_SecondPieSizeUShort =_f .Uint16 (75);_afe :=_c .NewCT_ChartLines ();_afe .SpPr =_g .NewCT_ShapeProperties ();_cffa :=_bc .MakeShapeProperties (_afe .SpPr );_cffa .LineProperties ().SetSolidFill (_cf .Auto );_egf ._ggcd .SerLines =append (_egf ._ggcd .SerLines ,_afe );};
// AddSeries adds a default series to a line chart.
func (_egcf LineChart )AddSeries ()LineChartSeries {_bgdd :=_egcf .nextColor (len (_egcf ._bgd .Ser ));_eca :=_c .NewCT_LineSer ();_egcf ._bgd .Ser =append (_egcf ._bgd .Ser ,_eca );_eca .Idx .ValAttr =uint32 (len (_egcf ._bgd .Ser )-1);_eca .Order .ValAttr =uint32 (len (_egcf ._bgd .Ser )-1);_fgf :=LineChartSeries {_eca };_fgf .InitializeDefaults ();_fgf .Properties ().LineProperties ().SetSolidFill (_bgdd );return _fgf ;};
// Order returns the order of the series
func (_dfg ScatterChartSeries )Order ()uint32 {return _dfg ._fbgg .Order .ValAttr };func (_ffeb Legend )SetPosition (p _c .ST_LegendPos ){if p ==_c .ST_LegendPosUnset {_ffeb ._gfe .LegendPos =nil ;}else {_ffeb ._gfe .LegendPos =_c .NewCT_LegendPos ();_ffeb ._gfe .LegendPos .ValAttr =p ;};};
// SetOrder sets the order of the series
func (_ddf LineChartSeries )SetOrder (idx uint32 ){_ddf ._gaa .Order .ValAttr =idx };type CategoryAxis struct{_bacf *_c .CT_CatAx };func (_bagb DataLabels )SetPosition (p _c .ST_DLblPos ){_bagb .ensureChoice ();_bagb ._fge .Choice .DLblPos =_c .NewCT_DLblPos ();_bagb ._fge .Choice .DLblPos .ValAttr =p ;};
// SetDirection changes the direction of the bar chart (bar or column).
func (_aae BarChart )SetDirection (d _c .ST_BarDir ){_aae ._ab .BarDir .ValAttr =d };func (_cga CategoryAxis )SetTickLabelPosition (p _c .ST_TickLblPos ){if p ==_c .ST_TickLblPosUnset {_cga ._bacf .TickLblPos =nil ;}else {_cga ._bacf .TickLblPos =_c .NewCT_TickLblPos ();_cga ._bacf .TickLblPos .ValAttr =p ;};};
// X returns the inner wrapped XML type.
func (_gbcc RadarChart )X ()*_c .CT_RadarChart {return _gbcc ._ede };func (_ce CategoryAxis )Properties ()_bc .ShapeProperties {if _ce ._bacf .SpPr ==nil {_ce ._bacf .SpPr =_g .NewCT_ShapeProperties ();};return _bc .MakeShapeProperties (_ce ._bacf .SpPr );};
// SetValues sets values directly on a source.
func (_cbf NumberDataSource )SetValues (v []float64 ){_cbf .ensureChoice ();_cbf ._badd .Choice .NumRef =nil ;_cbf ._badd .Choice .NumLit =_c .NewCT_NumData ();_cbf ._badd .Choice .NumLit .PtCount =_c .NewCT_UnsignedInt ();_cbf ._badd .Choice .NumLit .PtCount .ValAttr =uint32 (len (v ));for _gbc ,_bccc :=range v {_cbf ._badd .Choice .NumLit .Pt =append (_cbf ._badd .Choice .NumLit .Pt ,&_c .CT_NumVal {IdxAttr :uint32 (_gbc ),V :_b .Sprintf ("\u0025\u0067",_bccc )});};};func (_faa Bar3DChart )AddAxis (axis Axis ){_ddb :=_c .NewCT_UnsignedInt ();_ddb .ValAttr =axis .AxisID ();_faa ._dg .AxId =append (_faa ._dg .AxId ,_ddb );};
// X returns the inner wrapped XML type.
func (_dbgc SeriesAxis )X ()*_c .CT_SerAx {return _dbgc ._gdfa };
// Values returns the bubble size data source.
func (_ga BubbleChartSeries )BubbleSizes ()NumberDataSource {if _ga ._eae .BubbleSize ==nil {_ga ._eae .BubbleSize =_c .NewCT_NumDataSource ();};return MakeNumberDataSource (_ga ._eae .BubbleSize );};
// AddAxis adds an axis to a line chart.
func (_gbg LineChart )AddAxis (axis Axis ){_egcb :=_c .NewCT_UnsignedInt ();_egcb .ValAttr =axis .AxisID ();_gbg ._bgd .AxId =append (_gbg ._bgd .AxId ,_egcb );};
// AddSurface3DChart adds a new 3D surface chart to a chart.
func (_dd Chart )AddSurface3DChart ()Surface3DChart {_egb :=_f .NewCT_PlotAreaChoice ();_dd ._cfad .Chart .PlotArea .Choice =append (_dd ._cfad .Chart .PlotArea .Choice ,_egb );_egb .Surface3DChart =_f .NewCT_Surface3DChart ();_fbc (_dd ._cfad .Chart );_cdc :=Surface3DChart {_dcbd :_egb .Surface3DChart };_cdc .InitializeDefaults ();return _cdc ;};func (_bf CategoryAxis )InitializeDefaults (){_bf .SetPosition (_f .ST_AxPosB );_bf .SetMajorTickMark (_f .ST_TickMarkOut );_bf .SetMinorTickMark (_f .ST_TickMarkIn );_bf .SetTickLabelPosition (_f .ST_TickLblPosNextTo );_bf .MajorGridLines ().Properties ().LineProperties ().SetSolidFill (_fa .LightGray );_bf .Properties ().LineProperties ().SetSolidFill (_fa .Black );};
func (_ffc Chart )AddSurface3DChart ()Surface3DChart {_gea :=_c .NewCT_PlotAreaChoice ();_ffc ._dgb .Chart .PlotArea .Choice =append (_ffc ._dgb .Chart .PlotArea .Choice ,_gea );_gea .Surface3DChart =_c .NewCT_Surface3DChart ();_caa (_ffc ._dgb .Chart );_fce :=Surface3DChart {_egae :_gea .Surface3DChart };_fce .InitializeDefaults ();return _fce ;};
// X returns the inner wrapped XML type.
func (_bde AreaChartSeries )X ()*_c .CT_AreaSer {return _bde ._eg };
// AddAxis adds an axis to a Scatter chart.
func (_dcef ScatterChart )AddAxis (axis Axis ){_bcf :=_c .NewCT_UnsignedInt ();_bcf .ValAttr =axis .AxisID ();_dcef ._gda .AxId =append (_dcef ._gda .AxId ,_bcf );};func (_fdf CategoryAxis )SetMinorTickMark (m _c .ST_TickMark ){if m ==_c .ST_TickMarkUnset {_fdf ._bacf .MinorTickMark =nil ;}else {_fdf ._bacf .MinorTickMark =_c .NewCT_TickMark ();_fdf ._bacf .MinorTickMark .ValAttr =m ;};};
// RadarChart is an Radar chart that has a shaded Radar underneath a curve.
type RadarChart struct{chartBase ;_ede *_c .CT_RadarChart ;};func (_bcb GridLines )Properties ()_bc .ShapeProperties {if _bcb ._bda .SpPr ==nil {_bcb ._bda .SpPr =_g .NewCT_ShapeProperties ();};return _bc .MakeShapeProperties (_bcb ._bda .SpPr );};type ScatterChart struct{chartBase ;_gda *_c .CT_ScatterChart ;};var NullAxis Axis =nullAxis (0);
// X returns the inner wrapped XML type.
func (_dce DoughnutChart )X ()*_c .CT_DoughnutChart {return _dce ._deg };
// AddSeries adds a default series to a bar chart.
func (_aba BarChart )AddSeries ()BarChartSeries {_gd :=_aba .nextColor (len (_aba ._ab .Ser ));_af :=_c .NewCT_BarSer ();_aba ._ab .Ser =append (_aba ._ab .Ser ,_af );_af .Idx .ValAttr =uint32 (len (_aba ._ab .Ser )-1);_af .Order .ValAttr =uint32 (len (_aba ._ab .Ser )-1);_fcg :=BarChartSeries {_af };_fcg .InitializeDefaults ();_fcg .Properties ().SetSolidFill (_gd );return _fcg ;};
// X returns the inner wrapped XML type.
func (_cgg Line3DChart )X ()*_c .CT_Line3DChart {return _cgg ._dbde };
// X returns the inner wrapped XML type.
func (_bdg ScatterChart )X ()*_c .CT_ScatterChart {return _bdg ._gda };func (_fag BarChart )AddAxis (axis Axis ){_fbe :=_c .NewCT_UnsignedInt ();_fbe .ValAttr =axis .AxisID ();_fag ._ab .AxId =append (_fag ._ab .AxId ,_fbe );};func (_baff ValueAxis )Properties ()_bc .ShapeProperties {if _baff ._ffga .SpPr ==nil {_baff ._ffga .SpPr =_g .NewCT_ShapeProperties ();};return _bc .MakeShapeProperties (_baff ._ffga .SpPr );};
// Area3DChart is an area chart that has a shaded area underneath a curve.
type Area3DChart struct{chartBase ;_dda *_c .CT_Area3DChart ;};
// SetText sets the series text.
func (_adda RadarChartSeries )SetText (s string ){_adda ._dceb .Tx =_c .NewCT_SerTx ();_adda ._dceb .Tx .Choice .V =&s ;};
// InitializeDefaults the bar chart to its defaults
func (_adac RadarChart )InitializeDefaults (){_adac ._ede .RadarStyle .ValAttr =_c .ST_RadarStyleMarker };
// SetIndex sets the index of the series
func (_cac SurfaceChartSeries )SetIndex (idx uint32 ){_cac ._abe .Idx .ValAttr =idx };func MakeNumberDataSource (x *_c .CT_NumDataSource )NumberDataSource {return NumberDataSource {x }};
// Properties returns the line chart series shape properties.
func (_ggc LineChartSeries )Properties ()_bc .ShapeProperties {if _ggc ._gaa .SpPr ==nil {_ggc ._gaa .SpPr =_g .NewCT_ShapeProperties ();};return _bc .MakeShapeProperties (_ggc ._gaa .SpPr );};
// X returns the inner wrapped XML type.
func (_fbg Bar3DChart )X ()*_c .CT_Bar3DChart {return _fbg ._dg };
// InitializeDefaults initializes an Pie series to the default values.
func (_bccf PieChartSeries )InitializeDefaults (){};
// InitializeDefaults the bar chart to its defaults
func (_aafc Pie3DChart )InitializeDefaults (){_aafc ._eba .VaryColors =_c .NewCT_Boolean ();_aafc ._eba .VaryColors .ValAttr =_f .Bool (true );};
// SetText sets the series text.
func (_fcc BarChartSeries )SetText (s string ){_fcc ._aaf .Tx =_c .NewCT_SerTx ();_fcc ._aaf .Tx .Choice .V =&s ;};
// SetIndex sets the index of the series
func (_afd ScatterChartSeries )SetIndex (idx uint32 ){_afd ._fbgg .Idx .ValAttr =idx };
// AddSeries adds a default series to an Radar chart.
func (_ecf RadarChart )AddSeries ()RadarChartSeries {_cdd :=_ecf .nextColor (len (_ecf ._ede .Ser ));_faada :=_c .NewCT_RadarSer ();_ecf ._ede .Ser =append (_ecf ._ede .Ser ,_faada );_faada .Idx .ValAttr =uint32 (len (_ecf ._ede .Ser )-1);_faada .Order .ValAttr =uint32 (len (_ecf ._ede .Ser )-1);_cgda :=RadarChartSeries {_faada };_cgda .InitializeDefaults ();_cgda .Properties ().SetSolidFill (_cdd );return _cgda ;};
// X returns the inner wrapped XML type.
func (_ec BarChartSeries )X ()*_c .CT_BarSer {return _ec ._aaf };
// RadarChartSeries is a series to be used on an Radar chart.
type RadarChartSeries struct{_dceb *_c .CT_RadarSer };
// AddSeries adds a default series to a Surface chart.
func (_cgcd Surface3DChart )AddSeries ()SurfaceChartSeries {_ebdf :=_cgcd .nextColor (len (_cgcd ._egae .Ser ));_afad :=_c .NewCT_SurfaceSer ();_cgcd ._egae .Ser =append (_cgcd ._egae .Ser ,_afad );_afad .Idx .ValAttr =uint32 (len (_cgcd ._egae .Ser )-1);_afad .Order .ValAttr =uint32 (len (_cgcd ._egae .Ser )-1);_bbf :=SurfaceChartSeries {_afad };_bbf .InitializeDefaults ();_bbf .Properties ().LineProperties ().SetSolidFill (_ebdf );return _bbf ;};type NumberDataSource struct{_badd *_c .CT_NumDataSource };
// InitializeDefaults the Stock chart to its defaults
func (_caab StockChart )InitializeDefaults (){_caab ._bfa .HiLowLines =_c .NewCT_ChartLines ();_caab ._bfa .UpDownBars =_c .NewCT_UpDownBars ();_caab ._bfa .UpDownBars .GapWidth =_c .NewCT_GapAmount ();_caab ._bfa .UpDownBars .GapWidth .ValAttr =&_c .ST_GapAmount {};_caab ._bfa .UpDownBars .GapWidth .ValAttr .ST_GapAmountUShort =_f .Uint16 (150);_caab ._bfa .UpDownBars .UpBars =_c .NewCT_UpDownBar ();_caab ._bfa .UpDownBars .DownBars =_c .NewCT_UpDownBar ();};func (_dfb CategoryAxis )InitializeDefaults (){_dfb .SetPosition (_c .ST_AxPosB );_dfb .SetMajorTickMark (_c .ST_TickMarkOut );_dfb .SetMinorTickMark (_c .ST_TickMarkIn );_dfb .SetTickLabelPosition (_c .ST_TickLblPosNextTo );_dfb .MajorGridLines ().Properties ().LineProperties ().SetSolidFill (_cf .LightGray );_dfb .Properties ().LineProperties ().SetSolidFill (_cf .Black );};
// AddSurfaceChart adds a new surface chart to a chart.
func (_geb Chart )AddSurfaceChart ()SurfaceChart {_fde :=_c .NewCT_PlotAreaChoice ();_geb ._dgb .Chart .PlotArea .Choice =append (_geb ._dgb .Chart .PlotArea .Choice ,_fde );_fde .SurfaceChart =_c .NewCT_SurfaceChart ();_caa (_geb ._dgb .Chart );_geb ._dgb .Chart .View3D .RotX .ValAttr =_f .Int8 (90);_geb ._dgb .Chart .View3D .RotY .ValAttr =_f .Uint16 (0);_geb ._dgb .Chart .View3D .Perspective =_c .NewCT_Perspective ();_geb ._dgb .Chart .View3D .Perspective .ValAttr =_f .Uint8 (0);_afa :=SurfaceChart {_afda :_fde .SurfaceChart };_afa .InitializeDefaults ();return _afa ;};
// PieOfPieChart is a Pie chart with an extra Pie chart.
type PieOfPieChart struct{chartBase ;_ggcd *_c .CT_OfPieChart ;};func (_bfbc ValueAxis )SetPosition (p _c .ST_AxPos ){_bfbc ._ffga .AxPos =_c .NewCT_AxPos ();_bfbc ._ffga .AxPos .ValAttr =p ;};
// SetExplosion sets the value that the segements of the pie are 'exploded' by
func (_bdbb PieChartSeries )SetExplosion (v uint32 ){_bdbb ._dbc .Explosion =_c .NewCT_UnsignedInt ();_bdbb ._dbc .Explosion .ValAttr =v ;};func (_cfcc DateAxis )Properties ()_bc .ShapeProperties {if _cfcc ._efc .SpPr ==nil {_cfcc ._efc .SpPr =_g .NewCT_ShapeProperties ();};return _bc .MakeShapeProperties (_cfcc ._efc .SpPr );};func (_fga DataLabels )ensureChoice (){if _fga ._fge .Choice ==nil {_fga ._fge .Choice =_c .NewCT_DLblsChoice ();};};func (_aebe SurfaceChartSeries )CategoryAxis ()CategoryAxisDataSource {if _aebe ._abe .Cat ==nil {_aebe ._abe .Cat =_c .NewCT_AxDataSource ();};return MakeAxisDataSource (_aebe ._abe .Cat );};
// X returns the inner wrapped XML type.
func (_dgc SurfaceChartSeries )X ()*_c .CT_SurfaceSer {return _dgc ._abe };
// InitializeDefaults the Bubble chart to its defaults
func (_bac BubbleChart )InitializeDefaults (){};
// AddAxis adds an axis to a Surface chart.
func (_efca Surface3DChart )AddAxis (axis Axis ){_fad :=_c .NewCT_UnsignedInt ();_fad .ValAttr =axis .AxisID ();_efca ._egae .AxId =append (_efca ._egae .AxId ,_fad );};
// AddSeries adds a default series to an area chart.
func (_fb Area3DChart )AddSeries ()AreaChartSeries {_e :=_fb .nextColor (len (_fb ._dda .Ser ));_fe :=_c .NewCT_AreaSer ();_fb ._dda .Ser =append (_fb ._dda .Ser ,_fe );_fe .Idx .ValAttr =uint32 (len (_fb ._dda .Ser )-1);_fe .Order .ValAttr =uint32 (len (_fb ._dda .Ser )-1);_aa :=AreaChartSeries {_fe };_aa .InitializeDefaults ();_aa .Properties ().SetSolidFill (_e );return _aa ;};type Line3DChart struct{chartBase ;_dbde *_c .CT_Line3DChart ;};
// SetDirection changes the direction of the bar chart (bar or column).
func (_dbd Bar3DChart )SetDirection (d _c .ST_BarDir ){_dbd ._dg .BarDir .ValAttr =d };func (_ebe DataLabels )SetShowValue (b bool ){_ebe .ensureChoice ();_ebe ._fge .Choice .ShowVal =_c .NewCT_Boolean ();_ebe ._fge .Choice .ShowVal .ValAttr =_f .Bool (b );};
// X returns the inner wrapped XML type.
func (_cfge Marker )X ()*_c .CT_Marker {return _cfge ._afb };
// BarChart is a 2D bar chart.
type BarChart struct{chartBase ;_ab *_c .CT_BarChart ;};
// DoughnutChart is a Doughnut chart.
type DoughnutChart struct{chartBase ;_deg *_c .CT_DoughnutChart ;};
// X returns the inner wrapped XML type.
func (_bfc RadarChartSeries )X ()*_c .CT_RadarSer {return _bfc ._dceb };
// CategoryAxis returns the category data source.
func (_aead RadarChartSeries )CategoryAxis ()CategoryAxisDataSource {if _aead ._dceb .Cat ==nil {_aead ._dceb .Cat =_c .NewCT_AxDataSource ();};return MakeAxisDataSource (_aead ._dceb .Cat );};func MakeSeriesAxis (x *_c .CT_SerAx )SeriesAxis {return SeriesAxis {x }};
// AddArea3DChart adds a new area chart to a chart.
func (_ged Chart )AddArea3DChart ()Area3DChart {_caa (_ged ._dgb .Chart );_dcg :=_c .NewCT_PlotAreaChoice ();_ged ._dgb .Chart .PlotArea .Choice =append (_ged ._dgb .Chart .PlotArea .Choice ,_dcg );_dcg .Area3DChart =_c .NewCT_Area3DChart ();_cae :=Area3DChart {_dda :_dcg .Area3DChart };_cae .InitializeDefaults ();return _cae ;};func (_gcg Surface3DChart )InitializeDefaults (){_gcg ._egae .Wireframe =_c .NewCT_Boolean ();_gcg ._egae .Wireframe .ValAttr =_f .Bool (false );_gcg ._egae .BandFmts =_c .NewCT_BandFmts ();for _cagg :=0;_cagg < 15;_cagg ++{_fed :=_c .NewCT_BandFmt ();_fed .Idx .ValAttr =uint32 (_cagg );_fed .SpPr =_g .NewCT_ShapeProperties ();_baf :=_bc .MakeShapeProperties (_fed .SpPr );_baf .SetSolidFill (_gcg .nextColor (_cagg ));_gcg ._egae .BandFmts .BandFmt =append (_gcg ._egae .BandFmts .BandFmt ,_fed );};};func (_gef SurfaceChart )InitializeDefaults (){_gef ._afda .Wireframe =_c .NewCT_Boolean ();_gef ._afda .Wireframe .ValAttr =_f .Bool (false );_gef ._afda .BandFmts =_c .NewCT_BandFmts ();for _fbcf :=0;_fbcf < 15;_fbcf ++{_abf :=_c .NewCT_BandFmt ();_abf .Idx .ValAttr =uint32 (_fbcf );_abf .SpPr =_g .NewCT_ShapeProperties ();_afeg :=_bc .MakeShapeProperties (_abf .SpPr );_afeg .SetSolidFill (_gef .nextColor (_fbcf ));_gef ._afda .BandFmts .BandFmt =append (_gef ._afda .BandFmts .BandFmt ,_abf );};};
// MakeAxisDataSource constructs an AxisDataSource wrapper.
func MakeAxisDataSource (x *_c .CT_AxDataSource )CategoryAxisDataSource {return CategoryAxisDataSource {x };};func (_bedf DataLabels )SetShowLegendKey (b bool ){_bedf .ensureChoice ();_bedf ._fge .Choice .ShowLegendKey =_c .NewCT_Boolean ();_bedf ._fge .Choice .ShowLegendKey .ValAttr =_f .Bool (b );};
// X returns the inner wrapped XML type.
func (_gdad StockChart )X ()*_c .CT_StockChart {return _gdad ._bfa };func (_gae DateAxis )SetPosition (p _c .ST_AxPos ){_gae ._efc .AxPos =_c .NewCT_AxPos ();_gae ._efc .AxPos .ValAttr =p ;};
// InitializeDefaults initializes a bar chart series to the default values.
func (_cag BarChartSeries )InitializeDefaults (){};
// AddLine3DChart adds a new 3D line chart to a chart.
func (_aag Chart )AddLine3DChart ()Line3DChart {_caa (_aag ._dgb .Chart );_cabb :=_c .NewCT_PlotAreaChoice ();_aag ._dgb .Chart .PlotArea .Choice =append (_aag ._dgb .Chart .PlotArea .Choice ,_cabb );_cabb .Line3DChart =_c .NewCT_Line3DChart ();_cabb .Line3DChart .Grouping =_c .NewCT_Grouping ();_cabb .Line3DChart .Grouping .ValAttr =_c .ST_GroupingStandard ;return Line3DChart {_dbde :_cabb .Line3DChart };};
// SetHoleSize controls the hole size in the pie chart and is measured in percent.
func (_dge DoughnutChart )SetHoleSize (pct uint8 ){if _dge ._deg .HoleSize ==nil {_dge ._deg .HoleSize =_c .NewCT_HoleSize ();};if _dge ._deg .HoleSize .ValAttr ==nil {_dge ._deg .HoleSize .ValAttr =&_c .ST_HoleSize {};};_dge ._deg .HoleSize .ValAttr .ST_HoleSizeUByte =&pct ;};func MakeTitle (x *_c .CT_Title )Title {return Title {x }};
// PieChart is a Pie chart.
type PieChart struct{chartBase ;_bdb *_c .CT_PieChart ;};func (_caag Marker )Properties ()_bc .ShapeProperties {if _caag ._afb .SpPr ==nil {_caag ._afb .SpPr =_g .NewCT_ShapeProperties ();};return _bc .MakeShapeProperties (_caag ._afb .SpPr );};
// StockChart is a 2D Stock chart.
type StockChart struct{chartBase ;_bfa *_c .CT_StockChart ;};
// AddBarChart adds a new bar chart to a chart.
func (_bfb Chart )AddBarChart ()BarChart {_bg :=_c .NewCT_PlotAreaChoice ();_bfb ._dgb .Chart .PlotArea .Choice =append (_bfb ._dgb .Chart .PlotArea .Choice ,_bg );_bg .BarChart =_c .NewCT_BarChart ();_bg .BarChart .Grouping =_c .NewCT_BarGrouping ();_bg .BarChart .Grouping .ValAttr =_c .ST_BarGroupingStandard ;_adgc :=BarChart {_ab :_bg .BarChart };_adgc .InitializeDefaults ();return _adgc ;};
// Bar3DChart is a 3D bar chart.
type Bar3DChart struct{chartBase ;_dg *_c .CT_Bar3DChart ;};func (_fgg Legend )InitializeDefaults (){_fgg .SetPosition (_c .ST_LegendPosR );_fgg .SetOverlay (false );_fgg .Properties ().SetNoFill ();_fgg .Properties ().LineProperties ().SetNoFill ();};func MakeCategoryAxis (x *_c .CT_CatAx )CategoryAxis {return CategoryAxis {x }};
// Values returns the value data source.
func (_egef PieChartSeries )Values ()NumberDataSource {if _egef ._dbc .Val ==nil {_egef ._dbc .Val =_c .NewCT_NumDataSource ();};return MakeNumberDataSource (_egef ._dbc .Val );};
// InitializeDefaults initializes an Radar series to the default values.
func (_dgf RadarChartSeries )InitializeDefaults (){};
// X returns the inner wrapped XML type.
func (_ggcg PieChartSeries )X ()*_c .CT_PieSer {return _ggcg ._dbc };
// X returns the inner wrapped XML type.
func (_cfd LineChartSeries )X ()*_c .CT_LineSer {return _cfd ._gaa };func (_cfg DateAxis )SetCrosses (axis Axis ){_cfg ._efc .CrossAx .ValAttr =axis .AxisID ()};
// X returns the inner wrapped XML type.
func (_cfb BubbleChartSeries )X ()*_c .CT_BubbleSer {return _cfb ._eae };
// AddBar3DChart adds a new 3D bar chart to a chart.
func (_fbag Chart )AddBar3DChart ()Bar3DChart {_caa (_fbag ._dgb .Chart );_fbga :=_c .NewCT_PlotAreaChoice ();_fbag ._dgb .Chart .PlotArea .Choice =append (_fbag ._dgb .Chart .PlotArea .Choice ,_fbga );_fbga .Bar3DChart =_c .NewCT_Bar3DChart ();_fbga .Bar3DChart .Grouping =_c .NewCT_BarGrouping ();_fbga .Bar3DChart .Grouping .ValAttr =_c .ST_BarGroupingStandard ;_gcd :=Bar3DChart {_dg :_fbga .Bar3DChart };_gcd .InitializeDefaults ();return _gcd ;};
// AddSeries adds a default series to a line chart.
func (_dcgb Line3DChart )AddSeries ()LineChartSeries {_bec :=_dcgb .nextColor (len (_dcgb ._dbde .Ser ));_baa :=_c .NewCT_LineSer ();_dcgb ._dbde .Ser =append (_dcgb ._dbde .Ser ,_baa );_baa .Idx .ValAttr =uint32 (len (_dcgb ._dbde .Ser )-1);_baa .Order .ValAttr =uint32 (len (_dcgb ._dbde .Ser )-1);_fac :=LineChartSeries {_baa };_fac .InitializeDefaults ();_fac .Properties ().LineProperties ().SetSolidFill (_bec );_fac .Properties ().SetSolidFill (_bec );return _fac ;};
// CategoryAxis returns the category data source.
func (_ffa BarChartSeries )CategoryAxis ()CategoryAxisDataSource {if _ffa ._aaf .Cat ==nil {_ffa ._aaf .Cat =_c .NewCT_AxDataSource ();};return MakeAxisDataSource (_ffa ._aaf .Cat );};
// Properties returns the chart's shape properties.
func (_cff Chart )Properties ()_bc .ShapeProperties {if _cff ._dgb .SpPr ==nil {_cff ._dgb .SpPr =_g .NewCT_ShapeProperties ();};return _bc .MakeShapeProperties (_cff ._dgb .SpPr );};
// Properties returns the line chart series shape properties.
func (_decb SurfaceChartSeries )Properties ()_bc .ShapeProperties {if _decb ._abe .SpPr ==nil {_decb ._abe .SpPr =_g .NewCT_ShapeProperties ();};return _bc .MakeShapeProperties (_decb ._abe .SpPr );};
// AddSeries adds a default series to an Pie3D chart.
func (_efd Pie3DChart )AddSeries ()PieChartSeries {_ddbg :=_c .NewCT_PieSer ();_efd ._eba .Ser =append (_efd ._eba .Ser ,_ddbg );_ddbg .Idx .ValAttr =uint32 (len (_efd ._eba .Ser )-1);_ddbg .Order .ValAttr =uint32 (len (_efd ._eba .Ser )-1);_eaf :=PieChartSeries {_ddbg };_eaf .InitializeDefaults ();return _eaf ;};
// CategoryAxis returns the category data source.
func (_aef BubbleChartSeries )CategoryAxis ()CategoryAxisDataSource {if _aef ._eae .XVal ==nil {_aef ._eae .XVal =_c .NewCT_AxDataSource ();};return MakeAxisDataSource (_aef ._eae .XVal );};
// Labels returns the data label properties.
func (_ada LineChartSeries )Labels ()DataLabels {if _ada ._gaa .DLbls ==nil {_ada ._gaa .DLbls =_c .NewCT_DLbls ();};return MakeDataLabels (_ada ._gaa .DLbls );};type chartBase struct{};
// BubbleChart is a 2D Bubble chart.
type BubbleChart struct{chartBase ;_ea *_c .CT_BubbleChart ;};func (_dc BubbleChart )AddAxis (axis Axis ){_abc :=_c .NewCT_UnsignedInt ();_abc .ValAttr =axis .AxisID ();_dc ._ea .AxId =append (_dc ._ea .AxId ,_abc );};func (_fba AreaChart )AddAxis (axis Axis ){_cg :=_c .NewCT_UnsignedInt ();_cg .ValAttr =axis .AxisID ();_fba ._ca .AxId =append (_fba ._ca .AxId ,_cg );};
// AddLineChart adds a new line chart to a chart.
func (_bb Chart )AddLineChart ()LineChart {_gbe :=_c .NewCT_PlotAreaChoice ();_bb ._dgb .Chart .PlotArea .Choice =append (_bb ._dgb .Chart .PlotArea .Choice ,_gbe );_gbe .LineChart =_c .NewCT_LineChart ();_gbe .LineChart .Grouping =_c .NewCT_Grouping ();_gbe .LineChart .Grouping .ValAttr =_c .ST_GroupingStandard ;return LineChart {_bgd :_gbe .LineChart };};
// Index returns the index of the series
func (_addc SurfaceChartSeries )Index ()uint32 {return _addc ._abe .Idx .ValAttr };
// CategoryAxis returns the category data source.
func (_dfd PieChartSeries )CategoryAxis ()CategoryAxisDataSource {if _dfd ._dbc .Cat ==nil {_dfd ._dbc .Cat =_c .NewCT_AxDataSource ();};return MakeAxisDataSource (_dfd ._dbc .Cat );};func (_dca RadarChart )AddAxis (axis Axis ){_gaeg :=_c .NewCT_UnsignedInt ();_gaeg .ValAttr =axis .AxisID ();_dca ._ede .AxId =append (_dca ._ede .AxId ,_gaeg );};func (_gff ScatterChartSeries )Values ()NumberDataSource {if _gff ._fbgg .YVal ==nil {_gff ._fbgg .YVal =_c .NewCT_NumDataSource ();};return MakeNumberDataSource (_gff ._fbgg .YVal );};
// AddAxis adds an axis to a line chart.
func (_ddac Line3DChart )AddAxis (axis Axis ){_egb :=_c .NewCT_UnsignedInt ();_egb .ValAttr =axis .AxisID ();_ddac ._dbde .AxId =append (_ddac ._dbde .AxId ,_egb );};
// Properties returns the bar chart series shape properties.
func (_bef RadarChartSeries )Properties ()_bc .ShapeProperties {if _bef ._dceb .SpPr ==nil {_bef ._dceb .SpPr =_g .NewCT_ShapeProperties ();};return _bc .MakeShapeProperties (_bef ._dceb .SpPr );};func (_bacg SeriesAxis )AxisID ()uint32 {return _bacg ._gdfa .AxId .ValAttr };
// AddAxis adds an axis to a Surface chart.
func (_dcb SurfaceChart )AddAxis (axis Axis ){_debf :=_c .NewCT_UnsignedInt ();_debf .ValAttr =axis .AxisID ();_dcb ._afda .AxId =append (_dcb ._afda .AxId ,_debf );};
// AddSeries adds a default series to a Scatter chart.
func (_cdc ScatterChart )AddSeries ()ScatterChartSeries {_bee :=_cdc .nextColor (len (_cdc ._gda .Ser ));_ebac :=_c .NewCT_ScatterSer ();_cdc ._gda .Ser =append (_cdc ._gda .Ser ,_ebac );_ebac .Idx .ValAttr =uint32 (len (_cdc ._gda .Ser )-1);_ebac .Order .ValAttr =uint32 (len (_cdc ._gda .Ser )-1);_dfbf :=ScatterChartSeries {_ebac };_dfbf .InitializeDefaults ();_dfbf .Marker ().Properties ().LineProperties ().SetSolidFill (_bee );_dfbf .Marker ().Properties ().SetSolidFill (_bee );return _dfbf ;};func (_beef SeriesAxis )SetCrosses (axis Axis ){_beef ._gdfa .CrossAx .ValAttr =axis .AxisID ()};
// X returns the inner wrapped XML type.
func (_bcd Chart )X ()*_c .ChartSpace {return _bcd ._dgb };func (_cbc SurfaceChartSeries )Values ()NumberDataSource {if _cbc ._abe .Val ==nil {_cbc ._abe .Val =_c .NewCT_NumDataSource ();};_gfg :=MakeNumberDataSource (_cbc ._abe .Val );_gfg .CreateEmptyNumberCache ();return _gfg ;};
// AddSeries adds a default series to an Doughnut chart.
func (_dbg DoughnutChart )AddSeries ()PieChartSeries {_fbb :=_c .NewCT_PieSer ();_dbg ._deg .Ser =append (_dbg ._deg .Ser ,_fbb );_fbb .Idx .ValAttr =uint32 (len (_dbg ._deg .Ser )-1);_fbb .Order .ValAttr =uint32 (len (_dbg ._deg .Ser )-1);_febf :=PieChartSeries {_fbb };_febf .InitializeDefaults ();return _febf ;};
// SetNumberReference is used to set the source data to a range of cells containing
// numbers.
func (_ffb CategoryAxisDataSource )SetNumberReference (s string ){_ffb ._faad .Choice =_c .NewCT_AxDataSourceChoice ();_ffb ._faad .Choice .NumRef =_c .NewCT_NumRef ();_ffb ._faad .Choice .NumRef .F =s ;};func MakeMarker (x *_c .CT_Marker )Marker {return Marker {x }};func (_acg ValueAxis )SetCrosses (axis Axis ){_acg ._ffga .CrossAx .ValAttr =axis .AxisID ()};
// AddTitle sets a new title on the chart.
func (_ef Chart )AddTitle ()Title {_ef ._dgb .Chart .Title =_c .NewCT_Title ();_ef ._dgb .Chart .Title .Overlay =_c .NewCT_Boolean ();_ef ._dgb .Chart .Title .Overlay .ValAttr =_f .Bool (false );_ef ._dgb .Chart .AutoTitleDeleted =_c .NewCT_Boolean ();_ef ._dgb .Chart .AutoTitleDeleted .ValAttr =_f .Bool (false );_cef :=MakeTitle (_ef ._dgb .Chart .Title );_cef .InitializeDefaults ();return _cef ;};
// SetType sets the type the secone pie to either pie or bar
func (_dfba PieOfPieChart )SetType (t _c .ST_OfPieType ){_dfba ._ggcd .OfPieType .ValAttr =t };func (_aad LineChartSeries )InitializeDefaults (){_aad .Properties ().LineProperties ().SetWidth (1*_d .Point );_aad .Properties ().LineProperties ().SetSolidFill (_cf .Black );_aad .Properties ().LineProperties ().SetJoin (_bc .LineJoinRound );_aad .Marker ().SetSymbol (_c .ST_MarkerStyleNone );_aad .Labels ().SetShowLegendKey (false );_aad .Labels ().SetShowValue (false );_aad .Labels ().SetShowPercent (false );_aad .Labels ().SetShowCategoryName (false );_aad .Labels ().SetShowSeriesName (false );_aad .Labels ().SetShowLeaderLines (false );};func (_adb DateAxis )MajorGridLines ()GridLines {if _adb ._efc .MajorGridlines ==nil {_adb ._efc .MajorGridlines =_c .NewCT_ChartLines ();};return GridLines {_adb ._efc .MajorGridlines };};
// InitializeDefaults the bar chart to its defaults
func (_eacc DoughnutChart )InitializeDefaults (){_eacc ._deg .VaryColors =_c .NewCT_Boolean ();_eacc ._deg .VaryColors .ValAttr =_f .Bool (true );_eacc ._deg .HoleSize =_c .NewCT_HoleSize ();_eacc ._deg .HoleSize .ValAttr =&_c .ST_HoleSize {};_eacc ._deg .HoleSize .ValAttr .ST_HoleSizeUByte =_f .Uint8 (50);};
// X returns the inner wrapped XML type.
func (_egad PieChart )X ()*_c .CT_PieChart {return _egad ._bdb };
// Marker returns the marker properties.
func (_dbgb ScatterChartSeries )Marker ()Marker {if _dbgb ._fbgg .Marker ==nil {_dbgb ._fbgg .Marker =_c .NewCT_Marker ();};return MakeMarker (_dbgb ._fbgg .Marker );};
// AreaChart is an area chart that has a shaded area underneath a curve.
type AreaChart struct{chartBase ;_ca *_c .CT_AreaChart ;};func (_egefg SeriesAxis )InitializeDefaults (){};func (_cde DateAxis )SetTickLabelPosition (p _c .ST_TickLblPos ){if p ==_c .ST_TickLblPosUnset {_cde ._efc .TickLblPos =nil ;}else {_cde ._efc .TickLblPos =_c .NewCT_TickLblPos ();_cde ._efc .TickLblPos .ValAttr =p ;};};
// InitializeDefaults the bar chart to its defaults
func (_cgd Bar3DChart )InitializeDefaults (){_cgd .SetDirection (_c .ST_BarDirCol )};func (_cggb LineChartSeries )CategoryAxis ()CategoryAxisDataSource {if _cggb ._gaa .Cat ==nil {_cggb ._gaa .Cat =_c .NewCT_AxDataSource ();};return MakeAxisDataSource (_cggb ._gaa .Cat );};func (_fdfe DateAxis )SetMinorTickMark (m _c .ST_TickMark ){if m ==_c .ST_TickMarkUnset {_fdfe ._efc .MinorTickMark =nil ;}else {_fdfe ._efc .MinorTickMark =_c .NewCT_TickMark ();_fdfe ._efc .MinorTickMark .ValAttr =m ;};};
// AddPieChart adds a new pie chart to a chart.
func (_ebd Chart )AddPieChart ()PieChart {_ega :=_c .NewCT_PlotAreaChoice ();_ebd ._dgb .Chart .PlotArea .Choice =append (_ebd ._dgb .Chart .PlotArea .Choice ,_ega );_ega .PieChart =_c .NewCT_PieChart ();_ffg :=PieChart {_bdb :_ega .PieChart };_ffg .InitializeDefaults ();return _ffg ;};
// AddSeries adds a default series to a bar chart.
func (_gb Bar3DChart )AddSeries ()BarChartSeries {_ff :=_gb .nextColor (len (_gb ._dg .Ser ));_gbf :=_c .NewCT_BarSer ();_gb ._dg .Ser =append (_gb ._dg .Ser ,_gbf );_gbf .Idx .ValAttr =uint32 (len (_gb ._dg .Ser )-1);_gbf .Order .ValAttr =uint32 (len (_gb ._dg .Ser )-1);_gga :=BarChartSeries {_gbf };_gga .InitializeDefaults ();_gga .Properties ().SetSolidFill (_ff );return _gga ;};
// Properties returns the bar chart series shape properties.
func (_gg AreaChartSeries )Properties ()_bc .ShapeProperties {if _gg ._eg .SpPr ==nil {_gg ._eg .SpPr =_g .NewCT_ShapeProperties ();};return _bc .MakeShapeProperties (_gg ._eg .SpPr );};func (_egfg StockChart )AddAxis (axis Axis ){_abg :=_c .NewCT_UnsignedInt ();_abg .ValAttr =axis .AxisID ();_egfg ._bfa .AxId =append (_egfg ._bfa .AxId ,_abg );};
// SetText sets the series text
func (_cgcg SurfaceChartSeries )SetText (s string ){_cgcg ._abe .Tx =_c .NewCT_SerTx ();_cgcg ._abe .Tx .Choice .V =&s ;};func (_adg CategoryAxis )SetPosition (p _c .ST_AxPos ){_adg ._bacf .AxPos =_c .NewCT_AxPos ();_adg ._bacf .AxPos .ValAttr =p ;};
// InitializeDefaults initializes a Bubble chart series to the default values.
func (_aaa BubbleChartSeries )InitializeDefaults (){};func (_bgdda ScatterChartSeries )SetSmooth (b bool ){_bgdda ._fbgg .Smooth =_c .NewCT_Boolean ();_bgdda ._fbgg .Smooth .ValAttr =&b ;};type SurfaceChartSeries struct{_abe *_c .CT_SurfaceSer };
// CategoryAxis returns the category data source.
func (_ee AreaChartSeries )CategoryAxis ()CategoryAxisDataSource {if _ee ._eg .Cat ==nil {_ee ._eg .Cat =_c .NewCT_AxDataSource ();};return MakeAxisDataSource (_ee ._eg .Cat );};
// InitializeDefaults initializes an area series to the default values.
func (_fd AreaChartSeries )InitializeDefaults (){};var _cdg =[]_cf .Color {_cf .RGB (0x33,0x66,0xcc),_cf .RGB (0xDC,0x39,0x12),_cf .RGB (0xFF,0x99,0x00),_cf .RGB (0x10,0x96,0x18),_cf .RGB (0x99,0x00,0x99),_cf .RGB (0x3B,0x3E,0xAC),_cf .RGB (0x00,0x99,0xC6),_cf .RGB (0xDD,0x44,0x77),_cf .RGB (0x66,0xAA,0x00),_cf .RGB (0xB8,0x2E,0x2E),_cf .RGB (0x31,0x63,0x95),_cf .RGB (0x99,0x44,0x99),_cf .RGB (0x22,0xAA,0x99),_cf .RGB (0xAA,0xAA,0x11),_cf .RGB (0x66,0x33,0xCC),_cf .RGB (0xE6,0x73,0x00),_cf .RGB (0x8B,0x07,0x07),_cf .RGB (0x32,0x92,0x62),_cf .RGB (0x55,0x74,0xA6),_cf .RGB (0x3B,0x3E,0xAC)};
// X returns the inner wrapped XML type.
func (_dcc SurfaceChart )X ()*_c .CT_SurfaceChart {return _dcc ._afda };func (_fdbd Title )InitializeDefaults (){_fdbd .SetText ("\u0054\u0069\u0074l\u0065");_fdbd .RunProperties ().SetSize (16*_d .Point );_fdbd .RunProperties ().SetSolidFill (_cf .Black );_fdbd .RunProperties ().SetFont ("\u0043\u0061\u006c\u0069\u0062\u0020\u0072\u0069");_fdbd .RunProperties ().SetBold (false );};
// InitializeDefaults the bar chart to its defaults
func (_bd AreaChart )InitializeDefaults (){};
// Values returns the value data source.
func (_deb BubbleChartSeries )Values ()NumberDataSource {if _deb ._eae .YVal ==nil {_deb ._eae .YVal =_c .NewCT_NumDataSource ();};return MakeNumberDataSource (_deb ._eae .YVal );};
// BubbleChartSeries is a series to be used on a Bubble chart.
type BubbleChartSeries struct{_eae *_c .CT_BubbleSer };func (_ecc CategoryAxis )AxisID ()uint32 {return _ecc ._bacf .AxId .ValAttr };
// SurfaceChart is a 3D surface chart, viewed from the top-down.
type SurfaceChart struct{chartBase ;_afda *_c .CT_SurfaceChart ;};
// X returns the inner wrapped XML type.
func (_ffcb PieOfPieChart )X ()*_c .CT_OfPieChart {return _ffcb ._ggcd };func (_bbd ScatterChart )InitializeDefaults (){_bbd ._gda .ScatterStyle .ValAttr =_c .ST_ScatterStyleMarker ;};func (_ceb DataLabels )SetShowSeriesName (b bool ){_ceb .ensureChoice ();_ceb ._fge .Choice .ShowSerName =_c .NewCT_Boolean ();_ceb ._fge .Choice .ShowSerName .ValAttr =_f .Bool (b );};type GridLines struct{_bda *_c .CT_ChartLines };
// AddPieOfPieChart adds a new pie chart to a chart.
func (_ggf Chart )AddPieOfPieChart ()PieOfPieChart {_faac :=_c .NewCT_PlotAreaChoice ();_ggf ._dgb .Chart .PlotArea .Choice =append (_ggf ._dgb .Chart .PlotArea .Choice ,_faac );_faac .OfPieChart =_c .NewCT_OfPieChart ();_fbc :=PieOfPieChart {_ggcd :_faac .OfPieChart };_fbc .InitializeDefaults ();return _fbc ;};
// Properties returns the bar chart series shape properties.
func (_bce BarChartSeries )Properties ()_bc .ShapeProperties {if _bce ._aaf .SpPr ==nil {_bce ._aaf .SpPr =_g .NewCT_ShapeProperties ();};return _bc .MakeShapeProperties (_bce ._aaf .SpPr );};func (_gdb Marker )SetSymbol (s _c .ST_MarkerStyle ){if s ==_c .ST_MarkerStyleUnset {_gdb ._afb .Symbol =nil ;}else {_gdb ._afb .Symbol =_c .NewCT_MarkerStyle ();_gdb ._afb .Symbol .ValAttr =s ;};};func (_dae Chart )AddSeriesAxis ()SeriesAxis {_cc :=_c .NewCT_SerAx ();if _dae ._dgb .Chart .PlotArea .CChoice ==nil {_dae ._dgb .Chart .PlotArea .CChoice =_c .NewCT_PlotAreaChoice1 ();};_cc .AxId =_c .NewCT_UnsignedInt ();_cc .AxId .ValAttr =0x7FFFFFFF&_dd .Uint32 ();_dae ._dgb .Chart .PlotArea .CChoice .SerAx =append (_dae ._dgb .Chart .PlotArea .CChoice .SerAx ,_cc );_cc .Delete =_c .NewCT_Boolean ();_cc .Delete .ValAttr =_f .Bool (false );_eed :=MakeSeriesAxis (_cc );_eed .InitializeDefaults ();return _eed ;};func (_afg Title )RunProperties ()_bc .RunProperties {if _afg ._eafe .Tx ==nil {_afg .SetText ("");};if _afg ._eafe .Tx .Choice .Rich .P [0].EG_TextRun [0].R .RPr ==nil {_afg ._eafe .Tx .Choice .Rich .P [0].EG_TextRun [0].R .RPr =_g .NewCT_TextCharacterProperties ();};return _bc .MakeRunProperties (_afg ._eafe .Tx .Choice .Rich .P [0].EG_TextRun [0].R .RPr );};func (_ebef DataLabels )SetShowPercent (b bool ){_ebef .ensureChoice ();_ebef ._fge .Choice .ShowPercent =_c .NewCT_Boolean ();_ebef ._fge .Choice .ShowPercent .ValAttr =_f .Bool (b );};type Legend struct{_gfe *_c .CT_Legend };func (_ffef LineChartSeries )SetSmooth (b bool ){_ffef ._gaa .Smooth =_c .NewCT_Boolean ();_ffef ._gaa .Smooth .ValAttr =&b ;};
// X returns the inner wrapped XML type.
func (_dec Pie3DChart )X ()*_c .CT_Pie3DChart {return _dec ._eba };
// X returns the inner wrapped XML type.
func (_ffab BubbleChart )X ()*_c .CT_BubbleChart {return _ffab ._ea };
// Properties returns the bar chart series shape properties.
func (_gfba PieChartSeries )Properties ()_bc .ShapeProperties {if _gfba ._dbc .SpPr ==nil {_gfba ._dbc .SpPr =_g .NewCT_ShapeProperties ();};return _bc .MakeShapeProperties (_gfba ._dbc .SpPr );};func _caa (_cab *_c .CT_Chart ){_cab .View3D =_c .NewCT_View3D ();_cab .View3D .RotX =_c .NewCT_RotX ();_cab .View3D .RotX .ValAttr =_f .Int8 (15);_cab .View3D .RotY =_c .NewCT_RotY ();_cab .View3D .RotY .ValAttr =_f .Uint16 (20);_cab .View3D .RAngAx =_c .NewCT_Boolean ();_cab .View3D .RAngAx .ValAttr =_f .Bool (false );_cab .Floor =_c .NewCT_Surface ();_cab .Floor .Thickness =_c .NewCT_Thickness ();_cab .Floor .Thickness .ValAttr .Uint32 =_f .Uint32 (0);_cab .SideWall =_c .NewCT_Surface ();_cab .SideWall .Thickness =_c .NewCT_Thickness ();_cab .SideWall .Thickness .ValAttr .Uint32 =_f .Uint32 (0);_cab .BackWall =_c .NewCT_Surface ();_cab .BackWall .Thickness =_c .NewCT_Thickness ();_cab .BackWall .Thickness .ValAttr .Uint32 =_f .Uint32 (0);};
// PieChartSeries is a series to be used on an Pie chart.
type PieChartSeries struct{_dbc *_c .CT_PieSer };func (_fedg ValueAxis )MajorGridLines ()GridLines {if _fedg ._ffga .MajorGridlines ==nil {_fedg ._ffga .MajorGridlines =_c .NewCT_ChartLines ();};return GridLines {_fedg ._ffga .MajorGridlines };};type ValueAxis struct{_ffga *_c .CT_ValAx };
// LineChartSeries is the data series for a line chart.
type LineChartSeries struct{_gaa *_c .CT_LineSer };func (_ccd DataLabels )SetShowLeaderLines (b bool ){_ccd .ensureChoice ();_ccd ._fge .Choice .ShowLeaderLines =_c .NewCT_Boolean ();_ccd ._fge .Choice .ShowLeaderLines .ValAttr =_f .Bool (b );};
// AreaChartSeries is a series to be used on an area chart.
type AreaChartSeries struct{_eg *_c .CT_AreaSer };
// SetLabelReference is used to set the source data to a range of cells
// containing strings.
func (_gge CategoryAxisDataSource )SetLabelReference (s string ){_gge ._faad .Choice =_c .NewCT_AxDataSourceChoice ();_gge ._faad .Choice .StrRef =_c .NewCT_StrRef ();_gge ._faad .Choice .StrRef .F =s ;};func MakeDataLabels (x *_c .CT_DLbls )DataLabels {return DataLabels {x }};
// AddSeries adds a default series to an Pie chart.
func (_aea PieChart )AddSeries ()PieChartSeries {_fef :=_c .NewCT_PieSer ();_aea ._bdb .Ser =append (_aea ._bdb .Ser ,_fef );_fef .Idx .ValAttr =uint32 (len (_aea ._bdb .Ser )-1);_fef .Order .ValAttr =uint32 (len (_aea ._bdb .Ser )-1);_acd :=PieChartSeries {_fef };_acd .InitializeDefaults ();return _acd ;};
// Chart is a generic chart.
type Chart struct{_dgb *_c .ChartSpace };
// SetOrder sets the order of the series
func (_daca SurfaceChartSeries )SetOrder (idx uint32 ){_daca ._abe .Order .ValAttr =idx };
// X returns the inner wrapped XML type.
func (_ge Area3DChart )X ()*_c .CT_Area3DChart {return _ge ._dda };

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

File diff suppressed because one or more lines are too long

View File

@ -13,401 +13,401 @@
// OOXML document formats.
//
// Package common contains common properties used by the subpackages.
package common ;import (_cb "archive/zip";_b "bytes";_gd "encoding/xml";_fa "errors";_ba "fmt";_ff "github.com/unidoc/unioffice";_eg "github.com/unidoc/unioffice/common/logger";_fgb "github.com/unidoc/unioffice/common/tempstorage";_gaf "github.com/unidoc/unioffice/common/tempstorage/diskstore";_dg "github.com/unidoc/unioffice/measurement";_ee "github.com/unidoc/unioffice/schema/soo/dml";_a "github.com/unidoc/unioffice/schema/soo/ofc/custom_properties";_da "github.com/unidoc/unioffice/schema/soo/ofc/docPropsVTypes";_cf "github.com/unidoc/unioffice/schema/soo/ofc/extended_properties";_cbf "github.com/unidoc/unioffice/schema/soo/pkg/content_types";_ac "github.com/unidoc/unioffice/schema/soo/pkg/metadata/core_properties";_faf "github.com/unidoc/unioffice/schema/soo/pkg/relationships";_gc "github.com/unidoc/unioffice/zippkg";_dc "image";_ "image/gif";_ "image/jpeg";_ "image/png";_g "os";_e "reflect";_bb "regexp";_fg "strconv";_ga "strings";_ea "time";);
package common ;import (_d "archive/zip";_c "bytes";_feb "encoding/xml";_ff "errors";_gd "fmt";_bc "github.com/unidoc/unioffice";_aa "github.com/unidoc/unioffice/common/logger";_ef "github.com/unidoc/unioffice/common/tempstorage";_bg "github.com/unidoc/unioffice/common/tempstorage/diskstore";_ag "github.com/unidoc/unioffice/measurement";_fea "github.com/unidoc/unioffice/schema/soo/dml";_af "github.com/unidoc/unioffice/schema/soo/ofc/custom_properties";_de "github.com/unidoc/unioffice/schema/soo/ofc/docPropsVTypes";_bf "github.com/unidoc/unioffice/schema/soo/ofc/extended_properties";_ge "github.com/unidoc/unioffice/schema/soo/pkg/content_types";_dee "github.com/unidoc/unioffice/schema/soo/pkg/metadata/core_properties";_dea "github.com/unidoc/unioffice/schema/soo/pkg/relationships";_cf "github.com/unidoc/unioffice/zippkg";_ab "image";_ "image/gif";_ "image/jpeg";_ "image/png";_bb "os";_f "reflect";_ad "regexp";_gg "strconv";_e "strings";_cb "time";);func (_bgb CustomProperties )SetPropertyAsUi4 (name string ,ui4 uint32 ){_fbdf :=_bgb .getNewProperty (name );_fbdf .Ui4 =&ui4 ;_bgb .setOrReplaceProperty (_fbdf );};
// Rows returns all table rows.
func (_gce Table )Rows ()[]*TableRow {_faac :=_gce ._bcda .Tr ;_abg :=[]*TableRow {};for _ ,_bcag :=range _faac {_abg =append (_abg ,&TableRow {_facb :_bcag });};return _abg ;};const _cgbc =15;func (_eaeg CustomProperties )SetPropertyAsLpstr (name string ,lpstr string ){_cag :=_eaeg .getNewProperty (name );_cag .Lpstr =&lpstr ;_eaeg .setOrReplaceProperty (_cag );};
// SetContentStatus records the content status of the document.
func (_gfe CoreProperties )SetContentStatus (s string ){_gfe ._dca .ContentStatus =&s };
// CopyRelationship copies the relationship.
func (_efcf Relationships )CopyRelationship (idAttr string )(Relationship ,bool ){for _fga :=range _efcf ._fffg .Relationship {if _efcf ._fffg .Relationship [_fga ].IdAttr ==idAttr {_aba :=*_efcf ._fffg .Relationship [_fga ];_cggg :=len (_efcf ._fffg .Relationship )+1;_aaea :=map[string ]struct{}{};for _ ,_dbe :=range _efcf ._fffg .Relationship {_aaea [_dbe .IdAttr ]=struct{}{};};for _ ,_ebg :=_aaea [_ba .Sprintf ("\u0072\u0049\u0064%\u0064",_cggg )];_ebg ;_ ,_ebg =_aaea [_ba .Sprintf ("\u0072\u0049\u0064%\u0064",_cggg )]{_cggg ++;};_aba .IdAttr =_ba .Sprintf ("\u0072\u0049\u0064%\u0064",_cggg );_efcf ._fffg .Relationship =append (_efcf ._fffg .Relationship ,&_aba );return Relationship {_bcd :&_aba },true ;};};return Relationship {},false ;};
// Description returns the description of the document
func (_edd CoreProperties )Description ()string {if _edd ._dca .Description !=nil {return string (_edd ._dca .Description .Data );};return "";};
// 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 (_gcd ImageRef )RelativeHeight (w _dg .Distance )_dg .Distance {_gb :=float64 (_gcd .Size ().Y )/float64 (_gcd .Size ().X );return w *_dg .Distance (_gb );};
// Target returns the target (path) of a relationship.
func (_aebg Relationship )Target ()string {return _aebg ._dgc .TargetAttr };func (_cefc CustomProperties )SetPropertyAsI4 (name string ,i4 int32 ){_afb :=_cefc .getNewProperty (name );_afb .I4 =&i4 ;_cefc .setOrReplaceProperty (_afb );};
// SetModified sets the time that the document was modified.
func (_eef CoreProperties )SetModified (t _ea .Time ){_eef ._aae .Modified =_dcb (t ,"\u0064\u0063t\u0065\u0072\u006ds\u003a\u006d\u006f\u0064\u0069\u0066\u0069\u0065\u0064");};
// ImageRef is a reference to an image within a document.
type ImageRef struct{_eab *DocBase ;_efdd Relationships ;_dba Image ;_abcc string ;_fdf string ;};
// 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 (_bgc AppProperties )Pages ()int32 {if _bgc ._aged .Pages !=nil {return *_bgc ._aged .Pages ;};return 0;};func (_gae CustomProperties )SetPropertyAsCy (name string ,cy string ){_aaa :=_gae .getNewProperty (name );_aaa .Cy =&cy ;_gae .setOrReplaceProperty (_aaa );};
// CopyOverride copies override content type for a given `path` and puts it with a path `newPath`.
func (_gec ContentTypes )CopyOverride (path ,newPath string ){if !_e .HasPrefix (path ,"\u002f"){path ="\u002f"+path ;};if !_e .HasPrefix (newPath ,"\u002f"){newPath ="\u002f"+newPath ;};for _gggb :=range _gec ._bfd .Override {if _gec ._bfd .Override [_gggb ].PartNameAttr ==path {_fba :=*_gec ._bfd .Override [_gggb ];_fba .PartNameAttr =newPath ;_gec ._bfd .Override =append (_gec ._bfd .Override ,&_fba );};};};
// NewRelationshipsCopy creates a new relationships wrapper as a copy of passed in instance.
func NewRelationshipsCopy (rels Relationships )Relationships {_fbgg :=*rels ._fffg ;return Relationships {_fffg :&_fbgg };};
// TableCol represents a column in a table.
type TableCol struct{_ebga *_fea .CT_TableCol };
// 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 (_dda *DocBase )AddExtraFileFromZip (f *_cb .File )error {_dbd ,_dafe :=_gc .ExtractToDiskTmp (f ,_dda .TmpPath );if _dafe !=nil {return _ba .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",_dafe );};_dda .ExtraFiles =append (_dda .ExtraFiles ,ExtraFile {ZipPath :f .Name ,DiskPath :_dbd });return nil ;};func (_egff CustomProperties )SetPropertyAsI4 (name string ,i4 int32 ){_ffca :=_egff .getNewProperty (name );_ffca .I4 =&i4 ;_egff .setOrReplaceProperty (_ffca );};
// X returns the inner wrapped XML type.
func (_baa CoreProperties )X ()*_dee .CoreProperties {return _baa ._dca };func (_abad CustomProperties )SetPropertyAsCy (name string ,cy string ){_fge :=_abad .getNewProperty (name );_fge .Cy =&cy ;_abad .setOrReplaceProperty (_fge );};
// Hyperlink is just an appropriately configured relationship.
type Hyperlink Relationship ;func (_dfa Relationship )String ()string {return _ba .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",_dfa .ID (),_dfa .Target (),_dfa .Type ());};
// SetDescription records the description of the document.
func (_gdg CoreProperties )SetDescription (s string ){if _gdg ._aae .Description ==nil {_gdg ._aae .Description =&_ff .XSDAny {XMLName :_gd .Name {Local :"\u0064\u0063\u003a\u0064\u0065\u0073\u0063\u0072\u0069p\u0074\u0069\u006f\u006e"}};};_gdg ._aae .Description .Data =[]byte (s );};func (_fdf CustomProperties )SetPropertyAsUi4 (name string ,ui4 uint32 ){_bfde :=_fdf .getNewProperty (name );_bfde .Ui4 =&ui4 ;_fdf .setOrReplaceProperty (_bfde );};
// SetLinksUpToDate sets the links up to date flag.
func (_beb AppProperties )SetLinksUpToDate (v bool ){_beb ._aged .LinksUpToDate =_ff .Bool (v )};
// NewRelationships creates a new relationship wrapper.
func NewRelationships ()Relationships {return Relationships {_fffg :_faf .NewRelationships ()}};func (_gcfa CustomProperties )SetPropertyAsUi8 (name string ,ui8 uint64 ){_gfd :=_gcfa .getNewProperty (name );_gfd .Ui8 =&ui8 ;_gcfa .setOrReplaceProperty (_gfd );};
// SetTarget set the target (path) of a relationship.
func (_dbff Relationship )SetTarget (s string ){_dbff ._bcd .TargetAttr =s };
// NewRelationship constructs a new relationship.
func NewRelationship ()Relationship {return Relationship {_bcd :_faf .NewRelationship ()}};
// EnsureOverride ensures that an override for the given path exists, adding it if necessary
func (_ege ContentTypes )EnsureOverride (path ,contentType string ){for _ ,_caf :=range _ege ._bbb .Override {if _caf .PartNameAttr ==path {if _ga .HasPrefix (contentType ,"\u0068\u0074\u0074\u0070"){_eg .Log .Debug ("\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 );};_caf .ContentTypeAttr =contentType ;return ;};};_ege .AddOverride (path ,contentType );};
// X returns the inner wrapped XML type.
func (_gdaf TableStyles )X ()*_fea .TblStyleLst {return _gdaf ._edgc };func (_dae CustomProperties )setProperty (_bec *_af .CT_Property ){_dae .setPropertyHelper (_bec ,false )};
// CoreProperties contains document specific properties.
type CoreProperties struct{_aae *_ac .CoreProperties };
type CoreProperties struct{_dca *_dee .CoreProperties };
// TableRow represents a row in a table.
type TableRow struct{_facb *_ee .CT_TableRow };func (_gfb CustomProperties )SetPropertyAsVector (name string ,vector *_da .Vector ){_bfd :=_gfb .getNewProperty (name );_bfd .Vector =vector ;_gfb .setOrReplaceProperty (_bfd );};
// SetLinksUpToDate sets the links up to date flag.
func (_cdd AppProperties )SetLinksUpToDate (v bool ){_cdd ._deg .LinksUpToDate =_bc .Bool (v )};
// CreateCustomProperties creates the custom properties of the document.
func (_cec *DocBase )CreateCustomProperties (){_cec .CustomProperties =NewCustomProperties ();_cec .AddCustomRelationships ();};
// SetOffsetY sets vertical offset of a table in distance units (see measurement package).
func (_geba Table )SetOffsetY (offY float64 ){if _geba ._bcgd .Off ==nil {_geba ._bcgd .Off =_fea .NewCT_Point2D ();_acae :=int64 (0);_geba ._bcgd .Off .XAttr =_fea .ST_Coordinate {ST_CoordinateUnqualified :&_acae };};_aegfd :=_ag .ToEMU (offY );_geba ._bcgd .Off .YAttr =_fea .ST_Coordinate {ST_CoordinateUnqualified :&_aegfd };};
// RemoveOverride removes an override given a path.
func (_fgg ContentTypes )RemoveOverride (path string ){if !_ga .HasPrefix (path ,"\u002f"){path ="\u002f"+path ;};for _eca ,_ffb :=range _fgg ._bbb .Override {if _ffb .PartNameAttr ==path {copy (_fgg ._bbb .Override [_eca :],_fgg ._bbb .Override [_eca +1:]);_fgg ._bbb .Override =_fgg ._bbb .Override [0:len (_fgg ._bbb .Override )-1];};};};func (_dga CustomProperties )getNewProperty (_ed string )*_a .CT_Property {_bae :=_dga ._gge .Property ;_afff :=int32 (1);for _ ,_aege :=range _bae {if _aege .PidAttr > _afff {_afff =_aege .PidAttr ;};};_dacb :=_a .NewCT_Property ();_dacb .NameAttr =&_ed ;_dacb .PidAttr =_afff +1;_dacb .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 _dacb ;};
// SetCreated sets the time that the document was created.
func (_bfa CoreProperties )SetCreated (t _cb .Time ){_bfa ._dca .Created =_eeb (t ,"\u0064c\u0074e\u0072\u006d\u0073\u003a\u0063\u0072\u0065\u0061\u0074\u0065\u0064");};
// AddOverride adds an override content type for a given path name.
func (_bca ContentTypes )AddOverride (path ,contentType string ){if !_ga .HasPrefix (path ,"\u002f"){path ="\u002f"+path ;};if _ga .HasPrefix (contentType ,"\u0068\u0074\u0074\u0070"){_eg .Log .Debug ("\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 _ ,_cc :=range _bca ._bbb .Override {if _cc .PartNameAttr ==path &&_cc .ContentTypeAttr ==contentType {return ;};};_ffcf :=_cbf .NewOverride ();_ffcf .PartNameAttr =path ;_ffcf .ContentTypeAttr =contentType ;_bca ._bbb .Override =append (_bca ._bbb .Override ,_ffcf );};
// X returns the inner wrapped XML type.
func (_afc AppProperties )X ()*_bf .Properties {return _afc ._deg };
// Title returns the Title of the document
func (_fde CoreProperties )Title ()string {if _fde ._aae .Title !=nil {return string (_fde ._aae .Title .Data );};return "";};
// DefAttr returns the DefAttr property.
func (_faa TableStyles )DefAttr ()string {return _faa ._edgc .DefAttr };
// 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 (_dde Relationships )AddAutoRelationship (dt _ff .DocType ,src string ,idx int ,ctype string )Relationship {return _dde .AddRelationship (_ff .RelativeFilename (dt ,src ,ctype ,idx ),ctype );};
// SetLanguage records the language of the document.
func (_fbd CoreProperties )SetLanguage (s string ){_fbd ._dca .Language =&_bc .XSDAny {XMLName :_feb .Name {Local :"d\u0063\u003a\u006c\u0061\u006e\u0067\u0075\u0061\u0067\u0065"}};_fbd ._dca .Language .Data =[]byte (s );};var _efef =_ff .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");
// SetDocSecurity sets the document security flag.
func (_ca AppProperties )SetDocSecurity (v int32 ){_ca ._aged .DocSecurity =_ff .Int32 (v )};
// SetTitle records the title of the document.
func (_bae CoreProperties )SetTitle (s string ){if _bae ._dca .Title ==nil {_bae ._dca .Title =&_bc .XSDAny {XMLName :_feb .Name {Local :"\u0064\u0063\u003a\u0074\u0069\u0074\u006c\u0065"}};};_bae ._dca .Title .Data =[]byte (s );};
// 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 (_fbf *ImageRef )SetTarget (target string ){_fbf ._adfe =target };
// GetImageBytesByTarget returns Image object with Data bytes read from its target.
func (_edeg *DocBase )GetImageBytesByTarget (target string )(Image ,error ){if target !=""{target ="\u0077\u006f\u0072d\u002f"+target ;for _ ,_aea :=range _edeg .Images {if _aea .Target ()==target {return ImageFromStorage (_aea .Path ());};};};return Image {},_efef ;};const _afd ="2\u00300\u0036\u002d\u0030\u0031\u002d\u0030\u0032\u00541\u0035\u003a\u0030\u0034:0\u0035\u005a";
// Author returns the author of the document
func (_ce CoreProperties )Author ()string {if _ce ._aae .Creator !=nil {return string (_ce ._aae .Creator .Data );};return "";};
// NewCoreProperties constructs a new CoreProperties.
func NewCoreProperties ()CoreProperties {return CoreProperties {_dca :_dee .NewCoreProperties ()}};
// Modified returns the time that the document was modified.
func (_ggb CoreProperties )Modified ()_cb .Time {return _ga (_ggb ._dca .Modified )};
// AddCol adds a column to a table.
func (_dcf Table )AddCol ()*TableCol {_ebd :=_fea .NewCT_TableCol ();_dcf ._cege .TblGrid .GridCol =append (_dcf ._cege .TblGrid .GridCol ,_ebd );for _ ,_dab :=range _dcf ._cege .Tr {_bad :=_fea .NewCT_TableCell ();_dab .Tc =append (_dab .Tc ,_bad );};return &TableCol {_ebga :_ebd };};
// Size returns the size of an image
func (_ade ImageRef )Size ()_ab .Point {return _ade ._dba .Size };
// SetCompany sets the name of the company that created the document.
func (_cbb AppProperties )SetCompany (s string ){_cbb ._deg .Company =&s };
// ContentStatus returns the content status of the document (e.g. "Final", "Draft")
func (_edb CoreProperties )ContentStatus ()string {if _edb ._dca .ContentStatus !=nil {return *_edb ._dca .ContentStatus ;};return "";};
// RemoveOverrideByIndex removes an override given a path and override index.
func (_bba ContentTypes )RemoveOverrideByIndex (path string ,indexToFind int )error {_acd :=path [0:len (path )-5];if !_e .HasPrefix (_acd ,"\u002f"){_acd ="\u002f"+_acd ;};_eage ,_afa :=_ad .Compile (_acd +"\u0028\u005b\u0030-\u0039\u005d\u002b\u0029\u002e\u0078\u006d\u006c");if _afa !=nil {return _afa ;};_ead :=0;_fd :=-1;for _gdb ,_afaf :=range _bba ._bfd .Override {if _bbce :=_eage .FindStringSubmatch (_afaf .PartNameAttr );len (_bbce )> 1{if _ead ==indexToFind {_fd =_gdb ;}else if _ead > indexToFind {_ccb ,_ :=_gg .Atoi (_bbce [1]);_ccb --;_afaf .PartNameAttr =_gd .Sprintf ("\u0025\u0073\u0025\u0064\u002e\u0078\u006d\u006c",_acd ,_ccb );};_ead ++;};};if _fd > -1{copy (_bba ._bfd .Override [_fd :],_bba ._bfd .Override [_fd +1:]);_bba ._bfd .Override =_bba ._bfd .Override [0:len (_bba ._bfd .Override )-1];};return nil ;};
// IsEmpty returns true if there are no relationships.
func (_egec Relationships )IsEmpty ()bool {return _egec ._fbgf ==nil ||len (_egec ._fbgf .Relationship )==0;};
// NewRelationship constructs a new relationship.
func NewRelationship ()Relationship {return Relationship {_dgc :_dea .NewRelationship ()}};func (_gef CustomProperties )SetPropertyAsArray (name string ,array *_de .Array ){_ddd :=_gef .getNewProperty (name );_ddd .Array =array ;_gef .setOrReplaceProperty (_ddd );};
// SetDescription records the description of the document.
func (_aafd CoreProperties )SetDescription (s string ){if _aafd ._dca .Description ==nil {_aafd ._dca .Description =&_bc .XSDAny {XMLName :_feb .Name {Local :"\u0064\u0063\u003a\u0064\u0065\u0073\u0063\u0072\u0069p\u0074\u0069\u006f\u006e"}};};_aafd ._dca .Description .Data =[]byte (s );};
// ContentTypes is the top level "[Content_Types].xml" in a zip package.
type ContentTypes struct{_bfd *_ge .Types };
// ApplicationVersion returns the version of the application that created the
// document.
func (_eag AppProperties )ApplicationVersion ()string {if _eag ._deg .AppVersion !=nil {return *_eag ._deg .AppVersion ;};return "";};
// 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 ){_agdga ,_bea :=_g .Open (path );_aegf :=Image {};if _bea !=nil {return _aegf ,_ba .Errorf ("\u0065\u0072\u0072or\u0020\u0072\u0065\u0061\u0064\u0069\u006e\u0067\u0020\u0069\u006d\u0061\u0067\u0065\u003a\u0020\u0025\u0073",_bea );};defer _agdga .Close ();_cbbe ,_addg ,_bea :=_dc .Decode (_agdga );if _bea !=nil {return _aegf ,_ba .Errorf ("\u0075n\u0061\u0062\u006c\u0065 \u0074\u006f\u0020\u0070\u0061r\u0073e\u0020i\u006d\u0061\u0067\u0065\u003a\u0020\u0025s",_bea );};_aegf .Path =path ;_aegf .Format =_addg ;_aegf .Size =_cbbe .Bounds ().Size ();return _aegf ,nil ;};
// SetStyle assigns TableStyle to a table.
func (_bce Table )SetStyle (style *_ee .CT_TableStyle ){if _bce ._bcda .TblPr ==nil {_bce ._bcda .TblPr =_ee .NewCT_TableProperties ();};if _bce ._bcda .TblPr .Choice ==nil {_bce ._bcda .TblPr .Choice =_ee .NewCT_TablePropertiesChoice ();};_bce ._bcda .TblPr .Choice .TableStyle =style ;};
// TableCol represents a column in a table.
type TableCol struct{_abd *_ee .CT_TableCol };
// SetOffsetY sets vertical offset of a table in distance units (see measurement package).
func (_edab Table )SetOffsetY (offY float64 ){if _edab ._cgbd .Off ==nil {_edab ._cgbd .Off =_ee .NewCT_Point2D ();_acbc :=int64 (0);_edab ._cgbd .Off .XAttr =_ee .ST_Coordinate {ST_CoordinateUnqualified :&_acbc };};_gea :=_dg .ToEMU (offY );_edab ._cgbd .Off .YAttr =_ee .ST_Coordinate {ST_CoordinateUnqualified :&_gea };};func (_bfb CustomProperties )SetPropertyAsStorage (name string ,storage string ){_cae :=_bfb .getNewProperty (name );_cae .Storage =&storage ;_bfb .setOrReplaceProperty (_cae );};func (_abf TableRow )addCell ()*_ee .CT_TableCell {_fgaa :=_ee .NewCT_TableCell ();_abf ._facb .Tc =append (_abf ._facb .Tc ,_fgaa );return _fgaa ;};func (_ged CustomProperties )SetPropertyAsBstr (name string ,bstr string ){_fbe :=_ged .getNewProperty (name );_fbe .Bstr =&bstr ;_ged .setOrReplaceProperty (_fbe );};
// Relationships represents a .rels file.
type Relationships struct{_fffg *_faf .Relationships };
// Relationship is a relationship within a .rels file.
type Relationship struct{_bcd *_faf .Relationship };
// X returns the inner wrapped XML type of CustomProperty.
func (_adf CustomProperty )X ()*_a .CT_Property {return _adf ._cca };func (_ecgb CustomProperties )setPropertyHelper (_acgb *_a .CT_Property ,_gdf bool ){_aegb :=_ecgb .GetPropertyByName (*_acgb .NameAttr );if (_aegb ==CustomProperty {}){_ecgb ._gge .Property =append (_ecgb ._gge .Property ,_acgb );}else if _gdf {_acgb .FmtidAttr =_aegb ._cca .FmtidAttr ;if _aegb ._cca .PidAttr ==0{_acgb .PidAttr =_aegb ._cca .PidAttr ;};_acgb .LinkTargetAttr =_aegb ._cca .LinkTargetAttr ;*_aegb ._cca =*_acgb ;};};
// X returns the inner wrapped XML type.
func (_bec AppProperties )X ()*_cf .Properties {return _bec ._aged };
// AddDefault registers a default content type for a given file extension.
func (_dba ContentTypes )AddDefault (fileExtension string ,contentType string ){fileExtension =_ga .ToLower (fileExtension );for _ ,_gfg :=range _dba ._bbb .Default {if _gfg .ExtensionAttr ==fileExtension &&_gfg .ContentTypeAttr ==contentType {return ;};};_fe :=_cbf .NewDefault ();_fe .ExtensionAttr =fileExtension ;_fe .ContentTypeAttr =contentType ;_dba ._bbb .Default =append (_dba ._bbb .Default ,_fe );};func (_egee CustomProperties )SetPropertyAsOstorage (name string ,ostorage string ){_ffcc :=_egee .getNewProperty (name );_ffcc .Ostorage =&ostorage ;_egee .setOrReplaceProperty (_ffcc );};var ReleasedAt =_ea .Date (_cbfa ,_bad ,_eff ,_cgbc ,_fdd ,0,0,_ea .UTC );
// PropertiesList returns the list of all custom properties of the document.
func (_dad CustomProperties )PropertiesList ()[]*_a .CT_Property {return _dad ._gge .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 (_ddf ImageRef )RelativeWidth (h _dg .Distance )_dg .Distance {_add :=float64 (_ddf .Size ().X )/float64 (_ddf .Size ().Y );return h *_dg .Distance (_add );};
func ImageFromFile (path string )(Image ,error ){_aac ,_gaba :=_bb .Open (path );_dggf :=Image {};if _gaba !=nil {return _dggf ,_gd .Errorf ("\u0065\u0072\u0072or\u0020\u0072\u0065\u0061\u0064\u0069\u006e\u0067\u0020\u0069\u006d\u0061\u0067\u0065\u003a\u0020\u0025\u0073",_gaba );};defer _aac .Close ();_bfge ,_fffa ,_gaba :=_ab .Decode (_aac );if _gaba !=nil {return _dggf ,_gd .Errorf ("\u0075n\u0061\u0062\u006c\u0065 \u0074\u006f\u0020\u0070\u0061r\u0073e\u0020i\u006d\u0061\u0067\u0065\u003a\u0020\u0025s",_gaba );};_dggf .Path =path ;_dggf .Format =_fffa ;_dggf .Size =_bfge .Bounds ().Size ();return _dggf ,nil ;};
// 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 _dc .Point ;Format string ;Path string ;Data *[]byte ;};
type Image struct{Size _ab .Point ;Format string ;Path string ;Data *[]byte ;};func (_fae CustomProperties )SetPropertyAsOblob (name ,oblob string ){_acg :=_fae .getNewProperty (name );_acg .Oblob =&oblob ;_fae .setOrReplaceProperty (_acg );};
// RemoveOverrideByIndex removes an override given a path and override index.
func (_cce ContentTypes )RemoveOverrideByIndex (path string ,indexToFind int )error {_gg :=path [0:len (path )-5];if !_ga .HasPrefix (_gg ,"\u002f"){_gg ="\u002f"+_gg ;};_fce ,_cfe :=_bb .Compile (_gg +"\u0028\u005b\u0030-\u0039\u005d\u002b\u0029\u002e\u0078\u006d\u006c");if _cfe !=nil {return _cfe ;};_cd :=0;_gda :=-1;for _adef ,_deb :=range _cce ._bbb .Override {if _eae :=_fce .FindStringSubmatch (_deb .PartNameAttr );len (_eae )> 1{if _cd ==indexToFind {_gda =_adef ;}else if _cd > indexToFind {_bda ,_ :=_fg .Atoi (_eae [1]);_bda --;_deb .PartNameAttr =_ba .Sprintf ("\u0025\u0073\u0025\u0064\u002e\u0078\u006d\u006c",_gg ,_bda );};_cd ++;};};if _gda > -1{copy (_cce ._bbb .Override [_gda :],_cce ._bbb .Override [_gda +1:]);_cce ._bbb .Override =_cce ._bbb .Override [0:len (_cce ._bbb .Override )-1];};return nil ;};
// SetCreated sets the time that the document was created.
func (_efc CoreProperties )SetCreated (t _ea .Time ){_efc ._aae .Created =_dcb (t ,"\u0064c\u0074e\u0072\u006d\u0073\u003a\u0063\u0072\u0065\u0061\u0074\u0065\u0064");};
// SetOffsetX sets horizontal offset of a table in distance units (see measurement package).
func (_caecf Table )SetOffsetX (offX float64 ){if _caecf ._cgbd .Off ==nil {_caecf ._cgbd .Off =_ee .NewCT_Point2D ();_afa :=int64 (0);_caecf ._cgbd .Off .YAttr =_ee .ST_Coordinate {ST_CoordinateUnqualified :&_afa };};_gff :=_dg .ToEMU (offX );_caecf ._cgbd .Off .XAttr =_ee .ST_Coordinate {ST_CoordinateUnqualified :&_gff };};
// SetApplication sets the name of the application that created the document.
func (_gaa AppProperties )SetApplication (s string ){_gaa ._aged .Application =&s };const Version ="\u0031\u002e\u0031\u0038\u002e\u0030";func (_dbc CustomProperties )SetPropertyAsLpwstr (name string ,lpwstr string ){_egdc :=_dbc .getNewProperty (name );_egdc .Lpwstr =&lpwstr ;_dbc .setOrReplaceProperty (_egdc );};
// GetImageBytesByTarget returns Image object with Data bytes read from its target.
func (_dcc *DocBase )GetImageBytesByTarget (target string )(Image ,error ){if target !=""{target ="\u0077\u006f\u0072d\u002f"+target ;for _ ,_cbfc :=range _dcc .Images {if _cbfc .Target ()==target {return ImageFromStorage (_cbfc .Path ());};};};return Image {},_daeg ;};
// Company returns the name of the company that created the document.
// For unioffice created documents, it defaults to github.com/unidoc/unioffice
func (_cbfd AppProperties )Company ()string {if _cbfd ._aged .Company !=nil {return *_cbfd ._aged .Company ;};return "";};
// ContentTypes is the top level "[Content_Types].xml" in a zip package.
type ContentTypes struct{_bbb *_cbf .Types };
// NewAppProperties constructs a new AppProperties.
func NewAppProperties ()AppProperties {_afg :=AppProperties {_aged :_cf .NewProperties ()};_afg .SetCompany ("\u0046\u006f\u0078\u0079\u0055\u0074\u0069\u006c\u0073\u0020\u0065\u0068\u0066");_afg .SetApplication ("g\u0069\u0074\u0068\u0075\u0062\u002ec\u006f\u006d\u002f\u0075\u006e\u0069\u0064\u006f\u0063/\u0075\u006e\u0069o\u0066f\u0069\u0063\u0065");_afg .SetDocSecurity (0);_afg .SetLinksUpToDate (false );var _bdg ,_cfae ,_gcf int64 ;_ba .Sscanf (Version ,"\u0025\u0064\u002e\u0025\u0064\u002e\u0025\u0064",&_bdg ,&_cfae ,&_gcf );_dcf :=float64 (_bdg )+float64 (_cfae )/10000.0;_afg .SetApplicationVersion (_ba .Sprintf ("\u0025\u0030\u0037\u002e\u0034\u0066",_dcf ));return _afg ;};
// X returns the inner wrapped XML type.
func (_eged CoreProperties )X ()*_ac .CoreProperties {return _eged ._aae };
// FindRIDForN returns the relationship ID for the i'th relationship of type t.
func (_cga Relationships )FindRIDForN (i int ,t string )string {for _ ,_bfeg :=range _cga ._fbgf .CT_Relationships .Relationship {if _bfeg .TypeAttr ==t {if i ==0{return _bfeg .IdAttr ;};i --;};};return "";};
// GetPropertyByName returns a custom property selected by it's name.
func (_cdc CustomProperties )GetPropertyByName (name string )CustomProperty {_dgb :=_cdc ._gge .Property ;for _ ,_dcfe :=range _dgb {if *_dcfe .NameAttr ==name {return CustomProperty {_cca :_dcfe };};};return CustomProperty {};};func (_ccda CustomProperties )SetPropertyAsArray (name string ,array *_da .Array ){_cfgg :=_ccda .getNewProperty (name );_cfgg .Array =array ;_ccda .setOrReplaceProperty (_cfgg );};const _cbfa =2022;func (_egfg CustomProperties )SetPropertyAsI8 (name string ,i8 int64 ){_bgg :=_egfg .getNewProperty (name );_bgg .I8 =&i8 ;_egfg .setOrReplaceProperty (_bgg );};
func (_ffcf CustomProperties )GetPropertyByName (name string )CustomProperty {_ecc :=_ffcf ._feaf .Property ;for _ ,_ffcc :=range _ecc {if *_ffcc .NameAttr ==name {return CustomProperty {_gad :_ffcc };};};return CustomProperty {};};const _bbfa =30;func (_eaf CustomProperties )SetPropertyAsUi1 (name string ,ui1 uint8 ){_degb :=_eaf .getNewProperty (name );_degb .Ui1 =&ui1 ;_eaf .setOrReplaceProperty (_degb );};
// RelID returns the relationship ID.
func (_afde ImageRef )RelID ()string {return _afde ._adcb };func (_fag CustomProperties )SetPropertyAsClsid (name string ,clsid string ){_fca :=_fag .getNewProperty (name );_fca .Clsid =&clsid ;_fag .setOrReplaceProperty (_fca );};func (_ffbb CustomProperties )SetPropertyAsError (name string ,error string ){_gfa :=_ffbb .getNewProperty (name );_gfa .Error =&error ;_ffbb .setOrReplaceProperty (_gfa );};func (_cbb CustomProperties )SetPropertyAsInt (name string ,i int ){_aabe :=_cbb .getNewProperty (name );_eb :=int32 (i );_aabe .Int =&_eb ;_cbb .setOrReplaceProperty (_aabe );};
// X returns the inner wrapped XML type.
func (_gbb TableStyles )X ()*_ee .TblStyleLst {return _gbb ._gcc };
// SetHeight sets row height, see measurement package.
func (_ead TableRow )SetHeight (m _dg .Distance ){_eaeb :=_dg .ToEMU (float64 (m ));_ead ._facb .HAttr =_ee .ST_Coordinate {ST_CoordinateUnqualified :&_eaeb };};
// Type returns the type of a relationship.
func (_bga Relationship )Type ()string {return _bga ._bcd .TypeAttr };
// ContentStatus returns the content status of the document (e.g. "Final", "Draft")
func (_ab CoreProperties )ContentStatus ()string {if _ab ._aae .ContentStatus !=nil {return *_ab ._aae .ContentStatus ;};return "";};
// Application returns the name of the application that created the document.
// For unioffice created documents, it defaults to github.com/unidoc/unioffice
func (_ef AppProperties )Application ()string {if _ef ._aged .Application !=nil {return *_ef ._aged .Application ;};return "";};func (_gga CustomProperties )SetPropertyAsFiletime (name string ,filetime _ea .Time ){_becd :=_gga .getNewProperty (name );_becd .Filetime =&filetime ;_gga .setOrReplaceProperty (_becd );};func (_gcga CustomProperties )SetPropertyAsStream (name string ,stream string ){_daf :=_gcga .getNewProperty (name );_daf .Stream =&stream ;_gcga .setOrReplaceProperty (_daf );};
// Clear removes any existing relationships.
func (_gaef Relationships )Clear (){_gaef ._fffg .Relationship =nil };
// NewContentTypes returns a wrapper around a newly constructed content-types.
func NewContentTypes ()ContentTypes {_dcg :=ContentTypes {_bbb :_cbf .NewTypes ()};_dcg .AddDefault ("\u0078\u006d\u006c","\u0061p\u0070l\u0069\u0063\u0061\u0074\u0069\u006f\u006e\u002f\u0078\u006d\u006c");_dcg .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");_dcg .AddDefault ("\u0070\u006e\u0067","\u0069m\u0061\u0067\u0065\u002f\u0070\u006eg");_dcg .AddDefault ("\u006a\u0070\u0065\u0067","\u0069\u006d\u0061\u0067\u0065\u002f\u006a\u0070\u0065\u0067");_dcg .AddDefault ("\u006a\u0070\u0067","\u0069m\u0061\u0067\u0065\u002f\u006a\u0070g");_dcg .AddDefault ("\u0077\u006d\u0066","i\u006d\u0061\u0067\u0065\u002f\u0078\u002d\u0077\u006d\u0066");_dcg .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");_dcg .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 _dcg ;};func (_adcd CustomProperties )SetPropertyAsVstream (name string ,vstream *_da .Vstream ){_ggb :=_adcd .getNewProperty (name );_ggb .Vstream =vstream ;_adcd .setOrReplaceProperty (_ggb );};
// GetByRelId returns a relationship with the associated relation ID.
func (_gba Relationships )GetByRelId (idAttr string )Relationship {for _ ,_aee :=range _gba ._fffg .Relationship {if _aee .IdAttr ==idAttr {return Relationship {_bcd :_aee };};};return Relationship {};};
// CopyOverride copies override content type for a given `path` and puts it with a path `newPath`.
func (_bed ContentTypes )CopyOverride (path ,newPath string ){if !_ga .HasPrefix (path ,"\u002f"){path ="\u002f"+path ;};if !_ga .HasPrefix (newPath ,"\u002f"){newPath ="\u002f"+newPath ;};for _bee :=range _bed ._bbb .Override {if _bed ._bbb .Override [_bee ].PartNameAttr ==path {_fad :=*_bed ._bbb .Override [_bee ];_fad .PartNameAttr =newPath ;_bed ._bbb .Override =append (_bed ._bbb .Override ,&_fad );};};};
// Theme is a drawingml theme.
type Theme struct{_cbcg *_ee .Theme };
// Cells returns an array of row cells.
func (_gded TableRow )Cells ()[]*_ee .CT_TableCell {return _gded ._facb .Tc };
// ID returns the ID of a relationship.
func (_ffe Relationship )ID ()string {return _ffe ._bcd .IdAttr };
// X returns the inner raw content types.
func (_bbg ContentTypes )X ()*_cbf .Types {return _bbg ._bbb };
// Description returns the description of the document
func (_efd CoreProperties )Description ()string {if _efd ._aae .Description !=nil {return string (_efd ._aae .Description .Data );};return "";};
// X returns the inner wrapped XML type.
func (_beg Relationship )X ()*_faf .Relationship {return _beg ._bcd };
// Remove removes an existing relationship.
func (_feb Relationships )Remove (rel Relationship )bool {for _edc ,_cged :=range _feb ._fffg .Relationship {if _cged ==rel ._bcd {copy (_feb ._fffg .Relationship [_edc :],_feb ._fffg .Relationship [_edc +1:]);_feb ._fffg .Relationship =_feb ._fffg .Relationship [0:len (_feb ._fffg .Relationship )-1];return true ;};};return false ;};func (_dacf CustomProperties )setOrReplaceProperty (_aded *_a .CT_Property ){_dacf .setPropertyHelper (_aded ,true );};
// IsEmpty returns true if there are no relationships.
func (_cgf Relationships )IsEmpty ()bool {return _cgf ._fffg ==nil ||len (_cgf ._fffg .Relationship )==0;};
// SetAuthor records the author of the document.
func (_gee CoreProperties )SetAuthor (s string ){if _gee ._aae .Creator ==nil {_gee ._aae .Creator =&_ff .XSDAny {XMLName :_gd .Name {Local :"\u0064\u0063\u003a\u0063\u0072\u0065\u0061\u0074\u006f\u0072"}};};_gee ._aae .Creator .Data =[]byte (s );};func (_bcb CustomProperties )SetPropertyAsUint (name string ,ui uint ){_gde :=_bcb .getNewProperty (name );_gdd :=uint32 (ui );_gde .Uint =&_gdd ;_bcb .setOrReplaceProperty (_gde );};
// ExtraFile is an unsupported file type extracted from, or to be written to a
// zip package
type ExtraFile struct{ZipPath string ;DiskPath string ;};
// WriteExtraFiles writes the extra files to the zip package.
func (_edg *DocBase )WriteExtraFiles (z *_cb .Writer )error {for _ ,_gfc :=range _edg .ExtraFiles {if _cfb :=_gc .AddFileFromDisk (z ,_gfc .ZipPath ,_gfc .DiskPath );_cfb !=nil {return _cfb ;};};return nil ;};
// NewTableStyles constructs a new TableStyles.
func NewTableStyles ()TableStyles {return TableStyles {_gcc :_ee .NewTblStyleLst ()}};
// ApplicationVersion returns the version of the application that created the
// document.
func (_fgbf AppProperties )ApplicationVersion ()string {if _fgbf ._aged .AppVersion !=nil {return *_fgbf ._aged .AppVersion ;};return "";};
// NewCoreProperties constructs a new CoreProperties.
func NewCoreProperties ()CoreProperties {return CoreProperties {_aae :_ac .NewCoreProperties ()}};func (_bfa CustomProperties )SetPropertyAsUi2 (name string ,ui2 uint16 ){_geg :=_bfa .getNewProperty (name );_geg .Ui2 =&ui2 ;_bfa .setOrReplaceProperty (_geg );};func (_ddb CustomProperties )SetPropertyAsI2 (name string ,i2 int16 ){_adg :=_ddb .getNewProperty (name );_adg .I2 =&i2 ;_ddb .setOrReplaceProperty (_adg );};
// SetTarget set the target (path) of a relationship.
func (_gbe Relationship )SetTarget (s string ){_gbe ._dgc .TargetAttr =s };
// NewTheme constructs a new theme.
func NewTheme ()Theme {return Theme {_ee .NewTheme ()}};
func NewTheme ()Theme {return Theme {_fea .NewTheme ()}};
// NewCustomProperties constructs a new CustomProperties.
func NewCustomProperties ()CustomProperties {return CustomProperties {_gge :_a .NewProperties ()}};
// GetTargetByRelId returns a target path with the associated relation ID.
func (_dag Relationships )GetTargetByRelId (idAttr string )string {for _ ,_cafg :=range _dag ._fffg .Relationship {if _cafg .IdAttr ==idAttr {return _cafg .TargetAttr ;};};return "";};const _eff =25;func (_agdg *ImageRef )SetRelID (id string ){_agdg ._adcb =id };
// SetWidth sets column width, see measurement package.
func (_fgfg TableCol )SetWidth (m _dg .Distance ){_ebcg :=_dg .ToEMU (float64 (m ));_fgfg ._abd .WAttr =_ee .ST_Coordinate {ST_CoordinateUnqualified :&_ebcg };};
// AddCustomRelationships adds relationships related to custom properties to the document.
func (_cbgb *DocBase )AddCustomRelationships (){_cbgb .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");_cbgb .Rels .AddRelationship ("\u0064\u006f\u0063\u0050ro\u0070\u0073\u002f\u0063\u0075\u0073\u0074\u006f\u006d\u002e\u0078\u006d\u006c",_ff .CustomPropertiesType );};const _bad =2;func (_eda CustomProperties )SetPropertyAsDecimal (name string ,decimal float64 ){_eede :=_eda .getNewProperty (name );_eede .Decimal =&decimal ;_eda .setOrReplaceProperty (_eede );};func _dcb (_eed _ea .Time ,_daa string )*_ff .XSDAny {_fec :=&_ff .XSDAny {XMLName :_gd .Name {Local :_daa }};_fec .Attrs =append (_fec .Attrs ,_gd .Attr {Name :_gd .Name {Local :"\u0078\u0073\u0069\u003a\u0074\u0079\u0070\u0065"},Value :"\u0064\u0063\u0074\u0065\u0072\u006d\u0073\u003a\u00573\u0043\u0044\u0054\u0046"});_fec .Attrs =append (_fec .Attrs ,_gd .Attr {Name :_gd .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"});_fec .Attrs =append (_fec .Attrs ,_gd .Attr {Name :_gd .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/"});_fec .Data =[]byte (_eed .Format (_bbgd ));return _fec ;};const _bbgd ="2\u00300\u0036\u002d\u0030\u0031\u002d\u0030\u0032\u00541\u0035\u003a\u0030\u0034:0\u0035\u005a";
// WriteExtraFiles writes the extra files to the zip package.
func (_fff *DocBase )WriteExtraFiles (z *_d .Writer )error {for _ ,_face :=range _fff .ExtraFiles {if _gbgf :=_cf .AddFileFromDisk (z ,_face .ZipPath ,_face .DiskPath );_gbgf !=nil {return _gbgf ;};};return nil ;};
// 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 ){_bggd :=Image {};_bfe ,_gaec :=_fgb .Open (path );if _gaec !=nil {return _bggd ,_ba .Errorf ("\u0065\u0072\u0072or\u0020\u0072\u0065\u0061\u0064\u0069\u006e\u0067\u0020\u0069\u006d\u0061\u0067\u0065\u003a\u0020\u0025\u0073",_gaec );};defer _bfe .Close ();_ddbf ,_bace ,_gaec :=_dc .Decode (_bfe );if _gaec !=nil {return _bggd ,_ba .Errorf ("\u0075n\u0061\u0062\u006c\u0065 \u0074\u006f\u0020\u0070\u0061r\u0073e\u0020i\u006d\u0061\u0067\u0065\u003a\u0020\u0025s",_gaec );};_bggd .Path =path ;_bggd .Format =_bace ;_bggd .Size =_ddbf .Bounds ().Size ();return _bggd ,nil ;};const _fdd =30;
func ImageFromStorage (path string )(Image ,error ){_cdaa :=Image {};_gdd ,_edg :=_ef .Open (path );if _edg !=nil {return _cdaa ,_gd .Errorf ("\u0065\u0072\u0072or\u0020\u0072\u0065\u0061\u0064\u0069\u006e\u0067\u0020\u0069\u006d\u0061\u0067\u0065\u003a\u0020\u0025\u0073",_edg );};defer _gdd .Close ();_efbf ,_agg ,_edg :=_ab .Decode (_gdd );if _edg !=nil {return _cdaa ,_gd .Errorf ("\u0075n\u0061\u0062\u006c\u0065 \u0074\u006f\u0020\u0070\u0061r\u0073e\u0020i\u006d\u0061\u0067\u0065\u003a\u0020\u0025s",_edg );};_cdaa .Path =path ;_cdaa .Format =_agg ;_cdaa .Size =_efbf .Bounds ().Size ();return _cdaa ,nil ;};
// AddImageToZip adds an image (either from bytes or from disk) and adds it to the zip file.
func AddImageToZip (z *_cb .Writer ,img ImageRef ,imageNum int ,dt _ff .DocType )error {_fda :=_ff .AbsoluteImageFilename (dt ,imageNum ,_ga .ToLower (img .Format ()));if img .Data ()!=nil &&len (*img .Data ())> 0{if _ddd :=_gc .AddFileFromBytes (z ,_fda ,*img .Data ());_ddd !=nil {return _ddd ;};}else if img .Path ()!=""{if _fbb :=_gc .AddFileFromDisk (z ,_fda ,img .Path ());_fbb !=nil {return _fbb ;};}else {return _ba .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 ;};
// Relationships represents a .rels file.
type Relationships struct{_fbgf *_dea .Relationships };func (_efd CustomProperties )SetPropertyAsLpwstr (name string ,lpwstr string ){_egf :=_efd .getNewProperty (name );_egf .Lpwstr =&lpwstr ;_efd .setOrReplaceProperty (_egf );};func (_feg CustomProperties )SetPropertyAsFiletime (name string ,filetime _cb .Time ){_fda :=_feg .getNewProperty (name );_fda .Filetime =&filetime ;_feg .setOrReplaceProperty (_fda );};
// SetLanguage records the language of the document.
func (_bbc CoreProperties )SetLanguage (s string ){_bbc ._aae .Language =&_ff .XSDAny {XMLName :_gd .Name {Local :"d\u0063\u003a\u006c\u0061\u006e\u0067\u0075\u0061\u0067\u0065"}};_bbc ._aae .Language .Data =[]byte (s );};func (_eeg CustomProperties )SetPropertyAsUi1 (name string ,ui1 uint8 ){_cfcb :=_eeg .getNewProperty (name );_cfcb .Ui1 =&ui1 ;_eeg .setOrReplaceProperty (_cfcb );};func (_fgf CustomProperties )SetPropertyAsEmpty (name string ){_egg :=_fgf .getNewProperty (name );_egg .Empty =_da .NewEmpty ();_fgf .setOrReplaceProperty (_egg );};
// TableStyles contains document specific properties.
type TableStyles struct{_edgc *_fea .TblStyleLst };func (_fbe CustomProperties )setPropertyHelper (_bce *_af .CT_Property ,_gfcf bool ){_ggfa :=_fbe .GetPropertyByName (*_bce .NameAttr );if (_ggfa ==CustomProperty {}){_fbe ._feaf .Property =append (_fbe ._feaf .Property ,_bce );}else if _gfcf {_bce .FmtidAttr =_ggfa ._gad .FmtidAttr ;if _ggfa ._gad .PidAttr ==0{_bce .PidAttr =_ggfa ._gad .PidAttr ;};_bce .LinkTargetAttr =_ggfa ._gad .LinkTargetAttr ;*_ggfa ._gad =*_bce ;};};
// CopyRelationship copies the relationship.
func (_bfdf Relationships )CopyRelationship (idAttr string )(Relationship ,bool ){for _cdaab :=range _bfdf ._fbgf .Relationship {if _bfdf ._fbgf .Relationship [_cdaab ].IdAttr ==idAttr {_gdfe :=*_bfdf ._fbgf .Relationship [_cdaab ];_ada :=len (_bfdf ._fbgf .Relationship )+1;_eee :=map[string ]struct{}{};for _ ,_dbb :=range _bfdf ._fbgf .Relationship {_eee [_dbb .IdAttr ]=struct{}{};};for _ ,_abee :=_eee [_gd .Sprintf ("\u0072\u0049\u0064%\u0064",_ada )];_abee ;_ ,_abee =_eee [_gd .Sprintf ("\u0072\u0049\u0064%\u0064",_ada )]{_ada ++;};_gdfe .IdAttr =_gd .Sprintf ("\u0072\u0049\u0064%\u0064",_ada );_bfdf ._fbgf .Relationship =append (_bfdf ._fbgf .Relationship ,&_gdfe );return Relationship {_dgc :&_gdfe },true ;};};return Relationship {},false ;};
// Table represents a table in the document.
type Table struct{_cege *_fea .Tbl ;_bcgd *_fea .CT_Transform2D ;};
// TblStyle returns the TblStyle property.
func (_gbed TableStyles )TblStyle ()[]*_fea .CT_TableStyle {return _gbed ._edgc .TblStyle };func (_fac CustomProperties )SetPropertyAsUi8 (name string ,ui8 uint64 ){_gab :=_fac .getNewProperty (name );_gab .Ui8 =&ui8 ;_fac .setOrReplaceProperty (_gab );};
// NewAppProperties constructs a new AppProperties.
func NewAppProperties ()AppProperties {_abe :=AppProperties {_deg :_bf .NewProperties ()};_abe .SetCompany ("\u0046\u006f\u0078\u0079\u0055\u0074\u0069\u006c\u0073\u0020\u0065\u0068\u0066");_abe .SetApplication ("g\u0069\u0074\u0068\u0075\u0062\u002ec\u006f\u006d\u002f\u0075\u006e\u0069\u0064\u006f\u0063/\u0075\u006e\u0069o\u0066f\u0069\u0063\u0065");_abe .SetDocSecurity (0);_abe .SetLinksUpToDate (false );var _ca ,_gfc ,_da int64 ;_gd .Sscanf (Version ,"\u0025\u0064\u002e\u0025\u0064\u002e\u0025\u0064",&_ca ,&_gfc ,&_da );_gdf :=float64 (_ca )+float64 (_gfc )/10000.0;_abe .SetApplicationVersion (_gd .Sprintf ("\u0025\u0030\u0037\u002e\u0034\u0066",_gdf ));return _abe ;};func (_aaa CustomProperties )SetPropertyAsI1 (name string ,i1 int8 ){_efc :=_aaa .getNewProperty (name );_efc .I1 =&i1 ;_aaa .setOrReplaceProperty (_efc );};
// Hyperlink is just an appropriately configured relationship.
type Hyperlink Relationship ;
// Remove removes an existing relationship.
func (_fbc Relationships )Remove (rel Relationship )bool {for _afeg ,_gff :=range _fbc ._fbgf .Relationship {if _gff ==rel ._dgc {copy (_fbc ._fbgf .Relationship [_afeg :],_fbc ._fbgf .Relationship [_afeg +1:]);_fbc ._fbgf .Relationship =_fbc ._fbgf .Relationship [0:len (_fbc ._fbgf .Relationship )-1];return true ;};};return false ;};
// Clear removes any existing relationships.
func (_gfec Relationships )Clear (){_gfec ._fbgf .Relationship =nil };const _gfcd ="\u0032\u0020\u004aan\u0075\u0061\u0072\u0079\u0020\u0032\u0030\u0030\u0036\u0020\u0061\u0074\u0020\u0031\u0035\u003a\u0030\u0034";
// EnsureOverride ensures that an override for the given path exists, adding it if necessary
func (_abc ContentTypes )EnsureOverride (path ,contentType string ){for _ ,_cg :=range _abc ._bfd .Override {if _cg .PartNameAttr ==path {if _e .HasPrefix (contentType ,"\u0068\u0074\u0074\u0070"){_aa .Log .Debug ("\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 );};_cg .ContentTypeAttr =contentType ;return ;};};_abc .AddOverride (path ,contentType );};func (_dac CustomProperties )SetPropertyAsNull (name string ){_dff :=_dac .getNewProperty (name );_dff .Null =_de .NewNull ();_dac .setOrReplaceProperty (_dff );};
// NewTableStyles constructs a new TableStyles.
func NewTableStyles ()TableStyles {return TableStyles {_edgc :_fea .NewTblStyleLst ()}};func (_bgg CustomProperties )SetPropertyAsInt (name string ,i int ){_bdd :=_bgg .getNewProperty (name );_edc :=int32 (i );_bdd .Int =&_edc ;_bgg .setOrReplaceProperty (_bdd );};func (_bbab CustomProperties )SetPropertyAsStorage (name string ,storage string ){_fbb :=_bbab .getNewProperty (name );_fbb .Storage =&storage ;_bbab .setOrReplaceProperty (_fbb );};
// Format returns the format of the underlying image
func (_caa ImageRef )Format ()string {return _caa ._dba .Format };
// AppProperties contains properties specific to the document and the
// application that created it.
type AppProperties struct{_aged *_cf .Properties };func (_bdb CustomProperties )SetPropertyAsR8 (name string ,r8 float64 ){_cbg :=_bdb .getNewProperty (name );_cbg .R8 =&r8 ;_bdb .setOrReplaceProperty (_cbg );};
type AppProperties struct{_deg *_bf .Properties };func (_dg CustomProperties )SetPropertyAsI2 (name string ,i2 int16 ){_afe :=_dg .getNewProperty (name );_afe .I2 =&i2 ;_dg .setOrReplaceProperty (_afe );};
// Size returns the size of an image
func (_feg ImageRef )Size ()_dc .Point {return _feg ._adab .Size };func (_fdc CustomProperties )SetPropertyAsNull (name string ){_cafb :=_fdc .getNewProperty (name );_cafb .Null =_da .NewNull ();_fdc .setOrReplaceProperty (_cafb );};
// SetApplication sets the name of the application that created the document.
func (_ebg AppProperties )SetApplication (s string ){_ebg ._deg .Application =&s };
// Append appends DocBase part of an office document to another DocBase.
func (_cd DocBase )Append (docBase1 DocBase )DocBase {_ee :=docBase1 .ContentTypes .X ();for _ ,_fc :=range _ee .Default {_cd .ContentTypes .AddDefault (_fc .ExtensionAttr ,_fc .ContentTypeAttr );};for _ ,_ae :=range _ee .Override {_cd .ContentTypes .AddOverride (_ae .PartNameAttr ,_ae .ContentTypeAttr );};_agf :=_cd .AppProperties .X ();_dc :=docBase1 .AppProperties .X ();if _agf .Pages !=nil {if _dc .Pages !=nil {*_agf .Pages +=*_dc .Pages ;};}else if _dc .Pages !=nil {_agf .Pages =_dc .Pages ;};if _agf .Words !=nil {if _dc .Words !=nil {*_agf .Words +=*_dc .Words ;};}else if _dc .Words !=nil {_agf .Words =_dc .Words ;};if _agf .Characters !=nil {if _dc .Characters !=nil {*_agf .Characters +=*_dc .Characters ;};}else if _dc .Characters !=nil {_agf .Characters =_dc .Characters ;};if _agf .Lines !=nil {if _dc .Lines !=nil {*_agf .Lines +=*_dc .Lines ;};}else if _dc .Lines !=nil {_agf .Lines =_dc .Lines ;};if _agf .Paragraphs !=nil {if _dc .Paragraphs !=nil {*_agf .Paragraphs +=*_dc .Paragraphs ;};}else if _dc .Paragraphs !=nil {_agf .Paragraphs =_dc .Paragraphs ;};if _agf .Notes !=nil {if _dc .Notes !=nil {*_agf .Notes +=*_dc .Notes ;};}else if _dc .Notes !=nil {_agf .Notes =_dc .Notes ;};if _agf .HiddenSlides !=nil {if _dc .HiddenSlides !=nil {*_agf .HiddenSlides +=*_dc .HiddenSlides ;};}else if _dc .HiddenSlides !=nil {_agf .HiddenSlides =_dc .HiddenSlides ;};if _agf .MMClips !=nil {if _dc .MMClips !=nil {*_agf .MMClips +=*_dc .MMClips ;};}else if _dc .MMClips !=nil {_agf .MMClips =_dc .MMClips ;};if _agf .LinksUpToDate !=nil {if _dc .LinksUpToDate !=nil {*_agf .LinksUpToDate =*_agf .LinksUpToDate &&*_dc .LinksUpToDate ;};}else if _dc .LinksUpToDate !=nil {_agf .LinksUpToDate =_dc .LinksUpToDate ;};if _agf .CharactersWithSpaces !=nil {if _dc .CharactersWithSpaces !=nil {*_agf .CharactersWithSpaces +=*_dc .CharactersWithSpaces ;};}else if _dc .CharactersWithSpaces !=nil {_agf .CharactersWithSpaces =_dc .CharactersWithSpaces ;};if _agf .SharedDoc !=nil {if _dc .SharedDoc !=nil {*_agf .SharedDoc =*_agf .SharedDoc ||*_dc .SharedDoc ;};}else if _dc .SharedDoc !=nil {_agf .SharedDoc =_dc .SharedDoc ;};if _agf .HyperlinksChanged !=nil {if _dc .HyperlinksChanged !=nil {*_agf .HyperlinksChanged =*_agf .HyperlinksChanged ||*_dc .HyperlinksChanged ;};}else if _dc .HyperlinksChanged !=nil {_agf .HyperlinksChanged =_dc .HyperlinksChanged ;};_agf .DigSig =nil ;if _agf .TitlesOfParts ==nil &&_dc .TitlesOfParts !=nil {_agf .TitlesOfParts =_dc .TitlesOfParts ;};if _agf .HeadingPairs !=nil {if _dc .HeadingPairs !=nil {_bgc :=_agf .HeadingPairs .Vector ;_eg :=_dc .HeadingPairs .Vector ;_ged :=_bgc .Variant ;_aeb :=_eg .Variant ;_aeg :=[]*_de .Variant {};for _ea :=0;_ea < len (_aeb );_ea +=2{_cc :=_aeb [_ea ].Lpstr ;_aag :=false ;for _efg :=0;_efg < len (_ged );_efg +=2{_bd :=_ged [_efg ].Lpstr ;if _bd !=nil &&_cc !=nil &&*_bd ==*_cc {*_ged [_efg +1].I4 =*_ged [_efg +1].I4 +*_aeb [_ea +1].I4 ;_aag =true ;break ;};};if !_aag {_aeg =append (_aeg ,&_de .Variant {CT_Variant :_de .CT_Variant {Lpstr :_aeb [_ea ].Lpstr }});_aeg =append (_aeg ,&_de .Variant {CT_Variant :_de .CT_Variant {I4 :_aeb [_ea ].I4 }});};};_ged =append (_ged ,_aeg ...);_bgc .SizeAttr =uint32 (len (_ged ));};}else if _dc .HeadingPairs !=nil {_agf .HeadingPairs =_dc .HeadingPairs ;};if _agf .HLinks !=nil {if _dc .HLinks !=nil {_df :=_agf .HLinks .Vector ;_fa :=_dc .HLinks .Vector ;_gee :=_df .Variant ;_gc :=_fa .Variant ;for _ ,_efa :=range _gc {_db :=true ;for _ ,_dd :=range _gee {if _f .DeepEqual (_dd ,_efa ){_db =false ;break ;};};if _db {_gee =append (_gee ,_efa );_df .SizeAttr ++;};};};}else if _dc .HLinks !=nil {_agf .HLinks =_dc .HLinks ;};_bfe :=_cd .GetOrCreateCustomProperties ();_bbg :=docBase1 .GetOrCreateCustomProperties ();for _ ,_fcg :=range _bbg .PropertiesList (){_bfe .setProperty (_fcg );};_cd .CustomProperties =_bfe ;_ggf :=_cd .Rels .X ().Relationship ;for _ ,_bdf :=range docBase1 .Rels .X ().Relationship {_eb :=true ;for _ ,_gb :=range _ggf {if _gb .TargetAttr ==_bdf .TargetAttr &&_gb .TypeAttr ==_bdf .TypeAttr {_eb =false ;break ;};};if _eb {_cd .Rels .AddRelationship (_bdf .TargetAttr ,_bdf .TypeAttr );};};for _ ,_ggg :=range docBase1 .ExtraFiles {_ffc :=_ggg .ZipPath ;_bbc :=true ;for _ ,_gf :=range _cd .ExtraFiles {if _gf .ZipPath ==_ffc {_bbc =false ;break ;};};if _bbc {_cd .ExtraFiles =append (_cd .ExtraFiles ,_ggg );};};return _cd ;};
// 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 (_fb AppProperties )Pages ()int32 {if _fb ._deg .Pages !=nil {return *_fb ._deg .Pages ;};return 0;};const Version ="\u0031\u002e\u0031\u0037\u002e\u0031";
// AddOverride adds an override content type for a given path name.
func (_ed ContentTypes )AddOverride (path ,contentType string ){if !_e .HasPrefix (path ,"\u002f"){path ="\u002f"+path ;};if _e .HasPrefix (contentType ,"\u0068\u0074\u0074\u0070"){_aa .Log .Debug ("\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 _ ,_dbe :=range _ed ._bfd .Override {if _dbe .PartNameAttr ==path &&_dbe .ContentTypeAttr ==contentType {return ;};};_ba :=_ge .NewOverride ();_ba .PartNameAttr =path ;_ba .ContentTypeAttr =contentType ;_ed ._bfd .Override =append (_ed ._bfd .Override ,_ba );};
// NewContentTypes returns a wrapper around a newly constructed content-types.
func NewContentTypes ()ContentTypes {_fcd :=ContentTypes {_bfd :_ge .NewTypes ()};_fcd .AddDefault ("\u0078\u006d\u006c","\u0061p\u0070l\u0069\u0063\u0061\u0074\u0069\u006f\u006e\u002f\u0078\u006d\u006c");_fcd .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");_fcd .AddDefault ("\u0070\u006e\u0067","\u0069m\u0061\u0067\u0065\u002f\u0070\u006eg");_fcd .AddDefault ("\u006a\u0070\u0065\u0067","\u0069\u006d\u0061\u0067\u0065\u002f\u006a\u0070\u0065\u0067");_fcd .AddDefault ("\u006a\u0070\u0067","\u0069m\u0061\u0067\u0065\u002f\u006a\u0070g");_fcd .AddDefault ("\u0077\u006d\u0066","i\u006d\u0061\u0067\u0065\u002f\u0078\u002d\u0077\u006d\u0066");_fcd .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");_fcd .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 _fcd ;};
// NewRelationships creates a new relationship wrapper.
func NewRelationships ()Relationships {return Relationships {_fbgf :_dea .NewRelationships ()}};
// SetAuthor records the author of the document.
func (_bfg CoreProperties )SetAuthor (s string ){if _bfg ._dca .Creator ==nil {_bfg ._dca .Creator =&_bc .XSDAny {XMLName :_feb .Name {Local :"\u0064\u0063\u003a\u0063\u0072\u0065\u0061\u0074\u006f\u0072"}};};_bfg ._dca .Creator .Data =[]byte (s );};const _acfg =2022;func (_beg CustomProperties )SetPropertyAsBlob (name ,blob string ){_aab :=_beg .getNewProperty (name );_aab .Blob =&blob ;_beg .setOrReplaceProperty (_aab );};
// Company returns the name of the company that created the document.
// For unioffice created documents, it defaults to github.com/unidoc/unioffice
func (_dfc AppProperties )Company ()string {if _dfc ._deg .Company !=nil {return *_dfc ._deg .Company ;};return "";};
// X returns the inner wrapped XML type.
func (_dcfc Table )X ()*_ee .Tbl {return _dcfc ._bcda };
func (_cfb Relationship )X ()*_dea .Relationship {return _cfb ._dgc };
// Created returns the time that the document was created.
func (_efe CoreProperties )Created ()_ea .Time {return _deba (_efe ._aae .Created )};
// 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 (_egea *DocBase )AddExtraFileFromZip (f *_d .File )error {_cgd ,_ggfae :=_cf .ExtractToDiskTmp (f ,_egea .TmpPath );if _ggfae !=nil {return _gd .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",_ggfae );};_egea .ExtraFiles =append (_egea .ExtraFiles ,ExtraFile {ZipPath :f .Name ,DiskPath :_cgd });return nil ;};
// Path returns the path to an image file, if any.
func (_gdb ImageRef )Path ()string {return _gdb ._adab .Path };
// SetContentStatus records the content status of the document.
func (_cfc CoreProperties )SetContentStatus (s string ){_cfc ._aae .ContentStatus =&s };
// FindRIDForN returns the relationship ID for the i'th relationship of type t.
func (_fcef Relationships )FindRIDForN (i int ,t string )string {for _ ,_bgcc :=range _fcef ._fffg .CT_Relationships .Relationship {if _bgcc .TypeAttr ==t {if i ==0{return _bgcc .IdAttr ;};i --;};};return "";};
// X returns the inner wrapped XML type.
func (_afd CustomProperties )X ()*_a .Properties {return _afd ._gge };var _daeg =_fa .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");
// GetOrCreateCustomProperties returns the custom properties of the document (and if they not exist yet, creating them first).
func (_fcc *DocBase )GetOrCreateCustomProperties ()CustomProperties {if _fcc .CustomProperties .X ()==nil {_fcc .CreateCustomProperties ();};return _fcc .CustomProperties ;};
// SetApplicationVersion sets the version of the application that created the
// document. Per MS, the verison string mut be in the form 'XX.YYYY'.
func (_aff AppProperties )SetApplicationVersion (s string ){_aff ._aged .AppVersion =&s };
func (_aaf AppProperties )SetApplicationVersion (s string ){_aaf ._deg .AppVersion =&s };
// GetOrCreateCustomProperties returns the custom properties of the document (and if they not exist yet, creating them first).
func (_gdae *DocBase )GetOrCreateCustomProperties ()CustomProperties {if _gdae .CustomProperties .X ()==nil {_gdae .CreateCustomProperties ();};return _gdae .CustomProperties ;};
// Relationship is a relationship within a .rels file.
type Relationship struct{_dgc *_dea .Relationship };func (_ffgg CustomProperties )SetPropertyAsClsid (name string ,clsid string ){_eefe :=_ffgg .getNewProperty (name );_eefe .Clsid =&clsid ;_ffgg .setOrReplaceProperty (_eefe );};
// NewTable makes a new table.
func NewTable ()*Table {_geea :=_ee .NewTbl ();_geea .TblPr =_ee .NewCT_TableProperties ();return &Table {_bcda :_geea };};
// 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 (_bfgc ImageRef )RelativeWidth (h _ag .Distance )_ag .Distance {_cgc :=float64 (_bfgc .Size ().X )/float64 (_bfgc .Size ().Y );return h *_ag .Distance (_cgc );};
// Properties returns table properties.
func (_fbggf Table )Grid ()*_ee .CT_TableGrid {return _fbggf ._bcda .TblGrid };
func (_fbeg Table )Properties ()*_fea .CT_TableProperties {return _fbeg ._cege .TblPr };func (_acf CustomProperties )SetPropertyAsUint (name string ,ui uint ){_bcee :=_acf .getNewProperty (name );_cfg :=uint32 (ui );_bcee .Uint =&_cfg ;_acf .setOrReplaceProperty (_bcee );};
// TableStyles contains document specific properties.
type TableStyles struct{_gcc *_ee .TblStyleLst };
// ID returns the ID of a relationship.
func (_abf Relationship )ID ()string {return _abf ._dgc .IdAttr };
// Target returns the target (path) of a relationship.
func (_cecb Relationship )Target ()string {return _cecb ._bcd .TargetAttr };const _eade ="\u0032\u0020\u004aan\u0075\u0061\u0072\u0079\u0020\u0032\u0030\u0030\u0036\u0020\u0061\u0074\u0020\u0031\u0035\u003a\u0030\u0034";
// NewTableWithXfrm makes a new table with a pointer to its parent Xfrm for changing its offset and size.
func NewTableWithXfrm (xfrm *_ee .CT_Transform2D )*Table {_dec :=_ee .NewTbl ();_dec .TblPr =_ee .NewCT_TableProperties ();return &Table {_bcda :_dec ,_cgbd :xfrm };};func (_cdcf CustomProperties )SetPropertyAsR4 (name string ,r4 float32 ){_dgbb :=_cdcf .getNewProperty (name );_dgbb .R4 =&r4 ;_cdcf .setOrReplaceProperty (_dgbb );};
// AddRelationship adds a relationship.
func (_adeda Relationships )AddRelationship (target ,ctype string )Relationship {if !_ga .HasPrefix (ctype ,"\u0068t\u0074\u0070\u003a\u002f\u002f"){_eg .Log .Debug ("\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 );};_aega :=_faf .NewRelationship ();_defb :=len (_adeda ._fffg .Relationship )+1;_cge :=map[string ]struct{}{};for _ ,_acba :=range _adeda ._fffg .Relationship {_cge [_acba .IdAttr ]=struct{}{};};for _ ,_fagg :=_cge [_ba .Sprintf ("\u0072\u0049\u0064%\u0064",_defb )];_fagg ;_ ,_fagg =_cge [_ba .Sprintf ("\u0072\u0049\u0064%\u0064",_defb )]{_defb ++;};_aega .IdAttr =_ba .Sprintf ("\u0072\u0049\u0064%\u0064",_defb );_aega .TargetAttr =target ;_aega .TypeAttr =ctype ;_adeda ._fffg .Relationship =append (_adeda ._fffg .Relationship ,_aega );return Relationship {_bcd :_aega };};
// SetTitle records the title of the document.
func (_geb CoreProperties )SetTitle (s string ){if _geb ._aae .Title ==nil {_geb ._aae .Title =&_ff .XSDAny {XMLName :_gd .Name {Local :"\u0064\u0063\u003a\u0074\u0069\u0074\u006c\u0065"}};};_geb ._aae .Title .Data =[]byte (s );};
// 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 _ab .Image ;Images []ImageRef ;ExtraFiles []ExtraFile ;TmpPath string ;};
// Relationships returns a slice of all of the relationships.
func (_bgb Relationships )Relationships ()[]Relationship {_ffba :=[]Relationship {};for _ ,_fegd :=range _bgb ._fffg .Relationship {_ffba =append (_ffba ,Relationship {_bcd :_fegd });};return _ffba ;};func _deba (_efa *_ff .XSDAny )_ea .Time {if _efa ==nil {return _ea .Time {};};_efb ,_adb :=_ea .Parse (_bbgd ,string (_efa .Data ));if _adb !=nil {_eg .Log .Debug ("\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 (_efa .Data ),_adb );};return _efb ;};func init (){_gaf .SetAsStorage ()};
func (_deeg Relationships )Relationships ()[]Relationship {_fca :=[]Relationship {};for _ ,_aad :=range _deeg ._fbgf .Relationship {_fca =append (_fca ,Relationship {_dgc :_aad });};return _fca ;};
// SetCompany sets the name of the company that created the document.
func (_dae AppProperties )SetCompany (s string ){_dae ._aged .Company =&s };func (_fcg CustomProperties )SetPropertyAsBool (name string ,b bool ){_gag :=_fcg .getNewProperty (name );_gag .Bool =&b ;_fcg .setOrReplaceProperty (_gag );};
// CustomProperty contains document specific property.
// Using of this type is deprecated.
type CustomProperty struct{_gad *_af .CT_Property };func (_cfcg CustomProperties )SetPropertyAsStream (name string ,stream string ){_cff :=_cfcg .getNewProperty (name );_cff .Stream =&stream ;_cfcg .setOrReplaceProperty (_cff );};
// Data returns the data of an image file, if any.
func (_geb ImageRef )Data ()*[]byte {return _geb ._dba .Data };
// GetTargetByRelId returns a target path with the associated relation ID.
func (_acdb Relationships )GetTargetByRelId (idAttr string )string {for _ ,_ddga :=range _acdb ._fbgf .Relationship {if _ddga .IdAttr ==idAttr {return _ddga .TargetAttr ;};};return "";};func (_ege CustomProperties )SetPropertyAsUi2 (name string ,ui2 uint16 ){_bbe :=_ege .getNewProperty (name );_bbe .Ui2 =&ui2 ;_ege .setOrReplaceProperty (_bbe );};
// 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 {_adab :img ,_cff :d ,_dcgf :rels };};
func MakeImageRef (img Image ,d *DocBase ,rels Relationships )ImageRef {return ImageRef {_dba :img ,_eab :d ,_efdd :rels };};func _ga (_bfc *_bc .XSDAny )_cb .Time {if _bfc ==nil {return _cb .Time {};};_gfb ,_be :=_cb .Parse (_afd ,string (_bfc .Data ));if _be !=nil {_aa .Log .Debug ("\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 (_bfc .Data ),_be );};return _gfb ;};func (_gae CustomProperties )SetPropertyAsEmpty (name string ){_ggga :=_gae .getNewProperty (name );_ggga .Empty =_de .NewEmpty ();_gae .setOrReplaceProperty (_ggga );};
// ImageRef is a reference to an image within a document.
type ImageRef struct{_cff *DocBase ;_dcgf Relationships ;_adab Image ;_adcb string ;_adfe string ;};
// 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 _dc .Image ;Images []ImageRef ;ExtraFiles []ExtraFile ;TmpPath string ;};
// Data returns the data of an image file, if any.
func (_ebc ImageRef )Data ()*[]byte {return _ebc ._adab .Data };
// AddCol adds a column to a table.
func (_ddg Table )AddCol ()*TableCol {_cfdb :=_ee .NewCT_TableCol ();_ddg ._bcda .TblGrid .GridCol =append (_ddg ._bcda .TblGrid .GridCol ,_cfdb );for _ ,_gcfb :=range _ddg ._bcda .Tr {_egda :=_ee .NewCT_TableCell ();_gcfb .Tc =append (_gcfb .Tc ,_egda );};return &TableCol {_abd :_cfdb };};
// LastModifiedBy returns the name of the last person to modify the document
func (_agd CoreProperties )LastModifiedBy ()string {if _agd ._aae .LastModifiedBy !=nil {return *_agd ._aae .LastModifiedBy ;};return "";};
// AddRow adds a row to a table.
func (_bde Table )AddRow ()*TableRow {_cea :=_ee .NewCT_TableRow ();for _fcd :=0;_fcd < len (_bde ._bcda .TblGrid .GridCol );_fcd ++{_cea .Tc =append (_cea .Tc ,_ee .NewCT_TableCell ());};_bde ._bcda .Tr =append (_bde ._bcda .Tr ,_cea );return &TableRow {_facb :_cea };};
// Table represents a table in the document.
type Table struct{_bcda *_ee .Tbl ;_cgbd *_ee .CT_Transform2D ;};
// TblStyle returns the TblStyle property.
func (_dabc TableStyles )TblStyle ()[]*_ee .CT_TableStyle {return _dabc ._gcc .TblStyle };func (_defe CustomProperties )SetPropertyAsOblob (name ,oblob string ){_faa :=_defe .getNewProperty (name );_faa .Oblob =&oblob ;_defe .setOrReplaceProperty (_faa );};
// Append appends DocBase part of an office document to another DocBase.
func (_gf DocBase )Append (docBase1 DocBase )DocBase {_egd :=docBase1 .ContentTypes .X ();for _ ,_dce :=range _egd .Default {_gf .ContentTypes .AddDefault (_dce .ExtensionAttr ,_dce .ContentTypeAttr );};for _ ,_cfa :=range _egd .Override {_gf .ContentTypes .AddOverride (_cfa .PartNameAttr ,_cfa .ContentTypeAttr );};_cbff :=_gf .AppProperties .X ();_aa :=docBase1 .AppProperties .X ();if _cbff .Pages !=nil {if _aa .Pages !=nil {*_cbff .Pages +=*_aa .Pages ;};}else if _aa .Pages !=nil {_cbff .Pages =_aa .Pages ;};if _cbff .Words !=nil {if _aa .Words !=nil {*_cbff .Words +=*_aa .Words ;};}else if _aa .Words !=nil {_cbff .Words =_aa .Words ;};if _cbff .Characters !=nil {if _aa .Characters !=nil {*_cbff .Characters +=*_aa .Characters ;};}else if _aa .Characters !=nil {_cbff .Characters =_aa .Characters ;};if _cbff .Lines !=nil {if _aa .Lines !=nil {*_cbff .Lines +=*_aa .Lines ;};}else if _aa .Lines !=nil {_cbff .Lines =_aa .Lines ;};if _cbff .Paragraphs !=nil {if _aa .Paragraphs !=nil {*_cbff .Paragraphs +=*_aa .Paragraphs ;};}else if _aa .Paragraphs !=nil {_cbff .Paragraphs =_aa .Paragraphs ;};if _cbff .Notes !=nil {if _aa .Notes !=nil {*_cbff .Notes +=*_aa .Notes ;};}else if _aa .Notes !=nil {_cbff .Notes =_aa .Notes ;};if _cbff .HiddenSlides !=nil {if _aa .HiddenSlides !=nil {*_cbff .HiddenSlides +=*_aa .HiddenSlides ;};}else if _aa .HiddenSlides !=nil {_cbff .HiddenSlides =_aa .HiddenSlides ;};if _cbff .MMClips !=nil {if _aa .MMClips !=nil {*_cbff .MMClips +=*_aa .MMClips ;};}else if _aa .MMClips !=nil {_cbff .MMClips =_aa .MMClips ;};if _cbff .LinksUpToDate !=nil {if _aa .LinksUpToDate !=nil {*_cbff .LinksUpToDate =*_cbff .LinksUpToDate &&*_aa .LinksUpToDate ;};}else if _aa .LinksUpToDate !=nil {_cbff .LinksUpToDate =_aa .LinksUpToDate ;};if _cbff .CharactersWithSpaces !=nil {if _aa .CharactersWithSpaces !=nil {*_cbff .CharactersWithSpaces +=*_aa .CharactersWithSpaces ;};}else if _aa .CharactersWithSpaces !=nil {_cbff .CharactersWithSpaces =_aa .CharactersWithSpaces ;};if _cbff .SharedDoc !=nil {if _aa .SharedDoc !=nil {*_cbff .SharedDoc =*_cbff .SharedDoc ||*_aa .SharedDoc ;};}else if _aa .SharedDoc !=nil {_cbff .SharedDoc =_aa .SharedDoc ;};if _cbff .HyperlinksChanged !=nil {if _aa .HyperlinksChanged !=nil {*_cbff .HyperlinksChanged =*_cbff .HyperlinksChanged ||*_aa .HyperlinksChanged ;};}else if _aa .HyperlinksChanged !=nil {_cbff .HyperlinksChanged =_aa .HyperlinksChanged ;};_cbff .DigSig =nil ;if _cbff .TitlesOfParts ==nil &&_aa .TitlesOfParts !=nil {_cbff .TitlesOfParts =_aa .TitlesOfParts ;};if _cbff .HeadingPairs !=nil {if _aa .HeadingPairs !=nil {_ad :=_cbff .HeadingPairs .Vector ;_af :=_aa .HeadingPairs .Vector ;_bd :=_ad .Variant ;_fc :=_af .Variant ;_cg :=[]*_da .Variant {};for _ade :=0;_ade < len (_fc );_ade +=2{_cfg :=_fc [_ade ].Lpstr ;_dd :=false ;for _df :=0;_df < len (_bd );_df +=2{_fd :=_bd [_df ].Lpstr ;if _fd !=nil &&_cfg !=nil &&*_fd ==*_cfg {*_bd [_df +1].I4 =*_bd [_df +1].I4 +*_fc [_ade +1].I4 ;_dd =true ;break ;};};if !_dd {_cg =append (_cg ,&_da .Variant {CT_Variant :_da .CT_Variant {Lpstr :_fc [_ade ].Lpstr }});_cg =append (_cg ,&_da .Variant {CT_Variant :_da .CT_Variant {I4 :_fc [_ade ].I4 }});};};_bd =append (_bd ,_cg ...);_ad .SizeAttr =uint32 (len (_bd ));};}else if _aa .HeadingPairs !=nil {_cbff .HeadingPairs =_aa .HeadingPairs ;};if _cbff .HLinks !=nil {if _aa .HLinks !=nil {_eag :=_cbff .HLinks .Vector ;_db :=_aa .HLinks .Vector ;_bc :=_eag .Variant ;_dac :=_db .Variant ;for _ ,_ge :=range _dac {_ae :=true ;for _ ,_ece :=range _bc {if _e .DeepEqual (_ece ,_ge ){_ae =false ;break ;};};if _ae {_bc =append (_bc ,_ge );_eag .SizeAttr ++;};};};}else if _aa .HLinks !=nil {_cbff .HLinks =_aa .HLinks ;};_egb :=_gf .GetOrCreateCustomProperties ();_bf :=docBase1 .GetOrCreateCustomProperties ();for _ ,_ag :=range _bf .PropertiesList (){_egb .setProperty (_ag );};_gf .CustomProperties =_egb ;_de :=_gf .Rels .X ().Relationship ;for _ ,_gac :=range docBase1 .Rels .X ().Relationship {_adc :=true ;for _ ,_egf :=range _de {if _egf .TargetAttr ==_gac .TargetAttr &&_egf .TypeAttr ==_gac .TypeAttr {_adc =false ;break ;};};if _adc {_gf .Rels .AddRelationship (_gac .TargetAttr ,_gac .TypeAttr );};};for _ ,_afc :=range docBase1 .ExtraFiles {_dab :=_afc .ZipPath ;_dfg :=true ;for _ ,_gcg :=range _gf .ExtraFiles {if _gcg .ZipPath ==_dab {_dfg =false ;break ;};};if _dfg {_gf .ExtraFiles =append (_gf .ExtraFiles ,_afc );};};return _gf ;};
// SetCategory records the category of the document.
func (_egdf CoreProperties )SetCategory (s string ){_egdf ._aae .Category =&s };
// Modified returns the time that the document was modified.
func (_eee CoreProperties )Modified ()_ea .Time {return _deba (_eee ._aae .Modified )};func (_fbg CustomProperties )setProperty (_ccd *_a .CT_Property ){_fbg .setPropertyHelper (_ccd ,false )};
// SetLastModifiedBy records the last person to modify the document.
func (_acb CoreProperties )SetLastModifiedBy (s string ){_acb ._aae .LastModifiedBy =&s };
// DefAttr returns the DefAttr property.
func (_dbb TableStyles )DefAttr ()string {return _dbb ._gcc .DefAttr };
// CustomProperty contains document specific property.
// Using of this type is deprecated.
type CustomProperty struct{_cca *_a .CT_Property };
// AddHyperlink adds an external hyperlink relationship.
func (_egec Relationships )AddHyperlink (target string )Hyperlink {_efgd :=_egec .AddRelationship (target ,_ff .HyperLinkType );_efgd ._bcd .TargetModeAttr =_faf .ST_TargetModeExternal ;return Hyperlink (_efgd );};
// Category returns the category of the document
func (_bdaa CoreProperties )Category ()string {if _bdaa ._aae .Category !=nil {return *_bdaa ._aae .Category ;};return "";};
// Properties returns table properties.
func (_cfd Table )Properties ()*_ee .CT_TableProperties {return _cfd ._bcda .TblPr };
// X returns the inner wrapped XML type.
func (_bead Theme )X ()*_ee .Theme {return _bead ._cbcg };
// RelID returns the relationship ID.
func (_gecc ImageRef )RelID ()string {return _gecc ._abcc };
// X returns the underlying raw XML data.
func (_fgd Relationships )X ()*_faf .Relationships {return _fgd ._fffg };func (_abe CustomProperties )SetPropertyAsBlob (name ,blob string ){_eab :=_abe .getNewProperty (name );_eab .Blob =&blob ;_abe .setOrReplaceProperty (_eab );};func (_cba CustomProperties )SetPropertyAsOstream (name string ,ostream string ){_efg :=_cba .getNewProperty (name );_efg .Ostream =&ostream ;_cba .setOrReplaceProperty (_efg );};func (_cbc CustomProperties )SetPropertyAsDate (name string ,date _ea .Time ){date =date .UTC ();_fcf ,_ced ,_fbc :=date .Date ();_gfaf ,_bac ,_ecaf :=date .Clock ();_fab :=_ea .Date (_fcf ,_ced ,_fbc ,_gfaf ,_bac ,_ecaf ,0,_ea .UTC );_cgg :=_cbc .getNewProperty (name );_cgg .Filetime =&_fab ;_cbc .setOrReplaceProperty (_cgg );};
func (_aff Relationships )X ()*_dea .Relationships {return _aff ._fbgf };
// Format returns the format of the underlying image
func (_eabe ImageRef )Format ()string {return _eabe ._adab .Format };
// Properties returns table properties.
func (_gbea Table )Grid ()*_fea .CT_TableGrid {return _gbea ._cege .TblGrid };
// CustomProperties contains document specific properties.
type CustomProperties struct{_gge *_a .Properties };
// SetModified sets the time that the document was modified.
func (_ddg CoreProperties )SetModified (t _cb .Time ){_ddg ._dca .Modified =_eeb (t ,"\u0064\u0063t\u0065\u0072\u006ds\u003a\u006d\u006f\u0064\u0069\u0066\u0069\u0065\u0064");};
// 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 ){_dbf :=Image {};_gaee ,_bbf ,_dcfbf :=_dc .Decode (_b .NewReader (data ));if _dcfbf !=nil {return _dbf ,_ba .Errorf ("\u0075n\u0061\u0062\u006c\u0065 \u0074\u006f\u0020\u0070\u0061r\u0073e\u0020i\u006d\u0061\u0067\u0065\u003a\u0020\u0025s",_dcfbf );};_dbf .Data =&data ;_dbf .Format =_bbf ;_dbf .Size =_gaee .Bounds ().Size ();return _dbf ,nil ;};func UtcTimeFormat (t _ea .Time )string {return t .Format (_eade )+"\u0020\u0055\u0054\u0043"};func (_ceb CustomProperties )SetPropertyAsI1 (name string ,i1 int8 ){_agb :=_ceb .getNewProperty (name );_agb .I1 =&i1 ;_ceb .setOrReplaceProperty (_agb );};
// X returns the inner wrapped XML type of CustomProperty.
func (_gge CustomProperty )X ()*_af .CT_Property {return _gge ._gad };
// SetID set the ID of a relationship.
func (_cab Relationship )SetID (ID string ){_cab ._bcd .IdAttr =ID ;};
func (_gcef Relationship )SetID (ID string ){_gcef ._dgc .IdAttr =ID ;};
// Target returns the target attrubute of the image reference (a path where the image file is located in the document structure).
func (_fbbg *ImageRef )Target ()string {return _fbbg ._adfe };
// NewTable makes a new table.
func NewTable ()*Table {_ffd :=_fea .NewTbl ();_ffd .TblPr =_fea .NewCT_TableProperties ();return &Table {_cege :_ffd };};
// SetStyle assigns TableStyle to a table.
func (_cfd Table )SetStyle (style *_fea .CT_TableStyle ){if _cfd ._cege .TblPr ==nil {_cfd ._cege .TblPr =_fea .NewCT_TableProperties ();};if _cfd ._cege .TblPr .Choice ==nil {_cfd ._cege .TblPr .Choice =_fea .NewCT_TablePropertiesChoice ();};_cfd ._cege .TblPr .Choice .TableStyle =style ;};
// PropertiesList returns the list of all custom properties of the document.
func (_bda CustomProperties )PropertiesList ()[]*_af .CT_Property {return _bda ._feaf .Property };
// NewCustomProperties constructs a new CustomProperties.
func NewCustomProperties ()CustomProperties {return CustomProperties {_feaf :_af .NewProperties ()}};
// EnsureDefault esnures that an extension and default content type exist,
// adding it if necessary.
func (_dcfb ContentTypes )EnsureDefault (ext ,contentType string ){ext =_ga .ToLower (ext );for _ ,_fdb :=range _dcfb ._bbb .Default {if _fdb .ExtensionAttr ==ext {_fdb .ContentTypeAttr =contentType ;return ;};};_ada :=&_cbf .Default {};_ada .ContentTypeAttr =contentType ;_ada .ExtensionAttr =ext ;_dcfb ._bbb .Default =append (_dcfb ._bbb .Default ,_ada );};
func (_cbd ContentTypes )EnsureDefault (ext ,contentType string ){ext =_e .ToLower (ext );for _ ,_ce :=range _cbd ._bfd .Default {if _ce .ExtensionAttr ==ext {_ce .ContentTypeAttr =contentType ;return ;};};_cbg :=&_ge .Default {};_cbg .ContentTypeAttr =contentType ;_cbg .ExtensionAttr =ext ;_cbd ._bfd .Default =append (_cbd ._bfd .Default ,_cbg );};
// AddHyperlink adds an external hyperlink relationship.
func (_gcf Relationships )AddHyperlink (target string )Hyperlink {_gda :=_gcf .AddRelationship (target ,_bc .HyperLinkType );_gda ._dgc .TargetModeAttr =_dea .ST_TargetModeExternal ;return Hyperlink (_gda );};
// X returns the inner wrapped XML type.
func (_gfdf CustomProperties )X ()*_af .Properties {return _gfdf ._feaf };
// 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 _bc .DocType )error {_afaa :=_bc .AbsoluteImageFilename (dt ,imageNum ,_e .ToLower (img .Format ()));if img .Data ()!=nil &&len (*img .Data ())> 0{if _aagf :=_cf .AddFileFromBytes (z ,_afaa ,*img .Data ());_aagf !=nil {return _aagf ;};}else if img .Path ()!=""{if _ggc :=_cf .AddFileFromDisk (z ,_afaa ,img .Path ());_ggc !=nil {return _ggc ;};}else {return _gd .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 ;};
// NewRelationshipsCopy creates a new relationships wrapper as a copy of passed in instance.
func NewRelationshipsCopy (rels Relationships )Relationships {_gbc :=*rels ._fbgf ;return Relationships {_fbgf :&_gbc };};
// Cells returns an array of row cells.
func (_gfcb TableRow )Cells ()[]*_fea .CT_TableCell {return _gfcb ._bdge .Tc };func (_ceg CustomProperties )SetPropertyAsVstream (name string ,vstream *_de .Vstream ){_bbf :=_ceg .getNewProperty (name );_bbf .Vstream =vstream ;_ceg .setOrReplaceProperty (_bbf );};func (_ede CustomProperties )SetPropertyAsError (name string ,error string ){_edce :=_ede .getNewProperty (name );_edce .Error =&error ;_ede .setOrReplaceProperty (_edce );};
// TableRow represents a row in a table.
type TableRow struct{_bdge *_fea .CT_TableRow };func (_cfa Relationship )String ()string {return _gd .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",_cfa .ID (),_cfa .Target (),_cfa .Type ());};
// 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 (_bfca ImageRef )RelativeHeight (w _ag .Distance )_ag .Distance {_dgb :=float64 (_bfca .Size ().Y )/float64 (_bfca .Size ().X );return w *_ag .Distance (_dgb );};
// X returns the inner wrapped XML type.
func (_eae Table )X ()*_fea .Tbl {return _eae ._cege };func (_fcdc *ImageRef )SetRelID (id string ){_fcdc ._abcc =id };
// SetLastModifiedBy records the last person to modify the document.
func (_bab CoreProperties )SetLastModifiedBy (s string ){_bab ._dca .LastModifiedBy =&s };
// Path returns the path to an image file, if any.
func (_fec ImageRef )Path ()string {return _fec ._dba .Path };
// Category returns the category of the document
func (_bdg CoreProperties )Category ()string {if _bdg ._dca .Category !=nil {return *_bdg ._dca .Category ;};return "";};
// X returns the inner raw content types.
func (_gdc ContentTypes )X ()*_ge .Types {return _gdc ._bfd };func _eeb (_fdd _cb .Time ,_aec string )*_bc .XSDAny {_gfd :=&_bc .XSDAny {XMLName :_feb .Name {Local :_aec }};_gfd .Attrs =append (_gfd .Attrs ,_feb .Attr {Name :_feb .Name {Local :"\u0078\u0073\u0069\u003a\u0074\u0079\u0070\u0065"},Value :"\u0064\u0063\u0074\u0065\u0072\u006d\u0073\u003a\u00573\u0043\u0044\u0054\u0046"});_gfd .Attrs =append (_gfd .Attrs ,_feb .Attr {Name :_feb .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"});_gfd .Attrs =append (_gfd .Attrs ,_feb .Attr {Name :_feb .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/"});_gfd .Data =[]byte (_fdd .Format (_afd ));return _gfd ;};
// AddDefault registers a default content type for a given file extension.
func (_ccf ContentTypes )AddDefault (fileExtension string ,contentType string ){fileExtension =_e .ToLower (fileExtension );for _ ,_deb :=range _ccf ._bfd .Default {if _deb .ExtensionAttr ==fileExtension &&_deb .ContentTypeAttr ==contentType {return ;};};_aca :=_ge .NewDefault ();_aca .ExtensionAttr =fileExtension ;_aca .ContentTypeAttr =contentType ;_ccf ._bfd .Default =append (_ccf ._bfd .Default ,_aca );};
// X returns the inner wrapped XML type.
func (_agfb Theme )X ()*_fea .Theme {return _agfb ._bdca };
// Target returns the target attrubute of the image reference (a path where the image file is located in the document structure).
func (_cfe *ImageRef )Target ()string {return _cfe ._fdf };
// AddCustomRelationships adds relationships related to custom properties to the document.
func (_eccb *DocBase )AddCustomRelationships (){_eccb .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");_eccb .Rels .AddRelationship ("\u0064\u006f\u0063\u0050ro\u0070\u0073\u002f\u0063\u0075\u0073\u0074\u006f\u006d\u002e\u0078\u006d\u006c",_bc .CustomPropertiesType );};
// AddRow adds a row to a table.
func (_fab Table )AddRow ()*TableRow {_fbag :=_fea .NewCT_TableRow ();for _ecd :=0;_ecd < len (_fab ._cege .TblGrid .GridCol );_ecd ++{_fbag .Tc =append (_fbag .Tc ,_fea .NewCT_TableCell ());};_fab ._cege .Tr =append (_fab ._cege .Tr ,_fbag );return &TableRow {_bdge :_fbag };};
// CustomProperties contains document specific properties.
type CustomProperties struct{_feaf *_af .Properties };func (_efae CustomProperties )setOrReplaceProperty (_baea *_af .CT_Property ){_efae .setPropertyHelper (_baea ,true );};
// Theme is a drawingml theme.
type Theme struct{_bdca *_fea .Theme };func (_fcdg CustomProperties )SetPropertyAsI8 (name string ,i8 int64 ){_bdc :=_fcdg .getNewProperty (name );_bdc .I8 =&i8 ;_fcdg .setOrReplaceProperty (_bdc );};
// GetByRelId returns a relationship with the associated relation ID.
func (_ddc Relationships )GetByRelId (idAttr string )Relationship {for _ ,_beb :=range _ddc ._fbgf .Relationship {if _beb .IdAttr ==idAttr {return Relationship {_dgc :_beb };};};return Relationship {};};func (_aba CustomProperties )SetPropertyAsR8 (name string ,r8 float64 ){_agb :=_aba .getNewProperty (name );_agb .R8 =&r8 ;_aba .setOrReplaceProperty (_agb );};
// CreateCustomProperties creates the custom properties of the document.
func (_ffcb *DocBase )CreateCustomProperties (){_ffcb .CustomProperties =NewCustomProperties ();_ffcb .AddCustomRelationships ();};func init (){_bg .SetAsStorage ()};func (_aaaf CustomProperties )SetPropertyAsDecimal (name string ,decimal float64 ){_fdc :=_aaaf .getNewProperty (name );_fdc .Decimal =&decimal ;_aaaf .setOrReplaceProperty (_fdc );};
// 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 (_ccd *ImageRef )SetTarget (target string ){_ccd ._fdf =target };
// Title returns the Title of the document
func (_fdb CoreProperties )Title ()string {if _fdb ._dca .Title !=nil {return string (_fdb ._dca .Title .Data );};return "";};func UtcTimeFormat (t _cb .Time )string {return t .Format (_gfcd )+"\u0020\u0055\u0054\u0043"};
// Type returns the type of a relationship.
func (_ebe Relationship )Type ()string {return _ebe ._dgc .TypeAttr };func (_bdcg CustomProperties )SetPropertyAsR4 (name string ,r4 float32 ){_ccc :=_bdcg .getNewProperty (name );_ccc .R4 =&r4 ;_bdcg .setOrReplaceProperty (_ccc );};const _gadg =5;
// SetCategory records the category of the document.
func (_efb CoreProperties )SetCategory (s string ){_efb ._dca .Category =&s };func (_afab CustomProperties )SetPropertyAsBstr (name string ,bstr string ){_bddc :=_afab .getNewProperty (name );_bddc .Bstr =&bstr ;_afab .setOrReplaceProperty (_bddc );};
// SetOffsetX sets horizontal offset of a table in distance units (see measurement package).
func (_dacd Table )SetOffsetX (offX float64 ){if _dacd ._bcgd .Off ==nil {_dacd ._bcgd .Off =_fea .NewCT_Point2D ();_dfb :=int64 (0);_dacd ._bcgd .Off .YAttr =_fea .ST_Coordinate {ST_CoordinateUnqualified :&_dfb };};_aadc :=_ag .ToEMU (offX );_dacd ._bcgd .Off .XAttr =_fea .ST_Coordinate {ST_CoordinateUnqualified :&_aadc };};func (_fbg CustomProperties )SetPropertyAsOstream (name string ,ostream string ){_ffg :=_fbg .getNewProperty (name );_ffg .Ostream =&ostream ;_fbg .setOrReplaceProperty (_ffg );};const _faeg =2;const _dfd =15;
// RemoveOverride removes an override given a path.
func (_cag ContentTypes )RemoveOverride (path string ){if !_e .HasPrefix (path ,"\u002f"){path ="\u002f"+path ;};for _bca ,_dfa :=range _cag ._bfd .Override {if _dfa .PartNameAttr ==path {copy (_cag ._bfd .Override [_bca :],_cag ._bfd .Override [_bca +1:]);_cag ._bfd .Override =_cag ._bfd .Override [0:len (_cag ._bfd .Override )-1];};};};
// SetDocSecurity sets the document security flag.
func (_gggc AppProperties )SetDocSecurity (v int32 ){_gggc ._deg .DocSecurity =_bc .Int32 (v )};func (_bdce CustomProperties )SetPropertyAsBool (name string ,b bool ){_eed :=_bdce .getNewProperty (name );_eed .Bool =&b ;_bdce .setOrReplaceProperty (_eed );};
// Author returns the author of the document
func (_ded CoreProperties )Author ()string {if _ded ._dca .Creator !=nil {return string (_ded ._dca .Creator .Data );};return "";};func (_gag CustomProperties )getNewProperty (_ccg string )*_af .CT_Property {_cbbc :=_gag ._feaf .Property ;_fg :=int32 (1);for _ ,_gcb :=range _cbbc {if _gcb .PidAttr > _fg {_fg =_gcb .PidAttr ;};};_feaa :=_af .NewCT_Property ();_feaa .NameAttr =&_ccg ;_feaa .PidAttr =_fg +1;_feaa .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 _feaa ;};var ReleasedAt =_cb .Date (_acfg ,_faeg ,_gadg ,_dfd ,_bbfa ,0,0,_cb .UTC );func (_dgg CustomProperties )SetPropertyAsOstorage (name string ,ostorage string ){_gbg :=_dgg .getNewProperty (name );_gbg .Ostorage =&ostorage ;_dgg .setOrReplaceProperty (_gbg );};
// NewTableWithXfrm makes a new table with a pointer to its parent Xfrm for changing its offset and size.
func NewTableWithXfrm (xfrm *_fea .CT_Transform2D )*Table {_fbdbe :=_fea .NewTbl ();_fbdbe .TblPr =_fea .NewCT_TableProperties ();return &Table {_cege :_fbdbe ,_bcgd :xfrm };};func (_ggbb CustomProperties )SetPropertyAsDate (name string ,date _cb .Time ){date =date .UTC ();_ebb ,_cdde ,_bcg :=date .Date ();_acb ,_fbdb ,_gfea :=date .Clock ();_bcb :=_cb .Date (_ebb ,_cdde ,_bcg ,_acb ,_fbdb ,_gfea ,0,_cb .UTC );_edf :=_ggbb .getNewProperty (name );_edf .Filetime =&_bcb ;_ggbb .setOrReplaceProperty (_edf );};
// Application returns the name of the application that created the document.
// For unioffice created documents, it defaults to github.com/unidoc/unioffice
func (_fag AppProperties )Application ()string {if _fag ._deg .Application !=nil {return *_fag ._deg .Application ;};return "";};
// SetWidth sets column width, see measurement package.
func (_bef TableCol )SetWidth (m _ag .Distance ){_dgd :=_ag .ToEMU (float64 (m ));_bef ._ebga .WAttr =_fea .ST_Coordinate {ST_CoordinateUnqualified :&_dgd };};
// ExtraFile is an unsupported file type extracted from, or to be written to a
// zip package
type ExtraFile struct{ZipPath string ;DiskPath string ;};func (_bdgf CustomProperties )SetPropertyAsVector (name string ,vector *_de .Vector ){_cda :=_bdgf .getNewProperty (name );_cda .Vector =vector ;_bdgf .setOrReplaceProperty (_cda );};func (_cde CustomProperties )SetPropertyAsLpstr (name string ,lpstr string ){_gea :=_cde .getNewProperty (name );_gea .Lpstr =&lpstr ;_cde .setOrReplaceProperty (_gea );};
// SetHeight sets row height, see measurement package.
func (_dbc TableRow )SetHeight (m _ag .Distance ){_ebed :=_ag .ToEMU (float64 (m ));_dbc ._bdge .HAttr =_fea .ST_Coordinate {ST_CoordinateUnqualified :&_ebed };};
// AddRelationship adds a relationship.
func (_cae Relationships )AddRelationship (target ,ctype string )Relationship {if !_e .HasPrefix (ctype ,"\u0068t\u0074\u0070\u003a\u002f\u002f"){_aa .Log .Debug ("\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 );};_aegf :=_dea .NewRelationship ();_fgf :=len (_cae ._fbgf .Relationship )+1;_cba :=map[string ]struct{}{};for _ ,_aabg :=range _cae ._fbgf .Relationship {_cba [_aabg .IdAttr ]=struct{}{};};for _ ,_fcb :=_cba [_gd .Sprintf ("\u0072\u0049\u0064%\u0064",_fgf )];_fcb ;_ ,_fcb =_cba [_gd .Sprintf ("\u0072\u0049\u0064%\u0064",_fgf )]{_fgf ++;};_aegf .IdAttr =_gd .Sprintf ("\u0072\u0049\u0064%\u0064",_fgf );_aegf .TargetAttr =target ;_aegf .TypeAttr =ctype ;_cae ._fbgf .Relationship =append (_cae ._fbgf .Relationship ,_aegf );return Relationship {_dgc :_aegf };};
// LastModifiedBy returns the name of the last person to modify the document
func (_cdf CoreProperties )LastModifiedBy ()string {if _cdf ._dca .LastModifiedBy !=nil {return *_cdf ._dca .LastModifiedBy ;};return "";};func (_agfe TableRow )addCell ()*_fea .CT_TableCell {_cce :=_fea .NewCT_TableCell ();_agfe ._bdge .Tc =append (_agfe ._bdge .Tc ,_cce );return _cce ;};
// 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 ){_gac :=Image {};_ddge ,_ccbf ,_gce :=_ab .Decode (_c .NewReader (data ));if _gce !=nil {return _gac ,_gd .Errorf ("\u0075n\u0061\u0062\u006c\u0065 \u0074\u006f\u0020\u0070\u0061r\u0073e\u0020i\u006d\u0061\u0067\u0065\u003a\u0020\u0025s",_gce );};_gac .Data =&data ;_gac .Format =_ccbf ;_gac .Size =_ddge .Bounds ().Size ();return _gac ,nil ;};
// 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 (_eca Relationships )AddAutoRelationship (dt _bc .DocType ,src string ,idx int ,ctype string )Relationship {return _eca .AddRelationship (_bc .RelativeFilename (dt ,src ,ctype ,idx ),ctype );};
// Created returns the time that the document was created.
func (_bbgf CoreProperties )Created ()_cb .Time {return _ga (_bbgf ._dca .Created )};
// Rows returns all table rows.
func (_gdab Table )Rows ()[]*TableRow {_gefb :=_gdab ._cege .Tr ;_affe :=[]*TableRow {};for _ ,_gecf :=range _gefb {_affe =append (_affe ,&TableRow {_bdge :_gecf });};return _affe ;};

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

View File

@ -9,93 +9,93 @@
// 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 logger ;import (_bd "fmt";_ee "io";_g "os";_e "path/filepath";_d "runtime";);
package logger ;import (_g "fmt";_db "io";_gc "os";_d "path/filepath";_e "runtime";);
// Notice does nothing for dummy logger.
func (DummyLogger )Notice (format string ,args ...interface{}){};
// ConsoleLogger is a logger that writes logs to the 'os.Stdout'
type ConsoleLogger struct{LogLevel LogLevel ;};
// Error logs error message.
func (_bdb WriterLogger )Error (format string ,args ...interface{}){if _bdb .LogLevel >=LogLevelError {_ecb :="\u005b\u0045\u0052\u0052\u004f\u0052\u005d\u0020";_bdb .logToWriter (_bdb .Output ,_ecb ,format ,args ...);};};
// Trace logs trace message.
func (_ec ConsoleLogger )Trace (format string ,args ...interface{}){if _ec .LogLevel >=LogLevelTrace {_gbcg :="\u005b\u0054\u0052\u0041\u0043\u0045\u005d\u0020";_ec .output (_g .Stdout ,_gbcg ,format ,args ...);};};func (_bg WriterLogger )logToWriter (_gaa _ee .Writer ,_bge string ,_ebd string ,_ac ...interface{}){_ad (_gaa ,_bge ,_ebd ,_ac );};
// Warning logs warning message.
func (_ba ConsoleLogger )Warning (format string ,args ...interface{}){if _ba .LogLevel >=LogLevelWarning {_dd :="\u005b\u0057\u0041\u0052\u004e\u0049\u004e\u0047\u005d\u0020";_ba .output (_g .Stdout ,_dd ,format ,args ...);};};
// LogLevel is the verbosity level for logging.
type LogLevel int ;
// Debug logs debug message.
func (_ad WriterLogger )Debug (format string ,args ...interface{}){if _ad .LogLevel >=LogLevelDebug {_af :="\u005b\u0044\u0045\u0042\u0055\u0047\u005d\u0020";_ad .logToWriter (_ad .Output ,_af ,format ,args ...);};};func (_bce WriterLogger )logToWriter (_cb _db .Writer ,_aee string ,_cbg string ,_deg ...interface{}){_ffc (_cb ,_aee ,_cbg ,_deg );};
// NewWriterLogger creates new 'writer' logger.
func NewWriterLogger (logLevel LogLevel ,writer _ee .Writer )*WriterLogger {logger :=WriterLogger {Output :writer ,LogLevel :logLevel };return &logger ;};
func NewWriterLogger (logLevel LogLevel ,writer _db .Writer )*WriterLogger {logger :=WriterLogger {Output :writer ,LogLevel :logLevel };return &logger ;};
// Logger is the interface used for logging in the unipdf package.
type Logger interface{Error (_f string ,_dc ...interface{});Warning (_ed string ,_fd ...interface{});Notice (_fe string ,_b ...interface{});Info (_bb string ,_ef ...interface{});Debug (_a string ,_cd ...interface{});Trace (_ce string ,_fc ...interface{});IsLogLevel (_ff LogLevel )bool ;};
// Warning logs warning message.
func (_ag WriterLogger )Warning (format string ,args ...interface{}){if _ag .LogLevel >=LogLevelWarning {_bde :="\u005b\u0057\u0041\u0052\u004e\u0049\u004e\u0047\u005d\u0020";_ag .logToWriter (_ag .Output ,_bde ,format ,args ...);};};const (LogLevelTrace LogLevel =5;LogLevelDebug LogLevel =4;LogLevelInfo LogLevel =3;LogLevelNotice LogLevel =2;LogLevelWarning LogLevel =1;LogLevelError LogLevel =0;);var Log Logger =DummyLogger {};
// Info logs info message.
func (_bce ConsoleLogger )Info (format string ,args ...interface{}){if _bce .LogLevel >=LogLevelInfo {_dg :="\u005bI\u004e\u0046\u004f\u005d\u0020";_bce .output (_g .Stdout ,_dg ,format ,args ...);};};
func (_fg WriterLogger )Warning (format string ,args ...interface{}){if _fg .LogLevel >=LogLevelWarning {_efae :="\u005b\u0057\u0041\u0052\u004e\u0049\u004e\u0047\u005d\u0020";_fg .logToWriter (_fg .Output ,_efae ,format ,args ...);};};
// NewConsoleLogger creates new console logger.
func NewConsoleLogger (logLevel LogLevel )*ConsoleLogger {return &ConsoleLogger {LogLevel :logLevel }};
// Debug does nothing for dummy logger.
func (DummyLogger )Debug (format string ,args ...interface{}){};
// Error does nothing for dummy logger.
func (DummyLogger )Error (format string ,args ...interface{}){};
// Notice logs notice message.
func (_gff WriterLogger )Notice (format string ,args ...interface{}){if _gff .LogLevel >=LogLevelNotice {_eg :="\u005bN\u004f\u0054\u0049\u0043\u0045\u005d ";_gff .logToWriter (_gff .Output ,_eg ,format ,args ...);};};
func (_eg WriterLogger )Notice (format string ,args ...interface{}){if _eg .LogLevel >=LogLevelNotice {_bf :="\u005bN\u004f\u0054\u0049\u0043\u0045\u005d ";_eg .logToWriter (_eg .Output ,_bf ,format ,args ...);};};
// Debug logs debug message.
func (_gb ConsoleLogger )Debug (format string ,args ...interface{}){if _gb .LogLevel >=LogLevelDebug {_fcc :="\u005b\u0044\u0045\u0042\u0055\u0047\u005d\u0020";_gb .output (_gc .Stdout ,_fcc ,format ,args ...);};};
// Info logs info message.
func (_ebf WriterLogger )Info (format string ,args ...interface{}){if _ebf .LogLevel >=LogLevelInfo {_df :="\u005bI\u004e\u0046\u004f\u005d\u0020";_ebf .logToWriter (_ebf .Output ,_df ,format ,args ...);};};
// Trace logs trace message.
func (_gaf WriterLogger )Trace (format string ,args ...interface{}){if _gaf .LogLevel >=LogLevelTrace {_cg :="\u005b\u0054\u0052\u0041\u0043\u0045\u005d\u0020";_gaf .logToWriter (_gaf .Output ,_cg ,format ,args ...);};};
// Info logs info message.
func (_gf ConsoleLogger )Info (format string ,args ...interface{}){if _gf .LogLevel >=LogLevelInfo {_ggb :="\u005bI\u004e\u0046\u004f\u005d\u0020";_gf .output (_gc .Stdout ,_ggb ,format ,args ...);};};
// Trace does nothing for dummy logger.
func (DummyLogger )Trace (format string ,args ...interface{}){};
// IsLogLevel returns true if log level is greater or equal than `level`.
// Can be used to avoid resource intensive calls to loggers.
func (_ge ConsoleLogger )IsLogLevel (level LogLevel )bool {return _ge .LogLevel >=level };
// WriterLogger is the logger that writes data to the Output writer
type WriterLogger struct{LogLevel LogLevel ;Output _db .Writer ;};
// IsLogLevel returns true if log level is greater or equal than `level`.
// Can be used to avoid resource intensive calls to loggers.
func (_fb WriterLogger )IsLogLevel (level LogLevel )bool {return _fb .LogLevel >=level };
// IsLogLevel returns true from dummy logger.
func (DummyLogger )IsLogLevel (level LogLevel )bool {return true };
// DummyLogger does nothing.
type DummyLogger struct{};
// Warning does nothing for dummy logger.
func (DummyLogger )Warning (format string ,args ...interface{}){};
// Notice does nothing for dummy logger.
func (DummyLogger )Notice (format string ,args ...interface{}){};func (_efe ConsoleLogger )output (_ac _db .Writer ,_de string ,_eb string ,_bc ...interface{}){_ffc (_ac ,_de ,_eb ,_bc ...);};
// Info does nothing for dummy logger.
func (DummyLogger )Info (format string ,args ...interface{}){};
// Trace logs trace message.
func (_fd WriterLogger )Trace (format string ,args ...interface{}){if _fd .LogLevel >=LogLevelTrace {_da :="\u005b\u0054\u0052\u0041\u0043\u0045\u005d\u0020";_fd .logToWriter (_fd .Output ,_da ,format ,args ...);};};
func (_ffd ConsoleLogger )Trace (format string ,args ...interface{}){if _ffd .LogLevel >=LogLevelTrace {_ga :="\u005b\u0054\u0052\u0041\u0043\u0045\u005d\u0020";_ffd .output (_gc .Stdout ,_ga ,format ,args ...);};};var Log Logger =DummyLogger {};
// SetLogger sets 'logger' to be used by the unidoc unipdf library.
func SetLogger (logger Logger ){Log =logger };
// Debug logs debug message.
func (_c ConsoleLogger )Debug (format string ,args ...interface{}){if _c .LogLevel >=LogLevelDebug {_cf :="\u005b\u0044\u0045\u0042\u0055\u0047\u005d\u0020";_c .output (_g .Stdout ,_cf ,format ,args ...);};};func _ad (_eag _ee .Writer ,_agg string ,_fba string ,_df ...interface{}){_ ,_ge ,_gc ,_cb :=_d .Caller (3);if !_cb {_ge ="\u003f\u003f\u003f";_gc =0;}else {_ge =_e .Base (_ge );};_ff :=_bd .Sprintf ("\u0025s\u0020\u0025\u0073\u003a\u0025\u0064 ",_agg ,_ge ,_gc )+_fba +"\u000a";_bd .Fprintf (_eag ,_ff ,_df ...);};
// DummyLogger does nothing.
type DummyLogger struct{};
// WriterLogger is the logger that writes data to the Output writer
type WriterLogger struct{LogLevel LogLevel ;Output _ee .Writer ;};
// Logger is the interface used for logging in the unipdf package.
type Logger interface{Error (_eb string ,_gb ...interface{});Warning (_ed string ,_edb ...interface{});Notice (_ga string ,_f ...interface{});Info (_a string ,_bc ...interface{});Debug (_ae string ,_gbc ...interface{});Trace (_af string ,_gad ...interface{});IsLogLevel (_ea LogLevel )bool ;};
// Trace does nothing for dummy logger.
func (DummyLogger )Trace (format string ,args ...interface{}){};func (_bcd ConsoleLogger )output (_dda _ee .Writer ,_gg string ,_afg string ,_ebb ...interface{}){_ad (_dda ,_gg ,_afg ,_ebb ...);};
// Debug logs debug message.
func (_ef WriterLogger )Debug (format string ,args ...interface{}){if _ef .LogLevel >=LogLevelDebug {_de :="\u005b\u0044\u0045\u0042\u0055\u0047\u005d\u0020";_ef .logToWriter (_ef .Output ,_de ,format ,args ...);};};
// IsLogLevel returns true if log level is greater or equal than `level`.
// Can be used to avoid resource intensive calls to loggers.
func (_fb ConsoleLogger )IsLogLevel (level LogLevel )bool {return _fb .LogLevel >=level };
// IsLogLevel returns true if log level is greater or equal than `level`.
// Can be used to avoid resource intensive calls to loggers.
func (_afc WriterLogger )IsLogLevel (level LogLevel )bool {return _afc .LogLevel >=level };
// Warning does nothing for dummy logger.
func (DummyLogger )Warning (format string ,args ...interface{}){};
// Warning logs warning message.
func (_ae ConsoleLogger )Warning (format string ,args ...interface{}){if _ae .LogLevel >=LogLevelWarning {_cc :="\u005b\u0057\u0041\u0052\u004e\u0049\u004e\u0047\u005d\u0020";_ae .output (_gc .Stdout ,_cc ,format ,args ...);};};
// Error logs error message.
func (_fg ConsoleLogger )Error (format string ,args ...interface{}){if _fg .LogLevel >=LogLevelError {_bb :="\u005b\u0045\u0052\u0052\u004f\u0052\u005d\u0020";_fg .output (_g .Stdout ,_bb ,format ,args ...);};};
func (_bga WriterLogger )Error (format string ,args ...interface{}){if _bga .LogLevel >=LogLevelError {_ebg :="\u005b\u0045\u0052\u0052\u004f\u0052\u005d\u0020";_bga .logToWriter (_bga .Output ,_ebg ,format ,args ...);};};const (LogLevelTrace LogLevel =5;LogLevelDebug LogLevel =4;LogLevelInfo LogLevel =3;LogLevelNotice LogLevel =2;LogLevelWarning LogLevel =1;LogLevelError LogLevel =0;);
// Debug does nothing for dummy logger.
func (DummyLogger )Debug (format string ,args ...interface{}){};
// Error logs error message.
func (_aa ConsoleLogger )Error (format string ,args ...interface{}){if _aa .LogLevel >=LogLevelError {_ba :="\u005b\u0045\u0052\u0052\u004f\u0052\u005d\u0020";_aa .output (_gc .Stdout ,_ba ,format ,args ...);};};
// Notice logs notice message.
func (_dde ConsoleLogger )Notice (format string ,args ...interface{}){if _dde .LogLevel >=LogLevelNotice {_gf :="\u005bN\u004f\u0054\u0049\u0043\u0045\u005d ";_dde .output (_g .Stdout ,_gf ,format ,args ...);};};
func (_gg ConsoleLogger )Notice (format string ,args ...interface{}){if _gg .LogLevel >=LogLevelNotice {_efa :="\u005bN\u004f\u0054\u0049\u0043\u0045\u005d ";_gg .output (_gc .Stdout ,_efa ,format ,args ...);};};func _ffc (_cdf _db .Writer ,_da string ,_bgb string ,_ee ...interface{}){_ ,_ffe ,_ebc ,_cdc :=_e .Caller (3);if !_cdc {_ffe ="\u003f\u003f\u003f";_ebc =0;}else {_ffe =_d .Base (_ffe );};_fgd :=_g .Sprintf ("\u0025s\u0020\u0025\u0073\u003a\u0025\u0064 ",_da ,_ffe ,_ebc )+_bgb +"\u000a";_g .Fprintf (_cdf ,_fgd ,_ee ...);};
// ConsoleLogger is a logger that writes logs to the 'os.Stdout'
type ConsoleLogger struct{LogLevel LogLevel ;};
// Error does nothing for dummy logger.
func (DummyLogger )Error (format string ,args ...interface{}){};
// IsLogLevel returns true from dummy logger.
func (DummyLogger )IsLogLevel (level LogLevel )bool {return true };
// Info logs info message.
func (_fc WriterLogger )Info (format string ,args ...interface{}){if _fc .LogLevel >=LogLevelInfo {_fce :="\u005bI\u004e\u0046\u004f\u005d\u0020";_fc .logToWriter (_fc .Output ,_fce ,format ,args ...);};};
// LogLevel is the verbosity level for logging.
type LogLevel int ;

View File

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

View File

@ -11,38 +11,38 @@
// Package memstore implements tempStorage interface
// by using memory as a storage
package memstore ;import (_ee "encoding/hex";_d "errors";_ba "fmt";_eec "github.com/unidoc/unioffice/common/tempstorage";_e "io";_a "io/ioutil";_bc "math/rand";_eb "sync";);
package memstore ;import (_a "encoding/hex";_d "errors";_b "fmt";_bf "github.com/unidoc/unioffice/common/tempstorage";_ef "io";_ea "io/ioutil";_ee "math/rand";_c "sync";);func _bfc (_efb string )string {_fc ,_ :=_fg (6);return _efb +_fc };type memDataCell struct{_f string ;_de []byte ;_aec int64 ;};
// TempDir creates a name for a new temp directory using a pattern argument
func (_bd *memStorage )TempDir (pattern string )(string ,error ){return _bfc (pattern ),nil };
// Read reads from the underlying memDataCell in order to implement Reader interface
func (_eag *memFile )Read (p []byte )(int ,error ){_eb :=_eag ._efc ;_ba :=_eag ._ce ._aec ;_bg :=int64 (len (p ));if _bg > _ba {_bg =_ba ;p =p [:_bg ];};if _eb >=_ba {return 0,_ef .EOF ;};_g :=_eb +_bg ;if _g >=_ba {_g =_ba ;};_bae :=copy (p ,_eag ._ce ._de [_eb :_g ]);_eag ._efc =_g ;return _bae ,nil ;};
// SetAsStorage sets temp storage as a memory storage
func SetAsStorage (){_eg :=memStorage {_be :_eb .Map {}};_eec .SetAsStorage (&_eg )};
func SetAsStorage (){_fa :=memStorage {_da :_c .Map {}};_bf .SetAsStorage (&_fa )};
// Name returns the filename of the underlying memDataCell
func (_ga *memFile )Name ()string {return _ga ._ce ._f };
// Open returns tempstorage File object by name
func (_dc *memStorage )Open (path string )(_eec .File ,error ){_fd ,_aad :=_dc ._be .Load (path );if !_aad {return nil ,_d .New (_ba .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 {_bb :_fd .(*memDataCell )},nil ;};type memStorage struct{_be _eb .Map };
func (_aeg *memStorage )Open (path string )(_bf .File ,error ){_db ,_gd :=_aeg ._da .Load (path );if !_gd {return nil ,_d .New (_b .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 {_ce :_db .(*memDataCell )},nil ;};type memFile struct{_ce *memDataCell ;_efc int64 ;};
// RemoveAll removes all files according to the dir argument prefix
func (_bgd *memStorage )RemoveAll (dir string )error {_bgd ._da .Range (func (_gb ,_be interface{})bool {_bgd ._da .Delete (_gb );return true });return nil ;};
// ReadAt reads from the underlying memDataCell at an offset provided in order to implement ReaderAt interface.
// It does not affect f.readOffset.
func (_dde *memFile )ReadAt (p []byte ,readOffset int64 )(int ,error ){_aa :=_dde ._bb ._fe ;_g :=int64 (len (p ));if _g > _aa {_g =_aa ;p =p [:_g ];};if readOffset >=_aa {return 0,_e .EOF ;};_db :=readOffset +_g ;if _db >=_aa {_db =_aa ;};_cc :=copy (p ,_dde ._bb ._fb [readOffset :_db ]);return _cc ,nil ;};
// RemoveAll removes all files according to the dir argument prefix
func (_fda *memStorage )RemoveAll (dir string )error {_fda ._be .Range (func (_ebfg ,_fg interface{})bool {_fda ._be .Delete (_ebfg );return true });return nil ;};
// Close is not applicable in this implementation
func (_ef *memFile )Close ()error {return nil };type memDataCell struct{_ac string ;_fb []byte ;_fe int64 ;};func _dag (_cgd int )(string ,error ){_ga :=make ([]byte ,_cgd );if _ ,_df :=_bc .Read (_ga );_df !=nil {return "",_df ;};return _ee .EncodeToString (_ga ),nil ;};
func (_ae *memFile )ReadAt (p []byte ,readOffset int64 )(int ,error ){_af :=_ae ._ce ._aec ;_bb :=int64 (len (p ));if _bb > _af {_bb =_af ;p =p [:_bb ];};if readOffset >=_af {return 0,_ef .EOF ;};_ad :=readOffset +_bb ;if _ad >=_af {_ad =_af ;};_adc :=copy (p ,_ae ._ce ._de [readOffset :_ad ]);return _adc ,nil ;};
// Add reads a file from a disk and adds it to the storage
func (_add *memStorage )Add (path string )error {_ ,_cd :=_add ._be .Load (path );if _cd {return nil ;};_edb ,_efb :=_a .ReadFile (path );if _efb !=nil {return _efb ;};_add ._be .Store (path ,&memDataCell {_ac :path ,_fb :_edb ,_fe :int64 (len (_edb ))});return nil ;};
func (_ec *memStorage )Add (path string )error {_ ,_cg :=_ec ._da .Load (path );if _cg {return nil ;};_dbe ,_ab :=_ea .ReadFile (path );if _ab !=nil {return _ab ;};_ec ._da .Store (path ,&memDataCell {_f :path ,_de :_dbe ,_aec :int64 (len (_dbe ))});return nil ;};
// Write writes to the end of the underlying memDataCell in order to implement Writer interface
func (_ag *memFile )Write (p []byte )(int ,error ){_ag ._bb ._fb =append (_ag ._bb ._fb ,p ...);_ag ._bb ._fe +=int64 (len (p ));return len (p ),nil ;};func _ae (_fdb string )string {_fec ,_ :=_dag (6);return _fdb +_fec };
func (_df *memFile )Write (p []byte )(int ,error ){_df ._ce ._de =append (_df ._ce ._de ,p ...);_df ._ce ._aec +=int64 (len (p ));return len (p ),nil ;};
// Name returns the filename of the underlying memDataCell
func (_ebb *memFile )Name ()string {return _ebb ._bb ._ac };
// Read reads from the underlying memDataCell in order to implement Reader interface
func (_f *memFile )Read (p []byte )(int ,error ){_ebf :=_f ._dd ;_c :=_f ._bb ._fe ;_cb :=int64 (len (p ));if _cb > _c {_cb =_c ;p =p [:_cb ];};if _ebf >=_c {return 0,_e .EOF ;};_ebc :=_ebf +_cb ;if _ebc >=_c {_ebc =_c ;};_ad :=copy (p ,_f ._bb ._fb [_ebf :_ebc ]);_f ._dd =_ebc ;return _ad ,nil ;};
// Close is not applicable in this implementation
func (_bfd *memFile )Close ()error {return nil };type memStorage struct{_da _c .Map };
// TempFile creates a new empty file in the storage and returns it
func (_cg *memStorage )TempFile (dir ,pattern string )(_eec .File ,error ){_de :=dir +"\u002f"+_ae (pattern );_af :=&memDataCell {_ac :_de ,_fb :[]byte {}};_fc :=&memFile {_bb :_af };_cg ._be .Store (_de ,_af );return _fc ,nil ;};
// TempDir creates a name for a new temp directory using a pattern argument
func (_ed *memStorage )TempDir (pattern string )(string ,error ){return _ae (pattern ),nil };type memFile struct{_bb *memDataCell ;_dd int64 ;};
func (_eff *memStorage )TempFile (dir ,pattern string )(_bf .File ,error ){_cea :=dir +"\u002f"+_bfc (pattern );_aee :=&memDataCell {_f :_cea ,_de :[]byte {}};_fe :=&memFile {_ce :_aee };_eff ._da .Store (_cea ,_aee );return _fe ,nil ;};func _fg (_dba int )(string ,error ){_cc :=make ([]byte ,_dba );if _ ,_ded :=_ee .Read (_cc );_ded !=nil {return "",_ded ;};return _a .EncodeToString (_cc ),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 _c "io";
package tempstorage ;import _da "io";
// TempDir creates a name for a new temp directory using a pattern argument.
func TempDir (pattern string )(string ,error ){return _ab .TempDir (pattern )};
// SetAsStorage changes temporary storage to newStorage.
func SetAsStorage (newStorage storage ){_cd =newStorage };
// TempFile creates new empty file in the storage and returns it.
func TempFile (dir ,pattern string )(File ,error ){return _cd .TempFile (dir ,pattern )};
// Open returns tempstorage File object by name.
func Open (path string )(File ,error ){return _cd .Open (path )};
// Add reads a file from a disk and adds it to the storage.
func Add (path string )error {return _cd .Add (path )};var _cd storage ;
// RemoveAll removes all files according to the dir argument prefix.
func RemoveAll (dir string )error {return _cd .RemoveAll (dir )};type storage interface{Open (_dab string )(File ,error );TempFile (_c ,_de string )(File ,error );TempDir (_cb string )(string ,error );RemoveAll (_e string )error ;Add (_daba string )error ;};
// File is a representation of a storage file
// with Read, Write, Close and Name methods identical to os.File.
type File interface{_c .Reader ;_c .ReaderAt ;_c .Writer ;_c .Closer ;Name ()string ;};
type File interface{_da .Reader ;_da .ReaderAt ;_da .Writer ;_da .Closer ;Name ()string ;};
// Open returns tempstorage File object by name.
func Open (path string )(File ,error ){return _ab .Open (path )};
// Add reads a file from a disk and adds it to the storage.
func Add (path string )error {return _ab .Add (path )};
// TempFile creates new empty file in the storage and returns it.
func TempFile (dir ,pattern string )(File ,error ){return _ab .TempFile (dir ,pattern )};var _ab storage ;
// RemoveAll removes all files according to the dir argument prefix.
func RemoveAll (dir string )error {return _ab .RemoveAll (dir )};type storage interface{Open (_e string )(File ,error );TempFile (_f ,_g string )(File ,error );TempDir (_cc string )(string ,error );RemoveAll (_a string )error ;Add (_b string )error ;};
// SetAsStorage changes temporary storage to newStorage.
func SetAsStorage (newStorage storage ){_ab =newStorage };
// TempDir creates a name for a new temp directory using a pattern argument.
func TempDir (pattern string )(string ,error ){return _cd .TempDir (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 (_b "github.com/unidoc/unioffice";_gd "github.com/unidoc/unioffice/color";_d "github.com/unidoc/unioffice/measurement";_gdb "github.com/unidoc/unioffice/schema/soo/dml";);func (_dde ShapeProperties )LineProperties ()LineProperties {if _dde ._fbf .Ln ==nil {_dde ._fbf .Ln =_gdb .NewCT_LineProperties ();};return LineProperties {_dde ._fbf .Ln };};
// Run is a run within a paragraph.
type Run struct{_ce *_gdb .EG_TextRun };
// SetBulletFont controls the font for the bullet character.
func (_cg ParagraphProperties )SetBulletFont (f string ){if f ==""{_cg ._ae .BuFont =nil ;}else {_cg ._ae .BuFont =_gdb .NewCT_TextFont ();_cg ._ae .BuFont .TypefaceAttr =f ;};};
// GetPosition gets the position of the shape in EMU.
func (_dba ShapeProperties )GetPosition ()(int64 ,int64 ){_dba .ensureXfrm ();if _dba ._fbf .Xfrm .Off ==nil {_dba ._fbf .Xfrm .Off =_gdb .NewCT_Point2D ();};return *_dba ._fbf .Xfrm .Off .XAttr .ST_CoordinateUnqualified ,*_dba ._fbf .Xfrm .Off .YAttr .ST_CoordinateUnqualified ;};
// AddBreak adds a new line break to a paragraph.
func (_f Paragraph )AddBreak (){_cc :=_gdb .NewEG_TextRun ();_cc .Br =_gdb .NewCT_TextLineBreak ();_f ._cf .EG_TextRun =append (_f ._cf .EG_TextRun ,_cc );};
package drawing ;import (_a "github.com/unidoc/unioffice";_f "github.com/unidoc/unioffice/color";_aa "github.com/unidoc/unioffice/measurement";_e "github.com/unidoc/unioffice/schema/soo/dml";);
// RunProperties controls the run properties.
type RunProperties struct{_cfd *_gdb .CT_TextCharacterProperties ;};
type RunProperties struct{_ff *_e .CT_TextCharacterProperties ;};
// SetAlign controls the paragraph alignment
func (_fb ParagraphProperties )SetAlign (a _gdb .ST_TextAlignType ){_fb ._ae .AlgnAttr =a };
// Properties returns the run's properties.
func (_af Run )Properties ()RunProperties {if _af ._fb .R ==nil {_af ._fb .R =_e .NewCT_RegularTextRun ();};if _af ._fb .R .RPr ==nil {_af ._fb .R .RPr =_e .NewCT_TextCharacterProperties ();};return RunProperties {_af ._fb .R .RPr };};
// SetHeight sets the height of the shape.
func (_ag ShapeProperties )SetHeight (h _d .Distance ){_ag .ensureXfrm ();if _ag ._fbf .Xfrm .Ext ==nil {_ag ._fbf .Xfrm .Ext =_gdb .NewCT_PositiveSize2D ();};_ag ._fbf .Xfrm .Ext .CyAttr =int64 (h /_d .EMU );};
// SetNumbered controls if bullets are numbered or not.
func (_ff ParagraphProperties )SetNumbered (scheme _gdb .ST_TextAutonumberScheme ){if scheme ==_gdb .ST_TextAutonumberSchemeUnset {_ff ._ae .BuAutoNum =nil ;}else {_ff ._ae .BuAutoNum =_gdb .NewCT_TextAutonumberBullet ();_ff ._ae .BuAutoNum .TypeAttr =scheme ;};};
// SetPosition sets the position of the shape.
func (_cec ShapeProperties )SetPosition (x ,y _d .Distance ){_cec .ensureXfrm ();if _cec ._fbf .Xfrm .Off ==nil {_cec ._fbf .Xfrm .Off =_gdb .NewCT_Point2D ();};_cec ._fbf .Xfrm .Off .XAttr .ST_CoordinateUnqualified =_b .Int64 (int64 (x /_d .EMU ));_cec ._fbf .Xfrm .Off .YAttr .ST_CoordinateUnqualified =_b .Int64 (int64 (y /_d .EMU ));};
// MakeParagraph constructs a new paragraph wrapper.
func MakeParagraph (x *_gdb .CT_TextParagraph )Paragraph {return Paragraph {x }};
// SetJoin sets the line join style.
func (_dc LineProperties )SetJoin (e LineJoin ){_dc ._ef .Round =nil ;_dc ._ef .Miter =nil ;_dc ._ef .Bevel =nil ;switch e {case LineJoinRound :_dc ._ef .Round =_e .NewCT_LineJoinRound ();case LineJoinBevel :_dc ._ef .Bevel =_e .NewCT_LineJoinBevel ();case LineJoinMiter :_dc ._ef .Miter =_e .NewCT_LineJoinMiterProperties ();};};
// LineJoin is the type of line join
type LineJoin byte ;
// SetSize sets the font size of the run text
func (_bf RunProperties )SetSize (sz _d .Distance ){_bf ._cfd .SzAttr =_b .Int32 (int32 (sz /_d .HundredthPoint ));};func (_ad ShapeProperties )SetSolidFill (c _gd .Color ){_ad .clearFill ();_ad ._fbf .SolidFill =_gdb .NewCT_SolidColorFillProperties ();_ad ._fbf .SolidFill .SrgbClr =_gdb .NewCT_SRgbColor ();_ad ._fbf .SolidFill .SrgbClr .ValAttr =*c .AsRGBString ();};
func (_fbg RunProperties )SetSize (sz _aa .Distance ){_fbg ._ff .SzAttr =_a .Int32 (int32 (sz /_aa .HundredthPoint ));};func MakeShapeProperties (x *_e .CT_ShapeProperties )ShapeProperties {return ShapeProperties {x }};
// X returns the inner wrapped XML type.
func (_ab Paragraph )X ()*_gdb .CT_TextParagraph {return _ab ._cf };func (_de ShapeProperties )SetNoFill (){_de .clearFill ();_de ._fbf .NoFill =_gdb .NewCT_NoFillProperties ();};
// X returns the inner wrapped XML type.
func (_fg ShapeProperties )X ()*_gdb .CT_ShapeProperties {return _fg ._fbf };
// Properties returns the paragraph properties.
func (_dg Paragraph )Properties ()ParagraphProperties {if _dg ._cf .PPr ==nil {_dg ._cf .PPr =_gdb .NewCT_TextParagraphProperties ();};return MakeParagraphProperties (_dg ._cf .PPr );};
// SetLevel sets the level of indentation of a paragraph.
func (_bef ParagraphProperties )SetLevel (idx int32 ){_bef ._ae .LvlAttr =_b .Int32 (idx )};
func (_ggg ShapeProperties )X ()*_e .CT_ShapeProperties {return _ggg ._bc };func (_ab LineProperties )SetNoFill (){_ab .clearFill ();_ab ._ef .NoFill =_e .NewCT_NoFillProperties ()};
// Paragraph is a paragraph within a document.
type Paragraph struct{_cf *_gdb .CT_TextParagraph };
type Paragraph struct{_de *_e .CT_TextParagraph };
// SetWidth sets the width of the shape.
func (_fc ShapeProperties )SetWidth (w _aa .Distance ){_fc .ensureXfrm ();if _fc ._bc .Xfrm .Ext ==nil {_fc ._bc .Xfrm .Ext =_e .NewCT_PositiveSize2D ();};_fc ._bc .Xfrm .Ext .CxAttr =int64 (w /_aa .EMU );};
// MakeRun constructs a new Run wrapper.
func MakeRun (x *_gdb .EG_TextRun )Run {return Run {x }};
func MakeRun (x *_e .EG_TextRun )Run {return Run {x }};
// MakeParagraphProperties constructs a new ParagraphProperties wrapper.
func MakeParagraphProperties (x *_e .CT_TextParagraphProperties )ParagraphProperties {return ParagraphProperties {x };};
// SetLevel sets the level of indentation of a paragraph.
func (_aag ParagraphProperties )SetLevel (idx int32 ){_aag ._gd .LvlAttr =_a .Int32 (idx )};
// SetFont controls the font of a run.
func (_bd RunProperties )SetFont (s string ){_bd ._ff .Latin =_e .NewCT_TextFont ();_bd ._ff .Latin .TypefaceAttr =s ;};
// Properties returns the paragraph properties.
func (_gfd Paragraph )Properties ()ParagraphProperties {if _gfd ._de .PPr ==nil {_gfd ._de .PPr =_e .NewCT_TextParagraphProperties ();};return MakeParagraphProperties (_gfd ._de .PPr );};
// SetSolidFill controls the text color of a run.
func (_agd RunProperties )SetSolidFill (c _f .Color ){_agd ._ff .NoFill =nil ;_agd ._ff .BlipFill =nil ;_agd ._ff .GradFill =nil ;_agd ._ff .GrpFill =nil ;_agd ._ff .PattFill =nil ;_agd ._ff .SolidFill =_e .NewCT_SolidColorFillProperties ();_agd ._ff .SolidFill .SrgbClr =_e .NewCT_SRgbColor ();_agd ._ff .SolidFill .SrgbClr .ValAttr =*c .AsRGBString ();};type ShapeProperties struct{_bc *_e .CT_ShapeProperties };func (_faf ShapeProperties )LineProperties ()LineProperties {if _faf ._bc .Ln ==nil {_faf ._bc .Ln =_e .NewCT_LineProperties ();};return LineProperties {_faf ._bc .Ln };};
// Run is a run within a paragraph.
type Run struct{_fb *_e .EG_TextRun };func (_aac ShapeProperties )clearFill (){_aac ._bc .NoFill =nil ;_aac ._bc .BlipFill =nil ;_aac ._bc .GradFill =nil ;_aac ._bc .GrpFill =nil ;_aac ._bc .SolidFill =nil ;_aac ._bc .PattFill =nil ;};
// X returns the inner wrapped XML type.
func (_gg Paragraph )X ()*_e .CT_TextParagraph {return _gg ._de };
// SetBulletFont controls the font for the bullet character.
func (_fe ParagraphProperties )SetBulletFont (f string ){if f ==""{_fe ._gd .BuFont =nil ;}else {_fe ._gd .BuFont =_e .NewCT_TextFont ();_fe ._gd .BuFont .TypefaceAttr =f ;};};type LineProperties struct{_ef *_e .CT_LineProperties };
// SetFlipVertical controls if the shape is flipped vertically.
func (_gb ShapeProperties )SetFlipVertical (b bool ){_gb .ensureXfrm ();if !b {_gb ._bc .Xfrm .FlipVAttr =nil ;}else {_gb ._bc .Xfrm .FlipVAttr =_a .Bool (true );};};func (_d LineProperties )SetSolidFill (c _f .Color ){_d .clearFill ();_d ._ef .SolidFill =_e .NewCT_SolidColorFillProperties ();_d ._ef .SolidFill .SrgbClr =_e .NewCT_SRgbColor ();_d ._ef .SolidFill .SrgbClr .ValAttr =*c .AsRGBString ();};func (_faa ShapeProperties )SetSolidFill (c _f .Color ){_faa .clearFill ();_faa ._bc .SolidFill =_e .NewCT_SolidColorFillProperties ();_faa ._bc .SolidFill .SrgbClr =_e .NewCT_SRgbColor ();_faa ._bc .SolidFill .SrgbClr .ValAttr =*c .AsRGBString ();};
// SetPosition sets the position of the shape.
func (_eg ShapeProperties )SetPosition (x ,y _aa .Distance ){_eg .ensureXfrm ();if _eg ._bc .Xfrm .Off ==nil {_eg ._bc .Xfrm .Off =_e .NewCT_Point2D ();};_eg ._bc .Xfrm .Off .XAttr .ST_CoordinateUnqualified =_a .Int64 (int64 (x /_aa .EMU ));_eg ._bc .Xfrm .Off .YAttr .ST_CoordinateUnqualified =_a .Int64 (int64 (y /_aa .EMU ));};
// X returns the inner wrapped XML type.
func (_b Run )X ()*_e .EG_TextRun {return _b ._fb };
// ParagraphProperties allows controlling paragraph properties.
type ParagraphProperties struct{_gd *_e .CT_TextParagraphProperties ;};const (LineJoinRound LineJoin =iota ;LineJoinBevel ;LineJoinMiter ;);
// SetGeometry sets the shape type of the shape
func (_afb ShapeProperties )SetGeometry (g _e .ST_ShapeType ){if _afb ._bc .PrstGeom ==nil {_afb ._bc .PrstGeom =_e .NewCT_PresetGeometry2D ();};_afb ._bc .PrstGeom .PrstAttr =g ;};
// SetFlipHorizontal controls if the shape is flipped horizontally.
func (_eb ShapeProperties )SetFlipHorizontal (b bool ){_eb .ensureXfrm ();if !b {_eb ._bc .Xfrm .FlipHAttr =nil ;}else {_eb ._bc .Xfrm .FlipHAttr =_a .Bool (true );};};
// SetBulletChar sets the bullet character for the paragraph.
func (_dd ParagraphProperties )SetBulletChar (c string ){if c ==""{_dd ._gd .BuChar =nil ;}else {_dd ._gd .BuChar =_e .NewCT_TextCharBullet ();_dd ._gd .BuChar .CharAttr =c ;};};
// SetBold controls the bolding of a run.
func (_ag RunProperties )SetBold (b bool ){_ag ._ff .BAttr =_a .Bool (b )};
// SetSize sets the width and height of the shape.
func (_aacb ShapeProperties )SetSize (w ,h _aa .Distance ){_aacb .SetWidth (w );_aacb .SetHeight (h )};
// SetNumbered controls if bullets are numbered or not.
func (_fa ParagraphProperties )SetNumbered (scheme _e .ST_TextAutonumberScheme ){if scheme ==_e .ST_TextAutonumberSchemeUnset {_fa ._gd .BuAutoNum =nil ;}else {_fa ._gd .BuAutoNum =_e .NewCT_TextAutonumberBullet ();_fa ._gd .BuAutoNum .TypeAttr =scheme ;};};
// SetAlign controls the paragraph alignment
func (_aba ParagraphProperties )SetAlign (a _e .ST_TextAlignType ){_aba ._gd .AlgnAttr =a };
// AddBreak adds a new line break to a paragraph.
func (_gf Paragraph )AddBreak (){_ca :=_e .NewEG_TextRun ();_ca .Br =_e .NewCT_TextLineBreak ();_gf ._de .EG_TextRun =append (_gf ._de .EG_TextRun ,_ca );};
// SetText sets the run's text contents.
func (_ddd Run )SetText (s string ){_ddd ._fb .Br =nil ;_ddd ._fb .Fld =nil ;if _ddd ._fb .R ==nil {_ddd ._fb .R =_e .NewCT_RegularTextRun ();};_ddd ._fb .R .T =s ;};func (_aaa LineProperties )clearFill (){_aaa ._ef .NoFill =nil ;_aaa ._ef .GradFill =nil ;_aaa ._ef .SolidFill =nil ;_aaa ._ef .PattFill =nil ;};
// SetHeight sets the height of the shape.
func (_dae ShapeProperties )SetHeight (h _aa .Distance ){_dae .ensureXfrm ();if _dae ._bc .Xfrm .Ext ==nil {_dae ._bc .Xfrm .Ext =_e .NewCT_PositiveSize2D ();};_dae ._bc .Xfrm .Ext .CyAttr =int64 (h /_aa .EMU );};
// X returns the inner wrapped XML type.
func (_c LineProperties )X ()*_e .CT_LineProperties {return _c ._ef };
// MakeParagraph constructs a new paragraph wrapper.
func MakeParagraph (x *_e .CT_TextParagraph )Paragraph {return Paragraph {x }};
// X returns the inner wrapped XML type.
func (_da ParagraphProperties )X ()*_e .CT_TextParagraphProperties {return _da ._gd };
// MakeRunProperties constructs a new RunProperties wrapper.
func MakeRunProperties (x *_e .CT_TextCharacterProperties )RunProperties {return RunProperties {x }};func (_ba ShapeProperties )SetNoFill (){_ba .clearFill ();_ba ._bc .NoFill =_e .NewCT_NoFillProperties ()};
// SetWidth sets the line width, MS products treat zero as the minimum width
// that can be displayed.
func (_gfe LineProperties )SetWidth (w _d .Distance ){_gfe ._gf .WAttr =_b .Int32 (int32 (w /_d .EMU ))};
// X returns the inner wrapped XML type.
func (_ced Run )X ()*_gdb .EG_TextRun {return _ced ._ce };type ShapeProperties struct{_fbf *_gdb .CT_ShapeProperties };func (_a LineProperties )SetNoFill (){_a .clearFill ();_a ._gf .NoFill =_gdb .NewCT_NoFillProperties ()};
// X returns the inner wrapped XML type.
func (_dd ParagraphProperties )X ()*_gdb .CT_TextParagraphProperties {return _dd ._ae };type LineProperties struct{_gf *_gdb .CT_LineProperties };
// SetBold controls the bolding of a run.
func (_af RunProperties )SetBold (b bool ){_af ._cfd .BAttr =_b .Bool (b )};
// SetSize sets the width and height of the shape.
func (_aa ShapeProperties )SetSize (w ,h _d .Distance ){_aa .SetWidth (w );_aa .SetHeight (h )};
func (_gc LineProperties )SetWidth (w _aa .Distance ){_gc ._ef .WAttr =_a .Int32 (int32 (w /_aa .EMU ))};func (_ce ShapeProperties )ensureXfrm (){if _ce ._bc .Xfrm ==nil {_ce ._bc .Xfrm =_e .NewCT_Transform2D ();};};
// AddRun adds a new run to a paragraph.
func (_ba Paragraph )AddRun ()Run {_e :=MakeRun (_gdb .NewEG_TextRun ());_ba ._cf .EG_TextRun =append (_ba ._cf .EG_TextRun ,_e .X ());return _e ;};func MakeShapeProperties (x *_gdb .CT_ShapeProperties )ShapeProperties {return ShapeProperties {x }};
func (_ec Paragraph )AddRun ()Run {_dee :=MakeRun (_e .NewEG_TextRun ());_ec ._de .EG_TextRun =append (_ec ._de .EG_TextRun ,_dee .X ());return _dee ;};
// SetSolidFill controls the text color of a run.
func (_fc RunProperties )SetSolidFill (c _gd .Color ){_fc ._cfd .NoFill =nil ;_fc ._cfd .BlipFill =nil ;_fc ._cfd .GradFill =nil ;_fc ._cfd .GrpFill =nil ;_fc ._cfd .PattFill =nil ;_fc ._cfd .SolidFill =_gdb .NewCT_SolidColorFillProperties ();_fc ._cfd .SolidFill .SrgbClr =_gdb .NewCT_SRgbColor ();_fc ._cfd .SolidFill .SrgbClr .ValAttr =*c .AsRGBString ();};func (_db LineProperties )clearFill (){_db ._gf .NoFill =nil ;_db ._gf .GradFill =nil ;_db ._gf .SolidFill =nil ;_db ._gf .PattFill =nil ;};
// ParagraphProperties allows controlling paragraph properties.
type ParagraphProperties struct{_ae *_gdb .CT_TextParagraphProperties ;};
// SetFlipHorizontal controls if the shape is flipped horizontally.
func (_fdd ShapeProperties )SetFlipHorizontal (b bool ){_fdd .ensureXfrm ();if !b {_fdd ._fbf .Xfrm .FlipHAttr =nil ;}else {_fdd ._fbf .Xfrm .FlipHAttr =_b .Bool (true );};};
// MakeParagraphProperties constructs a new ParagraphProperties wrapper.
func MakeParagraphProperties (x *_gdb .CT_TextParagraphProperties )ParagraphProperties {return ParagraphProperties {x };};
// SetFlipVertical controls if the shape is flipped vertically.
func (_ec ShapeProperties )SetFlipVertical (b bool ){_ec .ensureXfrm ();if !b {_ec ._fbf .Xfrm .FlipVAttr =nil ;}else {_ec ._fbf .Xfrm .FlipVAttr =_b .Bool (true );};};
// SetBulletChar sets the bullet character for the paragraph.
func (_fd ParagraphProperties )SetBulletChar (c string ){if c ==""{_fd ._ae .BuChar =nil ;}else {_fd ._ae .BuChar =_gdb .NewCT_TextCharBullet ();_fd ._ae .BuChar .CharAttr =c ;};};
// X returns the inner wrapped XML type.
func (_c LineProperties )X ()*_gdb .CT_LineProperties {return _c ._gf };
// SetGeometry sets the shape type of the shape
func (_abb ShapeProperties )SetGeometry (g _gdb .ST_ShapeType ){if _abb ._fbf .PrstGeom ==nil {_abb ._fbf .PrstGeom =_gdb .NewCT_PresetGeometry2D ();};_abb ._fbf .PrstGeom .PrstAttr =g ;};func (_be LineProperties )SetSolidFill (c _gd .Color ){_be .clearFill ();_be ._gf .SolidFill =_gdb .NewCT_SolidColorFillProperties ();_be ._gf .SolidFill .SrgbClr =_gdb .NewCT_SRgbColor ();_be ._gf .SolidFill .SrgbClr .ValAttr =*c .AsRGBString ();};
// SetWidth sets the width of the shape.
func (_fe ShapeProperties )SetWidth (w _d .Distance ){_fe .ensureXfrm ();if _fe ._fbf .Xfrm .Ext ==nil {_fe ._fbf .Xfrm .Ext =_gdb .NewCT_PositiveSize2D ();};_fe ._fbf .Xfrm .Ext .CxAttr =int64 (w /_d .EMU );};func (_cb ShapeProperties )clearFill (){_cb ._fbf .NoFill =nil ;_cb ._fbf .BlipFill =nil ;_cb ._fbf .GradFill =nil ;_cb ._fbf .GrpFill =nil ;_cb ._fbf .SolidFill =nil ;_cb ._fbf .PattFill =nil ;};
// SetText sets the run's text contents.
func (_ea Run )SetText (s string ){_ea ._ce .Br =nil ;_ea ._ce .Fld =nil ;if _ea ._ce .R ==nil {_ea ._ce .R =_gdb .NewCT_RegularTextRun ();};_ea ._ce .R .T =s ;};func (_fgg ShapeProperties )ensureXfrm (){if _fgg ._fbf .Xfrm ==nil {_fgg ._fbf .Xfrm =_gdb .NewCT_Transform2D ();};};
// Properties returns the run's properties.
func (_abc Run )Properties ()RunProperties {if _abc ._ce .R ==nil {_abc ._ce .R =_gdb .NewCT_RegularTextRun ();};if _abc ._ce .R .RPr ==nil {_abc ._ce .R .RPr =_gdb .NewCT_TextCharacterProperties ();};return RunProperties {_abc ._ce .R .RPr };};
// MakeRunProperties constructs a new RunProperties wrapper.
func MakeRunProperties (x *_gdb .CT_TextCharacterProperties )RunProperties {return RunProperties {x }};
// SetJoin sets the line join style.
func (_ac LineProperties )SetJoin (e LineJoin ){_ac ._gf .Round =nil ;_ac ._gf .Miter =nil ;_ac ._gf .Bevel =nil ;switch e {case LineJoinRound :_ac ._gf .Round =_gdb .NewCT_LineJoinRound ();case LineJoinBevel :_ac ._gf .Bevel =_gdb .NewCT_LineJoinBevel ();case LineJoinMiter :_ac ._gf .Miter =_gdb .NewCT_LineJoinMiterProperties ();};};const (LineJoinRound LineJoin =iota ;LineJoinBevel ;LineJoinMiter ;);
// SetFont controls the font of a run.
func (_gb RunProperties )SetFont (s string ){_gb ._cfd .Latin =_gdb .NewCT_TextFont ();_gb ._cfd .Latin .TypefaceAttr =s ;};
// GetPosition gets the position of the shape in EMU.
func (_ad ShapeProperties )GetPosition ()(int64 ,int64 ){_ad .ensureXfrm ();if _ad ._bc .Xfrm .Off ==nil {_ad ._bc .Xfrm .Off =_e .NewCT_Point2D ();};return *_ad ._bc .Xfrm .Off .XAttr .ST_CoordinateUnqualified ,*_ad ._bc .Xfrm .Off .YAttr .ST_CoordinateUnqualified ;};

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,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{_ba :=make ([]float64 ,len (array ));copy (_ba ,array );return _ba ;};_bab :=len (array )/2;_g :=MergeSort (array [:_bab ]);_a :=MergeSort (array [_bab :]);_gb :=make ([]float64 ,len (array ));_d :=0;_c :=0;_ge :=0;for _c < len (_g )&&_ge < len (_a ){if _g [_c ]<=_a [_ge ]{_gb [_d ]=_g [_c ];_c ++;}else {_gb [_d ]=_a [_ge ];_ge ++;};_d ++;};for _c < len (_g ){_gb [_d ]=_g [_c ];_c ++;_d ++;};for _ge < len (_a ){_gb [_d ]=_a [_ge ];_ge ++;_d ++;};return _gb ;};
package mergesort ;func MergeSort (array []float64 )[]float64 {if len (array )<=1{_e :=make ([]float64 ,len (array ));copy (_e ,array );return _e ;};_g :=len (array )/2;_a :=MergeSort (array [:_g ]);_b :=MergeSort (array [_g :]);_d :=make ([]float64 ,len (array ));_dd :=0;_ad :=0;_fg :=0;for _ad < len (_a )&&_fg < len (_b ){if _a [_ad ]<=_b [_fg ]{_d [_dd ]=_a [_ad ];_ad ++;}else {_d [_dd ]=_b [_fg ];_fg ++;};_dd ++;};for _ad < len (_a ){_d [_dd ]=_a [_ad ];_ad ++;_dd ++;};for _fg < len (_b ){_d [_dd ]=_b [_fg ];_fg ++;_dd ++;};return _d ;};

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,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 testutils ;import (_g "crypto/md5";_fg "encoding/hex";_e "errors";_cf "fmt";_bd "image";_ge "image/png";_b "io";_ga "os";_gf "os/exec";_ca "path/filepath";_c "strings";_d "testing";);func HashFile (file string )(string ,error ){_da ,_cab :=_ga .Open (file );if _cab !=nil {return "",_cab ;};defer _da .Close ();_fe :=_g .New ();if _ ,_cab =_b .Copy (_fe ,_da );_cab !=nil {return "",_cab ;};return _fg .EncodeToString (_fe .Sum (nil )),nil ;};func ReadPNG (file string )(_bd .Image ,error ){_fd ,_ag :=_ga .Open (file );if _ag !=nil {return nil ,_ag ;};defer _fd .Close ();return _ge .Decode (_fd );};var (ErrRenderNotSupported =_e .New ("\u0072\u0065\u006e\u0064\u0065r\u0069\u006e\u0067\u0020\u0050\u0044\u0046\u0020\u0066\u0069\u006c\u0065\u0073 \u0069\u0073\u0020\u006e\u006f\u0074\u0020\u0073\u0075\u0070\u0070\u006f\u0072\u0074\u0065\u0064\u0020\u006f\u006e\u0020\u0074\u0068\u0069\u0073\u0020\u0073\u0079\u0073\u0074\u0065m"););func CopyFile (src ,dst string )error {_bf ,_a :=_ga .Open (src );if _a !=nil {return _a ;};defer _bf .Close ();_bb ,_a :=_ga .Create (dst );if _a !=nil {return _a ;};defer _bb .Close ();_ ,_a =_b .Copy (_bb ,_bf );return _a ;};func ComparePNGFiles (file1 ,file2 string )(bool ,error ){_agd ,_fga :=HashFile (file1 );if _fga !=nil {return false ,_fga ;};_dd ,_fga :=HashFile (file2 );if _fga !=nil {return false ,_fga ;};if _agd ==_dd {return true ,nil ;};_fcde ,_fga :=ReadPNG (file1 );if _fga !=nil {return false ,_fga ;};_fa ,_fga :=ReadPNG (file2 );if _fga !=nil {return false ,_fga ;};if _fcde .Bounds ()!=_fa .Bounds (){return false ,nil ;};return CompareImages (_fcde ,_fa );};func CompareImages (img1 ,img2 _bd .Image )(bool ,error ){_fc :=img1 .Bounds ();_fb :=0;for _bg :=0;_bg < _fc .Size ().X ;_bg ++{for _aa :=0;_aa < _fc .Size ().Y ;_aa ++{_bc ,_bce ,_bbd ,_ :=img1 .At (_bg ,_aa ).RGBA ();_gb ,_fdd ,_bgg ,_ :=img2 .At (_bg ,_aa ).RGBA ();if _bc !=_gb ||_bce !=_fdd ||_bbd !=_bgg {_fb ++;};};};_fcd :=float64 (_fb )/float64 (_fc .Dx ()*_fc .Dy ());if _fcd > 0.0001{_cf .Printf ("\u0064\u0069\u0066f \u0066\u0072\u0061\u0063\u0074\u0069\u006f\u006e\u003a\u0020\u0025\u0076\u0020\u0028\u0025\u0064\u0029\u000a",_fcd ,_fb );return false ,nil ;};return true ,nil ;};func RenderPDFToPNGs (pdfPath string ,dpi int ,outpathTpl string )error {if dpi <=0{dpi =100;};if _ ,_cd :=_gf .LookPath ("\u0067\u0073");_cd !=nil {return ErrRenderNotSupported ;};return _gf .Command ("\u0067\u0073","\u002d\u0073\u0044\u0045\u0056\u0049\u0043\u0045\u003d\u0070\u006e\u0067a\u006c\u0070\u0068\u0061","\u002d\u006f",outpathTpl ,_cf .Sprintf ("\u002d\u0072\u0025\u0064",dpi ),pdfPath ).Run ();};func RunRenderTest (t *_d .T ,pdfPath ,outputDir ,baselineRenderPath string ,saveBaseline bool ){_dg :=_c .TrimSuffix (_ca .Base (pdfPath ),_ca .Ext (pdfPath ));t .Run ("\u0072\u0065\u006e\u0064\u0065\u0072",func (_aef *_d .T ){_gff :=_ca .Join (outputDir ,_dg );_bdb :=_gff +"\u002d%\u0064\u002e\u0070\u006e\u0067";if _agc :=RenderPDFToPNGs (pdfPath ,0,_bdb );_agc !=nil {_aef .Skip (_agc );};for _bbg :=1;true ;_bbg ++{_afd :=_cf .Sprintf ("\u0025s\u002d\u0025\u0064\u002e\u0070\u006eg",_gff ,_bbg );_dab :=_ca .Join (baselineRenderPath ,_cf .Sprintf ("\u0025\u0073\u002d\u0025\u0064\u005f\u0065\u0078\u0070\u002e\u0070\u006e\u0067",_dg ,_bbg ));if _ ,_fba :=_ga .Stat (_afd );_fba !=nil {break ;};_aef .Logf ("\u0025\u0073",_dab );if saveBaseline {_aef .Logf ("\u0043\u006fp\u0079\u0069\u006eg\u0020\u0025\u0073\u0020\u002d\u003e\u0020\u0025\u0073",_afd ,_dab );_ce :=CopyFile (_afd ,_dab );if _ce !=nil {_aef .Fatalf ("\u0045\u0052\u0052OR\u0020\u0063\u006f\u0070\u0079\u0069\u006e\u0067\u0020\u0074\u006f\u0020\u0025\u0073\u003a\u0020\u0025\u0076",_dab ,_ce );};continue ;};_aef .Run (_cf .Sprintf ("\u0070\u0061\u0067\u0065\u0025\u0064",_bbg ),func (_be *_d .T ){_be .Logf ("\u0043o\u006dp\u0061\u0072\u0069\u006e\u0067 \u0025\u0073 \u0076\u0073\u0020\u0025\u0073",_afd ,_dab );_ef ,_dde :=ComparePNGFiles (_afd ,_dab );if _ga .IsNotExist (_dde ){_be .Fatal ("\u0069m\u0061g\u0065\u0020\u0066\u0069\u006ce\u0020\u006di\u0073\u0073\u0069\u006e\u0067");}else if !_ef {_be .Fatal ("\u0077\u0072\u006f\u006eg \u0070\u0061\u0067\u0065\u0020\u0072\u0065\u006e\u0064\u0065\u0072\u0065\u0064");};});};});};
package testutils ;import (_ce "crypto/md5";_a "encoding/hex";_gd "errors";_ge "fmt";_faf "image";_fa "image/png";_ed "io";_g "os";_d "os/exec";_f "path/filepath";_ced "strings";_e "testing";);func HashFile (file string )(string ,error ){_fc ,_ddc :=_g .Open (file );if _ddc !=nil {return "",_ddc ;};defer _fc .Close ();_fcf :=_ce .New ();if _ ,_ddc =_ed .Copy (_fcf ,_fc );_ddc !=nil {return "",_ddc ;};return _a .EncodeToString (_fcf .Sum (nil )),nil ;};var (ErrRenderNotSupported =_gd .New ("\u0072\u0065\u006e\u0064\u0065r\u0069\u006e\u0067\u0020\u0050\u0044\u0046\u0020\u0066\u0069\u006c\u0065\u0073 \u0069\u0073\u0020\u006e\u006f\u0074\u0020\u0073\u0075\u0070\u0070\u006f\u0072\u0074\u0065\u0064\u0020\u006f\u006e\u0020\u0074\u0068\u0069\u0073\u0020\u0073\u0079\u0073\u0074\u0065m"););func ReadPNG (file string )(_faf .Image ,error ){_da ,_dd :=_g .Open (file );if _dd !=nil {return nil ,_dd ;};defer _da .Close ();return _fa .Decode (_da );};func CopyFile (src ,dst string )error {_fe ,_aa :=_g .Open (src );if _aa !=nil {return _aa ;};defer _fe .Close ();_cd ,_aa :=_g .Create (dst );if _aa !=nil {return _aa ;};defer _cd .Close ();_ ,_aa =_ed .Copy (_cd ,_fe );return _aa ;};func CompareImages (img1 ,img2 _faf .Image )(bool ,error ){_gc :=img1 .Bounds ();_fb :=0;for _b :=0;_b < _gc .Size ().X ;_b ++{for _ag :=0;_ag < _gc .Size ().Y ;_ag ++{_ef ,_eda ,_df ,_ :=img1 .At (_b ,_ag ).RGBA ();_ad ,_fea ,_bd ,_ :=img2 .At (_b ,_ag ).RGBA ();if _ef !=_ad ||_eda !=_fea ||_df !=_bd {_fb ++;};};};_ca :=float64 (_fb )/float64 (_gc .Dx ()*_gc .Dy ());if _ca > 0.0001{_ge .Printf ("\u0064\u0069\u0066f \u0066\u0072\u0061\u0063\u0074\u0069\u006f\u006e\u003a\u0020\u0025\u0076\u0020\u0028\u0025\u0064\u0029\u000a",_ca ,_fb );return false ,nil ;};return true ,nil ;};func RenderPDFToPNGs (pdfPath string ,dpi int ,outpathTpl string )error {if dpi <=0{dpi =100;};if _ ,_efe :=_d .LookPath ("\u0067\u0073");_efe !=nil {return ErrRenderNotSupported ;};return _d .Command ("\u0067\u0073","\u002d\u0073\u0044\u0045\u0056\u0049\u0043\u0045\u003d\u0070\u006e\u0067a\u006c\u0070\u0068\u0061","\u002d\u006f",outpathTpl ,_ge .Sprintf ("\u002d\u0072\u0025\u0064",dpi ),pdfPath ).Run ();};func ComparePNGFiles (file1 ,file2 string )(bool ,error ){_caf ,_ab :=HashFile (file1 );if _ab !=nil {return false ,_ab ;};_adg ,_ab :=HashFile (file2 );if _ab !=nil {return false ,_ab ;};if _caf ==_adg {return true ,nil ;};_dag ,_ab :=ReadPNG (file1 );if _ab !=nil {return false ,_ab ;};_ccf ,_ab :=ReadPNG (file2 );if _ab !=nil {return false ,_ab ;};if _dag .Bounds ()!=_ccf .Bounds (){return false ,nil ;};return CompareImages (_dag ,_ccf );};func RunRenderTest (t *_e .T ,pdfPath ,outputDir ,baselineRenderPath string ,saveBaseline bool ){_fed :=_ced .TrimSuffix (_f .Base (pdfPath ),_f .Ext (pdfPath ));t .Run ("\u0072\u0065\u006e\u0064\u0065\u0072",func (_ac *_e .T ){_dfb :=_f .Join (outputDir ,_fed );_cde :=_dfb +"\u002d%\u0064\u002e\u0070\u006e\u0067";if _gf :=RenderPDFToPNGs (pdfPath ,0,_cde );_gf !=nil {_ac .Skip (_gf );};for _cb :=1;true ;_cb ++{_gdf :=_ge .Sprintf ("\u0025s\u002d\u0025\u0064\u002e\u0070\u006eg",_dfb ,_cb );_de :=_f .Join (baselineRenderPath ,_ge .Sprintf ("\u0025\u0073\u002d\u0025\u0064\u005f\u0065\u0078\u0070\u002e\u0070\u006e\u0067",_fed ,_cb ));if _ ,_cbc :=_g .Stat (_gdf );_cbc !=nil {break ;};_ac .Logf ("\u0025\u0073",_de );if saveBaseline {_ac .Logf ("\u0043\u006fp\u0079\u0069\u006eg\u0020\u0025\u0073\u0020\u002d\u003e\u0020\u0025\u0073",_gdf ,_de );_gca :=CopyFile (_gdf ,_de );if _gca !=nil {_ac .Fatalf ("\u0045\u0052\u0052OR\u0020\u0063\u006f\u0070\u0079\u0069\u006e\u0067\u0020\u0074\u006f\u0020\u0025\u0073\u003a\u0020\u0025\u0076",_de ,_gca );};continue ;};_ac .Run (_ge .Sprintf ("\u0070\u0061\u0067\u0065\u0025\u0064",_cb ),func (_db *_e .T ){_db .Logf ("\u0043o\u006dp\u0061\u0072\u0069\u006e\u0067 \u0025\u0073 \u0076\u0073\u0020\u0025\u0073",_gdf ,_de );_ga ,_bb :=ComparePNGFiles (_gdf ,_de );if _g .IsNotExist (_bb ){_db .Fatal ("\u0069m\u0061g\u0065\u0020\u0066\u0069\u006ce\u0020\u006di\u0073\u0073\u0069\u006e\u0067");}else if !_ga {_db .Fatal ("\u0077\u0072\u006f\u006eg \u0070\u0061\u0067\u0065\u0020\u0072\u0065\u006e\u0064\u0065\u0072\u0065\u0064");};});};});};

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 _bc (_af ,_fb []rune ,_cce bool )bool {for len (_fb )> 0{switch _fb [0]{default:if len (_af )==0||_af [0]!=_fb [0]{return false ;};case '?':if len (_af )==0&&!_cce {return false ;};case '*':return _bc (_af ,_fb [1:],_cce )||(len (_af )> 0&&_bc (_af [1:],_fb ,_cce ));};_af =_af [1:];_fb =_fb [1:];};return len (_af )==0&&len (_fb )==0;};func MatchSimple (pattern ,name string )bool {if pattern ==""{return name ==pattern ;};if pattern =="\u002a"{return true ;};_c :=make ([]rune ,0,len (name ));_f :=make ([]rune ,0,len (pattern ));for _ ,_cc :=range name {_c =append (_c ,_cc );};for _ ,_d :=range pattern {_f =append (_f ,_d );};_ca :=true ;return _bc (_c ,_f ,_ca );};func Match (pattern ,name string )(_bd bool ){if pattern ==""{return name ==pattern ;};if pattern =="\u002a"{return true ;};_ge :=make ([]rune ,0,len (name ));_ce :=make ([]rune ,0,len (pattern ));for _ ,_ed :=range name {_ge =append (_ge ,_ed );};for _ ,_be :=range pattern {_ce =append (_ce ,_be );};_ee :=false ;return _bc (_ge ,_ce ,_ee );};func Index (pattern ,name string )(_da int ){if pattern ==""||pattern =="\u002a"{return 0;};_bea :=make ([]rune ,0,len (name ));_ae :=make ([]rune ,0,len (pattern ));for _ ,_cb :=range name {_bea =append (_bea ,_cb );};for _ ,_ced :=range pattern {_ae =append (_ae ,_ced );};return _ba (_bea ,_ae ,0);};func _ba (_fd ,_fc []rune ,_aa int )int {for len (_fc )> 0{switch _fc [0]{default:if len (_fd )==0{return -1;};if _fd [0]!=_fc [0]{return _ba (_fd [1:],_fc ,_aa +1);};case '?':if len (_fd )==0{return -1;};case '*':if len (_fd )==0{return -1;};_cd :=_ba (_fd ,_fc [1:],_aa );if _cd !=-1{return _aa ;}else {_cd =_ba (_fd [1:],_fc ,_aa );if _cd !=-1{return _aa ;}else {return -1;};};};_fd =_fd [1:];_fc =_fc [1:];};return _aa ;};
package wildcard ;func _bc (_ba ,_fc []rune ,_gg int )int {for len (_fc )> 0{switch _fc [0]{default:if len (_ba )==0{return -1;};if _ba [0]!=_fc [0]{return _bc (_ba [1:],_fc ,_gg +1);};case '?':if len (_ba )==0{return -1;};case '*':if len (_ba )==0{return -1;};_da :=_bc (_ba ,_fc [1:],_gg );if _da !=-1{return _gg ;}else {_da =_bc (_ba [1:],_fc ,_gg );if _da !=-1{return _gg ;}else {return -1;};};};_ba =_ba [1:];_fc =_fc [1:];};return _gg ;};func _gaa (_aea ,_ebd []rune ,_ee bool )bool {for len (_ebd )> 0{switch _ebd [0]{default:if len (_aea )==0||_aea [0]!=_ebd [0]{return false ;};case '?':if len (_aea )==0&&!_ee {return false ;};case '*':return _gaa (_aea ,_ebd [1:],_ee )||(len (_aea )> 0&&_gaa (_aea [1:],_ebd ,_ee ));};_aea =_aea [1:];_ebd =_ebd [1:];};return len (_aea )==0&&len (_ebd )==0;};func Index (pattern ,name string )(_af int ){if pattern ==""||pattern =="\u002a"{return 0;};_dc :=make ([]rune ,0,len (name ));_ea :=make ([]rune ,0,len (pattern ));for _ ,_be :=range name {_dc =append (_dc ,_be );};for _ ,_cg :=range pattern {_ea =append (_ea ,_cg );};return _bc (_dc ,_ea ,0);};func Match (pattern ,name string )(_g bool ){if pattern ==""{return name ==pattern ;};if pattern =="\u002a"{return true ;};_ga :=make ([]rune ,0,len (name ));_e :=make ([]rune ,0,len (pattern ));for _ ,_db :=range name {_ga =append (_ga ,_db );};for _ ,_aa :=range pattern {_e =append (_e ,_aa );};_fb :=false ;return _gaa (_ga ,_e ,_fb );};func MatchSimple (pattern ,name string )bool {if pattern ==""{return name ==pattern ;};if pattern =="\u002a"{return true ;};_b :=make ([]rune ,0,len (name ));_f :=make ([]rune ,0,len (pattern ));for _ ,_dg :=range name {_b =append (_b ,_dg );};for _ ,_df :=range pattern {_f =append (_f ,_df );};_cc :=true ;return _gaa (_b ,_f ,_cc );};

View File

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

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,34 +9,34 @@
// Use of this source code is governed by the UniDoc End User License Agreement
// terms that can be accessed at https://unidoc.io/eula/
package elements ;import (_d "encoding/xml";_da "fmt";_f "github.com/unidoc/unioffice";_ed "github.com/unidoc/unioffice/common/logger";);func NewAny ()*Any {_g :=&Any {};_g .SimpleLiteral =*NewSimpleLiteral ();return _g };func (_fc *SimpleLiteral )MarshalXML (e *_d .Encoder ,start _d .StartElement )error {e .EncodeToken (start );e .EncodeToken (_d .EndElement {Name :start .Name });return nil ;};
package elements ;import (_c "encoding/xml";_cf "fmt";_ed "github.com/unidoc/unioffice";_b "github.com/unidoc/unioffice/common/logger";);func NewAny ()*Any {_f :=&Any {};_f .SimpleLiteral =*NewSimpleLiteral ();return _f };
// ValidateWithPath validates the Any and its children, prefixing error messages with path
func (_ac *Any )ValidateWithPath (path string )error {if _c :=_ac .SimpleLiteral .ValidateWithPath (path );_c !=nil {return _c ;};return nil ;};func (_gbe *ElementsGroupChoice )MarshalXML (e *_d .Encoder ,start _d .StartElement )error {if _gbe .Any !=nil {_dc :=_d .StartElement {Name :_d .Name {Local :"\u0064\u0063\u003a\u0061\u006e\u0079"}};for _ ,_dgf :=range _gbe .Any {e .EncodeElement (_dgf ,_dc );};};return nil ;};func (_df *ElementsGroup )MarshalXML (e *_d .Encoder ,start _d .StartElement )error {if _df .Choice !=nil {for _ ,_ad :=range _df .Choice {_ad .MarshalXML (e ,_d .StartElement {});};};return nil ;};type ElementsGroupChoice struct{Any []*Any ;};type SimpleLiteral struct{};
// ValidateWithPath validates the ElementContainer and its children, prefixing error messages with path
func (_ab *ElementContainer )ValidateWithPath (path string )error {for _eg ,_ba :=range _ab .Choice {if _bac :=_ba .ValidateWithPath (_da .Sprintf ("\u0025\u0073\u002f\u0043\u0068\u006f\u0069\u0063\u0065\u005b\u0025\u0064\u005d",path ,_eg ));_bac !=nil {return _bac ;};};return nil ;};func (_ge *ElementsGroup )UnmarshalXML (d *_d .Decoder ,start _d .StartElement )error {_cf :for {_fge ,_ff :=d .Token ();if _ff !=nil {return _ff ;};switch _ec :=_fge .(type ){case _d .StartElement :switch _ec .Name {case _d .Name {Space :"\u0068\u0074\u0074\u0070\u003a\u002f\u002f\u0070\u0075\u0072\u006c\u002e\u006f\u0072\u0067/\u0064c\u002f\u0065\u006c\u0065\u006d\u0065\u006e\u0074\u0073\u002f\u0031\u002e\u0031\u002f",Local :"\u0061\u006e\u0079"}:_cfe :=NewElementsGroupChoice ();if _gae :=d .DecodeElement (&_cfe .Any ,&_ec );_gae !=nil {return _gae ;};_ge .Choice =append (_ge .Choice ,_cfe );default:_ed .Log .Debug ("\u0073\u006b\u0069\u0070\u0070\u0069\u006e\u0067 \u0075\u006e\u0073up\u0070\u006f\u0072\u0074\u0065\u0064 \u0065\u006c\u0065\u006d\u0065\u006e\u0074\u0020\u006f\u006e\u0020\u0045\u006c\u0065\u006de\u006e\u0074\u0073\u0047\u0072\u006f\u0075\u0070 \u0025\u0076",_ec .Name );if _ef :=d .Skip ();_ef !=nil {return _ef ;};};case _d .EndElement :break _cf ;case _d .CharData :};};return nil ;};type ElementsGroup struct{Choice []*ElementsGroupChoice ;};
// Validate validates the ElementsGroup and its children
func (_cgf *ElementsGroup )Validate ()error {return _cgf .ValidateWithPath ("\u0045\u006c\u0065\u006d\u0065\u006e\u0074\u0073\u0047\u0072\u006f\u0075\u0070");};
func (_cb *Any )ValidateWithPath (path string )error {if _gc :=_cb .SimpleLiteral .ValidateWithPath (path );_gc !=nil {return _gc ;};return nil ;};type Any struct{SimpleLiteral };func (_gcd *ElementsGroupChoice )UnmarshalXML (d *_c .Decoder ,start _c .StartElement )error {_ebe :for {_aag ,_dea :=d .Token ();if _dea !=nil {return _dea ;};switch _cfb :=_aag .(type ){case _c .StartElement :switch _cfb .Name {case _c .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"}:_dga :=NewAny ();if _fgg :=d .DecodeElement (_dga ,&_cfb );_fgg !=nil {return _fgg ;};_gcd .Any =append (_gcd .Any ,_dga );default:_b .Log .Debug ("\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",_cfb .Name );if _fgc :=d .Skip ();_fgc !=nil {return _fgc ;};};case _c .EndElement :break _ebe ;case _c .CharData :};};return nil ;};func NewElementsGroup ()*ElementsGroup {_ga :=&ElementsGroup {};return _ga };func (_bdc *SimpleLiteral )UnmarshalXML (d *_c .Decoder ,start _c .StartElement )error {for {_cg ,_bee :=d .Token ();if _bee !=nil {return _cf .Errorf ("\u0070a\u0072\u0073\u0069\u006eg\u0020\u0053\u0069\u006d\u0070l\u0065L\u0069t\u0065\u0072\u0061\u006c\u003a\u0020\u0025s",_bee );};if _ead ,_bdb :=_cg .(_c .EndElement );_bdb &&_ead .Name ==start .Name {break ;};};return nil ;};
// Validate validates the Any and its children
func (_ag *Any )Validate ()error {return _ag .ValidateWithPath ("\u0041\u006e\u0079")};type ElementContainer struct{Choice []*ElementsGroupChoice ;};
// Validate validates the ElementContainer and its children
func (_cd *ElementContainer )Validate ()error {return _cd .ValidateWithPath ("\u0045\u006ce\u006d\u0065\u006et\u0043\u006f\u006e\u0074\u0061\u0069\u006e\u0065\u0072");};func (_gf *Any )UnmarshalXML (d *_d .Decoder ,start _d .StartElement )error {_gf .SimpleLiteral =*NewSimpleLiteral ();for {_ga ,_a :=d .Token ();if _a !=nil {return _da .Errorf ("\u0070a\u0072s\u0069\u006e\u0067\u0020\u0041\u006e\u0079\u003a\u0020\u0025\u0073",_a );};if _gb ,_fg :=_ga .(_d .EndElement );_fg &&_gb .Name ==start .Name {break ;};};return nil ;};func (_dae *ElementContainer )UnmarshalXML (d *_d .Decoder ,start _d .StartElement )error {_fe :for {_dg ,_de :=d .Token ();if _de !=nil {return _de ;};switch _bb :=_dg .(type ){case _d .StartElement :switch _bb .Name {case _d .Name {Space :"\u0068\u0074\u0074\u0070\u003a\u002f\u002f\u0070\u0075\u0072\u006c\u002e\u006f\u0072\u0067/\u0064c\u002f\u0065\u006c\u0065\u006d\u0065\u006e\u0074\u0073\u002f\u0031\u002e\u0031\u002f",Local :"\u0061\u006e\u0079"}:_ca :=NewElementsGroupChoice ();if _gfg :=d .DecodeElement (&_ca .Any ,&_bb );_gfg !=nil {return _gfg ;};_dae .Choice =append (_dae .Choice ,_ca );default:_ed .Log .Debug ("\u0073\u006b\u0069\u0070\u0070i\u006e\u0067\u0020\u0075\u006e\u0073\u0075\u0070\u0070\u006f\u0072\u0074\u0065d\u0020\u0065\u006c\u0065\u006d\u0065\u006e\u0074\u0020\u006f\u006e\u0020\u0045\u006c\u0065\u006d\u0065\u006e\u0074\u0043\u006f\u006e\u0074\u0061\u0069\u006e\u0065\u0072\u0020\u0025v",_bb .Name );if _fd :=d .Skip ();_fd !=nil {return _fd ;};};case _d .EndElement :break _fe ;case _d .CharData :};};return nil ;};func NewSimpleLiteral ()*SimpleLiteral {_eb :=&SimpleLiteral {};return _eb };
// ValidateWithPath validates the ElementsGroupChoice and its children, prefixing error messages with path
func (_af *ElementsGroupChoice )ValidateWithPath (path string )error {for _beg ,_dd :=range _af .Any {if _ea :=_dd .ValidateWithPath (_da .Sprintf ("\u0025\u0073\u002f\u0041\u006e\u0079\u005b\u0025\u0064\u005d",path ,_beg ));_ea !=nil {return _ea ;};};return nil ;};func NewElementsGroup ()*ElementsGroup {_feb :=&ElementsGroup {};return _feb };
func (_cd *Any )Validate ()error {return _cd .ValidateWithPath ("\u0041\u006e\u0079")};
// Validate validates the ElementsGroupChoice and its children
func (_gbf *ElementsGroupChoice )Validate ()error {return _gbf .ValidateWithPath ("\u0045\u006c\u0065\u006den\u0074\u0073\u0047\u0072\u006f\u0075\u0070\u0043\u0068\u006f\u0069\u0063\u0065");};type Any struct{SimpleLiteral };
func (_cfd *ElementsGroupChoice )Validate ()error {return _cfd .ValidateWithPath ("\u0045\u006c\u0065\u006den\u0074\u0073\u0047\u0072\u006f\u0075\u0070\u0043\u0068\u006f\u0069\u0063\u0065");};
// ValidateWithPath validates the ElementsGroup and its children, prefixing error messages with path
func (_cdf *ElementsGroup )ValidateWithPath (path string )error {for _adf ,_be :=range _cdf .Choice {if _gea :=_be .ValidateWithPath (_da .Sprintf ("\u0025\u0073\u002f\u0043\u0068\u006f\u0069\u0063\u0065\u005b\u0025\u0064\u005d",path ,_adf ));_gea !=nil {return _gea ;};};return nil ;};func (_bd *ElementsGroupChoice )UnmarshalXML (d *_d .Decoder ,start _d .StartElement )error {_edc :for {_cgd ,_fa :=d .Token ();if _fa !=nil {return _fa ;};switch _aga :=_cgd .(type ){case _d .StartElement :switch _aga .Name {case _d .Name {Space :"\u0068\u0074\u0074\u0070\u003a\u002f\u002f\u0070\u0075\u0072\u006c\u002e\u006f\u0072\u0067/\u0064c\u002f\u0065\u006c\u0065\u006d\u0065\u006e\u0074\u0073\u002f\u0031\u002e\u0031\u002f",Local :"\u0061\u006e\u0079"}:_dgd :=NewAny ();if _aa :=d .DecodeElement (_dgd ,&_aga );_aa !=nil {return _aa ;};_bd .Any =append (_bd .Any ,_dgd );default:_ed .Log .Debug ("\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",_aga .Name );if _fdb :=d .Skip ();_fdb !=nil {return _fdb ;};};case _d .EndElement :break _edc ;case _d .CharData :};};return nil ;};func (_eag *SimpleLiteral )UnmarshalXML (d *_d .Decoder ,start _d .StartElement )error {for {_gg ,_efb :=d .Token ();if _efb !=nil {return _da .Errorf ("\u0070a\u0072\u0073\u0069\u006eg\u0020\u0053\u0069\u006d\u0070l\u0065L\u0069t\u0065\u0072\u0061\u006c\u003a\u0020\u0025s",_efb );};if _bed ,_egd :=_gg .(_d .EndElement );_egd &&_bed .Name ==start .Name {break ;};};return nil ;};func NewElementContainer ()*ElementContainer {_eda :=&ElementContainer {};return _eda };func (_agb *ElementContainer )MarshalXML (e *_d .Encoder ,start _d .StartElement )error {start .Name .Local ="\u0065\u006ce\u006d\u0065\u006et\u0043\u006f\u006e\u0074\u0061\u0069\u006e\u0065\u0072";e .EncodeToken (start );if _agb .Choice !=nil {for _ ,_gbg :=range _agb .Choice {_gbg .MarshalXML (e ,_d .StartElement {});};};e .EncodeToken (_d .EndElement {Name :start .Name });return nil ;};func (_b *Any )MarshalXML (e *_d .Encoder ,start _d .StartElement )error {return _b .SimpleLiteral .MarshalXML (e ,start );};
func (_dcb *ElementsGroup )ValidateWithPath (path string )error {for _gda ,_cddf :=range _dcb .Choice {if _af :=_cddf .ValidateWithPath (_cf .Sprintf ("\u0025\u0073\u002f\u0043\u0068\u006f\u0069\u0063\u0065\u005b\u0025\u0064\u005d",path ,_gda ));_af !=nil {return _af ;};};return nil ;};func (_fa *ElementsGroupChoice )MarshalXML (e *_c .Encoder ,start _c .StartElement )error {if _fa .Any !=nil {_edb :=_c .StartElement {Name :_c .Name {Local :"\u0064\u0063\u003a\u0061\u006e\u0079"}};for _ ,_bf :=range _fa .Any {e .EncodeElement (_bf ,_edb );};};return nil ;};func (_fgd *SimpleLiteral )MarshalXML (e *_c .Encoder ,start _c .StartElement )error {e .EncodeToken (start );e .EncodeToken (_c .EndElement {Name :start .Name });return nil ;};func (_ba *ElementsGroup )UnmarshalXML (d *_c .Decoder ,start _c .StartElement )error {_fe :for {_ad ,_bef :=d .Token ();if _bef !=nil {return _bef ;};switch _gd :=_ad .(type ){case _c .StartElement :switch _gd .Name {case _c .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"}:_dc :=NewElementsGroupChoice ();if _ge :=d .DecodeElement (&_dc .Any ,&_gd );_ge !=nil {return _ge ;};_ba .Choice =append (_ba .Choice ,_dc );default:_b .Log .Debug ("\u0073\u006b\u0069\u0070\u0070\u0069\u006e\u0067 \u0075\u006e\u0073up\u0070\u006f\u0072\u0074\u0065\u0064 \u0065\u006c\u0065\u006d\u0065\u006e\u0074\u0020\u006f\u006e\u0020\u0045\u006c\u0065\u006de\u006e\u0074\u0073\u0047\u0072\u006f\u0075\u0070 \u0025\u0076",_gd .Name );if _ec :=d .Skip ();_ec !=nil {return _ec ;};};case _c .EndElement :break _fe ;case _c .CharData :};};return nil ;};func (_eb *ElementContainer )MarshalXML (e *_c .Encoder ,start _c .StartElement )error {start .Name .Local ="\u0065\u006ce\u006d\u0065\u006et\u0043\u006f\u006e\u0074\u0061\u0069\u006e\u0065\u0072";e .EncodeToken (start );if _eb .Choice !=nil {for _ ,_fg :=range _eb .Choice {_fg .MarshalXML (e ,_c .StartElement {});};};e .EncodeToken (_c .EndElement {Name :start .Name });return nil ;};func (_be *Any )MarshalXML (e *_c .Encoder ,start _c .StartElement )error {return _be .SimpleLiteral .MarshalXML (e ,start );};func (_d *Any )UnmarshalXML (d *_c .Decoder ,start _c .StartElement )error {_d .SimpleLiteral =*NewSimpleLiteral ();for {_fd ,_dg :=d .Token ();if _dg !=nil {return _cf .Errorf ("\u0070a\u0072s\u0069\u006e\u0067\u0020\u0041\u006e\u0079\u003a\u0020\u0025\u0073",_dg );};if _g ,_bg :=_fd .(_c .EndElement );_bg &&_g .Name ==start .Name {break ;};};return nil ;};type ElementsGroup struct{Choice []*ElementsGroupChoice ;};type SimpleLiteral struct{};func NewElementsGroupChoice ()*ElementsGroupChoice {_db :=&ElementsGroupChoice {};return _db };
// Validate validates the SimpleLiteral and its children
func (_gfd *SimpleLiteral )Validate ()error {return _gfd .ValidateWithPath ("\u0053\u0069\u006d\u0070\u006c\u0065\u004c\u0069\u0074\u0065\u0072\u0061\u006c");};
// ValidateWithPath validates the ElementsGroupChoice and its children, prefixing error messages with path
func (_dce *ElementsGroupChoice )ValidateWithPath (path string )error {for _gec ,_bgd :=range _dce .Any {if _ffd :=_bgd .ValidateWithPath (_cf .Sprintf ("\u0025\u0073\u002f\u0041\u006e\u0079\u005b\u0025\u0064\u005d",path ,_gec ));_ffd !=nil {return _ffd ;};};return nil ;};func (_eg *ElementContainer )UnmarshalXML (d *_c .Decoder ,start _c .StartElement )error {_fc :for {_bd ,_a :=d .Token ();if _a !=nil {return _a ;};switch _bc :=_bd .(type ){case _c .StartElement :switch _bc .Name {case _c .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"}:_aa :=NewElementsGroupChoice ();if _df :=d .DecodeElement (&_aa .Any ,&_bc );_df !=nil {return _df ;};_eg .Choice =append (_eg .Choice ,_aa );default:_b .Log .Debug ("\u0073\u006b\u0069\u0070\u0070i\u006e\u0067\u0020\u0075\u006e\u0073\u0075\u0070\u0070\u006f\u0072\u0074\u0065d\u0020\u0065\u006c\u0065\u006d\u0065\u006e\u0074\u0020\u006f\u006e\u0020\u0045\u006c\u0065\u006d\u0065\u006e\u0074\u0043\u006f\u006e\u0074\u0061\u0069\u006e\u0065\u0072\u0020\u0025v",_bc .Name );if _ff :=d .Skip ();_ff !=nil {return _ff ;};};case _c .EndElement :break _fc ;case _c .CharData :};};return nil ;};
// Validate validates the ElementsGroup and its children
func (_acc *ElementsGroup )Validate ()error {return _acc .ValidateWithPath ("\u0045\u006c\u0065\u006d\u0065\u006e\u0074\u0073\u0047\u0072\u006f\u0075\u0070");};func NewSimpleLiteral ()*SimpleLiteral {_dee :=&SimpleLiteral {};return _dee };
// ValidateWithPath validates the ElementContainer and its children, prefixing error messages with path
func (_gf *ElementContainer )ValidateWithPath (path string )error {for _gb ,_cfa :=range _gf .Choice {if _de :=_cfa .ValidateWithPath (_cf .Sprintf ("\u0025\u0073\u002f\u0043\u0068\u006f\u0069\u0063\u0065\u005b\u0025\u0064\u005d",path ,_gb ));_de !=nil {return _de ;};};return nil ;};func NewElementContainer ()*ElementContainer {_cdd :=&ElementContainer {};return _cdd };
// ValidateWithPath validates the SimpleLiteral and its children, prefixing error messages with path
func (_geb *SimpleLiteral )ValidateWithPath (path string )error {return nil };func NewElementsGroupChoice ()*ElementsGroupChoice {_abc :=&ElementsGroupChoice {};return _abc };func init (){_f .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 );_f .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 );_f .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 );_f .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 (_ae *SimpleLiteral )ValidateWithPath (path string )error {return nil };func (_ea *ElementsGroup )MarshalXML (e *_c .Encoder ,start _c .StartElement )error {if _ea .Choice !=nil {for _ ,_ac :=range _ea .Choice {_ac .MarshalXML (e ,_c .StartElement {});};};return nil ;};
// Validate validates the ElementContainer and its children
func (_da *ElementContainer )Validate ()error {return _da .ValidateWithPath ("\u0045\u006ce\u006d\u0065\u006et\u0043\u006f\u006e\u0074\u0061\u0069\u006e\u0065\u0072");};type ElementContainer struct{Choice []*ElementsGroupChoice ;};type ElementsGroupChoice struct{Any []*Any ;};
// Validate validates the SimpleLiteral and its children
func (_egd *SimpleLiteral )Validate ()error {return _egd .ValidateWithPath ("\u0053\u0069\u006d\u0070\u006c\u0065\u004c\u0069\u0074\u0065\u0072\u0061\u006c");};func init (){_ed .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 );_ed .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 );_ed .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 );_ed .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";_f "fmt";_g "github.com/unidoc/unioffice";_aa "github.com/unidoc/unioffice/common/logger";_b "github.com/unidoc/unioffice/schema/purl.org/dc/elements";);type URI struct{};type ElementsAndRefinementsGroupChoice struct{Any []*_b .Any ;};func (_gdd *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 ;};func (_da *LCC )UnmarshalXML (d *_a .Decoder ,start _a .StartElement )error {for {_edc ,_cga :=d .Token ();if _cga !=nil {return _f .Errorf ("\u0070a\u0072s\u0069\u006e\u0067\u0020\u004c\u0043\u0043\u003a\u0020\u0025\u0073",_cga );};if _fge ,_eda :=_edc .(_a .EndElement );_eda &&_fge .Name ==start .Name {break ;};};return nil ;};func (_ag *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 ;};
// ValidateWithPath validates the Period and its children, prefixing error messages with path
func (_dac *Period )ValidateWithPath (path string )error {return nil };func NewDDC ()*DDC {_be :=&DDC {};return _be };
// ValidateWithPath validates the RFC3066 and its children, prefixing error messages with path
func (_gbc *RFC3066 )ValidateWithPath (path string )error {return nil };
// ValidateWithPath validates the DCMIType and its children, prefixing error messages with path
func (_de *DCMIType )ValidateWithPath (path string )error {return nil };func (_ggf *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 (_dcg *LCSH )UnmarshalXML (d *_a .Decoder ,start _a .StartElement )error {for {_eb ,_edg :=d .Token ();if _edg !=nil {return _f .Errorf ("\u0070\u0061r\u0073\u0069\u006eg\u0020\u004c\u0043\u0053\u0048\u003a\u0020\u0025\u0073",_edg );};if _cdb ,_ede :=_eb .(_a .EndElement );_ede &&_cdb .Name ==start .Name {break ;};};return nil ;};func (_ee *DDC )MarshalXML (e *_a .Encoder ,start _a .StartElement )error {start .Name .Local ="\u0044\u0044\u0043";e .EncodeToken (start );e .EncodeToken (_a .EndElement {Name :start .Name });return nil ;};
// ValidateWithPath validates the ElementOrRefinementContainer and its children, prefixing error messages with path
func (_efa *ElementOrRefinementContainer )ValidateWithPath (path string )error {for _ge ,_ac :=range _efa .Choice {if _ded :=_ac .ValidateWithPath (_f .Sprintf ("\u0025\u0073\u002f\u0043\u0068\u006f\u0069\u0063\u0065\u005b\u0025\u0064\u005d",path ,_ge ));_ded !=nil {return _ded ;};};return nil ;};func (_eee *ISO3166 )UnmarshalXML (d *_a .Decoder ,start _a .StartElement )error {for {_def ,_ggc :=d .Token ();if _ggc !=nil {return _f .Errorf ("\u0070\u0061\u0072\u0073in\u0067\u0020\u0049\u0053\u004f\u0033\u0031\u0036\u0036\u003a\u0020\u0025\u0073",_ggc );};if _ccbf ,_caa :=_def .(_a .EndElement );_caa &&_ccbf .Name ==start .Name {break ;};};return nil ;};func (_egde *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 ;};
// ValidateWithPath validates the DDC and its children, prefixing error messages with path
func (_cc *DDC )ValidateWithPath (path string )error {return nil };
// Validate validates the IMT and its children
func (_cdc *IMT )Validate ()error {return _cdc .ValidateWithPath ("\u0049\u004d\u0054")};
// Validate validates the TGN and its children
func (_gce *TGN )Validate ()error {return _gce .ValidateWithPath ("\u0054\u0047\u004e")};type ISO639_2 struct{};type LCC struct{};func (_acd *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 ;};
// Validate validates the ElementsAndRefinementsGroup and its children
func (_ab *ElementsAndRefinementsGroup )Validate ()error {return _ab .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 NewW3CDTF ()*W3CDTF {_ebcc :=&W3CDTF {};return _ebcc };
// ValidateWithPath validates the URI and its children, prefixing error messages with path
func (_gdca *URI )ValidateWithPath (path string )error {return nil };func (_gcb *Period )UnmarshalXML (d *_a .Decoder ,start _a .StartElement )error {for {_bccb ,_egb :=d .Token ();if _egb !=nil {return _f .Errorf ("\u0070a\u0072s\u0069\u006e\u0067\u0020\u0050e\u0072\u0069o\u0064\u003a\u0020\u0025\u0073",_egb );};if _ccbb ,_ebd :=_bccb .(_a .EndElement );_ebd &&_ccbb .Name ==start .Name {break ;};};return nil ;};
// ValidateWithPath validates the TGN and its children, prefixing error messages with path
func (_bffa *TGN )ValidateWithPath (path string )error {return nil };
// Validate validates the ISO3166 and its children
func (_gab *ISO3166 )Validate ()error {return _gab .ValidateWithPath ("\u0049S\u004f\u0033\u0031\u0036\u0036");};
// Validate validates the ISO639_2 and its children
func (_dea *ISO639_2 )Validate ()error {return _dea .ValidateWithPath ("\u0049\u0053\u004f\u0036\u0033\u0039\u005f\u0032");};type UDC struct{};func (_dbd *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 ;};func (_ca *ElementOrRefinementContainer )UnmarshalXML (d *_a .Decoder ,start _a .StartElement )error {_ga :for {_ff ,_fg :=d .Token ();if _fg !=nil {return _fg ;};switch _fde :=_ff .(type ){case _a .StartElement :switch _fde .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"}:_bf :=NewElementsAndRefinementsGroupChoice ();if _fbe :=d .DecodeElement (&_bf .Any ,&_fde );_fbe !=nil {return _fbe ;};_ca .Choice =append (_ca .Choice ,_bf );default:_aa .Log .Debug ("\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",_fde .Name );if _ec :=d .Skip ();_ec !=nil {return _ec ;};};case _a .EndElement :break _ga ;case _a .CharData :};};return nil ;};func (_gbg *ElementsAndRefinementsGroupChoice )UnmarshalXML (d *_a .Decoder ,start _a .StartElement )error {_ccg :for {_aee ,_aad :=d .Token ();if _aad !=nil {return _aad ;};switch _aae :=_aee .(type ){case _a .StartElement :switch _aae .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"}:_bff :=_b .NewAny ();if _gdc :=d .DecodeElement (_bff ,&_aae );_gdc !=nil {return _gdc ;};_gbg .Any =append (_gbg .Any ,_bff );default:_aa .Log .Debug ("\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",_aae .Name );if _cac :=d .Skip ();_cac !=nil {return _cac ;};};case _a .EndElement :break _ccg ;case _a .CharData :};};return nil ;};
// Validate validates the Point and its children
func (_ffe *Point )Validate ()error {return _ffe .ValidateWithPath ("\u0050\u006f\u0069n\u0074")};func (_aff *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 _aff .Choice !=nil {for _ ,_gb :=range _aff .Choice {_gb .MarshalXML (e ,_a .StartElement {});};};e .EncodeToken (_a .EndElement {Name :start .Name });return nil ;};type Point struct{};
// Validate validates the W3CDTF and its children
func (_egbc *W3CDTF )Validate ()error {return _egbc .ValidateWithPath ("\u0057\u0033\u0043\u0044\u0054\u0046");};
package terms ;import (_bf "encoding/xml";_c "fmt";_g "github.com/unidoc/unioffice";_cc "github.com/unidoc/unioffice/common/logger";_e "github.com/unidoc/unioffice/schema/purl.org/dc/elements";);type ElementsAndRefinementsGroupChoice struct{Any []*_e .Any ;};func (_bad *W3CDTF )UnmarshalXML (d *_bf .Decoder ,start _bf .StartElement )error {for {_affe ,_cdff :=d .Token ();if _cdff !=nil {return _c .Errorf ("\u0070a\u0072s\u0069\u006e\u0067\u0020\u00573\u0043\u0044T\u0046\u003a\u0020\u0025\u0073",_cdff );};if _eed ,_cbfb :=_affe .(_bf .EndElement );_cbfb &&_eed .Name ==start .Name {break ;};};return nil ;};func (_adba *RFC1766 )MarshalXML (e *_bf .Encoder ,start _bf .StartElement )error {start .Name .Local ="\u0052F\u0043\u0031\u0037\u0036\u0036";e .EncodeToken (start );e .EncodeToken (_bf .EndElement {Name :start .Name });return nil ;};func (_edf *Point )MarshalXML (e *_bf .Encoder ,start _bf .StartElement )error {start .Name .Local ="\u0050\u006f\u0069n\u0074";e .EncodeToken (start );e .EncodeToken (_bf .EndElement {Name :start .Name });return nil ;};
// ValidateWithPath validates the ISO3166 and its children, prefixing error messages with path
func (_gdbg *ISO3166 )ValidateWithPath (path string )error {return nil };
func (_efd *ISO3166 )ValidateWithPath (path string )error {return nil };
// ValidateWithPath validates the LCSH and its children, prefixing error messages with path
func (_eg *LCSH )ValidateWithPath (path string )error {return nil };func (_gfa *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 ;};func (_eea *TGN )UnmarshalXML (d *_a .Decoder ,start _a .StartElement )error {for {_dfa ,_dg :=d .Token ();if _dg !=nil {return _f .Errorf ("\u0070a\u0072s\u0069\u006e\u0067\u0020\u0054\u0047\u004e\u003a\u0020\u0025\u0073",_dg );};if _gfc ,_fbb :=_dfa .(_a .EndElement );_fbb &&_gfc .Name ==start .Name {break ;};};return nil ;};type DDC struct{};func NewRFC1766 ()*RFC1766 {_cfcc :=&RFC1766 {};return _cfcc };func NewPoint ()*Point {_feac :=&Point {};return _feac };func NewUDC ()*UDC {_cdf :=&UDC {};return _cdf };type LCSH struct{};func (_fd *Box )UnmarshalXML (d *_a .Decoder ,start _a .StartElement )error {for {_fe ,_ed :=d .Token ();if _ed !=nil {return _f .Errorf ("\u0070a\u0072s\u0069\u006e\u0067\u0020\u0042\u006f\u0078\u003a\u0020\u0025\u0073",_ed );};if _ba ,_ae :=_fe .(_a .EndElement );_ae &&_ba .Name ==start .Name {break ;};};return nil ;};func NewMESH ()*MESH {_eecd :=&MESH {};return _eecd };func (_feg *DDC )UnmarshalXML (d *_a .Decoder ,start _a .StartElement )error {for {_afe ,_gf :=d .Token ();if _gf !=nil {return _f .Errorf ("\u0070a\u0072s\u0069\u006e\u0067\u0020\u0044\u0044\u0043\u003a\u0020\u0025\u0073",_gf );};if _gcf ,_fa :=_afe .(_a .EndElement );_fa &&_gcf .Name ==start .Name {break ;};};return nil ;};func NewISO639_2 ()*ISO639_2 {_fgd :=&ISO639_2 {};return _fgd };
// ValidateWithPath validates the Box and its children, prefixing error messages with path
func (_baa *Box )ValidateWithPath (path string )error {return nil };
// Validate validates the URI and its children
func (_eeac *URI )Validate ()error {return _eeac .ValidateWithPath ("\u0055\u0052\u0049")};func (_gfaf *RFC1766 )UnmarshalXML (d *_a .Decoder ,start _a .StartElement )error {for {_cde ,_feab :=d .Token ();if _feab !=nil {return _f .Errorf ("\u0070\u0061\u0072\u0073in\u0067\u0020\u0052\u0046\u0043\u0031\u0037\u0036\u0036\u003a\u0020\u0025\u0073",_feab );};if _fbag ,_eac :=_cde .(_a .EndElement );_eac &&_fbag .Name ==start .Name {break ;};};return nil ;};type DCMIType struct{};type MESH struct{};func (_efe *IMT )UnmarshalXML (d *_a .Decoder ,start _a .StartElement )error {for {_ffc ,_eae :=d .Token ();if _eae !=nil {return _f .Errorf ("\u0070a\u0072s\u0069\u006e\u0067\u0020\u0049\u004d\u0054\u003a\u0020\u0025\u0073",_eae );};if _cf ,_gge :=_ffc .(_a .EndElement );_gge &&_cf .Name ==start .Name {break ;};};return nil ;};func NewTGN ()*TGN {_edd :=&TGN {};return _edd };type RFC3066 struct{};func NewLCSH ()*LCSH {_fcd :=&LCSH {};return _fcd };type Box struct{};func (_eagd *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 RFC1766 and its children
func (_cgf *RFC1766 )Validate ()error {return _cgf .ValidateWithPath ("\u0052F\u0043\u0031\u0037\u0036\u0036");};func (_faef *RFC3066 )UnmarshalXML (d *_a .Decoder ,start _a .StartElement )error {for {_cbd ,_cefa :=d .Token ();if _cefa !=nil {return _f .Errorf ("\u0070\u0061\u0072\u0073in\u0067\u0020\u0052\u0046\u0043\u0033\u0030\u0036\u0036\u003a\u0020\u0025\u0073",_cefa );};if _ebc ,_ebf :=_cbd .(_a .EndElement );_ebf &&_ebc .Name ==start .Name {break ;};};return nil ;};
// Validate validates the Period and its children
func (_eag *Period )Validate ()error {return _eag .ValidateWithPath ("\u0050\u0065\u0072\u0069\u006f\u0064");};
// ValidateWithPath validates the ElementOrRefinementContainer and its children, prefixing error messages with path
func (_de *ElementOrRefinementContainer )ValidateWithPath (path string )error {for _bge ,_ccf :=range _de .Choice {if _dbc :=_ccf .ValidateWithPath (_c .Sprintf ("\u0025\u0073\u002f\u0043\u0068\u006f\u0069\u0063\u0065\u005b\u0025\u0064\u005d",path ,_bge ));_dbc !=nil {return _dbc ;};};return nil ;};func (_gdbe *UDC )UnmarshalXML (d *_bf .Decoder ,start _bf .StartElement )error {for {_dbd ,_becg :=d .Token ();if _becg !=nil {return _c .Errorf ("\u0070a\u0072s\u0069\u006e\u0067\u0020\u0055\u0044\u0043\u003a\u0020\u0025\u0073",_becg );};if _ddf ,_cfa :=_dbd .(_bf .EndElement );_cfa &&_ddf .Name ==start .Name {break ;};};return nil ;};func (_fg *DCMIType )MarshalXML (e *_bf .Encoder ,start _bf .StartElement )error {start .Name .Local ="\u0044\u0043\u004d\u0049\u0054\u0079\u0070\u0065";e .EncodeToken (start );e .EncodeToken (_bf .EndElement {Name :start .Name });return nil ;};type RFC3066 struct{};
// Validate validates the LCSH and its children
func (_gbd *LCSH )Validate ()error {return _gbd .ValidateWithPath ("\u004c\u0043\u0053\u0048")};func (_cfc *Point )UnmarshalXML (d *_a .Decoder ,start _a .StartElement )error {for {_eab ,_ggg :=d .Token ();if _ggg !=nil {return _f .Errorf ("\u0070\u0061\u0072\u0073\u0069\u006e\u0067\u0020\u0050\u006f\u0069\u006et\u003a\u0020\u0025\u0073",_ggg );};if _bcb ,_gdbgb :=_eab .(_a .EndElement );_gdbgb &&_bcb .Name ==start .Name {break ;};};return nil ;};func (_fae *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 NewElementOrRefinementContainer ()*ElementOrRefinementContainer {_gd :=&ElementOrRefinementContainer {};return _gd ;};func NewRFC3066 ()*RFC3066 {_fed :=&RFC3066 {};return _fed };func (_bad *URI )UnmarshalXML (d *_a .Decoder ,start _a .StartElement )error {for {_feb ,_aag :=d .Token ();if _aag !=nil {return _f .Errorf ("\u0070a\u0072s\u0069\u006e\u0067\u0020\u0055\u0052\u0049\u003a\u0020\u0025\u0073",_aag );};if _dcb ,_gaf :=_feb .(_a .EndElement );_gaf &&_dcb .Name ==start .Name {break ;};};return nil ;};type ElementsAndRefinementsGroup struct{Choice []*ElementsAndRefinementsGroupChoice ;};func (_gde *ElementsAndRefinementsGroup )MarshalXML (e *_a .Encoder ,start _a .StartElement )error {if _gde .Choice !=nil {for _ ,_deb :=range _gde .Choice {_deb .MarshalXML (e ,_a .StartElement {});};};return nil ;};type TGN struct{};
// Validate validates the DCMIType and its children
func (_df *DCMIType )Validate ()error {return _df .ValidateWithPath ("\u0044\u0043\u004d\u0049\u0054\u0079\u0070\u0065");};func (_bge *ISO639_2 )UnmarshalXML (d *_a .Decoder ,start _a .StartElement )error {for {_dc ,_cge :=d .Token ();if _cge !=nil {return _f .Errorf ("p\u0061r\u0073\u0069\u006e\u0067\u0020\u0049\u0053\u004f6\u0033\u0039\u005f\u0032: \u0025\u0073",_cge );};if _efb ,_bgeb :=_dc .(_a .EndElement );_bgeb &&_efb .Name ==start .Name {break ;};};return nil ;};func (_efd *W3CDTF )UnmarshalXML (d *_a .Decoder ,start _a .StartElement )error {for {_dba ,_cba :=d .Token ();if _cba !=nil {return _f .Errorf ("\u0070a\u0072s\u0069\u006e\u0067\u0020\u00573\u0043\u0044T\u0046\u003a\u0020\u0025\u0073",_cba );};if _agc ,_bac :=_dba .(_a .EndElement );_bac &&_agc .Name ==start .Name {break ;};};return nil ;};
// ValidateWithPath validates the UDC and its children, prefixing error messages with path
func (_bee *UDC )ValidateWithPath (path string )error {return nil };func NewURI ()*URI {_eaba :=&URI {};return _eaba };func NewIMT ()*IMT {_fba :=&IMT {};return _fba };
// Validate validates the ElementOrRefinementContainer and its children
func (_bab *ElementOrRefinementContainer )Validate ()error {return _bab .ValidateWithPath ("\u0045\u006c\u0065\u006de\u006e\u0074\u004f\u0072\u0052\u0065\u0066\u0069\u006e\u0065m\u0065n\u0074\u0043\u006f\u006e\u0074\u0061\u0069n\u0065\u0072");};
// ValidateWithPath validates the MESH and its children, prefixing error messages with path
func (_afc *MESH )ValidateWithPath (path string )error {return nil };func (_cef *RFC1766 )MarshalXML (e *_a .Encoder ,start _a .StartElement )error {start .Name .Local ="\u0052F\u0043\u0031\u0037\u0036\u0036";e .EncodeToken (start );e .EncodeToken (_a .EndElement {Name :start .Name });return nil ;};
// Validate validates the LCC and its children
func (_bgb *LCC )Validate ()error {return _bgb .ValidateWithPath ("\u004c\u0043\u0043")};
// ValidateWithPath validates the RFC1766 and its children, prefixing error messages with path
func (_bbd *RFC1766 )ValidateWithPath (path string )error {return nil };func (_bgg *MESH )UnmarshalXML (d *_a .Decoder ,start _a .StartElement )error {for {_aga ,_fca :=d .Token ();if _fca !=nil {return _f .Errorf ("\u0070\u0061r\u0073\u0069\u006eg\u0020\u004d\u0045\u0053\u0048\u003a\u0020\u0025\u0073",_fca );};if _egd ,_bcc :=_aga .(_a .EndElement );_bcc &&_egd .Name ==start .Name {break ;};};return nil ;};func (_add *UDC )UnmarshalXML (d *_a .Decoder ,start _a .StartElement )error {for {_defc ,_ega :=d .Token ();if _ega !=nil {return _f .Errorf ("\u0070a\u0072s\u0069\u006e\u0067\u0020\u0055\u0044\u0043\u003a\u0020\u0025\u0073",_ega );};if _aed ,_adg :=_defc .(_a .EndElement );_adg &&_aed .Name ==start .Name {break ;};};return nil ;};type IMT struct{};type W3CDTF struct{};func (_d *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 ;};
// Validate validates the ElementsAndRefinementsGroupChoice and its children
func (_ad *ElementsAndRefinementsGroupChoice )Validate ()error {return _ad .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");};
// ValidateWithPath validates the ISO639_2 and its children, prefixing error messages with path
func (_db *ISO639_2 )ValidateWithPath (path string )error {return nil };func (_ceb *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 ;};
// ValidateWithPath validates the ElementsAndRefinementsGroup and its children, prefixing error messages with path
func (_eec *ElementsAndRefinementsGroup )ValidateWithPath (path string )error {for _cb ,_cg :=range _eec .Choice {if _ccb :=_cg .ValidateWithPath (_f .Sprintf ("\u0025\u0073\u002f\u0043\u0068\u006f\u0069\u0063\u0065\u005b\u0025\u0064\u005d",path ,_cb ));_ccb !=nil {return _ccb ;};};return nil ;};
// Validate validates the RFC3066 and its children
func (_cbg *RFC3066 )Validate ()error {return _cbg .ValidateWithPath ("\u0052F\u0043\u0033\u0030\u0036\u0036");};
// Validate validates the Box and its children
func (_af *Box )Validate ()error {return _af .ValidateWithPath ("\u0042\u006f\u0078")};type RFC1766 struct{};
// Validate validates the UDC and its children
func (_cee *UDC )Validate ()error {return _cee .ValidateWithPath ("\u0055\u0044\u0043")};type ISO3166 struct{};func NewElementsAndRefinementsGroup ()*ElementsAndRefinementsGroup {_fad :=&ElementsAndRefinementsGroup {};return _fad ;};func NewLCC ()*LCC {_fdee :=&LCC {};return _fdee };type ElementOrRefinementContainer struct{Choice []*ElementsAndRefinementsGroupChoice ;};func (_ea *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 NewDCMIType ()*DCMIType {_bb :=&DCMIType {};return _bb };func (_gabc *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 NewPeriod ()*Period {_abd :=&Period {};return _abd };func NewElementsAndRefinementsGroupChoice ()*ElementsAndRefinementsGroupChoice {_gdga :=&ElementsAndRefinementsGroupChoice {};return _gdga ;};func NewBox ()*Box {_fb :=&Box {};return _fb };func (_eeg *ElementsAndRefinementsGroup )UnmarshalXML (d *_a .Decoder ,start _a .StartElement )error {_ce :for {_cd ,_faf :=d .Token ();if _faf !=nil {return _faf ;};switch _fdc :=_cd .(type ){case _a .StartElement :switch _fdc .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"}:_ffa :=NewElementsAndRefinementsGroupChoice ();if _gdg :=d .DecodeElement (&_ffa .Any ,&_fdc );_gdg !=nil {return _gdg ;};_eeg .Choice =append (_eeg .Choice ,_ffa );default:_aa .Log .Debug ("\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",_fdc .Name );if _fbeg :=d .Skip ();_fbeg !=nil {return _fbeg ;};};case _a .EndElement :break _ce ;case _a .CharData :};};return nil ;};
// ValidateWithPath validates the Point and its children, prefixing error messages with path
func (_bed *Point )ValidateWithPath (path string )error {return nil };
// ValidateWithPath validates the LCC and its children, prefixing error messages with path
func (_cab *LCC )ValidateWithPath (path string )error {return nil };
// ValidateWithPath validates the W3CDTF and its children, prefixing error messages with path
func (_bce *W3CDTF )ValidateWithPath (path string )error {return nil };func (_ef *DCMIType )UnmarshalXML (d *_a .Decoder ,start _a .StartElement )error {for {_c ,_gc :=d .Token ();if _gc !=nil {return _f .Errorf ("p\u0061r\u0073\u0069\u006e\u0067\u0020\u0044\u0043\u004dI\u0054\u0079\u0070\u0065: \u0025\u0073",_gc );};if _fdg ,_bg :=_c .(_a .EndElement );_bg &&_fdg .Name ==start .Name {break ;};};return nil ;};
// Validate validates the DDC and its children
func (_bc *DDC )Validate ()error {return _bc .ValidateWithPath ("\u0044\u0044\u0043")};func NewISO3166 ()*ISO3166 {_afb :=&ISO3166 {};return _afb };
func (_eec *LCSH )Validate ()error {return _eec .ValidateWithPath ("\u004c\u0043\u0053\u0048")};func NewRFC3066 ()*RFC3066 {_eac :=&RFC3066 {};return _eac };
// Validate validates the MESH and its children
func (_fea *MESH )Validate ()error {return _fea .ValidateWithPath ("\u004d\u0045\u0053\u0048")};func (_gcd *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 ;};type Period struct{};func (_ffad *ElementsAndRefinementsGroupChoice )MarshalXML (e *_a .Encoder ,start _a .StartElement )error {if _ffad .Any !=nil {_bd :=_a .StartElement {Name :_a .Name {Local :"\u0064\u0063\u003a\u0061\u006e\u0079"}};for _ ,_gg :=range _ffad .Any {e .EncodeElement (_gg ,_bd );};};return nil ;};
func (_gfef *MESH )Validate ()error {return _gfef .ValidateWithPath ("\u004d\u0045\u0053\u0048")};func (_a *Box )MarshalXML (e *_bf .Encoder ,start _bf .StartElement )error {start .Name .Local ="\u0042\u006f\u0078";e .EncodeToken (start );e .EncodeToken (_bf .EndElement {Name :start .Name });return nil ;};
// Validate validates the DDC and its children
func (_ae *DDC )Validate ()error {return _ae .ValidateWithPath ("\u0044\u0044\u0043")};
// Validate validates the TGN and its children
func (_fef *TGN )Validate ()error {return _fef .ValidateWithPath ("\u0054\u0047\u004e")};func (_ccd *DCMIType )UnmarshalXML (d *_bf .Decoder ,start _bf .StartElement )error {for {_gf ,_bfgc :=d .Token ();if _bfgc !=nil {return _c .Errorf ("p\u0061r\u0073\u0069\u006e\u0067\u0020\u0044\u0043\u004dI\u0054\u0079\u0070\u0065: \u0025\u0073",_bfgc );};if _ccb ,_cg :=_gf .(_bf .EndElement );_cg &&_ccb .Name ==start .Name {break ;};};return nil ;};type RFC1766 struct{};
// Validate validates the ISO639_2 and its children
func (_ce *ISO639_2 )Validate ()error {return _ce .ValidateWithPath ("\u0049\u0053\u004f\u0036\u0033\u0039\u005f\u0032");};func (_bgee *RFC3066 )UnmarshalXML (d *_bf .Decoder ,start _bf .StartElement )error {for {_dbg ,_bec :=d .Token ();if _bec !=nil {return _c .Errorf ("\u0070\u0061\u0072\u0073in\u0067\u0020\u0052\u0046\u0043\u0033\u0030\u0036\u0036\u003a\u0020\u0025\u0073",_bec );};if _fee ,_ade :=_dbg .(_bf .EndElement );_ade &&_fee .Name ==start .Name {break ;};};return nil ;};type DCMIType struct{};func NewPoint ()*Point {_afda :=&Point {};return _afda };type ISO3166 struct{};func (_eg *ElementOrRefinementContainer )MarshalXML (e *_bf .Encoder ,start _bf .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 _eg .Choice !=nil {for _ ,_db :=range _eg .Choice {_db .MarshalXML (e ,_bf .StartElement {});};};e .EncodeToken (_bf .EndElement {Name :start .Name });return nil ;};
// ValidateWithPath validates the Point and its children, prefixing error messages with path
func (_edfe *Point )ValidateWithPath (path string )error {return nil };
// ValidateWithPath validates the DDC and its children, prefixing error messages with path
func (_ccc *DDC )ValidateWithPath (path string )error {return nil };func (_efa *IMT )UnmarshalXML (d *_bf .Decoder ,start _bf .StartElement )error {for {_gg ,_cda :=d .Token ();if _cda !=nil {return _c .Errorf ("\u0070a\u0072s\u0069\u006e\u0067\u0020\u0049\u004d\u0054\u003a\u0020\u0025\u0073",_cda );};if _aga ,_ccdf :=_gg .(_bf .EndElement );_ccdf &&_aga .Name ==start .Name {break ;};};return nil ;};
// ValidateWithPath validates the ElementsAndRefinementsGroup and its children, prefixing error messages with path
func (_gff *ElementsAndRefinementsGroup )ValidateWithPath (path string )error {for _gbg ,_afd :=range _gff .Choice {if _be :=_afd .ValidateWithPath (_c .Sprintf ("\u0025\u0073\u002f\u0043\u0068\u006f\u0069\u0063\u0065\u005b\u0025\u0064\u005d",path ,_gbg ));_be !=nil {return _be ;};};return nil ;};
// ValidateWithPath validates the UDC and its children, prefixing error messages with path
func (_bab *UDC )ValidateWithPath (path string )error {return nil };
// ValidateWithPath validates the LCC and its children, prefixing error messages with path
func (_aea *LCC )ValidateWithPath (path string )error {return nil };type Point struct{};func (_bafg *MESH )MarshalXML (e *_bf .Encoder ,start _bf .StartElement )error {start .Name .Local ="\u004d\u0045\u0053\u0048";e .EncodeToken (start );e .EncodeToken (_bf .EndElement {Name :start .Name });return nil ;};func (_age *TGN )UnmarshalXML (d *_bf .Decoder ,start _bf .StartElement )error {for {_afb ,_abc :=d .Token ();if _abc !=nil {return _c .Errorf ("\u0070a\u0072s\u0069\u006e\u0067\u0020\u0054\u0047\u004e\u003a\u0020\u0025\u0073",_abc );};if _abb ,_add :=_afb .(_bf .EndElement );_add &&_abb .Name ==start .Name {break ;};};return nil ;};
// Validate validates the W3CDTF and its children
func (_afa *W3CDTF )Validate ()error {return _afa .ValidateWithPath ("\u0057\u0033\u0043\u0044\u0054\u0046");};func (_bda *URI )MarshalXML (e *_bf .Encoder ,start _bf .StartElement )error {start .Name .Local ="\u0055\u0052\u0049";e .EncodeToken (start );e .EncodeToken (_bf .EndElement {Name :start .Name });return nil ;};func NewDCMIType ()*DCMIType {_ee :=&DCMIType {};return _ee };
// Validate validates the ElementsAndRefinementsGroupChoice and its children
func (_eef *ElementsAndRefinementsGroupChoice )Validate ()error {return _eef .ValidateWithPath ("\u0045\u006c\u0065\u006d\u0065\u006et\u0073\u0041\u006e\u0064\u0052\u0065\u0066\u0069\u006e\u0065\u006d\u0065\u006et\u0073\u0047\u0072\u006f\u0075\u0070\u0043h\u006f\u0069\u0063\u0065");};type URI struct{};
// ValidateWithPath validates the ElementsAndRefinementsGroupChoice and its children, prefixing error messages with path
func (_gdb *ElementsAndRefinementsGroupChoice )ValidateWithPath (path string )error {for _fc ,_gad :=range _gdb .Any {if _bea :=_gad .ValidateWithPath (_f .Sprintf ("\u0025\u0073\u002f\u0041\u006e\u0079\u005b\u0025\u0064\u005d",path ,_fc ));_bea !=nil {return _bea ;};};return nil ;};
func (_ad *ElementsAndRefinementsGroupChoice )ValidateWithPath (path string )error {for _dgg ,_ebc :=range _ad .Any {if _cbf :=_ebc .ValidateWithPath (_c .Sprintf ("\u0025\u0073\u002f\u0041\u006e\u0079\u005b\u0025\u0064\u005d",path ,_dgg ));_cbf !=nil {return _cbf ;};};return nil ;};
// ValidateWithPath validates the RFC1766 and its children, prefixing error messages with path
func (_gfea *RFC1766 )ValidateWithPath (path string )error {return nil };func (_baa *LCSH )MarshalXML (e *_bf .Encoder ,start _bf .StartElement )error {start .Name .Local ="\u004c\u0043\u0053\u0048";e .EncodeToken (start );e .EncodeToken (_bf .EndElement {Name :start .Name });return nil ;};func NewDDC ()*DDC {_gb :=&DDC {};return _gb };
// ValidateWithPath validates the URI and its children, prefixing error messages with path
func (_ccccb *URI )ValidateWithPath (path string )error {return nil };func (_bb *DDC )MarshalXML (e *_bf .Encoder ,start _bf .StartElement )error {start .Name .Local ="\u0044\u0044\u0043";e .EncodeToken (start );e .EncodeToken (_bf .EndElement {Name :start .Name });return nil ;};func (_dde *Point )UnmarshalXML (d *_bf .Decoder ,start _bf .StartElement )error {for {_cge ,_eeb :=d .Token ();if _eeb !=nil {return _c .Errorf ("\u0070\u0061\u0072\u0073\u0069\u006e\u0067\u0020\u0050\u006f\u0069\u006et\u003a\u0020\u0025\u0073",_eeb );};if _ga ,_cf :=_cge .(_bf .EndElement );_cf &&_ga .Name ==start .Name {break ;};};return nil ;};func (_fed *URI )UnmarshalXML (d *_bf .Decoder ,start _bf .StartElement )error {for {_eea ,_cbfd :=d .Token ();if _cbfd !=nil {return _c .Errorf ("\u0070a\u0072s\u0069\u006e\u0067\u0020\u0055\u0052\u0049\u003a\u0020\u0025\u0073",_cbfd );};if _eda ,_cfe :=_eea .(_bf .EndElement );_cfe &&_eda .Name ==start .Name {break ;};};return nil ;};func (_gfb *Period )MarshalXML (e *_bf .Encoder ,start _bf .StartElement )error {start .Name .Local ="\u0050\u0065\u0072\u0069\u006f\u0064";e .EncodeToken (start );e .EncodeToken (_bf .EndElement {Name :start .Name });return nil ;};
// Validate validates the Period and its children
func (_ff *Period )Validate ()error {return _ff .ValidateWithPath ("\u0050\u0065\u0072\u0069\u006f\u0064");};
// ValidateWithPath validates the RFC3066 and its children, prefixing error messages with path
func (_fbe *RFC3066 )ValidateWithPath (path string )error {return nil };func NewLCSH ()*LCSH {_dcd :=&LCSH {};return _dcd };
// Validate validates the Point and its children
func (_acfe *Point )Validate ()error {return _acfe .ValidateWithPath ("\u0050\u006f\u0069n\u0074")};
// ValidateWithPath validates the LCSH and its children, prefixing error messages with path
func (_egeg *LCSH )ValidateWithPath (path string )error {return nil };func (_dae *ISO639_2 )MarshalXML (e *_bf .Encoder ,start _bf .StartElement )error {start .Name .Local ="\u0049\u0053\u004f\u0036\u0033\u0039\u002d\u0032";e .EncodeToken (start );e .EncodeToken (_bf .EndElement {Name :start .Name });return nil ;};
// Validate validates the ElementOrRefinementContainer and its children
func (_dd *ElementOrRefinementContainer )Validate ()error {return _dd .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 NewElementOrRefinementContainer ()*ElementOrRefinementContainer {_d :=&ElementOrRefinementContainer {};return _d ;};func NewISO639_2 ()*ISO639_2 {_afdb :=&ISO639_2 {};return _afdb };func (_geb *LCC )UnmarshalXML (d *_bf .Decoder ,start _bf .StartElement )error {for {_bagb ,_fea :=d .Token ();if _fea !=nil {return _c .Errorf ("\u0070a\u0072s\u0069\u006e\u0067\u0020\u004c\u0043\u0043\u003a\u0020\u0025\u0073",_fea );};if _geg ,_gde :=_bagb .(_bf .EndElement );_gde &&_geg .Name ==start .Name {break ;};};return nil ;};type TGN struct{};
// Validate validates the Box and its children
func (_bga *Box )Validate ()error {return _bga .ValidateWithPath ("\u0042\u006f\u0078")};type MESH struct{};type Period struct{};func (_gba *Period )UnmarshalXML (d *_bf .Decoder ,start _bf .StartElement )error {for {_dce ,_gfd :=d .Token ();if _gfd !=nil {return _c .Errorf ("\u0070a\u0072s\u0069\u006e\u0067\u0020\u0050e\u0072\u0069o\u0064\u003a\u0020\u0025\u0073",_gfd );};if _agab ,_bdb :=_dce .(_bf .EndElement );_bdb &&_agab .Name ==start .Name {break ;};};return nil ;};func (_gffg *RFC3066 )MarshalXML (e *_bf .Encoder ,start _bf .StartElement )error {start .Name .Local ="\u0052F\u0043\u0033\u0030\u0036\u0036";e .EncodeToken (start );e .EncodeToken (_bf .EndElement {Name :start .Name });return nil ;};
// Validate validates the ISO3166 and its children
func (_fe *ISO3166 )Validate ()error {return _fe .ValidateWithPath ("\u0049S\u004f\u0033\u0031\u0036\u0036");};type DDC struct{};func NewISO3166 ()*ISO3166 {_ge :=&ISO3166 {};return _ge };type Box struct{};func (_ecg *LCSH )UnmarshalXML (d *_bf .Decoder ,start _bf .StartElement )error {for {_acfd ,_fgd :=d .Token ();if _fgd !=nil {return _c .Errorf ("\u0070\u0061r\u0073\u0069\u006eg\u0020\u004c\u0043\u0053\u0048\u003a\u0020\u0025\u0073",_fgd );};if _gea ,_def :=_acfd .(_bf .EndElement );_def &&_gea .Name ==start .Name {break ;};};return nil ;};func (_cba *TGN )MarshalXML (e *_bf .Encoder ,start _bf .StartElement )error {start .Name .Local ="\u0054\u0047\u004e";e .EncodeToken (start );e .EncodeToken (_bf .EndElement {Name :start .Name });return nil ;};func (_acf *ElementsAndRefinementsGroupChoice )MarshalXML (e *_bf .Encoder ,start _bf .StartElement )error {if _acf .Any !=nil {_ba :=_bf .StartElement {Name :_bf .Name {Local :"\u0064\u0063\u003a\u0061\u006e\u0079"}};for _ ,_edd :=range _acf .Any {e .EncodeElement (_edd ,_ba );};};return nil ;};func (_fgf *ElementsAndRefinementsGroup )UnmarshalXML (d *_bf .Decoder ,start _bf .StartElement )error {_dfa :for {_fd ,_cd :=d .Token ();if _cd !=nil {return _cd ;};switch _ega :=_fd .(type ){case _bf .StartElement :switch _ega .Name {case _bf .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"}:_bce :=NewElementsAndRefinementsGroupChoice ();if _dgb :=d .DecodeElement (&_bce .Any ,&_ega );_dgb !=nil {return _dgb ;};_fgf .Choice =append (_fgf .Choice ,_bce );default:_cc .Log .Debug ("\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",_ega .Name );if _gfeg :=d .Skip ();_gfeg !=nil {return _gfeg ;};};case _bf .EndElement :break _dfa ;case _bf .CharData :};};return nil ;};func (_bgc *W3CDTF )MarshalXML (e *_bf .Encoder ,start _bf .StartElement )error {start .Name .Local ="\u0057\u0033\u0043\u0044\u0054\u0046";e .EncodeToken (start );e .EncodeToken (_bf .EndElement {Name :start .Name });return nil ;};
// Validate validates the RFC1766 and its children
func (_afc *RFC1766 )Validate ()error {return _afc .ValidateWithPath ("\u0052F\u0043\u0031\u0037\u0036\u0036");};
// Validate validates the IMT and its children
func (_ggd *IMT )Validate ()error {return _ggd .ValidateWithPath ("\u0049\u004d\u0054")};func (_ddeg *UDC )MarshalXML (e *_bf .Encoder ,start _bf .StartElement )error {start .Name .Local ="\u0055\u0044\u0043";e .EncodeToken (start );e .EncodeToken (_bf .EndElement {Name :start .Name });return nil ;};
// ValidateWithPath validates the DCMIType and its children, prefixing error messages with path
func (_ac *DCMIType )ValidateWithPath (path string )error {return nil };func NewMESH ()*MESH {_dga :=&MESH {};return _dga };func (_fdc *RFC1766 )UnmarshalXML (d *_bf .Decoder ,start _bf .StartElement )error {for {_egc ,_dbb :=d .Token ();if _dbb !=nil {return _c .Errorf ("\u0070\u0061\u0072\u0073in\u0067\u0020\u0052\u0046\u0043\u0031\u0037\u0036\u0036\u003a\u0020\u0025\u0073",_dbb );};if _bgaf ,_acfc :=_egc .(_bf .EndElement );_acfc &&_bgaf .Name ==start .Name {break ;};};return nil ;};
// Validate validates the RFC3066 and its children
func (_cccc *RFC3066 )Validate ()error {return _cccc .ValidateWithPath ("\u0052F\u0043\u0033\u0030\u0036\u0036");};type ElementOrRefinementContainer struct{Choice []*ElementsAndRefinementsGroupChoice ;};func NewUDC ()*UDC {_cbd :=&UDC {};return _cbd };
// Validate validates the URI and its children
func (_bdg *URI )Validate ()error {return _bdg .ValidateWithPath ("\u0055\u0052\u0049")};func NewURI ()*URI {_eeba :=&URI {};return _eeba };func (_bfcg *ISO639_2 )UnmarshalXML (d *_bf .Decoder ,start _bf .StartElement )error {for {_dcf ,_abg :=d .Token ();if _abg !=nil {return _c .Errorf ("p\u0061r\u0073\u0069\u006e\u0067\u0020\u0049\u0053\u004f6\u0033\u0039\u005f\u0032: \u0025\u0073",_abg );};if _bd ,_bggb :=_dcf .(_bf .EndElement );_bggb &&_bd .Name ==start .Name {break ;};};return nil ;};func NewIMT ()*IMT {_affa :=&IMT {};return _affa };func NewTGN ()*TGN {_ccg :=&TGN {};return _ccg };
// ValidateWithPath validates the TGN and its children, prefixing error messages with path
func (_fce *TGN )ValidateWithPath (path string )error {return nil };func (_ebe *MESH )UnmarshalXML (d *_bf .Decoder ,start _bf .StartElement )error {for {_edb ,_gdb :=d .Token ();if _gdb !=nil {return _c .Errorf ("\u0070\u0061r\u0073\u0069\u006eg\u0020\u004d\u0045\u0053\u0048\u003a\u0020\u0025\u0073",_gdb );};if _bgea ,_cdab :=_edb .(_bf .EndElement );_cdab &&_bgea .Name ==start .Name {break ;};};return nil ;};func NewPeriod ()*Period {_efdf :=&Period {};return _efdf };func NewElementsAndRefinementsGroup ()*ElementsAndRefinementsGroup {_aa :=&ElementsAndRefinementsGroup {};return _aa ;};func NewElementsAndRefinementsGroupChoice ()*ElementsAndRefinementsGroupChoice {_bgef :=&ElementsAndRefinementsGroupChoice {};return _bgef ;};func (_bba *IMT )MarshalXML (e *_bf .Encoder ,start _bf .StartElement )error {start .Name .Local ="\u0049\u004d\u0054";e .EncodeToken (start );e .EncodeToken (_bf .EndElement {Name :start .Name });return nil ;};func (_dg *ElementOrRefinementContainer )UnmarshalXML (d *_bf .Decoder ,start _bf .StartElement )error {_fc :for {_bbg ,_fcd :=d .Token ();if _fcd !=nil {return _fcd ;};switch _ea :=_bbg .(type ){case _bf .StartElement :switch _ea .Name {case _bf .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"}:_bfc :=NewElementsAndRefinementsGroupChoice ();if _ege :=d .DecodeElement (&_bfc .Any ,&_ea );_ege !=nil {return _ege ;};_dg .Choice =append (_dg .Choice ,_bfc );default:_cc .Log .Debug ("\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 _ef :=d .Skip ();_ef !=nil {return _ef ;};};case _bf .EndElement :break _fc ;case _bf .CharData :};};return nil ;};
// ValidateWithPath validates the W3CDTF and its children, prefixing error messages with path
func (_ddg *W3CDTF )ValidateWithPath (path string )error {return nil };
// ValidateWithPath validates the MESH and its children, prefixing error messages with path
func (_bed *MESH )ValidateWithPath (path string )error {return nil };func (_bfg *Box )UnmarshalXML (d *_bf .Decoder ,start _bf .StartElement )error {for {_f ,_ca :=d .Token ();if _ca !=nil {return _c .Errorf ("\u0070a\u0072s\u0069\u006e\u0067\u0020\u0042\u006f\u0078\u003a\u0020\u0025\u0073",_ca );};if _bg ,_bgd :=_f .(_bf .EndElement );_bgd &&_bg .Name ==start .Name {break ;};};return nil ;};type UDC struct{};func NewLCC ()*LCC {_adb :=&LCC {};return _adb };
// ValidateWithPath validates the Box and its children, prefixing error messages with path
func (_bgg *Box )ValidateWithPath (path string )error {return nil };
// ValidateWithPath validates the Period and its children, prefixing error messages with path
func (_ead *Period )ValidateWithPath (path string )error {return nil };func (_fcf *ISO3166 )UnmarshalXML (d *_bf .Decoder ,start _bf .StartElement )error {for {_cbe ,_efc :=d .Token ();if _efc !=nil {return _c .Errorf ("\u0070\u0061\u0072\u0073in\u0067\u0020\u0049\u0053\u004f\u0033\u0031\u0036\u0036\u003a\u0020\u0025\u0073",_efc );};if _da ,_bag :=_cbe .(_bf .EndElement );_bag &&_da .Name ==start .Name {break ;};};return nil ;};func (_acb *ElementsAndRefinementsGroup )MarshalXML (e *_bf .Encoder ,start _bf .StartElement )error {if _acb .Choice !=nil {for _ ,_aff :=range _acb .Choice {_aff .MarshalXML (e ,_bf .StartElement {});};};return nil ;};
// ValidateWithPath validates the IMT and its children, prefixing error messages with path
func (_cbb *IMT )ValidateWithPath (path string )error {return nil };func (_cbbc *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 init (){_g .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 );_g .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 );_g .RegisterConstructor ("\u0068t\u0074\u0070\u003a\u002f/\u0070\u0075\u0072\u006c\u002eo\u0072g\u002fd\u0063\u002f\u0074\u0065\u0072\u006d\u0073/","\u0044\u0044\u0043",NewDDC );_g .RegisterConstructor ("\u0068t\u0074\u0070\u003a\u002f/\u0070\u0075\u0072\u006c\u002eo\u0072g\u002fd\u0063\u002f\u0074\u0065\u0072\u006d\u0073/","\u004c\u0043\u0043",NewLCC );_g .RegisterConstructor ("\u0068t\u0074\u0070\u003a\u002f/\u0070\u0075\u0072\u006c\u002eo\u0072g\u002fd\u0063\u002f\u0074\u0065\u0072\u006d\u0073/","\u0055\u0044\u0043",NewUDC );_g .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 );_g .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 );_g .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 );_g .RegisterConstructor ("\u0068t\u0074\u0070\u003a\u002f/\u0070\u0075\u0072\u006c\u002eo\u0072g\u002fd\u0063\u002f\u0074\u0065\u0072\u006d\u0073/","\u0049\u004d\u0054",NewIMT );_g .RegisterConstructor ("\u0068t\u0074\u0070\u003a\u002f/\u0070\u0075\u0072\u006c\u002eo\u0072g\u002fd\u0063\u002f\u0074\u0065\u0072\u006d\u0073/","\u0055\u0052\u0049",NewURI );_g .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 );_g .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 );_g .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 );_g .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 );_g .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 );_g .RegisterConstructor ("\u0068t\u0074\u0070\u003a\u002f/\u0070\u0075\u0072\u006c\u002eo\u0072g\u002fd\u0063\u002f\u0074\u0065\u0072\u006d\u0073/","\u0042\u006f\u0078",NewBox );_g .RegisterConstructor ("\u0068t\u0074\u0070\u003a\u002f/\u0070\u0075\u0072\u006c\u002eo\u0072g\u002fd\u0063\u002f\u0074\u0065\u0072\u006d\u0073/","\u0054\u0047\u004e",NewTGN );_g .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 );_g .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 (_baf *IMT )ValidateWithPath (path string )error {return nil };func (_cdf *LCC )MarshalXML (e *_bf .Encoder ,start _bf .StartElement )error {start .Name .Local ="\u004c\u0043\u0043";e .EncodeToken (start );e .EncodeToken (_bf .EndElement {Name :start .Name });return nil ;};type W3CDTF struct{};type LCSH struct{};type ISO639_2 struct{};func NewW3CDTF ()*W3CDTF {_afgc :=&W3CDTF {};return _afgc };func NewRFC1766 ()*RFC1766 {_cfd :=&RFC1766 {};return _cfd };
// Validate validates the ElementsAndRefinementsGroup and its children
func (_acbb *ElementsAndRefinementsGroup )Validate ()error {return _acbb .ValidateWithPath ("E\u006c\u0065\u006d\u0065\u006e\u0074s\u0041\u006e\u0064\u0052\u0065\u0066\u0069\u006e\u0065m\u0065\u006e\u0074s\u0047r\u006f\u0075\u0070");};
// ValidateWithPath validates the ISO639_2 and its children, prefixing error messages with path
func (_efg *ISO639_2 )ValidateWithPath (path string )error {return nil };type IMT struct{};type LCC struct{};
// Validate validates the LCC and its children
func (_dee *LCC )Validate ()error {return _dee .ValidateWithPath ("\u004c\u0043\u0043")};
// Validate validates the UDC and its children
func (_gc *UDC )Validate ()error {return _gc .ValidateWithPath ("\u0055\u0044\u0043")};func (_ebd *ISO3166 )MarshalXML (e *_bf .Encoder ,start _bf .StartElement )error {start .Name .Local ="\u0049S\u004f\u0033\u0031\u0036\u0036";e .EncodeToken (start );e .EncodeToken (_bf .EndElement {Name :start .Name });return nil ;};func NewBox ()*Box {_ed :=&Box {};return _ed };func (_gfe *DDC )UnmarshalXML (d *_bf .Decoder ,start _bf .StartElement )error {for {_ec ,_bc :=d .Token ();if _bc !=nil {return _c .Errorf ("\u0070a\u0072s\u0069\u006e\u0067\u0020\u0044\u0044\u0043\u003a\u0020\u0025\u0073",_bc );};if _fb ,_bgf :=_ec .(_bf .EndElement );_bgf &&_fb .Name ==start .Name {break ;};};return nil ;};type ElementsAndRefinementsGroup struct{Choice []*ElementsAndRefinementsGroupChoice ;};func (_cb *ElementsAndRefinementsGroupChoice )UnmarshalXML (d *_bf .Decoder ,start _bf .StartElement )error {_afg :for {_dc ,_aeg :=d .Token ();if _aeg !=nil {return _aeg ;};switch _eb :=_dc .(type ){case _bf .StartElement :switch _eb .Name {case _bf .Name {Space :"\u0068\u0074\u0074\u0070\u003a\u002f\u002f\u0070\u0075\u0072\u006c\u002e\u006f\u0072\u0067/\u0064c\u002f\u0065\u006c\u0065\u006d\u0065\u006e\u0074\u0073\u002f\u0031\u002e\u0031\u002f",Local :"\u0061\u006e\u0079"}:_ab :=_e .NewAny ();if _dbcc :=d .DecodeElement (_ab ,&_eb );_dbcc !=nil {return _dbcc ;};_cb .Any =append (_cb .Any ,_ab );default:_cc .Log .Debug ("\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",_eb .Name );if _dgd :=d .Skip ();_dgd !=nil {return _dgd ;};};case _bf .EndElement :break _afg ;case _bf .CharData :};};return nil ;};
// Validate validates the DCMIType and its children
func (_af *DCMIType )Validate ()error {return _af .ValidateWithPath ("\u0044\u0043\u004d\u0049\u0054\u0079\u0070\u0065");};func init (){_g .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 );_g .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 );_g .RegisterConstructor ("\u0068t\u0074\u0070\u003a\u002f/\u0070\u0075\u0072\u006c\u002eo\u0072g\u002fd\u0063\u002f\u0074\u0065\u0072\u006d\u0073/","\u0044\u0044\u0043",NewDDC );_g .RegisterConstructor ("\u0068t\u0074\u0070\u003a\u002f/\u0070\u0075\u0072\u006c\u002eo\u0072g\u002fd\u0063\u002f\u0074\u0065\u0072\u006d\u0073/","\u004c\u0043\u0043",NewLCC );_g .RegisterConstructor ("\u0068t\u0074\u0070\u003a\u002f/\u0070\u0075\u0072\u006c\u002eo\u0072g\u002fd\u0063\u002f\u0074\u0065\u0072\u006d\u0073/","\u0055\u0044\u0043",NewUDC );_g .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 );_g .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 );_g .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 );_g .RegisterConstructor ("\u0068t\u0074\u0070\u003a\u002f/\u0070\u0075\u0072\u006c\u002eo\u0072g\u002fd\u0063\u002f\u0074\u0065\u0072\u006d\u0073/","\u0049\u004d\u0054",NewIMT );_g .RegisterConstructor ("\u0068t\u0074\u0070\u003a\u002f/\u0070\u0075\u0072\u006c\u002eo\u0072g\u002fd\u0063\u002f\u0074\u0065\u0072\u006d\u0073/","\u0055\u0052\u0049",NewURI );_g .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 );_g .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 );_g .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 );_g .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 );_g .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 );_g .RegisterConstructor ("\u0068t\u0074\u0070\u003a\u002f/\u0070\u0075\u0072\u006c\u002eo\u0072g\u002fd\u0063\u002f\u0074\u0065\u0072\u006d\u0073/","\u0042\u006f\u0078",NewBox );_g .RegisterConstructor ("\u0068t\u0074\u0070\u003a\u002f/\u0070\u0075\u0072\u006c\u002eo\u0072g\u002fd\u0063\u002f\u0074\u0065\u0072\u006d\u0073/","\u0054\u0047\u004e",NewTGN );_g .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 );_g .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 (_b "encoding/xml";_g "fmt";_a "github.com/unidoc/unioffice";_gc "github.com/unidoc/unioffice/schema/soo/dml";);func (_ge *LockedCanvas )MarshalXML (e *_b .Encoder ,start _b .StartElement )error {start .Attr =append (start .Attr ,_b .Attr {Name :_b .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 ,_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 ="\u006c\u006f\u0063k\u0065\u0064\u0043\u0061\u006e\u0076\u0061\u0073";return _ge .CT_GvmlGroupShape .MarshalXML (e ,start );};type LockedCanvas struct{_gc .CT_GvmlGroupShape };func NewLockedCanvas ()*LockedCanvas {_f :=&LockedCanvas {};_f .CT_GvmlGroupShape =*_gc .NewCT_GvmlGroupShape ();return _f ;};func (_c *LockedCanvas )UnmarshalXML (d *_b .Decoder ,start _b .StartElement )error {_c .CT_GvmlGroupShape =*_gc .NewCT_GvmlGroupShape ();for {_fe ,_bd :=d .Token ();if _bd !=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",_bd );};if _cc ,_be :=_fe .(_b .EndElement );_be &&_cc .Name ==start .Name {break ;};};return nil ;};
// Validate validates the LockedCanvas and its children
func (_ba *LockedCanvas )Validate ()error {return _ba .ValidateWithPath ("\u004c\u006f\u0063k\u0065\u0064\u0043\u0061\u006e\u0076\u0061\u0073");};
package lockedCanvas ;import (_g "encoding/xml";_f "fmt";_cg "github.com/unidoc/unioffice";_a "github.com/unidoc/unioffice/schema/soo/dml";);func NewLockedCanvas ()*LockedCanvas {_b :=&LockedCanvas {};_b .CT_GvmlGroupShape =*_a .NewCT_GvmlGroupShape ();return _b ;};func (_ga *LockedCanvas )MarshalXML (e *_g .Encoder ,start _g .StartElement )error {start .Attr =append (start .Attr ,_g .Attr {Name :_g .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 ,_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 ="\u006c\u006f\u0063k\u0065\u0064\u0043\u0061\u006e\u0076\u0061\u0073";return _ga .CT_GvmlGroupShape .MarshalXML (e ,start );};type LockedCanvas struct{_a .CT_GvmlGroupShape };func (_d *LockedCanvas )UnmarshalXML (d *_g .Decoder ,start _g .StartElement )error {_d .CT_GvmlGroupShape =*_a .NewCT_GvmlGroupShape ();for {_e ,_be :=d .Token ();if _be !=nil {return _f .Errorf ("\u0070a\u0072\u0073\u0069\u006e\u0067\u0020\u004c\u006f\u0063\u006b\u0065d\u0043\u0061\u006e\u0076\u0061\u0073\u003a\u0020\u0025\u0073",_be );};if _fc ,_dd :=_e .(_g .EndElement );_dd &&_fc .Name ==start .Name {break ;};};return nil ;};
// ValidateWithPath validates the LockedCanvas and its children, prefixing error messages with path
func (_ec *LockedCanvas )ValidateWithPath (path string )error {if _bae :=_ec .CT_GvmlGroupShape .ValidateWithPath (path );_bae !=nil {return _bae ;};return nil ;};func init (){_a .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 (_fd *LockedCanvas )ValidateWithPath (path string )error {if _ag :=_fd .CT_GvmlGroupShape .ValidateWithPath (path );_ag !=nil {return _ag ;};return nil ;};
// Validate validates the LockedCanvas and its children
func (_fa *LockedCanvas )Validate ()error {return _fa .ValidateWithPath ("\u004c\u006f\u0063k\u0065\u0064\u0043\u0061\u006e\u0076\u0061\u0073");};func init (){_cg .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 );};

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,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 (_d "encoding/xml";_dd "fmt";_g "github.com/unidoc/unioffice";_c "github.com/unidoc/unioffice/common/logger";_f "regexp";);func (_bbf *Override )MarshalXML (e *_d .Encoder ,start _d .StartElement )error {return _bbf .CT_Override .MarshalXML (e ,start );};func NewTypes ()*Types {_cce :=&Types {};_cce .CT_Types =*NewCT_Types ();return _cce };func (_cge *CT_Override )UnmarshalXML (d *_d .Decoder ,start _d .StartElement )error {_cge .ContentTypeAttr ="\u0061p\u0070l\u0069\u0063\u0061\u0074\u0069\u006f\u006e\u002f\u0078\u006d\u006c";for _ ,_ea :=range start .Attr {if _ea .Name .Local =="C\u006f\u006e\u0074\u0065\u006e\u0074\u0054\u0079\u0070\u0065"{_fce ,_aa :=_ea .Value ,error (nil );if _aa !=nil {return _aa ;};_cge .ContentTypeAttr =_fce ;continue ;};if _ea .Name .Local =="\u0050\u0061\u0072\u0074\u004e\u0061\u006d\u0065"{_bad ,_geg :=_ea .Value ,error (nil );if _geg !=nil {return _geg ;};_cge .PartNameAttr =_bad ;continue ;};};for {_eaf ,_eag :=d .Token ();if _eag !=nil {return _dd .Errorf ("\u0070\u0061\u0072si\u006e\u0067\u0020\u0043\u0054\u005f\u004f\u0076\u0065\u0072\u0072\u0069\u0064\u0065\u003a\u0020\u0025\u0073",_eag );};if _eac ,_de :=_eaf .(_d .EndElement );_de &&_eac .Name ==start .Name {break ;};};return nil ;};
// ValidateWithPath validates the Override and its children, prefixing error messages with path
func (_cb *Override )ValidateWithPath (path string )error {if _dbcc :=_cb .CT_Override .ValidateWithPath (path );_dbcc !=nil {return _dbcc ;};return nil ;};func NewCT_Default ()*CT_Default {_cd :=&CT_Default {};_cd .ExtensionAttr ="\u0078\u006d\u006c";_cd .ContentTypeAttr ="\u0061p\u0070l\u0069\u0063\u0061\u0074\u0069\u006f\u006e\u002f\u0078\u006d\u006c";return _cd ;};func NewCT_Override ()*CT_Override {_fcc :=&CT_Override {};_fcc .ContentTypeAttr ="\u0061p\u0070l\u0069\u0063\u0061\u0074\u0069\u006f\u006e\u002f\u0078\u006d\u006c";return _fcc ;};type CT_Default struct{ExtensionAttr string ;ContentTypeAttr string ;};func (_fcee *Types )UnmarshalXML (d *_d .Decoder ,start _d .StartElement )error {_fcee .CT_Types =*NewCT_Types ();_bba :for {_ggf ,_fdc :=d .Token ();if _fdc !=nil {return _fdc ;};switch _gc :=_ggf .(type ){case _d .StartElement :switch _gc .Name {case _d .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"}:_gef :=NewDefault ();if _dbec :=d .DecodeElement (_gef ,&_gc );_dbec !=nil {return _dbec ;};_fcee .Default =append (_fcee .Default ,_gef );case _d .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"}:_cdb :=NewOverride ();if _bdf :=d .DecodeElement (_cdb ,&_gc );_bdf !=nil {return _bdf ;};_fcee .Override =append (_fcee .Override ,_cdb );default:_c .Log .Debug ("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",_gc .Name );if _agf :=d .Skip ();_agf !=nil {return _agf ;};};case _d .EndElement :break _bba ;case _d .CharData :};};return nil ;};func (_gaf *CT_Types )UnmarshalXML (d *_d .Decoder ,start _d .StartElement )error {_dbd :for {_bfc ,_dbg :=d .Token ();if _dbg !=nil {return _dbg ;};switch _ec :=_bfc .(type ){case _d .StartElement :switch _ec .Name {case _d .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"}:_fa :=NewDefault ();if _af :=d .DecodeElement (_fa ,&_ec );_af !=nil {return _af ;};_gaf .Default =append (_gaf .Default ,_fa );case _d .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"}:_fac :=NewOverride ();if _ff :=d .DecodeElement (_fac ,&_ec );_ff !=nil {return _ff ;};_gaf .Override =append (_gaf .Override ,_fac );default:_c .Log .Debug ("\u0073\u006b\u0069\u0070\u0070\u0069\u006eg\u0020\u0075\u006es\u0075\u0070\u0070\u006fr\u0074\u0065\u0064\u0020\u0065\u006c\u0065\u006d\u0065\u006e\u0074\u0020\u006f\u006e\u0020\u0043\u0054\u005f\u0054\u0079\u0070\u0065\u0073\u0020\u0025\u0076",_ec .Name );if _ac :=d .Skip ();_ac !=nil {return _ac ;};};case _d .EndElement :break _dbd ;case _d .CharData :};};return nil ;};
// ValidateWithPath validates the Default and its children, prefixing error messages with path
func (_faf *Default )ValidateWithPath (path string )error {if _acb :=_faf .CT_Default .ValidateWithPath (path );_acb !=nil {return _acb ;};return nil ;};func (_ga *CT_Default )MarshalXML (e *_d .Encoder ,start _d .StartElement )error {start .Attr =append (start .Attr ,_d .Attr {Name :_d .Name {Local :"\u0045x\u0074\u0065\u006e\u0073\u0069\u006fn"},Value :_dd .Sprintf ("\u0025\u0076",_ga .ExtensionAttr )});start .Attr =append (start .Attr ,_d .Attr {Name :_d .Name {Local :"C\u006f\u006e\u0074\u0065\u006e\u0074\u0054\u0079\u0070\u0065"},Value :_dd .Sprintf ("\u0025\u0076",_ga .ContentTypeAttr )});e .EncodeToken (start );e .EncodeToken (_d .EndElement {Name :start .Name });return nil ;};
// Validate validates the CT_Override and its children
func (_dg *CT_Override )Validate ()error {return _dg .ValidateWithPath ("C\u0054\u005f\u004f\u0076\u0065\u0072\u0072\u0069\u0064\u0065");};type Types struct{CT_Types };func (_fdg *Types )MarshalXML (e *_d .Encoder ,start _d .StartElement )error {start .Attr =append (start .Attr ,_d .Attr {Name :_d .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 ,_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 ="\u0054\u0079\u0070e\u0073";return _fdg .CT_Types .MarshalXML (e ,start );};func NewDefault ()*Default {_gf :=&Default {};_gf .CT_Default =*NewCT_Default ();return _gf };type Default struct{CT_Default };var ST_ContentTypePatternRe =_f .MustCompile (ST_ContentTypePattern );
// Validate validates the CT_Types and its children
func (_ffe *CT_Types )Validate ()error {return _ffe .ValidateWithPath ("\u0043\u0054\u005f\u0054\u0079\u0070\u0065\u0073");};func (_ffd *Override )UnmarshalXML (d *_d .Decoder ,start _d .StartElement )error {_ffd .CT_Override =*NewCT_Override ();for _ ,_ag :=range start .Attr {if _ag .Name .Local =="C\u006f\u006e\u0074\u0065\u006e\u0074\u0054\u0079\u0070\u0065"{_dea ,_bce :=_ag .Value ,error (nil );if _bce !=nil {return _bce ;};_ffd .ContentTypeAttr =_dea ;continue ;};if _ag .Name .Local =="\u0050\u0061\u0072\u0074\u004e\u0061\u006d\u0065"{_aaf ,_gad :=_ag .Value ,error (nil );if _gad !=nil {return _gad ;};_ffd .PartNameAttr =_aaf ;continue ;};};for {_bcd ,_adf :=d .Token ();if _adf !=nil {return _dd .Errorf ("p\u0061r\u0073\u0069\u006e\u0067\u0020\u004f\u0076\u0065r\u0072\u0069\u0064\u0065: \u0025\u0073",_adf );};if _ae ,_aca :=_bcd .(_d .EndElement );_aca &&_ae .Name ==start .Name {break ;};};return nil ;};func (_bc *CT_Types )MarshalXML (e *_d .Encoder ,start _d .StartElement )error {e .EncodeToken (start );if _bc .Default !=nil {_eg :=_d .StartElement {Name :_d .Name {Local :"\u0044e\u0066\u0061\u0075\u006c\u0074"}};for _ ,_aag :=range _bc .Default {e .EncodeElement (_aag ,_eg );};};if _bc .Override !=nil {_dgd :=_d .StartElement {Name :_d .Name {Local :"\u004f\u0076\u0065\u0072\u0072\u0069\u0064\u0065"}};for _ ,_da :=range _bc .Override {e .EncodeElement (_da ,_dgd );};};e .EncodeToken (_d .EndElement {Name :start .Name });return nil ;};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";
// ValidateWithPath validates the CT_Override and its children, prefixing error messages with path
func (_bd *CT_Override )ValidateWithPath (path string )error {if !ST_ContentTypePatternRe .MatchString (_bd .ContentTypeAttr ){return _dd .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 ,_bd .ContentTypeAttr );};return nil ;};type Override struct{CT_Override };const ST_ContentTypePattern ="\u005e\\\u0070{\u004c\u0061\u0074\u0069\u006e\u007d\u002b\u002f\u002e\u002a\u0024";
// Validate validates the Types and its children
func (_face *Types )Validate ()error {return _face .ValidateWithPath ("\u0054\u0079\u0070e\u0073")};
// ValidateWithPath validates the Types and its children, prefixing error messages with path
func (_cbg *Types )ValidateWithPath (path string )error {if _ecf :=_cbg .CT_Types .ValidateWithPath (path );_ecf !=nil {return _ecf ;};return nil ;};type CT_Types struct{Default []*Default ;Override []*Override ;};func (_aae *Default )UnmarshalXML (d *_d .Decoder ,start _d .StartElement )error {_aae .CT_Default =*NewCT_Default ();for _ ,_cee :=range start .Attr {if _cee .Name .Local =="\u0045x\u0074\u0065\u006e\u0073\u0069\u006fn"{_cdf ,_dgdc :=_cee .Value ,error (nil );if _dgdc !=nil {return _dgdc ;};_aae .ExtensionAttr =_cdf ;continue ;};if _cee .Name .Local =="C\u006f\u006e\u0074\u0065\u006e\u0074\u0054\u0079\u0070\u0065"{_ee ,_ffc :=_cee .Value ,error (nil );if _ffc !=nil {return _ffc ;};_aae .ContentTypeAttr =_ee ;continue ;};};for {_dbc ,_fbd :=d .Token ();if _fbd !=nil {return _dd .Errorf ("\u0070\u0061\u0072\u0073in\u0067\u0020\u0044\u0065\u0066\u0061\u0075\u006c\u0074\u003a\u0020\u0025\u0073",_fbd );};if _ebb ,_fd :=_dbc .(_d .EndElement );_fd &&_ebb .Name ==start .Name {break ;};};return nil ;};func NewCT_Types ()*CT_Types {_ad :=&CT_Types {};return _ad };func NewOverride ()*Override {_eba :=&Override {};_eba .CT_Override =*NewCT_Override ();return _eba };
// Validate validates the CT_Default and its children
func (_gg *CT_Default )Validate ()error {return _gg .ValidateWithPath ("\u0043\u0054\u005f\u0044\u0065\u0066\u0061\u0075\u006c\u0074");};
// Validate validates the Override and its children
func (_bec *Override )Validate ()error {return _bec .ValidateWithPath ("\u004f\u0076\u0065\u0072\u0072\u0069\u0064\u0065");};func (_b *CT_Default )UnmarshalXML (d *_d .Decoder ,start _d .StartElement )error {_b .ExtensionAttr ="\u0078\u006d\u006c";_b .ContentTypeAttr ="\u0061p\u0070l\u0069\u0063\u0061\u0074\u0069\u006f\u006e\u002f\u0078\u006d\u006c";for _ ,_fc :=range start .Attr {if _fc .Name .Local =="\u0045x\u0074\u0065\u006e\u0073\u0069\u006fn"{_e ,_ge :=_fc .Value ,error (nil );if _ge !=nil {return _ge ;};_b .ExtensionAttr =_e ;continue ;};if _fc .Name .Local =="C\u006f\u006e\u0074\u0065\u006e\u0074\u0054\u0079\u0070\u0065"{_eb ,_bb :=_fc .Value ,error (nil );if _bb !=nil {return _bb ;};_b .ContentTypeAttr =_eb ;continue ;};};for {_db ,_cc :=d .Token ();if _cc !=nil {return _dd .Errorf ("\u0070\u0061\u0072\u0073in\u0067\u0020\u0043\u0054\u005f\u0044\u0065\u0066\u0061\u0075\u006c\u0074\u003a\u0020%\u0073",_cc );};if _cg ,_ce :=_db .(_d .EndElement );_ce &&_cg .Name ==start .Name {break ;};};return nil ;};var ST_ExtensionPatternRe =_f .MustCompile (ST_ExtensionPattern );func (_bf *CT_Override )MarshalXML (e *_d .Encoder ,start _d .StartElement )error {start .Attr =append (start .Attr ,_d .Attr {Name :_d .Name {Local :"C\u006f\u006e\u0074\u0065\u006e\u0074\u0054\u0079\u0070\u0065"},Value :_dd .Sprintf ("\u0025\u0076",_bf .ContentTypeAttr )});start .Attr =append (start .Attr ,_d .Attr {Name :_d .Name {Local :"\u0050\u0061\u0072\u0074\u004e\u0061\u006d\u0065"},Value :_dd .Sprintf ("\u0025\u0076",_bf .PartNameAttr )});e .EncodeToken (start );e .EncodeToken (_d .EndElement {Name :start .Name });return nil ;};
package content_types ;import (_d "encoding/xml";_b "fmt";_dg "github.com/unidoc/unioffice";_g "github.com/unidoc/unioffice/common/logger";_ag "regexp";);type CT_Types struct{Default []*Default ;Override []*Override ;};type Default struct{CT_Default };
// ValidateWithPath validates the CT_Types and its children, prefixing error messages with path
func (_dbe *CT_Types )ValidateWithPath (path string )error {for _fad ,_eafd :=range _dbe .Default {if _fae :=_eafd .ValidateWithPath (_dd .Sprintf ("\u0025\u0073\u002f\u0044\u0065\u0066\u0061\u0075\u006ct\u005b\u0025\u0064\u005d",path ,_fad ));_fae !=nil {return _fae ;};};for _fec ,_gae :=range _dbe .Override {if _fb :=_gae .ValidateWithPath (_dd .Sprintf ("\u0025s\u002fO\u0076\u0065\u0072\u0072\u0069\u0064\u0065\u005b\u0025\u0064\u005d",path ,_fec ));_fb !=nil {return _fb ;};};return nil ;};func (_bae *Default )MarshalXML (e *_d .Encoder ,start _d .StartElement )error {return _bae .CT_Default .MarshalXML (e ,start );};
func (_fcc *CT_Types )ValidateWithPath (path string )error {for _gf ,_ga :=range _fcc .Default {if _cfc :=_ga .ValidateWithPath (_b .Sprintf ("\u0025\u0073\u002f\u0044\u0065\u0066\u0061\u0075\u006ct\u005b\u0025\u0064\u005d",path ,_gf ));_cfc !=nil {return _cfc ;};};for _fd ,_gd :=range _fcc .Override {if _fga :=_gd .ValidateWithPath (_b .Sprintf ("\u0025s\u002fO\u0076\u0065\u0072\u0072\u0069\u0064\u0065\u005b\u0025\u0064\u005d",path ,_fd ));_fga !=nil {return _fga ;};};return nil ;};func (_dcb *Types )MarshalXML (e *_d .Encoder ,start _d .StartElement )error {start .Attr =append (start .Attr ,_d .Attr {Name :_d .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 ,_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 ="\u0054\u0079\u0070e\u0073";return _dcb .CT_Types .MarshalXML (e ,start );};
// ValidateWithPath validates the CT_Default and its children, prefixing error messages with path
func (_cgc *CT_Default )ValidateWithPath (path string )error {if !ST_ExtensionPatternRe .MatchString (_cgc .ExtensionAttr ){return _dd .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 ,_cgc .ExtensionAttr );};if !ST_ContentTypePatternRe .MatchString (_cgc .ContentTypeAttr ){return _dd .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 ,_cgc .ContentTypeAttr );};return nil ;};type CT_Override struct{ContentTypeAttr string ;PartNameAttr string ;};
// Validate validates the CT_Types and its children
func (_aef *CT_Types )Validate ()error {return _aef .ValidateWithPath ("\u0043\u0054\u005f\u0054\u0079\u0070\u0065\u0073");};
// Validate validates the CT_Default and its children
func (_bb *CT_Default )Validate ()error {return _bb .ValidateWithPath ("\u0043\u0054\u005f\u0044\u0065\u0066\u0061\u0075\u006c\u0074");};func (_eg *CT_Types )MarshalXML (e *_d .Encoder ,start _d .StartElement )error {e .EncodeToken (start );if _eg .Default !=nil {_fb :=_d .StartElement {Name :_d .Name {Local :"\u0044e\u0066\u0061\u0075\u006c\u0074"}};for _ ,_aab :=range _eg .Default {e .EncodeElement (_aab ,_fb );};};if _eg .Override !=nil {_fbg :=_d .StartElement {Name :_d .Name {Local :"\u004f\u0076\u0065\u0072\u0072\u0069\u0064\u0065"}};for _ ,_dff :=range _eg .Override {e .EncodeElement (_dff ,_fbg );};};e .EncodeToken (_d .EndElement {Name :start .Name });return nil ;};func NewCT_Types ()*CT_Types {_aa :=&CT_Types {};return _aa };type CT_Default struct{ExtensionAttr string ;ContentTypeAttr string ;};
// Validate validates the Types and its children
func (_gee *Types )Validate ()error {return _gee .ValidateWithPath ("\u0054\u0079\u0070e\u0073")};func (_ac *CT_Types )UnmarshalXML (d *_d .Decoder ,start _d .StartElement )error {_af :for {_edf ,_bbd :=d .Token ();if _bbd !=nil {return _bbd ;};switch _gef :=_edf .(type ){case _d .StartElement :switch _gef .Name {case _d .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"}:_bc :=NewDefault ();if _cge :=d .DecodeElement (_bc ,&_gef );_cge !=nil {return _cge ;};_ac .Default =append (_ac .Default ,_bc );case _d .Name {Space :"ht\u0074\u0070:\u002f\u002f\u0073\u0063\u0068\u0065\u006d\u0061\u0073.\u006f\u0070\u0065\u006e\u0078\u006d\u006c\u0066\u006f\u0072\u006d\u0061\u0074\u0073\u002e\u006f\u0072\u0067\u002f\u0070\u0061\u0063\u006b\u0061\u0067\u0065\u002f\u00320\u00306\u002f\u0063\u006f\u006e\u0074\u0065\u006e\u0074-\u0074y\u0070\u0065s",Local :"\u004f\u0076\u0065\u0072\u0072\u0069\u0064\u0065"}:_dc :=NewOverride ();if _geg :=d .DecodeElement (_dc ,&_gef );_geg !=nil {return _geg ;};_ac .Override =append (_ac .Override ,_dc );default:_g .Log .Debug ("\u0073\u006b\u0069\u0070\u0070\u0069\u006eg\u0020\u0075\u006es\u0075\u0070\u0070\u006fr\u0074\u0065\u0064\u0020\u0065\u006c\u0065\u006d\u0065\u006e\u0074\u0020\u006f\u006e\u0020\u0043\u0054\u005f\u0054\u0079\u0070\u0065\u0073\u0020\u0025\u0076",_gef .Name );if _fg :=d .Skip ();_fg !=nil {return _fg ;};};case _d .EndElement :break _af ;case _d .CharData :};};return nil ;};func (_cee *Default )MarshalXML (e *_d .Encoder ,start _d .StartElement )error {return _cee .CT_Default .MarshalXML (e ,start );};func (_bf *CT_Default )MarshalXML (e *_d .Encoder ,start _d .StartElement )error {start .Attr =append (start .Attr ,_d .Attr {Name :_d .Name {Local :"\u0045x\u0074\u0065\u006e\u0073\u0069\u006fn"},Value :_b .Sprintf ("\u0025\u0076",_bf .ExtensionAttr )});start .Attr =append (start .Attr ,_d .Attr {Name :_d .Name {Local :"C\u006f\u006e\u0074\u0065\u006e\u0074\u0054\u0079\u0070\u0065"},Value :_b .Sprintf ("\u0025\u0076",_bf .ContentTypeAttr )});e .EncodeToken (start );e .EncodeToken (_d .EndElement {Name :start .Name });return nil ;};type CT_Override struct{ContentTypeAttr string ;PartNameAttr string ;};func (_eda *Override )UnmarshalXML (d *_d .Decoder ,start _d .StartElement )error {_eda .CT_Override =*NewCT_Override ();for _ ,_dgfe :=range start .Attr {if _dgfe .Name .Local =="C\u006f\u006e\u0074\u0065\u006e\u0074\u0054\u0079\u0070\u0065"{_cef ,_dbb :=_dgfe .Value ,error (nil );if _dbb !=nil {return _dbb ;};_eda .ContentTypeAttr =_cef ;continue ;};if _dgfe .Name .Local =="\u0050\u0061\u0072\u0074\u004e\u0061\u006d\u0065"{_fgd ,_ca :=_dgfe .Value ,error (nil );if _ca !=nil {return _ca ;};_eda .PartNameAttr =_fgd ;continue ;};};for {_aagc ,_dbg :=d .Token ();if _dbg !=nil {return _b .Errorf ("p\u0061r\u0073\u0069\u006e\u0067\u0020\u004f\u0076\u0065r\u0072\u0069\u0064\u0065: \u0025\u0073",_dbg );};if _caa ,_agf :=_aagc .(_d .EndElement );_agf &&_caa .Name ==start .Name {break ;};};return nil ;};
// ValidateWithPath validates the Default and its children, prefixing error messages with path
func (_ee *Default )ValidateWithPath (path string )error {if _feb :=_ee .CT_Default .ValidateWithPath (path );_feb !=nil {return _feb ;};return nil ;};func NewDefault ()*Default {_dgff :=&Default {};_dgff .CT_Default =*NewCT_Default ();return _dgff };func NewCT_Default ()*CT_Default {_gb :=&CT_Default {};_gb .ExtensionAttr ="\u0078\u006d\u006c";_gb .ContentTypeAttr ="\u0061p\u0070l\u0069\u0063\u0061\u0074\u0069\u006f\u006e\u002f\u0078\u006d\u006c";return _gb ;};func NewOverride ()*Override {_cbd :=&Override {};_cbd .CT_Override =*NewCT_Override ();return _cbd };func (_fge *Types )UnmarshalXML (d *_d .Decoder ,start _d .StartElement )error {_fge .CT_Types =*NewCT_Types ();_dbe :for {_cbdd ,_gcc :=d .Token ();if _gcc !=nil {return _gcc ;};switch _fac :=_cbdd .(type ){case _d .StartElement :switch _fac .Name {case _d .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"}:_abe :=NewDefault ();if _bbde :=d .DecodeElement (_abe ,&_fac );_bbde !=nil {return _bbde ;};_fge .Default =append (_fge .Default ,_abe );case _d .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"}:_abc :=NewOverride ();if _ad :=d .DecodeElement (_abc ,&_fac );_ad !=nil {return _ad ;};_fge .Override =append (_fge .Override ,_abc );default:_g .Log .Debug ("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",_fac .Name );if _fdd :=d .Skip ();_fdd !=nil {return _fdd ;};};case _d .EndElement :break _dbe ;case _d .CharData :};};return nil ;};var ST_ContentTypePatternRe =_ag .MustCompile (ST_ContentTypePattern );var ST_ExtensionPatternRe =_ag .MustCompile (ST_ExtensionPattern );func NewCT_Override ()*CT_Override {_f :=&CT_Override {};_f .ContentTypeAttr ="\u0061p\u0070l\u0069\u0063\u0061\u0074\u0069\u006f\u006e\u002f\u0078\u006d\u006c";return _f ;};func (_ef *CT_Override )MarshalXML (e *_d .Encoder ,start _d .StartElement )error {start .Attr =append (start .Attr ,_d .Attr {Name :_d .Name {Local :"C\u006f\u006e\u0074\u0065\u006e\u0074\u0054\u0079\u0070\u0065"},Value :_b .Sprintf ("\u0025\u0076",_ef .ContentTypeAttr )});start .Attr =append (start .Attr ,_d .Attr {Name :_d .Name {Local :"\u0050\u0061\u0072\u0074\u004e\u0061\u006d\u0065"},Value :_b .Sprintf ("\u0025\u0076",_ef .PartNameAttr )});e .EncodeToken (start );e .EncodeToken (_d .EndElement {Name :start .Name });return nil ;};func (_daa *CT_Override )UnmarshalXML (d *_d .Decoder ,start _d .StartElement )error {_daa .ContentTypeAttr ="\u0061p\u0070l\u0069\u0063\u0061\u0074\u0069\u006f\u006e\u002f\u0078\u006d\u006c";for _ ,_abd :=range start .Attr {if _abd .Name .Local =="C\u006f\u006e\u0074\u0065\u006e\u0074\u0054\u0079\u0070\u0065"{_aeg ,_ba :=_abd .Value ,error (nil );if _ba !=nil {return _ba ;};_daa .ContentTypeAttr =_aeg ;continue ;};if _abd .Name .Local =="\u0050\u0061\u0072\u0074\u004e\u0061\u006d\u0065"{_cb ,_bba :=_abd .Value ,error (nil );if _bba !=nil {return _bba ;};_daa .PartNameAttr =_cb ;continue ;};};for {_fc ,_dgf :=d .Token ();if _dgf !=nil {return _b .Errorf ("\u0070\u0061\u0072si\u006e\u0067\u0020\u0043\u0054\u005f\u004f\u0076\u0065\u0072\u0072\u0069\u0064\u0065\u003a\u0020\u0025\u0073",_dgf );};if _cf ,_fa :=_fc .(_d .EndElement );_fa &&_cf .Name ==start .Name {break ;};};return nil ;};
// Validate validates the CT_Override and its children
func (_ed *CT_Override )Validate ()error {return _ed .ValidateWithPath ("C\u0054\u005f\u004f\u0076\u0065\u0072\u0072\u0069\u0064\u0065");};func (_de *CT_Default )UnmarshalXML (d *_d .Decoder ,start _d .StartElement )error {_de .ExtensionAttr ="\u0078\u006d\u006c";_de .ContentTypeAttr ="\u0061p\u0070l\u0069\u0063\u0061\u0074\u0069\u006f\u006e\u002f\u0078\u006d\u006c";for _ ,_df :=range start .Attr {if _df .Name .Local =="\u0045x\u0074\u0065\u006e\u0073\u0069\u006fn"{_ab ,_e :=_df .Value ,error (nil );if _e !=nil {return _e ;};_de .ExtensionAttr =_ab ;continue ;};if _df .Name .Local =="C\u006f\u006e\u0074\u0065\u006e\u0074\u0054\u0079\u0070\u0065"{_ge ,_ae :=_df .Value ,error (nil );if _ae !=nil {return _ae ;};_de .ContentTypeAttr =_ge ;continue ;};};for {_da ,_c :=d .Token ();if _c !=nil {return _b .Errorf ("\u0070\u0061\u0072\u0073in\u0067\u0020\u0043\u0054\u005f\u0044\u0065\u0066\u0061\u0075\u006c\u0074\u003a\u0020%\u0073",_c );};if _cg ,_dec :=_da .(_d .EndElement );_dec &&_cg .Name ==start .Name {break ;};};return nil ;};
// Validate validates the Default and its children
func (_dbcb *Default )Validate ()error {return _dbcb .ValidateWithPath ("\u0044e\u0066\u0061\u0075\u006c\u0074");};func init (){_g .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 );_g .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 );_g .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 );_g .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 );_g .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 );_g .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 (_db *Default )Validate ()error {return _db .ValidateWithPath ("\u0044e\u0066\u0061\u0075\u006c\u0074");};
// ValidateWithPath validates the Override and its children, prefixing error messages with path
func (_bfg *Override )ValidateWithPath (path string )error {if _agff :=_bfg .CT_Override .ValidateWithPath (path );_agff !=nil {return _agff ;};return nil ;};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";
// ValidateWithPath validates the Types and its children, prefixing error messages with path
func (_acf *Types )ValidateWithPath (path string )error {if _cc :=_acf .CT_Types .ValidateWithPath (path );_cc !=nil {return _cc ;};return nil ;};type Types struct{CT_Types };
// Validate validates the Override and its children
func (_abb *Override )Validate ()error {return _abb .ValidateWithPath ("\u004f\u0076\u0065\u0072\u0072\u0069\u0064\u0065");};type Override struct{CT_Override };
// ValidateWithPath validates the CT_Default and its children, prefixing error messages with path
func (_ec *CT_Default )ValidateWithPath (path string )error {if !ST_ExtensionPatternRe .MatchString (_ec .ExtensionAttr ){return _b .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 ,_ec .ExtensionAttr );};if !ST_ContentTypePatternRe .MatchString (_ec .ContentTypeAttr ){return _b .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 ,_ec .ContentTypeAttr );};return nil ;};const ST_ContentTypePattern ="\u005e\\\u0070{\u004c\u0061\u0074\u0069\u006e\u007d\u002b\u002f\u002e\u002a\u0024";func NewTypes ()*Types {_ced :=&Types {};_ced .CT_Types =*NewCT_Types ();return _ced };
// ValidateWithPath validates the CT_Override and its children, prefixing error messages with path
func (_faf *CT_Override )ValidateWithPath (path string )error {if !ST_ContentTypePatternRe .MatchString (_faf .ContentTypeAttr ){return _b .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 ,_faf .ContentTypeAttr );};return nil ;};func (_bbg *Override )MarshalXML (e *_d .Encoder ,start _d .StartElement )error {return _bbg .CT_Override .MarshalXML (e ,start );};func (_fe *Default )UnmarshalXML (d *_d .Decoder ,start _d .StartElement )error {_fe .CT_Default =*NewCT_Default ();for _ ,_dfe :=range start .Attr {if _dfe .Name .Local =="\u0045x\u0074\u0065\u006e\u0073\u0069\u006fn"{_efg ,_cbb :=_dfe .Value ,error (nil );if _cbb !=nil {return _cbb ;};_fe .ExtensionAttr =_efg ;continue ;};if _dfe .Name .Local =="C\u006f\u006e\u0074\u0065\u006e\u0074\u0054\u0079\u0070\u0065"{_dcc ,_acc :=_dfe .Value ,error (nil );if _acc !=nil {return _acc ;};_fe .ContentTypeAttr =_dcc ;continue ;};};for {_bce ,_gfc :=d .Token ();if _gfc !=nil {return _b .Errorf ("\u0070\u0061\u0072\u0073in\u0067\u0020\u0044\u0065\u0066\u0061\u0075\u006c\u0074\u003a\u0020\u0025\u0073",_gfc );};if _fdg ,_aag :=_bce .(_d .EndElement );_aag &&_fdg .Name ==start .Name {break ;};};return nil ;};func init (){_dg .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 );_dg .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 );_dg .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 );_dg .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 );_dg .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 );_dg .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

View File

@ -9,22 +9,22 @@
// Use of this source code is governed by the UniDoc End User License Agreement
// terms that can be accessed at https://unidoc.io/eula/
package schemaLibrary ;import (_b "encoding/xml";_bf "fmt";_e "github.com/unidoc/unioffice";_g "github.com/unidoc/unioffice/common/logger";);
package schemaLibrary ;import (_e "encoding/xml";_d "fmt";_a "github.com/unidoc/unioffice";_eb "github.com/unidoc/unioffice/common/logger";);
// Validate validates the SchemaLibrary and its children
func (_dae *SchemaLibrary )Validate ()error {return _dae .ValidateWithPath ("\u0053\u0063\u0068\u0065\u006d\u0061\u004c\u0069\u0062\u0072\u0061\u0072\u0079");};func (_ea *CT_Schema )MarshalXML (e *_b .Encoder ,start _b .StartElement )error {if _ea .UriAttr !=nil {start .Attr =append (start .Attr ,_b .Attr {Name :_b .Name {Local :"\u006d\u0061\u003a\u0075\u0072\u0069"},Value :_bf .Sprintf ("\u0025\u0076",*_ea .UriAttr )});};if _ea .ManifestLocationAttr !=nil {start .Attr =append (start .Attr ,_b .Attr {Name :_b .Name {Local :"\u006d\u0061\u003a\u006dan\u0069\u0066\u0065\u0073\u0074\u004c\u006f\u0063\u0061\u0074\u0069\u006f\u006e"},Value :_bf .Sprintf ("\u0025\u0076",*_ea .ManifestLocationAttr )});};if _ea .SchemaLocationAttr !=nil {start .Attr =append (start .Attr ,_b .Attr {Name :_b .Name {Local :"\u006d\u0061\u003a\u0073\u0063\u0068\u0065\u006d\u0061\u004c\u006f\u0063a\u0074\u0069\u006f\u006e"},Value :_bf .Sprintf ("\u0025\u0076",*_ea .SchemaLocationAttr )});};if _ea .SchemaLanguageAttr !=nil {start .Attr =append (start .Attr ,_b .Attr {Name :_b .Name {Local :"\u006d\u0061\u003a\u0073\u0063\u0068\u0065\u006d\u0061\u004c\u0061\u006eg\u0075\u0061\u0067\u0065"},Value :_bf .Sprintf ("\u0025\u0076",*_ea .SchemaLanguageAttr )});};e .EncodeToken (start );e .EncodeToken (_b .EndElement {Name :start .Name });return nil ;};func (_be *CT_SchemaLibrary )UnmarshalXML (d *_b .Decoder ,start _b .StartElement )error {_ed :for {_gag ,_fa :=d .Token ();if _fa !=nil {return _fa ;};switch _edc :=_gag .(type ){case _b .StartElement :switch _edc .Name {case _b .Name {Space :"\u0068\u0074\u0074\u0070:\u002f\u002f\u0073\u0063\u0068\u0065\u006d\u0061\u0073.\u006f\u0070\u0065\u006e\u0078\u006d\u006c\u0066\u006f\u0072\u006d\u0061\u0074\u0073\u002e\u006f\u0072\u0067/\u0073\u0063\u0068\u0065\u006da\u004c\u0069\u0062\u0072\u0061\u0072\u0079\u002f\u0032\u0030\u0030\u0036\u002f\u006d\u0061\u0069\u006e",Local :"\u0073\u0063\u0068\u0065\u006d\u0061"}:_dc :=NewCT_Schema ();if _ab :=d .DecodeElement (_dc ,&_edc );_ab !=nil {return _ab ;};_be .Schema =append (_be .Schema ,_dc );default:_g .Log .Debug ("\u0073\u006b\u0069\u0070\u0070i\u006e\u0067\u0020\u0075\u006e\u0073\u0075\u0070\u0070\u006f\u0072\u0074\u0065d\u0020\u0065\u006c\u0065\u006d\u0065\u006e\u0074\u0020\u006f\u006e\u0020\u0043\u0054\u005f\u0053\u0063\u0068\u0065\u006d\u0061\u004c\u0069\u0062\u0072\u0061\u0072\u0079\u0020\u0025v",_edc .Name );if _ba :=d .Skip ();_ba !=nil {return _ba ;};};case _b .EndElement :break _ed ;case _b .CharData :};};return nil ;};func (_eb *CT_SchemaLibrary )MarshalXML (e *_b .Encoder ,start _b .StartElement )error {e .EncodeToken (start );if _eb .Schema !=nil {_fd :=_b .StartElement {Name :_b .Name {Local :"\u006da\u003a\u0073\u0063\u0068\u0065\u006da"}};for _ ,_dad :=range _eb .Schema {e .EncodeElement (_dad ,_fd );};};e .EncodeToken (_b .EndElement {Name :start .Name });return nil ;};func NewCT_Schema ()*CT_Schema {_ga :=&CT_Schema {};return _ga };func (_d *CT_Schema )UnmarshalXML (d *_b .Decoder ,start _b .StartElement )error {for _ ,_gb :=range start .Attr {if _gb .Name .Local =="\u0075\u0072\u0069"{_de ,_c :=_gb .Value ,error (nil );if _c !=nil {return _c ;};_d .UriAttr =&_de ;continue ;};if _gb .Name .Local =="\u006d\u0061n\u0069\u0066\u0065s\u0074\u004c\u006f\u0063\u0061\u0074\u0069\u006f\u006e"{_bc ,_gg :=_gb .Value ,error (nil );if _gg !=nil {return _gg ;};_d .ManifestLocationAttr =&_bc ;continue ;};if _gb .Name .Local =="\u0073\u0063\u0068\u0065\u006d\u0061\u004c\u006f\u0063a\u0074\u0069\u006f\u006e"{_a ,_da :=_gb .Value ,error (nil );if _da !=nil {return _da ;};_d .SchemaLocationAttr =&_a ;continue ;};if _gb .Name .Local =="\u0073\u0063\u0068\u0065\u006d\u0061\u004c\u0061\u006eg\u0075\u0061\u0067\u0065"{_ca ,_dag :=_gb .Value ,error (nil );if _dag !=nil {return _dag ;};_d .SchemaLanguageAttr =&_ca ;continue ;};};for {_dec ,_ef :=d .Token ();if _ef !=nil {return _bf .Errorf ("p\u0061\u0072\u0073\u0069ng\u0020C\u0054\u005f\u0053\u0063\u0068e\u006d\u0061\u003a\u0020\u0025\u0073",_ef );};if _db ,_gc :=_dec .(_b .EndElement );_gc &&_db .Name ==start .Name {break ;};};return nil ;};type CT_Schema struct{UriAttr *string ;ManifestLocationAttr *string ;SchemaLocationAttr *string ;SchemaLanguageAttr *string ;};func NewSchemaLibrary ()*SchemaLibrary {_ae :=&SchemaLibrary {};_ae .CT_SchemaLibrary =*NewCT_SchemaLibrary ();return _ae ;};
// Validate validates the CT_Schema and its children
func (_fg *CT_Schema )Validate ()error {return _fg .ValidateWithPath ("\u0043T\u005f\u0053\u0063\u0068\u0065\u006da");};
// ValidateWithPath validates the CT_Schema and its children, prefixing error messages with path
func (_gdg *CT_Schema )ValidateWithPath (path string )error {return nil };func (_ad *SchemaLibrary )MarshalXML (e *_b .Encoder ,start _b .StartElement )error {start .Attr =append (start .Attr ,_b .Attr {Name :_b .Name {Local :"\u0078\u006d\u006cn\u0073"},Value :"\u0068\u0074\u0074\u0070:\u002f\u002f\u0073\u0063\u0068\u0065\u006d\u0061\u0073.\u006f\u0070\u0065\u006e\u0078\u006d\u006c\u0066\u006f\u0072\u006d\u0061\u0074\u0073\u002e\u006f\u0072\u0067/\u0073\u0063\u0068\u0065\u006da\u004c\u0069\u0062\u0072\u0061\u0072\u0079\u002f\u0032\u0030\u0030\u0036\u002f\u006d\u0061\u0069\u006e"});start .Attr =append (start .Attr ,_b .Attr {Name :_b .Name {Local :"\u0078\u006d\u006c\u006e\u0073\u003a\u006d\u0061"},Value :"\u0068\u0074\u0074\u0070:\u002f\u002f\u0073\u0063\u0068\u0065\u006d\u0061\u0073.\u006f\u0070\u0065\u006e\u0078\u006d\u006c\u0066\u006f\u0072\u006d\u0061\u0074\u0073\u002e\u006f\u0072\u0067/\u0073\u0063\u0068\u0065\u006da\u004c\u0069\u0062\u0072\u0061\u0072\u0079\u002f\u0032\u0030\u0030\u0036\u002f\u006d\u0061\u0069\u006e"});start .Attr =append (start .Attr ,_b .Attr {Name :_b .Name {Local :"\u0078m\u006c\u006e\u0073\u003a\u0078\u006dl"},Value :"\u0068\u0074tp\u003a\u002f\u002fw\u0077\u0077\u002e\u00773.o\u0072g/\u0058\u004d\u004c\u002f\u0031\u0039\u00398/\u006e\u0061\u006d\u0065\u0073\u0070\u0061c\u0065"});start .Name .Local ="\u006d\u0061:\u0073\u0063\u0068e\u006d\u0061\u004c\u0069\u0062\u0072\u0061\u0072\u0079";return _ad .CT_SchemaLibrary .MarshalXML (e ,start );};type SchemaLibrary struct{CT_SchemaLibrary };type CT_SchemaLibrary struct{Schema []*CT_Schema ;};func (_eg *SchemaLibrary )UnmarshalXML (d *_b .Decoder ,start _b .StartElement )error {_eg .CT_SchemaLibrary =*NewCT_SchemaLibrary ();_cea :for {_dbd ,_dg :=d .Token ();if _dg !=nil {return _dg ;};switch _dbdd :=_dbd .(type ){case _b .StartElement :switch _dbdd .Name {case _b .Name {Space :"\u0068\u0074\u0074\u0070:\u002f\u002f\u0073\u0063\u0068\u0065\u006d\u0061\u0073.\u006f\u0070\u0065\u006e\u0078\u006d\u006c\u0066\u006f\u0072\u006d\u0061\u0074\u0073\u002e\u006f\u0072\u0067/\u0073\u0063\u0068\u0065\u006da\u004c\u0069\u0062\u0072\u0061\u0072\u0079\u002f\u0032\u0030\u0030\u0036\u002f\u006d\u0061\u0069\u006e",Local :"\u0073\u0063\u0068\u0065\u006d\u0061"}:_ega :=NewCT_Schema ();if _bcd :=d .DecodeElement (_ega ,&_dbdd );_bcd !=nil {return _bcd ;};_eg .Schema =append (_eg .Schema ,_ega );default:_g .Log .Debug ("\u0073\u006b\u0069\u0070\u0070\u0069\u006e\u0067 \u0075\u006e\u0073up\u0070\u006f\u0072\u0074\u0065\u0064 \u0065\u006c\u0065\u006d\u0065\u006e\u0074\u0020\u006f\u006e\u0020\u0053\u0063\u0068\u0065m\u0061\u004c\u0069\u0062\u0072\u0061\u0072\u0079 \u0025\u0076",_dbdd .Name );if _fe :=d .Skip ();_fe !=nil {return _fe ;};};case _b .EndElement :break _cea ;case _b .CharData :};};return nil ;};
// Validate validates the CT_SchemaLibrary and its children
func (_beb *CT_SchemaLibrary )Validate ()error {return _beb .ValidateWithPath ("\u0043\u0054_\u0053\u0063\u0068e\u006d\u0061\u004c\u0069\u0062\u0072\u0061\u0072\u0079");};func NewCT_SchemaLibrary ()*CT_SchemaLibrary {_dbf :=&CT_SchemaLibrary {};return _dbf };
// ValidateWithPath validates the SchemaLibrary and its children, prefixing error messages with path
func (_gdb *SchemaLibrary )ValidateWithPath (path string )error {if _bag :=_gdb .CT_SchemaLibrary .ValidateWithPath (path );_bag !=nil {return _bag ;};return nil ;};
func (_ad *SchemaLibrary )Validate ()error {return _ad .ValidateWithPath ("\u0053\u0063\u0068\u0065\u006d\u0061\u004c\u0069\u0062\u0072\u0061\u0072\u0079");};
// ValidateWithPath validates the CT_SchemaLibrary and its children, prefixing error messages with path
func (_cf *CT_SchemaLibrary )ValidateWithPath (path string )error {for _gab ,_edce :=range _cf .Schema {if _ce :=_edce .ValidateWithPath (_bf .Sprintf ("\u0025\u0073\u002f\u0053\u0063\u0068\u0065\u006d\u0061\u005b\u0025\u0064\u005d",path ,_gab ));_ce !=nil {return _ce ;};};return nil ;};func init (){_e .RegisterConstructor ("\u0068\u0074\u0074\u0070:\u002f\u002f\u0073\u0063\u0068\u0065\u006d\u0061\u0073.\u006f\u0070\u0065\u006e\u0078\u006d\u006c\u0066\u006f\u0072\u006d\u0061\u0074\u0073\u002e\u006f\u0072\u0067/\u0073\u0063\u0068\u0065\u006da\u004c\u0069\u0062\u0072\u0061\u0072\u0079\u002f\u0032\u0030\u0030\u0036\u002f\u006d\u0061\u0069\u006e","\u0043T\u005f\u0053\u0063\u0068\u0065\u006da",NewCT_Schema );_e .RegisterConstructor ("\u0068\u0074\u0074\u0070:\u002f\u002f\u0073\u0063\u0068\u0065\u006d\u0061\u0073.\u006f\u0070\u0065\u006e\u0078\u006d\u006c\u0066\u006f\u0072\u006d\u0061\u0074\u0073\u002e\u006f\u0072\u0067/\u0073\u0063\u0068\u0065\u006da\u004c\u0069\u0062\u0072\u0061\u0072\u0079\u002f\u0032\u0030\u0030\u0036\u002f\u006d\u0061\u0069\u006e","\u0043\u0054_\u0053\u0063\u0068e\u006d\u0061\u004c\u0069\u0062\u0072\u0061\u0072\u0079",NewCT_SchemaLibrary );_e .RegisterConstructor ("\u0068\u0074\u0074\u0070:\u002f\u002f\u0073\u0063\u0068\u0065\u006d\u0061\u0073.\u006f\u0070\u0065\u006e\u0078\u006d\u006c\u0066\u006f\u0072\u006d\u0061\u0074\u0073\u002e\u006f\u0072\u0067/\u0073\u0063\u0068\u0065\u006da\u004c\u0069\u0062\u0072\u0061\u0072\u0079\u002f\u0032\u0030\u0030\u0036\u002f\u006d\u0061\u0069\u006e","\u0073\u0063\u0068\u0065\u006d\u0061\u004c\u0069\u0062\u0072\u0061\u0072\u0079",NewSchemaLibrary );};
func (_bag *CT_SchemaLibrary )ValidateWithPath (path string )error {for _aff ,_cg :=range _bag .Schema {if _bc :=_cg .ValidateWithPath (_d .Sprintf ("\u0025\u0073\u002f\u0053\u0063\u0068\u0065\u006d\u0061\u005b\u0025\u0064\u005d",path ,_aff ));_bc !=nil {return _bc ;};};return nil ;};func (_fde *SchemaLibrary )MarshalXML (e *_e .Encoder ,start _e .StartElement )error {start .Attr =append (start .Attr ,_e .Attr {Name :_e .Name {Local :"\u0078\u006d\u006cn\u0073"},Value :"\u0068\u0074\u0074\u0070:\u002f\u002f\u0073\u0063\u0068\u0065\u006d\u0061\u0073.\u006f\u0070\u0065\u006e\u0078\u006d\u006c\u0066\u006f\u0072\u006d\u0061\u0074\u0073\u002e\u006f\u0072\u0067/\u0073\u0063\u0068\u0065\u006da\u004c\u0069\u0062\u0072\u0061\u0072\u0079\u002f\u0032\u0030\u0030\u0036\u002f\u006d\u0061\u0069\u006e"});start .Attr =append (start .Attr ,_e .Attr {Name :_e .Name {Local :"\u0078\u006d\u006c\u006e\u0073\u003a\u006d\u0061"},Value :"\u0068\u0074\u0074\u0070:\u002f\u002f\u0073\u0063\u0068\u0065\u006d\u0061\u0073.\u006f\u0070\u0065\u006e\u0078\u006d\u006c\u0066\u006f\u0072\u006d\u0061\u0074\u0073\u002e\u006f\u0072\u0067/\u0073\u0063\u0068\u0065\u006da\u004c\u0069\u0062\u0072\u0061\u0072\u0079\u002f\u0032\u0030\u0030\u0036\u002f\u006d\u0061\u0069\u006e"});start .Attr =append (start .Attr ,_e .Attr {Name :_e .Name {Local :"\u0078m\u006c\u006e\u0073\u003a\u0078\u006dl"},Value :"\u0068\u0074tp\u003a\u002f\u002fw\u0077\u0077\u002e\u00773.o\u0072g/\u0058\u004d\u004c\u002f\u0031\u0039\u00398/\u006e\u0061\u006d\u0065\u0073\u0070\u0061c\u0065"});start .Name .Local ="\u006d\u0061:\u0073\u0063\u0068e\u006d\u0061\u004c\u0069\u0062\u0072\u0061\u0072\u0079";return _fde .CT_SchemaLibrary .MarshalXML (e ,start );};func (_ea *CT_Schema )UnmarshalXML (d *_e .Decoder ,start _e .StartElement )error {for _ ,_g :=range start .Attr {if _g .Name .Local =="\u0075\u0072\u0069"{_gf ,_ec :=_g .Value ,error (nil );if _ec !=nil {return _ec ;};_ea .UriAttr =&_gf ;continue ;};if _g .Name .Local =="\u006d\u0061n\u0069\u0066\u0065s\u0074\u004c\u006f\u0063\u0061\u0074\u0069\u006f\u006e"{_eag ,_c :=_g .Value ,error (nil );if _c !=nil {return _c ;};_ea .ManifestLocationAttr =&_eag ;continue ;};if _g .Name .Local =="\u0073\u0063\u0068\u0065\u006d\u0061\u004c\u006f\u0063a\u0074\u0069\u006f\u006e"{_gb ,_cd :=_g .Value ,error (nil );if _cd !=nil {return _cd ;};_ea .SchemaLocationAttr =&_gb ;continue ;};if _g .Name .Local =="\u0073\u0063\u0068\u0065\u006d\u0061\u004c\u0061\u006eg\u0075\u0061\u0067\u0065"{_ae ,_af :=_g .Value ,error (nil );if _af !=nil {return _af ;};_ea .SchemaLanguageAttr =&_ae ;continue ;};};for {_ce ,_ba :=d .Token ();if _ba !=nil {return _d .Errorf ("p\u0061\u0072\u0073\u0069ng\u0020C\u0054\u005f\u0053\u0063\u0068e\u006d\u0061\u003a\u0020\u0025\u0073",_ba );};if _ff ,_de :=_ce .(_e .EndElement );_de &&_ff .Name ==start .Name {break ;};};return nil ;};func NewCT_Schema ()*CT_Schema {_b :=&CT_Schema {};return _b };func (_fd *CT_Schema )MarshalXML (e *_e .Encoder ,start _e .StartElement )error {if _fd .UriAttr !=nil {start .Attr =append (start .Attr ,_e .Attr {Name :_e .Name {Local :"\u006d\u0061\u003a\u0075\u0072\u0069"},Value :_d .Sprintf ("\u0025\u0076",*_fd .UriAttr )});};if _fd .ManifestLocationAttr !=nil {start .Attr =append (start .Attr ,_e .Attr {Name :_e .Name {Local :"\u006d\u0061\u003a\u006dan\u0069\u0066\u0065\u0073\u0074\u004c\u006f\u0063\u0061\u0074\u0069\u006f\u006e"},Value :_d .Sprintf ("\u0025\u0076",*_fd .ManifestLocationAttr )});};if _fd .SchemaLocationAttr !=nil {start .Attr =append (start .Attr ,_e .Attr {Name :_e .Name {Local :"\u006d\u0061\u003a\u0073\u0063\u0068\u0065\u006d\u0061\u004c\u006f\u0063a\u0074\u0069\u006f\u006e"},Value :_d .Sprintf ("\u0025\u0076",*_fd .SchemaLocationAttr )});};if _fd .SchemaLanguageAttr !=nil {start .Attr =append (start .Attr ,_e .Attr {Name :_e .Name {Local :"\u006d\u0061\u003a\u0073\u0063\u0068\u0065\u006d\u0061\u004c\u0061\u006eg\u0075\u0061\u0067\u0065"},Value :_d .Sprintf ("\u0025\u0076",*_fd .SchemaLanguageAttr )});};e .EncodeToken (start );e .EncodeToken (_e .EndElement {Name :start .Name });return nil ;};type SchemaLibrary struct{CT_SchemaLibrary };func NewSchemaLibrary ()*SchemaLibrary {_cgc :=&SchemaLibrary {};_cgc .CT_SchemaLibrary =*NewCT_SchemaLibrary ();return _cgc ;};type CT_SchemaLibrary struct{Schema []*CT_Schema ;};
// Validate validates the CT_SchemaLibrary and its children
func (_ece *CT_SchemaLibrary )Validate ()error {return _ece .ValidateWithPath ("\u0043\u0054_\u0053\u0063\u0068e\u006d\u0061\u004c\u0069\u0062\u0072\u0061\u0072\u0079");};
// ValidateWithPath validates the SchemaLibrary and its children, prefixing error messages with path
func (_afd *SchemaLibrary )ValidateWithPath (path string )error {if _fcg :=_afd .CT_SchemaLibrary .ValidateWithPath (path );_fcg !=nil {return _fcg ;};return nil ;};type CT_Schema struct{UriAttr *string ;ManifestLocationAttr *string ;SchemaLocationAttr *string ;SchemaLanguageAttr *string ;};
// Validate validates the CT_Schema and its children
func (_aed *CT_Schema )Validate ()error {return _aed .ValidateWithPath ("\u0043T\u005f\u0053\u0063\u0068\u0065\u006da");};func (_ac *CT_SchemaLibrary )UnmarshalXML (d *_e .Decoder ,start _e .StartElement )error {_db :for {_da ,_ed :=d .Token ();if _ed !=nil {return _ed ;};switch _fe :=_da .(type ){case _e .StartElement :switch _fe .Name {case _e .Name {Space :"\u0068\u0074\u0074\u0070:\u002f\u002f\u0073\u0063\u0068\u0065\u006d\u0061\u0073.\u006f\u0070\u0065\u006e\u0078\u006d\u006c\u0066\u006f\u0072\u006d\u0061\u0074\u0073\u002e\u006f\u0072\u0067/\u0073\u0063\u0068\u0065\u006da\u004c\u0069\u0062\u0072\u0061\u0072\u0079\u002f\u0032\u0030\u0030\u0036\u002f\u006d\u0061\u0069\u006e",Local :"\u0073\u0063\u0068\u0065\u006d\u0061"}:_baa :=NewCT_Schema ();if _cb :=d .DecodeElement (_baa ,&_fe );_cb !=nil {return _cb ;};_ac .Schema =append (_ac .Schema ,_baa );default:_eb .Log .Debug ("\u0073\u006b\u0069\u0070\u0070i\u006e\u0067\u0020\u0075\u006e\u0073\u0075\u0070\u0070\u006f\u0072\u0074\u0065d\u0020\u0065\u006c\u0065\u006d\u0065\u006e\u0074\u0020\u006f\u006e\u0020\u0043\u0054\u005f\u0053\u0063\u0068\u0065\u006d\u0061\u004c\u0069\u0062\u0072\u0061\u0072\u0079\u0020\u0025v",_fe .Name );if _gbg :=d .Skip ();_gbg !=nil {return _gbg ;};};case _e .EndElement :break _db ;case _e .CharData :};};return nil ;};func NewCT_SchemaLibrary ()*CT_SchemaLibrary {_ef :=&CT_SchemaLibrary {};return _ef };func (_ee *CT_SchemaLibrary )MarshalXML (e *_e .Encoder ,start _e .StartElement )error {e .EncodeToken (start );if _ee .Schema !=nil {_fc :=_e .StartElement {Name :_e .Name {Local :"\u006da\u003a\u0073\u0063\u0068\u0065\u006da"}};for _ ,_df :=range _ee .Schema {e .EncodeElement (_df ,_fc );};};e .EncodeToken (_e .EndElement {Name :start .Name });return nil ;};
// ValidateWithPath validates the CT_Schema and its children, prefixing error messages with path
func (_cea *CT_Schema )ValidateWithPath (path string )error {return nil };func (_eg *SchemaLibrary )UnmarshalXML (d *_e .Decoder ,start _e .StartElement )error {_eg .CT_SchemaLibrary =*NewCT_SchemaLibrary ();_ege :for {_dea ,_ga :=d .Token ();if _ga !=nil {return _ga ;};switch _ceg :=_dea .(type ){case _e .StartElement :switch _ceg .Name {case _e .Name {Space :"\u0068\u0074\u0074\u0070:\u002f\u002f\u0073\u0063\u0068\u0065\u006d\u0061\u0073.\u006f\u0070\u0065\u006e\u0078\u006d\u006c\u0066\u006f\u0072\u006d\u0061\u0074\u0073\u002e\u006f\u0072\u0067/\u0073\u0063\u0068\u0065\u006da\u004c\u0069\u0062\u0072\u0061\u0072\u0079\u002f\u0032\u0030\u0030\u0036\u002f\u006d\u0061\u0069\u006e",Local :"\u0073\u0063\u0068\u0065\u006d\u0061"}:_gfg :=NewCT_Schema ();if _dfb :=d .DecodeElement (_gfg ,&_ceg );_dfb !=nil {return _dfb ;};_eg .Schema =append (_eg .Schema ,_gfg );default:_eb .Log .Debug ("\u0073\u006b\u0069\u0070\u0070\u0069\u006e\u0067 \u0075\u006e\u0073up\u0070\u006f\u0072\u0074\u0065\u0064 \u0065\u006c\u0065\u006d\u0065\u006e\u0074\u0020\u006f\u006e\u0020\u0053\u0063\u0068\u0065m\u0061\u004c\u0069\u0062\u0072\u0061\u0072\u0079 \u0025\u0076",_ceg .Name );if _cdg :=d .Skip ();_cdg !=nil {return _cdg ;};};case _e .EndElement :break _ege ;case _e .CharData :};};return nil ;};func init (){_a .RegisterConstructor ("\u0068\u0074\u0074\u0070:\u002f\u002f\u0073\u0063\u0068\u0065\u006d\u0061\u0073.\u006f\u0070\u0065\u006e\u0078\u006d\u006c\u0066\u006f\u0072\u006d\u0061\u0074\u0073\u002e\u006f\u0072\u0067/\u0073\u0063\u0068\u0065\u006da\u004c\u0069\u0062\u0072\u0061\u0072\u0079\u002f\u0032\u0030\u0030\u0036\u002f\u006d\u0061\u0069\u006e","\u0043T\u005f\u0053\u0063\u0068\u0065\u006da",NewCT_Schema );_a .RegisterConstructor ("\u0068\u0074\u0074\u0070:\u002f\u002f\u0073\u0063\u0068\u0065\u006d\u0061\u0073.\u006f\u0070\u0065\u006e\u0078\u006d\u006c\u0066\u006f\u0072\u006d\u0061\u0074\u0073\u002e\u006f\u0072\u0067/\u0073\u0063\u0068\u0065\u006da\u004c\u0069\u0062\u0072\u0061\u0072\u0079\u002f\u0032\u0030\u0030\u0036\u002f\u006d\u0061\u0069\u006e","\u0043\u0054_\u0053\u0063\u0068e\u006d\u0061\u004c\u0069\u0062\u0072\u0061\u0072\u0079",NewCT_SchemaLibrary );_a .RegisterConstructor ("\u0068\u0074\u0074\u0070:\u002f\u002f\u0073\u0063\u0068\u0065\u006d\u0061\u0073.\u006f\u0070\u0065\u006e\u0078\u006d\u006c\u0066\u006f\u0072\u006d\u0061\u0074\u0073\u002e\u006f\u0072\u0067/\u0073\u0063\u0068\u0065\u006da\u004c\u0069\u0062\u0072\u0061\u0072\u0079\u002f\u0032\u0030\u0030\u0036\u002f\u006d\u0061\u0069\u006e","\u0073\u0063\u0068\u0065\u006d\u0061\u004c\u0069\u0062\u0072\u0061\u0072\u0079",NewSchemaLibrary );};

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -9,28 +9,28 @@
// Use of this source code is governed by the UniDoc End User License Agreement
// terms that can be accessed at https://unidoc.io/eula/
package powerpoint ;import (_c "encoding/xml";_f "fmt";_gg "github.com/unidoc/unioffice";);type CT_Empty struct{};func (_ec *CT_Empty )MarshalXML (e *_c .Encoder ,start _c .StartElement )error {e .EncodeToken (start );e .EncodeToken (_c .EndElement {Name :start .Name });return nil ;};func NewCT_Empty ()*CT_Empty {_e :=&CT_Empty {};return _e };func (_bea *Iscomment )MarshalXML (e *_c .Encoder ,start _c .StartElement )error {start .Attr =append (start .Attr ,_c .Attr {Name :_c .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 ,_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 ="\u0069s\u0063\u006f\u006d\u006d\u0065\u006et";return _bea .CT_Empty .MarshalXML (e ,start );};func (_bc *CT_Rel )MarshalXML (e *_c .Encoder ,start _c .StartElement )error {if _bc .IdAttr !=nil {start .Attr =append (start .Attr ,_c .Attr {Name :_c .Name {Local :"\u0069\u0064"},Value :_f .Sprintf ("\u0025\u0076",*_bc .IdAttr )});};e .EncodeToken (start );e .EncodeToken (_c .EndElement {Name :start .Name });return nil ;};func (_cde *Textdata )MarshalXML (e *_c .Encoder ,start _c .StartElement )error {start .Attr =append (start .Attr ,_c .Attr {Name :_c .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 ,_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 ="\u0074\u0065\u0078\u0074\u0064\u0061\u0074\u0061";return _cde .CT_Rel .MarshalXML (e ,start );};
// ValidateWithPath validates the Iscomment and its children, prefixing error messages with path
func (_fa *Iscomment )ValidateWithPath (path string )error {if _af :=_fa .CT_Empty .ValidateWithPath (path );_af !=nil {return _af ;};return nil ;};
// ValidateWithPath validates the Textdata and its children, prefixing error messages with path
func (_ee *Textdata )ValidateWithPath (path string )error {if _da :=_ee .CT_Rel .ValidateWithPath (path );_da !=nil {return _da ;};return nil ;};
// Validate validates the Textdata and its children
func (_cad *Textdata )Validate ()error {return _cad .ValidateWithPath ("\u0054\u0065\u0078\u0074\u0064\u0061\u0074\u0061");};func (_dg *Iscomment )UnmarshalXML (d *_c .Decoder ,start _c .StartElement )error {_dg .CT_Empty =*NewCT_Empty ();for {_ce ,_fc :=d .Token ();if _fc !=nil {return _f .Errorf ("p\u0061\u0072\u0073\u0069ng\u0020I\u0073\u0063\u006f\u006d\u006de\u006e\u0074\u003a\u0020\u0025\u0073",_fc );};if _ba ,_fdb :=_ce .(_c .EndElement );_fdb &&_ba .Name ==start .Name {break ;};};return nil ;};func NewCT_Rel ()*CT_Rel {_eg :=&CT_Rel {};return _eg };
// ValidateWithPath validates the CT_Empty and its children, prefixing error messages with path
func (_bg *CT_Empty )ValidateWithPath (path string )error {return nil };type Iscomment struct{CT_Empty };type CT_Rel struct{IdAttr *string ;};func (_dd *Textdata )UnmarshalXML (d *_c .Decoder ,start _c .StartElement )error {_dd .CT_Rel =*NewCT_Rel ();for _ ,_dc :=range start .Attr {if _dc .Name .Local =="\u0069\u0064"{_bcf ,_ca :=_dc .Value ,error (nil );if _ca !=nil {return _ca ;};_dd .IdAttr =&_bcf ;continue ;};};for {_fag ,_dga :=d .Token ();if _dga !=nil {return _f .Errorf ("p\u0061r\u0073\u0069\u006e\u0067\u0020\u0054\u0065\u0078t\u0064\u0061\u0074\u0061: \u0025\u0073",_dga );};if _aec ,_ga :=_fag .(_c .EndElement );_ga &&_aec .Name ==start .Name {break ;};};return nil ;};func (_a *CT_Empty )UnmarshalXML (d *_c .Decoder ,start _c .StartElement )error {for {_gb ,_aa :=d .Token ();if _aa !=nil {return _f .Errorf ("p\u0061r\u0073\u0069\u006e\u0067\u0020\u0043\u0054\u005fE\u006d\u0070\u0074\u0079: \u0025\u0073",_aa );};if _ge ,_ab :=_gb .(_c .EndElement );_ab &&_ge .Name ==start .Name {break ;};};return nil ;};
// ValidateWithPath validates the CT_Rel and its children, prefixing error messages with path
func (_ae *CT_Rel )ValidateWithPath (path string )error {return nil };func NewTextdata ()*Textdata {_aab :=&Textdata {};_aab .CT_Rel =*NewCT_Rel ();return _aab };
// Validate validates the CT_Rel and its children
func (_fb *CT_Rel )Validate ()error {return _fb .ValidateWithPath ("\u0043\u0054\u005f\u0052\u0065\u006c");};func (_fe *CT_Rel )UnmarshalXML (d *_c .Decoder ,start _c .StartElement )error {for _ ,_ef :=range start .Attr {if _ef .Name .Local =="\u0069\u0064"{_cd ,_gee :=_ef .Value ,error (nil );if _gee !=nil {return _gee ;};_fe .IdAttr =&_cd ;continue ;};};for {_ag ,_d :=d .Token ();if _d !=nil {return _f .Errorf ("\u0070a\u0072s\u0069\u006e\u0067\u0020\u0043T\u005f\u0052e\u006c\u003a\u0020\u0025\u0073",_d );};if _bd ,_fd :=_ag .(_c .EndElement );_fd &&_bd .Name ==start .Name {break ;};};return nil ;};func NewIscomment ()*Iscomment {_be :=&Iscomment {};_be .CT_Empty =*NewCT_Empty ();return _be };type Textdata struct{CT_Rel };
package powerpoint ;import (_b "encoding/xml";_d "fmt";_f "github.com/unidoc/unioffice";);
// Validate validates the CT_Empty and its children
func (_b *CT_Empty )Validate ()error {return _b .ValidateWithPath ("\u0043\u0054\u005f\u0045\u006d\u0070\u0074\u0079");};
func (_e *CT_Empty )Validate ()error {return _e .ValidateWithPath ("\u0043\u0054\u005f\u0045\u006d\u0070\u0074\u0079");};func NewIscomment ()*Iscomment {_aea :=&Iscomment {};_aea .CT_Empty =*NewCT_Empty ();return _aea };func (_bd *CT_Rel )UnmarshalXML (d *_b .Decoder ,start _b .StartElement )error {for _ ,_afa :=range start .Attr {if _afa .Name .Local =="\u0069\u0064"{_fc ,_dd :=_afa .Value ,error (nil );if _dd !=nil {return _dd ;};_bd .IdAttr =&_fc ;continue ;};};for {_dg ,_ae :=d .Token ();if _ae !=nil {return _d .Errorf ("\u0070a\u0072s\u0069\u006e\u0067\u0020\u0043T\u005f\u0052e\u006c\u003a\u0020\u0025\u0073",_ae );};if _cc ,_gg :=_dg .(_b .EndElement );_gg &&_cc .Name ==start .Name {break ;};};return nil ;};func (_ga *Iscomment )UnmarshalXML (d *_b .Decoder ,start _b .StartElement )error {_ga .CT_Empty =*NewCT_Empty ();for {_eg ,_ea :=d .Token ();if _ea !=nil {return _d .Errorf ("p\u0061\u0072\u0073\u0069ng\u0020I\u0073\u0063\u006f\u006d\u006de\u006e\u0074\u003a\u0020\u0025\u0073",_ea );};if _gd ,_fe :=_eg .(_b .EndElement );_fe &&_gd .Name ==start .Name {break ;};};return nil ;};type CT_Rel struct{IdAttr *string ;};
// Validate validates the Iscomment and its children
func (_aae *Iscomment )Validate ()error {return _aae .ValidateWithPath ("\u0049s\u0063\u006f\u006d\u006d\u0065\u006et");};func init (){_gg .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 );_gg .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 );_gg .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 );_gg .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 (_ca *Iscomment )Validate ()error {return _ca .ValidateWithPath ("\u0049s\u0063\u006f\u006d\u006d\u0065\u006et");};type CT_Empty struct{};
// Validate validates the Textdata and its children
func (_acb *Textdata )Validate ()error {return _acb .ValidateWithPath ("\u0054\u0065\u0078\u0074\u0064\u0061\u0074\u0061");};
// ValidateWithPath validates the CT_Empty and its children, prefixing error messages with path
func (_fd *CT_Empty )ValidateWithPath (path string )error {return nil };func (_af *CT_Empty )UnmarshalXML (d *_b .Decoder ,start _b .StartElement )error {for {_db ,_g :=d .Token ();if _g !=nil {return _d .Errorf ("p\u0061r\u0073\u0069\u006e\u0067\u0020\u0043\u0054\u005fE\u006d\u0070\u0074\u0079: \u0025\u0073",_g );};if _ac ,_cg :=_db .(_b .EndElement );_cg &&_ac .Name ==start .Name {break ;};};return nil ;};func NewCT_Rel ()*CT_Rel {_dba :=&CT_Rel {};return _dba };type Textdata struct{CT_Rel };
// ValidateWithPath validates the CT_Rel and its children, prefixing error messages with path
func (_bg *CT_Rel )ValidateWithPath (path string )error {return nil };func NewCT_Empty ()*CT_Empty {_c :=&CT_Empty {};return _c };
// ValidateWithPath validates the Iscomment and its children, prefixing error messages with path
func (_eb *Iscomment )ValidateWithPath (path string )error {if _fg :=_eb .CT_Empty .ValidateWithPath (path );_fg !=nil {return _fg ;};return nil ;};func (_eaf *Textdata )MarshalXML (e *_b .Encoder ,start _b .StartElement )error {start .Attr =append (start .Attr ,_b .Attr {Name :_b .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 ,_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 ="\u0074\u0065\u0078\u0074\u0064\u0061\u0074\u0061";return _eaf .CT_Rel .MarshalXML (e ,start );};func (_cga *Textdata )UnmarshalXML (d *_b .Decoder ,start _b .StartElement )error {_cga .CT_Rel =*NewCT_Rel ();for _ ,_da :=range start .Attr {if _da .Name .Local =="\u0069\u0064"{_afb ,_cb :=_da .Value ,error (nil );if _cb !=nil {return _cb ;};_cga .IdAttr =&_afb ;continue ;};};for {_eafg ,_fca :=d .Token ();if _fca !=nil {return _d .Errorf ("p\u0061r\u0073\u0069\u006e\u0067\u0020\u0054\u0065\u0078t\u0064\u0061\u0074\u0061: \u0025\u0073",_fca );};if _bb ,_afbd :=_eafg .(_b .EndElement );_afbd &&_bb .Name ==start .Name {break ;};};return nil ;};func (_afg *CT_Rel )MarshalXML (e *_b .Encoder ,start _b .StartElement )error {if _afg .IdAttr !=nil {start .Attr =append (start .Attr ,_b .Attr {Name :_b .Name {Local :"\u0069\u0064"},Value :_d .Sprintf ("\u0025\u0076",*_afg .IdAttr )});};e .EncodeToken (start );e .EncodeToken (_b .EndElement {Name :start .Name });return nil ;};
// Validate validates the CT_Rel and its children
func (_fb *CT_Rel )Validate ()error {return _fb .ValidateWithPath ("\u0043\u0054\u005f\u0052\u0065\u006c");};func (_ff *CT_Empty )MarshalXML (e *_b .Encoder ,start _b .StartElement )error {e .EncodeToken (start );e .EncodeToken (_b .EndElement {Name :start .Name });return nil ;};
// ValidateWithPath validates the Textdata and its children, prefixing error messages with path
func (_ggd *Textdata )ValidateWithPath (path string )error {if _fdc :=_ggd .CT_Rel .ValidateWithPath (path );_fdc !=nil {return _fdc ;};return nil ;};func (_ad *Iscomment )MarshalXML (e *_b .Encoder ,start _b .StartElement )error {start .Attr =append (start .Attr ,_b .Attr {Name :_b .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 ,_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 ="\u0069s\u0063\u006f\u006d\u006d\u0065\u006et";return _ad .CT_Empty .MarshalXML (e ,start );};func NewTextdata ()*Textdata {_afgf :=&Textdata {};_afgf .CT_Rel =*NewCT_Rel ();return _afgf };type Iscomment struct{CT_Empty };func init (){_f .RegisterConstructor ("\u0075\u0072\u006e\u003a\u0073\u0063\u0068e\u006d\u0061\u0073-\u006d\u0069\u0063\u0072o\u0073\u006f\u0066\u0074\u002d\u0063\u006f\u006d\u003a\u006f\u0066\u0066\u0069\u0063\u0065\u003a\u0070\u006f\u0077\u0065\u0072\u0070\u006f\u0069\u006e\u0074","\u0043\u0054\u005f\u0045\u006d\u0070\u0074\u0079",NewCT_Empty );_f .RegisterConstructor ("\u0075\u0072\u006e\u003a\u0073\u0063\u0068e\u006d\u0061\u0073-\u006d\u0069\u0063\u0072o\u0073\u006f\u0066\u0074\u002d\u0063\u006f\u006d\u003a\u006f\u0066\u0066\u0069\u0063\u0065\u003a\u0070\u006f\u0077\u0065\u0072\u0070\u006f\u0069\u006e\u0074","\u0043\u0054\u005f\u0052\u0065\u006c",NewCT_Rel );_f .RegisterConstructor ("\u0075\u0072\u006e\u003a\u0073\u0063\u0068e\u006d\u0061\u0073-\u006d\u0069\u0063\u0072o\u0073\u006f\u0066\u0074\u002d\u0063\u006f\u006d\u003a\u006f\u0066\u0066\u0069\u0063\u0065\u003a\u0070\u006f\u0077\u0065\u0072\u0070\u006f\u0069\u006e\u0074","\u0069s\u0063\u006f\u006d\u006d\u0065\u006et",NewIscomment );_f .RegisterConstructor ("\u0075\u0072\u006e\u003a\u0073\u0063\u0068e\u006d\u0061\u0073-\u006d\u0069\u0063\u0072o\u0073\u006f\u0066\u0074\u002d\u0063\u006f\u006d\u003a\u006f\u0066\u0066\u0069\u0063\u0065\u003a\u0070\u006f\u0077\u0065\u0072\u0070\u006f\u0069\u006e\u0074","\u0074\u0065\u0078\u0074\u0064\u0061\u0074\u0061",NewTextdata );};

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -9,46 +9,46 @@
// Use of this source code is governed by the UniDoc End User License Agreement
// terms that can be accessed at https://unidoc.io/eula/
package reference ;import (_a "errors";_db "fmt";_c "github.com/unidoc/unioffice/spreadsheet/update";_aa "regexp";_b "strconv";_f "strings";);
// 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 _ ,_cfc :=range col {_ca *=26;_ca +=uint32 (_cfc -'A'+1);};return _ca -1;};var _bb =_aa .MustCompile ("^\u005b\u0061\u002d\u007aA-\u005a]\u0028\u005b\u0061\u002d\u007aA\u002d\u005a\u005d\u003f\u0029\u0024");
// Update updates reference to point one of the neighboring cells with respect to the update type after removing a row/column.
func (_cg *CellReference )Update (updateType _c .UpdateAction )*CellReference {switch updateType {case _c .UpdateActionRemoveColumn :_ee :=_cg ;_ee .ColumnIdx =_cg .ColumnIdx -1;_ee .Column =IndexToColumn (_ee .ColumnIdx );return _ee ;default:return _cg ;};};func _dd (_gdf string )(string ,string ,error ){_gg :="";_da :=_f .LastIndex (_gdf ,"\u0021");if _da > -1{_gg =_gdf [:_da ];_gdf =_gdf [_da +1:];if _gg ==""{return "","",_a .New ("\u0049n\u0076a\u006c\u0069\u0064\u0020\u0073h\u0065\u0065t\u0020\u006e\u0061\u006d\u0065");};};return _gg ,_gdf ,nil ;};
// CellReference is a parsed reference to a cell. Input is of the form 'A1',
// '$C$2', etc.
type CellReference struct{RowIdx uint32 ;ColumnIdx uint32 ;Column string ;AbsoluteColumn bool ;AbsoluteRow bool ;SheetName string ;};
// 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 {},_a .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");};_ce :=ColumnReference {};_ceg ,_gf ,_dbf :=_dd (s );if _dbf !=nil {return ColumnReference {},_dbf ;};if _ceg !=""{_ce .SheetName =_ceg ;};if _gf [0]=='$'{_ce .AbsoluteColumn =true ;_gf =_gf [1:];};if !_bb .MatchString (_gf ){return ColumnReference {},_a .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");};_ce .Column =_gf ;_ce .ColumnIdx =ColumnToIndex (_ce .Column );return _ce ,nil ;};
// ParseRangeReference splits a range reference of the form "A1:B5" into its
// components.
func ParseRangeReference (s string )(_df ,_de CellReference ,_dde error ){_bag ,_eed ,_dde :=_dd (s );if _dde !=nil {return CellReference {},CellReference {},_dde ;};_bcc :=_f .Split (_eed ,"\u003a");if len (_bcc )!=2{return CellReference {},CellReference {},_a .New ("i\u006ev\u0061\u006c\u0069\u0064\u0020\u0072\u0061\u006eg\u0065\u0020\u0066\u006frm\u0061\u0074");};if _bag !=""{_bcc [0]=_bag +"\u0021"+_bcc [0];_bcc [1]=_bag +"\u0021"+_bcc [1];};_ag ,_dde :=ParseCellReference (_bcc [0]);if _dde !=nil {return CellReference {},CellReference {},_dde ;};_eg ,_dde :=ParseCellReference (_bcc [1]);if _dde !=nil {return CellReference {},CellReference {},_dde ;};return _ag ,_eg ,nil ;};
// Update updates reference to point one of the neighboring columns with respect to the update type after removing a row/column.
func (_bcg *ColumnReference )Update (updateType _c .UpdateAction )*ColumnReference {switch updateType {case _c .UpdateActionRemoveColumn :_eec :=_bcg ;_eec .ColumnIdx =_bcg .ColumnIdx -1;_eec .Column =IndexToColumn (_eec .ColumnIdx );return _eec ;default:return _bcg ;};};
// String returns a string representation of ColumnReference.
func (_fd ColumnReference )String ()string {_dbb :=make ([]byte ,0,4);if _fd .AbsoluteColumn {_dbb =append (_dbb ,'$');};_dbb =append (_dbb ,_fd .Column ...);return string (_dbb );};
// IndexToColumn maps a column number to a column name (e.g. 0 = A, 1 = B, 26 = AA)
func IndexToColumn (col uint32 )string {var _abf [64+1]byte ;_eeb :=len (_abf );_fdd :=col ;const _cab =26;for _fdd >=_cab {_eeb --;_ccc :=_fdd /_cab ;_abf [_eeb ]=byte ('A'+uint (_fdd -_ccc *_cab ));_fdd =_ccc -1;};_eeb --;_abf [_eeb ]=byte ('A'+uint (_fdd ));return string (_abf [_eeb :]);};
package reference ;import (_f "errors";_ce "fmt";_a "github.com/unidoc/unioffice/spreadsheet/update";_e "regexp";_c "strconv";_g "strings";);var _ba =_e .MustCompile ("^\u005b\u0061\u002d\u007aA-\u005a]\u0028\u005b\u0061\u002d\u007aA\u002d\u005a\u005d\u003f\u0029\u0024");
// 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 {},_a .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");};_bc :=CellReference {};_g ,_fb ,_eb :=_dd (s );if _eb !=nil {return CellReference {},_eb ;};if _g !=""{_bc .SheetName =_g ;};if s [0]=='$'{_bc .AbsoluteColumn =true ;_fb =_fb [1:];};_cc :=-1;_ab :for _ga :=0;_ga < len (_fb );_ga ++{switch {case _fb [_ga ]>='0'&&_fb [_ga ]<='9'||_fb [_ga ]=='$':_cc =_ga ;break _ab ;};};switch _cc {case 0:return CellReference {},_db .Errorf ("\u006e\u006f\u0020\u006cet\u0074\u0065\u0072\u0020\u0070\u0072\u0065\u0066\u0069\u0078\u0020\u0069\u006e\u0020%\u0073",_fb );case -1:return CellReference {},_db .Errorf ("\u006eo\u0020d\u0069\u0067\u0069\u0074\u0073\u0020\u0069\u006e\u0020\u0025\u0073",_fb );};_bc .Column =_fb [0:_cc ];if _fb [_cc ]=='$'{_bc .AbsoluteRow =true ;_cc ++;};_bc .ColumnIdx =ColumnToIndex (_bc .Column );_gd ,_eb :=_b .ParseUint (_fb [_cc :],10,32);if _eb !=nil {return CellReference {},_db .Errorf ("e\u0072\u0072\u006f\u0072 p\u0061r\u0073\u0069\u006e\u0067\u0020r\u006f\u0077\u003a\u0020\u0025\u0073",_eb );};if _gd ==0{return CellReference {},_db .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");};_bc .RowIdx =uint32 (_gd );return _bc ,nil ;};
func ParseCellReference (s string )(CellReference ,error ){s =_g .TrimSpace (s );if len (s )< 2{return CellReference {},_f .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");};_fa :=CellReference {};_d ,_ge ,_fb :=_ca (s );if _fb !=nil {return CellReference {},_fb ;};if _d !=""{_fa .SheetName =_d ;};if s [0]=='$'{_fa .AbsoluteColumn =true ;_ge =_ge [1:];};_bf :=-1;_da :for _ac :=0;_ac < len (_ge );_ac ++{switch {case _ge [_ac ]>='0'&&_ge [_ac ]<='9'||_ge [_ac ]=='$':_bf =_ac ;break _da ;};};switch _bf {case 0:return CellReference {},_ce .Errorf ("\u006e\u006f\u0020\u006cet\u0074\u0065\u0072\u0020\u0070\u0072\u0065\u0066\u0069\u0078\u0020\u0069\u006e\u0020%\u0073",_ge );case -1:return CellReference {},_ce .Errorf ("\u006eo\u0020d\u0069\u0067\u0069\u0074\u0073\u0020\u0069\u006e\u0020\u0025\u0073",_ge );};_fa .Column =_ge [0:_bf ];if _ge [_bf ]=='$'{_fa .AbsoluteRow =true ;_bf ++;};_fa .ColumnIdx =ColumnToIndex (_fa .Column );_dg ,_fb :=_c .ParseUint (_ge [_bf :],10,32);if _fb !=nil {return CellReference {},_ce .Errorf ("e\u0072\u0072\u006f\u0072 p\u0061r\u0073\u0069\u006e\u0067\u0020r\u006f\u0077\u003a\u0020\u0025\u0073",_fb );};if _dg ==0{return CellReference {},_ce .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");};_fa .RowIdx =uint32 (_dg );return _fa ,nil ;};
// Update updates reference to point one of the neighboring cells with respect to the update type after removing a row/column.
func (_fc *CellReference )Update (updateType _a .UpdateAction )*CellReference {switch updateType {case _a .UpdateActionRemoveColumn :_fcf :=_fc ;_fcf .ColumnIdx =_fc .ColumnIdx -1;_fcf .Column =IndexToColumn (_fcf .ColumnIdx );return _fcf ;default:return _fc ;};};
// IndexToColumn maps a column number to a column name (e.g. 0 = A, 1 = B, 26 = AA)
func IndexToColumn (col uint32 )string {var _cf [64+1]byte ;_bb :=len (_cf );_ffb :=col ;const _cc =26;for _ffb >=_cc {_bb --;_gf :=_ffb /_cc ;_cf [_bb ]=byte ('A'+uint (_ffb -_gf *_cc ));_ffb =_gf -1;};_bb --;_cf [_bb ]=byte ('A'+uint (_ffb ));return string (_cf [_bb :]);};
// ColumnReference is a parsed reference to a column. Input is of the form 'A',
// '$C', etc.
type ColumnReference struct{ColumnIdx uint32 ;Column string ;AbsoluteColumn bool ;SheetName string ;};
// ParseRangeReference splits a range reference of the form "A1:B5" into its
// components.
func ParseRangeReference (s string )(_db ,_dd CellReference ,_cbb error ){_dcb ,_cd ,_cbb :=_ca (s );if _cbb !=nil {return CellReference {},CellReference {},_cbb ;};_gd :=_g .Split (_cd ,"\u003a");if len (_gd )!=2{return CellReference {},CellReference {},_f .New ("i\u006ev\u0061\u006c\u0069\u0064\u0020\u0072\u0061\u006eg\u0065\u0020\u0066\u006frm\u0061\u0074");};if _dcb !=""{_gd [0]=_dcb +"\u0021"+_gd [0];_gd [1]=_dcb +"\u0021"+_gd [1];};_fcag ,_cbb :=ParseCellReference (_gd [0]);if _cbb !=nil {return CellReference {},CellReference {},_cbb ;};_fgc ,_cbb :=ParseCellReference (_gd [1]);if _cbb !=nil {return CellReference {},CellReference {},_cbb ;};return _fcag ,_fgc ,nil ;};func _ca (_ag string )(string ,string ,error ){_cb :="";_cea :=_g .LastIndex (_ag ,"\u0021");if _cea > -1{_cb =_ag [:_cea ];_ag =_ag [_cea +1:];if _cb ==""{return "","",_f .New ("\u0049n\u0076a\u006c\u0069\u0064\u0020\u0073h\u0065\u0065t\u0020\u006e\u0061\u006d\u0065");};};return _cb ,_ag ,nil ;};
// CellReference is a parsed reference to a cell. Input is of the form 'A1',
// '$C$2', etc.
type CellReference struct{RowIdx uint32 ;ColumnIdx uint32 ;Column string ;AbsoluteColumn bool ;AbsoluteRow bool ;SheetName string ;};
// ColumnToIndex maps a column to a zero based index (e.g. A = 0, B = 1, AA = 26)
func ColumnToIndex (col string )uint32 {col =_g .ToUpper (col );_ced :=uint32 (0);for _ ,_de :=range col {_ced *=26;_ced +=uint32 (_de -'A'+1);};return _ced -1;};
// String returns a string representation of CellReference.
func (_ba CellReference )String ()string {_e :=make ([]byte ,0,4);if _ba .AbsoluteColumn {_e =append (_e ,'$');};_e =append (_e ,_ba .Column ...);if _ba .AbsoluteRow {_e =append (_e ,'$');};_e =_b .AppendInt (_e ,int64 (_ba .RowIdx ),10);return string (_e );};
func (_gc CellReference )String ()string {_ea :=make ([]byte ,0,4);if _gc .AbsoluteColumn {_ea =append (_ea ,'$');};_ea =append (_ea ,_gc .Column ...);if _gc .AbsoluteRow {_ea =append (_ea ,'$');};_ea =_c .AppendInt (_ea ,int64 (_gc .RowIdx ),10);return string (_ea );};
// ParseColumnRangeReference splits a range reference of the form "A:B" into its
// components.
func ParseColumnRangeReference (s string )(_dbfe ,_caba ColumnReference ,_ggf error ){_ae :="";_ff :=_f .Split (s ,"\u0021");if len (_ff )==2{_ae =_ff [0];s =_ff [1];};_bf :=_f .Split (s ,"\u003a");if len (_bf )!=2{return ColumnReference {},ColumnReference {},_a .New ("i\u006ev\u0061\u006c\u0069\u0064\u0020\u0072\u0061\u006eg\u0065\u0020\u0066\u006frm\u0061\u0074");};if _ae !=""{_bf [0]=_ae +"\u0021"+_bf [0];_bf [1]=_ae +"\u0021"+_bf [1];};_eecf ,_ggf :=ParseColumnReference (_bf [0]);if _ggf !=nil {return ColumnReference {},ColumnReference {},_ggf ;};_fdg ,_ggf :=ParseColumnReference (_bf [1]);if _ggf !=nil {return ColumnReference {},ColumnReference {},_ggf ;};return _eecf ,_fdg ,nil ;};
func ParseColumnRangeReference (s string )(_bba ,_cda ColumnReference ,_eb error ){_eec :="";_gaad :=_g .Split (s ,"\u0021");if len (_gaad )==2{_eec =_gaad [0];s =_gaad [1];};_ffg :=_g .Split (s ,"\u003a");if len (_ffg )!=2{return ColumnReference {},ColumnReference {},_f .New ("i\u006ev\u0061\u006c\u0069\u0064\u0020\u0072\u0061\u006eg\u0065\u0020\u0066\u006frm\u0061\u0074");};if _eec !=""{_ffg [0]=_eec +"\u0021"+_ffg [0];_ffg [1]=_eec +"\u0021"+_ffg [1];};_ccc ,_eb :=ParseColumnReference (_ffg [0]);if _eb !=nil {return ColumnReference {},ColumnReference {},_eb ;};_gaag ,_eb :=ParseColumnReference (_ffg [1]);if _eb !=nil {return ColumnReference {},ColumnReference {},_eb ;};return _ccc ,_gaag ,nil ;};
// 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 =_g .TrimSpace (s );if len (s )< 1{return ColumnReference {},_f .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");};_fca :=ColumnReference {};_aca ,_fg ,_dc :=_ca (s );if _dc !=nil {return ColumnReference {},_dc ;};if _aca !=""{_fca .SheetName =_aca ;};if _fg [0]=='$'{_fca .AbsoluteColumn =true ;_fg =_fg [1:];};if !_ba .MatchString (_fg ){return ColumnReference {},_f .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");};_fca .Column =_fg ;_fca .ColumnIdx =ColumnToIndex (_fca .Column );return _fca ,nil ;};
// Update updates reference to point one of the neighboring columns with respect to the update type after removing a row/column.
func (_ee *ColumnReference )Update (updateType _a .UpdateAction )*ColumnReference {switch updateType {case _a .UpdateActionRemoveColumn :_gaa :=_ee ;_gaa .ColumnIdx =_ee .ColumnIdx -1;_gaa .Column =IndexToColumn (_gaa .ColumnIdx );return _gaa ;default:return _ee ;};};
// String returns a string representation of ColumnReference.
func (_ga ColumnReference )String ()string {_ff :=make ([]byte ,0,4);if _ga .AbsoluteColumn {_ff =append (_ff ,'$');};_ff =append (_ff ,_ga .Column ...);return string (_ff );};

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 ;
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 ;};const (UpdateActionRemoveColumn UpdateAction =iota ;);
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,86 +9,86 @@
// 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 (_f "encoding/xml";_e "fmt";_fb "github.com/unidoc/unioffice";_ff "github.com/unidoc/unioffice/common/logger";_bf "github.com/unidoc/unioffice/schema/soo/ofc/sharedTypes";_b "github.com/unidoc/unioffice/schema/urn/schemas_microsoft_com/office/excel";_fc "github.com/unidoc/unioffice/schema/urn/schemas_microsoft_com/vml";_g "strconv";_d "strings";);
package vmldrawing ;import (_c "encoding/xml";_a "fmt";_f "github.com/unidoc/unioffice";_da "github.com/unidoc/unioffice/common/logger";_cb "github.com/unidoc/unioffice/schema/soo/ofc/sharedTypes";_d "github.com/unidoc/unioffice/schema/urn/schemas_microsoft_com/office/excel";_e "github.com/unidoc/unioffice/schema/urn/schemas_microsoft_com/vml";_aa "strconv";_gg "strings";);
// Left get left attribute of shape style.
func (_fgf *ShapeStyle )Left ()float64 {return _fgf ._afg };func (_fc *Container )UnmarshalXML (d *_c .Decoder ,start _c .StartElement )error {_fc .Shape =nil ;_ccf :for {_cf ,_gaf :=d .Token ();if _gaf !=nil {return _gaf ;};switch _fga :=_cf .(type ){case _c .StartElement :switch _fga .Name .Local {case "s\u0068\u0061\u0070\u0065\u006c\u0061\u0079\u006f\u0075\u0074":_fc .Layout =_e .NewOfcShapelayout ();if _ee :=d .DecodeElement (_fc .Layout ,&_fga );_ee !=nil {return _ee ;};case "\u0073h\u0061\u0070\u0065\u0074\u0079\u0070e":_fc .ShapeType =_e .NewShapetype ();if _ed :=d .DecodeElement (_fc .ShapeType ,&_fga );_ed !=nil {return _ed ;};case "\u0073\u0068\u0061p\u0065":_fgad :=_e .NewShape ();if _ffg :=d .DecodeElement (_fgad ,&_fga );_ffg !=nil {return _ffg ;};_fc .Shape =append (_fc .Shape ,_fgad );};case _c .EndElement :break _ccf ;};};return nil ;};
// NewTextpathStyle accept value of string style attribute of element v:textpath and format it to generate TextpathStyle.
func NewTextpathStyle (style string )TextpathStyle {_eda :=TextpathStyle {_bff :"\u0022C\u0061\u006c\u0069\u0062\u0072\u0069\"",_de :44,_efec :false ,_abg :false };_eea :=_gg .Split (style ,"\u003b");for _ ,_dg :=range _eea {_cfe :=_gg .Split (_dg ,"\u003a");if len (_cfe )!=2{continue ;};switch _cfe [0]{case "f\u006f\u006e\u0074\u002d\u0066\u0061\u006d\u0069\u006c\u0079":_eda ._bff =_cfe [1];break ;case "\u0066o\u006e\u0074\u002d\u0073\u0069\u007ae":_eda ._de ,_ =_aa .ParseInt (_gg .ReplaceAll (_cfe [1],"\u0070\u0074",""),10,64);break ;case "f\u006f\u006e\u0074\u002d\u0077\u0065\u0069\u0067\u0068\u0074":_eda ._efec =_cfe [1]=="\u0062\u006f\u006c\u0064";break ;case "\u0066\u006f\u006e\u0074\u002d\u0073\u0074\u0079\u006c\u0065":_eda ._abg =_cfe [1]=="\u0069\u0074\u0061\u006c\u0069\u0063";break ;};};return _eda ;};
// FontFamily returns fontFamily of the text.
func (_ac *TextpathStyle )FontFamily ()string {return _ac ._ef };
func (_gda *TextpathStyle )FontFamily ()string {return _gda ._bff };func NewContainer ()*Container {return &Container {}};
// NewCommentDrawing constructs a new comment drawing.
func NewCommentDrawing ()*Container {_a :=NewContainer ();_a .Layout =_fc .NewOfcShapelayout ();_a .Layout .ExtAttr =_fc .ST_ExtEdit ;_a .Layout .Idmap =_fc .NewOfcCT_IdMap ();_a .Layout .Idmap .DataAttr =_fb .String ("\u0031");_a .Layout .Idmap .ExtAttr =_fc .ST_ExtEdit ;_a .ShapeType =_fc .NewShapetype ();_a .ShapeType .IdAttr =_fb .String ("_\u0078\u0030\u0030\u0030\u0030\u005f\u0074\u0032\u0030\u0032");_a .ShapeType .CoordsizeAttr =_fb .String ("2\u0031\u0036\u0030\u0030\u002c\u0032\u0031\u0036\u0030\u0030");_a .ShapeType .SptAttr =_fb .Float32 (202);_a .ShapeType .PathAttr =_fb .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");_ed :=_fc .NewEG_ShapeElements ();_a .ShapeType .EG_ShapeElements =append (_a .ShapeType .EG_ShapeElements ,_ed );_ed .Path =_fc .NewPath ();_ed .Path .GradientshapeokAttr =_bf .ST_TrueFalseT ;_ed .Path .ConnecttypeAttr =_fc .OfcST_ConnectTypeRect ;return _a ;};type Container struct{Layout *_fc .OfcShapelayout ;ShapeType *_fc .Shapetype ;Shape []*_fc .Shape ;};const (ShapeStylePositionAbsolute ="\u0061\u0062\u0073\u006f\u006c\u0075\u0074\u0065";ShapeStylePositionRelative ="\u0072\u0065\u006c\u0061\u0074\u0069\u0076\u0065";);
// IsItalic returns true if text is italic.
func (_db *TextpathStyle )IsItalic ()bool {return _db ._abg };
// SetItalic sets text to italic.
func (_fgac *TextpathStyle )SetItalic (italic bool ){_fgac ._bcaf =italic };
// Margins get margin top, left, bottom, and right of shape style.
func (_fb *ShapeStyle )Margins ()(float64 ,float64 ,float64 ,float64 ){return _fb ._ef ,_fb ._be ,_fb ._fff ,_fb ._cd ;};
// ToString generate string of TextpathStyle.
func (_ffae *TextpathStyle )String ()string {_afd :="";_afd +=_a .Sprintf ("\u0066o\u006et\u002d\u0066\u0061\u006d\u0069\u006c\u0079\u003a\u0025\u0073\u003b",_ffae ._bff );_afd +=_a .Sprintf ("\u0066o\u006et\u002d\u0073\u0069\u007a\u0065\u003a\u0025\u0064\u0070\u0074\u003b",_ffae ._de );if _ffae ._abg {_afd +=_a .Sprintf ("\u0066o\u006et\u002d\u0073\u0074\u0079\u006ce\u003a\u0069t\u0061\u006c\u0069\u0063\u003b");};if _ffae ._efec {_afd +=_a .Sprintf ("\u0066\u006f\u006e\u0074\u002d\u0077\u0065\u0069\u0067\u0068\u0074\u003ab\u006f\u006c\u0064\u003b");};return _afd ;};type Container struct{Layout *_e .OfcShapelayout ;ShapeType *_e .Shapetype ;Shape []*_e .Shape ;};
// Width return width of shape.
func (_ffd *ShapeStyle )Width ()float64 {return _ffd ._dc };
// TextpathStyle is style attribute of element v:textpath.
type TextpathStyle struct{_bff string ;_de int64 ;_efec bool ;_abg bool ;};
// IsBold returns true if text is bold.
func (_dgf *TextpathStyle )IsBold ()bool {return _dgf ._efec };
// Position get position attribute of shape style.
func (_ace *ShapeStyle )Position ()string {return _ace ._edb };
// SetWidth set width of shape.
func (_cba *ShapeStyle )SetWidth (width float64 ){_cba ._dc =width };
// SetBold sets text to bold.
func (_dfe *TextpathStyle )SetBold (bold bool ){_dfe ._efec =bold };
// ToString formatting ShapeStyle to string.
func (_aaa *ShapeStyle )String ()string {_age :="";_age +=_a .Sprintf ("\u0070\u006f\u0073i\u0074\u0069\u006f\u006e\u003a\u0025\u0073\u003b",_aaa ._edb );_age +=_a .Sprintf ("\u006da\u0072g\u0069\u006e\u002d\u006c\u0065\u0066\u0074\u003a\u0025\u0064\u003b",int64 (_aaa ._be ));_age +=_a .Sprintf ("\u006d\u0061\u0072\u0067\u0069\u006e\u002d\u0074\u006fp\u003a\u0025\u0064\u003b",int64 (_aaa ._ef ));_age +=_a .Sprintf ("w\u0069\u0064\u0074\u0068\u003a\u0025\u0064\u0070\u0074\u003b",int64 (_aaa ._dc ));_age +=_a .Sprintf ("\u0068\u0065\u0069g\u0068\u0074\u003a\u0025\u0064\u0070\u0074\u003b",int64 (_aaa ._fd ));_age +=_a .Sprintf ("z\u002d\u0069\u006e\u0064\u0065\u0078\u003a\u0025\u0064\u003b",_aaa ._bfb );_age +=_a .Sprintf ("m\u0073\u006f\u002d\u0070\u006f\u0073i\u0074\u0069\u006f\u006e\u002d\u0068\u006f\u0072\u0069z\u006f\u006e\u0074a\u006c:\u0025\u0073\u003b",_aaa ._fgbg );_age +=_a .Sprintf ("\u006d\u0073o-\u0070\u006f\u0073i\u0074\u0069\u006f\u006e-ho\u0072iz\u006f\u006e\u0074\u0061\u006c\u002d\u0072el\u0061\u0074\u0069\u0076\u0065\u003a\u0025s\u003b",_aaa ._bee );_age +=_a .Sprintf ("\u006ds\u006f\u002d\u0070\u006fs\u0069\u0074\u0069\u006f\u006e-\u0076e\u0072t\u0069\u0063\u0061\u006c\u003a\u0025\u0073;",_aaa ._eg );_age +=_a .Sprintf ("\u006d\u0073\u006f-p\u006f\u0073\u0069\u0074\u0069\u006f\u006e\u002d\u0076e\u0072t\u0069c\u0061l\u002d\u0072\u0065\u006c\u0061\u0074\u0069\u0076\u0065\u003a\u0025\u0073\u003b",_aaa ._edd );return _age ;};
// NewShapeStyle accept value of string style attribute in v:shape and format it to generate ShapeStyle.
func NewShapeStyle (style string )ShapeStyle {_eeb :=ShapeStyle {_dc :0,_fd :0};_ba :=_gg .Split (style ,"\u003b");for _ ,_ac :=range _ba {_fdg :=_gg .Split (_ac ,"\u003a");if len (_fdg )!=2{continue ;};var _ffa error ;switch _fdg [0]{case "\u0070\u006f\u0073\u0069\u0074\u0069\u006f\u006e":_eeb ._edb =_fdg [1];break ;case "\u006d\u0061\u0072\u0067\u0069\u006e\u002d\u0074\u006f\u0070":_eeb ._ef ,_ffa =_aa .ParseFloat (_gg .ReplaceAll (_fdg [1],"\u0070\u0074",""),64);break ;case "m\u0061\u0072\u0067\u0069\u006e\u002d\u006c\u0065\u0066\u0074":_eeb ._be ,_ffa =_aa .ParseFloat (_gg .ReplaceAll (_fdg [1],"\u0070\u0074",""),64);break ;case "\u006d\u0061\u0072\u0067\u0069\u006e\u002d\u0062\u006f\u0074\u0074\u006f\u006d":_eeb ._fff ,_ffa =_aa .ParseFloat (_gg .ReplaceAll (_fdg [1],"\u0070\u0074",""),64);break ;case "\u006d\u0061\u0072g\u0069\u006e\u002d\u0072\u0069\u0067\u0068\u0074":_eeb ._cd ,_ffa =_aa .ParseFloat (_gg .ReplaceAll (_fdg [1],"\u0070\u0074",""),64);break ;case "\u0074\u006f\u0070":_eeb ._efe ,_ffa =_aa .ParseFloat (_gg .ReplaceAll (_fdg [1],"\u0070\u0074",""),64);break ;case "\u006c\u0065\u0066\u0074":_eeb ._afg ,_ffa =_aa .ParseFloat (_gg .ReplaceAll (_fdg [1],"\u0070\u0074",""),64);break ;case "\u0062\u006f\u0074\u0074\u006f\u006d":_eeb ._ge ,_ffa =_aa .ParseFloat (_gg .ReplaceAll (_fdg [1],"\u0070\u0074",""),64);break ;case "\u0072\u0069\u0067h\u0074":_eeb ._gd ,_ffa =_aa .ParseFloat (_gg .ReplaceAll (_fdg [1],"\u0070\u0074",""),64);break ;case "\u0077\u0069\u0064t\u0068":_eeb ._dc ,_ffa =_aa .ParseFloat (_gg .ReplaceAll (_fdg [1],"\u0070\u0074",""),64);break ;case "\u0068\u0065\u0069\u0067\u0068\u0074":_eeb ._fd ,_ffa =_aa .ParseFloat (_gg .ReplaceAll (_fdg [1],"\u0070\u0074",""),64);break ;case "\u007a-\u0069\u006e\u0064\u0065\u0078":_eeb ._bfb ,_ffa =_aa .ParseInt (_fdg [1],10,64);break ;case "\u006d\u0073\u006f-p\u006f\u0073\u0069\u0074\u0069\u006f\u006e\u002d\u0068\u006f\u0072\u0069\u007a\u006f\u006e\u0074\u0061\u006c":_eeb ._fgbg =_fdg [1];break ;case "\u006d\u0073\u006f\u002d\u0070\u006f\u0073\u0069\u0074\u0069\u006f\u006e\u002d\u0068\u006fr\u0069z\u006f\u006e\u0074\u0061\u006c\u002d\u0072\u0065\u006c\u0061\u0074\u0069\u0076\u0065":_eeb ._bee =_fdg [1];break ;case "m\u0073\u006f\u002d\u0070os\u0069t\u0069\u006f\u006e\u002d\u0076e\u0072\u0074\u0069\u0063\u0061\u006c":_eeb ._eg =_fdg [1];break ;case "\u006d\u0073\u006f\u002d\u0070\u006f\u0073\u0069\u0074\u0069o\u006e\u002d\u0076\u0065\u0072\u0074\u0069c\u0061\u006c\u002d\u0072\u0065\u006c\u0061\u0074\u0069\u0076\u0065":_eeb ._edd =_fdg [1];break ;};if _ffa !=nil {_da .Log .Debug ("\u0055n\u0061\u0062l\u0065\u0020\u0074o\u0020\u0070\u0061\u0072\u0073\u0065\u0020s\u0074\u0079\u006c\u0065\u0020\u0061t\u0074\u0072\u0069\u0062\u0075\u0074\u0065\u003a\u0020\u0025\u0073 \u0076\u0061\u006c\u0075\u0065\u003a\u0020\u0025\u0076",_fdg [0],_fdg [1]);};};return _eeb ;};
// SetHeight set height of shape.
func (_ab *ShapeStyle )SetHeight (height float64 ){_ab ._fd =height };
// SetFontSize sets text's fontSize.
func (_aee *TextpathStyle )SetFontSize (fontSize int64 ){_aee ._de =fontSize };
// Top get top attribute of shape style.
func (_gaa *ShapeStyle )Top ()float64 {return _gaa ._eca };
func (_ae *ShapeStyle )Top ()float64 {return _ae ._efe };
// ShapeStyle is style attribute of v:shape element.
type ShapeStyle struct{_edb string ;_ef float64 ;_be float64 ;_fff float64 ;_cd float64 ;_efe float64 ;_afg float64 ;_ge float64 ;_gd float64 ;_dc float64 ;_fd float64 ;_bfb int64 ;_fgbg string ;_bee string ;_eg string ;_edd string ;};
// CreateFormula creates F element for typeFormulas.
func CreateFormula (s string )*_e .CT_F {_efd :=_e .NewCT_F ();_efd .EqnAttr =&s ;return _efd };
// SetFontFamily sets text's fontFamily.
func (_edg *TextpathStyle )SetFontFamily (fontFamily string ){_edg ._bff =fontFamily };const (ShapeStylePositionAbsolute ="\u0061\u0062\u0073\u006f\u006c\u0075\u0074\u0065";ShapeStylePositionRelative ="\u0072\u0065\u006c\u0061\u0074\u0069\u0076\u0065";);
// SetItalic sets text to italic.
func (_acb *TextpathStyle )SetItalic (italic bool ){_acb ._abg =italic };
// Bottom get bottom attribute of shape style.
func (_gafc *ShapeStyle )Bottom ()float64 {return _gafc ._ge };
// FontSize returns fontSize of the text.
func (_ccc *TextpathStyle )FontSize ()int64 {return _ccc ._de };
// NewCommentShape creates a new comment shape for a given cell index. The
// indices here are zero based.
func NewCommentShape (col ,row int64 )*_fc .Shape {_cc :=_fc .NewShape ();_cc .IdAttr =_fb .String (_e .Sprintf ("\u0063\u0073\u005f\u0025\u0064\u005f\u0025\u0064",col ,row ));_cc .TypeAttr =_fb .String ("\u0023\u005f\u00780\u0030\u0030\u0030\u005f\u0074\u0032\u0030\u0032");_cc .StyleAttr =_fb .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");_cc .FillcolorAttr =_fb .String ("\u0023f\u0062\u0066\u0036\u0064\u0036");_cc .StrokecolorAttr =_fb .String ("\u0023e\u0064\u0065\u0061\u0061\u0031");_cg :=_fc .NewEG_ShapeElements ();_cg .Fill =_fc .NewFill ();_cg .Fill .Color2Attr =_fb .String ("\u0023f\u0062\u0066\u0065\u0038\u0032");_cg .Fill .AngleAttr =_fb .Float64 (-180);_cg .Fill .TypeAttr =_fc .ST_FillTypeGradient ;_cg .Fill .Fill =_fc .NewOfcFill ();_cg .Fill .Fill .ExtAttr =_fc .ST_ExtView ;_cg .Fill .Fill .TypeAttr =_fc .OfcST_FillTypeGradientUnscaled ;_cc .EG_ShapeElements =append (_cc .EG_ShapeElements ,_cg );_gd :=_fc .NewEG_ShapeElements ();_gd .Shadow =_fc .NewShadow ();_gd .Shadow .OnAttr =_bf .ST_TrueFalseT ;_gd .Shadow .ObscuredAttr =_bf .ST_TrueFalseT ;_cc .EG_ShapeElements =append (_cc .EG_ShapeElements ,_gd );_ce :=_fc .NewEG_ShapeElements ();_ce .Path =_fc .NewPath ();_ce .Path .ConnecttypeAttr =_fc .OfcST_ConnectTypeNone ;_cc .EG_ShapeElements =append (_cc .EG_ShapeElements ,_ce );_gg :=_fc .NewEG_ShapeElements ();_gg .Textbox =_fc .NewTextbox ();_gg .Textbox .StyleAttr =_fb .String ("\u006d\u0073\u006f\u002ddi\u0072\u0065\u0063\u0074\u0069\u006f\u006e\u002d\u0061\u006c\u0074\u003a\u0061\u0075t\u006f");_cc .EG_ShapeElements =append (_cc .EG_ShapeElements ,_gg );_fcg :=_fc .NewEG_ShapeElements ();_fcg .ClientData =_b .NewClientData ();_fcg .ClientData .ObjectTypeAttr =_b .ST_ObjectTypeNote ;_fcg .ClientData .MoveWithCells =_bf .ST_TrueFalseBlankT ;_fcg .ClientData .SizeWithCells =_bf .ST_TrueFalseBlankT ;_fcg .ClientData .Anchor =_fb .String ("\u0031,\u0020\u0031\u0035\u002c\u0020\u0030\u002c\u0020\u0032\u002c\u00202\u002c\u0020\u0035\u0034\u002c\u0020\u0035\u002c\u0020\u0033");_fcg .ClientData .AutoFill =_bf .ST_TrueFalseBlankFalse ;_fcg .ClientData .Row =_fb .Int64 (row );_fcg .ClientData .Column =_fb .Int64 (col );_cc .EG_ShapeElements =append (_cc .EG_ShapeElements ,_fcg );return _cc ;};
// SetBold sets text to bold.
func (_aea *TextpathStyle )SetBold (bold bool ){_aea ._fef =bold };
// SetFontSize sets text's fontSize.
func (_faa *TextpathStyle )SetFontSize (fontSize int64 ){_faa ._dec =fontSize };
func NewCommentShape (col ,row int64 )*_e .Shape {_daf :=_e .NewShape ();_daf .IdAttr =_f .String (_a .Sprintf ("\u0063\u0073\u005f\u0025\u0064\u005f\u0025\u0064",col ,row ));_daf .TypeAttr =_f .String ("\u0023\u005f\u00780\u0030\u0030\u0030\u005f\u0074\u0032\u0030\u0032");_daf .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");_daf .FillcolorAttr =_f .String ("\u0023f\u0062\u0066\u0036\u0064\u0036");_daf .StrokecolorAttr =_f .String ("\u0023e\u0064\u0065\u0061\u0061\u0031");_fgc :=_e .NewEG_ShapeElements ();_fgc .Fill =_e .NewFill ();_fgc .Fill .Color2Attr =_f .String ("\u0023f\u0062\u0066\u0065\u0038\u0032");_fgc .Fill .AngleAttr =_f .Float64 (-180);_fgc .Fill .TypeAttr =_e .ST_FillTypeGradient ;_fgc .Fill .Fill =_e .NewOfcFill ();_fgc .Fill .Fill .ExtAttr =_e .ST_ExtView ;_fgc .Fill .Fill .TypeAttr =_e .OfcST_FillTypeGradientUnscaled ;_daf .EG_ShapeElements =append (_daf .EG_ShapeElements ,_fgc );_eb :=_e .NewEG_ShapeElements ();_eb .Shadow =_e .NewShadow ();_eb .Shadow .OnAttr =_cb .ST_TrueFalseT ;_eb .Shadow .ObscuredAttr =_cb .ST_TrueFalseT ;_daf .EG_ShapeElements =append (_daf .EG_ShapeElements ,_eb );_ag :=_e .NewEG_ShapeElements ();_ag .Path =_e .NewPath ();_ag .Path .ConnecttypeAttr =_e .OfcST_ConnectTypeNone ;_daf .EG_ShapeElements =append (_daf .EG_ShapeElements ,_ag );_cc :=_e .NewEG_ShapeElements ();_cc .Textbox =_e .NewTextbox ();_cc .Textbox .StyleAttr =_f .String ("\u006d\u0073\u006f\u002ddi\u0072\u0065\u0063\u0074\u0069\u006f\u006e\u002d\u0061\u006c\u0074\u003a\u0061\u0075t\u006f");_daf .EG_ShapeElements =append (_daf .EG_ShapeElements ,_cc );_ff :=_e .NewEG_ShapeElements ();_ff .ClientData =_d .NewClientData ();_ff .ClientData .ObjectTypeAttr =_d .ST_ObjectTypeNote ;_ff .ClientData .MoveWithCells =_cb .ST_TrueFalseBlankT ;_ff .ClientData .SizeWithCells =_cb .ST_TrueFalseBlankT ;_ff .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");_ff .ClientData .AutoFill =_cb .ST_TrueFalseBlankFalse ;_ff .ClientData .Row =_f .Int64 (row );_ff .ClientData .Column =_f .Int64 (col );_daf .EG_ShapeElements =append (_daf .EG_ShapeElements ,_ff );return _daf ;};
// Height return height of shape.
func (_gag *ShapeStyle )Height ()float64 {return _gag ._ecg };
func (_df *ShapeStyle )Height ()float64 {return _df ._fd };
// SetWidth set width of shape.
func (_aee *ShapeStyle )SetWidth (width float64 ){_aee ._gfd =width };
// Left get left attribute of shape style.
func (_fga *ShapeStyle )Left ()float64 {return _fga ._ecd };
// TextpathStyle is style attribute of element v:textpath.
type TextpathStyle struct{_ef string ;_dec int64 ;_fef bool ;_bcaf bool ;};
// Position get position attribute of shape style.
func (_dda *ShapeStyle )Position ()string {return _dda ._bcb };
// IsItalic returns true if text is italic.
func (_fcdd *TextpathStyle )IsItalic ()bool {return _fcdd ._bcaf };
// NewTextpathStyle accept value of string style attribute of element v:textpath and format it to generate TextpathStyle.
func NewTextpathStyle (style string )TextpathStyle {_cde :=TextpathStyle {_ef :"\u0022C\u0061\u006c\u0069\u0062\u0072\u0069\"",_dec :44,_fef :false ,_bcaf :false };_bcf :=_d .Split (style ,"\u003b");for _ ,_bac :=range _bcf {_eb :=_d .Split (_bac ,"\u003a");if len (_eb )!=2{continue ;};switch _eb [0]{case "f\u006f\u006e\u0074\u002d\u0066\u0061\u006d\u0069\u006c\u0079":_cde ._ef =_eb [1];break ;case "\u0066o\u006e\u0074\u002d\u0073\u0069\u007ae":_cde ._dec ,_ =_g .ParseInt (_d .ReplaceAll (_eb [1],"\u0070\u0074",""),10,64);break ;case "f\u006f\u006e\u0074\u002d\u0077\u0065\u0069\u0067\u0068\u0074":_cde ._fef =_eb [1]=="\u0062\u006f\u006c\u0064";break ;case "\u0066\u006f\u006e\u0074\u002d\u0073\u0074\u0079\u006c\u0065":_cde ._bcaf =_eb [1]=="\u0069\u0074\u0061\u006c\u0069\u0063";break ;};};return _cde ;};
// NewCommentDrawing constructs a new comment drawing.
func NewCommentDrawing ()*Container {_fe :=NewContainer ();_fe .Layout =_e .NewOfcShapelayout ();_fe .Layout .ExtAttr =_e .ST_ExtEdit ;_fe .Layout .Idmap =_e .NewOfcCT_IdMap ();_fe .Layout .Idmap .DataAttr =_f .String ("\u0031");_fe .Layout .Idmap .ExtAttr =_e .ST_ExtEdit ;_fe .ShapeType =_e .NewShapetype ();_fe .ShapeType .IdAttr =_f .String ("_\u0078\u0030\u0030\u0030\u0030\u005f\u0074\u0032\u0030\u0032");_fe .ShapeType .CoordsizeAttr =_f .String ("2\u0031\u0036\u0030\u0030\u002c\u0032\u0031\u0036\u0030\u0030");_fe .ShapeType .SptAttr =_f .Float32 (202);_fe .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");_fg :=_e .NewEG_ShapeElements ();_fe .ShapeType .EG_ShapeElements =append (_fe .ShapeType .EG_ShapeElements ,_fg );_fg .Path =_e .NewPath ();_fg .Path .GradientshapeokAttr =_cb .ST_TrueFalseT ;_fg .Path .ConnecttypeAttr =_e .OfcST_ConnectTypeRect ;return _fe ;};
// Right get right attribute of shape style.
func (_bda *ShapeStyle )Right ()float64 {return _bda ._bca };
// FontSize returns fontSize of the text.
func (_fbg *TextpathStyle )FontSize ()int64 {return _fbg ._dec };func (_ccg *Container )UnmarshalXML (d *_f .Decoder ,start _f .StartElement )error {_ccg .Shape =nil ;_daa :for {_ea ,_ec :=d .Token ();if _ec !=nil {return _ec ;};switch _bc :=_ea .(type ){case _f .StartElement :switch _bc .Name .Local {case "s\u0068\u0061\u0070\u0065\u006c\u0061\u0079\u006f\u0075\u0074":_ccg .Layout =_fc .NewOfcShapelayout ();if _dg :=d .DecodeElement (_ccg .Layout ,&_bc );_dg !=nil {return _dg ;};case "\u0073h\u0061\u0070\u0065\u0074\u0079\u0070e":_ccg .ShapeType =_fc .NewShapetype ();if _fd :=d .DecodeElement (_ccg .ShapeType ,&_bc );_fd !=nil {return _fd ;};case "\u0073\u0068\u0061p\u0065":_bg :=_fc .NewShape ();if _ga :=d .DecodeElement (_bg ,&_bc );_ga !=nil {return _ga ;};_ccg .Shape =append (_ccg .Shape ,_bg );};case _f .EndElement :break _daa ;};};return nil ;};
// ToString formatting ShapeStyle to string.
func (_ffd *ShapeStyle )String ()string {_def :="";_def +=_e .Sprintf ("\u0070\u006f\u0073i\u0074\u0069\u006f\u006e\u003a\u0025\u0073\u003b",_ffd ._bcb );_def +=_e .Sprintf ("\u006da\u0072g\u0069\u006e\u002d\u006c\u0065\u0066\u0074\u003a\u0025\u0064\u003b",int64 (_ffd ._gac ));_def +=_e .Sprintf ("\u006d\u0061\u0072\u0067\u0069\u006e\u002d\u0074\u006fp\u003a\u0025\u0064\u003b",int64 (_ffd ._ad ));_def +=_e .Sprintf ("w\u0069\u0064\u0074\u0068\u003a\u0025\u0064\u0070\u0074\u003b",int64 (_ffd ._gfd ));_def +=_e .Sprintf ("\u0068\u0065\u0069g\u0068\u0074\u003a\u0025\u0064\u0070\u0074\u003b",int64 (_ffd ._ecg ));_def +=_e .Sprintf ("z\u002d\u0069\u006e\u0064\u0065\u0078\u003a\u0025\u0064\u003b",_ffd ._gdd );_def +=_e .Sprintf ("m\u0073\u006f\u002d\u0070\u006f\u0073i\u0074\u0069\u006f\u006e\u002d\u0068\u006f\u0072\u0069z\u006f\u006e\u0074a\u006c:\u0025\u0073\u003b",_ffd ._fe );_def +=_e .Sprintf ("\u006d\u0073o-\u0070\u006f\u0073i\u0074\u0069\u006f\u006e-ho\u0072iz\u006f\u006e\u0074\u0061\u006c\u002d\u0072el\u0061\u0074\u0069\u0076\u0065\u003a\u0025s\u003b",_ffd ._aa );_def +=_e .Sprintf ("\u006ds\u006f\u002d\u0070\u006fs\u0069\u0074\u0069\u006f\u006e-\u0076e\u0072t\u0069\u0063\u0061\u006c\u003a\u0025\u0073;",_ffd ._bd );_def +=_e .Sprintf ("\u006d\u0073\u006f-p\u006f\u0073\u0069\u0074\u0069\u006f\u006e\u002d\u0076e\u0072t\u0069c\u0061l\u002d\u0072\u0065\u006c\u0061\u0074\u0069\u0076\u0065\u003a\u0025\u0073\u003b",_ffd ._cf );return _def ;};
// NewShapeStyle accept value of string style attribute in v:shape and format it to generate ShapeStyle.
func NewShapeStyle (style string )ShapeStyle {_dd :=ShapeStyle {_gfd :0,_ecg :0};_ab :=_d .Split (style ,"\u003b");for _ ,_fbe :=range _ab {_ba :=_d .Split (_fbe ,"\u003a");if len (_ba )!=2{continue ;};var _fcgf error ;switch _ba [0]{case "\u0070\u006f\u0073\u0069\u0074\u0069\u006f\u006e":_dd ._bcb =_ba [1];break ;case "\u006d\u0061\u0072\u0067\u0069\u006e\u002d\u0074\u006f\u0070":_dd ._ad ,_fcgf =_g .ParseFloat (_d .ReplaceAll (_ba [1],"\u0070\u0074",""),64);break ;case "m\u0061\u0072\u0067\u0069\u006e\u002d\u006c\u0065\u0066\u0074":_dd ._gac ,_fcgf =_g .ParseFloat (_d .ReplaceAll (_ba [1],"\u0070\u0074",""),64);break ;case "\u006d\u0061\u0072\u0067\u0069\u006e\u002d\u0062\u006f\u0074\u0074\u006f\u006d":_dd ._ge ,_fcgf =_g .ParseFloat (_d .ReplaceAll (_ba [1],"\u0070\u0074",""),64);break ;case "\u006d\u0061\u0072g\u0069\u006e\u002d\u0072\u0069\u0067\u0068\u0074":_dd ._ae ,_fcgf =_g .ParseFloat (_d .ReplaceAll (_ba [1],"\u0070\u0074",""),64);break ;case "\u0074\u006f\u0070":_dd ._eca ,_fcgf =_g .ParseFloat (_d .ReplaceAll (_ba [1],"\u0070\u0074",""),64);break ;case "\u006c\u0065\u0066\u0074":_dd ._ecd ,_fcgf =_g .ParseFloat (_d .ReplaceAll (_ba [1],"\u0070\u0074",""),64);break ;case "\u0062\u006f\u0074\u0074\u006f\u006d":_dd ._gf ,_fcgf =_g .ParseFloat (_d .ReplaceAll (_ba [1],"\u0070\u0074",""),64);break ;case "\u0072\u0069\u0067h\u0074":_dd ._bca ,_fcgf =_g .ParseFloat (_d .ReplaceAll (_ba [1],"\u0070\u0074",""),64);break ;case "\u0077\u0069\u0064t\u0068":_dd ._gfd ,_fcgf =_g .ParseFloat (_d .ReplaceAll (_ba [1],"\u0070\u0074",""),64);break ;case "\u0068\u0065\u0069\u0067\u0068\u0074":_dd ._ecg ,_fcgf =_g .ParseFloat (_d .ReplaceAll (_ba [1],"\u0070\u0074",""),64);break ;case "\u007a-\u0069\u006e\u0064\u0065\u0078":_dd ._gdd ,_fcgf =_g .ParseInt (_ba [1],10,64);break ;case "\u006d\u0073\u006f-p\u006f\u0073\u0069\u0074\u0069\u006f\u006e\u002d\u0068\u006f\u0072\u0069\u007a\u006f\u006e\u0074\u0061\u006c":_dd ._fe =_ba [1];break ;case "\u006d\u0073\u006f\u002d\u0070\u006f\u0073\u0069\u0074\u0069\u006f\u006e\u002d\u0068\u006fr\u0069z\u006f\u006e\u0074\u0061\u006c\u002d\u0072\u0065\u006c\u0061\u0074\u0069\u0076\u0065":_dd ._aa =_ba [1];break ;case "m\u0073\u006f\u002d\u0070os\u0069t\u0069\u006f\u006e\u002d\u0076e\u0072\u0074\u0069\u0063\u0061\u006c":_dd ._bd =_ba [1];break ;case "\u006d\u0073\u006f\u002d\u0070\u006f\u0073\u0069\u0074\u0069o\u006e\u002d\u0076\u0065\u0072\u0074\u0069c\u0061\u006c\u002d\u0072\u0065\u006c\u0061\u0074\u0069\u0076\u0065":_dd ._cf =_ba [1];break ;};if _fcgf !=nil {_ff .Log .Debug ("\u0055n\u0061\u0062l\u0065\u0020\u0074o\u0020\u0070\u0061\u0072\u0073\u0065\u0020s\u0074\u0079\u006c\u0065\u0020\u0061t\u0074\u0072\u0069\u0062\u0075\u0074\u0065\u003a\u0020\u0025\u0073 \u0076\u0061\u006c\u0075\u0065\u003a\u0020\u0025\u0076",_ba [0],_ba [1]);};};return _dd ;};
// Bottom get bottom attribute of shape style.
func (_dc *ShapeStyle )Bottom ()float64 {return _dc ._gf };
// Margins get margin top, left, bottom, and right of shape style.
func (_bb *ShapeStyle )Margins ()(float64 ,float64 ,float64 ,float64 ){return _bb ._ad ,_bb ._gac ,_bb ._ge ,_bb ._ae ;};
// SetFontFamily sets text's fontFamily.
func (_bdd *TextpathStyle )SetFontFamily (fontFamily string ){_bdd ._ef =fontFamily };func NewContainer ()*Container {return &Container {}};
// SetHeight set height of shape.
func (_de *ShapeStyle )SetHeight (height float64 ){_de ._ecg =height };
// IsBold returns true if text is bold.
func (_fcd *TextpathStyle )IsBold ()bool {return _fcd ._fef };
// ToString generate string of TextpathStyle.
func (_fba *TextpathStyle )String ()string {_ced :="";_ced +=_e .Sprintf ("\u0066o\u006et\u002d\u0066\u0061\u006d\u0069\u006c\u0079\u003a\u0025\u0073\u003b",_fba ._ef );_ced +=_e .Sprintf ("\u0066o\u006et\u002d\u0073\u0069\u007a\u0065\u003a\u0025\u0064\u0070\u0074\u003b",_fba ._dec );if _fba ._bcaf {_ced +=_e .Sprintf ("\u0066o\u006et\u002d\u0073\u0074\u0079\u006ce\u003a\u0069t\u0061\u006c\u0069\u0063\u003b");};if _fba ._fef {_ced +=_e .Sprintf ("\u0066\u006f\u006e\u0074\u002d\u0077\u0065\u0069\u0067\u0068\u0074\u003ab\u006f\u006c\u0064\u003b");};return _ced ;};
// CreateFormula creates F element for typeFormulas.
func CreateFormula (s string )*_fc .CT_F {_gae :=_fc .NewCT_F ();_gae .EqnAttr =&s ;return _gae };
// ShapeStyle is style attribute of v:shape element.
type ShapeStyle struct{_bcb string ;_ad float64 ;_gac float64 ;_ge float64 ;_ae float64 ;_eca float64 ;_ecd float64 ;_gf float64 ;_bca float64 ;_gfd float64 ;_ecg float64 ;_gdd int64 ;_fe string ;_aa string ;_bd string ;_cf string ;};func (_ee *Container )MarshalXML (e *_f .Encoder ,start _f .StartElement )error {start .Attr =append (start .Attr ,_f .Attr {Name :_f .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 ,_f .Attr {Name :_f .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 ,_f .Attr {Name :_f .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 _ee .Layout !=nil {_bff :=_f .StartElement {Name :_f .Name {Local :"\u006f\u003a\u0073\u0068\u0061\u0070\u0065\u006c\u0061\u0079\u006f\u0075\u0074"}};e .EncodeElement (_ee .Layout ,_bff );};if _ee .ShapeType !=nil {_fa :=_f .StartElement {Name :_f .Name {Local :"v\u003a\u0073\u0068\u0061\u0070\u0065\u0074\u0079\u0070\u0065"}};e .EncodeElement (_ee .ShapeType ,_fa );};for _ ,_gda :=range _ee .Shape {_da :=_f .StartElement {Name :_f .Name {Local :"\u0076:\u0073\u0068\u0061\u0070\u0065"}};e .EncodeElement (_gda ,_da );};return e .EncodeToken (_f .EndElement {Name :start .Name });};
// Width return width of shape.
func (_ccf *ShapeStyle )Width ()float64 {return _ccf ._gfd };
func (_cbc *ShapeStyle )Right ()float64 {return _cbc ._gd };func (_ga *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 _ga .Layout !=nil {_af :=_c .StartElement {Name :_c .Name {Local :"\u006f\u003a\u0073\u0068\u0061\u0070\u0065\u006c\u0061\u0079\u006f\u0075\u0074"}};e .EncodeElement (_ga .Layout ,_af );};if _ga .ShapeType !=nil {_b :=_c .StartElement {Name :_c .Name {Local :"v\u003a\u0073\u0068\u0061\u0070\u0065\u0074\u0079\u0070\u0065"}};e .EncodeElement (_ga .ShapeType ,_b );};for _ ,_agd :=range _ga .Shape {_bf :=_c .StartElement {Name :_c .Name {Local :"\u0076:\u0073\u0068\u0061\u0070\u0065"}};e .EncodeElement (_agd ,_bf );};return e .EncodeToken (_c .EndElement {Name :start .Name });};

View File

@ -9,48 +9,31 @@
// 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 (_a "archive/zip";_dc "bytes";_ab "encoding/xml";_gb "fmt";_gc "github.com/unidoc/unioffice";_e "github.com/unidoc/unioffice/algo";_fg "github.com/unidoc/unioffice/common/tempstorage";_fa "github.com/unidoc/unioffice/schema/soo/pkg/relationships";_b "io";_gf "path";_g "sort";_d "strings";_c "time";);func (_ca *DecodeMap )RecordIndex (path string ,idx int ){_ca ._gcc [path ]=idx };func MarshalXMLByType (z *_a .Writer ,dt _gc .DocType ,typ string ,v interface{})error {_fedg :=_gc .AbsoluteFilename (dt ,typ ,0);return MarshalXML (z ,_fedg ,v );};func (_eb *DecodeMap )IndexFor (path string )int {return _eb ._gcc [path ]};
// ExtractToDiskTmp extracts a zip file to a temporary file in a given path,
// returning the name of the file.
func ExtractToDiskTmp (f *_a .File ,path string )(string ,error ){_beg ,_cef :=_fg .TempFile (path ,"\u007a\u007a");if _cef !=nil {return "",_cef ;};defer _beg .Close ();_aaf ,_cef :=f .Open ();if _cef !=nil {return "",_cef ;};defer _aaf .Close ();_ ,_cef =_b .Copy (_beg ,_aaf );if _cef !=nil {return "",_cef ;};return _beg .Name (),nil ;};var _dcf =[]byte {'\r','\n'};func MarshalXMLByTypeIndex (z *_a .Writer ,dt _gc .DocType ,typ string ,idx int ,v interface{})error {_dg :=_gc .AbsoluteFilename (dt ,typ ,idx );return MarshalXML (z ,_dg ,v );};
package zippkg ;import (_b "archive/zip";_ee "bytes";_bd "encoding/xml";_de "fmt";_dg "github.com/unidoc/unioffice";_bb "github.com/unidoc/unioffice/algo";_ef "github.com/unidoc/unioffice/common/tempstorage";_bg "github.com/unidoc/unioffice/schema/soo/pkg/relationships";_d "io";_gd "path";_e "sort";_c "strings";_g "time";);func MarshalXMLByTypeIndex (z *_b .Writer ,dt _dg .DocType ,typ string ,idx int ,v interface{})error {_gdc :=_dg .AbsoluteFilename (dt ,typ ,idx );return MarshalXML (z ,_gdc ,v );};func MarshalXMLByType (z *_b .Writer ,dt _dg .DocType ,typ string ,v interface{})error {_baf :=_dg .AbsoluteFilename (dt ,typ ,0);return MarshalXML (z ,_baf ,v );};func (_ac *DecodeMap )RecordIndex (path string ,idx int ){_ac ._eff [path ]=idx };var _eeab =[]byte {'\r','\n'};
// 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 (_bb *DecodeMap )AddTarget (filePath string ,ifc interface{},sourceFileType string ,idx uint32 )bool {if _bb ._bd ==nil {_bb ._bd =make (map[string ]Target );_bb ._daa =make (map[*_fa .Relationships ]string );_bb ._ad =make (map[string ]struct{});_bb ._gcc =make (map[string ]int );};_de :=_gf .Clean (filePath );if _ ,_fgc :=_bb ._ad [_de ];_fgc {return false ;};_bb ._ad [_de ]=struct{}{};_bb ._bd [_de ]=Target {Path :filePath ,Typ :sourceFileType ,Ifc :ifc ,Index :idx };return true ;};
func (_db *DecodeMap )AddTarget (filePath string ,ifc interface{},sourceFileType string ,idx uint32 )bool {if _db ._gfc ==nil {_db ._gfc =make (map[string ]Target );_db ._ca =make (map[*_bg .Relationships ]string );_db ._a =make (map[string ]struct{});_db ._eff =make (map[string ]int );};_cb :=_gd .Clean (filePath );if _ ,_gaeb :=_db ._a [_cb ];_gaeb {return false ;};_db ._a [_cb ]=struct{}{};_db ._gfc [_cb ]=Target {Path :filePath ,Typ :sourceFileType ,Ifc :ifc ,Index :idx };return true ;};
// Decode unmarshals the content of a *zip.File as XML to a given destination.
func Decode (f *_a .File ,dest interface{})error {_cgc ,_ecc :=f .Open ();if _ecc !=nil {return _gb .Errorf ("e\u0072r\u006f\u0072\u0020\u0072\u0065\u0061\u0064\u0069n\u0067\u0020\u0025\u0073: \u0025\u0073",f .Name ,_ecc );};defer _cgc .Close ();_ed :=_ab .NewDecoder (_cgc );if _bc :=_ed .Decode (dest );_bc !=nil {return _gb .Errorf ("e\u0072\u0072\u006f\u0072 d\u0065c\u006f\u0064\u0069\u006e\u0067 \u0025\u0073\u003a\u0020\u0025\u0073",f .Name ,_bc );};if _egc ,_af :=dest .(*_fa .Relationships );_af {for _bbc ,_fed :=range _egc .Relationship {switch _fed .TypeAttr {case _gc .OfficeDocumentTypeStrict :_egc .Relationship [_bbc ].TypeAttr =_gc .OfficeDocumentType ;case _gc .StylesTypeStrict :_egc .Relationship [_bbc ].TypeAttr =_gc .StylesType ;case _gc .ThemeTypeStrict :_egc .Relationship [_bbc ].TypeAttr =_gc .ThemeType ;case _gc .ControlTypeStrict :_egc .Relationship [_bbc ].TypeAttr =_gc .ControlType ;case _gc .SettingsTypeStrict :_egc .Relationship [_bbc ].TypeAttr =_gc .SettingsType ;case _gc .ImageTypeStrict :_egc .Relationship [_bbc ].TypeAttr =_gc .ImageType ;case _gc .CommentsTypeStrict :_egc .Relationship [_bbc ].TypeAttr =_gc .CommentsType ;case _gc .ThumbnailTypeStrict :_egc .Relationship [_bbc ].TypeAttr =_gc .ThumbnailType ;case _gc .DrawingTypeStrict :_egc .Relationship [_bbc ].TypeAttr =_gc .DrawingType ;case _gc .ChartTypeStrict :_egc .Relationship [_bbc ].TypeAttr =_gc .ChartType ;case _gc .ExtendedPropertiesTypeStrict :_egc .Relationship [_bbc ].TypeAttr =_gc .ExtendedPropertiesType ;case _gc .CustomXMLTypeStrict :_egc .Relationship [_bbc ].TypeAttr =_gc .CustomXMLType ;case _gc .WorksheetTypeStrict :_egc .Relationship [_bbc ].TypeAttr =_gc .WorksheetType ;case _gc .SharedStringsTypeStrict :_egc .Relationship [_bbc ].TypeAttr =_gc .SharedStringsType ;case _gc .TableTypeStrict :_egc .Relationship [_bbc ].TypeAttr =_gc .TableType ;case _gc .HeaderTypeStrict :_egc .Relationship [_bbc ].TypeAttr =_gc .HeaderType ;case _gc .FooterTypeStrict :_egc .Relationship [_bbc ].TypeAttr =_gc .FooterType ;case _gc .NumberingTypeStrict :_egc .Relationship [_bbc ].TypeAttr =_gc .NumberingType ;case _gc .FontTableTypeStrict :_egc .Relationship [_bbc ].TypeAttr =_gc .FontTableType ;case _gc .WebSettingsTypeStrict :_egc .Relationship [_bbc ].TypeAttr =_gc .WebSettingsType ;case _gc .FootNotesTypeStrict :_egc .Relationship [_bbc ].TypeAttr =_gc .FootNotesType ;case _gc .EndNotesTypeStrict :_egc .Relationship [_bbc ].TypeAttr =_gc .EndNotesType ;case _gc .SlideTypeStrict :_egc .Relationship [_bbc ].TypeAttr =_gc .SlideType ;case _gc .VMLDrawingTypeStrict :_egc .Relationship [_bbc ].TypeAttr =_gc .VMLDrawingType ;};};_g .Slice (_egc .Relationship ,func (_ba ,_dfe int )bool {_gfg :=_egc .Relationship [_ba ];_aa :=_egc .Relationship [_dfe ];return _e .NaturalLess (_gfg .IdAttr ,_aa .IdAttr );});};return nil ;};
// MarshalXML creates a file inside of a zip and marshals an object as xml, prefixing it
// with a standard XML header.
func MarshalXML (z *_a .Writer ,filename string ,v interface{})error {_dgc :=&_a .FileHeader {};_dgc .Method =_a .Deflate ;_dgc .Name =filename ;_dgc .SetModTime (_c .Now ());_ded ,_cd :=z .CreateHeader (_dgc );if _cd !=nil {return _gb .Errorf ("\u0063\u0072\u0065\u0061ti\u006e\u0067\u0020\u0025\u0073\u0020\u0069\u006e\u0020\u007a\u0069\u0070\u003a\u0020%\u0073",filename ,_cd );};_ ,_cd =_ded .Write ([]byte (XMLHeader ));if _cd !=nil {return _gb .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 ,_cd );};if _cd =_ab .NewEncoder (SelfClosingWriter {_ded }).Encode (v );_cd !=nil {return _gb .Errorf ("\u006d\u0061\u0072\u0073\u0068\u0061\u006c\u0069\u006e\u0067\u0020\u0025s\u003a\u0020\u0025\u0073",filename ,_cd );};_ ,_cd =_ded .Write (_dcf );return _cd ;};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";
// DecodeMap is used to walk a tree of relationships, decoding files and passing
// control back to the document.
type DecodeMap struct{_bd map[string ]Target ;_daa map[*_fa .Relationships ]string ;_cc []Target ;_eg OnNewRelationshipFunc ;_ad map[string ]struct{};_gcc map[string ]int ;};var _bf =[]byte {'/','>'};
// AddFileFromBytes takes a byte array and adds it at a given path to a zip file.
func AddFileFromBytes (z *_a .Writer ,zipPath string ,data []byte )error {_dea ,_egfb :=z .Create (zipPath );if _egfb !=nil {return _gb .Errorf ("e\u0072\u0072\u006f\u0072 c\u0072e\u0061\u0074\u0069\u006e\u0067 \u0025\u0073\u003a\u0020\u0025\u0073",zipPath ,_egfb );};_ ,_egfb =_b .Copy (_dea ,_dc .NewReader (data ));return _egfb ;};
// RelationsPathFor returns the relations path for a given filename.
func RelationsPathFor (path string )string {_gcf :=_d .Split (path ,"\u002f");_gg :=_d .Join (_gcf [0:len (_gcf )-1],"\u002f");_dagg :=_gcf [len (_gcf )-1];_gg +="\u002f_\u0072\u0065\u006c\u0073\u002f";_dagg +="\u002e\u0072\u0065l\u0073";return _gg +_dagg ;};
// ExtractToDiskTmp extracts a zip file to a temporary file in a given path,
// returning the name of the file.
func ExtractToDiskTmp (f *_b .File ,path string )(string ,error ){_gffc ,_ce :=_ef .TempFile (path ,"\u007a\u007a");if _ce !=nil {return "",_ce ;};defer _gffc .Close ();_fab ,_ce :=f .Open ();if _ce !=nil {return "",_ce ;};defer _fab .Close ();_ ,_ce =_d .Copy (_gffc ,_fab );if _ce !=nil {return "",_ce ;};return _gffc .Name (),nil ;};
// SelfClosingWriter wraps a writer and replaces XML tags of the
// type <foo></foo> with <foo/>
type SelfClosingWriter struct{W _b .Writer ;};type Target struct{Path string ;Typ string ;Ifc interface{};Index uint32 ;};
type SelfClosingWriter struct{W _d .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 *_a .Writer ,zipPath ,storagePath string )error {_gfc ,_dbd :=z .Create (zipPath );if _dbd !=nil {return _gb .Errorf ("e\u0072\u0072\u006f\u0072 c\u0072e\u0061\u0074\u0069\u006e\u0067 \u0025\u0073\u003a\u0020\u0025\u0073",zipPath ,_dbd );};_egf ,_dbd :=_fg .Open (storagePath );if _dbd !=nil {return _gb .Errorf ("e\u0072r\u006f\u0072\u0020\u006f\u0070\u0065\u006e\u0069n\u0067\u0020\u0025\u0073: \u0025\u0073",storagePath ,_dbd );};defer _egf .Close ();_ ,_dbd =_b .Copy (_gfc ,_egf );return _dbd ;};func (_efg SelfClosingWriter )Write (b []byte )(int ,error ){_fgb :=0;_ceg :=0;for _fc :=0;_fc < len (b )-2;_fc ++{if b [_fc ]=='>'&&b [_fc +1]=='<'&&b [_fc +2]=='/'{_ede :=[]byte {};_ga :=_fc ;for _ecb :=_fc ;_ecb >=0;_ecb --{if b [_ecb ]==' '{_ga =_ecb ;}else if b [_ecb ]=='<'{_ede =b [_ecb +1:_ga ];break ;};};_cgg :=[]byte {};for _gfcc :=_fc +3;_gfcc < len (b );_gfcc ++{if b [_gfcc ]=='>'{_cgg =b [_fc +3:_gfcc ];break ;};};if !_dc .Equal (_ede ,_cgg ){continue ;};_cge ,_aafa :=_efg .W .Write (b [_fgb :_fc ]);if _aafa !=nil {return _ceg +_cge ,_aafa ;};_ceg +=_cge ;_ ,_aafa =_efg .W .Write (_bf );if _aafa !=nil {return _ceg ,_aafa ;};_ceg +=3;for _dbeb :=_fc +2;_dbeb < len (b )&&b [_dbeb ]!='>';_dbeb ++{_ceg ++;_fgb =_dbeb +2;_fc =_fgb ;};};};_cggc ,_edc :=_efg .W .Write (b [_fgb :]);return _cggc +_ceg ,_edc ;};
func AddFileFromDisk (z *_b .Writer ,zipPath ,storagePath string )error {_ffd ,_ba :=z .Create (zipPath );if _ba !=nil {return _de .Errorf ("e\u0072\u0072\u006f\u0072 c\u0072e\u0061\u0074\u0069\u006e\u0067 \u0025\u0073\u003a\u0020\u0025\u0073",zipPath ,_ba );};_bcc ,_ba :=_ef .Open (storagePath );if _ba !=nil {return _de .Errorf ("e\u0072r\u006f\u0072\u0020\u006f\u0070\u0065\u006e\u0069n\u0067\u0020\u0025\u0073: \u0025\u0073",storagePath ,_ba );};defer _bcc .Close ();_ ,_ba =_d .Copy (_ffd ,_bcc );return _ba ;};
// SetOnNewRelationshipFunc sets the function to be called when a new
// relationship has been discovered.
func (_cf *DecodeMap )SetOnNewRelationshipFunc (fn OnNewRelationshipFunc ){_cf ._eg =fn };
// DecodeMap is used to walk a tree of relationships, decoding files and passing
// control back to the document.
type DecodeMap struct{_gfc map[string ]Target ;_ca map[*_bg .Relationships ]string ;_eb []Target ;_be OnNewRelationshipFunc ;_a map[string ]struct{};_eff map[string ]int ;};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";
// OnNewRelationshipFunc is called when a new relationship has been discovered.
//
@ -64,7 +47,24 @@ func (_cf *DecodeMap )SetOnNewRelationshipFunc (fn OnNewRelationshipFunc ){_cf .
// 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 (_da *DecodeMap ,_ag ,_cg string ,_dad []*_a .File ,_dd *_fa .Relationship ,_fe Target )error ;
type OnNewRelationshipFunc func (_gf *DecodeMap ,_ga ,_gg string ,_fd []*_b .File ,_gae *_bg .Relationship ,_cc Target )error ;
// AddFileFromBytes takes a byte array and adds it at a given path to a zip file.
func AddFileFromBytes (z *_b .Writer ,zipPath string ,data []byte )error {_def ,_ad :=z .Create (zipPath );if _ad !=nil {return _de .Errorf ("e\u0072\u0072\u006f\u0072 c\u0072e\u0061\u0074\u0069\u006e\u0067 \u0025\u0073\u003a\u0020\u0025\u0073",zipPath ,_ad );};_ ,_ad =_d .Copy (_def ,_ee .NewReader (data ));return _ad ;};
// Decode unmarshals the content of a *zip.File as XML to a given destination.
func Decode (f *_b .File ,dest interface{})error {_gbc ,_fde :=f .Open ();if _fde !=nil {return _de .Errorf ("e\u0072r\u006f\u0072\u0020\u0072\u0065\u0061\u0064\u0069n\u0067\u0020\u0025\u0073: \u0025\u0073",f .Name ,_fde );};defer _gbc .Close ();_ddg :=_bd .NewDecoder (_gbc );if _fb :=_ddg .Decode (dest );_fb !=nil {return _de .Errorf ("e\u0072\u0072\u006f\u0072 d\u0065c\u006f\u0064\u0069\u006e\u0067 \u0025\u0073\u003a\u0020\u0025\u0073",f .Name ,_fb );};if _gda ,_aa :=dest .(*_bg .Relationships );_aa {for _aae ,_fc :=range _gda .Relationship {switch _fc .TypeAttr {case _dg .OfficeDocumentTypeStrict :_gda .Relationship [_aae ].TypeAttr =_dg .OfficeDocumentType ;case _dg .StylesTypeStrict :_gda .Relationship [_aae ].TypeAttr =_dg .StylesType ;case _dg .ThemeTypeStrict :_gda .Relationship [_aae ].TypeAttr =_dg .ThemeType ;case _dg .ControlTypeStrict :_gda .Relationship [_aae ].TypeAttr =_dg .ControlType ;case _dg .SettingsTypeStrict :_gda .Relationship [_aae ].TypeAttr =_dg .SettingsType ;case _dg .ImageTypeStrict :_gda .Relationship [_aae ].TypeAttr =_dg .ImageType ;case _dg .CommentsTypeStrict :_gda .Relationship [_aae ].TypeAttr =_dg .CommentsType ;case _dg .ThumbnailTypeStrict :_gda .Relationship [_aae ].TypeAttr =_dg .ThumbnailType ;case _dg .DrawingTypeStrict :_gda .Relationship [_aae ].TypeAttr =_dg .DrawingType ;case _dg .ChartTypeStrict :_gda .Relationship [_aae ].TypeAttr =_dg .ChartType ;case _dg .ExtendedPropertiesTypeStrict :_gda .Relationship [_aae ].TypeAttr =_dg .ExtendedPropertiesType ;case _dg .CustomXMLTypeStrict :_gda .Relationship [_aae ].TypeAttr =_dg .CustomXMLType ;case _dg .WorksheetTypeStrict :_gda .Relationship [_aae ].TypeAttr =_dg .WorksheetType ;case _dg .SharedStringsTypeStrict :_gda .Relationship [_aae ].TypeAttr =_dg .SharedStringsType ;case _dg .TableTypeStrict :_gda .Relationship [_aae ].TypeAttr =_dg .TableType ;case _dg .HeaderTypeStrict :_gda .Relationship [_aae ].TypeAttr =_dg .HeaderType ;case _dg .FooterTypeStrict :_gda .Relationship [_aae ].TypeAttr =_dg .FooterType ;case _dg .NumberingTypeStrict :_gda .Relationship [_aae ].TypeAttr =_dg .NumberingType ;case _dg .FontTableTypeStrict :_gda .Relationship [_aae ].TypeAttr =_dg .FontTableType ;case _dg .WebSettingsTypeStrict :_gda .Relationship [_aae ].TypeAttr =_dg .WebSettingsType ;case _dg .FootNotesTypeStrict :_gda .Relationship [_aae ].TypeAttr =_dg .FootNotesType ;case _dg .EndNotesTypeStrict :_gda .Relationship [_aae ].TypeAttr =_dg .EndNotesType ;case _dg .SlideTypeStrict :_gda .Relationship [_aae ].TypeAttr =_dg .SlideType ;case _dg .VMLDrawingTypeStrict :_gda .Relationship [_aae ].TypeAttr =_dg .VMLDrawingType ;};};_e .Slice (_gda .Relationship ,func (_eea ,_gbg int )bool {_acb :=_gda .Relationship [_eea ];_aec :=_gda .Relationship [_gbg ];return _bb .NaturalLess (_acb .IdAttr ,_aec .IdAttr );});};return nil ;};
// SetOnNewRelationshipFunc sets the function to be called when a new
// relationship has been discovered.
func (_ff *DecodeMap )SetOnNewRelationshipFunc (fn OnNewRelationshipFunc ){_ff ._be =fn };type Target struct{Path string ;Typ string ;Ifc interface{};Index uint32 ;};
// RelationsPathFor returns the relations path for a given filename.
func RelationsPathFor (path string )string {_cce :=_c .Split (path ,"\u002f");_aca :=_c .Join (_cce [0:len (_cce )-1],"\u002f");_ae :=_cce [len (_cce )-1];_aca +="\u002f_\u0072\u0065\u006c\u0073\u002f";_ae +="\u002e\u0072\u0065l\u0073";return _aca +_ae ;};var _ddc =[]byte {'/','>'};
// MarshalXML creates a file inside of a zip and marshals an object as xml, prefixing it
// with a standard XML header.
func MarshalXML (z *_b .Writer ,filename string ,v interface{})error {_ebb :=&_b .FileHeader {};_ebb .Method =_b .Deflate ;_ebb .Name =filename ;_ebb .SetModTime (_g .Now ());_eac ,_faa :=z .CreateHeader (_ebb );if _faa !=nil {return _de .Errorf ("\u0063\u0072\u0065\u0061ti\u006e\u0067\u0020\u0025\u0073\u0020\u0069\u006e\u0020\u007a\u0069\u0070\u003a\u0020%\u0073",filename ,_faa );};_ ,_faa =_eac .Write ([]byte (XMLHeader ));if _faa !=nil {return _de .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 ,_faa );};if _faa =_bd .NewEncoder (SelfClosingWriter {_eac }).Encode (v );_faa !=nil {return _de .Errorf ("\u006d\u0061\u0072\u0073\u0068\u0061\u006c\u0069\u006e\u0067\u0020\u0025s\u003a\u0020\u0025\u0073",filename ,_faa );};_ ,_faa =_eac .Write (_eeab );return _faa ;};
// Decode loops decoding targets registered with AddTarget and calling th
func (_db *DecodeMap )Decode (files []*_a .File )error {_bbg :=1;for _bbg > 0{for len (_db ._cc )> 0{_cb :=_db ._cc [0];_db ._cc =_db ._cc [1:];_ef :=_cb .Ifc .(*_fa .Relationships );for _ ,_cbf :=range _ef .Relationship {_fb ,_ :=_db ._daa [_ef ];_db ._eg (_db ,_fb +_cbf .TargetAttr ,_cbf .TypeAttr ,files ,_cbf ,_cb );};};for _fag ,_dag :=range files {if _dag ==nil {continue ;};if _agf ,_dbe :=_db ._bd [_dag .Name ];_dbe {delete (_db ._bd ,_dag .Name );if _ee :=Decode (_dag ,_agf .Ifc );_ee !=nil {return _ee ;};files [_fag ]=nil ;if _fad ,_be :=_agf .Ifc .(*_fa .Relationships );_be {_db ._cc =append (_db ._cc ,_agf );_dde ,_ :=_gf .Split (_gf .Clean (_dag .Name +"\u002f\u002e\u002e\u002f"));_db ._daa [_fad ]=_dde ;_bbg ++;};};};_bbg --;};return nil ;};
func (_gc *DecodeMap )Decode (files []*_b .File )error {_ab :=1;for _ab > 0{for len (_gc ._eb )> 0{_gff :=_gc ._eb [0];_gc ._eb =_gc ._eb [1:];_dd :=_gff .Ifc .(*_bg .Relationships );for _ ,_dgf :=range _dd .Relationship {_cf ,_ :=_gc ._ca [_dd ];_gc ._be (_gc ,_cf +_dgf .TargetAttr ,_dgf .TypeAttr ,files ,_dgf ,_gff );};};for _afc ,_ag :=range files {if _ag ==nil {continue ;};if _bef ,_fa :=_gc ._gfc [_ag .Name ];_fa {delete (_gc ._gfc ,_ag .Name );if _gb :=Decode (_ag ,_bef .Ifc );_gb !=nil {return _gb ;};files [_afc ]=nil ;if _ea ,_ffc :=_bef .Ifc .(*_bg .Relationships );_ffc {_gc ._eb =append (_gc ._eb ,_bef );_ec ,_ :=_gd .Split (_gd .Clean (_ag .Name +"\u002f\u002e\u002e\u002f"));_gc ._ca [_ea ]=_ec ;_ab ++;};};};_ab --;};return nil ;};func (_gcg SelfClosingWriter )Write (b []byte )(int ,error ){_gce :=0;_cfa :=0;for _cfe :=0;_cfe < len (b )-2;_cfe ++{if b [_cfe ]=='>'&&b [_cfe +1]=='<'&&b [_cfe +2]=='/'{_ccc :=[]byte {};_gcf :=_cfe ;for _dca :=_cfe ;_dca >=0;_dca --{if b [_dca ]==' '{_gcf =_dca ;}else if b [_dca ]=='<'{_ccc =b [_dca +1:_gcf ];break ;};};_defa :=[]byte {};for _da :=_cfe +3;_da < len (b );_da ++{if b [_da ]=='>'{_defa =b [_cfe +3:_da ];break ;};};if !_ee .Equal (_ccc ,_defa ){continue ;};_ebg ,_gfca :=_gcg .W .Write (b [_gce :_cfe ]);if _gfca !=nil {return _cfa +_ebg ,_gfca ;};_cfa +=_ebg ;_ ,_gfca =_gcg .W .Write (_ddc );if _gfca !=nil {return _cfa ,_gfca ;};_cfa +=3;for _befb :=_cfe +2;_befb < len (b )&&b [_befb ]!='>';_befb ++{_cfa ++;_gce =_befb +2;_cfe =_gce ;};};};_fdd ,_aee :=_gcg .W .Write (b [_gce :]);return _fdd +_cfa ,_aee ;};func (_bdb *DecodeMap )IndexFor (path string )int {return _bdb ._eff [path ]};