Merge pull request #481 from unidoc-build/prep-rc-v1.21.1

Prepare Release v1.21.1
This commit is contained in:
Gunnsteinn Hall 2022-12-06 16:44:36 +00:00 committed by GitHub
commit 4ac393beab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
60 changed files with 25142 additions and 25142 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 _g "strconv";func _cb (_gc byte )bool {return _gc >='0'&&_gc <='9'};
package algo ;import _g "strconv";func _f (_be byte )bool {return _be >='0'&&_be <='9'};func RepeatString (s string ,cnt int )string {if cnt <=0{return "";};_fc :=make ([]byte ,len (s )*cnt );_df :=[]byte (s );for _da :=0;_da < cnt ;_da ++{copy (_fc [_da :],_df );};return string (_fc );};
// NaturalLess compares two strings in a human manner so rId2 sorts less than rId10
func NaturalLess (lhs ,rhs string )bool {_e ,_d :=0,0;for _e < len (lhs )&&_d < len (rhs ){_ge :=lhs [_e ];_cg :=rhs [_d ];_f :=_cb (_ge );_ee :=_cb (_cg );switch {case _f &&!_ee :return true ;case !_f &&_ee :return false ;case !_f &&!_ee :if _ge !=_cg {return _ge < _cg ;};_e ++;_d ++;default:_a :=_e +1;_eg :=_d +1;for _a < len (lhs )&&_cb (lhs [_a ]){_a ++;};for _eg < len (rhs )&&_cb (rhs [_eg ]){_eg ++;};_cf ,_ :=_g .ParseUint (lhs [_e :_a ],10,64);_dg ,_ :=_g .ParseUint (rhs [_e :_eg ],10,64);if _cf !=_dg {return _cf < _dg ;};_e =_a ;_d =_eg ;};};return len (lhs )< len (rhs );};func RepeatString (s string ,cnt int )string {if cnt <=0{return "";};_df :=make ([]byte ,len (s )*cnt );_aa :=[]byte (s );for _dd :=0;_dd < cnt ;_dd ++{copy (_df [_dd :],_aa );};return string (_df );};
func NaturalLess (lhs ,rhs string )bool {_e ,_d :=0,0;for _e < len (lhs )&&_d < len (rhs ){_c :=lhs [_e ];_dc :=rhs [_d ];_ed :=_f (_c );_gb :=_f (_dc );switch {case _ed &&!_gb :return true ;case !_ed &&_gb :return false ;case !_ed &&!_gb :if _c !=_dc {return _c < _dc ;};_e ++;_d ++;default:_ea :=_e +1;_eab :=_d +1;for _ea < len (lhs )&&_f (lhs [_ea ]){_ea ++;};for _eab < len (rhs )&&_f (rhs [_eab ]){_eab ++;};_cc ,_ :=_g .ParseUint (lhs [_e :_ea ],10,64);_ga ,_ :=_g .ParseUint (rhs [_e :_eab ],10,64);if _cc !=_ga {return _cc < _ga ;};_e =_ea ;_d =_eab ;};};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 (_f "fmt";_ge "github.com/unidoc/unioffice";_fc "github.com/unidoc/unioffice/color";_fa "github.com/unidoc/unioffice/drawing";_fb "github.com/unidoc/unioffice/measurement";_b "github.com/unidoc/unioffice/schema/soo/dml";_g "github.com/unidoc/unioffice/schema/soo/dml/chart";_a "math/rand";);type GridLines struct{_bcad *_g .CT_ChartLines };
// AddAreaChart adds a new area chart to a chart.
func (_ae Chart )AddAreaChart ()AreaChart {_edd :=_g .NewCT_PlotAreaChoice ();_ae ._gcf .Chart .PlotArea .Choice =append (_ae ._gcf .Chart .PlotArea .Choice ,_edd );_edd .AreaChart =_g .NewCT_AreaChart ();_efb :=AreaChart {_ab :_edd .AreaChart };_efb .InitializeDefaults ();return _efb ;};
// AddArea3DChart adds a new area chart to a chart.
func (_aaa Chart )AddArea3DChart ()Area3DChart {_dfd (_aaa ._gcf .Chart );_ac :=_g .NewCT_PlotAreaChoice ();_aaa ._gcf .Chart .PlotArea .Choice =append (_aaa ._gcf .Chart .PlotArea .Choice ,_ac );_ac .Area3DChart =_g .NewCT_Area3DChart ();_ccb :=Area3DChart {_e :_ac .Area3DChart };_ccb .InitializeDefaults ();return _ccb ;};
// AddLegend adds a legend to a chart, replacing any existing legend.
func (_eaa Chart )AddLegend ()Legend {_eaa ._gcf .Chart .Legend =_g .NewCT_Legend ();_ceaf :=MakeLegend (_eaa ._gcf .Chart .Legend );_ceaf .InitializeDefaults ();return _ceaf ;};
// Labels returns the data label properties.
func (_gcbe LineChartSeries )Labels ()DataLabels {if _gcbe ._fda .DLbls ==nil {_gcbe ._fda .DLbls =_g .NewCT_DLbls ();};return MakeDataLabels (_gcbe ._fda .DLbls );};
// X returns the inner wrapped XML type.
func (_fcbb Surface3DChart )X ()*_g .CT_Surface3DChart {return _fcbb ._dgb };
// InitializeDefaults the bar chart to its defaults
func (_fcde PieOfPieChart )InitializeDefaults (){_fcde ._adc .VaryColors =_g .NewCT_Boolean ();_fcde ._adc .VaryColors .ValAttr =_ge .Bool (true );_fcde .SetType (_g .ST_OfPieTypePie );_fcde ._adc .SecondPieSize =_g .NewCT_SecondPieSize ();_fcde ._adc .SecondPieSize .ValAttr =&_g .ST_SecondPieSize {};_fcde ._adc .SecondPieSize .ValAttr .ST_SecondPieSizeUShort =_ge .Uint16 (75);_dega :=_g .NewCT_ChartLines ();_dega .SpPr =_b .NewCT_ShapeProperties ();_bbfe :=_fa .MakeShapeProperties (_dega .SpPr );_bbfe .LineProperties ().SetSolidFill (_fc .Auto );_fcde ._adc .SerLines =append (_fcde ._adc .SerLines ,_dega );};
// X returns the inner wrapped XML type.
func (_fgd AreaChartSeries )X ()*_g .CT_AreaSer {return _fgd ._afa };
// X returns the inner wrapped XML type.
func (_acge LineChart )X ()*_g .CT_LineChart {return _acge ._fbd };
// BubbleChart is a 2D Bubble chart.
type BubbleChart struct{chartBase ;_egb *_g .CT_BubbleChart ;};type Line3DChart struct{chartBase ;_dbgc *_g .CT_Line3DChart ;};
// AddCategoryAxis adds a category axis.
func (_gabd Chart )AddCategoryAxis ()CategoryAxis {_afd :=_g .NewCT_CatAx ();if _gabd ._gcf .Chart .PlotArea .CChoice ==nil {_gabd ._gcf .Chart .PlotArea .CChoice =_g .NewCT_PlotAreaChoice1 ();};_afd .AxId =_g .NewCT_UnsignedInt ();_afd .AxId .ValAttr =0x7FFFFFFF&_a .Uint32 ();_gabd ._gcf .Chart .PlotArea .CChoice .CatAx =append (_gabd ._gcf .Chart .PlotArea .CChoice .CatAx ,_afd );_afd .Auto =_g .NewCT_Boolean ();_afd .Auto .ValAttr =_ge .Bool (true );_afd .Delete =_g .NewCT_Boolean ();_afd .Delete .ValAttr =_ge .Bool (false );_cfge :=MakeCategoryAxis (_afd );_cfge .InitializeDefaults ();return _cfge ;};
package chart ;import (_e "fmt";_ge "github.com/unidoc/unioffice";_fg "github.com/unidoc/unioffice/color";_ec "github.com/unidoc/unioffice/drawing";_a "github.com/unidoc/unioffice/measurement";_gdb "github.com/unidoc/unioffice/schema/soo/dml";_gd "github.com/unidoc/unioffice/schema/soo/dml/chart";_f "math/rand";);
// SetNumberReference is used to set the source data to a range of cells containing
// numbers.
func (_dcfg CategoryAxisDataSource )SetNumberReference (s string ){_dcfg ._bg .Choice =_g .NewCT_AxDataSourceChoice ();_dcfg ._bg .Choice .NumRef =_g .NewCT_NumRef ();_dcfg ._bg .Choice .NumRef .F =s ;};func (_gegd SeriesAxis )AxisID ()uint32 {return _gegd ._ecge .AxId .ValAttr };func (_ddb DataLabels )SetShowCategoryName (b bool ){_ddb .ensureChoice ();_ddb ._dca .Choice .ShowCatName =_g .NewCT_Boolean ();_ddb ._dca .Choice .ShowCatName .ValAttr =_ge .Bool (b );};
func (_ecdb CategoryAxisDataSource )SetNumberReference (s string ){_ecdb ._gf .Choice =_gd .NewCT_AxDataSourceChoice ();_ecdb ._gf .Choice .NumRef =_gd .NewCT_NumRef ();_ecdb ._gf .Choice .NumRef .F =s ;};func MakeLegend (l *_gd .CT_Legend )Legend {return Legend {l }};
// Axis is the interface implemented by different axes when assigning to a
// chart.
type Axis interface{AxisID ()uint32 ;};
// BubbleChart is a 2D Bubble chart.
type BubbleChart struct{chartBase ;_ga *_gd .CT_BubbleChart ;};
// AddSeries adds a default series to an Doughnut chart.
func (_aad DoughnutChart )AddSeries ()PieChartSeries {_dbg :=_g .NewCT_PieSer ();_aad ._fecf .Ser =append (_aad ._fecf .Ser ,_dbg );_dbg .Idx .ValAttr =uint32 (len (_aad ._fecf .Ser )-1);_dbg .Order .ValAttr =uint32 (len (_aad ._fecf .Ser )-1);_fbf :=PieChartSeries {_dbg };_fbf .InitializeDefaults ();return _fbf ;};type CategoryAxis struct{_gda *_g .CT_CatAx };func (_fdg ValueAxis )SetPosition (p _g .ST_AxPos ){_fdg ._bge .AxPos =_g .NewCT_AxPos ();_fdg ._bge .AxPos .ValAttr =p ;};
// Index returns the index of the series
func (_cefb SurfaceChartSeries )Index ()uint32 {return _cefb ._gdc .Idx .ValAttr };
// AddDoughnutChart adds a new doughnut (pie with a hole in the center) chart to a chart.
func (_edc Chart )AddDoughnutChart ()DoughnutChart {_edf :=_g .NewCT_PlotAreaChoice ();_edc ._gcf .Chart .PlotArea .Choice =append (_edc ._gcf .Chart .PlotArea .Choice ,_edf );_edf .DoughnutChart =_g .NewCT_DoughnutChart ();_fddg :=DoughnutChart {_fecf :_edf .DoughnutChart };_fddg .InitializeDefaults ();return _fddg ;};func (_dcf CategoryAxis )SetPosition (p _g .ST_AxPos ){_dcf ._gda .AxPos =_g .NewCT_AxPos ();_dcf ._gda .AxPos .ValAttr =p ;};
// SetType sets the type the secone pie to either pie or bar
func (_eabc PieOfPieChart )SetType (t _g .ST_OfPieType ){_eabc ._adc .OfPieType .ValAttr =t };
// X returns the inner wrapped XML type.
func (_fdc BarChart )X ()*_g .CT_BarChart {return _fdc ._ec };
// BubbleChartSeries is a series to be used on a Bubble chart.
type BubbleChartSeries struct{_bac *_g .CT_BubbleSer };func (_cc CategoryAxis )MajorGridLines ()GridLines {if _cc ._gda .MajorGridlines ==nil {_cc ._gda .MajorGridlines =_g .NewCT_ChartLines ();};return GridLines {_cc ._gda .MajorGridlines };};
// PieChartSeries is a series to be used on an Pie chart.
type PieChartSeries struct{_gfg *_g .CT_PieSer };
// DoughnutChart is a Doughnut chart.
type DoughnutChart struct{chartBase ;_fecf *_g .CT_DoughnutChart ;};type Title struct{_cbec *_g .CT_Title };
// AddSeries adds a default series to a Surface chart.
func (_fecg Surface3DChart )AddSeries ()SurfaceChartSeries {_dbfg :=_fecg .nextColor (len (_fecg ._dgb .Ser ));_cac :=_g .NewCT_SurfaceSer ();_fecg ._dgb .Ser =append (_fecg ._dgb .Ser ,_cac );_cac .Idx .ValAttr =uint32 (len (_fecg ._dgb .Ser )-1);_cac .Order .ValAttr =uint32 (len (_fecg ._dgb .Ser )-1);_dbfa :=SurfaceChartSeries {_cac };_dbfa .InitializeDefaults ();_dbfa .Properties ().LineProperties ().SetSolidFill (_dbfg );return _dbfa ;};
// InitializeDefaults the bar chart to its defaults
func (_ced DoughnutChart )InitializeDefaults (){_ced ._fecf .VaryColors =_g .NewCT_Boolean ();_ced ._fecf .VaryColors .ValAttr =_ge .Bool (true );_ced ._fecf .HoleSize =_g .NewCT_HoleSize ();_ced ._fecf .HoleSize .ValAttr =&_g .ST_HoleSize {};_ced ._fecf .HoleSize .ValAttr .ST_HoleSizeUByte =_ge .Uint8 (50);};
// SetDisplayBlanksAs controls how missing values are displayed.
func (_feb Chart )SetDisplayBlanksAs (v _g .ST_DispBlanksAs ){_feb ._gcf .Chart .DispBlanksAs =_g .NewCT_DispBlanksAs ();_feb ._gcf .Chart .DispBlanksAs .ValAttr =v ;};
// X returns the inner wrapped XML type.
func (_deae ScatterChart )X ()*_g .CT_ScatterChart {return _deae ._fdcg };
// X returns the inner wrapped XML type.
func (_fba BubbleChart )X ()*_g .CT_BubbleChart {return _fba ._egb };func (_cbgc DateAxis )SetMajorTickMark (m _g .ST_TickMark ){if m ==_g .ST_TickMarkUnset {_cbgc ._acg .MajorTickMark =nil ;}else {_cbgc ._acg .MajorTickMark =_g .NewCT_TickMark ();_cbgc ._acg .MajorTickMark .ValAttr =m ;};};
// X returns the inner wrapped XML type.
func (_dgc PieOfPieChart )X ()*_g .CT_OfPieChart {return _dgc ._adc };func (_gbda SeriesAxis )SetCrosses (axis Axis ){_gbda ._ecge .CrossAx .ValAttr =axis .AxisID ()};func (_ddgd LineChartSeries )InitializeDefaults (){_ddgd .Properties ().LineProperties ().SetWidth (1*_fb .Point );_ddgd .Properties ().LineProperties ().SetSolidFill (_fc .Black );_ddgd .Properties ().LineProperties ().SetJoin (_fa .LineJoinRound );_ddgd .Marker ().SetSymbol (_g .ST_MarkerStyleNone );_ddgd .Labels ().SetShowLegendKey (false );_ddgd .Labels ().SetShowValue (false );_ddgd .Labels ().SetShowPercent (false );_ddgd .Labels ().SetShowCategoryName (false );_ddgd .Labels ().SetShowSeriesName (false );_ddgd .Labels ().SetShowLeaderLines (false );};
// X returns the inner wrapped XML type.
func (_gab Chart )X ()*_g .ChartSpace {return _gab ._gcf };func MakeSeriesAxis (x *_g .CT_SerAx )SeriesAxis {return SeriesAxis {x }};func (_fdcd CategoryAxis )InitializeDefaults (){_fdcd .SetPosition (_g .ST_AxPosB );_fdcd .SetMajorTickMark (_g .ST_TickMarkOut );_fdcd .SetMinorTickMark (_g .ST_TickMarkIn );_fdcd .SetTickLabelPosition (_g .ST_TickLblPosNextTo );_fdcd .MajorGridLines ().Properties ().LineProperties ().SetSolidFill (_fc .LightGray );_fdcd .Properties ().LineProperties ().SetSolidFill (_fc .Black );};func (_bcbg Title )SetText (s string ){if _bcbg ._cbec .Tx ==nil {_bcbg ._cbec .Tx =_g .NewCT_Tx ();};if _bcbg ._cbec .Tx .Choice .Rich ==nil {_bcbg ._cbec .Tx .Choice .Rich =_b .NewCT_TextBody ();};var _gecb *_b .CT_TextParagraph ;if len (_bcbg ._cbec .Tx .Choice .Rich .P )==0{_gecb =_b .NewCT_TextParagraph ();_bcbg ._cbec .Tx .Choice .Rich .P =[]*_b .CT_TextParagraph {_gecb };}else {_gecb =_bcbg ._cbec .Tx .Choice .Rich .P [0];};var _beec *_b .EG_TextRun ;if len (_gecb .EG_TextRun )==0{_beec =_b .NewEG_TextRun ();_gecb .EG_TextRun =[]*_b .EG_TextRun {_beec };}else {_beec =_gecb .EG_TextRun [0];};if _beec .R ==nil {_beec .R =_b .NewCT_RegularTextRun ();};_beec .R .T =s ;};
// CategoryAxis returns the category data source.
func (_fgg BarChartSeries )CategoryAxis ()CategoryAxisDataSource {if _fgg ._aac .Cat ==nil {_fgg ._aac .Cat =_gd .NewCT_AxDataSource ();};return MakeAxisDataSource (_fgg ._aac .Cat );};
// SetText sets the series text.
func (_efgfg RadarChartSeries )SetText (s string ){_efgfg ._gbc .Tx =_g .NewCT_SerTx ();_efgfg ._gbc .Tx .Choice .V =&s ;};
func (_aabb PieChartSeries )SetText (s string ){_aabb ._cdg .Tx =_gd .NewCT_SerTx ();_aabb ._cdg .Tx .Choice .V =&s ;};
// SetValues is used to set the source data to a set of values.
func (_ag CategoryAxisDataSource )SetValues (v []string ){_ag ._bg .Choice =_g .NewCT_AxDataSourceChoice ();_ag ._bg .Choice .StrLit =_g .NewCT_StrData ();_ag ._bg .Choice .StrLit .PtCount =_g .NewCT_UnsignedInt ();_ag ._bg .Choice .StrLit .PtCount .ValAttr =uint32 (len (v ));for _ffa ,_fcbd :=range v {_ag ._bg .Choice .StrLit .Pt =append (_ag ._bg .Choice .StrLit .Pt ,&_g .CT_StrVal {IdxAttr :uint32 (_ffa ),V :_fcbd });};};
// AddSeries adds a default series to a bar chart.
func (_egg BarChart )AddSeries ()BarChartSeries {_fgdd :=_egg .nextColor (len (_egg ._ec .Ser ));_fdd :=_g .NewCT_BarSer ();_egg ._ec .Ser =append (_egg ._ec .Ser ,_fdd );_fdd .Idx .ValAttr =uint32 (len (_egg ._ec .Ser )-1);_fdd .Order .ValAttr =uint32 (len (_egg ._ec .Ser )-1);_egc :=BarChartSeries {_fdd };_egc .InitializeDefaults ();_egc .Properties ().SetSolidFill (_fgdd );return _egc ;};
// AddPieChart adds a new pie chart to a chart.
func (_gdeb Chart )AddPieChart ()PieChart {_bec :=_g .NewCT_PlotAreaChoice ();_gdeb ._gcf .Chart .PlotArea .Choice =append (_gdeb ._gcf .Chart .PlotArea .Choice ,_bec );_bec .PieChart =_g .NewCT_PieChart ();_acf :=PieChart {_agd :_bec .PieChart };_acf .InitializeDefaults ();return _acf ;};
// Properties returns the line chart series shape properties.
func (_egdb ScatterChartSeries )Properties ()_fa .ShapeProperties {if _egdb ._fag .SpPr ==nil {_egdb ._fag .SpPr =_b .NewCT_ShapeProperties ();};return _fa .MakeShapeProperties (_egdb ._fag .SpPr );};type DataLabels struct{_dca *_g .CT_DLbls };func (_ccbe ValueAxis )SetCrosses (axis Axis ){_ccbe ._bge .CrossAx .ValAttr =axis .AxisID ()};
// AddAxis adds an axis to a Surface chart.
func (_dfg SurfaceChart )AddAxis (axis Axis ){_bce :=_g .NewCT_UnsignedInt ();_bce .ValAttr =axis .AxisID ();_dfg ._edeb .AxId =append (_dfg ._edeb .AxId ,_bce );};
// InitializeDefaults the Stock chart to its defaults
func (_fgeg StockChart )InitializeDefaults (){_fgeg ._gec .HiLowLines =_g .NewCT_ChartLines ();_fgeg ._gec .UpDownBars =_g .NewCT_UpDownBars ();_fgeg ._gec .UpDownBars .GapWidth =_g .NewCT_GapAmount ();_fgeg ._gec .UpDownBars .GapWidth .ValAttr =&_g .ST_GapAmount {};_fgeg ._gec .UpDownBars .GapWidth .ValAttr .ST_GapAmountUShort =_ge .Uint16 (150);_fgeg ._gec .UpDownBars .UpBars =_g .NewCT_UpDownBar ();_fgeg ._gec .UpDownBars .DownBars =_g .NewCT_UpDownBar ();};
// Values returns the value data source.
func (_afe BubbleChartSeries )Values ()NumberDataSource {if _afe ._bac .YVal ==nil {_afe ._bac .YVal =_g .NewCT_NumDataSource ();};return MakeNumberDataSource (_afe ._bac .YVal );};
// Area3DChart is an area chart that has a shaded area underneath a curve.
type Area3DChart struct{chartBase ;_ag *_gd .CT_Area3DChart ;};type CategoryAxis struct{_ggc *_gd .CT_CatAx };
// X returns the inner wrapped XML type.
func (_gcd PieChart )X ()*_g .CT_PieChart {return _gcd ._agd };
func (_bg AreaChart )X ()*_gd .CT_AreaChart {return _bg ._db };
// SetDirection changes the direction of the bar chart (bar or column).
func (_aa Bar3DChart )SetDirection (d _g .ST_BarDir ){_aa ._abb .BarDir .ValAttr =d };func (_cde DataLabels )SetShowValue (b bool ){_cde .ensureChoice ();_cde ._dca .Choice .ShowVal =_g .NewCT_Boolean ();_cde ._dca .Choice .ShowVal .ValAttr =_ge .Bool (b );};func MakeNumberDataSource (x *_g .CT_NumDataSource )NumberDataSource {return NumberDataSource {x }};func MakeValueAxis (x *_g .CT_ValAx )ValueAxis {return ValueAxis {x }};
// X returns the inner wrapped XML type.
func (_ffffa Surface3DChart )X ()*_gd .CT_Surface3DChart {return _ffffa ._ddc };
// CategoryAxis returns the category data source.
func (_bggb PieChartSeries )CategoryAxis ()CategoryAxisDataSource {if _bggb ._cdg .Cat ==nil {_bggb ._cdg .Cat =_gd .NewCT_AxDataSource ();};return MakeAxisDataSource (_bggb ._cdg .Cat );};func (_eee DataLabels )SetShowCategoryName (b bool ){_eee .ensureChoice ();_eee ._bdf .Choice .ShowCatName =_gd .NewCT_Boolean ();_eee ._bdf .Choice .ShowCatName .ValAttr =_ge .Bool (b );};
// AddCategoryAxis adds a category axis.
func (_eef Chart )AddCategoryAxis ()CategoryAxis {_dafa :=_gd .NewCT_CatAx ();if _eef ._fa .Chart .PlotArea .CChoice ==nil {_eef ._fa .Chart .PlotArea .CChoice =_gd .NewCT_PlotAreaChoice1 ();};_dafa .AxId =_gd .NewCT_UnsignedInt ();_dafa .AxId .ValAttr =0x7FFFFFFF&_f .Uint32 ();_eef ._fa .Chart .PlotArea .CChoice .CatAx =append (_eef ._fa .Chart .PlotArea .CChoice .CatAx ,_dafa );_dafa .Auto =_gd .NewCT_Boolean ();_dafa .Auto .ValAttr =_ge .Bool (true );_dafa .Delete =_gd .NewCT_Boolean ();_dafa .Delete .ValAttr =_ge .Bool (false );_ba :=MakeCategoryAxis (_dafa );_ba .InitializeDefaults ();return _ba ;};func MakeValueAxis (x *_gd .CT_ValAx )ValueAxis {return ValueAxis {x }};
// SetDisplayBlanksAs controls how missing values are displayed.
func (_fdb Chart )SetDisplayBlanksAs (v _gd .ST_DispBlanksAs ){_fdb ._fa .Chart .DispBlanksAs =_gd .NewCT_DispBlanksAs ();_fdb ._fa .Chart .DispBlanksAs .ValAttr =v ;};type Line3DChart struct{chartBase ;_ced *_gd .CT_Line3DChart ;};
// AddTitle sets a new title on the chart.
func (_ddd Chart )AddTitle ()Title {_ddd ._fa .Chart .Title =_gd .NewCT_Title ();_ddd ._fa .Chart .Title .Overlay =_gd .NewCT_Boolean ();_ddd ._fa .Chart .Title .Overlay .ValAttr =_ge .Bool (false );_ddd ._fa .Chart .AutoTitleDeleted =_gd .NewCT_Boolean ();_ddd ._fa .Chart .AutoTitleDeleted .ValAttr =_ge .Bool (false );_feag :=MakeTitle (_ddd ._fa .Chart .Title );_feag .InitializeDefaults ();return _feag ;};
// CategoryAxis returns the category data source.
func (_bf AreaChartSeries )CategoryAxis ()CategoryAxisDataSource {if _bf ._ad .Cat ==nil {_bf ._ad .Cat =_gd .NewCT_AxDataSource ();};return MakeAxisDataSource (_bf ._ad .Cat );};func (_fbe BarChart )AddAxis (axis Axis ){_gcb :=_gd .NewCT_UnsignedInt ();_gcb .ValAttr =axis .AxisID ();_fbe ._gee .AxId =append (_fbe ._gee .AxId ,_gcb );};
// X returns the inner wrapped XML type.
func (_bgf ScatterChartSeries )X ()*_gd .CT_ScatterSer {return _bgf ._ggb };
// AddBarChart adds a new bar chart to a chart.
func (_bc Chart )AddBarChart ()BarChart {_dca :=_gd .NewCT_PlotAreaChoice ();_bc ._fa .Chart .PlotArea .Choice =append (_bc ._fa .Chart .PlotArea .Choice ,_dca );_dca .BarChart =_gd .NewCT_BarChart ();_dca .BarChart .Grouping =_gd .NewCT_BarGrouping ();_dca .BarChart .Grouping .ValAttr =_gd .ST_BarGroupingStandard ;_fag :=BarChart {_gee :_dca .BarChart };_fag .InitializeDefaults ();return _fag ;};func (_aeca GridLines )Properties ()_ec .ShapeProperties {if _aeca ._ffd .SpPr ==nil {_aeca ._ffd .SpPr =_gdb .NewCT_ShapeProperties ();};return _ec .MakeShapeProperties (_aeca ._ffd .SpPr );};
// PieOfPieChart is a Pie chart with an extra Pie chart.
type PieOfPieChart struct{chartBase ;_caf *_gd .CT_OfPieChart ;};
// X returns the inner wrapped XML type.
func (_ccba DateAxis )X ()*_gd .CT_DateAx {return _ccba ._geg };var NullAxis Axis =nullAxis (0);type Title struct{_gdde *_gd .CT_Title };func (_ecg DataLabels )SetShowValue (b bool ){_ecg .ensureChoice ();_ecg ._bdf .Choice .ShowVal =_gd .NewCT_Boolean ();_ecg ._bdf .Choice .ShowVal .ValAttr =_ge .Bool (b );};func (_cgf CategoryAxis )AxisID ()uint32 {return _cgf ._ggc .AxId .ValAttr };
// AddRadarChart adds a new radar chart to a chart.
func (_faa Chart )AddRadarChart ()RadarChart {_agdb :=_gd .NewCT_PlotAreaChoice ();_faa ._fa .Chart .PlotArea .Choice =append (_faa ._fa .Chart .PlotArea .Choice ,_agdb );_agdb .RadarChart =_gd .NewCT_RadarChart ();_daf :=RadarChart {_acd :_agdb .RadarChart };_daf .InitializeDefaults ();return _daf ;};
// RemoveTitle removes any existing title from the chart.
func (_gdaa Chart )RemoveTitle (){_gdaa ._fa .Chart .Title =nil ;_gdaa ._fa .Chart .AutoTitleDeleted =_gd .NewCT_Boolean ();_gdaa ._fa .Chart .AutoTitleDeleted .ValAttr =_ge .Bool (true );};
// InitializeDefaults the bar chart to its defaults
func (_be AreaChart )InitializeDefaults (){};
// X returns the inner wrapped XML type.
func (_fdag StockChart )X ()*_gd .CT_StockChart {return _fdag ._ddeg };
// 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{_bg *_g .CT_AxDataSource };type chartBase struct{};func (_fed DataLabels )SetShowLeaderLines (b bool ){_fed .ensureChoice ();_fed ._dca .Choice .ShowLeaderLines =_g .NewCT_Boolean ();_fed ._dca .Choice .ShowLeaderLines .ValAttr =_ge .Bool (b );};
// X returns the inner wrapped XML type.
func (_cfad RadarChartSeries )X ()*_g .CT_RadarSer {return _cfad ._gbc };
// Order returns the order of the series
func (_fge ScatterChartSeries )Order ()uint32 {return _fge ._fag .Order .ValAttr };
// Order returns the order of the series
func (_gcg LineChartSeries )Order ()uint32 {return _gcg ._fda .Order .ValAttr };
type CategoryAxisDataSource struct{_gf *_gd .CT_AxDataSource };
// Properties returns the bar chart series shape properties.
func (_dba PieChartSeries )Properties ()_fa .ShapeProperties {if _dba ._gfg .SpPr ==nil {_dba ._gfg .SpPr =_b .NewCT_ShapeProperties ();};return _fa .MakeShapeProperties (_dba ._gfg .SpPr );};func (_dged DateAxis )SetTickLabelPosition (p _g .ST_TickLblPos ){if p ==_g .ST_TickLblPosUnset {_dged ._acg .TickLblPos =nil ;}else {_dged ._acg .TickLblPos =_g .NewCT_TickLblPos ();_dged ._acg .TickLblPos .ValAttr =p ;};};
// AddBar3DChart adds a new 3D bar chart to a chart.
func (_cgg Chart )AddBar3DChart ()Bar3DChart {_dfd (_cgg ._gcf .Chart );_gf :=_g .NewCT_PlotAreaChoice ();_cgg ._gcf .Chart .PlotArea .Choice =append (_cgg ._gcf .Chart .PlotArea .Choice ,_gf );_gf .Bar3DChart =_g .NewCT_Bar3DChart ();_gf .Bar3DChart .Grouping =_g .NewCT_BarGrouping ();_gf .Bar3DChart .Grouping .ValAttr =_g .ST_BarGroupingStandard ;_dee :=Bar3DChart {_abb :_gf .Bar3DChart };_dee .InitializeDefaults ();return _dee ;};
// AddSeries adds a default series to a Bubble chart.
func (_ee BubbleChart )AddSeries ()BubbleChartSeries {_bef :=_ee .nextColor (len (_ee ._egb .Ser ));_ga :=_g .NewCT_BubbleSer ();_ee ._egb .Ser =append (_ee ._egb .Ser ,_ga );_ga .Idx .ValAttr =uint32 (len (_ee ._egb .Ser )-1);_ga .Order .ValAttr =uint32 (len (_ee ._egb .Ser )-1);_gcb :=BubbleChartSeries {_ga };_gcb .InitializeDefaults ();_gcb .Properties ().SetSolidFill (_bef );return _gcb ;};
// SetIndex sets the index of the series
func (_aefa LineChartSeries )SetIndex (idx uint32 ){_aefa ._fda .Idx .ValAttr =idx };func (_eda ValueAxis )MajorGridLines ()GridLines {if _eda ._bge .MajorGridlines ==nil {_eda ._bge .MajorGridlines =_g .NewCT_ChartLines ();};return GridLines {_eda ._bge .MajorGridlines };};
// AddSeries adds a default series to a line chart.
func (_bafe LineChart )AddSeries ()LineChartSeries {_cef :=_bafe .nextColor (len (_bafe ._fbd .Ser ));_ade :=_g .NewCT_LineSer ();_bafe ._fbd .Ser =append (_bafe ._fbd .Ser ,_ade );_ade .Idx .ValAttr =uint32 (len (_bafe ._fbd .Ser )-1);_ade .Order .ValAttr =uint32 (len (_bafe ._fbd .Ser )-1);_aed :=LineChartSeries {_ade };_aed .InitializeDefaults ();_aed .Properties ().LineProperties ().SetSolidFill (_cef );return _aed ;};
// SetDirection changes the direction of the bar chart (bar or column).
func (_aaf BarChart )SetDirection (d _g .ST_BarDir ){_aaf ._ec .BarDir .ValAttr =d };
// SetExplosion sets the value that the segements of the pie are 'exploded' by
func (_fgf PieChartSeries )SetExplosion (v uint32 ){_fgf ._gfg .Explosion =_g .NewCT_UnsignedInt ();_fgf ._gfg .Explosion .ValAttr =v ;};
// AddSeries adds a default series to a Stock chart.
func (_fcbea StockChart )AddSeries ()LineChartSeries {_aafc :=_g .NewCT_LineSer ();_fcbea ._gec .Ser =append (_fcbea ._gec .Ser ,_aafc );_aafc .Idx .ValAttr =uint32 (len (_fcbea ._gec .Ser )-1);_aafc .Order .ValAttr =uint32 (len (_fcbea ._gec .Ser )-1);_agf :=LineChartSeries {_aafc };_agf .Values ().CreateEmptyNumberCache ();_agf .Properties ().LineProperties ().SetNoFill ();return _agf ;};var _fcd =[]_fc .Color {_fc .RGB (0x33,0x66,0xcc),_fc .RGB (0xDC,0x39,0x12),_fc .RGB (0xFF,0x99,0x00),_fc .RGB (0x10,0x96,0x18),_fc .RGB (0x99,0x00,0x99),_fc .RGB (0x3B,0x3E,0xAC),_fc .RGB (0x00,0x99,0xC6),_fc .RGB (0xDD,0x44,0x77),_fc .RGB (0x66,0xAA,0x00),_fc .RGB (0xB8,0x2E,0x2E),_fc .RGB (0x31,0x63,0x95),_fc .RGB (0x99,0x44,0x99),_fc .RGB (0x22,0xAA,0x99),_fc .RGB (0xAA,0xAA,0x11),_fc .RGB (0x66,0x33,0xCC),_fc .RGB (0xE6,0x73,0x00),_fc .RGB (0x8B,0x07,0x07),_fc .RGB (0x32,0x92,0x62),_fc .RGB (0x55,0x74,0xA6),_fc .RGB (0x3B,0x3E,0xAC)};
func (_bab PieChartSeries )Properties ()_ec .ShapeProperties {if _bab ._cdg .SpPr ==nil {_bab ._cdg .SpPr =_gdb .NewCT_ShapeProperties ();};return _ec .MakeShapeProperties (_bab ._cdg .SpPr );};func (_fgc CategoryAxis )InitializeDefaults (){_fgc .SetPosition (_gd .ST_AxPosB );_fgc .SetMajorTickMark (_gd .ST_TickMarkOut );_fgc .SetMinorTickMark (_gd .ST_TickMarkIn );_fgc .SetTickLabelPosition (_gd .ST_TickLblPosNextTo );_fgc .MajorGridLines ().Properties ().LineProperties ().SetSolidFill (_fg .LightGray );_fgc .Properties ().LineProperties ().SetSolidFill (_fg .Black );};
// X returns the inner wrapped XML type.
func (_cca StockChart )X ()*_g .CT_StockChart {return _cca ._gec };
// BarChartSeries is a series to be used on a bar chart.
type BarChartSeries struct{_ad *_g .CT_BarSer };func (_afbd DateAxis )Properties ()_fa .ShapeProperties {if _afbd ._acg .SpPr ==nil {_afbd ._acg .SpPr =_b .NewCT_ShapeProperties ();};return _fa .MakeShapeProperties (_afbd ._acg .SpPr );};
// RadarChart is an Radar chart that has a shaded Radar underneath a curve.
type RadarChart struct{chartBase ;_dfe *_g .CT_RadarChart ;};func (_afde Title )RunProperties ()_fa .RunProperties {if _afde ._cbec .Tx ==nil {_afde .SetText ("");};if _afde ._cbec .Tx .Choice .Rich .P [0].EG_TextRun [0].R .RPr ==nil {_afde ._cbec .Tx .Choice .Rich .P [0].EG_TextRun [0].R .RPr =_b .NewCT_TextCharacterProperties ();};return _fa .MakeRunProperties (_afde ._cbec .Tx .Choice .Rich .P [0].EG_TextRun [0].R .RPr );};func (_ffc CategoryAxis )Properties ()_fa .ShapeProperties {if _ffc ._gda .SpPr ==nil {_ffc ._gda .SpPr =_b .NewCT_ShapeProperties ();};return _fa .MakeShapeProperties (_ffc ._gda .SpPr );};
// X returns the inner wrapped XML type.
func (_abbd ScatterChartSeries )X ()*_g .CT_ScatterSer {return _abbd ._fag };func (_bbe StockChart )AddAxis (axis Axis ){_gff :=_g .NewCT_UnsignedInt ();_gff .ValAttr =axis .AxisID ();_bbe ._gec .AxId =append (_bbe ._gec .AxId ,_gff );};
// X returns the inner wrapped XML type.
func (_fbed Legend )X ()*_g .CT_Legend {return _fbed ._ege };
// AddTitle sets a new title on the chart.
func (_aba Chart )AddTitle ()Title {_aba ._gcf .Chart .Title =_g .NewCT_Title ();_aba ._gcf .Chart .Title .Overlay =_g .NewCT_Boolean ();_aba ._gcf .Chart .Title .Overlay .ValAttr =_ge .Bool (false );_aba ._gcf .Chart .AutoTitleDeleted =_g .NewCT_Boolean ();_aba ._gcf .Chart .AutoTitleDeleted .ValAttr =_ge .Bool (false );_bed :=MakeTitle (_aba ._gcf .Chart .Title );_bed .InitializeDefaults ();return _bed ;};type LineChart struct{chartBase ;_fbd *_g .CT_LineChart ;};func (_fcb CategoryAxis )AxisID ()uint32 {return _fcb ._gda .AxId .ValAttr };
// InitializeDefaults the Bubble chart to its defaults
func (_cga BubbleChart )InitializeDefaults (){};
// SurfaceChart is a 3D surface chart, viewed from the top-down.
type SurfaceChart struct{chartBase ;_edeb *_g .CT_SurfaceChart ;};
// X returns the inner wrapped XML type.
func (_ccfa RadarChart )X ()*_g .CT_RadarChart {return _ccfa ._dfe };func (_ddg GridLines )Properties ()_fa .ShapeProperties {if _ddg ._bcad .SpPr ==nil {_ddg ._bcad .SpPr =_b .NewCT_ShapeProperties ();};return _fa .MakeShapeProperties (_ddg ._bcad .SpPr );};type Legend struct{_ege *_g .CT_Legend };func (_faa DateAxis )AxisID ()uint32 {return _faa ._acg .AxId .ValAttr };func (_bfgf ValueAxis )SetTickLabelPosition (p _g .ST_TickLblPos ){if p ==_g .ST_TickLblPosUnset {_bfgf ._bge .TickLblPos =nil ;}else {_bfgf ._bge .TickLblPos =_g .NewCT_TickLblPos ();_bfgf ._bge .TickLblPos .ValAttr =p ;};};
// PieOfPieChart is a Pie chart with an extra Pie chart.
type PieOfPieChart struct{chartBase ;_adc *_g .CT_OfPieChart ;};func (_gd BarChart )AddAxis (axis Axis ){_abf :=_g .NewCT_UnsignedInt ();_abf .ValAttr =axis .AxisID ();_gd ._ec .AxId =append (_gd ._ec .AxId ,_abf );};
// SetText sets the series text
func (_cbe SurfaceChartSeries )SetText (s string ){_cbe ._geff .Tx =_g .NewCT_SerTx ();_cbe ._geff .Tx .Choice .V =&s ;};func (_aefg DataLabels )SetShowPercent (b bool ){_aefg .ensureChoice ();_aefg ._dca .Choice .ShowPercent =_g .NewCT_Boolean ();_aefg ._dca .Choice .ShowPercent .ValAttr =_ge .Bool (b );};
// SetText sets the series text
func (_ffab ScatterChartSeries )SetText (s string ){_ffab ._fag .Tx =_g .NewCT_SerTx ();_ffab ._fag .Tx .Choice .V =&s ;};
// InitializeDefaults initializes an Radar series to the default values.
func (_gcgd RadarChartSeries )InitializeDefaults (){};
// SetIndex sets the index of the series
func (_ebb SurfaceChartSeries )SetIndex (idx uint32 ){_ebb ._geff .Idx .ValAttr =idx };
// Properties returns the line chart series shape properties.
func (_fce LineChartSeries )Properties ()_fa .ShapeProperties {if _fce ._fda .SpPr ==nil {_fce ._fda .SpPr =_b .NewCT_ShapeProperties ();};return _fa .MakeShapeProperties (_fce ._fda .SpPr );};func (_cfd Marker )SetSize (sz uint8 ){_cfd ._eee .Size =_g .NewCT_MarkerSize ();_cfd ._eee .Size .ValAttr =&sz ;};
// InitializeDefaults the bar chart to its defaults
func (_afb AreaChart )InitializeDefaults (){};
// Marker returns the marker properties.
func (_cfa LineChartSeries )Marker ()Marker {if _cfa ._fda .Marker ==nil {_cfa ._fda .Marker =_g .NewCT_Marker ();};return MakeMarker (_cfa ._fda .Marker );};
// AddAxis adds an axis to a line chart.
func (_ddbg Line3DChart )AddAxis (axis Axis ){_caeb :=_g .NewCT_UnsignedInt ();_caeb .ValAttr =axis .AxisID ();_ddbg ._dbgc .AxId =append (_ddbg ._dbgc .AxId ,_caeb );};
// AddSeries adds a default series to an Pie3D chart.
func (_afg Pie3DChart )AddSeries ()PieChartSeries {_beb :=_g .NewCT_PieSer ();_afg ._fca .Ser =append (_afg ._fca .Ser ,_beb );_beb .Idx .ValAttr =uint32 (len (_afg ._fca .Ser )-1);_beb .Order .ValAttr =uint32 (len (_afg ._fca .Ser )-1);_ead :=PieChartSeries {_beb };_ead .InitializeDefaults ();return _ead ;};
// X returns the inner wrapped XML type.
func (_acd Pie3DChart )X ()*_g .CT_Pie3DChart {return _acd ._fca };
// RadarChartSeries is a series to be used on an Radar chart.
type RadarChartSeries struct{_gbc *_g .CT_RadarSer };func (_dbb ScatterChart )InitializeDefaults (){_dbb ._fdcg .ScatterStyle .ValAttr =_g .ST_ScatterStyleMarker ;};func (_fd Bar3DChart )AddAxis (axis Axis ){_ffb :=_g .NewCT_UnsignedInt ();_ffb .ValAttr =axis .AxisID ();_fd ._abb .AxId =append (_fd ._abb .AxId ,_ffb );};
// Index returns the index of the series
func (_ecd ScatterChartSeries )Index ()uint32 {return _ecd ._fag .Idx .ValAttr };
// ScatterChartSeries is the data series for a scatter chart.
type ScatterChartSeries struct{_fag *_g .CT_ScatterSer };
// InitializeDefaults the bar chart to its defaults
func (_gca PieChart )InitializeDefaults (){_gca ._agd .VaryColors =_g .NewCT_Boolean ();_gca ._agd .VaryColors .ValAttr =_ge .Bool (true );};
func (_ee BarChartSeries )X ()*_gd .CT_BarSer {return _ee ._aac };func (_aacb Marker )SetSize (sz uint8 ){_aacb ._ebb .Size =_gd .NewCT_MarkerSize ();_aacb ._ebb .Size .ValAttr =&sz ;};
// AddAxis adds an axis to a Surface chart.
func (_dgeg Surface3DChart )AddAxis (axis Axis ){_gaa :=_g .NewCT_UnsignedInt ();_gaa .ValAttr =axis .AxisID ();_dgeg ._dgb .AxId =append (_dgeg ._dgb .AxId ,_gaa );};
// CategoryAxis returns the category data source.
func (_cgac RadarChartSeries )CategoryAxis ()CategoryAxisDataSource {if _cgac ._gbc .Cat ==nil {_cgac ._gbc .Cat =_g .NewCT_AxDataSource ();};return MakeAxisDataSource (_cgac ._gbc .Cat );};func (_efgf Legend )InitializeDefaults (){_efgf .SetPosition (_g .ST_LegendPosR );_efgf .SetOverlay (false );_efgf .Properties ().SetNoFill ();_efgf .Properties ().LineProperties ().SetNoFill ();};
// AddSurface3DChart adds a new 3D surface chart to a chart.
func (_gbd Chart )AddSurface3DChart ()Surface3DChart {_ecc :=_g .NewCT_PlotAreaChoice ();_gbd ._gcf .Chart .PlotArea .Choice =append (_gbd ._gcf .Chart .PlotArea .Choice ,_ecc );_ecc .Surface3DChart =_g .NewCT_Surface3DChart ();_dfd (_gbd ._gcf .Chart );_eec :=Surface3DChart {_dgb :_ecc .Surface3DChart };_eec .InitializeDefaults ();return _eec ;};
// Values returns the value data source.
func (_bfd BarChartSeries )Values ()NumberDataSource {if _bfd ._ad .Val ==nil {_bfd ._ad .Val =_g .NewCT_NumDataSource ();};return MakeNumberDataSource (_bfd ._ad .Val );};func (_cgc DataLabels )SetPosition (p _g .ST_DLblPos ){_cgc .ensureChoice ();_cgc ._dca .Choice .DLblPos =_g .NewCT_DLblPos ();_cgc ._dca .Choice .DLblPos .ValAttr =p ;};
// InitializeDefaults the bar chart to its defaults
func (_eba BarChart )InitializeDefaults (){_eba .SetDirection (_g .ST_BarDirCol )};
// RemoveTitle removes any existing title from the chart.
func (_gdef Chart )RemoveTitle (){_gdef ._gcf .Chart .Title =nil ;_gdef ._gcf .Chart .AutoTitleDeleted =_g .NewCT_Boolean ();_gdef ._gcf .Chart .AutoTitleDeleted .ValAttr =_ge .Bool (true );};func MakeMarker (x *_g .CT_Marker )Marker {return Marker {x }};func (_beeg ScatterChartSeries )Values ()NumberDataSource {if _beeg ._fag .YVal ==nil {_beeg ._fag .YVal =_g .NewCT_NumDataSource ();};return MakeNumberDataSource (_beeg ._fag .YVal );};func (_bad RadarChart )AddAxis (axis Axis ){_eag :=_g .NewCT_UnsignedInt ();_eag .ValAttr =axis .AxisID ();_bad ._dfe .AxId =append (_bad ._dfe .AxId ,_eag );};
// Index returns the index of the series
func (_cdf LineChartSeries )Index ()uint32 {return _cdf ._fda .Idx .ValAttr };func (_dg CategoryAxis )SetCrosses (axis Axis ){_dg ._gda .Choice =_g .NewEG_AxSharedChoice ();_dg ._gda .Choice .Crosses =_g .NewCT_Crosses ();_dg ._gda .Choice .Crosses .ValAttr =_g .ST_CrossesAutoZero ;_dg ._gda .CrossAx .ValAttr =axis .AxisID ();};func (_degc Title )ParagraphProperties ()_fa .ParagraphProperties {if _degc ._cbec .Tx ==nil {_degc .SetText ("");};if _degc ._cbec .Tx .Choice .Rich .P [0].PPr ==nil {_degc ._cbec .Tx .Choice .Rich .P [0].PPr =_b .NewCT_TextParagraphProperties ();};return _fa .MakeParagraphProperties (_degc ._cbec .Tx .Choice .Rich .P [0].PPr );};
// SetText sets the series text.
func (_cf AreaChartSeries )SetText (s string ){_cf ._afa .Tx =_g .NewCT_SerTx ();_cf ._afa .Tx .Choice .V =&s ;};
// Bar3DChart is a 3D bar chart.
type Bar3DChart struct{chartBase ;_abb *_g .CT_Bar3DChart ;};
func (_dbag SurfaceChart )AddAxis (axis Axis ){_decb :=_gd .NewCT_UnsignedInt ();_decb .ValAttr =axis .AxisID ();_dbag ._fecf .AxId =append (_dbag ._fecf .AxId ,_decb );};
// X returns the inner wrapped XML type.
func (_gdc PieChartSeries )X ()*_g .CT_PieSer {return _gdc ._gfg };func (_gfc DateAxis )MajorGridLines ()GridLines {if _gfc ._acg .MajorGridlines ==nil {_gfc ._acg .MajorGridlines =_g .NewCT_ChartLines ();};return GridLines {_gfc ._acg .MajorGridlines };};
// AddStockChart adds a new stock chart.
func (_cfg Chart )AddStockChart ()StockChart {_cae :=_g .NewCT_PlotAreaChoice ();_cfg ._gcf .Chart .PlotArea .Choice =append (_cfg ._gcf .Chart .PlotArea .Choice ,_cae );_cae .StockChart =_g .NewCT_StockChart ();_baf :=StockChart {_gec :_cae .StockChart };_baf .InitializeDefaults ();return _baf ;};func (_cfgd SurfaceChart )InitializeDefaults (){_cfgd ._edeb .Wireframe =_g .NewCT_Boolean ();_cfgd ._edeb .Wireframe .ValAttr =_ge .Bool (false );_cfgd ._edeb .BandFmts =_g .NewCT_BandFmts ();for _efd :=0;_efd < 15;_efd ++{_ceag :=_g .NewCT_BandFmt ();_ceag .Idx .ValAttr =uint32 (_efd );_ceag .SpPr =_b .NewCT_ShapeProperties ();_fdce :=_fa .MakeShapeProperties (_ceag .SpPr );_fdce .SetSolidFill (_cfgd .nextColor (_efd ));_cfgd ._edeb .BandFmts .BandFmt =append (_cfgd ._edeb .BandFmts .BandFmt ,_ceag );};};
// AddSeries adds a default series to an Pie chart.
func (_geg PieOfPieChart )AddSeries ()PieChartSeries {_bfgd :=_g .NewCT_PieSer ();_geg ._adc .Ser =append (_geg ._adc .Ser ,_bfgd );_bfgd .Idx .ValAttr =uint32 (len (_geg ._adc .Ser )-1);_bfgd .Order .ValAttr =uint32 (len (_geg ._adc .Ser )-1);_befag :=PieChartSeries {_bfgd };_befag .InitializeDefaults ();return _befag ;};func (_fbe Chart )AddSeriesAxis ()SeriesAxis {_dbf :=_g .NewCT_SerAx ();if _fbe ._gcf .Chart .PlotArea .CChoice ==nil {_fbe ._gcf .Chart .PlotArea .CChoice =_g .NewCT_PlotAreaChoice1 ();};_dbf .AxId =_g .NewCT_UnsignedInt ();_dbf .AxId .ValAttr =0x7FFFFFFF&_a .Uint32 ();_fbe ._gcf .Chart .PlotArea .CChoice .SerAx =append (_fbe ._gcf .Chart .PlotArea .CChoice .SerAx ,_dbf );_dbf .Delete =_g .NewCT_Boolean ();_dbf .Delete .ValAttr =_ge .Bool (false );_bfdd :=MakeSeriesAxis (_dbf );_bfdd .InitializeDefaults ();return _bfdd ;};
// AddScatterChart adds a scatter (X/Y) chart.
func (_dfb Chart )AddScatterChart ()ScatterChart {_efg :=_g .NewCT_PlotAreaChoice ();_dfb ._gcf .Chart .PlotArea .Choice =append (_dfb ._gcf .Chart .PlotArea .Choice ,_efg );_efg .ScatterChart =_g .NewCT_ScatterChart ();_cba :=ScatterChart {_fdcg :_efg .ScatterChart };_cba .InitializeDefaults ();return _cba ;};
// Surface3DChart is a 3D view of a surface chart.
type Surface3DChart struct{chartBase ;_dgb *_g .CT_Surface3DChart ;};
// InitializeDefaults initializes a Bubble chart series to the default values.
func (_fec BubbleChartSeries )InitializeDefaults (){};
// Area3DChart is an area chart that has a shaded area underneath a curve.
type Area3DChart struct{chartBase ;_e *_g .CT_Area3DChart ;};
// X returns the inner wrapped XML type.
func (_adb ValueAxis )X ()*_g .CT_ValAx {return _adb ._bge };
// PieChart is a Pie chart.
type PieChart struct{chartBase ;_agd *_g .CT_PieChart ;};func (_dae NumberDataSource )ensureChoice (){if _dae ._dce .Choice ==nil {_dae ._dce .Choice =_g .NewCT_NumDataSourceChoice ();};};
// Pie3DChart is a Pie3D chart.
type Pie3DChart struct{chartBase ;_fca *_g .CT_Pie3DChart ;};func (_fbdf LineChartSeries )SetSmooth (b bool ){_fbdf ._fda .Smooth =_g .NewCT_Boolean ();_fbdf ._fda .Smooth .ValAttr =&b ;};
// Labels returns the data label properties.
func (_cgaa ScatterChartSeries )Labels ()DataLabels {if _cgaa ._fag .DLbls ==nil {_cgaa ._fag .DLbls =_g .NewCT_DLbls ();};return MakeDataLabels (_cgaa ._fag .DLbls );};
// AddSeries adds a default series to a line chart.
func (_abde Line3DChart )AddSeries ()LineChartSeries {_deg :=_abde .nextColor (len (_abde ._dbgc .Ser ));_edec :=_g .NewCT_LineSer ();_abde ._dbgc .Ser =append (_abde ._dbgc .Ser ,_edec );_edec .Idx .ValAttr =uint32 (len (_abde ._dbgc .Ser )-1);_edec .Order .ValAttr =uint32 (len (_abde ._dbgc .Ser )-1);_ecg :=LineChartSeries {_edec };_ecg .InitializeDefaults ();_ecg .Properties ().LineProperties ().SetSolidFill (_deg );_ecg .Properties ().SetSolidFill (_deg );return _ecg ;};
// AddSeries adds a default series to a bar chart.
func (_df Bar3DChart )AddSeries ()BarChartSeries {_fgc :=_df .nextColor (len (_df ._abb .Ser ));_ca :=_g .NewCT_BarSer ();_df ._abb .Ser =append (_df ._abb .Ser ,_ca );_ca .Idx .ValAttr =uint32 (len (_df ._abb .Ser )-1);_ca .Order .ValAttr =uint32 (len (_df ._abb .Ser )-1);_da :=BarChartSeries {_ca };_da .InitializeDefaults ();_da .Properties ().SetSolidFill (_fgc );return _da ;};
// AddLine3DChart adds a new 3D line chart to a chart.
func (_gb Chart )AddLine3DChart ()Line3DChart {_dfd (_gb ._gcf .Chart );_bcc :=_g .NewCT_PlotAreaChoice ();_gb ._gcf .Chart .PlotArea .Choice =append (_gb ._gcf .Chart .PlotArea .Choice ,_bcc );_bcc .Line3DChart =_g .NewCT_Line3DChart ();_bcc .Line3DChart .Grouping =_g .NewCT_Grouping ();_bcc .Line3DChart .Grouping .ValAttr =_g .ST_GroupingStandard ;return Line3DChart {_dbgc :_bcc .Line3DChart };};type DateAxis struct{_acg *_g .CT_DateAx };func (_fe BubbleChart )AddAxis (axis Axis ){_afae :=_g .NewCT_UnsignedInt ();_afae .ValAttr =axis .AxisID ();_fe ._egb .AxId =append (_fe ._egb .AxId ,_afae );};
// X returns the inner wrapped XML type.
func (_ba Area3DChart )X ()*_g .CT_Area3DChart {return _ba ._e };func (_cgcd LineChartSeries )Values ()NumberDataSource {if _cgcd ._fda .Val ==nil {_cgcd ._fda .Val =_g .NewCT_NumDataSource ();};return MakeNumberDataSource (_cgcd ._fda .Val );};
// X returns the inner wrapped XML type.
func (_fac DoughnutChart )X ()*_g .CT_DoughnutChart {return _fac ._fecf };type NumberDataSource struct{_dce *_g .CT_NumDataSource };
// RemoveLegend removes the legend if the chart has one.
func (_dga Chart )RemoveLegend (){_dga ._gcf .Chart .Legend =nil };
// Values returns the value data source.
func (_bf AreaChartSeries )Values ()NumberDataSource {if _bf ._afa .Val ==nil {_bf ._afa .Val =_g .NewCT_NumDataSource ();};return MakeNumberDataSource (_bf ._afa .Val );};
// AddSeries adds a default series to an area chart.
func (_dec AreaChart )AddSeries ()AreaChartSeries {_eg :=_dec .nextColor (len (_dec ._ab .Ser ));_ce :=_g .NewCT_AreaSer ();_dec ._ab .Ser =append (_dec ._ab .Ser ,_ce );_ce .Idx .ValAttr =uint32 (len (_dec ._ab .Ser )-1);_ce .Order .ValAttr =uint32 (len (_dec ._ab .Ser )-1);_ff :=AreaChartSeries {_ce };_ff .InitializeDefaults ();_ff .Properties ().SetSolidFill (_eg );return _ff ;};func (_fagd ScatterChartSeries )CategoryAxis ()CategoryAxisDataSource {if _fagd ._fag .XVal ==nil {_fagd ._fag .XVal =_g .NewCT_AxDataSource ();};return MakeAxisDataSource (_fagd ._fag .XVal );};func (_befa Legend )SetOverlay (b bool ){_befa ._ege .Overlay =_g .NewCT_Boolean ();_befa ._ege .Overlay .ValAttr =_ge .Bool (b );};
// AddSeries adds a default series to an Pie chart.
func (_abe PieChart )AddSeries ()PieChartSeries {_fcbc :=_g .NewCT_PieSer ();_abe ._agd .Ser =append (_abe ._agd .Ser ,_fcbc );_fcbc .Idx .ValAttr =uint32 (len (_abe ._agd .Ser )-1);_fcbc .Order .ValAttr =uint32 (len (_abe ._agd .Ser )-1);_fbae :=PieChartSeries {_fcbc };_fbae .InitializeDefaults ();return _fbae ;};func MakeDataLabels (x *_g .CT_DLbls )DataLabels {return DataLabels {x }};
// Properties returns the bar chart series shape properties.
func (_ef AreaChartSeries )Properties ()_fa .ShapeProperties {if _ef ._afa .SpPr ==nil {_ef ._afa .SpPr =_b .NewCT_ShapeProperties ();};return _fa .MakeShapeProperties (_ef ._afa .SpPr );};func (_bde DataLabels )SetShowSeriesName (b bool ){_bde .ensureChoice ();_bde ._dca .Choice .ShowSerName =_g .NewCT_Boolean ();_bde ._dca .Choice .ShowSerName .ValAttr =_ge .Bool (b );};type SurfaceChartSeries struct{_geff *_g .CT_SurfaceSer };func (_af Area3DChart )AddAxis (axis Axis ){_gg :=_g .NewCT_UnsignedInt ();_gg .ValAttr =axis .AxisID ();_af ._e .AxId =append (_af ._e .AxId ,_gg );};
// AddLineChart adds a new line chart to a chart.
func (_ede Chart )AddLineChart ()LineChart {_baa :=_g .NewCT_PlotAreaChoice ();_ede ._gcf .Chart .PlotArea .Choice =append (_ede ._gcf .Chart .PlotArea .Choice ,_baa );_baa .LineChart =_g .NewCT_LineChart ();_baa .LineChart .Grouping =_g .NewCT_Grouping ();_baa .LineChart .Grouping .ValAttr =_g .ST_GroupingStandard ;return LineChart {_fbd :_baa .LineChart };};
// AddSeries adds a default series to an Radar chart.
func (_abg RadarChart )AddSeries ()RadarChartSeries {_cbbb :=_abg .nextColor (len (_abg ._dfe .Ser ));_abgf :=_g .NewCT_RadarSer ();_abg ._dfe .Ser =append (_abg ._dfe .Ser ,_abgf );_abgf .Idx .ValAttr =uint32 (len (_abg ._dfe .Ser )-1);_abgf .Order .ValAttr =uint32 (len (_abg ._dfe .Ser )-1);_aae :=RadarChartSeries {_abgf };_aae .InitializeDefaults ();_aae .Properties ().SetSolidFill (_cbbb );return _aae ;};func (_gea ValueAxis )AxisID ()uint32 {return _gea ._bge .AxId .ValAttr };func (_ccaf ValueAxis )Properties ()_fa .ShapeProperties {if _ccaf ._bge .SpPr ==nil {_ccaf ._bge .SpPr =_b .NewCT_ShapeProperties ();};return _fa .MakeShapeProperties (_ccaf ._bge .SpPr );};
// AddSeries adds a default series to a Scatter chart.
func (_gag ScatterChart )AddSeries ()ScatterChartSeries {_eddf :=_gag .nextColor (len (_gag ._fdcg .Ser ));_egda :=_g .NewCT_ScatterSer ();_gag ._fdcg .Ser =append (_gag ._fdcg .Ser ,_egda );_egda .Idx .ValAttr =uint32 (len (_gag ._fdcg .Ser )-1);_egda .Order .ValAttr =uint32 (len (_gag ._fdcg .Ser )-1);_eedg :=ScatterChartSeries {_egda };_eedg .InitializeDefaults ();_eedg .Marker ().Properties ().LineProperties ().SetSolidFill (_eddf );_eedg .Marker ().Properties ().SetSolidFill (_eddf );return _eedg ;};
// X returns the inner wrapped XML type.
func (_c AreaChart )X ()*_g .CT_AreaChart {return _c ._ab };
// Chart is a generic chart.
type Chart struct{_gcf *_g .ChartSpace };
// X returns the inner wrapped XML type.
func (_becg Line3DChart )X ()*_g .CT_Line3DChart {return _becg ._dbgc };
// StockChart is a 2D Stock chart.
type StockChart struct{chartBase ;_gec *_g .CT_StockChart ;};
// Properties returns the Bubble chart series shape properties.
func (_dea BubbleChartSeries )Properties ()_fa .ShapeProperties {if _dea ._bac .SpPr ==nil {_dea ._bac .SpPr =_b .NewCT_ShapeProperties ();};return _fa .MakeShapeProperties (_dea ._bac .SpPr );};
// CategoryAxis returns the category data source.
func (_adg BarChartSeries )CategoryAxis ()CategoryAxisDataSource {if _adg ._ad .Cat ==nil {_adg ._ad .Cat =_g .NewCT_AxDataSource ();};return MakeAxisDataSource (_adg ._ad .Cat );};func (_aac ScatterChartSeries )SetSmooth (b bool ){_aac ._fag .Smooth =_g .NewCT_Boolean ();_aac ._fag .Smooth .ValAttr =&b ;};
// AddSeries adds a default series to a Surface chart.
func (_fgdc SurfaceChart )AddSeries ()SurfaceChartSeries {_bbc :=_fgdc .nextColor (len (_fgdc ._edeb .Ser ));_eef :=_g .NewCT_SurfaceSer ();_fgdc ._edeb .Ser =append (_fgdc ._edeb .Ser ,_eef );_eef .Idx .ValAttr =uint32 (len (_fgdc ._edeb .Ser )-1);_eef .Order .ValAttr =uint32 (len (_fgdc ._edeb .Ser )-1);_ggf :=SurfaceChartSeries {_eef };_ggf .InitializeDefaults ();_ggf .Properties ().LineProperties ().SetSolidFill (_bbc );return _ggf ;};func (_eca Marker )Properties ()_fa .ShapeProperties {if _eca ._eee .SpPr ==nil {_eca ._eee .SpPr =_b .NewCT_ShapeProperties ();};return _fa .MakeShapeProperties (_eca ._eee .SpPr );};func (_egbe SurfaceChartSeries )CategoryAxis ()CategoryAxisDataSource {if _egbe ._geff .Cat ==nil {_egbe ._geff .Cat =_g .NewCT_AxDataSource ();};return MakeAxisDataSource (_egbe ._geff .Cat );};
// Values returns the value data source.
func (_ecb RadarChartSeries )Values ()NumberDataSource {if _ecb ._gbc .Val ==nil {_ecb ._gbc .Val =_g .NewCT_NumDataSource ();};return MakeNumberDataSource (_ecb ._gbc .Val );};
// MakeAxisDataSource constructs an AxisDataSource wrapper.
func MakeAxisDataSource (x *_g .CT_AxDataSource )CategoryAxisDataSource {return CategoryAxisDataSource {x };};
// AddDateAxis adds a value axis to the chart.
func (_bfe Chart )AddDateAxis ()DateAxis {_cee :=_g .NewCT_DateAx ();if _bfe ._gcf .Chart .PlotArea .CChoice ==nil {_bfe ._gcf .Chart .PlotArea .CChoice =_g .NewCT_PlotAreaChoice1 ();};_cee .AxId =_g .NewCT_UnsignedInt ();_cee .AxId .ValAttr =0x7FFFFFFF&_a .Uint32 ();_bfe ._gcf .Chart .PlotArea .CChoice .DateAx =append (_bfe ._gcf .Chart .PlotArea .CChoice .DateAx ,_cee );_cee .Delete =_g .NewCT_Boolean ();_cee .Delete .ValAttr =_ge .Bool (false );_cee .Scaling =_g .NewCT_Scaling ();_cee .Scaling .Orientation =_g .NewCT_Orientation ();_cee .Scaling .Orientation .ValAttr =_g .ST_OrientationMinMax ;_cee .Choice =&_g .EG_AxSharedChoice {};_cee .Choice .Crosses =_g .NewCT_Crosses ();_cee .Choice .Crosses .ValAttr =_g .ST_CrossesAutoZero ;_bfg :=DateAxis {_cee };_bfg .MajorGridLines ().Properties ().LineProperties ().SetSolidFill (_fc .LightGray );_bfg .SetMajorTickMark (_g .ST_TickMarkOut );_bfg .SetMinorTickMark (_g .ST_TickMarkIn );_bfg .SetTickLabelPosition (_g .ST_TickLblPosNextTo );_bfg .Properties ().LineProperties ().SetSolidFill (_fc .Black );_bfg .SetPosition (_g .ST_AxPosL );return _bfg ;};
// AddRadarChart adds a new radar chart to a chart.
func (_dece Chart )AddRadarChart ()RadarChart {_dge :=_g .NewCT_PlotAreaChoice ();_dece ._gcf .Chart .PlotArea .Choice =append (_dece ._gcf .Chart .PlotArea .Choice ,_dge );_dge .RadarChart =_g .NewCT_RadarChart ();_aef :=RadarChart {_dfe :_dge .RadarChart };_aef .InitializeDefaults ();return _aef ;};func (_gceb SurfaceChartSeries )InitializeDefaults (){_gceb .Properties ().LineProperties ().SetWidth (1*_fb .Point );_gceb .Properties ().LineProperties ().SetSolidFill (_fc .Black );_gceb .Properties ().LineProperties ().SetJoin (_fa .LineJoinRound );};func (_afec chartBase )nextColor (_faf int )_fc .Color {return _fcd [_faf %len (_fcd )]};func MakeLegend (l *_g .CT_Legend )Legend {return Legend {l }};
// AreaChartSeries is a series to be used on an area chart.
type AreaChartSeries struct{_afa *_g .CT_AreaSer };func (_egd Legend )SetPosition (p _g .ST_LegendPos ){if p ==_g .ST_LegendPosUnset {_egd ._ege .LegendPos =nil ;}else {_egd ._ege .LegendPos =_g .NewCT_LegendPos ();_egd ._ege .LegendPos .ValAttr =p ;};};
// X returns the inner wrapped XML type.
func (_deab Marker )X ()*_g .CT_Marker {return _deab ._eee };type nullAxis byte ;func (_aafa CategoryAxis )SetMinorTickMark (m _g .ST_TickMark ){if m ==_g .ST_TickMarkUnset {_aafa ._gda .MinorTickMark =nil ;}else {_aafa ._gda .MinorTickMark =_g .NewCT_TickMark ();_aafa ._gda .MinorTickMark .ValAttr =m ;};};func (_ggg NumberDataSource )SetReference (s string ){_ggg .ensureChoice ();if _ggg ._dce .Choice .NumRef ==nil {_ggg ._dce .Choice .NumRef =_g .NewCT_NumRef ();};_ggg ._dce .Choice .NumRef .F =s ;};func _dfd (_fbc *_g .CT_Chart ){_fbc .View3D =_g .NewCT_View3D ();_fbc .View3D .RotX =_g .NewCT_RotX ();_fbc .View3D .RotX .ValAttr =_ge .Int8 (15);_fbc .View3D .RotY =_g .NewCT_RotY ();_fbc .View3D .RotY .ValAttr =_ge .Uint16 (20);_fbc .View3D .RAngAx =_g .NewCT_Boolean ();_fbc .View3D .RAngAx .ValAttr =_ge .Bool (false );_fbc .Floor =_g .NewCT_Surface ();_fbc .Floor .Thickness =_g .NewCT_Thickness ();_fbc .Floor .Thickness .ValAttr .Uint32 =_ge .Uint32 (0);_fbc .SideWall =_g .NewCT_Surface ();_fbc .SideWall .Thickness =_g .NewCT_Thickness ();_fbc .SideWall .Thickness .ValAttr .Uint32 =_ge .Uint32 (0);_fbc .BackWall =_g .NewCT_Surface ();_fbc .BackWall .Thickness =_g .NewCT_Thickness ();_fbc .BackWall .Thickness .ValAttr .Uint32 =_ge .Uint32 (0);};
// Properties returns the line chart series shape properties.
func (_bcbb SurfaceChartSeries )Properties ()_fa .ShapeProperties {if _bcbb ._geff .SpPr ==nil {_bcbb ._geff .SpPr =_b .NewCT_ShapeProperties ();};return _fa .MakeShapeProperties (_bcbb ._geff .SpPr );};func (_ed CategoryAxis )SetMajorTickMark (m _g .ST_TickMark ){if m ==_g .ST_TickMarkUnset {_ed ._gda .MajorTickMark =nil ;}else {_ed ._gda .MajorTickMark =_g .NewCT_TickMark ();_ed ._gda .MajorTickMark .ValAttr =m ;};};
// AddValueAxis adds a value axis to the chart.
func (_eaf Chart )AddValueAxis ()ValueAxis {_ded :=_g .NewCT_ValAx ();if _eaf ._gcf .Chart .PlotArea .CChoice ==nil {_eaf ._gcf .Chart .PlotArea .CChoice =_g .NewCT_PlotAreaChoice1 ();};_ded .AxId =_g .NewCT_UnsignedInt ();_ded .AxId .ValAttr =0x7FFFFFFF&_a .Uint32 ();_eaf ._gcf .Chart .PlotArea .CChoice .ValAx =append (_eaf ._gcf .Chart .PlotArea .CChoice .ValAx ,_ded );_ded .Delete =_g .NewCT_Boolean ();_ded .Delete .ValAttr =_ge .Bool (false );_ded .Scaling =_g .NewCT_Scaling ();_ded .Scaling .Orientation =_g .NewCT_Orientation ();_ded .Scaling .Orientation .ValAttr =_g .ST_OrientationMinMax ;_ded .Choice =&_g .EG_AxSharedChoice {};_ded .Choice .Crosses =_g .NewCT_Crosses ();_ded .Choice .Crosses .ValAttr =_g .ST_CrossesAutoZero ;_ded .CrossBetween =_g .NewCT_CrossBetween ();_ded .CrossBetween .ValAttr =_g .ST_CrossBetweenBetween ;_cd :=MakeValueAxis (_ded );_cd .MajorGridLines ().Properties ().LineProperties ().SetSolidFill (_fc .LightGray );_cd .SetMajorTickMark (_g .ST_TickMarkOut );_cd .SetMinorTickMark (_g .ST_TickMarkIn );_cd .SetTickLabelPosition (_g .ST_TickLblPosNextTo );_cd .Properties ().LineProperties ().SetSolidFill (_fc .Black );_cd .SetPosition (_g .ST_AxPosL );return _cd ;};
// Values returns the value data source.
func (_efe PieChartSeries )Values ()NumberDataSource {if _efe ._gfg .Val ==nil {_efe ._gfg .Val =_g .NewCT_NumDataSource ();};return MakeNumberDataSource (_efe ._gfg .Val );};func (_cg AreaChart )AddAxis (axis Axis ){_gc :=_g .NewCT_UnsignedInt ();_gc .ValAttr =axis .AxisID ();_cg ._ab .AxId =append (_cg ._ab .AxId ,_gc );};
// InitializeDefaults the bar chart to its defaults
func (_afba Bar3DChart )InitializeDefaults (){_afba .SetDirection (_g .ST_BarDirCol )};func (_ddf DataLabels )SetShowLegendKey (b bool ){_ddf .ensureChoice ();_ddf ._dca .Choice .ShowLegendKey =_g .NewCT_Boolean ();_ddf ._dca .Choice .ShowLegendKey .ValAttr =_ge .Bool (b );};
// SetOrder sets the order of the series
func (_bga SurfaceChartSeries )SetOrder (idx uint32 ){_bga ._geff .Order .ValAttr =idx };func (_deee SurfaceChartSeries )Values ()NumberDataSource {if _deee ._geff .Val ==nil {_deee ._geff .Val =_g .NewCT_NumDataSource ();};_daa :=MakeNumberDataSource (_deee ._geff .Val );_daa .CreateEmptyNumberCache ();return _daa ;};
// SetOrder sets the order of the series
func (_ffg ScatterChartSeries )SetOrder (idx uint32 ){_ffg ._fag .Order .ValAttr =idx };type ValueAxis struct{_bge *_g .CT_ValAx };
// InitializeDefaults initializes an area series to the default values.
func (_bc AreaChartSeries )InitializeDefaults (){};
func (_baf ValueAxis )X ()*_gd .CT_ValAx {return _baf ._cge };type SeriesAxis struct{_aaca *_gd .CT_SerAx };func (_cfg AreaChart )AddAxis (axis Axis ){_ega :=_gd .NewCT_UnsignedInt ();_ega .ValAttr =axis .AxisID ();_cfg ._db .AxId =append (_cfg ._db .AxId ,_ega );};
// AddPie3DChart adds a new pie chart to a chart.
func (_gfb Chart )AddPie3DChart ()Pie3DChart {_dfd (_gfb ._gcf .Chart );_edb :=_g .NewCT_PlotAreaChoice ();_gfb ._gcf .Chart .PlotArea .Choice =append (_gfb ._gcf .Chart .PlotArea .Choice ,_edb );_edb .Pie3DChart =_g .NewCT_Pie3DChart ();_cea :=Pie3DChart {_fca :_edb .Pie3DChart };_cea .InitializeDefaults ();return _cea ;};func (_fgg Marker )SetSymbol (s _g .ST_MarkerStyle ){if s ==_g .ST_MarkerStyleUnset {_fgg ._eee .Symbol =nil ;}else {_fgg ._eee .Symbol =_g .NewCT_MarkerStyle ();_fgg ._eee .Symbol .ValAttr =s ;};};func (_fcf ValueAxis )SetMajorTickMark (m _g .ST_TickMark ){if m ==_g .ST_TickMarkUnset {_fcf ._bge .MajorTickMark =nil ;}else {_fcf ._bge .MajorTickMark =_g .NewCT_TickMark ();_fcf ._bge .MajorTickMark .ValAttr =m ;};};var NullAxis Axis =nullAxis (0);
func (_edb Chart )AddPie3DChart ()Pie3DChart {_gade (_edb ._fa .Chart );_fbg :=_gd .NewCT_PlotAreaChoice ();_edb ._fa .Chart .PlotArea .Choice =append (_edb ._fa .Chart .PlotArea .Choice ,_fbg );_fbg .Pie3DChart =_gd .NewCT_Pie3DChart ();_gef :=Pie3DChart {_cdaa :_fbg .Pie3DChart };_gef .InitializeDefaults ();return _gef ;};
// AddAxis adds an axis to a Scatter chart.
func (_edg ScatterChart )AddAxis (axis Axis ){_ega :=_g .NewCT_UnsignedInt ();_ega .ValAttr =axis .AxisID ();_edg ._fdcg .AxId =append (_edg ._fdcg .AxId ,_ega );};
// CategoryAxis returns the category data source.
func (_bag AreaChartSeries )CategoryAxis ()CategoryAxisDataSource {if _bag ._afa .Cat ==nil {_bag ._afa .Cat =_g .NewCT_AxDataSource ();};return MakeAxisDataSource (_bag ._afa .Cat );};func MakeCategoryAxis (x *_g .CT_CatAx )CategoryAxis {return CategoryAxis {x }};func (_bee DateAxis )SetPosition (p _g .ST_AxPos ){_bee ._acg .AxPos =_g .NewCT_AxPos ();_bee ._acg .AxPos .ValAttr =p ;};
// X returns the inner wrapped XML type.
func (_abge SurfaceChartSeries )X ()*_g .CT_SurfaceSer {return _abge ._geff };
// BarChart is a 2D bar chart.
type BarChart struct{chartBase ;_ec *_g .CT_BarChart ;};func (_cb CategoryAxis )SetTickLabelPosition (p _g .ST_TickLblPos ){if p ==_g .ST_TickLblPosUnset {_cb ._gda .TickLblPos =nil ;}else {_cb ._gda .TickLblPos =_g .NewCT_TickLblPos ();_cb ._gda .TickLblPos .ValAttr =p ;};};
// SetValues sets values directly on a source.
func (_bgc NumberDataSource )SetValues (v []float64 ){_bgc .ensureChoice ();_bgc ._dce .Choice .NumRef =nil ;_bgc ._dce .Choice .NumLit =_g .NewCT_NumData ();_bgc ._dce .Choice .NumLit .PtCount =_g .NewCT_UnsignedInt ();_bgc ._dce .Choice .NumLit .PtCount .ValAttr =uint32 (len (v ));for _eggd ,_cfdb :=range v {_bgc ._dce .Choice .NumLit .Pt =append (_bgc ._dce .Choice .NumLit .Pt ,&_g .CT_NumVal {IdxAttr :uint32 (_eggd ),V :_f .Sprintf ("\u0025\u0067",_cfdb )});};};
// AddSurfaceChart adds a new surface chart to a chart.
func (_bca Chart )AddSurfaceChart ()SurfaceChart {_ebc :=_g .NewCT_PlotAreaChoice ();_bca ._gcf .Chart .PlotArea .Choice =append (_bca ._gcf .Chart .PlotArea .Choice ,_ebc );_ebc .SurfaceChart =_g .NewCT_SurfaceChart ();_dfd (_bca ._gcf .Chart );_bca ._gcf .Chart .View3D .RotX .ValAttr =_ge .Int8 (90);_bca ._gcf .Chart .View3D .RotY .ValAttr =_ge .Uint16 (0);_bca ._gcf .Chart .View3D .Perspective =_g .NewCT_Perspective ();_bca ._gcf .Chart .View3D .Perspective .ValAttr =_ge .Uint8 (0);_aca :=SurfaceChart {_edeb :_ebc .SurfaceChart };_aca .InitializeDefaults ();return _aca ;};
// SetIndex sets the index of the series
func (_cbc ScatterChartSeries )SetIndex (idx uint32 ){_cbc ._fag .Idx .ValAttr =idx };
// SetHoleSize controls the hole size in the pie chart and is measured in percent.
func (_aff DoughnutChart )SetHoleSize (pct uint8 ){if _aff ._fecf .HoleSize ==nil {_aff ._fecf .HoleSize =_g .NewCT_HoleSize ();};if _aff ._fecf .HoleSize .ValAttr ==nil {_aff ._fecf .HoleSize .ValAttr =&_g .ST_HoleSize {};};_aff ._fecf .HoleSize .ValAttr .ST_HoleSizeUByte =&pct ;};
// InitializeDefaults initializes an Pie series to the default values.
func (_ccf PieChartSeries )InitializeDefaults (){};
// SetOrder sets the order of the series
func (_ebad LineChartSeries )SetOrder (idx uint32 ){_ebad ._fda .Order .ValAttr =idx };
// SetText sets the series text.
func (_egcf BarChartSeries )SetText (s string ){_egcf ._ad .Tx =_g .NewCT_SerTx ();_egcf ._ad .Tx .Choice .V =&s ;};
// AddScatterChart adds a scatter (X/Y) chart.
func (_ac Chart )AddScatterChart ()ScatterChart {_ccb :=_gd .NewCT_PlotAreaChoice ();_ac ._fa .Chart .PlotArea .Choice =append (_ac ._fa .Chart .PlotArea .Choice ,_ccb );_ccb .ScatterChart =_gd .NewCT_ScatterChart ();_fgd :=ScatterChart {_abb :_ccb .ScatterChart };_fgd .InitializeDefaults ();return _fgd ;};func MakeTitle (x *_gd .CT_Title )Title {return Title {x }};
// Marker returns the marker properties.
func (_bafg ScatterChartSeries )Marker ()Marker {if _bafg ._fag .Marker ==nil {_bafg ._fag .Marker =_g .NewCT_Marker ();};return MakeMarker (_bafg ._fag .Marker );};func (_ece Legend )Properties ()_fa .ShapeProperties {if _ece ._ege .SpPr ==nil {_ece ._ege .SpPr =_b .NewCT_ShapeProperties ();};return _fa .MakeShapeProperties (_ece ._ege .SpPr );};
func (_dbae LineChartSeries )Marker ()Marker {if _dbae ._dab .Marker ==nil {_dbae ._dab .Marker =_gd .NewCT_Marker ();};return MakeMarker (_dbae ._dab .Marker );};
// AddAxis adds an axis to a line chart.
func (_ecf LineChart )AddAxis (axis Axis ){_eafc :=_g .NewCT_UnsignedInt ();_eafc .ValAttr =axis .AxisID ();_ecf ._fbd .AxId =append (_ecf ._fbd .AxId ,_eafc );};
// InitializeDefaults the bar chart to its defaults
func (_gga PieOfPieChart )InitializeDefaults (){_gga ._caf .VaryColors =_gd .NewCT_Boolean ();_gga ._caf .VaryColors .ValAttr =_ge .Bool (true );_gga .SetType (_gd .ST_OfPieTypePie );_gga ._caf .SecondPieSize =_gd .NewCT_SecondPieSize ();_gga ._caf .SecondPieSize .ValAttr =&_gd .ST_SecondPieSize {};_gga ._caf .SecondPieSize .ValAttr .ST_SecondPieSizeUShort =_ge .Uint16 (75);_ddf :=_gd .NewCT_ChartLines ();_ddf .SpPr =_gdb .NewCT_ShapeProperties ();_gab :=_ec .MakeShapeProperties (_ddf .SpPr );_gab .LineProperties ().SetSolidFill (_fg .Auto );_gga ._caf .SerLines =append (_gga ._caf .SerLines ,_ddf );};
// Order returns the order of the series
func (_eed ScatterChartSeries )Order ()uint32 {return _eed ._ggb .Order .ValAttr };func (_beg Title )InitializeDefaults (){_beg .SetText ("\u0054\u0069\u0074l\u0065");_beg .RunProperties ().SetSize (16*_a .Point );_beg .RunProperties ().SetSolidFill (_fg .Black );_beg .RunProperties ().SetFont ("\u0043\u0061\u006c\u0069\u0062\u0020\u0072\u0069");_beg .RunProperties ().SetBold (false );};
// AreaChartSeries is a series to be used on an area chart.
type AreaChartSeries struct{_ad *_gd .CT_AreaSer };func (_bbd ScatterChartSeries )CategoryAxis ()CategoryAxisDataSource {if _bbd ._ggb .XVal ==nil {_bbd ._ggb .XVal =_gd .NewCT_AxDataSource ();};return MakeAxisDataSource (_bbd ._ggb .XVal );};type NumberDataSource struct{_ege *_gd .CT_NumDataSource };func (_ead DataLabels )ensureChoice (){if _ead ._bdf .Choice ==nil {_ead ._bdf .Choice =_gd .NewCT_DLblsChoice ();};};
// InitializeDefaults the bar chart to its defaults
func (_eac Bar3DChart )InitializeDefaults (){_eac .SetDirection (_gd .ST_BarDirCol )};func (_fbb DataLabels )SetShowSeriesName (b bool ){_fbb .ensureChoice ();_fbb ._bdf .Choice .ShowSerName =_gd .NewCT_Boolean ();_fbb ._bdf .Choice .ShowSerName .ValAttr =_ge .Bool (b );};type ValueAxis struct{_cge *_gd .CT_ValAx };
// MakeAxisDataSource constructs an AxisDataSource wrapper.
func MakeAxisDataSource (x *_gd .CT_AxDataSource )CategoryAxisDataSource {return CategoryAxisDataSource {x };};
// AddSeries adds a default series to an area chart.
func (_eg Area3DChart )AddSeries ()AreaChartSeries {_gb :=_eg .nextColor (len (_eg ._ag .Ser ));_c :=_gd .NewCT_AreaSer ();_eg ._ag .Ser =append (_eg ._ag .Ser ,_c );_c .Idx .ValAttr =uint32 (len (_eg ._ag .Ser )-1);_c .Order .ValAttr =uint32 (len (_eg ._ag .Ser )-1);_gc :=AreaChartSeries {_c };_gc .InitializeDefaults ();_gc .Properties ().SetSolidFill (_gb );return _gc ;};
// AddPieChart adds a new pie chart to a chart.
func (_gfg Chart )AddPieChart ()PieChart {_gcg :=_gd .NewCT_PlotAreaChoice ();_gfg ._fa .Chart .PlotArea .Choice =append (_gfg ._fa .Chart .PlotArea .Choice ,_gcg );_gcg .PieChart =_gd .NewCT_PieChart ();_dde :=PieChart {_abgc :_gcg .PieChart };_dde .InitializeDefaults ();return _dde ;};
// AddSeries adds a default series to a line chart.
func (_gdbg LineChart )AddSeries ()LineChartSeries {_aaee :=_gdbg .nextColor (len (_gdbg ._afb .Ser ));_ecgd :=_gd .NewCT_LineSer ();_gdbg ._afb .Ser =append (_gdbg ._afb .Ser ,_ecgd );_ecgd .Idx .ValAttr =uint32 (len (_gdbg ._afb .Ser )-1);_ecgd .Order .ValAttr =uint32 (len (_gdbg ._afb .Ser )-1);_gea :=LineChartSeries {_ecgd };_gea .InitializeDefaults ();_gea .Properties ().LineProperties ().SetSolidFill (_aaee );return _gea ;};func (_fed chartBase )nextColor (_bbc int )_fg .Color {return _aef [_bbc %len (_aef )]};
// AddAxis adds an axis to a Surface chart.
func (_aagf Surface3DChart )AddAxis (axis Axis ){_gge :=_gd .NewCT_UnsignedInt ();_gge .ValAttr =axis .AxisID ();_aagf ._ddc .AxId =append (_aagf ._ddc .AxId ,_gge );};
// X returns the inner wrapped XML type.
func (_eae BubbleChartSeries )X ()*_gd .CT_BubbleSer {return _eae ._cef };
// X returns the inner wrapped XML type.
func (_bcce PieChart )X ()*_gd .CT_PieChart {return _bcce ._abgc };
// AddSeries adds a default series to an Doughnut chart.
func (_gacf DoughnutChart )AddSeries ()PieChartSeries {_dec :=_gd .NewCT_PieSer ();_gacf ._dba .Ser =append (_gacf ._dba .Ser ,_dec );_dec .Idx .ValAttr =uint32 (len (_gacf ._dba .Ser )-1);_dec .Order .ValAttr =uint32 (len (_gacf ._dba .Ser )-1);_bfe :=PieChartSeries {_dec };_bfe .InitializeDefaults ();return _bfe ;};
// X returns the inner wrapped XML type.
func (_abg Bar3DChart )X ()*_gd .CT_Bar3DChart {return _abg ._cg };
// AddAxis adds an axis to a Scatter chart.
func (_dfff ScatterChart )AddAxis (axis Axis ){_aabd :=_gd .NewCT_UnsignedInt ();_aabd .ValAttr =axis .AxisID ();_dfff ._abb .AxId =append (_dfff ._abb .AxId ,_aabd );};
// SetText sets the series text.
func (_eea BubbleChartSeries )SetText (s string ){_eea ._cef .Tx =_gd .NewCT_SerTx ();_eea ._cef .Tx .Choice .V =&s ;};
// SetText sets the series text
func (_ebbf ScatterChartSeries )SetText (s string ){_ebbf ._ggb .Tx =_gd .NewCT_SerTx ();_ebbf ._ggb .Tx .Choice .V =&s ;};
// RemoveLegend removes the legend if the chart has one.
func (_bed Chart )RemoveLegend (){_bed ._fa .Chart .Legend =nil };
// SetText sets the series text.
func (_fgb AreaChartSeries )SetText (s string ){_fgb ._ad .Tx =_gd .NewCT_SerTx ();_fgb ._ad .Tx .Choice .V =&s ;};
// AddLegend adds a legend to a chart, replacing any existing legend.
func (_ebf Chart )AddLegend ()Legend {_ebf ._fa .Chart .Legend =_gd .NewCT_Legend ();_eba :=MakeLegend (_ebf ._fa .Chart .Legend );_eba .InitializeDefaults ();return _eba ;};func (_ecga DateAxis )SetPosition (p _gd .ST_AxPos ){_ecga ._geg .AxPos =_gd .NewCT_AxPos ();_ecga ._geg .AxPos .ValAttr =p ;};
// Properties returns the Bubble chart series shape properties.
func (_efg BubbleChartSeries )Properties ()_ec .ShapeProperties {if _efg ._cef .SpPr ==nil {_efg ._cef .SpPr =_gdb .NewCT_ShapeProperties ();};return _ec .MakeShapeProperties (_efg ._cef .SpPr );};
// SetValues sets values directly on a source.
func (_bfdf NumberDataSource )SetValues (v []float64 ){_bfdf .ensureChoice ();_bfdf ._ege .Choice .NumRef =nil ;_bfdf ._ege .Choice .NumLit =_gd .NewCT_NumData ();_bfdf ._ege .Choice .NumLit .PtCount =_gd .NewCT_UnsignedInt ();_bfdf ._ege .Choice .NumLit .PtCount .ValAttr =uint32 (len (v ));for _cfab ,_dac :=range v {_bfdf ._ege .Choice .NumLit .Pt =append (_bfdf ._ege .Choice .NumLit .Pt ,&_gd .CT_NumVal {IdxAttr :uint32 (_cfab ),V :_e .Sprintf ("\u0025\u0067",_dac )});};};
// X returns the inner wrapped XML type.
func (_bbcg DoughnutChart )X ()*_gd .CT_DoughnutChart {return _bbcg ._dba };
// InitializeDefaults the bar chart to its defaults
func (_cc BarChart )InitializeDefaults (){_cc .SetDirection (_gd .ST_BarDirCol )};type DateAxis struct{_geg *_gd .CT_DateAx };
// SetText sets the series text
func (_gfa LineChartSeries )SetText (s string ){_gfa ._dab .Tx =_gd .NewCT_SerTx ();_gfa ._dab .Tx .Choice .V =&s ;};
// Values returns the value data source.
func (_bde PieChartSeries )Values ()NumberDataSource {if _bde ._cdg .Val ==nil {_bde ._cdg .Val =_gd .NewCT_NumDataSource ();};return MakeNumberDataSource (_bde ._cdg .Val );};type nullAxis byte ;func MakeMarker (x *_gd .CT_Marker )Marker {return Marker {x }};func (_adfa Marker )SetSymbol (s _gd .ST_MarkerStyle ){if s ==_gd .ST_MarkerStyleUnset {_adfa ._ebb .Symbol =nil ;}else {_adfa ._ebb .Symbol =_gd .NewCT_MarkerStyle ();_adfa ._ebb .Symbol .ValAttr =s ;};};
// InitializeDefaults initializes an Radar series to the default values.
func (_gdbgf RadarChartSeries )InitializeDefaults (){};
// Values returns the bubble size data source.
func (_gda BubbleChartSeries )BubbleSizes ()NumberDataSource {if _gda ._cef .BubbleSize ==nil {_gda ._cef .BubbleSize =_gd .NewCT_NumDataSource ();};return MakeNumberDataSource (_gda ._cef .BubbleSize );};
// X returns the inner wrapped XML type.
func (_gbc BarChart )X ()*_gd .CT_BarChart {return _gbc ._gee };
// DoughnutChart is a Doughnut chart.
type DoughnutChart struct{chartBase ;_dba *_gd .CT_DoughnutChart ;};
// InitializeDefaults the bar chart to its defaults
func (_ggd Pie3DChart )InitializeDefaults (){_ggd ._cdaa .VaryColors =_gd .NewCT_Boolean ();_ggd ._cdaa .VaryColors .ValAttr =_ge .Bool (true );};func (_bea DateAxis )MajorGridLines ()GridLines {if _bea ._geg .MajorGridlines ==nil {_bea ._geg .MajorGridlines =_gd .NewCT_ChartLines ();};return GridLines {_bea ._geg .MajorGridlines };};type chartBase struct{};func (_eaef ValueAxis )SetPosition (p _gd .ST_AxPos ){_eaef ._cge .AxPos =_gd .NewCT_AxPos ();_eaef ._cge .AxPos .ValAttr =p ;};
// Pie3DChart is a Pie3D chart.
type Pie3DChart struct{chartBase ;_cdaa *_gd .CT_Pie3DChart ;};
// Index returns the index of the series
func (_ddb ScatterChartSeries )Index ()uint32 {return _ddb ._ggb .Idx .ValAttr };
// InitializeDefaults the Stock chart to its defaults
func (_cec StockChart )InitializeDefaults (){_cec ._ddeg .HiLowLines =_gd .NewCT_ChartLines ();_cec ._ddeg .UpDownBars =_gd .NewCT_UpDownBars ();_cec ._ddeg .UpDownBars .GapWidth =_gd .NewCT_GapAmount ();_cec ._ddeg .UpDownBars .GapWidth .ValAttr =&_gd .ST_GapAmount {};_cec ._ddeg .UpDownBars .GapWidth .ValAttr .ST_GapAmountUShort =_ge .Uint16 (150);_cec ._ddeg .UpDownBars .UpBars =_gd .NewCT_UpDownBar ();_cec ._ddeg .UpDownBars .DownBars =_gd .NewCT_UpDownBar ();};func (_cga ValueAxis )SetTickLabelPosition (p _gd .ST_TickLblPos ){if p ==_gd .ST_TickLblPosUnset {_cga ._cge .TickLblPos =nil ;}else {_cga ._cge .TickLblPos =_gd .NewCT_TickLblPos ();_cga ._cge .TickLblPos .ValAttr =p ;};};
// Properties returns the bar chart series shape properties.
func (_aga RadarChartSeries )Properties ()_fa .ShapeProperties {if _aga ._gbc .SpPr ==nil {_aga ._gbc .SpPr =_b .NewCT_ShapeProperties ();};return _fa .MakeShapeProperties (_aga ._gbc .SpPr );};
func (_cfa BarChartSeries )Properties ()_ec .ShapeProperties {if _cfa ._aac .SpPr ==nil {_cfa ._aac .SpPr =_gdb .NewCT_ShapeProperties ();};return _ec .MakeShapeProperties (_cfa ._aac .SpPr );};type LineChart struct{chartBase ;_afb *_gd .CT_LineChart ;};
// SetText sets the series text.
func (_efdd RadarChartSeries )SetText (s string ){_efdd ._beb .Tx =_gd .NewCT_SerTx ();_efdd ._beb .Tx .Choice .V =&s ;};type DataLabels struct{_bdf *_gd .CT_DLbls };
// BarChartSeries is a series to be used on a bar chart.
type BarChartSeries struct{_aac *_gd .CT_BarSer };
// BubbleChartSeries is a series to be used on a Bubble chart.
type BubbleChartSeries struct{_cef *_gd .CT_BubbleSer };func (_cad StockChart )AddAxis (axis Axis ){_bgfe :=_gd .NewCT_UnsignedInt ();_bgfe .ValAttr =axis .AxisID ();_cad ._ddeg .AxId =append (_cad ._ddeg .AxId ,_bgfe );};
// SetIndex sets the index of the series
func (_beaa ScatterChartSeries )SetIndex (idx uint32 ){_beaa ._ggb .Idx .ValAttr =idx };
// Properties returns the line chart series shape properties.
func (_bgca SurfaceChartSeries )Properties ()_ec .ShapeProperties {if _bgca ._gdc .SpPr ==nil {_bgca ._gdc .SpPr =_gdb .NewCT_ShapeProperties ();};return _ec .MakeShapeProperties (_bgca ._gdc .SpPr );};
// 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 (_eggg NumberDataSource )CreateEmptyNumberCache (){_eggg .ensureChoice ();if _eggg ._dce .Choice .NumRef ==nil {_eggg ._dce .Choice .NumRef =_g .NewCT_NumRef ();};_eggg ._dce .Choice .NumLit =nil ;_eggg ._dce .Choice .NumRef .NumCache =_g .NewCT_NumData ();_eggg ._dce .Choice .NumRef .NumCache .PtCount =_g .NewCT_UnsignedInt ();_eggg ._dce .Choice .NumRef .NumCache .PtCount .ValAttr =0;};
func (_cfc NumberDataSource )CreateEmptyNumberCache (){_cfc .ensureChoice ();if _cfc ._ege .Choice .NumRef ==nil {_cfc ._ege .Choice .NumRef =_gd .NewCT_NumRef ();};_cfc ._ege .Choice .NumLit =nil ;_cfc ._ege .Choice .NumRef .NumCache =_gd .NewCT_NumData ();_cfc ._ege .Choice .NumRef .NumCache .PtCount =_gd .NewCT_UnsignedInt ();_cfc ._ege .Choice .NumRef .NumCache .PtCount .ValAttr =0;};
// X returns the inner wrapped XML type.
func (_eed LineChartSeries )X ()*_g .CT_LineSer {return _eed ._fda };
func (_dad PieChartSeries )X ()*_gd .CT_PieSer {return _dad ._cdg };
// Values returns the bubble size data source.
func (_db BubbleChartSeries )BubbleSizes ()NumberDataSource {if _db ._bac .BubbleSize ==nil {_db ._bac .BubbleSize =_g .NewCT_NumDataSource ();};return MakeNumberDataSource (_db ._bac .BubbleSize );};func (_edbg DateAxis )SetMinorTickMark (m _g .ST_TickMark ){if m ==_g .ST_TickMarkUnset {_edbg ._acg .MinorTickMark =nil ;}else {_edbg ._acg .MinorTickMark =_g .NewCT_TickMark ();_edbg ._acg .MinorTickMark .ValAttr =m ;};};
// X returns the inner wrapped XML type.
func (_abc SeriesAxis )X ()*_g .CT_SerAx {return _abc ._ecge };
// CategoryAxis returns the category data source.
func (_gde BubbleChartSeries )CategoryAxis ()CategoryAxisDataSource {if _gde ._bac .XVal ==nil {_gde ._bac .XVal =_g .NewCT_AxDataSource ();};return MakeAxisDataSource (_gde ._bac .XVal );};
// Properties returns the bar chart series shape properties.
func (_dfa BarChartSeries )Properties ()_fa .ShapeProperties {if _dfa ._ad .SpPr ==nil {_dfa ._ad .SpPr =_b .NewCT_ShapeProperties ();};return _fa .MakeShapeProperties (_dfa ._ad .SpPr );};func (_dgee ScatterChartSeries )InitializeDefaults (){_dgee .Properties ().LineProperties ().SetNoFill ();_dgee .Marker ().SetSymbol (_g .ST_MarkerStyleAuto );_dgee .Labels ().SetShowLegendKey (false );_dgee .Labels ().SetShowValue (true );_dgee .Labels ().SetShowPercent (false );_dgee .Labels ().SetShowCategoryName (false );_dgee .Labels ().SetShowSeriesName (false );_dgee .Labels ().SetShowLeaderLines (false );};
// AddBarChart adds a new bar chart to a chart.
func (_gef Chart )AddBarChart ()BarChart {_fcc :=_g .NewCT_PlotAreaChoice ();_gef ._gcf .Chart .PlotArea .Choice =append (_gef ._gcf .Chart .PlotArea .Choice ,_fcc );_fcc .BarChart =_g .NewCT_BarChart ();_fcc .BarChart .Grouping =_g .NewCT_BarGrouping ();_fcc .BarChart .Grouping .ValAttr =_g .ST_BarGroupingStandard ;_bcb :=BarChart {_ec :_fcc .BarChart };_bcb .InitializeDefaults ();return _bcb ;};
// Marker returns the marker properties.
func (_bfa ScatterChartSeries )Marker ()Marker {if _bfa ._ggb .Marker ==nil {_bfa ._ggb .Marker =_gd .NewCT_Marker ();};return MakeMarker (_bfa ._ggb .Marker );};func (_gdae DataLabels )SetShowPercent (b bool ){_gdae .ensureChoice ();_gdae ._bdf .Choice .ShowPercent =_gd .NewCT_Boolean ();_gdae ._bdf .Choice .ShowPercent .ValAttr =_ge .Bool (b );};func (_ef BubbleChart )AddAxis (axis Axis ){_aee :=_gd .NewCT_UnsignedInt ();_aee .ValAttr =axis .AxisID ();_ef ._ga .AxId =append (_ef ._ga .AxId ,_aee );};func (_fab SurfaceChartSeries )InitializeDefaults (){_fab .Properties ().LineProperties ().SetWidth (1*_a .Point );_fab .Properties ().LineProperties ().SetSolidFill (_fg .Black );_fab .Properties ().LineProperties ().SetJoin (_ec .LineJoinRound );};var _aef =[]_fg .Color {_fg .RGB (0x33,0x66,0xcc),_fg .RGB (0xDC,0x39,0x12),_fg .RGB (0xFF,0x99,0x00),_fg .RGB (0x10,0x96,0x18),_fg .RGB (0x99,0x00,0x99),_fg .RGB (0x3B,0x3E,0xAC),_fg .RGB (0x00,0x99,0xC6),_fg .RGB (0xDD,0x44,0x77),_fg .RGB (0x66,0xAA,0x00),_fg .RGB (0xB8,0x2E,0x2E),_fg .RGB (0x31,0x63,0x95),_fg .RGB (0x99,0x44,0x99),_fg .RGB (0x22,0xAA,0x99),_fg .RGB (0xAA,0xAA,0x11),_fg .RGB (0x66,0x33,0xCC),_fg .RGB (0xE6,0x73,0x00),_fg .RGB (0x8B,0x07,0x07),_fg .RGB (0x32,0x92,0x62),_fg .RGB (0x55,0x74,0xA6),_fg .RGB (0x3B,0x3E,0xAC)};
// LineChartSeries is the data series for a line chart.
type LineChartSeries struct{_fda *_g .CT_LineSer };func (_ggc Surface3DChart )InitializeDefaults (){_ggc ._dgb .Wireframe =_g .NewCT_Boolean ();_ggc ._dgb .Wireframe .ValAttr =_ge .Bool (false );_ggc ._dgb .BandFmts =_g .NewCT_BandFmts ();for _cgd :=0;_cgd < 15;_cgd ++{_efef :=_g .NewCT_BandFmt ();_efef .Idx .ValAttr =uint32 (_cgd );_efef .SpPr =_b .NewCT_ShapeProperties ();_cdg :=_fa .MakeShapeProperties (_efef .SpPr );_cdg .SetSolidFill (_ggc .nextColor (_cgd ));_ggc ._dgb .BandFmts .BandFmt =append (_ggc ._dgb .BandFmts .BandFmt ,_efef );};};func (_eab LineChartSeries )CategoryAxis ()CategoryAxisDataSource {if _eab ._fda .Cat ==nil {_eab ._fda .Cat =_g .NewCT_AxDataSource ();};return MakeAxisDataSource (_eab ._fda .Cat );};
type LineChartSeries struct{_dab *_gd .CT_LineSer };
// AddBubbleChart adds a new bubble chart.
func (_fgddf Chart )AddBubbleChart ()BubbleChart {_bd :=_g .NewCT_PlotAreaChoice ();_fgddf ._gcf .Chart .PlotArea .Choice =append (_fgddf ._gcf .Chart .PlotArea .Choice ,_bd );_bd .BubbleChart =_g .NewCT_BubbleChart ();_fee :=BubbleChart {_egb :_bd .BubbleChart };_fee .InitializeDefaults ();return _fee ;};func (_gbdb SeriesAxis )InitializeDefaults (){};
// X returns the inner wrapped XML type.
func (_be Bar3DChart )X ()*_g .CT_Bar3DChart {return _be ._abb };
// CategoryAxis returns the category data source.
func (_dff PieChartSeries )CategoryAxis ()CategoryAxisDataSource {if _dff ._gfg .Cat ==nil {_dff ._gfg .Cat =_g .NewCT_AxDataSource ();};return MakeAxisDataSource (_dff ._gfg .Cat );};
// X returns the inner wrapped XML type.
func (_gce GridLines )X ()*_g .CT_ChartLines {return _gce ._bcad };
// SetText sets the series text.
func (_bbf PieChartSeries )SetText (s string ){_bbf ._gfg .Tx =_g .NewCT_SerTx ();_bbf ._gfg .Tx .Choice .V =&s ;};func (_cbb DataLabels )ensureChoice (){if _cbb ._dca .Choice ==nil {_cbb ._dca .Choice =_g .NewCT_DLblsChoice ();};};
// AreaChart is an area chart that has a shaded area underneath a curve.
type AreaChart struct{chartBase ;_ab *_g .CT_AreaChart ;};type ScatterChart struct{chartBase ;_fdcg *_g .CT_ScatterChart ;};
// InitializeDefaults the bar chart to its defaults
func (_ea Area3DChart )InitializeDefaults (){};
// Index returns the index of the series
func (_cfadd SurfaceChartSeries )Index ()uint32 {return _cfadd ._geff .Idx .ValAttr };func MakeTitle (x *_g .CT_Title )Title {return Title {x }};
// X returns the inner wrapped XML type.
func (_bfb BarChartSeries )X ()*_g .CT_BarSer {return _bfb ._ad };
// InitializeDefaults the bar chart to its defaults
func (_egbd RadarChart )InitializeDefaults (){_egbd ._dfe .RadarStyle .ValAttr =_g .ST_RadarStyleMarker };
// AddSeries adds a default series to an area chart.
func (_de Area3DChart )AddSeries ()AreaChartSeries {_fg :=_de .nextColor (len (_de ._e .Ser ));_dc :=_g .NewCT_AreaSer ();_de ._e .Ser =append (_de ._e .Ser ,_dc );_dc .Idx .ValAttr =uint32 (len (_de ._e .Ser )-1);_dc .Order .ValAttr =uint32 (len (_de ._e .Ser )-1);_eb :=AreaChartSeries {_dc };_eb .InitializeDefaults ();_eb .Properties ().SetSolidFill (_fg );return _eb ;};
// Properties returns the chart's shape properties.
func (_feg Chart )Properties ()_fa .ShapeProperties {if _feg ._gcf .SpPr ==nil {_feg ._gcf .SpPr =_b .NewCT_ShapeProperties ();};return _fa .MakeShapeProperties (_feg ._gcf .SpPr );};
// X returns the inner wrapped XML type.
func (_ggd DateAxis )X ()*_g .CT_DateAx {return _ggd ._acg };
// X returns the inner wrapped XML type.
func (_dd BubbleChartSeries )X ()*_g .CT_BubbleSer {return _dd ._bac };
// InitializeDefaults the bar chart to its defaults
func (_ebcb Pie3DChart )InitializeDefaults (){_ebcb ._fca .VaryColors =_g .NewCT_Boolean ();_ebcb ._fca .VaryColors .ValAttr =_ge .Bool (true );};
// SetText sets the series text
func (_baag LineChartSeries )SetText (s string ){_baag ._fda .Tx =_g .NewCT_SerTx ();_baag ._fda .Tx .Choice .V =&s ;};
// InitializeDefaults the Bubble chart to its defaults
func (_ed BubbleChart )InitializeDefaults (){};
// SetLabelReference is used to set the source data to a range of cells
// containing strings.
func (_cbg CategoryAxisDataSource )SetLabelReference (s string ){_cbg ._bg .Choice =_g .NewCT_AxDataSourceChoice ();_cbg ._bg .Choice .StrRef =_g .NewCT_StrRef ();_cbg ._bg .Choice .StrRef .F =s ;};func (_dac Title )InitializeDefaults (){_dac .SetText ("\u0054\u0069\u0074l\u0065");_dac .RunProperties ().SetSize (16*_fb .Point );_dac .RunProperties ().SetSolidFill (_fc .Black );_dac .RunProperties ().SetFont ("\u0043\u0061\u006c\u0069\u0062\u0020\u0072\u0069");_dac .RunProperties ().SetBold (false );};func (_bgf DateAxis )SetCrosses (axis Axis ){_bgf ._acg .CrossAx .ValAttr =axis .AxisID ()};func MakeChart (x *_g .ChartSpace )Chart {return Chart {x }};
func (_fbea CategoryAxisDataSource )SetLabelReference (s string ){_fbea ._gf .Choice =_gd .NewCT_AxDataSourceChoice ();_fbea ._gf .Choice .StrRef =_gd .NewCT_StrRef ();_fbea ._gf .Choice .StrRef .F =s ;};
// X returns the inner wrapped XML type.
func (_dcg SurfaceChart )X ()*_g .CT_SurfaceChart {return _dcg ._edeb };type SeriesAxis struct{_ecge *_g .CT_SerAx };
// SetText sets the series text.
func (_abd BubbleChartSeries )SetText (s string ){_abd ._bac .Tx =_g .NewCT_SerTx ();_abd ._bac .Tx .Choice .V =&s ;};
// InitializeDefaults initializes a bar chart series to the default values.
func (_cff BarChartSeries )InitializeDefaults (){};func (_edgb ValueAxis )SetMinorTickMark (m _g .ST_TickMark ){if m ==_g .ST_TickMarkUnset {_edgb ._bge .MinorTickMark =nil ;}else {_edgb ._bge .MinorTickMark =_g .NewCT_TickMark ();_edgb ._bge .MinorTickMark .ValAttr =m ;};};
// AddPieOfPieChart adds a new pie chart to a chart.
func (_bcab Chart )AddPieOfPieChart ()PieOfPieChart {_bfa :=_g .NewCT_PlotAreaChoice ();_bcab ._gcf .Chart .PlotArea .Choice =append (_bcab ._gcf .Chart .PlotArea .Choice ,_bfa );_bfa .OfPieChart =_g .NewCT_OfPieChart ();_fcbe :=PieOfPieChart {_adc :_bfa .OfPieChart };_fcbe .InitializeDefaults ();return _fcbe ;};func (_bb nullAxis )AxisID ()uint32 {return 0};
func (_cfgd Marker )X ()*_gd .CT_Marker {return _cfgd ._ebb };
// X returns the inner wrapped XML type.
func (_abgg Title )X ()*_g .CT_Title {return _abgg ._cbec };
func (_gba RadarChart )X ()*_gd .CT_RadarChart {return _gba ._acd };func (_ece SurfaceChart )InitializeDefaults (){_ece ._fecf .Wireframe =_gd .NewCT_Boolean ();_ece ._fecf .Wireframe .ValAttr =_ge .Bool (false );_ece ._fecf .BandFmts =_gd .NewCT_BandFmts ();for _fcf :=0;_fcf < 15;_fcf ++{_aefe :=_gd .NewCT_BandFmt ();_aefe .Idx .ValAttr =uint32 (_fcf );_aefe .SpPr =_gdb .NewCT_ShapeProperties ();_bfda :=_ec .MakeShapeProperties (_aefe .SpPr );_bfda .SetSolidFill (_ece .nextColor (_fcf ));_ece ._fecf .BandFmts .BandFmt =append (_ece ._fecf .BandFmts .BandFmt ,_aefe );};};
// SetValues is used to set the source data to a set of values.
func (_bff CategoryAxisDataSource )SetValues (v []string ){_bff ._gf .Choice =_gd .NewCT_AxDataSourceChoice ();_bff ._gf .Choice .StrLit =_gd .NewCT_StrData ();_bff ._gf .Choice .StrLit .PtCount =_gd .NewCT_UnsignedInt ();_bff ._gf .Choice .StrLit .PtCount .ValAttr =uint32 (len (v ));for _de ,_aae :=range v {_bff ._gf .Choice .StrLit .Pt =append (_bff ._gf .Choice .StrLit .Pt ,&_gd .CT_StrVal {IdxAttr :uint32 (_de ),V :_aae });};};
// SetType sets the type the secone pie to either pie or bar
func (_ebae PieOfPieChart )SetType (t _gd .ST_OfPieType ){_ebae ._caf .OfPieType .ValAttr =t };func MakeDataLabels (x *_gd .CT_DLbls )DataLabels {return DataLabels {x }};func (_dcbg ScatterChartSeries )InitializeDefaults (){_dcbg .Properties ().LineProperties ().SetNoFill ();_dcbg .Marker ().SetSymbol (_gd .ST_MarkerStyleAuto );_dcbg .Labels ().SetShowLegendKey (false );_dcbg .Labels ().SetShowValue (true );_dcbg .Labels ().SetShowPercent (false );_dcbg .Labels ().SetShowCategoryName (false );_dcbg .Labels ().SetShowSeriesName (false );_dcbg .Labels ().SetShowLeaderLines (false );};type GridLines struct{_ffd *_gd .CT_ChartLines };
// AddAxis adds an axis to a line chart.
func (_aag LineChart )AddAxis (axis Axis ){_ccbd :=_gd .NewCT_UnsignedInt ();_ccbd .ValAttr =axis .AxisID ();_aag ._afb .AxId =append (_aag ._afb .AxId ,_ccbd );};func (_abbg Surface3DChart )InitializeDefaults (){_abbg ._ddc .Wireframe =_gd .NewCT_Boolean ();_abbg ._ddc .Wireframe .ValAttr =_ge .Bool (false );_abbg ._ddc .BandFmts =_gd .NewCT_BandFmts ();for _gfb :=0;_gfb < 15;_gfb ++{_dbb :=_gd .NewCT_BandFmt ();_dbb .Idx .ValAttr =uint32 (_gfb );_dbb .SpPr =_gdb .NewCT_ShapeProperties ();_cdga :=_ec .MakeShapeProperties (_dbb .SpPr );_cdga .SetSolidFill (_abbg .nextColor (_gfb ));_abbg ._ddc .BandFmts .BandFmt =append (_abbg ._ddc .BandFmts .BandFmt ,_dbb );};};
// AddSeries adds a default series to an Pie chart.
func (_bge PieOfPieChart )AddSeries ()PieChartSeries {_bdc :=_gd .NewCT_PieSer ();_bge ._caf .Ser =append (_bge ._caf .Ser ,_bdc );_bdc .Idx .ValAttr =uint32 (len (_bge ._caf .Ser )-1);_bdc .Order .ValAttr =uint32 (len (_bge ._caf .Ser )-1);_dea :=PieChartSeries {_bdc };_dea .InitializeDefaults ();return _dea ;};
// AddSeries adds a default series to a bar chart.
func (_egb BarChart )AddSeries ()BarChartSeries {_ca :=_egb .nextColor (len (_egb ._gee .Ser ));_df :=_gd .NewCT_BarSer ();_egb ._gee .Ser =append (_egb ._gee .Ser ,_df );_df .Idx .ValAttr =uint32 (len (_egb ._gee .Ser )-1);_df .Order .ValAttr =uint32 (len (_egb ._gee .Ser )-1);_cd :=BarChartSeries {_df };_cd .InitializeDefaults ();_cd .Properties ().SetSolidFill (_ca );return _cd ;};
// StockChart is a 2D Stock chart.
type StockChart struct{chartBase ;_ddeg *_gd .CT_StockChart ;};
// SetIndex sets the index of the series
func (_fced LineChartSeries )SetIndex (idx uint32 ){_fced ._dab .Idx .ValAttr =idx };
// X returns the inner wrapped XML type.
func (_gdg LineChart )X ()*_gd .CT_LineChart {return _gdg ._afb };
// AddLine3DChart adds a new 3D line chart to a chart.
func (_efa Chart )AddLine3DChart ()Line3DChart {_gade (_efa ._fa .Chart );_ded :=_gd .NewCT_PlotAreaChoice ();_efa ._fa .Chart .PlotArea .Choice =append (_efa ._fa .Chart .PlotArea .Choice ,_ded );_ded .Line3DChart =_gd .NewCT_Line3DChart ();_ded .Line3DChart .Grouping =_gd .NewCT_Grouping ();_ded .Line3DChart .Grouping .ValAttr =_gd .ST_GroupingStandard ;return Line3DChart {_ced :_ded .Line3DChart };};
// AddSeries adds a default series to a Surface chart.
func (_ebe SurfaceChart )AddSeries ()SurfaceChartSeries {_edc :=_ebe .nextColor (len (_ebe ._fecf .Ser ));_cdcd :=_gd .NewCT_SurfaceSer ();_ebe ._fecf .Ser =append (_ebe ._fecf .Ser ,_cdcd );_cdcd .Idx .ValAttr =uint32 (len (_ebe ._fecf .Ser )-1);_cdcd .Order .ValAttr =uint32 (len (_ebe ._fecf .Ser )-1);_bdg :=SurfaceChartSeries {_cdcd };_bdg .InitializeDefaults ();_bdg .Properties ().LineProperties ().SetSolidFill (_edc );return _bdg ;};
// X returns the inner wrapped XML type.
func (_dfb RadarChartSeries )X ()*_gd .CT_RadarSer {return _dfb ._beb };
// Index returns the index of the series
func (_edef LineChartSeries )Index ()uint32 {return _edef ._dab .Idx .ValAttr };
// SetText sets the series text
func (_cefe SurfaceChartSeries )SetText (s string ){_cefe ._gdc .Tx =_gd .NewCT_SerTx ();_cefe ._gdc .Tx .Choice .V =&s ;};
// AddSeries adds a default series to a line chart.
func (_egc Line3DChart )AddSeries ()LineChartSeries {_bdd :=_egc .nextColor (len (_egc ._ced .Ser ));_bbb :=_gd .NewCT_LineSer ();_egc ._ced .Ser =append (_egc ._ced .Ser ,_bbb );_bbb .Idx .ValAttr =uint32 (len (_egc ._ced .Ser )-1);_bbb .Order .ValAttr =uint32 (len (_egc ._ced .Ser )-1);_fce :=LineChartSeries {_bbb };_fce .InitializeDefaults ();_fce .Properties ().LineProperties ().SetSolidFill (_bdd );_fce .Properties ().SetSolidFill (_bdd );return _fce ;};func (_gggc ValueAxis )Properties ()_ec .ShapeProperties {if _gggc ._cge .SpPr ==nil {_gggc ._cge .SpPr =_gdb .NewCT_ShapeProperties ();};return _ec .MakeShapeProperties (_gggc ._cge .SpPr );};func (_daa SurfaceChartSeries )CategoryAxis ()CategoryAxisDataSource {if _daa ._gdc .Cat ==nil {_daa ._gdc .Cat =_gd .NewCT_AxDataSource ();};return MakeAxisDataSource (_daa ._gdc .Cat );};func _gade (_cefd *_gd .CT_Chart ){_cefd .View3D =_gd .NewCT_View3D ();_cefd .View3D .RotX =_gd .NewCT_RotX ();_cefd .View3D .RotX .ValAttr =_ge .Int8 (15);_cefd .View3D .RotY =_gd .NewCT_RotY ();_cefd .View3D .RotY .ValAttr =_ge .Uint16 (20);_cefd .View3D .RAngAx =_gd .NewCT_Boolean ();_cefd .View3D .RAngAx .ValAttr =_ge .Bool (false );_cefd .Floor =_gd .NewCT_Surface ();_cefd .Floor .Thickness =_gd .NewCT_Thickness ();_cefd .Floor .Thickness .ValAttr .Uint32 =_ge .Uint32 (0);_cefd .SideWall =_gd .NewCT_Surface ();_cefd .SideWall .Thickness =_gd .NewCT_Thickness ();_cefd .SideWall .Thickness .ValAttr .Uint32 =_ge .Uint32 (0);_cefd .BackWall =_gd .NewCT_Surface ();_cefd .BackWall .Thickness =_gd .NewCT_Thickness ();_cefd .BackWall .Thickness .ValAttr .Uint32 =_ge .Uint32 (0);};
// X returns the inner wrapped XML type.
func (_gad BubbleChart )X ()*_gd .CT_BubbleChart {return _gad ._ga };
// InitializeDefaults initializes an Pie series to the default values.
func (_dfd PieChartSeries )InitializeDefaults (){};
// SetDirection changes the direction of the bar chart (bar or column).
func (_fb BarChart )SetDirection (d _gd .ST_BarDir ){_fb ._gee .BarDir .ValAttr =d };
// AddDateAxis adds a value axis to the chart.
func (_acc Chart )AddDateAxis ()DateAxis {_fea :=_gd .NewCT_DateAx ();if _acc ._fa .Chart .PlotArea .CChoice ==nil {_acc ._fa .Chart .PlotArea .CChoice =_gd .NewCT_PlotAreaChoice1 ();};_fea .AxId =_gd .NewCT_UnsignedInt ();_fea .AxId .ValAttr =0x7FFFFFFF&_f .Uint32 ();_acc ._fa .Chart .PlotArea .CChoice .DateAx =append (_acc ._fa .Chart .PlotArea .CChoice .DateAx ,_fea );_fea .Delete =_gd .NewCT_Boolean ();_fea .Delete .ValAttr =_ge .Bool (false );_fea .Scaling =_gd .NewCT_Scaling ();_fea .Scaling .Orientation =_gd .NewCT_Orientation ();_fea .Scaling .Orientation .ValAttr =_gd .ST_OrientationMinMax ;_fea .Choice =&_gd .EG_AxSharedChoice {};_fea .Choice .Crosses =_gd .NewCT_Crosses ();_fea .Choice .Crosses .ValAttr =_gd .ST_CrossesAutoZero ;_baa :=DateAxis {_fea };_baa .MajorGridLines ().Properties ().LineProperties ().SetSolidFill (_fg .LightGray );_baa .SetMajorTickMark (_gd .ST_TickMarkOut );_baa .SetMinorTickMark (_gd .ST_TickMarkIn );_baa .SetTickLabelPosition (_gd .ST_TickLblPosNextTo );_baa .Properties ().LineProperties ().SetSolidFill (_fg .Black );_baa .SetPosition (_gd .ST_AxPosL );return _baa ;};type Legend struct{_gcd *_gd .CT_Legend };
// Labels returns the data label properties.
func (_aaga LineChartSeries )Labels ()DataLabels {if _aaga ._dab .DLbls ==nil {_aaga ._dab .DLbls =_gd .NewCT_DLbls ();};return MakeDataLabels (_aaga ._dab .DLbls );};
// AddSeries adds a default series to a Stock chart.
func (_efc StockChart )AddSeries ()LineChartSeries {_geeag :=_gd .NewCT_LineSer ();_efc ._ddeg .Ser =append (_efc ._ddeg .Ser ,_geeag );_geeag .Idx .ValAttr =uint32 (len (_efc ._ddeg .Ser )-1);_geeag .Order .ValAttr =uint32 (len (_efc ._ddeg .Ser )-1);_add :=LineChartSeries {_geeag };_add .Values ().CreateEmptyNumberCache ();_add .Properties ().LineProperties ().SetNoFill ();return _add ;};
// SetOrder sets the order of the series
func (_ebd LineChartSeries )SetOrder (idx uint32 ){_ebd ._dab .Order .ValAttr =idx };
// Labels returns the data label properties.
func (_gaf ScatterChartSeries )Labels ()DataLabels {if _gaf ._ggb .DLbls ==nil {_gaf ._ggb .DLbls =_gd .NewCT_DLbls ();};return MakeDataLabels (_gaf ._ggb .DLbls );};
// AddSeries adds a default series to a bar chart.
func (_agg Bar3DChart )AddSeries ()BarChartSeries {_dbg :=_agg .nextColor (len (_agg ._cg .Ser ));_bec :=_gd .NewCT_BarSer ();_agg ._cg .Ser =append (_agg ._cg .Ser ,_bec );_bec .Idx .ValAttr =uint32 (len (_agg ._cg .Ser )-1);_bec .Order .ValAttr =uint32 (len (_agg ._cg .Ser )-1);_aab :=BarChartSeries {_bec };_aab .InitializeDefaults ();_aab .Properties ().SetSolidFill (_dbg );return _aab ;};func (_gacc LineChartSeries )SetSmooth (b bool ){_gacc ._dab .Smooth =_gd .NewCT_Boolean ();_gacc ._dab .Smooth .ValAttr =&b ;};func (_bba ScatterChartSeries )Values ()NumberDataSource {if _bba ._ggb .YVal ==nil {_bba ._ggb .YVal =_gd .NewCT_NumDataSource ();};return MakeNumberDataSource (_bba ._ggb .YVal );};
// AddLineChart adds a new line chart to a chart.
func (_dg Chart )AddLineChart ()LineChart {_ffff :=_gd .NewCT_PlotAreaChoice ();_dg ._fa .Chart .PlotArea .Choice =append (_dg ._fa .Chart .PlotArea .Choice ,_ffff );_ffff .LineChart =_gd .NewCT_LineChart ();_ffff .LineChart .Grouping =_gd .NewCT_Grouping ();_ffff .LineChart .Grouping .ValAttr =_gd .ST_GroupingStandard ;return LineChart {_afb :_ffff .LineChart };};func (_fgdc Title )ParagraphProperties ()_ec .ParagraphProperties {if _fgdc ._gdde .Tx ==nil {_fgdc .SetText ("");};if _fgdc ._gdde .Tx .Choice .Rich .P [0].PPr ==nil {_fgdc ._gdde .Tx .Choice .Rich .P [0].PPr =_gdb .NewCT_TextParagraphProperties ();};return _ec .MakeParagraphProperties (_fgdc ._gdde .Tx .Choice .Rich .P [0].PPr );};
// PieChartSeries is a series to be used on an Pie chart.
type PieChartSeries struct{_cdg *_gd .CT_PieSer };
// SetOrder sets the order of the series
func (_fda ScatterChartSeries )SetOrder (idx uint32 ){_fda ._ggb .Order .ValAttr =idx };
// AddSeries adds a default series to a Bubble chart.
func (_bgg BubbleChart )AddSeries ()BubbleChartSeries {_ecb :=_bgg .nextColor (len (_bgg ._ga .Ser ));_cfad :=_gd .NewCT_BubbleSer ();_bgg ._ga .Ser =append (_bgg ._ga .Ser ,_cfad );_cfad .Idx .ValAttr =uint32 (len (_bgg ._ga .Ser )-1);_cfad .Order .ValAttr =uint32 (len (_bgg ._ga .Ser )-1);_afd :=BubbleChartSeries {_cfad };_afd .InitializeDefaults ();_afd .Properties ().SetSolidFill (_ecb );return _afd ;};
// Values returns the value data source.
func (_fff AreaChartSeries )Values ()NumberDataSource {if _fff ._ad .Val ==nil {_fff ._ad .Val =_gd .NewCT_NumDataSource ();};return MakeNumberDataSource (_fff ._ad .Val );};func (_dcbb Legend )InitializeDefaults (){_dcbb .SetPosition (_gd .ST_LegendPosR );_dcbb .SetOverlay (false );_dcbb .Properties ().SetNoFill ();_dcbb .Properties ().LineProperties ().SetNoFill ();};
// AddSeries adds a default series to an Radar chart.
func (_efd RadarChart )AddSeries ()RadarChartSeries {_efb :=_efd .nextColor (len (_efd ._acd .Ser ));_fgcb :=_gd .NewCT_RadarSer ();_efd ._acd .Ser =append (_efd ._acd .Ser ,_fgcb );_fgcb .Idx .ValAttr =uint32 (len (_efd ._acd .Ser )-1);_fgcb .Order .ValAttr =uint32 (len (_efd ._acd .Ser )-1);_fbgg :=RadarChartSeries {_fgcb };_fbgg .InitializeDefaults ();_fbgg .Properties ().SetSolidFill (_efb );return _fbgg ;};func (_gege LineChartSeries )InitializeDefaults (){_gege .Properties ().LineProperties ().SetWidth (1*_a .Point );_gege .Properties ().LineProperties ().SetSolidFill (_fg .Black );_gege .Properties ().LineProperties ().SetJoin (_ec .LineJoinRound );_gege .Marker ().SetSymbol (_gd .ST_MarkerStyleNone );_gege .Labels ().SetShowLegendKey (false );_gege .Labels ().SetShowValue (false );_gege .Labels ().SetShowPercent (false );_gege .Labels ().SetShowCategoryName (false );_gege .Labels ().SetShowSeriesName (false );_gege .Labels ().SetShowLeaderLines (false );};func (_baad Chart )AddSeriesAxis ()SeriesAxis {_abf :=_gd .NewCT_SerAx ();if _baad ._fa .Chart .PlotArea .CChoice ==nil {_baad ._fa .Chart .PlotArea .CChoice =_gd .NewCT_PlotAreaChoice1 ();};_abf .AxId =_gd .NewCT_UnsignedInt ();_abf .AxId .ValAttr =0x7FFFFFFF&_f .Uint32 ();_baad ._fa .Chart .PlotArea .CChoice .SerAx =append (_baad ._fa .Chart .PlotArea .CChoice .SerAx ,_abf );_abf .Delete =_gd .NewCT_Boolean ();_abf .Delete .ValAttr =_ge .Bool (false );_abd :=MakeSeriesAxis (_abf );_abd .InitializeDefaults ();return _abd ;};func (_ede DateAxis )SetMajorTickMark (m _gd .ST_TickMark ){if m ==_gd .ST_TickMarkUnset {_ede ._geg .MajorTickMark =nil ;}else {_ede ._geg .MajorTickMark =_gd .NewCT_TickMark ();_ede ._geg .MajorTickMark .ValAttr =m ;};};func (_eaa Legend )Properties ()_ec .ShapeProperties {if _eaa ._gcd .SpPr ==nil {_eaa ._gcd .SpPr =_gdb .NewCT_ShapeProperties ();};return _ec .MakeShapeProperties (_eaa ._gcd .SpPr );};func (_ccaa Title )SetText (s string ){if _ccaa ._gdde .Tx ==nil {_ccaa ._gdde .Tx =_gd .NewCT_Tx ();};if _ccaa ._gdde .Tx .Choice .Rich ==nil {_ccaa ._gdde .Tx .Choice .Rich =_gdb .NewCT_TextBody ();};var _edgd *_gdb .CT_TextParagraph ;if len (_ccaa ._gdde .Tx .Choice .Rich .P )==0{_edgd =_gdb .NewCT_TextParagraph ();_ccaa ._gdde .Tx .Choice .Rich .P =[]*_gdb .CT_TextParagraph {_edgd };}else {_edgd =_ccaa ._gdde .Tx .Choice .Rich .P [0];};var _adfag *_gdb .EG_TextRun ;if len (_edgd .EG_TextRun )==0{_adfag =_gdb .NewEG_TextRun ();_edgd .EG_TextRun =[]*_gdb .EG_TextRun {_adfag };}else {_adfag =_edgd .EG_TextRun [0];};if _adfag .R ==nil {_adfag .R =_gdb .NewCT_RegularTextRun ();};_adfag .R .T =s ;};func (_dee NumberDataSource )SetReference (s string ){_dee .ensureChoice ();if _dee ._ege .Choice .NumRef ==nil {_dee ._ege .Choice .NumRef =_gd .NewCT_NumRef ();};_dee ._ege .Choice .NumRef .F =s ;};
// RadarChartSeries is a series to be used on an Radar chart.
type RadarChartSeries struct{_beb *_gd .CT_RadarSer };type SurfaceChartSeries struct{_gdc *_gd .CT_SurfaceSer };
// AddSeries adds a default series to a Scatter chart.
func (_bbg ScatterChart )AddSeries ()ScatterChartSeries {_cea :=_bbg .nextColor (len (_bbg ._abb .Ser ));_ggdg :=_gd .NewCT_ScatterSer ();_bbg ._abb .Ser =append (_bbg ._abb .Ser ,_ggdg );_ggdg .Idx .ValAttr =uint32 (len (_bbg ._abb .Ser )-1);_ggdg .Order .ValAttr =uint32 (len (_bbg ._abb .Ser )-1);_gbg :=ScatterChartSeries {_ggdg };_gbg .InitializeDefaults ();_gbg .Marker ().Properties ().LineProperties ().SetSolidFill (_cea );_gbg .Marker ().Properties ().SetSolidFill (_cea );return _gbg ;};func (_edd LineChartSeries )Values ()NumberDataSource {if _edd ._dab .Val ==nil {_edd ._dab .Val =_gd .NewCT_NumDataSource ();};return MakeNumberDataSource (_edd ._dab .Val );};
// X returns the inner wrapped XML type.
func (_gbb PieOfPieChart )X ()*_gd .CT_OfPieChart {return _gbb ._caf };func (_dff DataLabels )SetPosition (p _gd .ST_DLblPos ){_dff .ensureChoice ();_dff ._bdf .Choice .DLblPos =_gd .NewCT_DLblPos ();_dff ._bdf .Choice .DLblPos .ValAttr =p ;};
// SetDirection changes the direction of the bar chart (bar or column).
func (_gg Bar3DChart )SetDirection (d _gd .ST_BarDir ){_gg ._cg .BarDir .ValAttr =d };
// AddSeries adds a default series to an Pie3D chart.
func (_eefe Pie3DChart )AddSeries ()PieChartSeries {_fgce :=_gd .NewCT_PieSer ();_eefe ._cdaa .Ser =append (_eefe ._cdaa .Ser ,_fgce );_fgce .Idx .ValAttr =uint32 (len (_eefe ._cdaa .Ser )-1);_fgce .Order .ValAttr =uint32 (len (_eefe ._cdaa .Ser )-1);_fbbc :=PieChartSeries {_fgce };_fbbc .InitializeDefaults ();return _fbbc ;};func MakeChart (x *_gd .ChartSpace )Chart {return Chart {x }};
// Order returns the order of the series
func (_gaag SurfaceChartSeries )Order ()uint32 {return _gaag ._geff .Order .ValAttr };type Marker struct{_eee *_g .CT_Marker };
func (_cda LineChartSeries )Order ()uint32 {return _cda ._dab .Order .ValAttr };func (_eaea ScatterChart )InitializeDefaults (){_eaea ._abb .ScatterStyle .ValAttr =_gd .ST_ScatterStyleMarker ;};
// X returns the inner wrapped XML type.
func (_aec AreaChartSeries )X ()*_gd .CT_AreaSer {return _aec ._ad };
// AreaChart is an area chart that has a shaded area underneath a curve.
type AreaChart struct{chartBase ;_db *_gd .CT_AreaChart ;};
// AddSurface3DChart adds a new 3D surface chart to a chart.
func (_gfe Chart )AddSurface3DChart ()Surface3DChart {_bfd :=_gd .NewCT_PlotAreaChoice ();_gfe ._fa .Chart .PlotArea .Choice =append (_gfe ._fa .Chart .PlotArea .Choice ,_bfd );_bfd .Surface3DChart =_gd .NewCT_Surface3DChart ();_gade (_gfe ._fa .Chart );_def :=Surface3DChart {_ddc :_bfd .Surface3DChart };_def .InitializeDefaults ();return _def ;};
// SetHoleSize controls the hole size in the pie chart and is measured in percent.
func (_aeeg DoughnutChart )SetHoleSize (pct uint8 ){if _aeeg ._dba .HoleSize ==nil {_aeeg ._dba .HoleSize =_gd .NewCT_HoleSize ();};if _aeeg ._dba .HoleSize .ValAttr ==nil {_aeeg ._dba .HoleSize .ValAttr =&_gd .ST_HoleSize {};};_aeeg ._dba .HoleSize .ValAttr .ST_HoleSizeUByte =&pct ;};
// AddAxis adds an axis to a line chart.
func (_bbf Line3DChart )AddAxis (axis Axis ){_gcf :=_gd .NewCT_UnsignedInt ();_gcf .ValAttr =axis .AxisID ();_bbf ._ced .AxId =append (_bbf ._ced .AxId ,_gcf );};
// X returns the inner wrapped XML type.
func (_eaf SurfaceChart )X ()*_gd .CT_SurfaceChart {return _eaf ._fecf };
// AddDoughnutChart adds a new doughnut (pie with a hole in the center) chart to a chart.
func (_fd Chart )AddDoughnutChart ()DoughnutChart {_aeb :=_gd .NewCT_PlotAreaChoice ();_fd ._fa .Chart .PlotArea .Choice =append (_fd ._fa .Chart .PlotArea .Choice ,_aeb );_aeb .DoughnutChart =_gd .NewCT_DoughnutChart ();_eb :=DoughnutChart {_dba :_aeb .DoughnutChart };_eb .InitializeDefaults ();return _eb ;};func (_fdbf RadarChart )AddAxis (axis Axis ){_bad :=_gd .NewCT_UnsignedInt ();_bad .ValAttr =axis .AxisID ();_fdbf ._acd .AxId =append (_fdbf ._acd .AxId ,_bad );};
// CategoryAxis returns the category data source.
func (_bedf RadarChartSeries )CategoryAxis ()CategoryAxisDataSource {if _bedf ._beb .Cat ==nil {_bedf ._beb .Cat =_gd .NewCT_AxDataSource ();};return MakeAxisDataSource (_bedf ._beb .Cat );};func (_ecdbf Title )RunProperties ()_ec .RunProperties {if _ecdbf ._gdde .Tx ==nil {_ecdbf .SetText ("");};if _ecdbf ._gdde .Tx .Choice .Rich .P [0].EG_TextRun [0].R .RPr ==nil {_ecdbf ._gdde .Tx .Choice .Rich .P [0].EG_TextRun [0].R .RPr =_gdb .NewCT_TextCharacterProperties ();};return _ec .MakeRunProperties (_ecdbf ._gdde .Tx .Choice .Rich .P [0].EG_TextRun [0].R .RPr );};
// AddBubbleChart adds a new bubble chart.
func (_cb Chart )AddBubbleChart ()BubbleChart {_cdf :=_gd .NewCT_PlotAreaChoice ();_cb ._fa .Chart .PlotArea .Choice =append (_cb ._fa .Chart .PlotArea .Choice ,_cdf );_cdf .BubbleChart =_gd .NewCT_BubbleChart ();_cgd :=BubbleChart {_ga :_cdf .BubbleChart };_cgd .InitializeDefaults ();return _cgd ;};
// Order returns the order of the series
func (_fbba SurfaceChartSeries )Order ()uint32 {return _fbba ._gdc .Order .ValAttr };func (_fga nullAxis )AxisID ()uint32 {return 0};
// Values returns the value data source.
func (_cca BarChartSeries )Values ()NumberDataSource {if _cca ._aac .Val ==nil {_cca ._aac .Val =_gd .NewCT_NumDataSource ();};return MakeNumberDataSource (_cca ._aac .Val );};func (_da CategoryAxis )SetMinorTickMark (m _gd .ST_TickMark ){if m ==_gd .ST_TickMarkUnset {_da ._ggc .MinorTickMark =nil ;}else {_da ._ggc .MinorTickMark =_gd .NewCT_TickMark ();_da ._ggc .MinorTickMark .ValAttr =m ;};};
// InitializeDefaults the bar chart to its defaults
func (_gae RadarChart )InitializeDefaults (){_gae ._acd .RadarStyle .ValAttr =_gd .ST_RadarStyleMarker };func (_ebg ValueAxis )SetCrosses (axis Axis ){_ebg ._cge .CrossAx .ValAttr =axis .AxisID ()};func (_bgc SeriesAxis )SetCrosses (axis Axis ){_bgc ._aaca .CrossAx .ValAttr =axis .AxisID ()};
// Axis is the interface implemented by different axes when assigning to a
// chart.
type Axis interface{AxisID ()uint32 ;};func (_aggf CategoryAxis )SetMajorTickMark (m _gd .ST_TickMark ){if m ==_gd .ST_TickMarkUnset {_aggf ._ggc .MajorTickMark =nil ;}else {_aggf ._ggc .MajorTickMark =_gd .NewCT_TickMark ();_aggf ._ggc .MajorTickMark .ValAttr =m ;};};
// X returns the inner wrapped XML type.
func (_gdd SeriesAxis )X ()*_gd .CT_SerAx {return _gdd ._aaca };
// X returns the inner wrapped XML type.
func (_acg ScatterChart )X ()*_gd .CT_ScatterChart {return _acg ._abb };
// X returns the inner wrapped XML type.
func (_gbd GridLines )X ()*_gd .CT_ChartLines {return _gbd ._ffd };func (_cgg CategoryAxis )SetTickLabelPosition (p _gd .ST_TickLblPos ){if p ==_gd .ST_TickLblPosUnset {_cgg ._ggc .TickLblPos =nil ;}else {_cgg ._ggc .TickLblPos =_gd .NewCT_TickLblPos ();_cgg ._ggc .TickLblPos .ValAttr =p ;};};
// X returns the inner wrapped XML type.
func (_fgda LineChartSeries )X ()*_gd .CT_LineSer {return _fgda ._dab };type Marker struct{_ebb *_gd .CT_Marker };
// SetExplosion sets the value that the segements of the pie are 'exploded' by
func (_fcec PieChartSeries )SetExplosion (v uint32 ){_fcec ._cdg .Explosion =_gd .NewCT_UnsignedInt ();_fcec ._cdg .Explosion .ValAttr =v ;};
// AddArea3DChart adds a new area chart to a chart.
func (_cdc Chart )AddArea3DChart ()Area3DChart {_gade (_cdc ._fa .Chart );_fc :=_gd .NewCT_PlotAreaChoice ();_cdc ._fa .Chart .PlotArea .Choice =append (_cdc ._fa .Chart .PlotArea .Choice ,_fc );_fc .Area3DChart =_gd .NewCT_Area3DChart ();_bd :=Area3DChart {_ag :_fc .Area3DChart };_bd .InitializeDefaults ();return _bd ;};func (_gca CategoryAxis )MajorGridLines ()GridLines {if _gca ._ggc .MajorGridlines ==nil {_gca ._ggc .MajorGridlines =_gd .NewCT_ChartLines ();};return GridLines {_gca ._ggc .MajorGridlines };};
// AddSeries adds a default series to an Pie chart.
func (_eace PieChart )AddSeries ()PieChartSeries {_fcd :=_gd .NewCT_PieSer ();_eace ._abgc .Ser =append (_eace ._abgc .Ser ,_fcd );_fcd .Idx .ValAttr =uint32 (len (_eace ._abgc .Ser )-1);_fcd .Order .ValAttr =uint32 (len (_eace ._abgc .Ser )-1);_dcbf :=PieChartSeries {_fcd };_dcbf .InitializeDefaults ();return _dcbf ;};func (_ade DataLabels )SetShowLeaderLines (b bool ){_ade .ensureChoice ();_ade ._bdf .Choice .ShowLeaderLines =_gd .NewCT_Boolean ();_ade ._bdf .Choice .ShowLeaderLines .ValAttr =_ge .Bool (b );};func (_ggab SeriesAxis )InitializeDefaults (){};
// InitializeDefaults initializes a bar chart series to the default values.
func (_cdd BarChartSeries )InitializeDefaults (){};func (_adf CategoryAxis )Properties ()_ec .ShapeProperties {if _adf ._ggc .SpPr ==nil {_adf ._ggc .SpPr =_gdb .NewCT_ShapeProperties ();};return _ec .MakeShapeProperties (_adf ._ggc .SpPr );};
// InitializeDefaults the bar chart to its defaults
func (_d Area3DChart )InitializeDefaults (){};
// AddSeries adds a default series to an area chart.
func (_ff AreaChart )AddSeries ()AreaChartSeries {_ea :=_ff .nextColor (len (_ff ._db .Ser ));_ae :=_gd .NewCT_AreaSer ();_ff ._db .Ser =append (_ff ._db .Ser ,_ae );_ae .Idx .ValAttr =uint32 (len (_ff ._db .Ser )-1);_ae .Order .ValAttr =uint32 (len (_ff ._db .Ser )-1);_ecd :=AreaChartSeries {_ae };_ecd .InitializeDefaults ();_ecd .Properties ().SetSolidFill (_ea );return _ecd ;};func MakeSeriesAxis (x *_gd .CT_SerAx )SeriesAxis {return SeriesAxis {x }};func (_ged ScatterChartSeries )SetSmooth (b bool ){_ged ._ggb .Smooth =_gd .NewCT_Boolean ();_ged ._ggb .Smooth .ValAttr =&b ;};
// Bar3DChart is a 3D bar chart.
type Bar3DChart struct{chartBase ;_cg *_gd .CT_Bar3DChart ;};
// SurfaceChart is a 3D surface chart, viewed from the top-down.
type SurfaceChart struct{chartBase ;_fecf *_gd .CT_SurfaceChart ;};func (_fggf DateAxis )SetCrosses (axis Axis ){_fggf ._geg .CrossAx .ValAttr =axis .AxisID ()};
// AddSeries adds a default series to a Surface chart.
func (_afbg Surface3DChart )AddSeries ()SurfaceChartSeries {_bfb :=_afbg .nextColor (len (_afbg ._ddc .Ser ));_edg :=_gd .NewCT_SurfaceSer ();_afbg ._ddc .Ser =append (_afbg ._ddc .Ser ,_edg );_edg .Idx .ValAttr =uint32 (len (_afbg ._ddc .Ser )-1);_edg .Order .ValAttr =uint32 (len (_afbg ._ddc .Ser )-1);_bddf :=SurfaceChartSeries {_edg };_bddf .InitializeDefaults ();_bddf .Properties ().LineProperties ().SetSolidFill (_bfb );return _bddf ;};func (_daff SeriesAxis )AxisID ()uint32 {return _daff ._aaca .AxId .ValAttr };
// CategoryAxis returns the category data source.
func (_dc BubbleChartSeries )CategoryAxis ()CategoryAxisDataSource {if _dc ._cef .XVal ==nil {_dc ._cef .XVal =_gd .NewCT_AxDataSource ();};return MakeAxisDataSource (_dc ._cef .XVal );};func (_geb DateAxis )SetTickLabelPosition (p _gd .ST_TickLblPos ){if p ==_gd .ST_TickLblPosUnset {_geb ._geg .TickLblPos =nil ;}else {_geb ._geg .TickLblPos =_gd .NewCT_TickLblPos ();_geb ._geg .TickLblPos .ValAttr =p ;};};
// Properties returns the chart's shape properties.
func (_dcb Chart )Properties ()_ec .ShapeProperties {if _dcb ._fa .SpPr ==nil {_dcb ._fa .SpPr =_gdb .NewCT_ShapeProperties ();};return _ec .MakeShapeProperties (_dcb ._fa .SpPr );};func (_fec DateAxis )SetMinorTickMark (m _gd .ST_TickMark ){if m ==_gd .ST_TickMarkUnset {_fec ._geg .MinorTickMark =nil ;}else {_fec ._geg .MinorTickMark =_gd .NewCT_TickMark ();_fec ._geg .MinorTickMark .ValAttr =m ;};};
// PieChart is a Pie chart.
type PieChart struct{chartBase ;_abgc *_gd .CT_PieChart ;};func (_cce SurfaceChartSeries )Values ()NumberDataSource {if _cce ._gdc .Val ==nil {_cce ._gdc .Val =_gd .NewCT_NumDataSource ();};_bbba :=MakeNumberDataSource (_cce ._gdc .Val );_bbba .CreateEmptyNumberCache ();return _bbba ;};
// Surface3DChart is a 3D view of a surface chart.
type Surface3DChart struct{chartBase ;_ddc *_gd .CT_Surface3DChart ;};
// SetText sets the series text.
func (_ggf BarChartSeries )SetText (s string ){_ggf ._aac .Tx =_gd .NewCT_SerTx ();_ggf ._aac .Tx .Choice .V =&s ;};
// AddStockChart adds a new stock chart.
func (_dgc Chart )AddStockChart ()StockChart {_ecdd :=_gd .NewCT_PlotAreaChoice ();_dgc ._fa .Chart .PlotArea .Choice =append (_dgc ._fa .Chart .PlotArea .Choice ,_ecdd );_ecdd .StockChart =_gd .NewCT_StockChart ();_cfd :=StockChart {_ddeg :_ecdd .StockChart };_cfd .InitializeDefaults ();return _cfd ;};type ScatterChart struct{chartBase ;_abb *_gd .CT_ScatterChart ;};
// AddAreaChart adds a new area chart to a chart.
func (_fe Chart )AddAreaChart ()AreaChart {_gbf :=_gd .NewCT_PlotAreaChoice ();_fe ._fa .Chart .PlotArea .Choice =append (_fe ._fa .Chart .PlotArea .Choice ,_gbf );_gbf .AreaChart =_gd .NewCT_AreaChart ();_gcba :=AreaChart {_db :_gbf .AreaChart };_gcba .InitializeDefaults ();return _gcba ;};
// X returns the inner wrapped XML type.
func (_dda Legend )X ()*_gd .CT_Legend {return _dda ._gcd };func (_eag DateAxis )Properties ()_ec .ShapeProperties {if _eag ._geg .SpPr ==nil {_eag ._geg .SpPr =_gdb .NewCT_ShapeProperties ();};return _ec .MakeShapeProperties (_eag ._geg .SpPr );};func (_dd Bar3DChart )AddAxis (axis Axis ){_ce :=_gd .NewCT_UnsignedInt ();_ce .ValAttr =axis .AxisID ();_dd ._cg .AxId =append (_dd ._cg .AxId ,_ce );};func (_gbdc Marker )Properties ()_ec .ShapeProperties {if _gbdc ._ebb .SpPr ==nil {_gbdc ._ebb .SpPr =_gdb .NewCT_ShapeProperties ();};return _ec .MakeShapeProperties (_gbdc ._ebb .SpPr );};
// Values returns the value data source.
func (_aff RadarChartSeries )Values ()NumberDataSource {if _aff ._beb .Val ==nil {_aff ._beb .Val =_gd .NewCT_NumDataSource ();};return MakeNumberDataSource (_aff ._beb .Val );};
// InitializeDefaults initializes an area series to the default values.
func (_ab AreaChartSeries )InitializeDefaults (){};
// Properties returns the line chart series shape properties.
func (_cgdc ScatterChartSeries )Properties ()_ec .ShapeProperties {if _cgdc ._ggb .SpPr ==nil {_cgdc ._ggb .SpPr =_gdb .NewCT_ShapeProperties ();};return _ec .MakeShapeProperties (_cgdc ._ggb .SpPr );};func (_gaa DataLabels )SetShowLegendKey (b bool ){_gaa .ensureChoice ();_gaa ._bdf .Choice .ShowLegendKey =_gd .NewCT_Boolean ();_gaa ._bdf .Choice .ShowLegendKey .ValAttr =_ge .Bool (b );};
// Chart is a generic chart.
type Chart struct{_fa *_gd .ChartSpace };func (_ggfb Legend )SetPosition (p _gd .ST_LegendPos ){if p ==_gd .ST_LegendPosUnset {_ggfb ._gcd .LegendPos =nil ;}else {_ggfb ._gcd .LegendPos =_gd .NewCT_LegendPos ();_ggfb ._gcd .LegendPos .ValAttr =p ;};};
// BarChart is a 2D bar chart.
type BarChart struct{chartBase ;_gee *_gd .CT_BarChart ;};
// Properties returns the bar chart series shape properties.
func (_ccbf RadarChartSeries )Properties ()_ec .ShapeProperties {if _ccbf ._beb .SpPr ==nil {_ccbf ._beb .SpPr =_gdb .NewCT_ShapeProperties ();};return _ec .MakeShapeProperties (_ccbf ._beb .SpPr );};
// X returns the inner wrapped XML type.
func (_bada SurfaceChartSeries )X ()*_gd .CT_SurfaceSer {return _bada ._gdc };
// SetIndex sets the index of the series
func (_geaf SurfaceChartSeries )SetIndex (idx uint32 ){_geaf ._gdc .Idx .ValAttr =idx };func (_af Area3DChart )AddAxis (axis Axis ){_cf :=_gd .NewCT_UnsignedInt ();_cf .ValAttr =axis .AxisID ();_af ._ag .AxId =append (_af ._ag .AxId ,_cf );};
// Properties returns the bar chart series shape properties.
func (_aa AreaChartSeries )Properties ()_ec .ShapeProperties {if _aa ._ad .SpPr ==nil {_aa ._ad .SpPr =_gdb .NewCT_ShapeProperties ();};return _ec .MakeShapeProperties (_aa ._ad .SpPr );};func (_gcac LineChartSeries )CategoryAxis ()CategoryAxisDataSource {if _gcac ._dab .Cat ==nil {_gcac ._dab .Cat =_gd .NewCT_AxDataSource ();};return MakeAxisDataSource (_gcac ._dab .Cat );};func MakeCategoryAxis (x *_gd .CT_CatAx )CategoryAxis {return CategoryAxis {x }};
// X returns the inner wrapped XML type.
func (_aecf Pie3DChart )X ()*_gd .CT_Pie3DChart {return _aecf ._cdaa };
// AddPieOfPieChart adds a new pie chart to a chart.
func (_ccg Chart )AddPieOfPieChart ()PieOfPieChart {_gac :=_gd .NewCT_PlotAreaChoice ();_ccg ._fa .Chart .PlotArea .Choice =append (_ccg ._fa .Chart .PlotArea .Choice ,_gac );_gac .OfPieChart =_gd .NewCT_OfPieChart ();_ffe :=PieOfPieChart {_caf :_gac .OfPieChart };_ffe .InitializeDefaults ();return _ffe ;};func (_egaf CategoryAxis )SetCrosses (axis Axis ){_egaf ._ggc .Choice =_gd .NewEG_AxSharedChoice ();_egaf ._ggc .Choice .Crosses =_gd .NewCT_Crosses ();_egaf ._ggc .Choice .Crosses .ValAttr =_gd .ST_CrossesAutoZero ;_egaf ._ggc .CrossAx .ValAttr =axis .AxisID ();};
// X returns the inner wrapped XML type.
func (_adg Chart )X ()*_gd .ChartSpace {return _adg ._fa };func (_edda ValueAxis )SetMinorTickMark (m _gd .ST_TickMark ){if m ==_gd .ST_TickMarkUnset {_edda ._cge .MinorTickMark =nil ;}else {_edda ._cge .MinorTickMark =_gd .NewCT_TickMark ();_edda ._cge .MinorTickMark .ValAttr =m ;};};
// InitializeDefaults initializes a Bubble chart series to the default values.
func (_agd BubbleChartSeries )InitializeDefaults (){};func (_egf ValueAxis )SetMajorTickMark (m _gd .ST_TickMark ){if m ==_gd .ST_TickMarkUnset {_egf ._cge .MajorTickMark =nil ;}else {_egf ._cge .MajorTickMark =_gd .NewCT_TickMark ();_egf ._cge .MajorTickMark .ValAttr =m ;};};
// ScatterChartSeries is the data series for a scatter chart.
type ScatterChartSeries struct{_ggb *_gd .CT_ScatterSer };
// RadarChart is an Radar chart that has a shaded Radar underneath a curve.
type RadarChart struct{chartBase ;_acd *_gd .CT_RadarChart ;};
// X returns the inner wrapped XML type.
func (_ddab Title )X ()*_gd .CT_Title {return _ddab ._gdde };func (_bag NumberDataSource )ensureChoice (){if _bag ._ege .Choice ==nil {_bag ._ege .Choice =_gd .NewCT_NumDataSourceChoice ();};};
// AddValueAxis adds a value axis to the chart.
func (_aabg Chart )AddValueAxis ()ValueAxis {_geea :=_gd .NewCT_ValAx ();if _aabg ._fa .Chart .PlotArea .CChoice ==nil {_aabg ._fa .Chart .PlotArea .CChoice =_gd .NewCT_PlotAreaChoice1 ();};_geea .AxId =_gd .NewCT_UnsignedInt ();_geea .AxId .ValAttr =0x7FFFFFFF&_f .Uint32 ();_aabg ._fa .Chart .PlotArea .CChoice .ValAx =append (_aabg ._fa .Chart .PlotArea .CChoice .ValAx ,_geea );_geea .Delete =_gd .NewCT_Boolean ();_geea .Delete .ValAttr =_ge .Bool (false );_geea .Scaling =_gd .NewCT_Scaling ();_geea .Scaling .Orientation =_gd .NewCT_Orientation ();_geea .Scaling .Orientation .ValAttr =_gd .ST_OrientationMinMax ;_geea .Choice =&_gd .EG_AxSharedChoice {};_geea .Choice .Crosses =_gd .NewCT_Crosses ();_geea .Choice .Crosses .ValAttr =_gd .ST_CrossesAutoZero ;_geea .CrossBetween =_gd .NewCT_CrossBetween ();_geea .CrossBetween .ValAttr =_gd .ST_CrossBetweenBetween ;_bcc :=MakeValueAxis (_geea );_bcc .MajorGridLines ().Properties ().LineProperties ().SetSolidFill (_fg .LightGray );_bcc .SetMajorTickMark (_gd .ST_TickMarkOut );_bcc .SetMinorTickMark (_gd .ST_TickMarkIn );_bcc .SetTickLabelPosition (_gd .ST_TickLblPosNextTo );_bcc .Properties ().LineProperties ().SetSolidFill (_fg .Black );_bcc .SetPosition (_gd .ST_AxPosL );return _bcc ;};func (_dbf ValueAxis )MajorGridLines ()GridLines {if _dbf ._cge .MajorGridlines ==nil {_dbf ._cge .MajorGridlines =_gd .NewCT_ChartLines ();};return GridLines {_dbf ._cge .MajorGridlines };};
// InitializeDefaults the bar chart to its defaults
func (_cbb PieChart )InitializeDefaults (){_cbb ._abgc .VaryColors =_gd .NewCT_Boolean ();_cbb ._abgc .VaryColors .ValAttr =_ge .Bool (true );};func (_gfc ValueAxis )AxisID ()uint32 {return _gfc ._cge .AxId .ValAttr };func MakeNumberDataSource (x *_gd .CT_NumDataSource )NumberDataSource {return NumberDataSource {x }};
// InitializeDefaults the bar chart to its defaults
func (_agde DoughnutChart )InitializeDefaults (){_agde ._dba .VaryColors =_gd .NewCT_Boolean ();_agde ._dba .VaryColors .ValAttr =_ge .Bool (true );_agde ._dba .HoleSize =_gd .NewCT_HoleSize ();_agde ._dba .HoleSize .ValAttr =&_gd .ST_HoleSize {};_agde ._dba .HoleSize .ValAttr .ST_HoleSizeUByte =_ge .Uint8 (50);};func (_bb CategoryAxis )SetPosition (p _gd .ST_AxPos ){_bb ._ggc .AxPos =_gd .NewCT_AxPos ();_bb ._ggc .AxPos .ValAttr =p ;};func (_ebad Legend )SetOverlay (b bool ){_ebad ._gcd .Overlay =_gd .NewCT_Boolean ();_ebad ._gcd .Overlay .ValAttr =_ge .Bool (b );};
// X returns the inner wrapped XML type.
func (_b Area3DChart )X ()*_gd .CT_Area3DChart {return _b ._ag };
// AddBar3DChart adds a new 3D bar chart to a chart.
func (_fffa Chart )AddBar3DChart ()Bar3DChart {_gade (_fffa ._fa .Chart );_afdf :=_gd .NewCT_PlotAreaChoice ();_fffa ._fa .Chart .PlotArea .Choice =append (_fffa ._fa .Chart .PlotArea .Choice ,_afdf );_afdf .Bar3DChart =_gd .NewCT_Bar3DChart ();_afdf .Bar3DChart .Grouping =_gd .NewCT_BarGrouping ();_afdf .Bar3DChart .Grouping .ValAttr =_gd .ST_BarGroupingStandard ;_gdad :=Bar3DChart {_cg :_afdf .Bar3DChart };_gdad .InitializeDefaults ();return _gdad ;};
// Properties returns the line chart series shape properties.
func (_fbeb LineChartSeries )Properties ()_ec .ShapeProperties {if _fbeb ._dab .SpPr ==nil {_fbeb ._dab .SpPr =_gdb .NewCT_ShapeProperties ();};return _ec .MakeShapeProperties (_fbeb ._dab .SpPr );};
// SetOrder sets the order of the series
func (_gbdb SurfaceChartSeries )SetOrder (idx uint32 ){_gbdb ._gdc .Order .ValAttr =idx };func (_ggg DateAxis )AxisID ()uint32 {return _ggg ._geg .AxId .ValAttr };
// AddSurfaceChart adds a new surface chart to a chart.
func (_aad Chart )AddSurfaceChart ()SurfaceChart {_dgf :=_gd .NewCT_PlotAreaChoice ();_aad ._fa .Chart .PlotArea .Choice =append (_aad ._fa .Chart .PlotArea .Choice ,_dgf );_dgf .SurfaceChart =_gd .NewCT_SurfaceChart ();_gade (_aad ._fa .Chart );_aad ._fa .Chart .View3D .RotX .ValAttr =_ge .Int8 (90);_aad ._fa .Chart .View3D .RotY .ValAttr =_ge .Uint16 (0);_aad ._fa .Chart .View3D .Perspective =_gd .NewCT_Perspective ();_aad ._fa .Chart .View3D .Perspective .ValAttr =_ge .Uint8 (0);_gbe :=SurfaceChart {_fecf :_dgf .SurfaceChart };_gbe .InitializeDefaults ();return _gbe ;};
// Values returns the value data source.
func (_aecg BubbleChartSeries )Values ()NumberDataSource {if _aecg ._cef .YVal ==nil {_aecg ._cef .YVal =_gd .NewCT_NumDataSource ();};return MakeNumberDataSource (_aecg ._cef .YVal );};
// X returns the inner wrapped XML type.
func (_fde Line3DChart )X ()*_gd .CT_Line3DChart {return _fde ._ced };

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

File diff suppressed because one or more lines are too long

View File

@ -13,404 +13,404 @@
// OOXML document formats.
//
// Package common contains common properties used by the subpackages.
package common ;import (_gf "archive/zip";_eg "bytes";_fg "encoding/xml";_ea "errors";_cf "fmt";_cdc "github.com/unidoc/unioffice";_cda "github.com/unidoc/unioffice/common/logger";_baa "github.com/unidoc/unioffice/common/tempstorage";_ba "github.com/unidoc/unioffice/common/tempstorage/diskstore";_ce "github.com/unidoc/unioffice/measurement";_dg "github.com/unidoc/unioffice/schema/soo/dml";_cd "github.com/unidoc/unioffice/schema/soo/ofc/custom_properties";_dc "github.com/unidoc/unioffice/schema/soo/ofc/docPropsVTypes";_bag "github.com/unidoc/unioffice/schema/soo/ofc/extended_properties";_cb "github.com/unidoc/unioffice/schema/soo/pkg/content_types";_gc "github.com/unidoc/unioffice/schema/soo/pkg/metadata/core_properties";_bg "github.com/unidoc/unioffice/schema/soo/pkg/relationships";_a "github.com/unidoc/unioffice/zippkg";_ff "image";_ "image/gif";_ "image/jpeg";_ "image/png";_d "os";_f "reflect";_db "regexp";_gg "strconv";_b "strings";_dd "time";);func (_gfde CustomProperties )SetPropertyAsError (name string ,error string ){_dcf :=_gfde .getNewProperty (name );_dcf .Error =&error ;_gfde .setOrReplaceProperty (_dcf );};
// TableStyles contains document specific properties.
type TableStyles struct{_afa *_dg .TblStyleLst };
// Path returns the path to an image file, if any.
func (_ffgc ImageRef )Path ()string {return _ffgc ._bace .Path };func (_ebf CustomProperties )SetPropertyAsLpwstr (name string ,lpwstr string ){_adb :=_ebf .getNewProperty (name );_adb .Lpwstr =&lpwstr ;_ebf .setOrReplaceProperty (_adb );};
// 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 (_afg ImageRef )RelativeWidth (h _ce .Distance )_ce .Distance {_cdae :=float64 (_afg .Size ().X )/float64 (_afg .Size ().Y );return h *_ce .Distance (_cdae );};func (_cbe CustomProperties )SetPropertyAsI2 (name string ,i2 int16 ){_eb :=_cbe .getNewProperty (name );_eb .I2 =&i2 ;_cbe .setOrReplaceProperty (_eb );};
// RemoveOverrideByIndex removes an override given a path and override index.
func (_ffad ContentTypes )RemoveOverrideByIndex (path string ,indexToFind int )error {_ggae :=path [0:len (path )-5];if !_b .HasPrefix (_ggae ,"\u002f"){_ggae ="\u002f"+_ggae ;};_gbc ,_bgf :=_db .Compile (_ggae +"\u0028\u005b\u0030-\u0039\u005d\u002b\u0029\u002e\u0078\u006d\u006c");if _bgf !=nil {return _bgf ;};_gcc :=0;_bdf :=-1;for _ffc ,_cbd :=range _ffad ._gdb .Override {if _egd :=_gbc .FindStringSubmatch (_cbd .PartNameAttr );len (_egd )> 1{if _gcc ==indexToFind {_bdf =_ffc ;}else if _gcc > indexToFind {_gda ,_ :=_gg .Atoi (_egd [1]);_gda --;_cbd .PartNameAttr =_cf .Sprintf ("\u0025\u0073\u0025\u0064\u002e\u0078\u006d\u006c",_ggae ,_gda );};_gcc ++;};};if _bdf > -1{copy (_ffad ._gdb .Override [_bdf :],_ffad ._gdb .Override [_bdf +1:]);_ffad ._gdb .Override =_ffad ._gdb .Override [0:len (_ffad ._gdb .Override )-1];};return nil ;};func (_aedg CustomProperties )SetPropertyAsFiletime (name string ,filetime _dd .Time ){_ebd :=_aedg .getNewProperty (name );_ebd .Filetime =&filetime ;_aedg .setOrReplaceProperty (_ebd );};
// CoreProperties contains document specific properties.
type CoreProperties struct{_bfe *_gc .CoreProperties };func (_fcc CustomProperties )SetPropertyAsUi2 (name string ,ui2 uint16 ){_cac :=_fcc .getNewProperty (name );_cac .Ui2 =&ui2 ;_fcc .setOrReplaceProperty (_cac );};
// SetContentStatus records the content status of the document.
func (_debe CoreProperties )SetContentStatus (s string ){_debe ._bfe .ContentStatus =&s };
// AddImageToZip adds an image (either from bytes or from disk) and adds it to the zip file.
func AddImageToZip (z *_gf .Writer ,img ImageRef ,imageNum int ,dt _cdc .DocType )error {_ebc :=_cdc .AbsoluteImageFilename (dt ,imageNum ,_b .ToLower (img .Format ()));if img .Data ()!=nil &&len (*img .Data ())> 0{if _bfgc :=_a .AddFileFromBytes (z ,_ebc ,*img .Data ());_bfgc !=nil {return _bfgc ;};}else if img .Path ()!=""{if _abc :=_a .AddFileFromDisk (z ,_ebc ,img .Path ());_abc !=nil {return _abc ;};}else {return _cf .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 ;};
// SetLastModifiedBy records the last person to modify the document.
func (_aefb CoreProperties )SetLastModifiedBy (s string ){_aefb ._bfe .LastModifiedBy =&s };func (_fde CustomProperties )SetPropertyAsBstr (name string ,bstr string ){_bcb :=_fde .getNewProperty (name );_bcb .Bstr =&bstr ;_fde .setOrReplaceProperty (_bcb );};
// EnsureOverride ensures that an override for the given path exists, adding it if necessary
func (_cee ContentTypes )EnsureOverride (path ,contentType string ){for _ ,_bbdc :=range _cee ._gdb .Override {if _bbdc .PartNameAttr ==path {if _b .HasPrefix (contentType ,"\u0068\u0074\u0074\u0070"){_cda .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 );};_bbdc .ContentTypeAttr =contentType ;return ;};};_cee .AddOverride (path ,contentType );};func (_cfg CustomProperties )SetPropertyAsOstream (name string ,ostream string ){_aed :=_cfg .getNewProperty (name );_aed .Ostream =&ostream ;_cfg .setOrReplaceProperty (_aed );};func (_cedd CustomProperties )SetPropertyAsUi1 (name string ,ui1 uint8 ){_eba :=_cedd .getNewProperty (name );_eba .Ui1 =&ui1 ;_cedd .setOrReplaceProperty (_eba );};
// RelID returns the relationship ID.
func (_cag ImageRef )RelID ()string {return _cag ._eeb };func (_ega CustomProperties )SetPropertyAsArray (name string ,array *_dc .Array ){_dbe :=_ega .getNewProperty (name );_dbe .Array =array ;_ega .setOrReplaceProperty (_dbe );};func (_fba CustomProperties )setOrReplaceProperty (_gfa *_cd .CT_Property ){_fba .setPropertyHelper (_gfa ,true );};
// NewTableStyles constructs a new TableStyles.
func NewTableStyles ()TableStyles {return TableStyles {_afa :_dg .NewTblStyleLst ()}};
// SetOffsetX sets horizontal offset of a table in distance units (see measurement package).
func (_adg Table )SetOffsetX (offX float64 ){if _adg ._bee .Off ==nil {_adg ._bee .Off =_dg .NewCT_Point2D ();_gbaa :=int64 (0);_adg ._bee .Off .YAttr =_dg .ST_Coordinate {ST_CoordinateUnqualified :&_gbaa };};_cdbb :=_ce .ToEMU (offX );_adg ._bee .Off .XAttr =_dg .ST_Coordinate {ST_CoordinateUnqualified :&_cdbb };};
// 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 (_fced ImageRef )RelativeHeight (w _ce .Distance )_ce .Distance {_gefg :=float64 (_fced .Size ().Y )/float64 (_fced .Size ().X );return w *_ce .Distance (_gefg );};
// X returns the inner wrapped XML type.
func (_fbae TableStyles )X ()*_dg .TblStyleLst {return _fbae ._afa };
// SetStyle assigns TableStyle to a table.
func (_fgbae Table )SetStyle (style *_dg .CT_TableStyle ){if _fgbae ._dega .TblPr ==nil {_fgbae ._dega .TblPr =_dg .NewCT_TableProperties ();};if _fgbae ._dega .TblPr .Choice ==nil {_fgbae ._dega .TblPr .Choice =_dg .NewCT_TablePropertiesChoice ();};_fgbae ._dega .TblPr .Choice .TableStyle =style ;};
// ContentStatus returns the content status of the document (e.g. "Final", "Draft")
func (_egg CoreProperties )ContentStatus ()string {if _egg ._bfe .ContentStatus !=nil {return *_egg ._bfe .ContentStatus ;};return "";};
// WriteExtraFiles writes the extra files to the zip package.
func (_effc *DocBase )WriteExtraFiles (z *_gf .Writer )error {for _ ,_dab :=range _effc .ExtraFiles {if _cge :=_a .AddFileFromDisk (z ,_dab .ZipPath ,_dab .DiskPath );_cge !=nil {return _cge ;};};return nil ;};
package common ;import (_ff "archive/zip";_af "bytes";_ee "encoding/xml";_da "errors";_aa "fmt";_gc "github.com/unidoc/unioffice";_ab "github.com/unidoc/unioffice/common/logger";_ffba "github.com/unidoc/unioffice/common/tempstorage";_gd "github.com/unidoc/unioffice/common/tempstorage/diskstore";_ffb "github.com/unidoc/unioffice/measurement";_fe "github.com/unidoc/unioffice/schema/soo/dml";_fa "github.com/unidoc/unioffice/schema/soo/ofc/custom_properties";_fg "github.com/unidoc/unioffice/schema/soo/ofc/docPropsVTypes";_dad "github.com/unidoc/unioffice/schema/soo/ofc/extended_properties";_c "github.com/unidoc/unioffice/schema/soo/pkg/content_types";_bc "github.com/unidoc/unioffice/schema/soo/pkg/metadata/core_properties";_aae "github.com/unidoc/unioffice/schema/soo/pkg/relationships";_g "github.com/unidoc/unioffice/zippkg";_e "image";_ "image/gif";_ "image/jpeg";_ "image/png";_ag "os";_d "reflect";_ac "regexp";_ec "strconv";_eb "strings";_ef "time";);
// GetTargetByRelIdAndType returns a target path with the associated relation ID.
func (_fcdd Relationships )GetTargetByRelIdAndType (idAttr string ,typeAttr string )string {for _ ,_befgg :=range _fcdd ._eag .Relationship {if _befgg .IdAttr ==idAttr &&_befgg .TypeAttr ==typeAttr {return _befgg .TargetAttr ;};};return "";};
func (_geff Relationships )GetTargetByRelIdAndType (idAttr string ,typeAttr string )string {for _ ,_fgg :=range _geff ._feec .Relationship {if _fgg .IdAttr ==idAttr &&_fgg .TypeAttr ==typeAttr {return _fgg .TargetAttr ;};};return "";};
// SetCategory records the category of the document.
func (_gac CoreProperties )SetCategory (s string ){_gac ._bfe .Category =&s };
// TableStyles contains document specific properties.
type TableStyles struct{_cff *_fe .TblStyleLst };
// GetPropertyByName returns a custom property selected by it's name.
func (_gag CustomProperties )GetPropertyByName (name string )CustomProperty {_fab :=_gag ._cea .Property ;for _ ,_cad :=range _fab {if *_cad .NameAttr ==name {return CustomProperty {_eab :_cad };};};return CustomProperty {};};
// Type returns the type of a relationship.
func (_dcdc Relationship )Type ()string {return _dcdc ._dge .TypeAttr };func (_fbe CustomProperties )setPropertyHelper (_cgb *_fa .CT_Property ,_cab bool ){_ecd :=_fbe .GetPropertyByName (*_cgb .NameAttr );if (_ecd ==CustomProperty {}){_fbe ._ebc .Property =append (_fbe ._ebc .Property ,_cgb );}else if _cab {_cgb .FmtidAttr =_ecd ._dcf .FmtidAttr ;if _ecd ._dcf .PidAttr ==0{_cgb .PidAttr =_ecd ._dcf .PidAttr ;};_cgb .LinkTargetAttr =_ecd ._dcf .LinkTargetAttr ;*_ecd ._dcf =*_cgb ;};};
// 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 ){_efc :=Image {};_ead ,_aegf :=_baa .Open (path );if _aegf !=nil {return _efc ,_cf .Errorf ("\u0065\u0072\u0072or\u0020\u0072\u0065\u0061\u0064\u0069\u006e\u0067\u0020\u0069\u006d\u0061\u0067\u0065\u003a\u0020\u0025\u0073",_aegf );};defer _ead .Close ();_bagd ,_abe ,_aegf :=_ff .Decode (_ead );if _aegf !=nil {return _efc ,_cf .Errorf ("\u0075n\u0061\u0062\u006c\u0065 \u0074\u006f\u0020\u0070\u0061r\u0073e\u0020i\u006d\u0061\u0067\u0065\u003a\u0020\u0025s",_aegf );};_efc .Path =path ;_efc .Format =_abe ;_efc .Size =_bagd .Bounds ().Size ();return _efc ,nil ;};
// Data returns the data of an image file, if any.
func (_acg ImageRef )Data ()*[]byte {return _acg ._ebee .Data };
// Modified returns the time that the document was modified.
func (_cgf CoreProperties )Modified ()_dd .Time {return _gef (_cgf ._bfe .Modified )};func _ecc (_ecb _dd .Time ,_ggd string )*_cdc .XSDAny {_dbce :=&_cdc .XSDAny {XMLName :_fg .Name {Local :_ggd }};_dbce .Attrs =append (_dbce .Attrs ,_fg .Attr {Name :_fg .Name {Local :"\u0078\u0073\u0069\u003a\u0074\u0079\u0070\u0065"},Value :"\u0064\u0063\u0074\u0065\u0072\u006d\u0073\u003a\u00573\u0043\u0044\u0054\u0046"});_dbce .Attrs =append (_dbce .Attrs ,_fg .Attr {Name :_fg .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"});_dbce .Attrs =append (_dbce .Attrs ,_fg .Attr {Name :_fg .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/"});_dbce .Data =[]byte (_ecb .Format (_agg ));return _dbce ;};func (_bcea *ImageRef )SetRelID (id string ){_bcea ._eeb =id };func (_faeb CustomProperties )SetPropertyAsCy (name string ,cy string ){_aab :=_faeb .getNewProperty (name );_aab .Cy =&cy ;_faeb .setOrReplaceProperty (_aab );};
// AddDefault registers a default content type for a given file extension.
func (_gde ContentTypes )AddDefault (fileExtension string ,contentType string ){fileExtension =_eb .ToLower (fileExtension );for _ ,_de :=range _gde ._efd .Default {if _de .ExtensionAttr ==fileExtension &&_de .ContentTypeAttr ==contentType {return ;};};_cce :=_c .NewDefault ();_cce .ExtensionAttr =fileExtension ;_cce .ContentTypeAttr =contentType ;_gde ._efd .Default =append (_gde ._efd .Default ,_cce );};
// AddOverride adds an override content type for a given path name.
func (_ece ContentTypes )AddOverride (path ,contentType string ){if !_b .HasPrefix (path ,"\u002f"){path ="\u002f"+path ;};if _b .HasPrefix (contentType ,"\u0068\u0074\u0074\u0070"){_cda .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 _ ,_eff :=range _ece ._gdb .Override {if _eff .PartNameAttr ==path &&_eff .ContentTypeAttr ==contentType {return ;};};_befg :=_cb .NewOverride ();_befg .PartNameAttr =path ;_befg .ContentTypeAttr =contentType ;_ece ._gdb .Override =append (_ece ._gdb .Override ,_befg );};
// Cells returns an array of row cells.
func (_ggfg TableRow )Cells ()[]*_fe .CT_TableCell {return _ggfg ._bgag .Tc };
// Target returns the target (path) of a relationship.
func (_caca Relationship )Target ()string {return _caca ._dge .TargetAttr };
// SetCompany sets the name of the company that created the document.
func (_gbc AppProperties )SetCompany (s string ){_gbc ._dgg .Company =&s };func (_daf CustomProperties )SetPropertyAsUi2 (name string ,ui2 uint16 ){_afe :=_daf .getNewProperty (name );_afe .Ui2 =&ui2 ;_daf .setOrReplaceProperty (_afe );};func (_bca CustomProperties )SetPropertyAsDate (name string ,date _ef .Time ){date =date .UTC ();_dcd ,_ggab ,_cdd :=date .Date ();_cfa ,_fdd ,_gfe :=date .Clock ();_adba :=_ef .Date (_dcd ,_ggab ,_cdd ,_cfa ,_fdd ,_gfe ,0,_ef .UTC );_gdee :=_bca .getNewProperty (name );_gdee .Filetime =&_adba ;_bca .setOrReplaceProperty (_gdee );};
// Company returns the name of the company that created the document.
// For unioffice created documents, it defaults to github.com/unidoc/unioffice
func (_ad AppProperties )Company ()string {if _ad ._dgg .Company !=nil {return *_ad ._dgg .Company ;};return "";};func (_dggf CustomProperties )SetPropertyAsI4 (name string ,i4 int32 ){_abca :=_dggf .getNewProperty (name );_abca .I4 =&i4 ;_dggf .setOrReplaceProperty (_abca );};
// SetAuthor records the author of the document.
func (_gcd CoreProperties )SetAuthor (s string ){if _gcd ._gdb .Creator ==nil {_gcd ._gdb .Creator =&_gc .XSDAny {XMLName :_ee .Name {Local :"\u0064\u0063\u003a\u0063\u0072\u0065\u0061\u0074\u006f\u0072"}};};_gcd ._gdb .Creator .Data =[]byte (s );};
// CreateCustomProperties creates the custom properties of the document.
func (_gdd *DocBase )CreateCustomProperties (){_gdd .CustomProperties =NewCustomProperties ();_gdd .AddCustomRelationships ();};func (_fgf CustomProperties )SetPropertyAsEmpty (name string ){_adg :=_fgf .getNewProperty (name );_adg .Empty =_fg .NewEmpty ();_fgf .setOrReplaceProperty (_adg );};
// ImageRef is a reference to an image within a document.
type ImageRef struct{_ccefa *DocBase ;_ebg Relationships ;_ebee Image ;_fgfe string ;_afg string ;};func (_bea CustomProperties )SetPropertyAsR8 (name string ,r8 float64 ){_egcfb :=_bea .getNewProperty (name );_egcfb .R8 =&r8 ;_bea .setOrReplaceProperty (_egcfb );};func (_ade CustomProperties )SetPropertyAsInt (name string ,i int ){_bdg :=_ade .getNewProperty (name );_bdgc :=int32 (i );_bdg .Int =&_bdgc ;_ade .setOrReplaceProperty (_bdg );};
// 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 (_dea *DocBase )AddExtraFileFromZip (f *_gf .File )error {_ceca ,_gdc :=_a .ExtractToDiskTmp (f ,_dea .TmpPath );if _gdc !=nil {return _cf .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",_gdc );};_dea .ExtraFiles =append (_dea .ExtraFiles ,ExtraFile {ZipPath :f .Name ,DiskPath :_ceca });return nil ;};const _cagd =30;
// Application returns the name of the application that created the document.
// For unioffice created documents, it defaults to github.com/unidoc/unioffice
func (_bde AppProperties )Application ()string {if _bde ._gca .Application !=nil {return *_bde ._gca .Application ;};return "";};const _cdgg =2022;
// Theme is a drawingml theme.
type Theme struct{_ffeg *_dg .Theme };
// NewTableWithXfrm makes a new table with a pointer to its parent Xfrm for changing its offset and size.
func NewTableWithXfrm (xfrm *_dg .CT_Transform2D )*Table {_efed :=_dg .NewTbl ();_efed .TblPr =_dg .NewCT_TableProperties ();return &Table {_dega :_efed ,_bee :xfrm };};
// CopyRelationship copies the relationship.
func (_egb Relationships )CopyRelationship (idAttr string )(Relationship ,bool ){for _fga :=range _egb ._eag .Relationship {if _egb ._eag .Relationship [_fga ].IdAttr ==idAttr {_bbdd :=*_egb ._eag .Relationship [_fga ];_ceeg :=len (_egb ._eag .Relationship )+1;_bfbc :=map[string ]struct{}{};for _ ,_bfge :=range _egb ._eag .Relationship {_bfbc [_bfge .IdAttr ]=struct{}{};};for _ ,_ddb :=_bfbc [_cf .Sprintf ("\u0072\u0049\u0064%\u0064",_ceeg )];_ddb ;_ ,_ddb =_bfbc [_cf .Sprintf ("\u0072\u0049\u0064%\u0064",_ceeg )]{_ceeg ++;};_bbdd .IdAttr =_cf .Sprintf ("\u0072\u0049\u0064%\u0064",_ceeg );_egb ._eag .Relationship =append (_egb ._eag .Relationship ,&_bbdd );return Relationship {_cead :&_bbdd },true ;};};return Relationship {},false ;};const _gcfa ="\u0032\u0020\u004aan\u0075\u0061\u0072\u0079\u0020\u0032\u0030\u0030\u0036\u0020\u0061\u0074\u0020\u0031\u0035\u003a\u0030\u0034";func (_baad CustomProperties )SetPropertyAsR4 (name string ,r4 float32 ){_cgac :=_baad .getNewProperty (name );_cgac .R4 =&r4 ;_baad .setOrReplaceProperty (_cgac );};
func (_bgc *DocBase )AddExtraFileFromZip (f *_ff .File )error {_fcb ,_dfe :=_g .ExtractToDiskTmp (f ,_bgc .TmpPath );if _dfe !=nil {return _aa .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",_dfe );};_bgc .ExtraFiles =append (_bgc .ExtraFiles ,ExtraFile {ZipPath :f .Name ,DiskPath :_fcb });return nil ;};func (_edbd CustomProperties )SetPropertyAsNull (name string ){_dbb :=_edbd .getNewProperty (name );_dbb .Null =_fg .NewNull ();_edbd .setOrReplaceProperty (_dbb );};
// Relationship is a relationship within a .rels file.
type Relationship struct{_cead *_bg .Relationship };const Version ="\u0031\u002e\u0032\u0031\u002e\u0030";func (_gbcce CustomProperties )SetPropertyAsInt (name string ,i int ){_ecfb :=_gbcce .getNewProperty (name );_bdb :=int32 (i );_ecfb .Int =&_bdb ;_gbcce .setOrReplaceProperty (_ecfb );};
type Relationship struct{_dge *_aae .Relationship };
// Target returns the target attrubute of the image reference (a path where the image file is located in the document structure).
func (_ebg *ImageRef )Target ()string {return _ebg ._bbf };
// SetOffsetY sets vertical offset of a table in distance units (see measurement package).
func (_eede Table )SetOffsetY (offY float64 ){if _eede ._dfg .Off ==nil {_eede ._dfg .Off =_fe .NewCT_Point2D ();_dca :=int64 (0);_eede ._dfg .Off .XAttr =_fe .ST_Coordinate {ST_CoordinateUnqualified :&_dca };};_debb :=_ffb .ToEMU (offY );_eede ._dfg .Off .YAttr =_fe .ST_Coordinate {ST_CoordinateUnqualified :&_debb };};
// X returns the inner wrapped XML type.
func (_gga AppProperties )X ()*_bag .Properties {return _gga ._gca };func (_cfe Relationship )String ()string {return _cf .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",_cfe .ID (),_cfe .Target (),_cfe .Type ());};
// GetImageBytesByTarget returns Image object with Data bytes read from its target.
func (_caf *DocBase )GetImageBytesByTarget (target string )(Image ,error ){if target !=""{target ="\u0077\u006f\u0072d\u002f"+target ;for _ ,_efe :=range _caf .Images {if _efe .Target ()==target {return ImageFromStorage (_efe .Path ());};};};return Image {},_egac ;};func (_afc CustomProperties )SetPropertyAsDate (name string ,date _dd .Time ){date =date .UTC ();_bfgb ,_fcf ,_cbed :=date .Date ();_edde ,_cecd ,_fbe :=date .Clock ();_bbb :=_dd .Date (_bfgb ,_fcf ,_cbed ,_edde ,_cecd ,_fbe ,0,_dd .UTC );_cgb :=_afc .getNewProperty (name );_cgb .Filetime =&_bbb ;_afc .setOrReplaceProperty (_cgb );};
// Target returns the target (path) of a relationship.
func (_eacg Relationship )Target ()string {return _eacg ._cead .TargetAttr };
// 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 {_bace :img ,_dbcc :d ,_gce :rels };};func (_gbe CustomProperties )SetPropertyAsUint (name string ,ui uint ){_edd :=_gbe .getNewProperty (name );_fce :=uint32 (ui );_edd .Uint =&_fce ;_gbe .setOrReplaceProperty (_edd );};
// AddCustomRelationships adds relationships related to custom properties to the document.
func (_fge *DocBase )AddCustomRelationships (){_fge .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");_fge .Rels .AddRelationship ("\u0064\u006f\u0063\u0050ro\u0070\u0073\u002f\u0063\u0075\u0073\u0074\u006f\u006d\u002e\u0078\u006d\u006c",_cdc .CustomPropertiesType );};func (_ffb CustomProperties )SetPropertyAsUi4 (name string ,ui4 uint32 ){_gcf :=_ffb .getNewProperty (name );_gcf .Ui4 =&ui4 ;_ffb .setOrReplaceProperty (_gcf );};
// ExtraFile is an unsupported file type extracted from, or to be written to a
// zip package
type ExtraFile struct{ZipPath string ;DiskPath string ;};func (_dcg CustomProperties )SetPropertyAsBool (name string ,b bool ){_gge :=_dcg .getNewProperty (name );_gge .Bool =&b ;_dcg .setOrReplaceProperty (_gge );};
// 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 _ff .Point ;Format string ;Path string ;Data *[]byte ;};
// DefAttr returns the DefAttr property.
func (_aagg TableStyles )DefAttr ()string {return _aagg ._afa .DefAttr };
// X returns the inner wrapped XML type.
func (_fefd Theme )X ()*_dg .Theme {return _fefd ._ffeg };
// FindRIDForN returns the relationship ID for the i'th relationship of type t.
func (_dgb Relationships )FindRIDForN (i int ,t string )string {for _ ,_eefc :=range _dgb ._eag .CT_Relationships .Relationship {if _eefc .TypeAttr ==t {if i ==0{return _eefc .IdAttr ;};i --;};};return "";};
// ImageRef is a reference to an image within a document.
type ImageRef struct{_dbcc *DocBase ;_gce Relationships ;_bace Image ;_eeb string ;_bbf string ;};
// ApplicationVersion returns the version of the application that created the
// document.
func (_gb AppProperties )ApplicationVersion ()string {if _gb ._gca .AppVersion !=nil {return *_gb ._gca .AppVersion ;};return "";};func (_fbd CustomProperties )SetPropertyAsOblob (name ,oblob string ){_da :=_fbd .getNewProperty (name );_da .Oblob =&oblob ;_fbd .setOrReplaceProperty (_da );};
// Company returns the name of the company that created the document.
// For unioffice created documents, it defaults to github.com/unidoc/unioffice
func (_cbc AppProperties )Company ()string {if _cbc ._gca .Company !=nil {return *_cbc ._gca .Company ;};return "";};
// Table represents a table in the document.
type Table struct{_dega *_dg .Tbl ;_bee *_dg .CT_Transform2D ;};
// NewRelationshipsCopy creates a new relationships wrapper as a copy of passed in instance.
func NewRelationshipsCopy (rels Relationships )Relationships {_cc :=*rels ._eag ;return Relationships {_eag :&_cc };};
// NewCustomProperties constructs a new CustomProperties.
func NewCustomProperties ()CustomProperties {return CustomProperties {_cea :_cd .NewProperties ()}};func (_aee CustomProperties )SetPropertyAsStream (name string ,stream string ){_aaa :=_aee .getNewProperty (name );_aaa .Stream =&stream ;_aee .setOrReplaceProperty (_aaa );};const _agg ="2\u00300\u0036\u002d\u0030\u0031\u002d\u0030\u0032\u00541\u0035\u003a\u0030\u0034:0\u0035\u005a";
// GetOrCreateCustomProperties returns the custom properties of the document (and if they not exist yet, creating them first).
func (_gefd *DocBase )GetOrCreateCustomProperties ()CustomProperties {if _gefd .CustomProperties .X ()==nil {_gefd .CreateCustomProperties ();};return _gefd .CustomProperties ;};
// AddDefault registers a default content type for a given file extension.
func (_aef ContentTypes )AddDefault (fileExtension string ,contentType string ){fileExtension =_b .ToLower (fileExtension );for _ ,_ga :=range _aef ._gdb .Default {if _ga .ExtensionAttr ==fileExtension &&_ga .ContentTypeAttr ==contentType {return ;};};_bcd :=_cb .NewDefault ();_bcd .ExtensionAttr =fileExtension ;_bcd .ContentTypeAttr =contentType ;_aef ._gdb .Default =append (_aef ._gdb .Default ,_bcd );};
// Description returns the description of the document
func (_ffg CoreProperties )Description ()string {if _ffg ._bfe .Description !=nil {return string (_ffg ._bfe .Description .Data );};return "";};var _egac =_ea .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");
// Title returns the Title of the document
func (_gfcd CoreProperties )Title ()string {if _gfcd ._bfe .Title !=nil {return string (_gfcd ._bfe .Title .Data );};return "";};
// AddHyperlink adds an external hyperlink relationship.
func (_eed Relationships )AddHyperlink (target string )Hyperlink {_dfb :=_eed .AddRelationship (target ,_cdc .HyperLinkType );_dfb ._cead .TargetModeAttr =_bg .ST_TargetModeExternal ;return Hyperlink (_dfb );};
// Created returns the time that the document was created.
func (_fcd CoreProperties )Created ()_dd .Time {return _gef (_fcd ._bfe .Created )};
// Relationships represents a .rels file.
type Relationships struct{_eag *_bg .Relationships };
// Properties returns table properties.
func (_cgeg Table )Grid ()*_dg .CT_TableGrid {return _cgeg ._dega .TblGrid };
// Size returns the size of an image
func (_cbf ImageRef )Size ()_ff .Point {return _cbf ._bace .Size };func (_gagb CustomProperties )getNewProperty (_ceg string )*_cd .CT_Property {_bac :=_gagb ._cea .Property ;_ced :=int32 (1);for _ ,_dde :=range _bac {if _dde .PidAttr > _ced {_ced =_dde .PidAttr ;};};_gcgd :=_cd .NewCT_Property ();_gcgd .NameAttr =&_ceg ;_gcgd .PidAttr =_ced +1;_gcgd .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 _gcgd ;};
// SetApplication sets the name of the application that created the document.
func (_ag AppProperties )SetApplication (s string ){_ag ._gca .Application =&s };
// 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 (_affg AppProperties )Pages ()int32 {if _affg ._gca .Pages !=nil {return *_affg ._gca .Pages ;};return 0;};
// TblStyle returns the TblStyle property.
func (_fgfg TableStyles )TblStyle ()[]*_dg .CT_TableStyle {return _fgfg ._afa .TblStyle };const _gfdef =15;
// 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 (_cgec Relationships )AddAutoRelationship (dt _cdc .DocType ,src string ,idx int ,ctype string )Relationship {return _cgec .AddRelationship (_cdc .RelativeFilename (dt ,src ,ctype ,idx ),ctype );};func (_cfd CustomProperties )SetPropertyAsI8 (name string ,i8 int64 ){_dda :=_cfd .getNewProperty (name );_dda .I8 =&i8 ;_cfd .setOrReplaceProperty (_dda );};
// CreateCustomProperties creates the custom properties of the document.
func (_dfe *DocBase )CreateCustomProperties (){_dfe .CustomProperties =NewCustomProperties ();_dfe .AddCustomRelationships ();};
// Category returns the category of the document
func (_ee CoreProperties )Category ()string {if _ee ._bfe .Category !=nil {return *_ee ._bfe .Category ;};return "";};
// Append appends DocBase part of an office document to another DocBase.
func (_eg DocBase )Append (docBase1 DocBase )DocBase {_ece :=docBase1 .ContentTypes .X ();for _ ,_fec :=range _ece .Default {_eg .ContentTypes .AddDefault (_fec .ExtensionAttr ,_fec .ContentTypeAttr );};for _ ,_efe :=range _ece .Override {_eg .ContentTypes .AddOverride (_efe .PartNameAttr ,_efe .ContentTypeAttr );};_dd :=_eg .AppProperties .X ();_df :=docBase1 .AppProperties .X ();if _dd .Pages !=nil {if _df .Pages !=nil {*_dd .Pages +=*_df .Pages ;};}else if _df .Pages !=nil {_dd .Pages =_df .Pages ;};if _dd .Words !=nil {if _df .Words !=nil {*_dd .Words +=*_df .Words ;};}else if _df .Words !=nil {_dd .Words =_df .Words ;};if _dd .Characters !=nil {if _df .Characters !=nil {*_dd .Characters +=*_df .Characters ;};}else if _df .Characters !=nil {_dd .Characters =_df .Characters ;};if _dd .Lines !=nil {if _df .Lines !=nil {*_dd .Lines +=*_df .Lines ;};}else if _df .Lines !=nil {_dd .Lines =_df .Lines ;};if _dd .Paragraphs !=nil {if _df .Paragraphs !=nil {*_dd .Paragraphs +=*_df .Paragraphs ;};}else if _df .Paragraphs !=nil {_dd .Paragraphs =_df .Paragraphs ;};if _dd .Notes !=nil {if _df .Notes !=nil {*_dd .Notes +=*_df .Notes ;};}else if _df .Notes !=nil {_dd .Notes =_df .Notes ;};if _dd .HiddenSlides !=nil {if _df .HiddenSlides !=nil {*_dd .HiddenSlides +=*_df .HiddenSlides ;};}else if _df .HiddenSlides !=nil {_dd .HiddenSlides =_df .HiddenSlides ;};if _dd .MMClips !=nil {if _df .MMClips !=nil {*_dd .MMClips +=*_df .MMClips ;};}else if _df .MMClips !=nil {_dd .MMClips =_df .MMClips ;};if _dd .LinksUpToDate !=nil {if _df .LinksUpToDate !=nil {*_dd .LinksUpToDate =*_dd .LinksUpToDate &&*_df .LinksUpToDate ;};}else if _df .LinksUpToDate !=nil {_dd .LinksUpToDate =_df .LinksUpToDate ;};if _dd .CharactersWithSpaces !=nil {if _df .CharactersWithSpaces !=nil {*_dd .CharactersWithSpaces +=*_df .CharactersWithSpaces ;};}else if _df .CharactersWithSpaces !=nil {_dd .CharactersWithSpaces =_df .CharactersWithSpaces ;};if _dd .SharedDoc !=nil {if _df .SharedDoc !=nil {*_dd .SharedDoc =*_dd .SharedDoc ||*_df .SharedDoc ;};}else if _df .SharedDoc !=nil {_dd .SharedDoc =_df .SharedDoc ;};if _dd .HyperlinksChanged !=nil {if _df .HyperlinksChanged !=nil {*_dd .HyperlinksChanged =*_dd .HyperlinksChanged ||*_df .HyperlinksChanged ;};}else if _df .HyperlinksChanged !=nil {_dd .HyperlinksChanged =_df .HyperlinksChanged ;};_dd .DigSig =nil ;if _dd .TitlesOfParts ==nil &&_df .TitlesOfParts !=nil {_dd .TitlesOfParts =_df .TitlesOfParts ;};if _dd .HeadingPairs !=nil {if _df .HeadingPairs !=nil {_fb :=_dd .HeadingPairs .Vector ;_cb :=_df .HeadingPairs .Vector ;_fd :=_fb .Variant ;_dag :=_cb .Variant ;_fda :=[]*_fg .Variant {};for _ae :=0;_ae < len (_dag );_ae +=2{_cg :=_dag [_ae ].Lpstr ;_be :=false ;for _fgd :=0;_fgd < len (_fd );_fgd +=2{_fgdf :=_fd [_fgd ].Lpstr ;if _fgdf !=nil &&_cg !=nil &&*_fgdf ==*_cg {*_fd [_fgd +1].I4 =*_fd [_fgd +1].I4 +*_dag [_ae +1].I4 ;_be =true ;break ;};};if !_be {_fda =append (_fda ,&_fg .Variant {CT_Variant :_fg .CT_Variant {Lpstr :_dag [_ae ].Lpstr }});_fda =append (_fda ,&_fg .Variant {CT_Variant :_fg .CT_Variant {I4 :_dag [_ae ].I4 }});};};_fd =append (_fd ,_fda ...);_fb .SizeAttr =uint32 (len (_fd ));};}else if _df .HeadingPairs !=nil {_dd .HeadingPairs =_df .HeadingPairs ;};if _dd .HLinks !=nil {if _df .HLinks !=nil {_ddd :=_dd .HLinks .Vector ;_bb :=_df .HLinks .Vector ;_ga :=_ddd .Variant ;_db :=_bb .Variant ;for _ ,_gb :=range _db {_fgc :=true ;for _ ,_bba :=range _ga {if _d .DeepEqual (_bba ,_gb ){_fgc =false ;break ;};};if _fgc {_ga =append (_ga ,_gb );_ddd .SizeAttr ++;};};};}else if _df .HLinks !=nil {_dd .HLinks =_df .HLinks ;};_dgb :=_eg .GetOrCreateCustomProperties ();_ace :=docBase1 .GetOrCreateCustomProperties ();for _ ,_cec :=range _ace .PropertiesList (){_dgb .setProperty (_cec );};_eg .CustomProperties =_dgb ;_ceb :=_eg .Rels .X ().Relationship ;for _ ,_egf :=range docBase1 .Rels .X ().Relationship {_cf :=true ;for _ ,_cd :=range _ceb {if _cd .TargetAttr ==_egf .TargetAttr &&_cd .TypeAttr ==_egf .TypeAttr {_cf =false ;break ;};};if _cf {_eg .Rels .AddRelationship (_egf .TargetAttr ,_egf .TypeAttr );};};for _ ,_ebe :=range docBase1 .ExtraFiles {_ea :=_ebe .ZipPath ;_fefb :=true ;for _ ,_bf :=range _eg .ExtraFiles {if _bf .ZipPath ==_ea {_fefb =false ;break ;};};if _fefb {_eg .ExtraFiles =append (_eg .ExtraFiles ,_ebe );};};return _eg ;};
// SetDescription records the description of the document.
func (_cdg CoreProperties )SetDescription (s string ){if _cdg ._bfe .Description ==nil {_cdg ._bfe .Description =&_cdc .XSDAny {XMLName :_fg .Name {Local :"\u0064\u0063\u003a\u0064\u0065\u0073\u0063\u0072\u0069p\u0074\u0069\u006f\u006e"}};};_cdg ._bfe .Description .Data =[]byte (s );};
func (_ecf CoreProperties )SetDescription (s string ){if _ecf ._gdb .Description ==nil {_ecf ._gdb .Description =&_gc .XSDAny {XMLName :_ee .Name {Local :"\u0064\u0063\u003a\u0064\u0065\u0073\u0063\u0072\u0069p\u0074\u0069\u006f\u006e"}};};_ecf ._gdb .Description .Data =[]byte (s );};
// X returns the inner wrapped XML type of CustomProperty.
func (_ddc CustomProperty )X ()*_cd .CT_Property {return _ddc ._eab };
// Clear removes any existing relationships.
func (_ecedg Relationships )Clear (){_ecedg ._feec .Relationship =nil };func UtcTimeFormat (t _ef .Time )string {return t .Format (_efbc )+"\u0020\u0055\u0054\u0043"};
// X returns the inner wrapped XML type.
func (_gagbe Table )X ()*_dg .Tbl {return _gagbe ._dega };
func (_caf CoreProperties )X ()*_bc .CoreProperties {return _caf ._gdb };
// 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 (_dgf *ImageRef )SetTarget (target string ){_dgf ._bbf =target };
// NewRelationships creates a new relationship wrapper.
func NewRelationships ()Relationships {return Relationships {_feec :_aae .NewRelationships ()}};func (_gga CustomProperties )getNewProperty (_afbc string )*_fa .CT_Property {_cdc :=_gga ._ebc .Property ;_bcb :=int32 (1);for _ ,_bcbf :=range _cdc {if _bcbf .PidAttr > _bcb {_bcb =_bcbf .PidAttr ;};};_gef :=_fa .NewCT_Property ();_gef .NameAttr =&_afbc ;_gef .PidAttr =_bcb +1;_gef .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 _gef ;};
// SetDocSecurity sets the document security flag.
func (_ffee AppProperties )SetDocSecurity (v int32 ){_ffee ._gca .DocSecurity =_cdc .Int32 (v )};func (_ggaeg CustomProperties )SetPropertyAsOstorage (name string ,ostorage string ){_gaf :=_ggaeg .getNewProperty (name );_gaf .Ostorage =&ostorage ;_ggaeg .setOrReplaceProperty (_gaf );};
// Remove removes an existing relationship.
func (_fgb Relationships )Remove (rel Relationship )bool {for _dcfd ,_eda :=range _fgb ._feec .Relationship {if _eda ==rel ._dge {copy (_fgb ._feec .Relationship [_dcfd :],_fgb ._feec .Relationship [_dcfd +1:]);_fgb ._feec .Relationship =_fgb ._feec .Relationship [0:len (_fgb ._feec .Relationship )-1];return true ;};};return false ;};func (_gad TableRow )addCell ()*_fe .CT_TableCell {_fcgc :=_fe .NewCT_TableCell ();_gad ._bgag .Tc =append (_gad ._bgag .Tc ,_fcgc );return _fcgc ;};
// RemoveOverride removes an override given a path.
func (_fec ContentTypes )RemoveOverride (path string ){if !_b .HasPrefix (path ,"\u002f"){path ="\u002f"+path ;};for _fgb ,_cg :=range _fec ._gdb .Override {if _cg .PartNameAttr ==path {copy (_fec ._gdb .Override [_fgb :],_fec ._gdb .Override [_fgb +1:]);_fec ._gdb .Override =_fec ._gdb .Override [0:len (_fec ._gdb .Override )-1];};};};func (_cec CustomProperties )SetPropertyAsUi8 (name string ,ui8 uint64 ){_cede :=_cec .getNewProperty (name );_cede .Ui8 =&ui8 ;_cec .setOrReplaceProperty (_cede );};
// TableRow represents a row in a table.
type TableRow struct{_bgag *_fe .CT_TableRow };const _caa =6;func (_eca CustomProperties )SetPropertyAsCy (name string ,cy string ){_ebag :=_eca .getNewProperty (name );_ebag .Cy =&cy ;_eca .setOrReplaceProperty (_ebag );};
// Data returns the data of an image file, if any.
func (_fccc ImageRef )Data ()*[]byte {return _fccc ._bace .Data };
// NewTheme constructs a new theme.
func NewTheme ()Theme {return Theme {_dg .NewTheme ()}};func (_cbdf CustomProperties )SetPropertyAsVector (name string ,vector *_dc .Vector ){_gbcc :=_cbdf .getNewProperty (name );_gbcc .Vector =vector ;_cbdf .setOrReplaceProperty (_gbcc );};
// EnsureDefault esnures that an extension and default content type exist,
// adding it if necessary.
func (_fa ContentTypes )EnsureDefault (ext ,contentType string ){ext =_b .ToLower (ext );for _ ,_bae :=range _fa ._gdb .Default {if _bae .ExtensionAttr ==ext {_bae .ContentTypeAttr =contentType ;return ;};};_fb :=&_cb .Default {};_fb .ContentTypeAttr =contentType ;_fb .ExtensionAttr =ext ;_fa ._gdb .Default =append (_fa ._gdb .Default ,_fb );};
// PropertiesList returns the list of all custom properties of the document.
func (_bfec CustomProperties )PropertiesList ()[]*_cd .CT_Property {return _bfec ._cea .Property };
// NewTable makes a new table.
func NewTable ()*Table {_ded :=_dg .NewTbl ();_ded .TblPr =_dg .NewCT_TableProperties ();return &Table {_dega :_ded };};
// SetLanguage records the language of the document.
func (_bfb CoreProperties )SetLanguage (s string ){_bfb ._bfe .Language =&_cdc .XSDAny {XMLName :_fg .Name {Local :"d\u0063\u003a\u006c\u0061\u006e\u0067\u0075\u0061\u0067\u0065"}};_bfb ._bfe .Language .Data =[]byte (s );};
// SetHeight sets row height, see measurement package.
func (_aaf TableRow )SetHeight (m _ce .Distance ){_daa :=_ce .ToEMU (float64 (m ));_aaf ._bcf .HAttr =_dg .ST_Coordinate {ST_CoordinateUnqualified :&_daa };};func (_acf CustomProperties )SetPropertyAsBlob (name ,blob string ){_cae :=_acf .getNewProperty (name );_cae .Blob =&blob ;_acf .setOrReplaceProperty (_cae );};func (_ddea CustomProperties )SetPropertyAsVstream (name string ,vstream *_dc .Vstream ){_feca :=_ddea .getNewProperty (name );_feca .Vstream =vstream ;_ddea .setOrReplaceProperty (_feca );};func _gef (_cga *_cdc .XSDAny )_dd .Time {if _cga ==nil {return _dd .Time {};};_ged ,_fgba :=_dd .Parse (_agg ,string (_cga .Data ));if _fgba !=nil {_cda .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 (_cga .Data ),_fgba );};return _ged ;};
// X returns the inner raw content types.
func (_caa ContentTypes )X ()*_cb .Types {return _caa ._gdb };
// CustomProperties contains document specific properties.
type CustomProperties struct{_cea *_cd .Properties };
// 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 _ff .Image ;Images []ImageRef ;ExtraFiles []ExtraFile ;TmpPath string ;};
// AddImageToZip adds an image (either from bytes or from disk) and adds it to the zip file.
func AddImageToZip (z *_ff .Writer ,img ImageRef ,imageNum int ,dt _gc .DocType )error {_ebd :=_gc .AbsoluteImageFilename (dt ,imageNum ,_eb .ToLower (img .Format ()));if img .Data ()!=nil &&len (*img .Data ())> 0{if _beaf :=_g .AddFileFromBytes (z ,_ebd ,*img .Data ());_beaf !=nil {return _beaf ;};}else if img .Path ()!=""{if _ccc :=_g .AddFileFromDisk (z ,_ebd ,img .Path ());_ccc !=nil {return _ccc ;};}else {return _aa .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 ;};
// SetID set the ID of a relationship.
func (_gdba Relationship )SetID (ID string ){_gdba ._cead .IdAttr =ID ;};
// Hyperlink is just an appropriately configured relationship.
type Hyperlink Relationship ;
// Type returns the type of a relationship.
func (_cafb Relationship )Type ()string {return _cafb ._cead .TypeAttr };
// SetModified sets the time that the document was modified.
func (_dga CoreProperties )SetModified (t _dd .Time ){_dga ._bfe .Modified =_ecc (t ,"\u0064\u0063t\u0065\u0072\u006ds\u003a\u006d\u006f\u0064\u0069\u0066\u0069\u0065\u0064");};
func (_dbge Relationship )SetID (ID string ){_dbge ._dge .IdAttr =ID ;};const _bfae =15;
// 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 ){_ggec ,_caec :=_d .Open (path );_eac :=Image {};if _caec !=nil {return _eac ,_cf .Errorf ("\u0065\u0072\u0072or\u0020\u0072\u0065\u0061\u0064\u0069\u006e\u0067\u0020\u0069\u006d\u0061\u0067\u0065\u003a\u0020\u0025\u0073",_caec );};defer _ggec .Close ();_dcb ,_cfb ,_caec :=_ff .Decode (_ggec );if _caec !=nil {return _eac ,_cf .Errorf ("\u0075n\u0061\u0062\u006c\u0065 \u0074\u006f\u0020\u0070\u0061r\u0073e\u0020i\u006d\u0061\u0067\u0065\u003a\u0020\u0025s",_caec );};_eac .Path =path ;_eac .Format =_cfb ;_eac .Size =_dcb .Bounds ().Size ();return _eac ,nil ;};func (_efg CustomProperties )SetPropertyAsEmpty (name string ){_fac :=_efg .getNewProperty (name );_fac .Empty =_dc .NewEmpty ();_efg .setOrReplaceProperty (_fac );};
func ImageFromFile (path string )(Image ,error ){_fcbb ,_fea :=_ag .Open (path );_faec :=Image {};if _fea !=nil {return _faec ,_aa .Errorf ("\u0065\u0072\u0072or\u0020\u0072\u0065\u0061\u0064\u0069\u006e\u0067\u0020\u0069\u006d\u0061\u0067\u0065\u003a\u0020\u0025\u0073",_fea );};defer _fcbb .Close ();_ecdg ,_efdc ,_fea :=_e .Decode (_fcbb );if _fea !=nil {return _faec ,_aa .Errorf ("\u0075n\u0061\u0062\u006c\u0065 \u0074\u006f\u0020\u0070\u0061r\u0073e\u0020i\u006d\u0061\u0067\u0065\u003a\u0020\u0025s",_fea );};_faec .Path =path ;_faec .Format =_efdc ;_faec .Size =_ecdg .Bounds ().Size ();return _faec ,nil ;};
// Rows returns all table rows.
func (_bcbf Table )Rows ()[]*TableRow {_bced :=_bcbf ._dega .Tr ;_fcg :=[]*TableRow {};for _ ,_gfae :=range _bced {_fcg =append (_fcg ,&TableRow {_bcf :_gfae });};return _fcg ;};const _afb =8;
// Cells returns an array of row cells.
func (_gbdf TableRow )Cells ()[]*_dg .CT_TableCell {return _gbdf ._bcf .Tc };
// Author returns the author of the document
func (_egf CoreProperties )Author ()string {if _egf ._bfe .Creator !=nil {return string (_egf ._bfe .Creator .Data );};return "";};
// IsEmpty returns true if there are no relationships.
func (_aag Relationships )IsEmpty ()bool {return _aag ._eag ==nil ||len (_aag ._eag .Relationship )==0};
// GetTargetByRelId returns a target path with the associated relation ID.
func (_acfg Relationships )GetTargetByRelId (idAttr string )string {for _ ,_efd :=range _acfg ._eag .Relationship {if _efd .IdAttr ==idAttr {return _efd .TargetAttr ;};};return "";};
// GetByRelId returns a relationship with the associated relation ID.
func (_fcfc Relationships )GetByRelId (idAttr string )Relationship {for _ ,_eefcb :=range _fcfc ._eag .Relationship {if _eefcb .IdAttr ==idAttr {return Relationship {_cead :_eefcb };};};return Relationship {};};const _gdgb =31;func (_bce CustomProperties )SetPropertyAsLpstr (name string ,lpstr string ){_faf :=_bce .getNewProperty (name );_faf .Lpstr =&lpstr ;_bce .setOrReplaceProperty (_faf );};
// 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 _e .Image ;Images []ImageRef ;ExtraFiles []ExtraFile ;TmpPath string ;};func (_dcfa CustomProperties )SetPropertyAsLpwstr (name string ,lpwstr string ){_aaa :=_dcfa .getNewProperty (name );_aaa .Lpwstr =&lpwstr ;_dcfa .setOrReplaceProperty (_aaa );};
// SetTitle records the title of the document.
func (_dfd CoreProperties )SetTitle (s string ){if _dfd ._bfe .Title ==nil {_dfd ._bfe .Title =&_cdc .XSDAny {XMLName :_fg .Name {Local :"\u0064\u0063\u003a\u0074\u0069\u0074\u006c\u0065"}};};_dfd ._bfe .Title .Data =[]byte (s );};func (_fdc CustomProperties )setPropertyHelper (_efb *_cd .CT_Property ,_gefe bool ){_cdaf :=_fdc .GetPropertyByName (*_efb .NameAttr );if (_cdaf ==CustomProperty {}){_fdc ._cea .Property =append (_fdc ._cea .Property ,_efb );}else if _gefe {_efb .FmtidAttr =_cdaf ._eab .FmtidAttr ;if _cdaf ._eab .PidAttr ==0{_efb .PidAttr =_cdaf ._eab .PidAttr ;};_efb .LinkTargetAttr =_cdaf ._eab .LinkTargetAttr ;*_cdaf ._eab =*_efb ;};};func (_bfg CustomProperties )SetPropertyAsR8 (name string ,r8 float64 ){_bgc :=_bfg .getNewProperty (name );_bgc .R8 =&r8 ;_bfg .setOrReplaceProperty (_bgc );};
func (_fee CoreProperties )SetTitle (s string ){if _fee ._gdb .Title ==nil {_fee ._gdb .Title =&_gc .XSDAny {XMLName :_ee .Name {Local :"\u0064\u0063\u003a\u0074\u0069\u0074\u006c\u0065"}};};_fee ._gdb .Title .Data =[]byte (s );};func (_aggd CustomProperties )SetPropertyAsBlob (name ,blob string ){_aced :=_aggd .getNewProperty (name );_aced .Blob =&blob ;_aggd .setOrReplaceProperty (_aced );};
// X returns the inner wrapped XML type.
func (_feg Relationship )X ()*_bg .Relationship {return _feg ._cead };
// Title returns the Title of the document
func (_egcf CoreProperties )Title ()string {if _egcf ._gdb .Title !=nil {return string (_egcf ._gdb .Title .Data );};return "";};
// SetTarget set the target (path) of a relationship.
func (_affe Relationship )SetTarget (s string ){_affe ._cead .TargetAttr =s };
// DefAttr returns the DefAttr property.
func (_gada TableStyles )DefAttr ()string {return _gada ._cff .DefAttr };
// LastModifiedBy returns the name of the last person to modify the document
func (_bfeb CoreProperties )LastModifiedBy ()string {if _bfeb ._bfe .LastModifiedBy !=nil {return *_bfeb ._bfe .LastModifiedBy ;};return "";};
// Target returns the target attrubute of the image reference (a path where the image file is located in the document structure).
func (_cgdc *ImageRef )Target ()string {return _cgdc ._afg };
// SetCreated sets the time that the document was created.
func (_ffef CoreProperties )SetCreated (t _dd .Time ){_ffef ._bfe .Created =_ecc (t ,"\u0064c\u0074e\u0072\u006d\u0073\u003a\u0063\u0072\u0065\u0061\u0074\u0065\u0064");};func (_aa CustomProperties )SetPropertyAsDecimal (name string ,decimal float64 ){_acfe :=_aa .getNewProperty (name );_acfe .Decimal =&decimal ;_aa .setOrReplaceProperty (_acfe );};
// 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 _e .Point ;Format string ;Path string ;Data *[]byte ;};
// NewCoreProperties constructs a new CoreProperties.
func NewCoreProperties ()CoreProperties {return CoreProperties {_bfe :_gc .NewCoreProperties ()}};func UtcTimeFormat (t _dd .Time )string {return t .Format (_gcfa )+"\u0020\u0055\u0054\u0043"};
// Size returns the size of an image
func (_fba ImageRef )Size ()_e .Point {return _fba ._ebee .Size };func (_bbe CustomProperties )SetPropertyAsDecimal (name string ,decimal float64 ){_feb :=_bbe .getNewProperty (name );_feb .Decimal =&decimal ;_bbe .setOrReplaceProperty (_feb );};
// ContentTypes is the top level "[Content_Types].xml" in a zip package.
type ContentTypes struct{_gdb *_cb .Types };
// IsEmpty returns true if there are no relationships.
func (_bdb Relationships )IsEmpty ()bool {return _bdb ._feec ==nil ||len (_bdb ._feec .Relationship )==0;};
// TableCol represents a column in a table.
type TableCol struct{_eabb *_dg .CT_TableCol };
// GetOrCreateCustomProperties returns the custom properties of the document (and if they not exist yet, creating them first).
func (_ddg *DocBase )GetOrCreateCustomProperties ()CustomProperties {if _ddg .CustomProperties .X ()==nil {_ddg .CreateCustomProperties ();};return _ddg .CustomProperties ;};
// X returns the underlying raw XML data.
func (_gee Relationships )X ()*_bg .Relationships {return _gee ._eag };func init (){_ba .SetAsStorage ()};
// AddRelationship adds a relationship.
func (_geeg Relationships )AddRelationship (target ,ctype string )Relationship {if !_b .HasPrefix (ctype ,"\u0068t\u0074\u0070\u003a\u002f\u002f"){_cda .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 );};_ddf :=_bg .NewRelationship ();_abg :=len (_geeg ._eag .Relationship )+1;_fca :=map[string ]struct{}{};for _ ,_efa :=range _geeg ._eag .Relationship {_fca [_efa .IdAttr ]=struct{}{};};for _ ,_bdfc :=_fca [_cf .Sprintf ("\u0072\u0049\u0064%\u0064",_abg )];_bdfc ;_ ,_bdfc =_fca [_cf .Sprintf ("\u0072\u0049\u0064%\u0064",_abg )]{_abg ++;};_ddf .IdAttr =_cf .Sprintf ("\u0072\u0049\u0064%\u0064",_abg );_ddf .TargetAttr =target ;_ddf .TypeAttr =ctype ;_geeg ._eag .Relationship =append (_geeg ._eag .Relationship ,_ddf );return Relationship {_cead :_ddf };};
// NewRelationships creates a new relationship wrapper.
func NewRelationships ()Relationships {return Relationships {_eag :_bg .NewRelationships ()}};var ReleasedAt =_dd .Date (_cdgg ,_afb ,_gdgb ,_gfdef ,_cagd ,0,0,_dd .UTC );
// ApplicationVersion returns the version of the application that created the
// document.
func (_bcd AppProperties )ApplicationVersion ()string {if _bcd ._dgg .AppVersion !=nil {return *_bcd ._dgg .AppVersion ;};return "";};
// Relationships returns a slice of all of the relationships.
func (_ggg Relationships )Relationships ()[]Relationship {_fcca :=[]Relationship {};for _ ,_gccg :=range _ggg ._eag .Relationship {_fcca =append (_fcca ,Relationship {_cead :_gccg });};return _fcca ;};
func (_gdc Relationships )Relationships ()[]Relationship {_acec :=[]Relationship {};for _ ,_ada :=range _gdc ._feec .Relationship {_acec =append (_acec ,Relationship {_dge :_ada });};return _acec ;};func (_cca CustomProperties )setOrReplaceProperty (_aeb *_fa .CT_Property ){_cca .setPropertyHelper (_aeb ,true );};
// SetOffsetY sets vertical offset of a table in distance units (see measurement package).
func (_agb Table )SetOffsetY (offY float64 ){if _agb ._bee .Off ==nil {_agb ._bee .Off =_dg .NewCT_Point2D ();_cefe :=int64 (0);_agb ._bee .Off .XAttr =_dg .ST_Coordinate {ST_CoordinateUnqualified :&_cefe };};_ebde :=_ce .ToEMU (offY );_agb ._bee .Off .YAttr =_dg .ST_Coordinate {ST_CoordinateUnqualified :&_ebde };};
// SetOffsetX sets horizontal offset of a table in distance units (see measurement package).
func (_ddcc Table )SetOffsetX (offX float64 ){if _ddcc ._dfg .Off ==nil {_ddcc ._dfg .Off =_fe .NewCT_Point2D ();_bedf :=int64 (0);_ddcc ._dfg .Off .YAttr =_fe .ST_Coordinate {ST_CoordinateUnqualified :&_bedf };};_acf :=_ffb .ToEMU (offX );_ddcc ._dfg .Off .XAttr =_fe .ST_Coordinate {ST_CoordinateUnqualified :&_acf };};
// Properties returns table properties.
func (_cfde Table )Properties ()*_dg .CT_TableProperties {return _cfde ._dega .TblPr };
// Hyperlink is just an appropriately configured relationship.
type Hyperlink Relationship ;func (_bfge CustomProperties )SetPropertyAsLpstr (name string ,lpstr string ){_cefa :=_bfge .getNewProperty (name );_cefa .Lpstr =&lpstr ;_bfge .setOrReplaceProperty (_cefa );};
// AddCol adds a column to a table.
func (_abcc Table )AddCol ()*TableCol {_abeg :=_dg .NewCT_TableCol ();_abcc ._dega .TblGrid .GridCol =append (_abcc ._dega .TblGrid .GridCol ,_abeg );for _ ,_fcaa :=range _abcc ._dega .Tr {_fdg :=_dg .NewCT_TableCell ();_fcaa .Tc =append (_fcaa .Tc ,_fdg );};return &TableCol {_eabb :_abeg };};func (_ebe CustomProperties )SetPropertyAsClsid (name string ,clsid string ){_ggdb :=_ebe .getNewProperty (name );_ggdb .Clsid =&clsid ;_ebe .setOrReplaceProperty (_ggdb );};
// NewTableStyles constructs a new TableStyles.
func NewTableStyles ()TableStyles {return TableStyles {_cff :_fe .NewTblStyleLst ()}};
// TableRow represents a row in a table.
type TableRow struct{_bcf *_dg .CT_TableRow };
// SetLastModifiedBy records the last person to modify the document.
func (_deba CoreProperties )SetLastModifiedBy (s string ){_deba ._gdb .LastModifiedBy =&s };
// SetLinksUpToDate sets the links up to date flag.
func (_bba AppProperties )SetLinksUpToDate (v bool ){_bba ._gca .LinksUpToDate =_cdc .Bool (v )};
// FindRIDForN returns the relationship ID for the i'th relationship of type t.
func (_egca Relationships )FindRIDForN (i int ,t string )string {for _ ,_cccb :=range _egca ._feec .CT_Relationships .Relationship {if _cccb .TypeAttr ==t {if i ==0{return _cccb .IdAttr ;};i --;};};return "";};
// NewContentTypes returns a wrapper around a newly constructed content-types.
func NewContentTypes ()ContentTypes {_cdb :=ContentTypes {_gdb :_cb .NewTypes ()};_cdb .AddDefault ("\u0078\u006d\u006c","\u0061p\u0070l\u0069\u0063\u0061\u0074\u0069\u006f\u006e\u002f\u0078\u006d\u006c");_cdb .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");_cdb .AddDefault ("\u0070\u006e\u0067","\u0069m\u0061\u0067\u0065\u002f\u0070\u006eg");_cdb .AddDefault ("\u006a\u0070\u0065\u0067","\u0069\u006d\u0061\u0067\u0065\u002f\u006a\u0070\u0065\u0067");_cdb .AddDefault ("\u006a\u0070\u0067","\u0069m\u0061\u0067\u0065\u002f\u006a\u0070g");_cdb .AddDefault ("\u0077\u006d\u0066","i\u006d\u0061\u0067\u0065\u002f\u0078\u002d\u0077\u006d\u0066");_cdb .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");_cdb .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 _cdb ;};
// SetTarget set the target (path) of a relationship.
func (_cafb Relationship )SetTarget (s string ){_cafb ._dge .TargetAttr =s };func (_ggf CustomProperties )SetPropertyAsI2 (name string ,i2 int16 ){_bcg :=_ggf .getNewProperty (name );_bcg .I2 =&i2 ;_ggf .setOrReplaceProperty (_bcg );};func (_bfad CustomProperties )SetPropertyAsStream (name string ,stream string ){_adb :=_bfad .getNewProperty (name );_adb .Stream =&stream ;_bfad .setOrReplaceProperty (_adb );};
// SetAuthor records the author of the document.
func (_aefc CoreProperties )SetAuthor (s string ){if _aefc ._bfe .Creator ==nil {_aefc ._bfe .Creator =&_cdc .XSDAny {XMLName :_fg .Name {Local :"\u0064\u0063\u003a\u0063\u0072\u0065\u0061\u0074\u006f\u0072"}};};_aefc ._bfe .Creator .Data =[]byte (s );};
// Created returns the time that the document was created.
func (_dfc CoreProperties )Created ()_ef .Time {return _acad (_dfc ._gdb .Created )};func _acad (_abg *_gc .XSDAny )_ef .Time {if _abg ==nil {return _ef .Time {};};_debe ,_fgcc :=_ef .Parse (_dgged ,string (_abg .Data ));if _fgcc !=nil {_ab .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 (_abg .Data ),_fgcc );};return _debe ;};
// AddRow adds a row to a table.
func (_ffeeg Table )AddRow ()*TableRow {_afeg :=_dg .NewCT_TableRow ();for _dcd :=0;_dcd < len (_ffeeg ._dega .TblGrid .GridCol );_dcd ++{_afeg .Tc =append (_afeg .Tc ,_dg .NewCT_TableCell ());};_ffeeg ._dega .Tr =append (_ffeeg ._dega .Tr ,_afeg );return &TableRow {_bcf :_afeg };};func (_cef CustomProperties )setProperty (_edf *_cd .CT_Property ){_cef .setPropertyHelper (_edf ,false )};func (_cefc CustomProperties )SetPropertyAsI1 (name string ,i1 int8 ){_dbcea :=_cefc .getNewProperty (name );_dbcea .I1 =&i1 ;_cefc .setOrReplaceProperty (_dbcea );};func (_dfc CustomProperties )SetPropertyAsStorage (name string ,storage string ){_eef :=_dfc .getNewProperty (name );_eef .Storage =&storage ;_dfc .setOrReplaceProperty (_eef );};
// 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 {_ebee :img ,_ccefa :d ,_ebg :rels };};
// X returns the inner wrapped XML type.
func (_caae CustomProperties )X ()*_cd .Properties {return _caae ._cea };
// AddOverride adds an override content type for a given path name.
func (_cbg ContentTypes )AddOverride (path ,contentType string ){if !_eb .HasPrefix (path ,"\u002f"){path ="\u002f"+path ;};if _eb .HasPrefix (contentType ,"\u0068\u0074\u0074\u0070"){_ab .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 _ ,_agc :=range _cbg ._efd .Override {if _agc .PartNameAttr ==path &&_agc .ContentTypeAttr ==contentType {return ;};};_eag :=_c .NewOverride ();_eag .PartNameAttr =path ;_eag .ContentTypeAttr =contentType ;_cbg ._efd .Override =append (_cbg ._efd .Override ,_eag );};
// NewAppProperties constructs a new AppProperties.
func NewAppProperties ()AppProperties {_df :=AppProperties {_gca :_bag .NewProperties ()};_df .SetCompany ("\u0046\u006f\u0078\u0079\u0055\u0074\u0069\u006c\u0073\u0020\u0065\u0068\u0066");_df .SetApplication ("g\u0069\u0074\u0068\u0075\u0062\u002ec\u006f\u006d\u002f\u0075\u006e\u0069\u0064\u006f\u0063/\u0075\u006e\u0069o\u0066f\u0069\u0063\u0065");_df .SetDocSecurity (0);_df .SetLinksUpToDate (false );var _bd ,_bc ,_ggf int64 ;_cf .Sscanf (Version ,"\u0025\u0064\u002e\u0025\u0064\u002e\u0025\u0064",&_bd ,&_bc ,&_ggf );_bgb :=float64 (_bd )+float64 (_bc )/10000.0;_df .SetApplicationVersion (_cf .Sprintf ("\u0025\u0030\u0037\u002e\u0034\u0066",_bgb ));return _df ;};
// CustomProperties contains document specific properties.
type CustomProperties struct{_ebc *_fa .Properties };const Version ="\u0031\u002e\u0032\u0031\u002e\u0031";
// Append appends DocBase part of an office document to another DocBase.
func (_ed DocBase )Append (docBase1 DocBase )DocBase {_be :=docBase1 .ContentTypes .X ();for _ ,_cdf :=range _be .Default {_ed .ContentTypes .AddDefault (_cdf .ExtensionAttr ,_cdf .ContentTypeAttr );};for _ ,_gfd :=range _be .Override {_ed .ContentTypes .AddOverride (_gfd .PartNameAttr ,_gfd .ContentTypeAttr );};_bb :=_ed .AppProperties .X ();_bef :=docBase1 .AppProperties .X ();if _bb .Pages !=nil {if _bef .Pages !=nil {*_bb .Pages +=*_bef .Pages ;};}else if _bef .Pages !=nil {_bb .Pages =_bef .Pages ;};if _bb .Words !=nil {if _bef .Words !=nil {*_bb .Words +=*_bef .Words ;};}else if _bef .Words !=nil {_bb .Words =_bef .Words ;};if _bb .Characters !=nil {if _bef .Characters !=nil {*_bb .Characters +=*_bef .Characters ;};}else if _bef .Characters !=nil {_bb .Characters =_bef .Characters ;};if _bb .Lines !=nil {if _bef .Lines !=nil {*_bb .Lines +=*_bef .Lines ;};}else if _bef .Lines !=nil {_bb .Lines =_bef .Lines ;};if _bb .Paragraphs !=nil {if _bef .Paragraphs !=nil {*_bb .Paragraphs +=*_bef .Paragraphs ;};}else if _bef .Paragraphs !=nil {_bb .Paragraphs =_bef .Paragraphs ;};if _bb .Notes !=nil {if _bef .Notes !=nil {*_bb .Notes +=*_bef .Notes ;};}else if _bef .Notes !=nil {_bb .Notes =_bef .Notes ;};if _bb .HiddenSlides !=nil {if _bef .HiddenSlides !=nil {*_bb .HiddenSlides +=*_bef .HiddenSlides ;};}else if _bef .HiddenSlides !=nil {_bb .HiddenSlides =_bef .HiddenSlides ;};if _bb .MMClips !=nil {if _bef .MMClips !=nil {*_bb .MMClips +=*_bef .MMClips ;};}else if _bef .MMClips !=nil {_bb .MMClips =_bef .MMClips ;};if _bb .LinksUpToDate !=nil {if _bef .LinksUpToDate !=nil {*_bb .LinksUpToDate =*_bb .LinksUpToDate &&*_bef .LinksUpToDate ;};}else if _bef .LinksUpToDate !=nil {_bb .LinksUpToDate =_bef .LinksUpToDate ;};if _bb .CharactersWithSpaces !=nil {if _bef .CharactersWithSpaces !=nil {*_bb .CharactersWithSpaces +=*_bef .CharactersWithSpaces ;};}else if _bef .CharactersWithSpaces !=nil {_bb .CharactersWithSpaces =_bef .CharactersWithSpaces ;};if _bb .SharedDoc !=nil {if _bef .SharedDoc !=nil {*_bb .SharedDoc =*_bb .SharedDoc ||*_bef .SharedDoc ;};}else if _bef .SharedDoc !=nil {_bb .SharedDoc =_bef .SharedDoc ;};if _bb .HyperlinksChanged !=nil {if _bef .HyperlinksChanged !=nil {*_bb .HyperlinksChanged =*_bb .HyperlinksChanged ||*_bef .HyperlinksChanged ;};}else if _bef .HyperlinksChanged !=nil {_bb .HyperlinksChanged =_bef .HyperlinksChanged ;};_bb .DigSig =nil ;if _bb .TitlesOfParts ==nil &&_bef .TitlesOfParts !=nil {_bb .TitlesOfParts =_bef .TitlesOfParts ;};if _bb .HeadingPairs !=nil {if _bef .HeadingPairs !=nil {_gfc :=_bb .HeadingPairs .Vector ;_ffa :=_bef .HeadingPairs .Vector ;_dba :=_gfc .Variant ;_fe :=_ffa .Variant ;_ae :=[]*_dc .Variant {};for _fgf :=0;_fgf < len (_fe );_fgf +=2{_edg :=_fe [_fgf ].Lpstr ;_ge :=false ;for _fgd :=0;_fgd < len (_dba );_fgd +=2{_bbe :=_dba [_fgd ].Lpstr ;if _bbe !=nil &&_edg !=nil &&*_bbe ==*_edg {*_dba [_fgd +1].I4 =*_dba [_fgd +1].I4 +*_fe [_fgf +1].I4 ;_ge =true ;break ;};};if !_ge {_ae =append (_ae ,&_dc .Variant {CT_Variant :_dc .CT_Variant {Lpstr :_fe [_fgf ].Lpstr }});_ae =append (_ae ,&_dc .Variant {CT_Variant :_dc .CT_Variant {I4 :_fe [_fgf ].I4 }});};};_dba =append (_dba ,_ae ...);_gfc .SizeAttr =uint32 (len (_dba ));};}else if _bef .HeadingPairs !=nil {_bb .HeadingPairs =_bef .HeadingPairs ;};if _bb .HLinks !=nil {if _bef .HLinks !=nil {_ab :=_bb .HLinks .Vector ;_fed :=_bef .HLinks .Vector ;_cfa :=_ab .Variant ;_bf :=_fed .Variant ;for _ ,_ca :=range _bf {_bbd :=true ;for _ ,_af :=range _cfa {if _f .DeepEqual (_af ,_ca ){_bbd =false ;break ;};};if _bbd {_cfa =append (_cfa ,_ca );_ab .SizeAttr ++;};};};}else if _bef .HLinks !=nil {_bb .HLinks =_bef .HLinks ;};_ec :=_ed .GetOrCreateCustomProperties ();_cde :=docBase1 .GetOrCreateCustomProperties ();for _ ,_de :=range _cde .PropertiesList (){_ec .setProperty (_de );};_ed .CustomProperties =_ec ;_deb :=_ed .Rels .X ().Relationship ;for _ ,_ecf :=range docBase1 .Rels .X ().Relationship {_cddb :=true ;for _ ,_aff :=range _deb {if _aff .TargetAttr ==_ecf .TargetAttr &&_aff .TypeAttr ==_ecf .TypeAttr {_cddb =false ;break ;};};if _cddb {_ed .Rels .AddRelationship (_ecf .TargetAttr ,_ecf .TypeAttr );};};for _ ,_dee :=range docBase1 .ExtraFiles {_dgc :=_dee .ZipPath ;_fef :=true ;for _ ,_ac :=range _ed .ExtraFiles {if _ac .ZipPath ==_dgc {_fef =false ;break ;};};if _fef {_ed .ExtraFiles =append (_ed .ExtraFiles ,_dee );};};return _ed ;};
// Format returns the format of the underlying image
func (_cdgd ImageRef )Format ()string {return _cdgd ._bace .Format };
// SetWidth sets column width, see measurement package.
func (_gbdc TableCol )SetWidth (m _ce .Distance ){_dca :=_ce .ToEMU (float64 (m ));_gbdc ._eabb .WAttr =_dg .ST_Coordinate {ST_CoordinateUnqualified :&_dca };};
// 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 ){_gbcb :=Image {};_caea ,_dec ,_fgeg :=_ff .Decode (_eg .NewReader (data ));if _fgeg !=nil {return _gbcb ,_cf .Errorf ("\u0075n\u0061\u0062\u006c\u0065 \u0074\u006f\u0020\u0070\u0061r\u0073e\u0020i\u006d\u0061\u0067\u0065\u003a\u0020\u0025s",_fgeg );};_gbcb .Data =&data ;_gbcb .Format =_dec ;_gbcb .Size =_caea .Bounds ().Size ();return _gbcb ,nil ;};func (_ddd CustomProperties )SetPropertyAsNull (name string ){_edfd :=_ddd .getNewProperty (name );_edfd .Null =_dc .NewNull ();_ddd .setOrReplaceProperty (_edfd );};
// CustomProperty contains document specific property.
// Using of this type is deprecated.
type CustomProperty struct{_eab *_cd .CT_Property };
// NewRelationship constructs a new relationship.
func NewRelationship ()Relationship {return Relationship {_cead :_bg .NewRelationship ()}};
// CopyOverride copies override content type for a given `path` and puts it with a path `newPath`.
func (_gba ContentTypes )CopyOverride (path ,newPath string ){if !_b .HasPrefix (path ,"\u002f"){path ="\u002f"+path ;};if !_b .HasPrefix (newPath ,"\u002f"){newPath ="\u002f"+newPath ;};for _dbc :=range _gba ._gdb .Override {if _gba ._gdb .Override [_dbc ].PartNameAttr ==path {_fd :=*_gba ._gdb .Override [_dbc ];_fd .PartNameAttr =newPath ;_gba ._gdb .Override =append (_gba ._gdb .Override ,&_fd );};};};
// NewCustomProperties constructs a new CustomProperties.
func NewCustomProperties ()CustomProperties {return CustomProperties {_ebc :_fa .NewProperties ()}};func (_fde CustomProperties )setProperty (_cafd *_fa .CT_Property ){_fde .setPropertyHelper (_cafd ,false );};
// ID returns the ID of a relationship.
func (_cfbc Relationship )ID ()string {return _cfbc ._cead .IdAttr };
func (_cfea Relationship )ID ()string {return _cfea ._dge .IdAttr };
// Clear removes any existing relationships.
func (_fbg Relationships )Clear (){_fbg ._eag .Relationship =nil };
// RelID returns the relationship ID.
func (_dce ImageRef )RelID ()string {return _dce ._fgfe };
// SetCompany sets the name of the company that created the document.
func (_afe AppProperties )SetCompany (s string ){_afe ._gca .Company =&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 (_dff *ImageRef )SetTarget (target string ){_dff ._afg =target };
// CopyOverride copies override content type for a given `path` and puts it with a path `newPath`.
func (_eeba ContentTypes )CopyOverride (path ,newPath string ){if !_eb .HasPrefix (path ,"\u002f"){path ="\u002f"+path ;};if !_eb .HasPrefix (newPath ,"\u002f"){newPath ="\u002f"+newPath ;};for _acb :=range _eeba ._efd .Override {if _eeba ._efd .Override [_acb ].PartNameAttr ==path {_fce :=*_eeba ._efd .Override [_acb ];_fce .PartNameAttr =newPath ;_eeba ._efd .Override =append (_eeba ._efd .Override ,&_fce );};};};func (_gcf CustomProperties )SetPropertyAsUint (name string ,ui uint ){_bfc :=_gcf .getNewProperty (name );_cdb :=uint32 (ui );_bfc .Uint =&_cdb ;_gcf .setOrReplaceProperty (_bfc );};func (_agca CustomProperties )SetPropertyAsOstorage (name string ,ostorage string ){_gdba :=_agca .getNewProperty (name );_gdba .Ostorage =&ostorage ;_agca .setOrReplaceProperty (_gdba );};
// ContentTypes is the top level "[Content_Types].xml" in a zip package.
type ContentTypes struct{_efd *_c .Types };const _aec =30;
// 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 (_dfca Relationships )AddAutoRelationship (dt _gc .DocType ,src string ,idx int ,ctype string )Relationship {return _dfca .AddRelationship (_gc .RelativeFilename (dt ,src ,ctype ,idx ),ctype );};
// SetDocSecurity sets the document security flag.
func (_gac AppProperties )SetDocSecurity (v int32 ){_gac ._dgg .DocSecurity =_gc .Int32 (v )};
// Theme is a drawingml theme.
type Theme struct{_efa *_fe .Theme };
// AddCustomRelationships adds relationships related to custom properties to the document.
func (_bfga *DocBase )AddCustomRelationships (){_bfga .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");_bfga .Rels .AddRelationship ("\u0064\u006f\u0063\u0050ro\u0070\u0073\u002f\u0063\u0075\u0073\u0074\u006f\u006d\u002e\u0078\u006d\u006c",_gc .CustomPropertiesType );};
// X returns the inner raw content types.
func (_ffc ContentTypes )X ()*_c .Types {return _ffc ._efd };
// SetHeight sets row height, see measurement package.
func (_ebda TableRow )SetHeight (m _ffb .Distance ){_ddca :=_ffb .ToEMU (float64 (m ));_ebda ._bgag .HAttr =_fe .ST_Coordinate {ST_CoordinateUnqualified :&_ddca };};
// Author returns the author of the document
func (_bfe CoreProperties )Author ()string {if _bfe ._gdb .Creator !=nil {return string (_bfe ._gdb .Creator .Data );};return "";};func (_eabf CustomProperties )SetPropertyAsOstream (name string ,ostream string ){_bec :=_eabf .getNewProperty (name );_bec .Ostream =&ostream ;_eabf .setOrReplaceProperty (_bec );};func (_aab CustomProperties )SetPropertyAsArray (name string ,array *_fg .Array ){_ecde :=_aab .getNewProperty (name );_ecde .Array =array ;_aab .setOrReplaceProperty (_ecde );};func (_ded CustomProperties )SetPropertyAsStorage (name string ,storage string ){_gbdf :=_ded .getNewProperty (name );_gbdf .Storage =&storage ;_ded .setOrReplaceProperty (_gbdf );};
// AddCol adds a column to a table.
func (_cbc Table )AddCol ()*TableCol {_eedg :=_fe .NewCT_TableCol ();_cbc ._fcg .TblGrid .GridCol =append (_cbc ._fcg .TblGrid .GridCol ,_eedg );for _ ,_dffg :=range _cbc ._fcg .Tr {_feaa :=_fe .NewCT_TableCell ();_dffg .Tc =append (_dffg .Tc ,_feaa );};return &TableCol {_age :_eedg };};
// Path returns the path to an image file, if any.
func (_ggabb ImageRef )Path ()string {return _ggabb ._ebee .Path };const _dffd =2022;func (_fdc CustomProperties )SetPropertyAsClsid (name string ,clsid string ){_ccf :=_fdc .getNewProperty (name );_ccf .Clsid =&clsid ;_fdc .setOrReplaceProperty (_ccf );};
// X returns the inner wrapped XML type.
func (_fc CoreProperties )X ()*_gc .CoreProperties {return _fc ._bfe };
func (_acd AppProperties )X ()*_dad .Properties {return _acd ._dgg };
// WriteExtraFiles writes the extra files to the zip package.
func (_gefb *DocBase )WriteExtraFiles (z *_ff .Writer )error {for _ ,_fagbb :=range _gefb .ExtraFiles {if _cgf :=_g .AddFileFromDisk (z ,_fagbb .ZipPath ,_fagbb .DiskPath );_cgf !=nil {return _cgf ;};};return nil ;};func (_egfd *ImageRef )SetRelID (id string ){_egfd ._fgfe =id };
// AddHyperlink adds an external hyperlink relationship.
func (_cag Relationships )AddHyperlink (target string )Hyperlink {_eaeg :=_cag .AddRelationship (target ,_gc .HyperLinkType );_eaeg ._dge .TargetModeAttr =_aae .ST_TargetModeExternal ;return Hyperlink (_eaeg );};
// Properties returns table properties.
func (_adgc Table )Properties ()*_fe .CT_TableProperties {return _adgc ._fcg .TblPr };
// Table represents a table in the document.
type Table struct{_fcg *_fe .Tbl ;_dfg *_fe .CT_Transform2D ;};func (_bgf CustomProperties )SetPropertyAsI1 (name string ,i1 int8 ){_dee :=_bgf .getNewProperty (name );_dee .I1 =&i1 ;_bgf .setOrReplaceProperty (_dee );};
// CopyRelationship copies the relationship.
func (_ddc Relationships )CopyRelationship (idAttr string )(Relationship ,bool ){for _eea :=range _ddc ._feec .Relationship {if _ddc ._feec .Relationship [_eea ].IdAttr ==idAttr {_faaa :=*_ddc ._feec .Relationship [_eea ];_eedf :=len (_ddc ._feec .Relationship )+1;_dcea :=map[string ]struct{}{};for _ ,_bdeb :=range _ddc ._feec .Relationship {_dcea [_bdeb .IdAttr ]=struct{}{};};for _ ,_beca :=_dcea [_aa .Sprintf ("\u0072\u0049\u0064%\u0064",_eedf )];_beca ;_ ,_beca =_dcea [_aa .Sprintf ("\u0072\u0049\u0064%\u0064",_eedf )]{_eedf ++;};_faaa .IdAttr =_aa .Sprintf ("\u0072\u0049\u0064%\u0064",_eedf );_ddc ._feec .Relationship =append (_ddc ._feec .Relationship ,&_faaa );return Relationship {_dge :&_faaa },true ;};};return Relationship {},false ;};
// X returns the inner wrapped XML type of CustomProperty.
func (_edf CustomProperty )X ()*_fa .CT_Property {return _edf ._dcf };
// X returns the underlying raw XML data.
func (_daa Relationships )X ()*_aae .Relationships {return _daa ._feec };
// RemoveOverrideByIndex removes an override given a path and override index.
func (_dec ContentTypes )RemoveOverrideByIndex (path string ,indexToFind int )error {_dddd :=path [0:len (path )-5];if !_eb .HasPrefix (_dddd ,"\u002f"){_dddd ="\u002f"+_dddd ;};_fbc ,_ffbg :=_ac .Compile (_dddd +"\u0028\u005b\u0030-\u0039\u005d\u002b\u0029\u002e\u0078\u006d\u006c");if _ffbg !=nil {return _ffbg ;};_eceb :=0;_ccd :=-1;for _dfb ,_cdf :=range _dec ._efd .Override {if _cac :=_fbc .FindStringSubmatch (_cdf .PartNameAttr );len (_cac )> 1{if _eceb ==indexToFind {_ccd =_dfb ;}else if _eceb > indexToFind {_gcg ,_ :=_ec .Atoi (_cac [1]);_gcg --;_cdf .PartNameAttr =_aa .Sprintf ("\u0025\u0073\u0025\u0064\u002e\u0078\u006d\u006c",_dddd ,_gcg );};_eceb ++;};};if _ccd > -1{copy (_dec ._efd .Override [_ccd :],_dec ._efd .Override [_ccd +1:]);_dec ._efd .Override =_dec ._efd .Override [0:len (_dec ._efd .Override )-1];};return nil ;};const _efbc ="\u0032\u0020\u004aan\u0075\u0061\u0072\u0079\u0020\u0032\u0030\u0030\u0036\u0020\u0061\u0074\u0020\u0031\u0035\u003a\u0030\u0034";
// X returns the inner wrapped XML type.
func (_gfg CustomProperties )X ()*_fa .Properties {return _gfg ._ebc };
// CoreProperties contains document specific properties.
type CoreProperties struct{_gdb *_bc .CoreProperties };
// Application returns the name of the application that created the document.
// For unioffice created documents, it defaults to github.com/unidoc/unioffice
func (_cc AppProperties )Application ()string {if _cc ._dgg .Application !=nil {return *_cc ._dgg .Application ;};return "";};
// ExtraFile is an unsupported file type extracted from, or to be written to a
// zip package
type ExtraFile struct{ZipPath string ;DiskPath string ;};func (_eff CustomProperties )SetPropertyAsBstr (name string ,bstr string ){_ggg :=_eff .getNewProperty (name );_ggg .Bstr =&bstr ;_eff .setOrReplaceProperty (_ggg );};func (_fgcd CustomProperties )SetPropertyAsFiletime (name string ,filetime _ef .Time ){_afcc :=_fgcd .getNewProperty (name );_afcc .Filetime =&filetime ;_fgcd .setOrReplaceProperty (_afcc );};
// GetImageBytesByTarget returns Image object with Data bytes read from its target.
func (_afd *DocBase )GetImageBytesByTarget (target string )(Image ,error ){if target !=""{target ="\u0077\u006f\u0072d\u002f"+target ;for _ ,_eebd :=range _afd .Images {if _eebd .Target ()==target {return ImageFromStorage (_eebd .Path ());};};};return Image {},_cdcf ;};var _cdcf =_da .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");
// SetStyle assigns TableStyle to a table.
func (_bffc Table )SetStyle (style *_fe .CT_TableStyle ){if _bffc ._fcg .TblPr ==nil {_bffc ._fcg .TblPr =_fe .NewCT_TableProperties ();};if _bffc ._fcg .TblPr .Choice ==nil {_bffc ._fcg .TblPr .Choice =_fe .NewCT_TablePropertiesChoice ();};_bffc ._fcg .TblPr .Choice .TableStyle =style ;};
// RemoveOverride removes an override given a path.
func (_bgd ContentTypes )RemoveOverride (path string ){if !_eb .HasPrefix (path ,"\u002f"){path ="\u002f"+path ;};for _aca ,_efb :=range _bgd ._efd .Override {if _efb .PartNameAttr ==path {copy (_bgd ._efd .Override [_aca :],_bgd ._efd .Override [_aca +1:]);_bgd ._efd .Override =_bgd ._efd .Override [0:len (_bgd ._efd .Override )-1];};};};
// NewTableWithXfrm makes a new table with a pointer to its parent Xfrm for changing its offset and size.
func NewTableWithXfrm (xfrm *_fe .CT_Transform2D )*Table {_cde :=_fe .NewTbl ();_cde .TblPr =_fe .NewCT_TableProperties ();return &Table {_fcg :_cde ,_dfg :xfrm };};
// EnsureDefault esnures that an extension and default content type exist,
// adding it if necessary.
func (_dbc ContentTypes )EnsureDefault (ext ,contentType string ){ext =_eb .ToLower (ext );for _ ,_efcf :=range _dbc ._efd .Default {if _efcf .ExtensionAttr ==ext {_efcf .ContentTypeAttr =contentType ;return ;};};_bff :=&_c .Default {};_bff .ContentTypeAttr =contentType ;_bff .ExtensionAttr =ext ;_dbc ._efd .Default =append (_dbc ._efd .Default ,_bff );};
// 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 ){_bga :=Image {};_eced ,_abga :=_ffba .Open (path );if _abga !=nil {return _bga ,_aa .Errorf ("\u0065\u0072\u0072or\u0020\u0072\u0065\u0061\u0064\u0069\u006e\u0067\u0020\u0069\u006d\u0061\u0067\u0065\u003a\u0020\u0025\u0073",_abga );};defer _eced .Close ();_dbf ,_gdg ,_abga :=_e .Decode (_eced );if _abga !=nil {return _bga ,_aa .Errorf ("\u0075n\u0061\u0062\u006c\u0065 \u0074\u006f\u0020\u0070\u0061r\u0073e\u0020i\u006d\u0061\u0067\u0065\u003a\u0020\u0025s",_abga );};_bga .Path =path ;_bga .Format =_gdg ;_bga .Size =_dbf .Bounds ().Size ();return _bga ,nil ;};
// Properties returns table properties.
func (_acbe Table )Grid ()*_fe .CT_TableGrid {return _acbe ._fcg .TblGrid };
// Relationships represents a .rels file.
type Relationships struct{_feec *_aae .Relationships };
// SetCategory records the category of the document.
func (_edb CoreProperties )SetCategory (s string ){_edb ._gdb .Category =&s };
// NewRelationshipsCopy creates a new relationships wrapper as a copy of passed in instance.
func NewRelationshipsCopy (rels Relationships )Relationships {_dgef :=*rels ._feec ;return Relationships {_feec :&_dgef };};
// Rows returns all table rows.
func (_feag Table )Rows ()[]*TableRow {_aaac :=_feag ._fcg .Tr ;_bgcd :=[]*TableRow {};for _ ,_eceg :=range _aaac {_bgcd =append (_bgcd ,&TableRow {_bgag :_eceg });};return _bgcd ;};
// X returns the inner wrapped XML type.
func (_gda Theme )X ()*_fe .Theme {return _gda ._efa };
// Format returns the format of the underlying image
func (_bbg ImageRef )Format ()string {return _bbg ._ebee .Format };
// SetModified sets the time that the document was modified.
func (_afb CoreProperties )SetModified (t _ef .Time ){_afb ._gdb .Modified =_eaf (t ,"\u0064\u0063t\u0065\u0072\u006ds\u003a\u006d\u006f\u0064\u0069\u0066\u0069\u0065\u0064");};
// SetLinksUpToDate sets the links up to date flag.
func (_ba AppProperties )SetLinksUpToDate (v bool ){_ba ._dgg .LinksUpToDate =_gc .Bool (v )};
// Category returns the category of the document
func (_bee CoreProperties )Category ()string {if _bee ._gdb .Category !=nil {return *_bee ._gdb .Category ;};return "";};
// AddRow adds a row to a table.
func (_gcga Table )AddRow ()*TableRow {_cdbc :=_fe .NewCT_TableRow ();for _acedf :=0;_acedf < len (_gcga ._fcg .TblGrid .GridCol );_acedf ++{_cdbc .Tc =append (_cdbc .Tc ,_fe .NewCT_TableCell ());};_gcga ._fcg .Tr =append (_gcga ._fcg .Tr ,_cdbc );return &TableRow {_bgag :_cdbc };};
// X returns the inner wrapped XML type.
func (_ffa TableStyles )X ()*_fe .TblStyleLst {return _ffa ._cff };const _dgged ="2\u00300\u0036\u002d\u0030\u0031\u002d\u0030\u0032\u00541\u0035\u003a\u0030\u0034:0\u0035\u005a";func (_eab CustomProperties )SetPropertyAsUi4 (name string ,ui4 uint32 ){_aaef :=_eab .getNewProperty (name );_aaef .Ui4 =&ui4 ;_eab .setOrReplaceProperty (_aaef );};
// 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 (_aee ImageRef )RelativeHeight (w _ffb .Distance )_ffb .Distance {_eae :=float64 (_aee .Size ().Y )/float64 (_aee .Size ().X );return w *_ffb .Distance (_eae );};func _eaf (_gbb _ef .Time ,_ccef string )*_gc .XSDAny {_deg :=&_gc .XSDAny {XMLName :_ee .Name {Local :_ccef }};_deg .Attrs =append (_deg .Attrs ,_ee .Attr {Name :_ee .Name {Local :"\u0078\u0073\u0069\u003a\u0074\u0079\u0070\u0065"},Value :"\u0064\u0063\u0074\u0065\u0072\u006d\u0073\u003a\u00573\u0043\u0044\u0054\u0046"});_deg .Attrs =append (_deg .Attrs ,_ee .Attr {Name :_ee .Name {Local :"\u0078m\u006c\u006e\u0073\u003a\u0078\u0073i"},Value :"\u0068\u0074\u0074\u0070\u003a/\u002f\u0077\u0077\u0077\u002e\u0077\u0033\u002e\u006f\u0072\u0067\u002f\u00320\u0030\u0031\u002f\u0058\u004d\u004c\u0053\u0063\u0068\u0065\u006d\u0061\u002d\u0069\u006e\u0073\u0074\u0061\u006e\u0063\u0065"});_deg .Attrs =append (_deg .Attrs ,_ee .Attr {Name :_ee .Name {Local :"\u0078\u006d\u006c\u006e\u0073\u003a\u0064\u0063\u0074\u0065\u0072\u006d\u0073"},Value :"\u0068t\u0074\u0070\u003a\u002f/\u0070\u0075\u0072\u006c\u002eo\u0072g\u002fd\u0063\u002f\u0074\u0065\u0072\u006d\u0073/"});_deg .Data =[]byte (_gbb .Format (_dgged ));return _deg ;};
// PropertiesList returns the list of all custom properties of the document.
func (_cfc CustomProperties )PropertiesList ()[]*_fa .CT_Property {return _cfc ._ebc .Property };
// Description returns the description of the document
func (_bfa CoreProperties )Description ()string {if _bfa ._gdb .Description !=nil {return string (_bfa ._gdb .Description .Data );};return "";};
// EnsureOverride ensures that an override for the given path exists, adding it if necessary
func (_gg ContentTypes )EnsureOverride (path ,contentType string ){for _ ,_cgg :=range _gg ._efd .Override {if _cgg .PartNameAttr ==path {if _eb .HasPrefix (contentType ,"\u0068\u0074\u0074\u0070"){_ab .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 );};_cgg .ContentTypeAttr =contentType ;return ;};};_gg .AddOverride (path ,contentType );};
// AppProperties contains properties specific to the document and the
// application that created it.
type AppProperties struct{_gca *_bag .Properties };
type AppProperties struct{_dgg *_dad .Properties };
// Remove removes an existing relationship.
func (_fcdb Relationships )Remove (rel Relationship )bool {for _ddec ,_bga :=range _fcdb ._eag .Relationship {if _bga ==rel ._cead {copy (_fcdb ._eag .Relationship [_ddec :],_fcdb ._eag .Relationship [_ddec +1:]);_fcdb ._eag .Relationship =_fcdb ._eag .Relationship [0:len (_fcdb ._eag .Relationship )-1];return true ;};};return false ;};func (_aeae CustomProperties )SetPropertyAsI4 (name string ,i4 int32 ){_cgfe :=_aeae .getNewProperty (name );_cgfe .I4 =&i4 ;_aeae .setOrReplaceProperty (_cgfe );};func (_cgg TableRow )addCell ()*_dg .CT_TableCell {_fgdc :=_dg .NewCT_TableCell ();_cgg ._bcf .Tc =append (_cgg ._bcf .Tc ,_fgdc );return _fgdc ;};
// CustomProperty contains document specific property.
// Using of this type is deprecated.
type CustomProperty struct{_dcf *_fa .CT_Property };func (_fegg CustomProperties )SetPropertyAsI8 (name string ,i8 int64 ){_debd :=_fegg .getNewProperty (name );_debd .I8 =&i8 ;_fegg .setOrReplaceProperty (_debd );};func (_bde CustomProperties )SetPropertyAsR4 (name string ,r4 float32 ){_faa :=_bde .getNewProperty (name );_faa .R4 =&r4 ;_bde .setOrReplaceProperty (_faa );};func (_dba CustomProperties )SetPropertyAsOblob (name ,oblob string ){_cgd :=_dba .getNewProperty (name );_cgd .Oblob =&oblob ;_dba .setOrReplaceProperty (_cgd );};func init (){_gd .SetAsStorage ()};
// NewTable makes a new table.
func NewTable ()*Table {_afef :=_fe .NewTbl ();_afef .TblPr =_fe .NewCT_TableProperties ();return &Table {_fcg :_afef };};
// TblStyle returns the TblStyle property.
func (_gdbe TableStyles )TblStyle ()[]*_fe .CT_TableStyle {return _gdbe ._cff .TblStyle };
// 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 (_acef AppProperties )Pages ()int32 {if _acef ._dgg .Pages !=nil {return *_acef ._dgg .Pages ;};return 0;};
// NewTheme constructs a new theme.
func NewTheme ()Theme {return Theme {_fe .NewTheme ()}};
// SetContentStatus records the content status of the document.
func (_bd CoreProperties )SetContentStatus (s string ){_bd ._gdb .ContentStatus =&s };
// TableCol represents a column in a table.
type TableCol struct{_age *_fe .CT_TableCol };
// GetByRelId returns a relationship with the associated relation ID.
func (_fca Relationships )GetByRelId (idAttr string )Relationship {for _ ,_dcg :=range _fca ._feec .Relationship {if _dcg .IdAttr ==idAttr {return Relationship {_dge :_dcg };};};return Relationship {};};
// AddRelationship adds a relationship.
func (_ffcf Relationships )AddRelationship (target ,ctype string )Relationship {if !_eb .HasPrefix (ctype ,"\u0068t\u0074\u0070\u003a\u002f\u002f"){_ab .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 );};_bfbf :=_aae .NewRelationship ();_gcfg :=len (_ffcf ._feec .Relationship )+1;_fbb :=map[string ]struct{}{};for _ ,_gge :=range _ffcf ._feec .Relationship {_fbb [_gge .IdAttr ]=struct{}{};};for _ ,_ecfg :=_fbb [_aa .Sprintf ("\u0072\u0049\u0064%\u0064",_gcfg )];_ecfg ;_ ,_ecfg =_fbb [_aa .Sprintf ("\u0072\u0049\u0064%\u0064",_gcfg )]{_gcfg ++;};_bfbf .IdAttr =_aa .Sprintf ("\u0072\u0049\u0064%\u0064",_gcfg );_bfbf .TargetAttr =target ;_bfbf .TypeAttr =ctype ;_ffcf ._feec .Relationship =append (_ffcf ._feec .Relationship ,_bfbf );return Relationship {_dge :_bfbf };};func (_dcc CustomProperties )SetPropertyAsBool (name string ,b bool ){_cge :=_dcc .getNewProperty (name );_cge .Bool =&b ;_dcc .setOrReplaceProperty (_cge );};const _befa =12;
// GetTargetByRelId returns a target path with the associated relation ID.
func (_efec Relationships )GetTargetByRelId (idAttr string )string {for _ ,_dgc :=range _efec ._feec .Relationship {if _dgc .IdAttr ==idAttr {return _dgc .TargetAttr ;};};return "";};
// 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 (_bag ImageRef )RelativeWidth (h _ffb .Distance )_ffb .Distance {_cfe :=float64 (_bag .Size ().X )/float64 (_bag .Size ().Y );return h *_ffb .Distance (_cfe );};
// SetWidth sets column width, see measurement package.
func (_eac TableCol )SetWidth (m _ffb .Distance ){_dcac :=_ffb .ToEMU (float64 (m ));_eac ._age .WAttr =_fe .ST_Coordinate {ST_CoordinateUnqualified :&_dcac };};
// NewAppProperties constructs a new AppProperties.
func NewAppProperties ()AppProperties {_ecc :=AppProperties {_dgg :_dad .NewProperties ()};_ecc .SetCompany ("\u0046\u006f\u0078\u0079\u0055\u0074\u0069\u006c\u0073\u0020\u0065\u0068\u0066");_ecc .SetApplication ("g\u0069\u0074\u0068\u0075\u0062\u002ec\u006f\u006d\u002f\u0075\u006e\u0069\u0064\u006f\u0063/\u0075\u006e\u0069o\u0066f\u0069\u0063\u0065");_ecc .SetDocSecurity (0);_ecc .SetLinksUpToDate (false );var _egg ,_dgge ,_eed int64 ;_aa .Sscanf (Version ,"\u0025\u0064\u002e\u0025\u0064\u002e\u0025\u0064",&_egg ,&_dgge ,&_eed );_gf :=float64 (_egg )+float64 (_dgge )/10000.0;_ecc .SetApplicationVersion (_aa .Sprintf ("\u0025\u0030\u0037\u002e\u0034\u0066",_gf ));return _ecc ;};
// 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 ){_abd :=Image {};_fff ,_fbcg ,_gcc :=_e .Decode (_af .NewReader (data ));if _gcc !=nil {return _abd ,_aa .Errorf ("\u0075n\u0061\u0062\u006c\u0065 \u0074\u006f\u0020\u0070\u0061r\u0073e\u0020i\u006d\u0061\u0067\u0065\u003a\u0020\u0025s",_gcc );};_abd .Data =&data ;_abd .Format =_fbcg ;_abd .Size =_fff .Bounds ().Size ();return _abd ,nil ;};
// NewContentTypes returns a wrapper around a newly constructed content-types.
func NewContentTypes ()ContentTypes {_ge :=ContentTypes {_efd :_c .NewTypes ()};_ge .AddDefault ("\u0078\u006d\u006c","\u0061p\u0070l\u0069\u0063\u0061\u0074\u0069\u006f\u006e\u002f\u0078\u006d\u006c");_ge .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");_ge .AddDefault ("\u0070\u006e\u0067","\u0069m\u0061\u0067\u0065\u002f\u0070\u006eg");_ge .AddDefault ("\u006a\u0070\u0065\u0067","\u0069\u006d\u0061\u0067\u0065\u002f\u006a\u0070\u0065\u0067");_ge .AddDefault ("\u006a\u0070\u0067","\u0069m\u0061\u0067\u0065\u002f\u006a\u0070g");_ge .AddDefault ("\u0077\u006d\u0066","i\u006d\u0061\u0067\u0065\u002f\u0078\u002d\u0077\u006d\u0066");_ge .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");_ge .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 _ge ;};
// LastModifiedBy returns the name of the last person to modify the document
func (_efee CoreProperties )LastModifiedBy ()string {if _efee ._gdb .LastModifiedBy !=nil {return *_efee ._gdb .LastModifiedBy ;};return "";};
// SetApplicationVersion sets the version of the application that created the
// document. Per MS, the verison string mut be in the form 'XX.YYYY'.
func (_bagb AppProperties )SetApplicationVersion (s string ){_bagb ._gca .AppVersion =&s };
func (_efc AppProperties )SetApplicationVersion (s string ){_efc ._dgg .AppVersion =&s };
// X returns the inner wrapped XML type.
func (_gdbc Table )X ()*_fe .Tbl {return _gdbc ._fcg };
// SetApplication sets the name of the application that created the document.
func (_ca AppProperties )SetApplication (s string ){_ca ._dgg .Application =&s };func (_ega CustomProperties )SetPropertyAsVstream (name string ,vstream *_fg .Vstream ){_agga :=_ega .getNewProperty (name );_agga .Vstream =vstream ;_ega .setOrReplaceProperty (_agga );};func (_bfb CustomProperties )SetPropertyAsUi8 (name string ,ui8 uint64 ){_dbg :=_bfb .getNewProperty (name );_dbg .Ui8 =&ui8 ;_bfb .setOrReplaceProperty (_dbg );};
// X returns the inner wrapped XML type.
func (_becg Relationship )X ()*_aae .Relationship {return _becg ._dge };
// SetLanguage records the language of the document.
func (_fbg CoreProperties )SetLanguage (s string ){_fbg ._gdb .Language =&_gc .XSDAny {XMLName :_ee .Name {Local :"d\u0063\u003a\u006c\u0061\u006e\u0067\u0075\u0061\u0067\u0065"}};_fbg ._gdb .Language .Data =[]byte (s );};
// Modified returns the time that the document was modified.
func (_dggd CoreProperties )Modified ()_ef .Time {return _acad (_dggd ._gdb .Modified )};func (_fagb CustomProperties )SetPropertyAsError (name string ,error string ){_fad :=_fagb .getNewProperty (name );_fad .Error =&error ;_fagb .setOrReplaceProperty (_fad );};
// NewRelationship constructs a new relationship.
func NewRelationship ()Relationship {return Relationship {_dge :_aae .NewRelationship ()}};
// SetCreated sets the time that the document was created.
func (_edd CoreProperties )SetCreated (t _ef .Time ){_edd ._gdb .Created =_eaf (t ,"\u0064c\u0074e\u0072\u006d\u0073\u003a\u0063\u0072\u0065\u0061\u0074\u0065\u0064");};
// GetPropertyByName returns a custom property selected by it's name.
func (_fdf CustomProperties )GetPropertyByName (name string )CustomProperty {_abc :=_fdf ._ebc .Property ;for _ ,_gbd :=range _abc {if *_gbd .NameAttr ==name {return CustomProperty {_dcf :_gbd };};};return CustomProperty {};};
// ContentStatus returns the content status of the document (e.g. "Final", "Draft")
func (_egc CoreProperties )ContentStatus ()string {if _egc ._gdb .ContentStatus !=nil {return *_egc ._gdb .ContentStatus ;};return "";};func (_eeg CustomProperties )SetPropertyAsUi1 (name string ,ui1 uint8 ){_bfg :=_eeg .getNewProperty (name );_bfg .Ui1 =&ui1 ;_eeg .setOrReplaceProperty (_bfg );};func (_dafe Relationship )String ()string {return _aa .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",_dafe .ID (),_dafe .Target (),_dafe .Type ());};func (_bed CustomProperties )SetPropertyAsVector (name string ,vector *_fg .Vector ){_eba :=_bed .getNewProperty (name );_eba .Vector =vector ;_bed .setOrReplaceProperty (_eba );};var ReleasedAt =_ef .Date (_dffd ,_befa ,_caa ,_bfae ,_aec ,0,0,_ef .UTC );
// NewCoreProperties constructs a new CoreProperties.
func NewCoreProperties ()CoreProperties {return CoreProperties {_gdb :_bc .NewCoreProperties ()}};

View File

@ -11,39 +11,39 @@
// Package license helps manage commercial licenses and check if they
// are valid for the version of UniOffice used.
package license ;import _g "github.com/unidoc/unioffice/internal/license";
// LegacyLicenseType is the type of license
type LegacyLicenseType =_g .LegacyLicenseType ;
package license ;import _c "github.com/unidoc/unioffice/internal/license";
// MakeUnlicensedKey returns a default key.
func MakeUnlicensedKey ()*LicenseKey {return _g .MakeUnlicensedKey ()};
func MakeUnlicensedKey ()*LicenseKey {return _c .MakeUnlicensedKey ()};
// 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 )};
// LicenseKey represents a loaded license key.
type LicenseKey =_g .LicenseKey ;
type LicenseKey =_c .LicenseKey ;
// GetLicenseKey returns the currently loaded license key.
func GetLicenseKey ()*LicenseKey {return _g .GetLicenseKey ()};const (LicenseTierUnlicensed =_g .LicenseTierUnlicensed ;LicenseTierCommunity =_g .LicenseTierCommunity ;LicenseTierIndividual =_g .LicenseTierIndividual ;LicenseTierBusiness =_g .LicenseTierBusiness ;);
// LegacyLicense holds the old-style unioffice license information.
type LegacyLicense =_c .LegacyLicense ;const (LicenseTierUnlicensed =_c .LicenseTierUnlicensed ;LicenseTierCommunity =_c .LicenseTierCommunity ;LicenseTierIndividual =_c .LicenseTierIndividual ;LicenseTierBusiness =_c .LicenseTierBusiness ;);
// LegacyLicenseType is the type of license
type LegacyLicenseType =_c .LegacyLicenseType ;
// SetMeteredKey sets the metered License API key required for SaaS operation.
// Document usage is reported periodically for the product to function correctly.
func SetMeteredKey (apiKey string )error {return _g .SetMeteredKey (apiKey )};
func SetMeteredKey (apiKey string )error {return _c .SetMeteredKey (apiKey )};
// GetMeteredState checks the currently used metered document usage status,
// documents used and credits available.
func GetMeteredState ()(_g .MeteredStatus ,error ){return _g .GetMeteredState ()};
// LegacyLicense holds the old-style unioffice license information.
type LegacyLicense =_g .LegacyLicense ;
// SetLicenseKey sets and validates the license key.
func SetLicenseKey (content string ,customerName string )error {return _c .SetLicenseKey (content ,customerName );};
// SetMeteredKeyPersistentCache sets the metered License API Key persistent cache.
// Default value `true`, set to `false` will report the usage immediately to license server,
// this can be used when there's no access to persistent data storage.
func SetMeteredKeyPersistentCache (val bool ){_g .SetMeteredKeyPersistentCache (val )};
func SetMeteredKeyPersistentCache (val bool ){_c .SetMeteredKeyPersistentCache (val )};
// SetLicenseKey sets and validates the license key.
func SetLicenseKey (content string ,customerName string )error {return _g .SetLicenseKey (content ,customerName );};
// GetMeteredState checks the currently used metered document usage status,
// documents used and credits available.
func GetMeteredState ()(_c .MeteredStatus ,error ){return _c .GetMeteredState ()};
// SetLegacyLicenseKey installs a legacy license code. License codes issued prior to June 2019.
// Will be removed at some point in a future major version.
func SetLegacyLicenseKey (s string )error {return _g .SetLegacyLicenseKey (s )};
// GetLicenseKey returns the currently loaded license key.
func GetLicenseKey ()*LicenseKey {return _c .GetLicenseKey ()};

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 (_d "fmt";_e "io";_cf "os";_ca "path/filepath";_c "runtime";);
package logger ;import (_a "fmt";_b "io";_af "os";_e "path/filepath";_d "runtime";);
// Debug logs debug message.
func (_ge WriterLogger )Debug (format string ,args ...interface{}){if _ge .LogLevel >=LogLevelDebug {_gb :="\u005b\u0044\u0045\u0042\u0055\u0047\u005d\u0020";_ge .logToWriter (_ge .Output ,_gb ,format ,args ...);};};
// NewWriterLogger creates new 'writer' logger.
func NewWriterLogger (logLevel LogLevel ,writer _e .Writer )*WriterLogger {logger :=WriterLogger {Output :writer ,LogLevel :logLevel };return &logger ;};
// Info logs info message.
func (_afb WriterLogger )Info (format string ,args ...interface{}){if _afb .LogLevel >=LogLevelInfo {_ac :="\u005bI\u004e\u0046\u004f\u005d\u0020";_afb .logToWriter (_afb .Output ,_ac ,format ,args ...);};};func (_cd WriterLogger )logToWriter (_ef _e .Writer ,_dfc string ,_gec string ,_bc ...interface{}){_fd (_ef ,_dfc ,_gec ,_bc );};
// ConsoleLogger is a logger that writes logs to the 'os.Stdout'
type ConsoleLogger struct{LogLevel LogLevel ;};
// Warning logs warning message.
func (_dd ConsoleLogger )Warning (format string ,args ...interface{}){if _dd .LogLevel >=LogLevelWarning {_db :="\u005b\u0057\u0041\u0052\u004e\u0049\u004e\u0047\u005d\u0020";_dd .output (_cf .Stdout ,_db ,format ,args ...);};};func (_dg ConsoleLogger )output (_cb _e .Writer ,_be string ,_ecd string ,_dde ...interface{}){_fd (_cb ,_be ,_ecd ,_dde ...);};func _fd (_ce _e .Writer ,_agd string ,_cbg string ,_aca ...interface{}){_ ,_aff ,_caa ,_ecgd :=_c .Caller (3);if !_ecgd {_aff ="\u003f\u003f\u003f";_caa =0;}else {_aff =_ca .Base (_aff );};_gdd :=_d .Sprintf ("\u0025s\u0020\u0025\u0073\u003a\u0025\u0064 ",_agd ,_aff ,_caa )+_cbg +"\u000a";_d .Fprintf (_ce ,_gdd ,_aca ...);};
// Error logs error message.
func (_fg ConsoleLogger )Error (format string ,args ...interface{}){if _fg .LogLevel >=LogLevelError {_eca :="\u005b\u0045\u0052\u0052\u004f\u0052\u005d\u0020";_fg .output (_cf .Stdout ,_eca ,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 (_ga WriterLogger )IsLogLevel (level LogLevel )bool {return _ga .LogLevel >=level };
// Info does nothing for dummy logger.
func (DummyLogger )Info (format string ,args ...interface{}){};
// Warning does nothing for dummy logger.
func (DummyLogger )Warning (format string ,args ...interface{}){};
// IsLogLevel returns true from dummy logger.
func (DummyLogger )IsLogLevel (level LogLevel )bool {return true };const (LogLevelTrace LogLevel =5;LogLevelDebug LogLevel =4;LogLevelInfo LogLevel =3;LogLevelNotice LogLevel =2;LogLevelWarning LogLevel =1;LogLevelError LogLevel =0;);
// Trace does nothing for dummy logger.
func (DummyLogger )Trace (format string ,args ...interface{}){};
// Notice does nothing for dummy logger.
func (DummyLogger )Notice (format string ,args ...interface{}){};
// Trace logs trace message.
func (_df ConsoleLogger )Trace (format string ,args ...interface{}){if _df .LogLevel >=LogLevelTrace {_dfd :="\u005b\u0054\u0052\u0041\u0043\u0045\u005d\u0020";_df .output (_cf .Stdout ,_dfd ,format ,args ...);};};var Log Logger =DummyLogger {};
// NewConsoleLogger creates new console logger.
func NewConsoleLogger (logLevel LogLevel )*ConsoleLogger {return &ConsoleLogger {LogLevel :logLevel }};
// Notice logs notice message.
func (_fa ConsoleLogger )Notice (format string ,args ...interface{}){if _fa .LogLevel >=LogLevelNotice {_ecc :="\u005bN\u004f\u0054\u0049\u0043\u0045\u005d ";_fa .output (_cf .Stdout ,_ecc ,format ,args ...);};};
// IsLogLevel returns true from dummy logger.
func (DummyLogger )IsLogLevel (level LogLevel )bool {return true };
// Debug does nothing for dummy logger.
func (DummyLogger )Debug (format string ,args ...interface{}){};
// Error logs error message.
func (_gd WriterLogger )Error (format string ,args ...interface{}){if _gd .LogLevel >=LogLevelError {_afa :="\u005b\u0045\u0052\u0052\u004f\u0052\u005d\u0020";_gd .logToWriter (_gd .Output ,_afa ,format ,args ...);};};
// SetLogger sets 'logger' to be used by the unidoc unipdf library.
func SetLogger (logger Logger ){Log =logger };
// Debug logs debug message.
func (_ba ConsoleLogger )Debug (format string ,args ...interface{}){if _ba .LogLevel >=LogLevelDebug {_bag :="\u005b\u0044\u0045\u0042\u0055\u0047\u005d\u0020";_ba .output (_cf .Stdout ,_bag ,format ,args ...);};};
// Error does nothing for dummy logger.
func (DummyLogger )Error (format string ,args ...interface{}){};
// Trace logs trace message.
func (_da WriterLogger )Trace (format string ,args ...interface{}){if _da .LogLevel >=LogLevelTrace {_cc :="\u005b\u0054\u0052\u0041\u0043\u0045\u005d\u0020";_da .logToWriter (_da .Output ,_cc ,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 (_ee ConsoleLogger )IsLogLevel (level LogLevel )bool {return _ee .LogLevel >=level };
func (_gd WriterLogger )IsLogLevel (level LogLevel )bool {return _gd .LogLevel >=level };
// WriterLogger is the logger that writes data to the Output writer
type WriterLogger struct{LogLevel LogLevel ;Output _e .Writer ;};const (LogLevelTrace LogLevel =5;LogLevelDebug LogLevel =4;LogLevelInfo LogLevel =3;LogLevelNotice LogLevel =2;LogLevelWarning LogLevel =1;LogLevelError LogLevel =0;);
// Error logs error message.
func (_fae ConsoleLogger )Error (format string ,args ...interface{}){if _fae .LogLevel >=LogLevelError {_fef :="\u005b\u0045\u0052\u0052\u004f\u0052\u005d\u0020";_fae .output (_af .Stdout ,_fef ,format ,args ...);};};
// Logger is the interface used for logging in the unipdf package.
type Logger interface{Error (_b string ,_ec ...interface{});Warning (_ecg string ,_de ...interface{});Notice (_bg string ,_g ...interface{});Info (_af string ,_bd ...interface{});Debug (_gf string ,_ed ...interface{});Trace (_ad string ,_f ...interface{});IsLogLevel (_fb LogLevel )bool ;};
type Logger interface{Error (_ce string ,_ad ...interface{});Warning (_f string ,_df ...interface{});Notice (_cg string ,_fa ...interface{});Info (_cef string ,_bf ...interface{});Debug (_fe string ,_ed ...interface{});Trace (_g string ,_ee ...interface{});IsLogLevel (_dd LogLevel )bool ;};
// DummyLogger does nothing.
type DummyLogger struct{};
// Warning logs warning message.
func (_cbb WriterLogger )Warning (format string ,args ...interface{}){if _cbb .LogLevel >=LogLevelWarning {_edf :="\u005b\u0057\u0041\u0052\u004e\u0049\u004e\u0047\u005d\u0020";_cbb .logToWriter (_cbb .Output ,_edf ,format ,args ...);};};
// Info logs info message.
func (_gc ConsoleLogger )Info (format string ,args ...interface{}){if _gc .LogLevel >=LogLevelInfo {_afe :="\u005bI\u004e\u0046\u004f\u005d\u0020";_gc .output (_cf .Stdout ,_afe ,format ,args ...);};};
// LogLevel is the verbosity level for logging.
type LogLevel int ;
// Error does nothing for dummy logger.
func (DummyLogger )Error (format string ,args ...interface{}){};
// Debug logs debug message.
func (_fgf WriterLogger )Debug (format string ,args ...interface{}){if _fgf .LogLevel >=LogLevelDebug {_dg :="\u005b\u0044\u0045\u0042\u0055\u0047\u005d\u0020";_fgf .logToWriter (_fgf .Output ,_dg ,format ,args ...);};};
// Info does nothing for dummy logger.
func (DummyLogger )Info (format string ,args ...interface{}){};
// Info logs info message.
func (_eg ConsoleLogger )Info (format string ,args ...interface{}){if _eg .LogLevel >=LogLevelInfo {_bc :="\u005bI\u004e\u0046\u004f\u005d\u0020";_eg .output (_af .Stdout ,_bc ,format ,args ...);};};func _ege (_cd _b .Writer ,_ff string ,_ea string ,_def ...interface{}){_ ,_fgfe ,_dee ,_dge :=_d .Caller (3);if !_dge {_fgfe ="\u003f\u003f\u003f";_dee =0;}else {_fgfe =_e .Base (_fgfe );};_ead :=_a .Sprintf ("\u0025s\u0020\u0025\u0073\u003a\u0025\u0064 ",_ff ,_fgfe ,_dee )+_ea +"\u000a";_a .Fprintf (_cd ,_ead ,_def ...);};
// Notice logs notice message.
func (_baa WriterLogger )Notice (format string ,args ...interface{}){if _baa .LogLevel >=LogLevelNotice {_ag :="\u005bN\u004f\u0054\u0049\u0043\u0045\u005d ";_baa .logToWriter (_baa .Output ,_ag ,format ,args ...);};};
func (_de ConsoleLogger )Notice (format string ,args ...interface{}){if _de .LogLevel >=LogLevelNotice {_cgd :="\u005bN\u004f\u0054\u0049\u0043\u0045\u005d ";_de .output (_af .Stdout ,_cgd ,format ,args ...);};};
// NewWriterLogger creates new 'writer' logger.
func NewWriterLogger (logLevel LogLevel ,writer _b .Writer )*WriterLogger {logger :=WriterLogger {Output :writer ,LogLevel :logLevel };return &logger ;};
// Trace logs trace message.
func (_fg ConsoleLogger )Trace (format string ,args ...interface{}){if _fg .LogLevel >=LogLevelTrace {_be :="\u005b\u0054\u0052\u0041\u0043\u0045\u005d\u0020";_fg .output (_af .Stdout ,_be ,format ,args ...);};};
// Notice logs notice message.
func (_acg WriterLogger )Notice (format string ,args ...interface{}){if _acg .LogLevel >=LogLevelNotice {_gc :="\u005bN\u004f\u0054\u0049\u0043\u0045\u005d ";_acg .logToWriter (_acg .Output ,_gc ,format ,args ...);};};
// Warning does nothing for dummy logger.
func (DummyLogger )Warning (format string ,args ...interface{}){};
// ConsoleLogger is a logger that writes logs to the 'os.Stdout'
type ConsoleLogger struct{LogLevel LogLevel ;};
// IsLogLevel returns true if log level is greater or equal than `level`.
// Can be used to avoid resource intensive calls to loggers.
func (_gb ConsoleLogger )IsLogLevel (level LogLevel )bool {return _gb .LogLevel >=level };func (_cga WriterLogger )logToWriter (_ef _b .Writer ,_beb string ,_ba string ,_cge ...interface{}){_ege (_ef ,_beb ,_ba ,_cge );};
// Debug logs debug message.
func (_bgc ConsoleLogger )Debug (format string ,args ...interface{}){if _bgc .LogLevel >=LogLevelDebug {_ac :="\u005b\u0044\u0045\u0042\u0055\u0047\u005d\u0020";_bgc .output (_af .Stdout ,_ac ,format ,args ...);};};
// Warning logs warning message.
func (_edf WriterLogger )Warning (format string ,args ...interface{}){if _edf .LogLevel >=LogLevelWarning {_eef :="\u005b\u0057\u0041\u0052\u004e\u0049\u004e\u0047\u005d\u0020";_edf .logToWriter (_edf .Output ,_eef ,format ,args ...);};};func (_cc ConsoleLogger )output (_aa _b .Writer ,_fc string ,_gg string ,_ae ...interface{}){_ege (_aa ,_fc ,_gg ,_ae ...);};
// WriterLogger is the logger that writes data to the Output writer
type WriterLogger struct{LogLevel LogLevel ;Output _b .Writer ;};
// Error logs error message.
func (_gbd WriterLogger )Error (format string ,args ...interface{}){if _gbd .LogLevel >=LogLevelError {_eb :="\u005b\u0045\u0052\u0052\u004f\u0052\u005d\u0020";_gbd .logToWriter (_gbd .Output ,_eb ,format ,args ...);};};
// Debug does nothing for dummy logger.
func (DummyLogger )Debug (format string ,args ...interface{}){};
// Trace logs trace message.
func (_ace WriterLogger )Trace (format string ,args ...interface{}){if _ace .LogLevel >=LogLevelTrace {_dc :="\u005b\u0054\u0052\u0041\u0043\u0045\u005d\u0020";_ace .logToWriter (_ace .Output ,_dc ,format ,args ...);};};
// NewConsoleLogger creates new console logger.
func NewConsoleLogger (logLevel LogLevel )*ConsoleLogger {return &ConsoleLogger {LogLevel :logLevel }};var Log Logger =DummyLogger {};
// Notice does nothing for dummy logger.
func (DummyLogger )Notice (format string ,args ...interface{}){};
// Info logs info message.
func (_ecf WriterLogger )Info (format string ,args ...interface{}){if _ecf .LogLevel >=LogLevelInfo {_cf :="\u005bI\u004e\u0046\u004f\u005d\u0020";_ecf .logToWriter (_ecf .Output ,_cf ,format ,args ...);};};
// SetLogger sets 'logger' to be used by the unidoc unipdf library.
func SetLogger (logger Logger ){Log =logger };
// Warning logs warning message.
func (_bg ConsoleLogger )Warning (format string ,args ...interface{}){if _bg .LogLevel >=LogLevelWarning {_ec :="\u005b\u0057\u0041\u0052\u004e\u0049\u004e\u0047\u005d\u0020";_bg .output (_af .Stdout ,_ec ,format ,args ...);};};

View File

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

View File

@ -11,38 +11,38 @@
// Package memstore implements tempStorage interface
// by using memory as a storage
package memstore ;import (_f "encoding/hex";_cd "errors";_cg "fmt";_gb "github.com/unidoc/unioffice/common/tempstorage";_b "io";_e "io/ioutil";_c "math/rand";_ga "sync";);
// Open returns tempstorage File object by name
func (_aee *memStorage )Open (path string )(_gb .File ,error ){_cdg ,_gbd :=_aee ._ea .Load (path );if !_gbd {return nil ,_cd .New (_cg .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 {_cf :_cdg .(*memDataCell )},nil ;};
// TempDir creates a name for a new temp directory using a pattern argument
func (_aec *memStorage )TempDir (pattern string )(string ,error ){return _afa (pattern ),nil };
// TempFile creates a new empty file in the storage and returns it
func (_ad *memStorage )TempFile (dir ,pattern string )(_gb .File ,error ){_ba :=dir +"\u002f"+_afa (pattern );_cgb :=&memDataCell {_d :_ba ,_de :[]byte {}};_bfb :=&memFile {_cf :_cgb };_ad ._ea .Store (_ba ,_cgb );return _bfb ,nil ;};type memStorage struct{_ea _ga .Map };func _aa (_bb int )(string ,error ){_eee :=make ([]byte ,_bb );if _ ,_df :=_c .Read (_eee );_df !=nil {return "",_df ;};return _f .EncodeToString (_eee ),nil ;};
// Read reads from the underlying memDataCell in order to implement Reader interface
func (_cde *memFile )Read (p []byte )(int ,error ){_cfg :=_cde ._ge ;_ef :=_cde ._cf ._bf ;_ca :=int64 (len (p ));if _ca > _ef {_ca =_ef ;p =p [:_ca ];};if _cfg >=_ef {return 0,_b .EOF ;};_cae :=_cfg +_ca ;if _cae >=_ef {_cae =_ef ;};_a :=copy (p ,_cde ._cf ._de [_cfg :_cae ]);_cde ._ge =_cae ;return _a ,nil ;};
// Add reads a file from a disk and adds it to the storage
func (_cga *memStorage )Add (path string )error {_ ,_af :=_cga ._ea .Load (path );if _af {return nil ;};_ee ,_ebg :=_e .ReadFile (path );if _ebg !=nil {return _ebg ;};_cga ._ea .Store (path ,&memDataCell {_d :path ,_de :_ee ,_bf :int64 (len (_ee ))});return nil ;};
// SetAsStorage sets temp storage as a memory storage
func SetAsStorage (){_ce :=memStorage {_ea :_ga .Map {}};_gb .SetAsStorage (&_ce )};type memDataCell struct{_d string ;_de []byte ;_bf int64 ;};
package memstore ;import (_ga "encoding/hex";_dg "errors";_eb "fmt";_c "github.com/unidoc/unioffice/common/tempstorage";_e "io";_d "io/ioutil";_ec "math/rand";_g "sync";);
// ReadAt reads from the underlying memDataCell at an offset provided in order to implement ReaderAt interface.
// It does not affect f.readOffset.
func (_fc *memFile )ReadAt (p []byte ,readOffset int64 )(int ,error ){_cb :=_fc ._cf ._bf ;_eb :=int64 (len (p ));if _eb > _cb {_eb =_cb ;p =p [:_eb ];};if readOffset >=_cb {return 0,_b .EOF ;};_gc :=readOffset +_eb ;if _gc >=_cb {_gc =_cb ;};_gcf :=copy (p ,_fc ._cf ._de [readOffset :_gc ]);return _gcf ,nil ;};
func (_a *memFile )ReadAt (p []byte ,readOffset int64 )(int ,error ){_ag :=_a ._cb ._fab ;_db :=int64 (len (p ));if _db > _ag {_db =_ag ;p =p [:_db ];};if readOffset >=_ag {return 0,_e .EOF ;};_fa :=readOffset +_db ;if _fa >=_ag {_fa =_ag ;};_ff :=copy (p ,_a ._cb ._gg [readOffset :_fa ]);return _ff ,nil ;};type memFile struct{_cb *memDataCell ;_b int64 ;};
// RemoveAll removes all files according to the dir argument prefix
func (_eg *memStorage )RemoveAll (dir string )error {_eg ._ea .Range (func (_efb ,_bfba interface{})bool {_eg ._ea .Delete (_efb );return true });return nil ;};type memFile struct{_cf *memDataCell ;_ge int64 ;};
// Write writes to the end of the underlying memDataCell in order to implement Writer interface
func (_cag *memFile )Write (p []byte )(int ,error ){_cag ._cf ._de =append (_cag ._cf ._de ,p ...);_cag ._cf ._bf +=int64 (len (p ));return len (p ),nil ;};func _afa (_dg string )string {_aecf ,_ :=_aa (6);return _dg +_aecf };
// Name returns the filename of the underlying memDataCell
func (_ae *memFile )Name ()string {return _ae ._cf ._d };
// Open returns tempstorage File object by name
func (_ebg *memStorage )Open (path string )(_c .File ,error ){_gc ,_ae :=_ebg ._fb .Load (path );if !_ae {return nil ,_dg .New (_eb .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 {_cb :_gc .(*memDataCell )},nil ;};
// Close is not applicable in this implementation
func (_gea *memFile )Close ()error {return nil };
func (_da *memFile )Close ()error {return nil };type memDataCell struct{_ddf string ;_gg []byte ;_fab int64 ;};func _cga (_ddad int )(string ,error ){_gaa :=make ([]byte ,_ddad );if _ ,_bce :=_ec .Read (_gaa );_bce !=nil {return "",_bce ;};return _ga .EncodeToString (_gaa ),nil ;};
// RemoveAll removes all files according to the dir argument prefix
func (_fc *memStorage )RemoveAll (dir string )error {_fc ._fb .Range (func (_cd ,_gd interface{})bool {_fc ._fb .Delete (_cd );return true });return nil ;};
// TempDir creates a name for a new temp directory using a pattern argument
func (_bd *memStorage )TempDir (pattern string )(string ,error ){return _cg (pattern ),nil };
// TempFile creates a new empty file in the storage and returns it
func (_aeb *memStorage )TempFile (dir ,pattern string )(_c .File ,error ){_dda :=dir +"\u002f"+_cg (pattern );_aad :=&memDataCell {_ddf :_dda ,_gg :[]byte {}};_bb :=&memFile {_cb :_aad };_aeb ._fb .Store (_dda ,_aad );return _bb ,nil ;};func _cg (_fcd string )string {_ab ,_ :=_cga (6);return _fcd +_ab };
// Name returns the filename of the underlying memDataCell
func (_fg *memFile )Name ()string {return _fg ._cb ._ddf };
// Add reads a file from a disk and adds it to the storage
func (_af *memStorage )Add (path string )error {_ ,_bef :=_af ._fb .Load (path );if _bef {return nil ;};_ge ,_ad :=_d .ReadFile (path );if _ad !=nil {return _ad ;};_af ._fb .Store (path ,&memDataCell {_ddf :path ,_gg :_ge ,_fab :int64 (len (_ge ))});return nil ;};type memStorage struct{_fb _g .Map };
// Read reads from the underlying memDataCell in order to implement Reader interface
func (_fd *memFile )Read (p []byte )(int ,error ){_bc :=_fd ._b ;_be :=_fd ._cb ._fab ;_bg :=int64 (len (p ));if _bg > _be {_bg =_be ;p =p [:_bg ];};if _bc >=_be {return 0,_e .EOF ;};_ecd :=_bc +_bg ;if _ecd >=_be {_ecd =_be ;};_dd :=copy (p ,_fd ._cb ._gg [_bc :_ecd ]);_fd ._b =_ecd ;return _dd ,nil ;};
// Write writes to the end of the underlying memDataCell in order to implement Writer interface
func (_aa *memFile )Write (p []byte )(int ,error ){_aa ._cb ._gg =append (_aa ._cb ._gg ,p ...);_aa ._cb ._fab +=int64 (len (p ));return len (p ),nil ;};
// SetAsStorage sets temp storage as a memory storage
func SetAsStorage (){_ac :=memStorage {_fb :_g .Map {}};_c .SetAsStorage (&_ac )};

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

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -9,119 +9,119 @@
// Use of this source code is governed by the UniDoc End User License Agreement
// terms that can be accessed at https://unidoc.io/eula/
package drawing ;import (_d "github.com/unidoc/unioffice";_e "github.com/unidoc/unioffice/color";_fb "github.com/unidoc/unioffice/measurement";_g "github.com/unidoc/unioffice/schema/soo/dml";);func (_bfg ShapeProperties )clearFill (){_bfg ._cfc .NoFill =nil ;_bfg ._cfc .BlipFill =nil ;_bfg ._cfc .GradFill =nil ;_bfg ._cfc .GrpFill =nil ;_bfg ._cfc .SolidFill =nil ;_bfg ._cfc .PattFill =nil ;};
// SetLevel sets the level of indentation of a paragraph.
func (_gd ParagraphProperties )SetLevel (idx int32 ){_gd ._ff .LvlAttr =_d .Int32 (idx )};
// SetAlign controls the paragraph alignment
func (_cfd ParagraphProperties )SetAlign (a _g .ST_TextAlignType ){_cfd ._ff .AlgnAttr =a };
// Run is a run within a paragraph.
type Run struct{_ga *_g .EG_TextRun };
// X returns the inner wrapped XML type.
func (_c LineProperties )X ()*_g .CT_LineProperties {return _c ._b };
// GetPosition gets the position of the shape in EMU.
func (_fce ShapeProperties )GetPosition ()(int64 ,int64 ){_fce .ensureXfrm ();if _fce ._cfc .Xfrm .Off ==nil {_fce ._cfc .Xfrm .Off =_g .NewCT_Point2D ();};return *_fce ._cfc .Xfrm .Off .XAttr .ST_CoordinateUnqualified ,*_fce ._cfc .Xfrm .Off .YAttr .ST_CoordinateUnqualified ;};
// SetGeometry sets the shape type of the shape
func (_cec ShapeProperties )SetGeometry (g _g .ST_ShapeType ){if _cec ._cfc .PrstGeom ==nil {_cec ._cfc .PrstGeom =_g .NewCT_PresetGeometry2D ();};_cec ._cfc .PrstGeom .PrstAttr =g ;};func (_ae ShapeProperties )ensureXfrm (){if _ae ._cfc .Xfrm ==nil {_ae ._cfc .Xfrm =_g .NewCT_Transform2D ();};};
// X returns the inner wrapped XML type.
func (_cf ParagraphProperties )X ()*_g .CT_TextParagraphProperties {return _cf ._ff };
// SetText sets the run's text contents.
func (_fc Run )SetText (s string ){_fc ._ga .Br =nil ;_fc ._ga .Fld =nil ;if _fc ._ga .R ==nil {_fc ._ga .R =_g .NewCT_RegularTextRun ();};_fc ._ga .R .T =s ;};
// X returns the inner wrapped XML type.
func (_aa Paragraph )X ()*_g .CT_TextParagraph {return _aa ._fe };
// SetFlipVertical controls if the shape is flipped vertically.
func (_bg ShapeProperties )SetFlipVertical (b bool ){_bg .ensureXfrm ();if !b {_bg ._cfc .Xfrm .FlipVAttr =nil ;}else {_bg ._cfc .Xfrm .FlipVAttr =_d .Bool (true );};};func (_fg LineProperties )SetSolidFill (c _e .Color ){_fg .clearFill ();_fg ._b .SolidFill =_g .NewCT_SolidColorFillProperties ();_fg ._b .SolidFill .SrgbClr =_g .NewCT_SRgbColor ();_fg ._b .SolidFill .SrgbClr .ValAttr =*c .AsRGBString ();};
// SetNumbered controls if bullets are numbered or not.
func (_dc ParagraphProperties )SetNumbered (scheme _g .ST_TextAutonumberScheme ){if scheme ==_g .ST_TextAutonumberSchemeUnset {_dc ._ff .BuAutoNum =nil ;}else {_dc ._ff .BuAutoNum =_g .NewCT_TextAutonumberBullet ();_dc ._ff .BuAutoNum .TypeAttr =scheme ;};};
// X returns the inner wrapped XML type.
func (_dec ShapeProperties )X ()*_g .CT_ShapeProperties {return _dec ._cfc };
// SetBold controls the bolding of a run.
func (_ecd RunProperties )SetBold (b bool ){_ecd ._fff .BAttr =_d .Bool (b )};
// MakeRunProperties constructs a new RunProperties wrapper.
func MakeRunProperties (x *_g .CT_TextCharacterProperties )RunProperties {return RunProperties {x }};func (_ce ShapeProperties )LineProperties ()LineProperties {if _ce ._cfc .Ln ==nil {_ce ._cfc .Ln =_g .NewCT_LineProperties ();};return LineProperties {_ce ._cfc .Ln };};
// MakeParagraphProperties constructs a new ParagraphProperties wrapper.
func MakeParagraphProperties (x *_g .CT_TextParagraphProperties )ParagraphProperties {return ParagraphProperties {x };};
// RunProperties controls the run properties.
type RunProperties struct{_fff *_g .CT_TextCharacterProperties ;};
// SetSize sets the font size of the run text
func (_aag RunProperties )SetSize (sz _fb .Distance ){_aag ._fff .SzAttr =_d .Int32 (int32 (sz /_fb .HundredthPoint ));};
// SetFlipHorizontal controls if the shape is flipped horizontally.
func (_db ShapeProperties )SetFlipHorizontal (b bool ){_db .ensureXfrm ();if !b {_db ._cfc .Xfrm .FlipHAttr =nil ;}else {_db ._cfc .Xfrm .FlipHAttr =_d .Bool (true );};};
// SetSize sets the width and height of the shape.
func (_fac ShapeProperties )SetSize (w ,h _fb .Distance ){_fac .SetWidth (w );_fac .SetHeight (h )};
// SetFont controls the font of a run.
func (_fa RunProperties )SetFont (s string ){_fa ._fff .Latin =_g .NewCT_TextFont ();_fa ._fff .Latin .TypefaceAttr =s ;};
// SetBulletChar sets the bullet character for the paragraph.
func (_ab ParagraphProperties )SetBulletChar (c string ){if c ==""{_ab ._ff .BuChar =nil ;}else {_ab ._ff .BuChar =_g .NewCT_TextCharBullet ();_ab ._ff .BuChar .CharAttr =c ;};};
package drawing ;import (_e "github.com/unidoc/unioffice";_b "github.com/unidoc/unioffice/color";_ec "github.com/unidoc/unioffice/measurement";_ef "github.com/unidoc/unioffice/schema/soo/dml";);func (_d LineProperties )SetSolidFill (c _b .Color ){_d .clearFill ();_d ._f .SolidFill =_ef .NewCT_SolidColorFillProperties ();_d ._f .SolidFill .SrgbClr =_ef .NewCT_SRgbColor ();_d ._f .SolidFill .SrgbClr .ValAttr =*c .AsRGBString ();};
// SetJoin sets the line join style.
func (_bf LineProperties )SetJoin (e LineJoin ){_bf ._b .Round =nil ;_bf ._b .Miter =nil ;_bf ._b .Bevel =nil ;switch e {case LineJoinRound :_bf ._b .Round =_g .NewCT_LineJoinRound ();case LineJoinBevel :_bf ._b .Bevel =_g .NewCT_LineJoinBevel ();case LineJoinMiter :_bf ._b .Miter =_g .NewCT_LineJoinMiterProperties ();};};
func (_ea LineProperties )SetJoin (e LineJoin ){_ea ._f .Round =nil ;_ea ._f .Miter =nil ;_ea ._f .Bevel =nil ;switch e {case LineJoinRound :_ea ._f .Round =_ef .NewCT_LineJoinRound ();case LineJoinBevel :_ea ._f .Bevel =_ef .NewCT_LineJoinBevel ();case LineJoinMiter :_ea ._f .Miter =_ef .NewCT_LineJoinMiterProperties ();};};
// SetPosition sets the position of the shape.
func (_bc ShapeProperties )SetPosition (x ,y _fb .Distance ){_bc .ensureXfrm ();if _bc ._cfc .Xfrm .Off ==nil {_bc ._cfc .Xfrm .Off =_g .NewCT_Point2D ();};_bc ._cfc .Xfrm .Off .XAttr .ST_CoordinateUnqualified =_d .Int64 (int64 (x /_fb .EMU ));_bc ._cfc .Xfrm .Off .YAttr .ST_CoordinateUnqualified =_d .Int64 (int64 (y /_fb .EMU ));};
// X returns the inner wrapped XML type.
func (_ag Run )X ()*_g .EG_TextRun {return _ag ._ga };
// SetWidth sets the width of the shape.
func (_ge ShapeProperties )SetWidth (w _fb .Distance ){_ge .ensureXfrm ();if _ge ._cfc .Xfrm .Ext ==nil {_ge ._cfc .Xfrm .Ext =_g .NewCT_PositiveSize2D ();};_ge ._cfc .Xfrm .Ext .CxAttr =int64 (w /_fb .EMU );};
// ParagraphProperties allows controlling paragraph properties.
type ParagraphProperties struct{_ff *_g .CT_TextParagraphProperties ;};
// SetHeight sets the height of the shape.
func (_bde ShapeProperties )SetHeight (h _fb .Distance ){_bde .ensureXfrm ();if _bde ._cfc .Xfrm .Ext ==nil {_bde ._cfc .Xfrm .Ext =_g .NewCT_PositiveSize2D ();};_bde ._cfc .Xfrm .Ext .CyAttr =int64 (h /_fb .EMU );};func (_a LineProperties )clearFill (){_a ._b .NoFill =nil ;_a ._b .GradFill =nil ;_a ._b .SolidFill =nil ;_a ._b .PattFill =nil ;};type ShapeProperties struct{_cfc *_g .CT_ShapeProperties };
// AddRun adds a new run to a paragraph.
func (_bd Paragraph )AddRun ()Run {_ec :=MakeRun (_g .NewEG_TextRun ());_bd ._fe .EG_TextRun =append (_bd ._fe .EG_TextRun ,_ec .X ());return _ec ;};
// SetText sets the run's text contents.
func (_ac Run )SetText (s string ){_ac ._eg .Br =nil ;_ac ._eg .Fld =nil ;if _ac ._eg .R ==nil {_ac ._eg .R =_ef .NewCT_RegularTextRun ();};_ac ._eg .R .T =s ;};
// MakeParagraph constructs a new paragraph wrapper.
func MakeParagraph (x *_g .CT_TextParagraph )Paragraph {return Paragraph {x }};
func MakeParagraph (x *_ef .CT_TextParagraph )Paragraph {return Paragraph {x }};func (_baa LineProperties )SetNoFill (){_baa .clearFill ();_baa ._f .NoFill =_ef .NewCT_NoFillProperties ();};
// Properties returns the paragraph properties.
func (_ca Paragraph )Properties ()ParagraphProperties {if _ca ._a .PPr ==nil {_ca ._a .PPr =_ef .NewCT_TextParagraphProperties ();};return MakeParagraphProperties (_ca ._a .PPr );};func (_ga ShapeProperties )SetNoFill (){_ga .clearFill ();_ga ._be .NoFill =_ef .NewCT_NoFillProperties ();};
// AddRun adds a new run to a paragraph.
func (_fd Paragraph )AddRun ()Run {_gb :=MakeRun (_ef .NewEG_TextRun ());_fd ._a .EG_TextRun =append (_fd ._a .EG_TextRun ,_gb .X ());return _gb ;};
// MakeRun constructs a new Run wrapper.
func MakeRun (x *_ef .EG_TextRun )Run {return Run {x }};
// SetWidth sets the width of the shape.
func (_beg ShapeProperties )SetWidth (w _ec .Distance ){_beg .ensureXfrm ();if _beg ._be .Xfrm .Ext ==nil {_beg ._be .Xfrm .Ext =_ef .NewCT_PositiveSize2D ();};_beg ._be .Xfrm .Ext .CxAttr =int64 (w /_ec .EMU );};
// SetLevel sets the level of indentation of a paragraph.
func (_ae ParagraphProperties )SetLevel (idx int32 ){_ae ._ed .LvlAttr =_e .Int32 (idx )};
// SetFont controls the font of a run.
func (_bgb RunProperties )SetFont (s string ){_bgb ._af .Latin =_ef .NewCT_TextFont ();_bgb ._af .Latin .TypefaceAttr =s ;};
// X returns the inner wrapped XML type.
func (_aa Paragraph )X ()*_ef .CT_TextParagraph {return _aa ._a };
// SetBold controls the bolding of a run.
func (_ee RunProperties )SetBold (b bool ){_ee ._af .BAttr =_e .Bool (b )};
// SetAlign controls the paragraph alignment
func (_cf ParagraphProperties )SetAlign (a _ef .ST_TextAlignType ){_cf ._ed .AlgnAttr =a };
// SetWidth sets the line width, MS products treat zero as the minimum width
// that can be displayed.
func (_de LineProperties )SetWidth (w _fb .Distance ){_de ._b .WAttr =_d .Int32 (int32 (w /_fb .EMU ))};
func (_ba LineProperties )SetWidth (w _ec .Distance ){_ba ._f .WAttr =_e .Int32 (int32 (w /_ec .EMU ))};
// MakeParagraphProperties constructs a new ParagraphProperties wrapper.
func MakeParagraphProperties (x *_ef .CT_TextParagraphProperties )ParagraphProperties {return ParagraphProperties {x };};func (_bf ShapeProperties )LineProperties ()LineProperties {if _bf ._be .Ln ==nil {_bf ._be .Ln =_ef .NewCT_LineProperties ();};return LineProperties {_bf ._be .Ln };};
// GetPosition gets the position of the shape in EMU.
func (_dd ShapeProperties )GetPosition ()(int64 ,int64 ){_dd .ensureXfrm ();if _dd ._be .Xfrm .Off ==nil {_dd ._be .Xfrm .Off =_ef .NewCT_Point2D ();};return *_dd ._be .Xfrm .Off .XAttr .ST_CoordinateUnqualified ,*_dd ._be .Xfrm .Off .YAttr .ST_CoordinateUnqualified ;};
// SetFlipVertical controls if the shape is flipped vertically.
func (_dg ShapeProperties )SetFlipVertical (b bool ){_dg .ensureXfrm ();if !b {_dg ._be .Xfrm .FlipVAttr =nil ;}else {_dg ._be .Xfrm .FlipVAttr =_e .Bool (true );};};type ShapeProperties struct{_be *_ef .CT_ShapeProperties };
// X returns the inner wrapped XML type.
func (_db ParagraphProperties )X ()*_ef .CT_TextParagraphProperties {return _db ._ed };
// SetBulletChar sets the bullet character for the paragraph.
func (_gf ParagraphProperties )SetBulletChar (c string ){if c ==""{_gf ._ed .BuChar =nil ;}else {_gf ._ed .BuChar =_ef .NewCT_TextCharBullet ();_gf ._ed .BuChar .CharAttr =c ;};};
// SetPosition sets the position of the shape.
func (_fgg ShapeProperties )SetPosition (x ,y _ec .Distance ){_fgg .ensureXfrm ();if _fgg ._be .Xfrm .Off ==nil {_fgg ._be .Xfrm .Off =_ef .NewCT_Point2D ();};_fgg ._be .Xfrm .Off .XAttr .ST_CoordinateUnqualified =_e .Int64 (int64 (x /_ec .EMU ));_fgg ._be .Xfrm .Off .YAttr .ST_CoordinateUnqualified =_e .Int64 (int64 (y /_ec .EMU ));};
// Run is a run within a paragraph.
type Run struct{_eg *_ef .EG_TextRun };func (_dbd ShapeProperties )clearFill (){_dbd ._be .NoFill =nil ;_dbd ._be .BlipFill =nil ;_dbd ._be .GradFill =nil ;_dbd ._be .GrpFill =nil ;_dbd ._be .SolidFill =nil ;_dbd ._be .PattFill =nil ;};
// SetSize sets the font size of the run text
func (_dbb RunProperties )SetSize (sz _ec .Distance ){_dbb ._af .SzAttr =_e .Int32 (int32 (sz /_ec .HundredthPoint ));};
// SetHeight sets the height of the shape.
func (_bab ShapeProperties )SetHeight (h _ec .Distance ){_bab .ensureXfrm ();if _bab ._be .Xfrm .Ext ==nil {_bab ._be .Xfrm .Ext =_ef .NewCT_PositiveSize2D ();};_bab ._be .Xfrm .Ext .CyAttr =int64 (h /_ec .EMU );};func MakeShapeProperties (x *_ef .CT_ShapeProperties )ShapeProperties {return ShapeProperties {x }};
// Properties returns the run's properties.
func (_gc Run )Properties ()RunProperties {if _gc ._eg .R ==nil {_gc ._eg .R =_ef .NewCT_RegularTextRun ();};if _gc ._eg .R .RPr ==nil {_gc ._eg .R .RPr =_ef .NewCT_TextCharacterProperties ();};return RunProperties {_gc ._eg .R .RPr };};func (_edg ShapeProperties )ensureXfrm (){if _edg ._be .Xfrm ==nil {_edg ._be .Xfrm =_ef .NewCT_Transform2D ();};};
// SetBulletFont controls the font for the bullet character.
func (_cc ParagraphProperties )SetBulletFont (f string ){if f ==""{_cc ._ed .BuFont =nil ;}else {_cc ._ed .BuFont =_ef .NewCT_TextFont ();_cc ._ed .BuFont .TypefaceAttr =f ;};};
// SetSize sets the width and height of the shape.
func (_fad ShapeProperties )SetSize (w ,h _ec .Distance ){_fad .SetWidth (w );_fad .SetHeight (h )};func (_cg ShapeProperties )SetSolidFill (c _b .Color ){_cg .clearFill ();_cg ._be .SolidFill =_ef .NewCT_SolidColorFillProperties ();_cg ._be .SolidFill .SrgbClr =_ef .NewCT_SRgbColor ();_cg ._be .SolidFill .SrgbClr .ValAttr =*c .AsRGBString ();};
// X returns the inner wrapped XML type.
func (_fg LineProperties )X ()*_ef .CT_LineProperties {return _fg ._f };
// SetGeometry sets the shape type of the shape
func (_cb ShapeProperties )SetGeometry (g _ef .ST_ShapeType ){if _cb ._be .PrstGeom ==nil {_cb ._be .PrstGeom =_ef .NewCT_PresetGeometry2D ();};_cb ._be .PrstGeom .PrstAttr =g ;};
// RunProperties controls the run properties.
type RunProperties struct{_af *_ef .CT_TextCharacterProperties ;};
// AddBreak adds a new line break to a paragraph.
func (_df Paragraph )AddBreak (){_gf :=_g .NewEG_TextRun ();_gf .Br =_g .NewCT_TextLineBreak ();_df ._fe .EG_TextRun =append (_df ._fe .EG_TextRun ,_gf );};func (_ca LineProperties )SetNoFill (){_ca .clearFill ();_ca ._b .NoFill =_g .NewCT_NoFillProperties ()};type LineProperties struct{_b *_g .CT_LineProperties };
func (_fc Paragraph )AddBreak (){_fa :=_ef .NewEG_TextRun ();_fa .Br =_ef .NewCT_TextLineBreak ();_fc ._a .EG_TextRun =append (_fc ._a .EG_TextRun ,_fa );};
// SetFlipHorizontal controls if the shape is flipped horizontally.
func (_aec ShapeProperties )SetFlipHorizontal (b bool ){_aec .ensureXfrm ();if !b {_aec ._be .Xfrm .FlipHAttr =nil ;}else {_aec ._be .Xfrm .FlipHAttr =_e .Bool (true );};};type LineProperties struct{_f *_ef .CT_LineProperties };
// SetNumbered controls if bullets are numbered or not.
func (_ce ParagraphProperties )SetNumbered (scheme _ef .ST_TextAutonumberScheme ){if scheme ==_ef .ST_TextAutonumberSchemeUnset {_ce ._ed .BuAutoNum =nil ;}else {_ce ._ed .BuAutoNum =_ef .NewCT_TextAutonumberBullet ();_ce ._ed .BuAutoNum .TypeAttr =scheme ;};};
// X returns the inner wrapped XML type.
func (_ab ShapeProperties )X ()*_ef .CT_ShapeProperties {return _ab ._be };
// Paragraph is a paragraph within a document.
type Paragraph struct{_fe *_g .CT_TextParagraph };func (_fea ShapeProperties )SetSolidFill (c _e .Color ){_fea .clearFill ();_fea ._cfc .SolidFill =_g .NewCT_SolidColorFillProperties ();_fea ._cfc .SolidFill .SrgbClr =_g .NewCT_SRgbColor ();_fea ._cfc .SolidFill .SrgbClr .ValAttr =*c .AsRGBString ();};func MakeShapeProperties (x *_g .CT_ShapeProperties )ShapeProperties {return ShapeProperties {x }};func (_bb ShapeProperties )SetNoFill (){_bb .clearFill ();_bb ._cfc .NoFill =_g .NewCT_NoFillProperties ();};
// MakeRun constructs a new Run wrapper.
func MakeRun (x *_g .EG_TextRun )Run {return Run {x }};
type Paragraph struct{_a *_ef .CT_TextParagraph };func (_g LineProperties )clearFill (){_g ._f .NoFill =nil ;_g ._f .GradFill =nil ;_g ._f .SolidFill =nil ;_g ._f .PattFill =nil ;};const (LineJoinRound LineJoin =iota ;LineJoinBevel ;LineJoinMiter ;);
// SetSolidFill controls the text color of a run.
func (_gg RunProperties )SetSolidFill (c _e .Color ){_gg ._fff .NoFill =nil ;_gg ._fff .BlipFill =nil ;_gg ._fff .GradFill =nil ;_gg ._fff .GrpFill =nil ;_gg ._fff .PattFill =nil ;_gg ._fff .SolidFill =_g .NewCT_SolidColorFillProperties ();_gg ._fff .SolidFill .SrgbClr =_g .NewCT_SRgbColor ();_gg ._fff .SolidFill .SrgbClr .ValAttr =*c .AsRGBString ();};
func (_bg RunProperties )SetSolidFill (c _b .Color ){_bg ._af .NoFill =nil ;_bg ._af .BlipFill =nil ;_bg ._af .GradFill =nil ;_bg ._af .GrpFill =nil ;_bg ._af .PattFill =nil ;_bg ._af .SolidFill =_ef .NewCT_SolidColorFillProperties ();_bg ._af .SolidFill .SrgbClr =_ef .NewCT_SRgbColor ();_bg ._af .SolidFill .SrgbClr .ValAttr =*c .AsRGBString ();};
// LineJoin is the type of line join
type LineJoin byte ;
// Properties returns the paragraph properties.
func (_gc Paragraph )Properties ()ParagraphProperties {if _gc ._fe .PPr ==nil {_gc ._fe .PPr =_g .NewCT_TextParagraphProperties ();};return MakeParagraphProperties (_gc ._fe .PPr );};
// MakeRunProperties constructs a new RunProperties wrapper.
func MakeRunProperties (x *_ef .CT_TextCharacterProperties )RunProperties {return RunProperties {x }};
// SetBulletFont controls the font for the bullet character.
func (_ba ParagraphProperties )SetBulletFont (f string ){if f ==""{_ba ._ff .BuFont =nil ;}else {_ba ._ff .BuFont =_g .NewCT_TextFont ();_ba ._ff .BuFont .TypefaceAttr =f ;};};
// X returns the inner wrapped XML type.
func (_eb Run )X ()*_ef .EG_TextRun {return _eb ._eg };
// Properties returns the run's properties.
func (_cb Run )Properties ()RunProperties {if _cb ._ga .R ==nil {_cb ._ga .R =_g .NewCT_RegularTextRun ();};if _cb ._ga .R .RPr ==nil {_cb ._ga .R .RPr =_g .NewCT_TextCharacterProperties ();};return RunProperties {_cb ._ga .R .RPr };};const (LineJoinRound LineJoin =iota ;LineJoinBevel ;LineJoinMiter ;);
// ParagraphProperties allows controlling paragraph properties.
type ParagraphProperties struct{_ed *_ef .CT_TextParagraphProperties ;};

8
go.mod
View File

@ -5,14 +5,14 @@ go 1.13
require (
github.com/adrg/strutil v0.3.0 // indirect
github.com/adrg/sysfont v0.1.2 // indirect
github.com/adrg/xdg v0.4.0 // indirect
github.com/adrg/xdg v0.3.4 // indirect
github.com/richardlehane/msoleps v1.0.1
github.com/sirupsen/logrus v1.9.0 // indirect
github.com/stretchr/testify v1.8.0
github.com/unidoc/unipdf/v3 v3.37.0
github.com/unidoc/unitype v0.3.0
golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa // indirect
github.com/unidoc/unitype v0.4.0
golang.org/x/image v0.0.0-20220722155232-062f8c9fd539 // indirect
golang.org/x/sys v0.0.0-20220803195053-6e608f9ce704 // indirect
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab // indirect
golang.org/x/text v0.4.0 // indirect
golang.org/x/xerrors v0.0.0-20220609144429-65e65417b02f // indirect
)

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{_a :=make ([]float64 ,len (array ));copy (_a ,array );return _a ;};_ae :=len (array )/2;_bc :=MergeSort (array [:_ae ]);_c :=MergeSort (array [_ae :]);_g :=make ([]float64 ,len (array ));_be :=0;_ca :=0;_bf :=0;for _ca < len (_bc )&&_bf < len (_c ){if _bc [_ca ]<=_c [_bf ]{_g [_be ]=_bc [_ca ];_ca ++;}else {_g [_be ]=_c [_bf ];_bf ++;};_be ++;};for _ca < len (_bc ){_g [_be ]=_bc [_ca ];_ca ++;_be ++;};for _bf < len (_c ){_g [_be ]=_c [_bf ];_bf ++;_be ++;};return _g ;};
package mergesort ;func MergeSort (array []float64 )[]float64 {if len (array )<=1{_f :=make ([]float64 ,len (array ));copy (_f ,array );return _f ;};_a :=len (array )/2;_d :=MergeSort (array [:_a ]);_ga :=MergeSort (array [_a :]);_dc :=make ([]float64 ,len (array ));_db :=0;_fe :=0;_ag :=0;for _fe < len (_d )&&_ag < len (_ga ){if _d [_fe ]<=_ga [_ag ]{_dc [_db ]=_d [_fe ];_fe ++;}else {_dc [_db ]=_ga [_ag ];_ag ++;};_db ++;};for _fe < len (_d ){_dc [_db ]=_d [_fe ];_fe ++;_db ++;};for _ag < len (_ga ){_dc [_db ]=_ga [_ag ];_ag ++;_db ++;};return _dc ;};

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 wildcard ;func _gd (_gfff ,_cg []rune ,_ee int )int {for len (_cg )> 0{switch _cg [0]{default:if len (_gfff )==0{return -1;};if _gfff [0]!=_cg [0]{return _gd (_gfff [1:],_cg ,_ee +1);};case '?':if len (_gfff )==0{return -1;};case '*':if len (_gfff )==0{return -1;};_cd :=_gd (_gfff ,_cg [1:],_ee );if _cd !=-1{return _ee ;}else {_cd =_gd (_gfff [1:],_cg ,_ee );if _cd !=-1{return _ee ;}else {return -1;};};};_gfff =_gfff [1:];_cg =_cg [1:];};return _ee ;};func MatchSimple (pattern ,name string )bool {if pattern ==""{return name ==pattern ;};if pattern =="\u002a"{return true ;};_f :=make ([]rune ,0,len (name ));_fc :=make ([]rune ,0,len (pattern ));for _ ,_fe :=range name {_f =append (_f ,_fe );};for _ ,_c :=range pattern {_fc =append (_fc ,_c );};_d :=true ;return _e (_f ,_fc ,_d );};func Match (pattern ,name string )(_ba bool ){if pattern ==""{return name ==pattern ;};if pattern =="\u002a"{return true ;};_bd :=make ([]rune ,0,len (name ));_da :=make ([]rune ,0,len (pattern ));for _ ,_db :=range name {_bd =append (_bd ,_db );};for _ ,_fcf :=range pattern {_da =append (_da ,_fcf );};_bdg :=false ;return _e (_bd ,_da ,_bdg );};func _e (_ce ,_ceg []rune ,_fg bool )bool {for len (_ceg )> 0{switch _ceg [0]{default:if len (_ce )==0||_ce [0]!=_ceg [0]{return false ;};case '?':if len (_ce )==0&&!_fg {return false ;};case '*':return _e (_ce ,_ceg [1:],_fg )||(len (_ce )> 0&&_e (_ce [1:],_ceg ,_fg ));};_ce =_ce [1:];_ceg =_ceg [1:];};return len (_ce )==0&&len (_ceg )==0;};func Index (pattern ,name string )(_dba int ){if pattern ==""||pattern =="\u002a"{return 0;};_gb :=make ([]rune ,0,len (name ));_gf :=make ([]rune ,0,len (pattern ));for _ ,_fec :=range name {_gb =append (_gb ,_fec );};for _ ,_gff :=range pattern {_gf =append (_gf ,_gff );};return _gd (_gb ,_gf ,0);};
package wildcard ;func Index (pattern ,name string )(_eaa int ){if pattern ==""||pattern =="\u002a"{return 0;};_ag :=make ([]rune ,0,len (name ));_dfgg :=make ([]rune ,0,len (pattern ));for _ ,_ed :=range name {_ag =append (_ag ,_ed );};for _ ,_fc :=range pattern {_dfgg =append (_dfgg ,_fc );};return _agf (_ag ,_dfgg ,0);};func _ccd (_dfg ,_db []rune ,_bg bool )bool {for len (_db )> 0{switch _db [0]{default:if len (_dfg )==0||_dfg [0]!=_db [0]{return false ;};case '?':if len (_dfg )==0&&!_bg {return false ;};case '*':return _ccd (_dfg ,_db [1:],_bg )||(len (_dfg )> 0&&_ccd (_dfg [1:],_db ,_bg ));};_dfg =_dfg [1:];_db =_db [1:];};return len (_dfg )==0&&len (_db )==0;};func Match (pattern ,name string )(_cd bool ){if pattern ==""{return name ==pattern ;};if pattern =="\u002a"{return true ;};_cc :=make ([]rune ,0,len (name ));_ca :=make ([]rune ,0,len (pattern ));for _ ,_bf :=range name {_cc =append (_cc ,_bf );};for _ ,_ab :=range pattern {_ca =append (_ca ,_ab );};_be :=false ;return _ccd (_cc ,_ca ,_be );};func MatchSimple (pattern ,name string )bool {if pattern ==""{return name ==pattern ;};if pattern =="\u002a"{return true ;};_f :=make ([]rune ,0,len (name ));_e :=make ([]rune ,0,len (pattern ));for _ ,_bb :=range name {_f =append (_f ,_bb );};for _ ,_c :=range pattern {_e =append (_e ,_c );};_eg :=true ;return _ccd (_f ,_e ,_eg );};func _agf (_cdg ,_fe []rune ,_beab int )int {for len (_fe )> 0{switch _fe [0]{default:if len (_cdg )==0{return -1;};if _cdg [0]!=_fe [0]{return _agf (_cdg [1:],_fe ,_beab +1);};case '?':if len (_cdg )==0{return -1;};case '*':if len (_cdg )==0{return -1;};_fb :=_agf (_cdg ,_fe [1:],_beab );if _fb !=-1{return _beab ;}else {_fb =_agf (_cdg [1:],_fe ,_beab );if _fb !=-1{return _beab ;}else {return -1;};};};_cdg =_cdg [1:];_fe =_fe [1:];};return _beab ;};

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

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 (_af "encoding/xml";_b "fmt";_ba "github.com/unidoc/unioffice";_d "github.com/unidoc/unioffice/common/logger";);
// Validate validates the ElementContainer and its children
func (_bd *ElementContainer )Validate ()error {return _bd .ValidateWithPath ("\u0045\u006ce\u006d\u0065\u006et\u0043\u006f\u006e\u0074\u0061\u0069\u006e\u0065\u0072");};func (_ed *ElementsGroup )UnmarshalXML (d *_af .Decoder ,start _af .StartElement )error {_ff :for {_aba ,_fe :=d .Token ();if _fe !=nil {return _fe ;};switch _abd :=_aba .(type ){case _af .StartElement :switch _abd .Name {case _af .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"}:_bae :=NewElementsGroupChoice ();if _gb :=d .DecodeElement (&_bae .Any ,&_abd );_gb !=nil {return _gb ;};_ed .Choice =append (_ed .Choice ,_bae );default:_d .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",_abd .Name );if _cg :=d .Skip ();_cg !=nil {return _cg ;};};case _af .EndElement :break _ff ;case _af .CharData :};};return nil ;};
package elements ;import (_g "encoding/xml";_e "fmt";_bb "github.com/unidoc/unioffice";_bf "github.com/unidoc/unioffice/common/logger";);
// ValidateWithPath validates the ElementsGroup and its children, prefixing error messages with path
func (_ca *ElementsGroup )ValidateWithPath (path string )error {for _fcg ,_gc :=range _ca .Choice {if _ace :=_gc .ValidateWithPath (_b .Sprintf ("\u0025\u0073\u002f\u0043\u0068\u006f\u0069\u0063\u0065\u005b\u0025\u0064\u005d",path ,_fcg ));_ace !=nil {return _ace ;};};return nil ;};type Any struct{SimpleLiteral };
func (_bfa *ElementsGroup )ValidateWithPath (path string )error {for _dc ,_dda :=range _bfa .Choice {if _dde :=_dda .ValidateWithPath (_e .Sprintf ("\u0025\u0073\u002f\u0043\u0068\u006f\u0069\u0063\u0065\u005b\u0025\u0064\u005d",path ,_dc ));_dde !=nil {return _dde ;};};return nil ;};func (_bg *Any )UnmarshalXML (d *_g .Decoder ,start _g .StartElement )error {_bg .SimpleLiteral =*NewSimpleLiteral ();for {_ed ,_edc :=d .Token ();if _edc !=nil {return _e .Errorf ("\u0070a\u0072s\u0069\u006e\u0067\u0020\u0041\u006e\u0079\u003a\u0020\u0025\u0073",_edc );};if _d ,_c :=_ed .(_g .EndElement );_c &&_d .Name ==start .Name {break ;};};return nil ;};func (_dd *ElementContainer )UnmarshalXML (d *_g .Decoder ,start _g .StartElement )error {_bbg :for {_cc ,_bfb :=d .Token ();if _bfb !=nil {return _bfb ;};switch _ec :=_cc .(type ){case _g .StartElement :switch _ec .Name {case _g .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"}:_fda :=NewElementsGroupChoice ();if _ff :=d .DecodeElement (&_fda .Any ,&_ec );_ff !=nil {return _ff ;};_dd .Choice =append (_dd .Choice ,_fda );default:_bf .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",_ec .Name );if _cb :=d .Skip ();_cb !=nil {return _cb ;};};case _g .EndElement :break _bbg ;case _g .CharData :};};return nil ;};type ElementsGroupChoice struct{Any []*Any ;};
// ValidateWithPath validates the ElementsGroupChoice and its children, prefixing error messages with path
func (_afff *ElementsGroupChoice )ValidateWithPath (path string )error {for _feg ,_ccg :=range _afff .Any {if _bcc :=_ccg .ValidateWithPath (_b .Sprintf ("\u0025\u0073\u002f\u0041\u006e\u0079\u005b\u0025\u0064\u005d",path ,_feg ));_bcc !=nil {return _bcc ;};};return nil ;};func (_gg *ElementContainer )UnmarshalXML (d *_af .Decoder ,start _af .StartElement )error {_acab :for {_dd ,_fa :=d .Token ();if _fa !=nil {return _fa ;};switch _ggb :=_dd .(type ){case _af .StartElement :switch _ggb .Name {case _af .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"}:_da :=NewElementsGroupChoice ();if _ae :=d .DecodeElement (&_da .Any ,&_ggb );_ae !=nil {return _ae ;};_gg .Choice =append (_gg .Choice ,_da );default:_d .Log .Debug ("\u0073\u006b\u0069\u0070\u0070i\u006e\u0067\u0020\u0075\u006e\u0073\u0075\u0070\u0070\u006f\u0072\u0074\u0065d\u0020\u0065\u006c\u0065\u006d\u0065\u006e\u0074\u0020\u006f\u006e\u0020\u0045\u006c\u0065\u006d\u0065\u006e\u0074\u0043\u006f\u006e\u0074\u0061\u0069\u006e\u0065\u0072\u0020\u0025v",_ggb .Name );if _fc :=d .Skip ();_fc !=nil {return _fc ;};};case _af .EndElement :break _acab ;case _af .CharData :};};return nil ;};type ElementContainer struct{Choice []*ElementsGroupChoice ;};
// Validate validates the ElementsGroup and its children
func (_aac *ElementsGroup )Validate ()error {return _aac .ValidateWithPath ("\u0045\u006c\u0065\u006d\u0065\u006e\u0074\u0073\u0047\u0072\u006f\u0075\u0070");};func (_bf *ElementsGroup )MarshalXML (e *_af .Encoder ,start _af .StartElement )error {if _bf .Choice !=nil {for _ ,_ab :=range _bf .Choice {_ab .MarshalXML (e ,_af .StartElement {});};};return nil ;};func (_gd *SimpleLiteral )UnmarshalXML (d *_af .Decoder ,start _af .StartElement )error {for {_ag ,_db :=d .Token ();if _db !=nil {return _b .Errorf ("\u0070a\u0072\u0073\u0069\u006eg\u0020\u0053\u0069\u006d\u0070l\u0065L\u0069t\u0065\u0072\u0061\u006c\u003a\u0020\u0025s",_db );};if _gdc ,_eef :=_ag .(_af .EndElement );_eef &&_gdc .Name ==start .Name {break ;};};return nil ;};func NewElementContainer ()*ElementContainer {_cca :=&ElementContainer {};return _cca };type SimpleLiteral struct{};func NewElementsGroupChoice ()*ElementsGroupChoice {_eg :=&ElementsGroupChoice {};return _eg };
// ValidateWithPath validates the ElementContainer and its children, prefixing error messages with path
func (_ga *ElementContainer )ValidateWithPath (path string )error {for _fd ,_e :=range _ga .Choice {if _bdg :=_e .ValidateWithPath (_b .Sprintf ("\u0025\u0073\u002f\u0043\u0068\u006f\u0069\u0063\u0065\u005b\u0025\u0064\u005d",path ,_fd ));_bdg !=nil {return _bdg ;};};return nil ;};func NewElementsGroup ()*ElementsGroup {_ee :=&ElementsGroup {};return _ee };func (_g *ElementContainer )MarshalXML (e *_af .Encoder ,start _af .StartElement )error {start .Name .Local ="\u0065\u006ce\u006d\u0065\u006et\u0043\u006f\u006e\u0074\u0061\u0069\u006e\u0065\u0072";e .EncodeToken (start );if _g .Choice !=nil {for _ ,_ge :=range _g .Choice {_ge .MarshalXML (e ,_af .StartElement {});};};e .EncodeToken (_af .EndElement {Name :start .Name });return nil ;};type ElementsGroupChoice struct{Any []*Any ;};
// Validate validates the Any and its children
func (_aca *Any )Validate ()error {return _aca .ValidateWithPath ("\u0041\u006e\u0079")};func NewSimpleLiteral ()*SimpleLiteral {_ef :=&SimpleLiteral {};return _ef };
// ValidateWithPath validates the Any and its children, prefixing error messages with path
func (_cc *Any )ValidateWithPath (path string )error {if _cf :=_cc .SimpleLiteral .ValidateWithPath (path );_cf !=nil {return _cf ;};return nil ;};func NewAny ()*Any {_bc :=&Any {};_bc .SimpleLiteral =*NewSimpleLiteral ();return _bc };func (_aa *Any )MarshalXML (e *_af .Encoder ,start _af .StartElement )error {return _aa .SimpleLiteral .MarshalXML (e ,start );};
// ValidateWithPath validates the SimpleLiteral and its children, prefixing error messages with path
func (_eb *SimpleLiteral )ValidateWithPath (path string )error {return nil };func (_dg *SimpleLiteral )MarshalXML (e *_af .Encoder ,start _af .StartElement )error {e .EncodeToken (start );e .EncodeToken (_af .EndElement {Name :start .Name });return nil ;};func (_ce *ElementsGroupChoice )UnmarshalXML (d *_af .Decoder ,start _af .StartElement )error {_geb :for {_cd ,_bdf :=d .Token ();if _bdf !=nil {return _bdf ;};switch _gbe :=_cd .(type ){case _af .StartElement :switch _gbe .Name {case _af .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"}:_cgd :=NewAny ();if _ede :=d .DecodeElement (_cgd ,&_gbe );_ede !=nil {return _ede ;};_ce .Any =append (_ce .Any ,_cgd );default:_d .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",_gbe .Name );if _cdg :=d .Skip ();_cdg !=nil {return _cdg ;};};case _af .EndElement :break _geb ;case _af .CharData :};};return nil ;};func (_daf *ElementsGroupChoice )MarshalXML (e *_af .Encoder ,start _af .StartElement )error {if _daf .Any !=nil {_geeg :=_af .StartElement {Name :_af .Name {Local :"\u0064\u0063\u003a\u0061\u006e\u0079"}};for _ ,_ggd :=range _daf .Any {e .EncodeElement (_ggd ,_geeg );};};return nil ;};type ElementsGroup struct{Choice []*ElementsGroupChoice ;};
func (_dca *ElementsGroupChoice )ValidateWithPath (path string )error {for _gea ,_af :=range _dca .Any {if _ebe :=_af .ValidateWithPath (_e .Sprintf ("\u0025\u0073\u002f\u0041\u006e\u0079\u005b\u0025\u0064\u005d",path ,_gea ));_ebe !=nil {return _ebe ;};};return nil ;};func (_ac *ElementContainer )MarshalXML (e *_g .Encoder ,start _g .StartElement )error {start .Name .Local ="\u0065\u006ce\u006d\u0065\u006et\u0043\u006f\u006e\u0074\u0061\u0069\u006e\u0065\u0072";e .EncodeToken (start );if _ac .Choice !=nil {for _ ,_ebf :=range _ac .Choice {_ebf .MarshalXML (e ,_g .StartElement {});};};e .EncodeToken (_g .EndElement {Name :start .Name });return nil ;};func NewElementContainer ()*ElementContainer {_fd :=&ElementContainer {};return _fd };
// Validate validates the ElementsGroupChoice and its children
func (_cag *ElementsGroupChoice )Validate ()error {return _cag .ValidateWithPath ("\u0045\u006c\u0065\u006den\u0074\u0073\u0047\u0072\u006f\u0075\u0070\u0043\u0068\u006f\u0069\u0063\u0065");};func (_ad *Any )UnmarshalXML (d *_af .Decoder ,start _af .StartElement )error {_ad .SimpleLiteral =*NewSimpleLiteral ();for {_ac ,_aff :=d .Token ();if _aff !=nil {return _b .Errorf ("\u0070a\u0072s\u0069\u006e\u0067\u0020\u0041\u006e\u0079\u003a\u0020\u0025\u0073",_aff );};if _c ,_f :=_ac .(_af .EndElement );_f &&_c .Name ==start .Name {break ;};};return nil ;};
func (_bfbb *ElementsGroupChoice )Validate ()error {return _bfbb .ValidateWithPath ("\u0045\u006c\u0065\u006den\u0074\u0073\u0047\u0072\u006f\u0075\u0070\u0043\u0068\u006f\u0069\u0063\u0065");};
// ValidateWithPath validates the SimpleLiteral and its children, prefixing error messages with path
func (_ede *SimpleLiteral )ValidateWithPath (path string )error {return nil };type ElementContainer struct{Choice []*ElementsGroupChoice ;};func NewElementsGroupChoice ()*ElementsGroupChoice {_fdad :=&ElementsGroupChoice {};return _fdad };func NewElementsGroup ()*ElementsGroup {_fff :=&ElementsGroup {};return _fff };
// Validate validates the SimpleLiteral and its children
func (_gf *SimpleLiteral )Validate ()error {return _gf .ValidateWithPath ("\u0053\u0069\u006d\u0070\u006c\u0065\u004c\u0069\u0074\u0065\u0072\u0061\u006c");};func init (){_ba .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 );_ba .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 );_ba .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 );_ba .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 (_gce *SimpleLiteral )Validate ()error {return _gce .ValidateWithPath ("\u0053\u0069\u006d\u0070\u006c\u0065\u004c\u0069\u0074\u0065\u0072\u0061\u006c");};func NewAny ()*Any {_a :=&Any {};_a .SimpleLiteral =*NewSimpleLiteral ();return _a };
// Validate validates the Any and its children
func (_db *Any )Validate ()error {return _db .ValidateWithPath ("\u0041\u006e\u0079")};
// Validate validates the ElementContainer and its children
func (_fc *ElementContainer )Validate ()error {return _fc .ValidateWithPath ("\u0045\u006ce\u006d\u0065\u006et\u0043\u006f\u006e\u0074\u0061\u0069\u006e\u0065\u0072");};func (_de *ElementsGroup )MarshalXML (e *_g .Encoder ,start _g .StartElement )error {if _de .Choice !=nil {for _ ,_fa :=range _de .Choice {_fa .MarshalXML (e ,_g .StartElement {});};};return nil ;};func (_ee *ElementsGroupChoice )UnmarshalXML (d *_g .Decoder ,start _g .StartElement )error {_cfa :for {_cdf ,_ge :=d .Token ();if _ge !=nil {return _ge ;};switch _df :=_cdf .(type ){case _g .StartElement :switch _df .Name {case _g .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"}:_da :=NewAny ();if _acd :=d .DecodeElement (_da ,&_df );_acd !=nil {return _acd ;};_ee .Any =append (_ee .Any ,_da );default:_bf .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",_df .Name );if _cg :=d .Skip ();_cg !=nil {return _cg ;};};case _g .EndElement :break _cfa ;case _g .CharData :};};return nil ;};func (_dbf *SimpleLiteral )UnmarshalXML (d *_g .Decoder ,start _g .StartElement )error {for {_gbf ,_cge :=d .Token ();if _cge !=nil {return _e .Errorf ("\u0070a\u0072\u0073\u0069\u006eg\u0020\u0053\u0069\u006d\u0070l\u0065L\u0069t\u0065\u0072\u0061\u006c\u003a\u0020\u0025s",_cge );};if _gc ,_afd :=_gbf .(_g .EndElement );_afd &&_gc .Name ==start .Name {break ;};};return nil ;};func (_cff *SimpleLiteral )MarshalXML (e *_g .Encoder ,start _g .StartElement )error {e .EncodeToken (start );e .EncodeToken (_g .EndElement {Name :start .Name });return nil ;};type SimpleLiteral struct{};type Any struct{SimpleLiteral };func (_ced *ElementsGroupChoice )MarshalXML (e *_g .Encoder ,start _g .StartElement )error {if _ced .Any !=nil {_ccc :=_g .StartElement {Name :_g .Name {Local :"\u0064\u0063\u003a\u0061\u006e\u0079"}};for _ ,_def :=range _ced .Any {e .EncodeElement (_def ,_ccc );};};return nil ;};func NewSimpleLiteral ()*SimpleLiteral {_aaf :=&SimpleLiteral {};return _aaf };func (_f *Any )MarshalXML (e *_g .Encoder ,start _g .StartElement )error {return _f .SimpleLiteral .MarshalXML (e ,start );};
// ValidateWithPath validates the ElementContainer and its children, prefixing error messages with path
func (_ef *ElementContainer )ValidateWithPath (path string )error {for _fdg ,_aa :=range _ef .Choice {if _aca :=_aa .ValidateWithPath (_e .Sprintf ("\u0025\u0073\u002f\u0043\u0068\u006f\u0069\u0063\u0065\u005b\u0025\u0064\u005d",path ,_fdg ));_aca !=nil {return _aca ;};};return nil ;};
// Validate validates the ElementsGroup and its children
func (_bef *ElementsGroup )Validate ()error {return _bef .ValidateWithPath ("\u0045\u006c\u0065\u006d\u0065\u006e\u0074\u0073\u0047\u0072\u006f\u0075\u0070");};func (_fe *ElementsGroup )UnmarshalXML (d *_g .Decoder ,start _g .StartElement )error {_cd :for {_fab ,_cf :=d .Token ();if _cf !=nil {return _cf ;};switch _ddf :=_fab .(type ){case _g .StartElement :switch _ddf .Name {case _g .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"}:_be :=NewElementsGroupChoice ();if _ba :=d .DecodeElement (&_be .Any ,&_ddf );_ba !=nil {return _ba ;};_fe .Choice =append (_fe .Choice ,_be );default:_bf .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",_ddf .Name );if _gg :=d .Skip ();_gg !=nil {return _gg ;};};case _g .EndElement :break _cd ;case _g .CharData :};};return nil ;};type ElementsGroup struct{Choice []*ElementsGroupChoice ;};
// ValidateWithPath validates the Any and its children, prefixing error messages with path
func (_eb *Any )ValidateWithPath (path string )error {if _ea :=_eb .SimpleLiteral .ValidateWithPath (path );_ea !=nil {return _ea ;};return nil ;};func init (){_bb .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 );_bb .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 );_bb .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 );_bb .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 (_d "encoding/xml";_a "fmt";_f "github.com/unidoc/unioffice";_e "github.com/unidoc/unioffice/common/logger";_c "github.com/unidoc/unioffice/schema/purl.org/dc/elements";);
// Validate validates the ElementsAndRefinementsGroupChoice and its children
func (_baa *ElementsAndRefinementsGroupChoice )Validate ()error {return _baa .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 W3CDTF and its children, prefixing error messages with path
func (_ageb *W3CDTF )ValidateWithPath (path string )error {return nil };
// Validate validates the ElementsAndRefinementsGroup and its children
func (_ac *ElementsAndRefinementsGroup )Validate ()error {return _ac .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 (_efea *Point )UnmarshalXML (d *_d .Decoder ,start _d .StartElement )error {for {_fba ,_edc :=d .Token ();if _edc !=nil {return _a .Errorf ("\u0070\u0061\u0072\u0073\u0069\u006e\u0067\u0020\u0050\u006f\u0069\u006et\u003a\u0020\u0025\u0073",_edc );};if _gcgd ,_cdc :=_fba .(_d .EndElement );_cdc &&_gcgd .Name ==start .Name {break ;};};return nil ;};func (_ab *ISO3166 )MarshalXML (e *_d .Encoder ,start _d .StartElement )error {start .Name .Local ="\u0049S\u004f\u0033\u0031\u0036\u0036";e .EncodeToken (start );e .EncodeToken (_d .EndElement {Name :start .Name });return nil ;};
// Validate validates the URI and its children
func (_dbe *URI )Validate ()error {return _dbe .ValidateWithPath ("\u0055\u0052\u0049")};type W3CDTF struct{};func (_fb *ISO639_2 )UnmarshalXML (d *_d .Decoder ,start _d .StartElement )error {for {_ggg ,_acc :=d .Token ();if _acc !=nil {return _a .Errorf ("p\u0061r\u0073\u0069\u006e\u0067\u0020\u0049\u0053\u004f6\u0033\u0039\u005f\u0032: \u0025\u0073",_acc );};if _beb ,_ed :=_ggg .(_d .EndElement );_ed &&_beb .Name ==start .Name {break ;};};return nil ;};func (_ecf *LCC )MarshalXML (e *_d .Encoder ,start _d .StartElement )error {start .Name .Local ="\u004c\u0043\u0043";e .EncodeToken (start );e .EncodeToken (_d .EndElement {Name :start .Name });return nil ;};func (_ga *DCMIType )MarshalXML (e *_d .Encoder ,start _d .StartElement )error {start .Name .Local ="\u0044\u0043\u004d\u0049\u0054\u0079\u0070\u0065";e .EncodeToken (start );e .EncodeToken (_d .EndElement {Name :start .Name });return nil ;};type RFC3066 struct{};type LCC struct{};
// Validate validates the ISO639_2 and its children
func (_bea *ISO639_2 )Validate ()error {return _bea .ValidateWithPath ("\u0049\u0053\u004f\u0036\u0033\u0039\u005f\u0032");};func NewDCMIType ()*DCMIType {_da :=&DCMIType {};return _da };
// ValidateWithPath validates the ISO3166 and its children, prefixing error messages with path
func (_efed *ISO3166 )ValidateWithPath (path string )error {return nil };
// Validate validates the TGN and its children
func (_accc *TGN )Validate ()error {return _accc .ValidateWithPath ("\u0054\u0047\u004e")};func (_gabe *ElementsAndRefinementsGroup )UnmarshalXML (d *_d .Decoder ,start _d .StartElement )error {_deb :for {_fee ,_cb :=d .Token ();if _cb !=nil {return _cb ;};switch _gabc :=_fee .(type ){case _d .StartElement :switch _gabc .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"}:_cfd :=NewElementsAndRefinementsGroupChoice ();if _aaf :=d .DecodeElement (&_cfd .Any ,&_gabc );_aaf !=nil {return _aaf ;};_gabe .Choice =append (_gabe .Choice ,_cfd );default:_e .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",_gabc .Name );if _gca :=d .Skip ();_gca !=nil {return _gca ;};};case _d .EndElement :break _deb ;case _d .CharData :};};return nil ;};func (_gbd *RFC3066 )UnmarshalXML (d *_d .Decoder ,start _d .StartElement )error {for {_egf ,_ceg :=d .Token ();if _ceg !=nil {return _a .Errorf ("\u0070\u0061\u0072\u0073in\u0067\u0020\u0052\u0046\u0043\u0033\u0030\u0036\u0036\u003a\u0020\u0025\u0073",_ceg );};if _gce ,_eae :=_egf .(_d .EndElement );_eae &&_gce .Name ==start .Name {break ;};};return nil ;};func (_gee *TGN )MarshalXML (e *_d .Encoder ,start _d .StartElement )error {start .Name .Local ="\u0054\u0047\u004e";e .EncodeToken (start );e .EncodeToken (_d .EndElement {Name :start .Name });return nil ;};
// Validate validates the Box and its children
func (_cgc *Box )Validate ()error {return _cgc .ValidateWithPath ("\u0042\u006f\u0078")};func (_ag *ElementsAndRefinementsGroup )MarshalXML (e *_d .Encoder ,start _d .StartElement )error {if _ag .Choice !=nil {for _ ,_eed :=range _ag .Choice {_eed .MarshalXML (e ,_d .StartElement {});};};return nil ;};func NewISO3166 ()*ISO3166 {_agc :=&ISO3166 {};return _agc };func NewPeriod ()*Period {_cbf :=&Period {};return _cbf };
// Validate validates the DDC and its children
func (_ad *DDC )Validate ()error {return _ad .ValidateWithPath ("\u0044\u0044\u0043")};
// ValidateWithPath validates the LCC and its children, prefixing error messages with path
func (_cfg *LCC )ValidateWithPath (path string )error {return nil };type ElementOrRefinementContainer struct{Choice []*ElementsAndRefinementsGroupChoice ;};func (_gabf *Period )MarshalXML (e *_d .Encoder ,start _d .StartElement )error {start .Name .Local ="\u0050\u0065\u0072\u0069\u006f\u0064";e .EncodeToken (start );e .EncodeToken (_d .EndElement {Name :start .Name });return nil ;};func (_fbe *Point )MarshalXML (e *_d .Encoder ,start _d .StartElement )error {start .Name .Local ="\u0050\u006f\u0069n\u0074";e .EncodeToken (start );e .EncodeToken (_d .EndElement {Name :start .Name });return nil ;};
// Validate validates the ISO3166 and its children
func (_adf *ISO3166 )Validate ()error {return _adf .ValidateWithPath ("\u0049S\u004f\u0033\u0031\u0036\u0036");};func NewElementsAndRefinementsGroupChoice ()*ElementsAndRefinementsGroupChoice {_fad :=&ElementsAndRefinementsGroupChoice {};return _fad ;};func (_cd *ElementOrRefinementContainer )MarshalXML (e *_d .Encoder ,start _d .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 _cd .Choice !=nil {for _ ,_gfe :=range _cd .Choice {_gfe .MarshalXML (e ,_d .StartElement {});};};e .EncodeToken (_d .EndElement {Name :start .Name });return nil ;};func (_ce *Box )UnmarshalXML (d *_d .Decoder ,start _d .StartElement )error {for {_ef ,_ee :=d .Token ();if _ee !=nil {return _a .Errorf ("\u0070a\u0072s\u0069\u006e\u0067\u0020\u0042\u006f\u0078\u003a\u0020\u0025\u0073",_ee );};if _cf ,_df :=_ef .(_d .EndElement );_df &&_cf .Name ==start .Name {break ;};};return nil ;};type ISO3166 struct{};
// ValidateWithPath validates the TGN and its children, prefixing error messages with path
func (_cad *TGN )ValidateWithPath (path string )error {return nil };type RFC1766 struct{};
// Validate validates the Period and its children
func (_ccb *Period )Validate ()error {return _ccb .ValidateWithPath ("\u0050\u0065\u0072\u0069\u006f\u0064");};type DCMIType struct{};func NewLCSH ()*LCSH {_dbfa :=&LCSH {};return _dbfa };
package terms ;import (_e "encoding/xml";_g "fmt";_b "github.com/unidoc/unioffice";_f "github.com/unidoc/unioffice/common/logger";_fe "github.com/unidoc/unioffice/schema/purl.org/dc/elements";);type ElementOrRefinementContainer struct{Choice []*ElementsAndRefinementsGroupChoice ;};func NewElementOrRefinementContainer ()*ElementOrRefinementContainer {_bca :=&ElementOrRefinementContainer {};return _bca ;};type ISO3166 struct{};func (_db *ElementsAndRefinementsGroup )UnmarshalXML (d *_e .Decoder ,start _e .StartElement )error {_eg :for {_fad ,_ab :=d .Token ();if _ab !=nil {return _ab ;};switch _gc :=_fad .(type ){case _e .StartElement :switch _gc .Name {case _e .Name {Space :"\u0068\u0074\u0074\u0070\u003a\u002f\u002f\u0070\u0075\u0072\u006c\u002e\u006f\u0072\u0067/\u0064c\u002f\u0065\u006c\u0065\u006d\u0065\u006e\u0074\u0073\u002f\u0031\u002e\u0031\u002f",Local :"\u0061\u006e\u0079"}:_gff :=NewElementsAndRefinementsGroupChoice ();if _bag :=d .DecodeElement (&_gff .Any ,&_gc );_bag !=nil {return _bag ;};_db .Choice =append (_db .Choice ,_gff );default:_f .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",_gc .Name );if _fb :=d .Skip ();_fb !=nil {return _fb ;};};case _e .EndElement :break _eg ;case _e .CharData :};};return nil ;};func (_ebd *DDC )UnmarshalXML (d *_e .Decoder ,start _e .StartElement )error {for {_bc ,_be :=d .Token ();if _be !=nil {return _g .Errorf ("\u0070a\u0072s\u0069\u006e\u0067\u0020\u0044\u0044\u0043\u003a\u0020\u0025\u0073",_be );};if _bge ,_gb :=_bc .(_e .EndElement );_gb &&_bge .Name ==start .Name {break ;};};return nil ;};func (_fgg *LCSH )UnmarshalXML (d *_e .Decoder ,start _e .StartElement )error {for {_fgge ,_efag :=d .Token ();if _efag !=nil {return _g .Errorf ("\u0070\u0061r\u0073\u0069\u006eg\u0020\u004c\u0043\u0053\u0048\u003a\u0020\u0025\u0073",_efag );};if _egbb ,_edb :=_fgge .(_e .EndElement );_edb &&_egbb .Name ==start .Name {break ;};};return nil ;};
// Validate validates the IMT and its children
func (_eb *IMT )Validate ()error {return _eb .ValidateWithPath ("\u0049\u004d\u0054")};func (_bc *ElementOrRefinementContainer )UnmarshalXML (d *_d .Decoder ,start _d .StartElement )error {_bb :for {_cc ,_dba :=d .Token ();if _dba !=nil {return _dba ;};switch _gd :=_cc .(type ){case _d .StartElement :switch _gd .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"}:_cca :=NewElementsAndRefinementsGroupChoice ();if _ae :=d .DecodeElement (&_cca .Any ,&_gd );_ae !=nil {return _ae ;};_bc .Choice =append (_bc .Choice ,_cca );default:_e .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",_gd .Name );if _gga :=d .Skip ();_gga !=nil {return _gga ;};};case _d .EndElement :break _bb ;case _d .CharData :};};return nil ;};func (_ccaa *URI )UnmarshalXML (d *_d .Decoder ,start _d .StartElement )error {for {_eeg ,_dbb :=d .Token ();if _dbb !=nil {return _a .Errorf ("\u0070a\u0072s\u0069\u006e\u0067\u0020\u0055\u0052\u0049\u003a\u0020\u0025\u0073",_dbb );};if _fda ,_cag :=_eeg .(_d .EndElement );_cag &&_fda .Name ==start .Name {break ;};};return nil ;};
// Validate validates the ElementOrRefinementContainer and its children
func (_gab *ElementOrRefinementContainer )Validate ()error {return _gab .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 NewDDC ()*DDC {_de :=&DDC {};return _de };func (_bcc *ElementsAndRefinementsGroupChoice )MarshalXML (e *_d .Encoder ,start _d .StartElement )error {if _bcc .Any !=nil {_dcg :=_d .StartElement {Name :_d .Name {Local :"\u0064\u0063\u003a\u0061\u006e\u0079"}};for _ ,_fg :=range _bcc .Any {e .EncodeElement (_fg ,_dcg );};};return nil ;};func NewMESH ()*MESH {_fdd :=&MESH {};return _fdd };type URI struct{};func NewIMT ()*IMT {_ea :=&IMT {};return _ea };
// Validate validates the LCC and its children
func (_ega *LCC )Validate ()error {return _ega .ValidateWithPath ("\u004c\u0043\u0043")};func (_bd *LCSH )UnmarshalXML (d *_d .Decoder ,start _d .StartElement )error {for {_abc ,_ddd :=d .Token ();if _ddd !=nil {return _a .Errorf ("\u0070\u0061r\u0073\u0069\u006eg\u0020\u004c\u0043\u0053\u0048\u003a\u0020\u0025\u0073",_ddd );};if _age ,_gae :=_abc .(_d .EndElement );_gae &&_age .Name ==start .Name {break ;};};return nil ;};
// ValidateWithPath validates the Point and its children, prefixing error messages with path
func (_fgf *Point )ValidateWithPath (path string )error {return nil };func (_gdg *UDC )UnmarshalXML (d *_d .Decoder ,start _d .StartElement )error {for {_fagb ,_fga :=d .Token ();if _fga !=nil {return _a .Errorf ("\u0070a\u0072s\u0069\u006e\u0067\u0020\u0055\u0044\u0043\u003a\u0020\u0025\u0073",_fga );};if _bbc ,_edd :=_fagb .(_d .EndElement );_edd &&_bbc .Name ==start .Name {break ;};};return nil ;};type IMT struct{};func NewElementOrRefinementContainer ()*ElementOrRefinementContainer {_adg :=&ElementOrRefinementContainer {};return _adg ;};func NewW3CDTF ()*W3CDTF {_abe :=&W3CDTF {};return _abe };type LCSH struct{};func (_feg *IMT )MarshalXML (e *_d .Encoder ,start _d .StartElement )error {start .Name .Local ="\u0049\u004d\u0054";e .EncodeToken (start );e .EncodeToken (_d .EndElement {Name :start .Name });return nil ;};
// ValidateWithPath validates the DCMIType and its children, prefixing error messages with path
func (_bf *DCMIType )ValidateWithPath (path string )error {return nil };func NewLCC ()*LCC {_ccc :=&LCC {};return _ccc };
// ValidateWithPath validates the ElementsAndRefinementsGroup and its children, prefixing error messages with path
func (_fcc *ElementsAndRefinementsGroup )ValidateWithPath (path string )error {for _ffd ,_dcd :=range _fcc .Choice {if _efdd :=_dcd .ValidateWithPath (_a .Sprintf ("\u0025\u0073\u002f\u0043\u0068\u006f\u0069\u0063\u0065\u005b\u0025\u0064\u005d",path ,_ffd ));_efdd !=nil {return _efdd ;};};return nil ;};func (_dbf *ElementsAndRefinementsGroupChoice )UnmarshalXML (d *_d .Decoder ,start _d .StartElement )error {_cde :for {_fdb ,_dad :=d .Token ();if _dad !=nil {return _dad ;};switch _fgd :=_fdb .(type ){case _d .StartElement :switch _fgd .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 :=_c .NewAny ();if _dbc :=d .DecodeElement (_ca ,&_fgd );_dbc !=nil {return _dbc ;};_dbf .Any =append (_dbf .Any ,_ca );default:_e .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",_fgd .Name );if _eea :=d .Skip ();_eea !=nil {return _eea ;};};case _d .EndElement :break _cde ;case _d .CharData :};};return nil ;};func (_cef *MESH )MarshalXML (e *_d .Encoder ,start _d .StartElement )error {start .Name .Local ="\u004d\u0045\u0053\u0048";e .EncodeToken (start );e .EncodeToken (_d .EndElement {Name :start .Name });return nil ;};type ElementsAndRefinementsGroupChoice struct{Any []*_c .Any ;};
// Validate validates the MESH and its children
func (_af *MESH )Validate ()error {return _af .ValidateWithPath ("\u004d\u0045\u0053\u0048")};
// ValidateWithPath validates the URI and its children, prefixing error messages with path
func (_fbg *URI )ValidateWithPath (path string )error {return nil };type Period struct{};
// Validate validates the W3CDTF and its children
func (_efa *W3CDTF )Validate ()error {return _efa .ValidateWithPath ("\u0057\u0033\u0043\u0044\u0054\u0046");};
// ValidateWithPath validates the ElementsAndRefinementsGroupChoice and its children, prefixing error messages with path
func (_bgg *ElementsAndRefinementsGroupChoice )ValidateWithPath (path string )error {for _fea ,_ffc :=range _bgg .Any {if _gcg :=_ffc .ValidateWithPath (_a .Sprintf ("\u0025\u0073\u002f\u0041\u006e\u0079\u005b\u0025\u0064\u005d",path ,_fea ));_gcg !=nil {return _gcg ;};};return nil ;};func (_bdg *W3CDTF )UnmarshalXML (d *_d .Decoder ,start _d .StartElement )error {for {_gag ,_dcf :=d .Token ();if _dcf !=nil {return _a .Errorf ("\u0070a\u0072s\u0069\u006e\u0067\u0020\u00573\u0043\u0044T\u0046\u003a\u0020\u0025\u0073",_dcf );};if _faf ,_fbf :=_gag .(_d .EndElement );_fbf &&_faf .Name ==start .Name {break ;};};return nil ;};
// Validate validates the UDC and its children
func (_bgc *UDC )Validate ()error {return _bgc .ValidateWithPath ("\u0055\u0044\u0043")};func (_cae *TGN )UnmarshalXML (d *_d .Decoder ,start _d .StartElement )error {for {_aef ,_bac :=d .Token ();if _bac !=nil {return _a .Errorf ("\u0070a\u0072s\u0069\u006e\u0067\u0020\u0054\u0047\u004e\u003a\u0020\u0025\u0073",_bac );};if _ggd ,_abd :=_aef .(_d .EndElement );_abd &&_ggd .Name ==start .Name {break ;};};return nil ;};func NewUDC ()*UDC {_fdbc :=&UDC {};return _fdbc };
// Validate validates the Point and its children
func (_ece *Point )Validate ()error {return _ece .ValidateWithPath ("\u0050\u006f\u0069n\u0074")};
// Validate validates the DCMIType and its children
func (_efd *DCMIType )Validate ()error {return _efd .ValidateWithPath ("\u0044\u0043\u004d\u0049\u0054\u0079\u0070\u0065");};func (_ede *LCC )UnmarshalXML (d *_d .Decoder ,start _d .StartElement )error {for {_ebf ,_eg :=d .Token ();if _eg !=nil {return _a .Errorf ("\u0070a\u0072s\u0069\u006e\u0067\u0020\u004c\u0043\u0043\u003a\u0020\u0025\u0073",_eg );};if _bfg ,_aea :=_ebf .(_d .EndElement );_aea &&_bfg .Name ==start .Name {break ;};};return nil ;};
// ValidateWithPath validates the MESH and its children, prefixing error messages with path
func (_fag *MESH )ValidateWithPath (path string )error {return nil };func NewISO639_2 ()*ISO639_2 {_dg :=&ISO639_2 {};return _dg };type DDC struct{};type UDC struct{};
// ValidateWithPath validates the ElementOrRefinementContainer and its children, prefixing error messages with path
func (_dc *ElementOrRefinementContainer )ValidateWithPath (path string )error {for _ada ,_gdd :=range _dc .Choice {if _ge :=_gdd .ValidateWithPath (_a .Sprintf ("\u0025\u0073\u002f\u0043\u0068\u006f\u0069\u0063\u0065\u005b\u0025\u0064\u005d",path ,_ada ));_ge !=nil {return _ge ;};};return nil ;};func (_ged *URI )MarshalXML (e *_d .Encoder ,start _d .StartElement )error {start .Name .Local ="\u0055\u0052\u0049";e .EncodeToken (start );e .EncodeToken (_d .EndElement {Name :start .Name });return nil ;};func (_cg *Box )MarshalXML (e *_d .Encoder ,start _d .StartElement )error {start .Name .Local ="\u0042\u006f\u0078";e .EncodeToken (start );e .EncodeToken (_d .EndElement {Name :start .Name });return nil ;};func NewTGN ()*TGN {_fcdg :=&TGN {};return _fcdg };func (_gfef *ISO3166 )UnmarshalXML (d *_d .Decoder ,start _d .StartElement )error {for {_fcd ,_bad :=d .Token ();if _bad !=nil {return _a .Errorf ("\u0070\u0061\u0072\u0073in\u0067\u0020\u0049\u0053\u004f\u0033\u0031\u0036\u0036\u003a\u0020\u0025\u0073",_bad );};if _ggf ,_gda :=_fcd .(_d .EndElement );_gda &&_ggf .Name ==start .Name {break ;};};return nil ;};
// ValidateWithPath validates the IMT and its children, prefixing error messages with path
func (_be *IMT )ValidateWithPath (path string )error {return nil };type ISO639_2 struct{};
// Validate validates the LCSH and its children
func (_dga *LCSH )Validate ()error {return _dga .ValidateWithPath ("\u004c\u0043\u0053\u0048")};func NewRFC3066 ()*RFC3066 {_bdaf :=&RFC3066 {};return _bdaf };
// ValidateWithPath validates the LCSH and its children, prefixing error messages with path
func (_bdb *LCSH )ValidateWithPath (path string )error {return nil };
// ValidateWithPath validates the RFC1766 and its children, prefixing error messages with path
func (_fde *RFC1766 )ValidateWithPath (path string )error {return nil };type TGN struct{};
// ValidateWithPath validates the UDC and its children, prefixing error messages with path
func (_cab *UDC )ValidateWithPath (path string )error {return nil };func NewPoint ()*Point {_dcc :=&Point {};return _dcc };func (_fe *DDC )UnmarshalXML (d *_d .Decoder ,start _d .StartElement )error {for {_db ,_fc :=d .Token ();if _fc !=nil {return _a .Errorf ("\u0070a\u0072s\u0069\u006e\u0067\u0020\u0044\u0044\u0043\u003a\u0020\u0025\u0073",_fc );};if _ced ,_gg :=_db .(_d .EndElement );_gg &&_ced .Name ==start .Name {break ;};};return nil ;};
// ValidateWithPath validates the ISO639_2 and its children, prefixing error messages with path
func (_gb *ISO639_2 )ValidateWithPath (path string )error {return nil };func (_dd *ISO639_2 )MarshalXML (e *_d .Encoder ,start _d .StartElement )error {start .Name .Local ="\u0049\u0053\u004f\u0036\u0033\u0039\u002d\u0032";e .EncodeToken (start );e .EncodeToken (_d .EndElement {Name :start .Name });return nil ;};func (_aac *IMT )UnmarshalXML (d *_d .Decoder ,start _d .StartElement )error {for {_fdc ,_dbcf :=d .Token ();if _dbcf !=nil {return _a .Errorf ("\u0070a\u0072s\u0069\u006e\u0067\u0020\u0049\u004d\u0054\u003a\u0020\u0025\u0073",_dbcf );};if _dbd ,_efe :=_fdc .(_d .EndElement );_efe &&_dbd .Name ==start .Name {break ;};};return nil ;};func (_cda *RFC1766 )UnmarshalXML (d *_d .Decoder ,start _d .StartElement )error {for {_bebc ,_bda :=d .Token ();if _bda !=nil {return _a .Errorf ("\u0070\u0061\u0072\u0073in\u0067\u0020\u0052\u0046\u0043\u0031\u0037\u0036\u0036\u003a\u0020\u0025\u0073",_bda );};if _ddb ,_gcc :=_bebc .(_d .EndElement );_gcc &&_ddb .Name ==start .Name {break ;};};return nil ;};func (_cfe *DCMIType )UnmarshalXML (d *_d .Decoder ,start _d .StartElement )error {for {_fd ,_aa :=d .Token ();if _aa !=nil {return _a .Errorf ("p\u0061r\u0073\u0069\u006e\u0067\u0020\u0044\u0043\u004dI\u0054\u0079\u0070\u0065: \u0025\u0073",_aa );};if _b ,_ec :=_fd .(_d .EndElement );_ec &&_b .Name ==start .Name {break ;};};return nil ;};func NewRFC1766 ()*RFC1766 {_bge :=&RFC1766 {};return _bge };func (_efc *Period )UnmarshalXML (d *_d .Decoder ,start _d .StartElement )error {for {_bfgd ,_gfc :=d .Token ();if _gfc !=nil {return _a .Errorf ("\u0070a\u0072s\u0069\u006e\u0067\u0020\u0050e\u0072\u0069o\u0064\u003a\u0020\u0025\u0073",_gfc );};if _fab ,_ceb :=_bfgd .(_d .EndElement );_ceb &&_fab .Name ==start .Name {break ;};};return nil ;};
// Validate validates the RFC3066 and its children
func (_fef *RFC3066 )Validate ()error {return _fef .ValidateWithPath ("\u0052F\u0043\u0033\u0030\u0036\u0036");};func (_cdd *LCSH )MarshalXML (e *_d .Encoder ,start _d .StartElement )error {start .Name .Local ="\u004c\u0043\u0053\u0048";e .EncodeToken (start );e .EncodeToken (_d .EndElement {Name :start .Name });return nil ;};
// Validate validates the RFC1766 and its children
func (_ege *RFC1766 )Validate ()error {return _ege .ValidateWithPath ("\u0052F\u0043\u0031\u0037\u0036\u0036");};
// ValidateWithPath validates the Box and its children, prefixing error messages with path
func (_ff *Box )ValidateWithPath (path string )error {return nil };type Point struct{};func (_beg *RFC1766 )MarshalXML (e *_d .Encoder ,start _d .StartElement )error {start .Name .Local ="\u0052F\u0043\u0031\u0037\u0036\u0036";e .EncodeToken (start );e .EncodeToken (_d .EndElement {Name :start .Name });return nil ;};func (_aeg *W3CDTF )MarshalXML (e *_d .Encoder ,start _d .StartElement )error {start .Name .Local ="\u0057\u0033\u0043\u0044\u0054\u0046";e .EncodeToken (start );e .EncodeToken (_d .EndElement {Name :start .Name });return nil ;};func (_gc *DDC )MarshalXML (e *_d .Encoder ,start _d .StartElement )error {start .Name .Local ="\u0044\u0044\u0043";e .EncodeToken (start );e .EncodeToken (_d .EndElement {Name :start .Name });return nil ;};
// ValidateWithPath validates the RFC3066 and its children, prefixing error messages with path
func (_efg *RFC3066 )ValidateWithPath (path string )error {return nil };type Box struct{};func NewBox ()*Box {_gf :=&Box {};return _gf };func (_bec *RFC3066 )MarshalXML (e *_d .Encoder ,start _d .StartElement )error {start .Name .Local ="\u0052F\u0043\u0033\u0030\u0036\u0036";e .EncodeToken (start );e .EncodeToken (_d .EndElement {Name :start .Name });return nil ;};func (_dbg *UDC )MarshalXML (e *_d .Encoder ,start _d .StartElement )error {start .Name .Local ="\u0055\u0044\u0043";e .EncodeToken (start );e .EncodeToken (_d .EndElement {Name :start .Name });return nil ;};func (_eec *MESH )UnmarshalXML (d *_d .Decoder ,start _d .StartElement )error {for {_daa ,_eee :=d .Token ();if _eee !=nil {return _a .Errorf ("\u0070\u0061r\u0073\u0069\u006eg\u0020\u004d\u0045\u0053\u0048\u003a\u0020\u0025\u0073",_eee );};if _fbc ,_gba :=_daa .(_d .EndElement );_gba &&_fbc .Name ==start .Name {break ;};};return nil ;};func NewURI ()*URI {_fagc :=&URI {};return _fagc };
func (_faf *IMT )Validate ()error {return _faf .ValidateWithPath ("\u0049\u004d\u0054")};func (_gee *W3CDTF )MarshalXML (e *_e .Encoder ,start _e .StartElement )error {start .Name .Local ="\u0057\u0033\u0043\u0044\u0054\u0046";e .EncodeToken (start );e .EncodeToken (_e .EndElement {Name :start .Name });return nil ;};
// ValidateWithPath validates the Period and its children, prefixing error messages with path
func (_ggad *Period )ValidateWithPath (path string )error {return nil };
func (_bcd *Period )ValidateWithPath (path string )error {return nil };
// Validate validates the LCSH and its children
func (_caf *LCSH )Validate ()error {return _caf .ValidateWithPath ("\u004c\u0043\u0053\u0048")};
// Validate validates the RFC1766 and its children
func (_cdd *RFC1766 )Validate ()error {return _cdd .ValidateWithPath ("\u0052F\u0043\u0031\u0037\u0036\u0036");};
// ValidateWithPath validates the ISO639_2 and its children, prefixing error messages with path
func (_baf *ISO639_2 )ValidateWithPath (path string )error {return nil };type RFC1766 struct{};func (_aef *RFC3066 )UnmarshalXML (d *_e .Decoder ,start _e .StartElement )error {for {_dcd ,_ddf :=d .Token ();if _ddf !=nil {return _g .Errorf ("\u0070\u0061\u0072\u0073in\u0067\u0020\u0052\u0046\u0043\u0033\u0030\u0036\u0036\u003a\u0020\u0025\u0073",_ddf );};if _fga ,_egf :=_dcd .(_e .EndElement );_egf &&_fga .Name ==start .Name {break ;};};return nil ;};func (_dbb *IMT )UnmarshalXML (d *_e .Decoder ,start _e .StartElement )error {for {_egb ,_ddc :=d .Token ();if _ddc !=nil {return _g .Errorf ("\u0070a\u0072s\u0069\u006e\u0067\u0020\u0049\u004d\u0054\u003a\u0020\u0025\u0073",_ddc );};if _ea ,_ed :=_egb .(_e .EndElement );_ed &&_ea .Name ==start .Name {break ;};};return nil ;};
// ValidateWithPath validates the MESH and its children, prefixing error messages with path
func (_ec *MESH )ValidateWithPath (path string )error {return nil };func (_fee *URI )MarshalXML (e *_e .Encoder ,start _e .StartElement )error {start .Name .Local ="\u0055\u0052\u0049";e .EncodeToken (start );e .EncodeToken (_e .EndElement {Name :start .Name });return nil ;};
// ValidateWithPath validates the ElementsAndRefinementsGroup and its children, prefixing error messages with path
func (_gdd *ElementsAndRefinementsGroup )ValidateWithPath (path string )error {for _fge ,_dge :=range _gdd .Choice {if _adf :=_dge .ValidateWithPath (_g .Sprintf ("\u0025\u0073\u002f\u0043\u0068\u006f\u0069\u0063\u0065\u005b\u0025\u0064\u005d",path ,_fge ));_adf !=nil {return _adf ;};};return nil ;};
// ValidateWithPath validates the URI and its children, prefixing error messages with path
func (_eed *URI )ValidateWithPath (path string )error {return nil };func (_dc *Box )MarshalXML (e *_e .Encoder ,start _e .StartElement )error {start .Name .Local ="\u0042\u006f\u0078";e .EncodeToken (start );e .EncodeToken (_e .EndElement {Name :start .Name });return nil ;};func (_ebb *Point )MarshalXML (e *_e .Encoder ,start _e .StartElement )error {start .Name .Local ="\u0050\u006f\u0069n\u0074";e .EncodeToken (start );e .EncodeToken (_e .EndElement {Name :start .Name });return nil ;};type MESH struct{};func (_aeg *RFC1766 )MarshalXML (e *_e .Encoder ,start _e .StartElement )error {start .Name .Local ="\u0052F\u0043\u0031\u0037\u0036\u0036";e .EncodeToken (start );e .EncodeToken (_e .EndElement {Name :start .Name });return nil ;};func (_gbe *Period )MarshalXML (e *_e .Encoder ,start _e .StartElement )error {start .Name .Local ="\u0050\u0065\u0072\u0069\u006f\u0064";e .EncodeToken (start );e .EncodeToken (_e .EndElement {Name :start .Name });return nil ;};func (_efa *ISO3166 )UnmarshalXML (d *_e .Decoder ,start _e .StartElement )error {for {_efb ,_gag :=d .Token ();if _gag !=nil {return _g .Errorf ("\u0070\u0061\u0072\u0073in\u0067\u0020\u0049\u0053\u004f\u0033\u0031\u0036\u0036\u003a\u0020\u0025\u0073",_gag );};if _bfff ,_cf :=_efb .(_e .EndElement );_cf &&_bfff .Name ==start .Name {break ;};};return nil ;};func NewUDC ()*UDC {_baff :=&UDC {};return _baff };func (_fae *ElementsAndRefinementsGroupChoice )MarshalXML (e *_e .Encoder ,start _e .StartElement )error {if _fae .Any !=nil {_ff :=_e .StartElement {Name :_e .Name {Local :"\u0064\u0063\u003a\u0061\u006e\u0079"}};for _ ,_bdb :=range _fae .Any {e .EncodeElement (_bdb ,_ff );};};return nil ;};type DCMIType struct{};
// ValidateWithPath validates the RFC1766 and its children, prefixing error messages with path
func (_bgg *RFC1766 )ValidateWithPath (path string )error {return nil };type ISO639_2 struct{};func NewISO3166 ()*ISO3166 {_dda :=&ISO3166 {};return _dda };func NewMESH ()*MESH {_dgg :=&MESH {};return _dgg };func NewDDC ()*DDC {_bb :=&DDC {};return _bb };
// ValidateWithPath validates the RFC3066 and its children, prefixing error messages with path
func (_acf *RFC3066 )ValidateWithPath (path string )error {return nil };func NewISO639_2 ()*ISO639_2 {_cgd :=&ISO639_2 {};return _cgd };func NewW3CDTF ()*W3CDTF {_agf :=&W3CDTF {};return _agf };
// Validate validates the UDC and its children
func (_ffc *UDC )Validate ()error {return _ffc .ValidateWithPath ("\u0055\u0044\u0043")};func NewLCC ()*LCC {_ccd :=&LCC {};return _ccd };
// ValidateWithPath validates the DDC and its children, prefixing error messages with path
func (_ba *DDC )ValidateWithPath (path string )error {return nil };type MESH struct{};type ElementsAndRefinementsGroup struct{Choice []*ElementsAndRefinementsGroupChoice ;};func NewElementsAndRefinementsGroup ()*ElementsAndRefinementsGroup {_bg :=&ElementsAndRefinementsGroup {};return _bg ;};func init (){_f .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 );_f .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 );_f .RegisterConstructor ("\u0068t\u0074\u0070\u003a\u002f/\u0070\u0075\u0072\u006c\u002eo\u0072g\u002fd\u0063\u002f\u0074\u0065\u0072\u006d\u0073/","\u0044\u0044\u0043",NewDDC );_f .RegisterConstructor ("\u0068t\u0074\u0070\u003a\u002f/\u0070\u0075\u0072\u006c\u002eo\u0072g\u002fd\u0063\u002f\u0074\u0065\u0072\u006d\u0073/","\u004c\u0043\u0043",NewLCC );_f .RegisterConstructor ("\u0068t\u0074\u0070\u003a\u002f/\u0070\u0075\u0072\u006c\u002eo\u0072g\u002fd\u0063\u002f\u0074\u0065\u0072\u006d\u0073/","\u0055\u0044\u0043",NewUDC );_f .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 );_f .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 );_f .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 );_f .RegisterConstructor ("\u0068t\u0074\u0070\u003a\u002f/\u0070\u0075\u0072\u006c\u002eo\u0072g\u002fd\u0063\u002f\u0074\u0065\u0072\u006d\u0073/","\u0049\u004d\u0054",NewIMT );_f .RegisterConstructor ("\u0068t\u0074\u0070\u003a\u002f/\u0070\u0075\u0072\u006c\u002eo\u0072g\u002fd\u0063\u002f\u0074\u0065\u0072\u006d\u0073/","\u0055\u0052\u0049",NewURI );_f .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 );_f .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 );_f .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 );_f .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 );_f .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 );_f .RegisterConstructor ("\u0068t\u0074\u0070\u003a\u002f/\u0070\u0075\u0072\u006c\u002eo\u0072g\u002fd\u0063\u002f\u0074\u0065\u0072\u006d\u0073/","\u0042\u006f\u0078",NewBox );_f .RegisterConstructor ("\u0068t\u0074\u0070\u003a\u002f/\u0070\u0075\u0072\u006c\u002eo\u0072g\u002fd\u0063\u002f\u0074\u0065\u0072\u006d\u0073/","\u0054\u0047\u004e",NewTGN );_f .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 );_f .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 (_ae *DDC )ValidateWithPath (path string )error {return nil };func NewPeriod ()*Period {_bee :=&Period {};return _bee };
// Validate validates the W3CDTF and its children
func (_dfe *W3CDTF )Validate ()error {return _dfe .ValidateWithPath ("\u0057\u0033\u0043\u0044\u0054\u0046");};type LCSH struct{};type DDC struct{};func NewURI ()*URI {_gae :=&URI {};return _gae };func (_cda *LCC )MarshalXML (e *_e .Encoder ,start _e .StartElement )error {start .Name .Local ="\u004c\u0043\u0043";e .EncodeToken (start );e .EncodeToken (_e .EndElement {Name :start .Name });return nil ;};func NewLCSH ()*LCSH {_eaa :=&LCSH {};return _eaa };func (_bd *ElementOrRefinementContainer )MarshalXML (e *_e .Encoder ,start _e .StartElement )error {start .Name .Local ="\u0065\u006c\u0065\u006de\u006e\u0074\u004f\u0072\u0052\u0065\u0066\u0069\u006e\u0065m\u0065n\u0074\u0043\u006f\u006e\u0074\u0061\u0069n\u0065\u0072";e .EncodeToken (start );if _bd .Choice !=nil {for _ ,_ca :=range _bd .Choice {_ca .MarshalXML (e ,_e .StartElement {});};};e .EncodeToken (_e .EndElement {Name :start .Name });return nil ;};func (_cdc *MESH )MarshalXML (e *_e .Encoder ,start _e .StartElement )error {start .Name .Local ="\u004d\u0045\u0053\u0048";e .EncodeToken (start );e .EncodeToken (_e .EndElement {Name :start .Name });return nil ;};func (_ccb *ISO3166 )MarshalXML (e *_e .Encoder ,start _e .StartElement )error {start .Name .Local ="\u0049S\u004f\u0033\u0031\u0036\u0036";e .EncodeToken (start );e .EncodeToken (_e .EndElement {Name :start .Name });return nil ;};func NewPoint ()*Point {_cga :=&Point {};return _cga };type LCC struct{};func NewTGN ()*TGN {_aca :=&TGN {};return _aca };
// Validate validates the ISO639_2 and its children
func (_fbb *ISO639_2 )Validate ()error {return _fbb .ValidateWithPath ("\u0049\u0053\u004f\u0036\u0033\u0039\u005f\u0032");};type ElementsAndRefinementsGroupChoice struct{Any []*_fe .Any ;};type Point struct{};func (_beag *RFC1766 )UnmarshalXML (d *_e .Decoder ,start _e .StartElement )error {for {_ffg ,_eec :=d .Token ();if _eec !=nil {return _g .Errorf ("\u0070\u0061\u0072\u0073in\u0067\u0020\u0052\u0046\u0043\u0031\u0037\u0036\u0036\u003a\u0020\u0025\u0073",_eec );};if _cec ,_fccd :=_ffg .(_e .EndElement );_fccd &&_cec .Name ==start .Name {break ;};};return nil ;};
// ValidateWithPath validates the UDC and its children, prefixing error messages with path
func (_cdf *UDC )ValidateWithPath (path string )error {return nil };func (_efd *ElementOrRefinementContainer )UnmarshalXML (d *_e .Decoder ,start _e .StartElement )error {_dgd :for {_ggb ,_gf :=d .Token ();if _gf !=nil {return _gf ;};switch _bea :=_ggb .(type ){case _e .StartElement :switch _bea .Name {case _e .Name {Space :"\u0068\u0074\u0074\u0070\u003a\u002f\u002f\u0070\u0075\u0072\u006c\u002e\u006f\u0072\u0067/\u0064c\u002f\u0065\u006c\u0065\u006d\u0065\u006e\u0074\u0073\u002f\u0031\u002e\u0031\u002f",Local :"\u0061\u006e\u0079"}:_bac :=NewElementsAndRefinementsGroupChoice ();if _ag :=d .DecodeElement (&_bac .Any ,&_bea );_ag !=nil {return _ag ;};_efd .Choice =append (_efd .Choice ,_bac );default:_f .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",_bea .Name );if _ac :=d .Skip ();_ac !=nil {return _ac ;};};case _e .EndElement :break _dgd ;case _e .CharData :};};return nil ;};
// Validate validates the Period and its children
func (_ded *Period )Validate ()error {return _ded .ValidateWithPath ("\u0050\u0065\u0072\u0069\u006f\u0064");};
// ValidateWithPath validates the Box and its children, prefixing error messages with path
func (_cg *Box )ValidateWithPath (path string )error {return nil };
// ValidateWithPath validates the ISO3166 and its children, prefixing error messages with path
func (_geg *ISO3166 )ValidateWithPath (path string )error {return nil };
// Validate validates the LCC and its children
func (_ffd *LCC )Validate ()error {return _ffd .ValidateWithPath ("\u004c\u0043\u0043")};type TGN struct{};
// ValidateWithPath validates the LCSH and its children, prefixing error messages with path
func (_dcg *LCSH )ValidateWithPath (path string )error {return nil };type ElementsAndRefinementsGroup struct{Choice []*ElementsAndRefinementsGroupChoice ;};
// ValidateWithPath validates the IMT and its children, prefixing error messages with path
func (_edd *IMT )ValidateWithPath (path string )error {return nil };func (_feb *UDC )UnmarshalXML (d *_e .Decoder ,start _e .StartElement )error {for {_eea ,_dae :=d .Token ();if _dae !=nil {return _g .Errorf ("\u0070a\u0072s\u0069\u006e\u0067\u0020\u0055\u0044\u0043\u003a\u0020\u0025\u0073",_dae );};if _fd ,_aaf :=_eea .(_e .EndElement );_aaf &&_fd .Name ==start .Name {break ;};};return nil ;};
// ValidateWithPath validates the ElementsAndRefinementsGroupChoice and its children, prefixing error messages with path
func (_ce *ElementsAndRefinementsGroupChoice )ValidateWithPath (path string )error {for _bba ,_aea :=range _ce .Any {if _bfd :=_aea .ValidateWithPath (_g .Sprintf ("\u0025\u0073\u002f\u0041\u006e\u0079\u005b\u0025\u0064\u005d",path ,_bba ));_bfd !=nil {return _bfd ;};};return nil ;};
// Validate validates the Point and its children
func (_edde *Point )Validate ()error {return _edde .ValidateWithPath ("\u0050\u006f\u0069n\u0074")};
// ValidateWithPath validates the DCMIType and its children, prefixing error messages with path
func (_ad *DCMIType )ValidateWithPath (path string )error {return nil };func (_ccf *ISO639_2 )UnmarshalXML (d *_e .Decoder ,start _e .StartElement )error {for {_bcg ,_fged :=d .Token ();if _fged !=nil {return _g .Errorf ("p\u0061r\u0073\u0069\u006e\u0067\u0020\u0049\u0053\u004f6\u0033\u0039\u005f\u0032: \u0025\u0073",_fged );};if _cfg ,_fbd :=_bcg .(_e .EndElement );_fbd &&_cfg .Name ==start .Name {break ;};};return nil ;};func (_dbf *ISO639_2 )MarshalXML (e *_e .Encoder ,start _e .StartElement )error {start .Name .Local ="\u0049\u0053\u004f\u0036\u0033\u0039\u002d\u0032";e .EncodeToken (start );e .EncodeToken (_e .EndElement {Name :start .Name });return nil ;};func NewRFC3066 ()*RFC3066 {_bfde :=&RFC3066 {};return _bfde };
// ValidateWithPath validates the LCC and its children, prefixing error messages with path
func (_edc *LCC )ValidateWithPath (path string )error {return nil };func NewElementsAndRefinementsGroup ()*ElementsAndRefinementsGroup {_fa :=&ElementsAndRefinementsGroup {};return _fa ;};func (_ceeg *Point )UnmarshalXML (d *_e .Decoder ,start _e .StartElement )error {for {_aag ,_bead :=d .Token ();if _bead !=nil {return _g .Errorf ("\u0070\u0061\u0072\u0073\u0069\u006e\u0067\u0020\u0050\u006f\u0069\u006et\u003a\u0020\u0025\u0073",_bead );};if _fec ,_ceeb :=_aag .(_e .EndElement );_ceeb &&_fec .Name ==start .Name {break ;};};return nil ;};func (_gd *DCMIType )UnmarshalXML (d *_e .Decoder ,start _e .StartElement )error {for {_ef ,_bg :=d .Token ();if _bg !=nil {return _g .Errorf ("p\u0061r\u0073\u0069\u006e\u0067\u0020\u0044\u0043\u004dI\u0054\u0079\u0070\u0065: \u0025\u0073",_bg );};if _df ,_aa :=_ef .(_e .EndElement );_aa &&_df .Name ==start .Name {break ;};};return nil ;};
// ValidateWithPath validates the W3CDTF and its children, prefixing error messages with path
func (_bcf *W3CDTF )ValidateWithPath (path string )error {return nil };func NewElementsAndRefinementsGroupChoice ()*ElementsAndRefinementsGroupChoice {_aab :=&ElementsAndRefinementsGroupChoice {};return _aab ;};
// ValidateWithPath validates the ElementOrRefinementContainer and its children, prefixing error messages with path
func (_ee *ElementOrRefinementContainer )ValidateWithPath (path string )error {for _efdd ,_bff :=range _ee .Choice {if _fef :=_bff .ValidateWithPath (_g .Sprintf ("\u0025\u0073\u002f\u0043\u0068\u006f\u0069\u0063\u0065\u005b\u0025\u0064\u005d",path ,_efdd ));_fef !=nil {return _fef ;};};return nil ;};func (_cee *LCC )UnmarshalXML (d *_e .Decoder ,start _e .StartElement )error {for {_fbc ,_gdc :=d .Token ();if _gdc !=nil {return _g .Errorf ("\u0070a\u0072s\u0069\u006e\u0067\u0020\u004c\u0043\u0043\u003a\u0020\u0025\u0073",_gdc );};if _bga ,_acg :=_fbc .(_e .EndElement );_acg &&_bga .Name ==start .Name {break ;};};return nil ;};type URI struct{};func (_dd *ElementsAndRefinementsGroupChoice )UnmarshalXML (d *_e .Decoder ,start _e .StartElement )error {_dfb :for {_bdbb ,_fc :=d .Token ();if _fc !=nil {return _fc ;};switch _dgdb :=_bdbb .(type ){case _e .StartElement :switch _dgdb .Name {case _e .Name {Space :"\u0068\u0074\u0074\u0070\u003a\u002f\u002f\u0070\u0075\u0072\u006c\u002e\u006f\u0072\u0067/\u0064c\u002f\u0065\u006c\u0065\u006d\u0065\u006e\u0074\u0073\u002f\u0031\u002e\u0031\u002f",Local :"\u0061\u006e\u0079"}:_eeg :=_fe .NewAny ();if _dab :=d .DecodeElement (_eeg ,&_dgdb );_dab !=nil {return _dab ;};_dd .Any =append (_dd .Any ,_eeg );default:_f .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",_dgdb .Name );if _dbg :=d .Skip ();_dbg !=nil {return _dbg ;};};case _e .EndElement :break _dfb ;case _e .CharData :};};return nil ;};
// Validate validates the URI and its children
func (_gfe *URI )Validate ()error {return _gfe .ValidateWithPath ("\u0055\u0052\u0049")};func (_cc *DCMIType )MarshalXML (e *_e .Encoder ,start _e .StartElement )error {start .Name .Local ="\u0044\u0043\u004d\u0049\u0054\u0079\u0070\u0065";e .EncodeToken (start );e .EncodeToken (_e .EndElement {Name :start .Name });return nil ;};
// Validate validates the TGN and its children
func (_cge *TGN )Validate ()error {return _cge .ValidateWithPath ("\u0054\u0047\u004e")};type Period struct{};func (_cd *IMT )MarshalXML (e *_e .Encoder ,start _e .StartElement )error {start .Name .Local ="\u0049\u004d\u0054";e .EncodeToken (start );e .EncodeToken (_e .EndElement {Name :start .Name });return nil ;};func (_fba *RFC3066 )MarshalXML (e *_e .Encoder ,start _e .StartElement )error {start .Name .Local ="\u0052F\u0043\u0033\u0030\u0036\u0036";e .EncodeToken (start );e .EncodeToken (_e .EndElement {Name :start .Name });return nil ;};
// Validate validates the RFC3066 and its children
func (_ece *RFC3066 )Validate ()error {return _ece .ValidateWithPath ("\u0052F\u0043\u0033\u0030\u0036\u0036");};func NewDCMIType ()*DCMIType {_gg :=&DCMIType {};return _gg };type RFC3066 struct{};func (_aae *LCSH )MarshalXML (e *_e .Encoder ,start _e .StartElement )error {start .Name .Local ="\u004c\u0043\u0053\u0048";e .EncodeToken (start );e .EncodeToken (_e .EndElement {Name :start .Name });return nil ;};type Box struct{};func (_fgb *Period )UnmarshalXML (d *_e .Decoder ,start _e .StartElement )error {for {_cac ,_bfc :=d .Token ();if _bfc !=nil {return _g .Errorf ("\u0070a\u0072s\u0069\u006e\u0067\u0020\u0050e\u0072\u0069o\u0064\u003a\u0020\u0025\u0073",_bfc );};if _cfge ,_fefg :=_cac .(_e .EndElement );_fefg &&_cfge .Name ==start .Name {break ;};};return nil ;};func (_bdf *W3CDTF )UnmarshalXML (d *_e .Decoder ,start _e .StartElement )error {for {_bgbc ,_eba :=d .Token ();if _eba !=nil {return _g .Errorf ("\u0070a\u0072s\u0069\u006e\u0067\u0020\u00573\u0043\u0044T\u0046\u003a\u0020\u0025\u0073",_eba );};if _geb ,_gddb :=_bgbc .(_e .EndElement );_gddb &&_geb .Name ==start .Name {break ;};};return nil ;};
// Validate validates the Box and its children
func (_eb *Box )Validate ()error {return _eb .ValidateWithPath ("\u0042\u006f\u0078")};
// Validate validates the ElementsAndRefinementsGroupChoice and its children
func (_dbc *ElementsAndRefinementsGroupChoice )Validate ()error {return _dbc .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");};
// Validate validates the DCMIType and its children
func (_bf *DCMIType )Validate ()error {return _bf .ValidateWithPath ("\u0044\u0043\u004d\u0049\u0054\u0079\u0070\u0065");};func NewIMT ()*IMT {_ffb :=&IMT {};return _ffb };
// Validate validates the MESH and its children
func (_cfga *MESH )Validate ()error {return _cfga .ValidateWithPath ("\u004d\u0045\u0053\u0048")};type UDC struct{};func (_abf *TGN )UnmarshalXML (d *_e .Decoder ,start _e .StartElement )error {for {_bfa ,_fgd :=d .Token ();if _fgd !=nil {return _g .Errorf ("\u0070a\u0072s\u0069\u006e\u0067\u0020\u0054\u0047\u004e\u003a\u0020\u0025\u0073",_fgd );};if _dbgg ,_cba :=_bfa .(_e .EndElement );_cba &&_dbgg .Name ==start .Name {break ;};};return nil ;};func (_ga *ElementsAndRefinementsGroup )MarshalXML (e *_e .Encoder ,start _e .StartElement )error {if _ga .Choice !=nil {for _ ,_dcc :=range _ga .Choice {_dcc .MarshalXML (e ,_e .StartElement {});};};return nil ;};type IMT struct{};
// ValidateWithPath validates the Point and its children, prefixing error messages with path
func (_fcc *Point )ValidateWithPath (path string )error {return nil };
// Validate validates the ISO3166 and its children
func (_dgde *ISO3166 )Validate ()error {return _dgde .ValidateWithPath ("\u0049S\u004f\u0033\u0031\u0036\u0036");};type W3CDTF struct{};
// Validate validates the ElementOrRefinementContainer and its children
func (_afd *ElementOrRefinementContainer )Validate ()error {return _afd .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 (_de *Box )UnmarshalXML (d *_e .Decoder ,start _e .StartElement )error {for {_fg ,_c :=d .Token ();if _c !=nil {return _g .Errorf ("\u0070a\u0072s\u0069\u006e\u0067\u0020\u0042\u006f\u0078\u003a\u0020\u0025\u0073",_c );};if _ge ,_a :=_fg .(_e .EndElement );_a &&_ge .Name ==start .Name {break ;};};return nil ;};func (_bgb *TGN )MarshalXML (e *_e .Encoder ,start _e .StartElement )error {start .Name .Local ="\u0054\u0047\u004e";e .EncodeToken (start );e .EncodeToken (_e .EndElement {Name :start .Name });return nil ;};func NewBox ()*Box {_ba :=&Box {};return _ba };func (_dg *DDC )MarshalXML (e *_e .Encoder ,start _e .StartElement )error {start .Name .Local ="\u0044\u0044\u0043";e .EncodeToken (start );e .EncodeToken (_e .EndElement {Name :start .Name });return nil ;};func (_ceb *URI )UnmarshalXML (d *_e .Decoder ,start _e .StartElement )error {for {_dgded ,_aad :=d .Token ();if _aad !=nil {return _g .Errorf ("\u0070a\u0072s\u0069\u006e\u0067\u0020\u0055\u0052\u0049\u003a\u0020\u0025\u0073",_aad );};if _gbf ,_beb :=_dgded .(_e .EndElement );_beb &&_gbf .Name ==start .Name {break ;};};return nil ;};func (_aac *MESH )UnmarshalXML (d *_e .Decoder ,start _e .StartElement )error {for {_ced ,_fgc :=d .Token ();if _fgc !=nil {return _g .Errorf ("\u0070\u0061r\u0073\u0069\u006eg\u0020\u004d\u0045\u0053\u0048\u003a\u0020\u0025\u0073",_fgc );};if _cb ,_gcg :=_ced .(_e .EndElement );_gcg &&_cb .Name ==start .Name {break ;};};return nil ;};func NewRFC1766 ()*RFC1766 {_aba :=&RFC1766 {};return _aba };
// ValidateWithPath validates the TGN and its children, prefixing error messages with path
func (_bfdd *TGN )ValidateWithPath (path string )error {return nil };
// Validate validates the DDC and its children
func (_af *DDC )Validate ()error {return _af .ValidateWithPath ("\u0044\u0044\u0043")};
// Validate validates the ElementsAndRefinementsGroup and its children
func (_afg *ElementsAndRefinementsGroup )Validate ()error {return _afg .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 (_dgb *UDC )MarshalXML (e *_e .Encoder ,start _e .StartElement )error {start .Name .Local ="\u0055\u0044\u0043";e .EncodeToken (start );e .EncodeToken (_e .EndElement {Name :start .Name });return nil ;};func init (){_b .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 );_b .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 );_b .RegisterConstructor ("\u0068t\u0074\u0070\u003a\u002f/\u0070\u0075\u0072\u006c\u002eo\u0072g\u002fd\u0063\u002f\u0074\u0065\u0072\u006d\u0073/","\u0044\u0044\u0043",NewDDC );_b .RegisterConstructor ("\u0068t\u0074\u0070\u003a\u002f/\u0070\u0075\u0072\u006c\u002eo\u0072g\u002fd\u0063\u002f\u0074\u0065\u0072\u006d\u0073/","\u004c\u0043\u0043",NewLCC );_b .RegisterConstructor ("\u0068t\u0074\u0070\u003a\u002f/\u0070\u0075\u0072\u006c\u002eo\u0072g\u002fd\u0063\u002f\u0074\u0065\u0072\u006d\u0073/","\u0055\u0044\u0043",NewUDC );_b .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 );_b .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 );_b .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 );_b .RegisterConstructor ("\u0068t\u0074\u0070\u003a\u002f/\u0070\u0075\u0072\u006c\u002eo\u0072g\u002fd\u0063\u002f\u0074\u0065\u0072\u006d\u0073/","\u0049\u004d\u0054",NewIMT );_b .RegisterConstructor ("\u0068t\u0074\u0070\u003a\u002f/\u0070\u0075\u0072\u006c\u002eo\u0072g\u002fd\u0063\u002f\u0074\u0065\u0072\u006d\u0073/","\u0055\u0052\u0049",NewURI );_b .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 );_b .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 );_b .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 );_b .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 );_b .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 );_b .RegisterConstructor ("\u0068t\u0074\u0070\u003a\u002f/\u0070\u0075\u0072\u006c\u002eo\u0072g\u002fd\u0063\u002f\u0074\u0065\u0072\u006d\u0073/","\u0042\u006f\u0078",NewBox );_b .RegisterConstructor ("\u0068t\u0074\u0070\u003a\u002f/\u0070\u0075\u0072\u006c\u002eo\u0072g\u002fd\u0063\u002f\u0074\u0065\u0072\u006d\u0073/","\u0054\u0047\u004e",NewTGN );_b .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 );_b .RegisterConstructor ("\u0068t\u0074\u0070\u003a\u002f/\u0070\u0075\u0072\u006c\u002eo\u0072g\u002fd\u0063\u002f\u0074\u0065\u0072\u006d\u0073/","e\u006c\u0065\u006d\u0065\u006e\u0074s\u0041\u006e\u0064\u0052\u0065\u0066\u0069\u006e\u0065m\u0065\u006e\u0074s\u0047r\u006f\u0075\u0070",NewElementsAndRefinementsGroup );};

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -9,10 +9,10 @@
// Use of this source code is governed by the UniDoc End User License Agreement
// terms that can be accessed at https://unidoc.io/eula/
package lockedCanvas ;import (_e "encoding/xml";_ac "fmt";_b "github.com/unidoc/unioffice";_g "github.com/unidoc/unioffice/schema/soo/dml";);func (_bd *LockedCanvas )MarshalXML (e *_e .Encoder ,start _e .StartElement )error {start .Attr =append (start .Attr ,_e .Attr {Name :_e .Name {Local :"\u0078\u006d\u006cn\u0073"},Value :"h\u0074\u0074\u0070\u003a\u002f\u002f\u0073\u0063\u0068\u0065\u006d\u0061\u0073\u002e\u006f\u0070\u0065\u006e\u0078\u006d\u006c\u0066\u006f\u0072\u006d\u0061t\u0073.\u006f\u0072\u0067\u002fd\u0072\u0061w\u0069\u006e\u0067\u006d\u006c\u002f\u0032\u0030\u0030\u0036\u002f\u006c\u006f\u0063\u006b\u0065\u0064\u0043\u0061\u006e\u0076\u0061\u0073"});start .Attr =append (start .Attr ,_e .Attr {Name :_e .Name {Local :"\u0078m\u006c\u006e\u0073\u003a\u0078\u006dl"},Value :"\u0068\u0074tp\u003a\u002f\u002fw\u0077\u0077\u002e\u00773.o\u0072g/\u0058\u004d\u004c\u002f\u0031\u0039\u00398/\u006e\u0061\u006d\u0065\u0073\u0070\u0061c\u0065"});start .Name .Local ="\u006c\u006f\u0063k\u0065\u0064\u0043\u0061\u006e\u0076\u0061\u0073";return _bd .CT_GvmlGroupShape .MarshalXML (e ,start );};func NewLockedCanvas ()*LockedCanvas {_c :=&LockedCanvas {};_c .CT_GvmlGroupShape =*_g .NewCT_GvmlGroupShape ();return _c ;};
// Validate validates the LockedCanvas and its children
func (_bb *LockedCanvas )Validate ()error {return _bb .ValidateWithPath ("\u004c\u006f\u0063k\u0065\u0064\u0043\u0061\u006e\u0076\u0061\u0073");};type LockedCanvas struct{_g .CT_GvmlGroupShape };func (_gg *LockedCanvas )UnmarshalXML (d *_e .Decoder ,start _e .StartElement )error {_gg .CT_GvmlGroupShape =*_g .NewCT_GvmlGroupShape ();for {_d ,_bdc :=d .Token ();if _bdc !=nil {return _ac .Errorf ("\u0070a\u0072\u0073\u0069\u006e\u0067\u0020\u004c\u006f\u0063\u006b\u0065d\u0043\u0061\u006e\u0076\u0061\u0073\u003a\u0020\u0025\u0073",_bdc );};if _bdcb ,_df :=_d .(_e .EndElement );_df &&_bdcb .Name ==start .Name {break ;};};return nil ;};
package lockedCanvas ;import (_gd "encoding/xml";_f "fmt";_b "github.com/unidoc/unioffice";_ff "github.com/unidoc/unioffice/schema/soo/dml";);
// ValidateWithPath validates the LockedCanvas and its children, prefixing error messages with path
func (_f *LockedCanvas )ValidateWithPath (path string )error {if _ca :=_f .CT_GvmlGroupShape .ValidateWithPath (path );_ca !=nil {return _ca ;};return nil ;};func init (){_b .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 (_ge *LockedCanvas )ValidateWithPath (path string )error {if _ga :=_ge .CT_GvmlGroupShape .ValidateWithPath (path );_ga !=nil {return _ga ;};return nil ;};func (_ba *LockedCanvas )UnmarshalXML (d *_gd .Decoder ,start _gd .StartElement )error {_ba .CT_GvmlGroupShape =*_ff .NewCT_GvmlGroupShape ();for {_ffa ,_d :=d .Token ();if _d !=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",_d );};if _dg ,_fe :=_ffa .(_gd .EndElement );_fe &&_dg .Name ==start .Name {break ;};};return nil ;};func NewLockedCanvas ()*LockedCanvas {_fa :=&LockedCanvas {};_fa .CT_GvmlGroupShape =*_ff .NewCT_GvmlGroupShape ();return _fa ;};
// Validate validates the LockedCanvas and its children
func (_fb *LockedCanvas )Validate ()error {return _fb .ValidateWithPath ("\u004c\u006f\u0063k\u0065\u0064\u0043\u0061\u006e\u0076\u0061\u0073");};func (_gf *LockedCanvas )MarshalXML (e *_gd .Encoder ,start _gd .StartElement )error {start .Attr =append (start .Attr ,_gd .Attr {Name :_gd .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 ,_gd .Attr {Name :_gd .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 _gf .CT_GvmlGroupShape .MarshalXML (e ,start );};type LockedCanvas struct{_ff .CT_GvmlGroupShape };func init (){_b .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

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 relationships ;import (_c "encoding/xml";_b "fmt";_bd "github.com/unidoc/unioffice";_bf "github.com/unidoc/unioffice/common/logger";);type ST_TargetMode byte ;func (_fad ST_TargetMode )String ()string {switch _fad {case 0:return "";case 1:return "\u0045\u0078\u0074\u0065\u0072\u006e\u0061\u006c";case 2:return "\u0049\u006e\u0074\u0065\u0072\u006e\u0061\u006c";};return "";};func NewCT_Relationship ()*CT_Relationship {_d :=&CT_Relationship {};return _d };func (_fb *Relationship )UnmarshalXML (d *_c .Decoder ,start _c .StartElement )error {_fb .CT_Relationship =*NewCT_Relationship ();for _ ,_adb :=range start .Attr {if _adb .Name .Local =="\u0054\u0061\u0072\u0067\u0065\u0074\u004d\u006f\u0064\u0065"{_fb .TargetModeAttr .UnmarshalXMLAttr (_adb );continue ;};if _adb .Name .Local =="\u0054\u0061\u0072\u0067\u0065\u0074"{_ae ,_ddc :=_adb .Value ,error (nil );if _ddc !=nil {return _ddc ;};_fb .TargetAttr =_ae ;continue ;};if _adb .Name .Local =="\u0054\u0079\u0070\u0065"{_bdf ,_gce :=_adb .Value ,error (nil );if _gce !=nil {return _gce ;};_fb .TypeAttr =_bdf ;continue ;};if _adb .Name .Local =="\u0049\u0064"{_bc ,_cac :=_adb .Value ,error (nil );if _cac !=nil {return _cac ;};_fb .IdAttr =_bc ;continue ;};};for {_af ,_ddd :=d .Token ();if _ddd !=nil {return _b .Errorf ("\u0070a\u0072\u0073\u0069\u006e\u0067\u0020\u0052\u0065\u006c\u0061\u0074i\u006f\u006e\u0073\u0068\u0069\u0070\u003a\u0020\u0025\u0073",_ddd );};if _ec ,_afc :=_af .(_c .EndElement );_afc &&_ec .Name ==start .Name {break ;};};return nil ;};
// Validate validates the Relationship and its children
func (_dbe *Relationship )Validate ()error {return _dbe .ValidateWithPath ("\u0052\u0065\u006ca\u0074\u0069\u006f\u006e\u0073\u0068\u0069\u0070");};
// ValidateWithPath validates the Relationship and its children, prefixing error messages with path
func (_cec *Relationship )ValidateWithPath (path string )error {if _bfc :=_cec .CT_Relationship .ValidateWithPath (path );_bfc !=nil {return _bfc ;};return nil ;};func (_gf *CT_Relationship )UnmarshalXML (d *_c .Decoder ,start _c .StartElement )error {for _ ,_gdb :=range start .Attr {if _gdb .Name .Local =="\u0054\u0061\u0072\u0067\u0065\u0074\u004d\u006f\u0064\u0065"{_gf .TargetModeAttr .UnmarshalXMLAttr (_gdb );continue ;};if _gdb .Name .Local =="\u0054\u0061\u0072\u0067\u0065\u0074"{_a ,_dg :=_gdb .Value ,error (nil );if _dg !=nil {return _dg ;};_gf .TargetAttr =_a ;continue ;};if _gdb .Name .Local =="\u0054\u0079\u0070\u0065"{_bg ,_ag :=_gdb .Value ,error (nil );if _ag !=nil {return _ag ;};_gf .TypeAttr =_bg ;continue ;};if _gdb .Name .Local =="\u0049\u0064"{_cf ,_gc :=_gdb .Value ,error (nil );if _gc !=nil {return _gc ;};_gf .IdAttr =_cf ;continue ;};};for {_gfc ,_cd :=d .Token ();if _cd !=nil {return _b .Errorf ("p\u0061\u0072\u0073\u0069\u006e\u0067 \u0043\u0054\u005f\u0052\u0065\u006c\u0061\u0074\u0069o\u006e\u0073\u0068i\u0070:\u0020\u0025\u0073",_cd );};if _cg ,_ca :=_gfc .(_c .CharData );_ca {_gf .Content =string (_cg );};if _ce ,_dd :=_gfc .(_c .EndElement );_dd &&_ce .Name ==start .Name {break ;};};return nil ;};
// ValidateWithPath validates the CT_Relationships and its children, prefixing error messages with path
func (_fa *CT_Relationships )ValidateWithPath (path string )error {for _ff ,_ad :=range _fa .Relationship {if _fgg :=_ad .ValidateWithPath (_b .Sprintf ("\u0025\u0073\u002f\u0052el\u0061\u0074\u0069\u006f\u006e\u0073\u0068\u0069\u0070\u005b\u0025\u0064\u005d",path ,_ff ));_fgg !=nil {return _fgg ;};};return nil ;};func (_bb *CT_Relationships )MarshalXML (e *_c .Encoder ,start _c .StartElement )error {e .EncodeToken (start );if _bb .Relationship !=nil {_ge :=_c .StartElement {Name :_c .Name {Local :"\u0052\u0065\u006ca\u0074\u0069\u006f\u006e\u0073\u0068\u0069\u0070"}};for _ ,_fg :=range _bb .Relationship {e .EncodeElement (_fg ,_ge );};};e .EncodeToken (_c .EndElement {Name :start .Name });return nil ;};
// Validate validates the CT_Relationship and its children
func (_ac *CT_Relationship )Validate ()error {return _ac .ValidateWithPath ("\u0043T\u005fR\u0065\u006c\u0061\u0074\u0069\u006f\u006e\u0073\u0068\u0069\u0070");};func (_gdg ST_TargetMode )MarshalXML (e *_c .Encoder ,start _c .StartElement )error {return e .EncodeElement (_gdg .String (),start );};func (_ffd *Relationships )UnmarshalXML (d *_c .Decoder ,start _c .StartElement )error {_ffd .CT_Relationships =*NewCT_Relationships ();_bdc :for {_cdb ,_dc :=d .Token ();if _dc !=nil {return _dc ;};switch _fab :=_cdb .(type ){case _c .StartElement :switch _fab .Name {case _c .Name {Space :"ht\u0074\u0070:\u002f\u002f\u0073\u0063\u0068\u0065\u006d\u0061\u0073.\u006f\u0070\u0065\u006e\u0078\u006d\u006c\u0066\u006f\u0072\u006d\u0061\u0074\u0073\u002e\u006f\u0072\u0067\u002f\u0070\u0061\u0063\u006b\u0061\u0067\u0065\u002f\u00320\u00306\u002f\u0072\u0065\u006c\u0061\u0074\u0069\u006fn\u0073h\u0069\u0070s",Local :"\u0052\u0065\u006ca\u0074\u0069\u006f\u006e\u0073\u0068\u0069\u0070"}:_cag :=NewRelationship ();if _cgg :=d .DecodeElement (_cag ,&_fab );_cgg !=nil {return _cgg ;};_ffd .Relationship =append (_ffd .Relationship ,_cag );default:_bf .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\u0052\u0065\u006c\u0061t\u0069\u006f\u006e\u0073\u0068\u0069\u0070\u0073 \u0025\u0076",_fab .Name );if _ggb :=d .Skip ();_ggb !=nil {return _ggb ;};};case _c .EndElement :break _bdc ;case _c .CharData :};};return nil ;};func NewCT_Relationships ()*CT_Relationships {_cfc :=&CT_Relationships {};return _cfc };func (_da *Relationships )MarshalXML (e *_c .Encoder ,start _c .StartElement )error {start .Attr =append (start .Attr ,_c .Attr {Name :_c .Name {Local :"\u0078\u006d\u006cn\u0073"},Value :"ht\u0074\u0070:\u002f\u002f\u0073\u0063\u0068\u0065\u006d\u0061\u0073.\u006f\u0070\u0065\u006e\u0078\u006d\u006c\u0066\u006f\u0072\u006d\u0061\u0074\u0073\u002e\u006f\u0072\u0067\u002f\u0070\u0061\u0063\u006b\u0061\u0067\u0065\u002f\u00320\u00306\u002f\u0072\u0065\u006c\u0061\u0074\u0069\u006fn\u0073h\u0069\u0070s"});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 ="\u0052\u0065\u006c\u0061\u0074\u0069\u006f\u006e\u0073\u0068\u0069\u0070\u0073";return _da .CT_Relationships .MarshalXML (e ,start );};
// ValidateWithPath validates the CT_Relationship and its children, prefixing error messages with path
func (_bgb *CT_Relationship )ValidateWithPath (path string )error {if _edb :=_bgb .TargetModeAttr .ValidateWithPath (path +"\u002fT\u0061r\u0067\u0065\u0074\u004d\u006f\u0064\u0065\u0041\u0074\u0074\u0072");_edb !=nil {return _edb ;};return nil ;};func (_ea *CT_Relationships )UnmarshalXML (d *_c .Decoder ,start _c .StartElement )error {_eb :for {_gg ,_ab :=d .Token ();if _ab !=nil {return _ab ;};switch _fga :=_gg .(type ){case _c .StartElement :switch _fga .Name {case _c .Name {Space :"ht\u0074\u0070:\u002f\u002f\u0073\u0063\u0068\u0065\u006d\u0061\u0073.\u006f\u0070\u0065\u006e\u0078\u006d\u006c\u0066\u006f\u0072\u006d\u0061\u0074\u0073\u002e\u006f\u0072\u0067\u002f\u0070\u0061\u0063\u006b\u0061\u0067\u0065\u002f\u00320\u00306\u002f\u0072\u0065\u006c\u0061\u0074\u0069\u006fn\u0073h\u0069\u0070s",Local :"\u0052\u0065\u006ca\u0074\u0069\u006f\u006e\u0073\u0068\u0069\u0070"}:_cdg :=NewRelationship ();if _db :=d .DecodeElement (_cdg ,&_fga );_db !=nil {return _db ;};_ea .Relationship =append (_ea .Relationship ,_cdg );default:_bf .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\u0052\u0065\u006c\u0061\u0074\u0069\u006f\u006e\u0073\u0068\u0069\u0070\u0073\u0020\u0025v",_fga .Name );if _aa :=d .Skip ();_aa !=nil {return _aa ;};};case _c .EndElement :break _eb ;case _c .CharData :};};return nil ;};func NewRelationships ()*Relationships {_gdbd :=&Relationships {};_gdbd .CT_Relationships =*NewCT_Relationships ();return _gdbd ;};func (_fc *ST_TargetMode )UnmarshalXML (d *_c .Decoder ,start _c .StartElement )error {_ffa ,_dbg :=d .Token ();if _dbg !=nil {return _dbg ;};if _cea ,_ga :=_ffa .(_c .EndElement );_ga &&_cea .Name ==start .Name {*_fc =1;return nil ;};if _dab ,_gb :=_ffa .(_c .CharData );!_gb {return _b .Errorf ("\u0065\u0078\u0070\u0065\u0063\u0074\u0065\u0064\u0020\u0063\u0068a\u0072\u0020\u0064\u0061\u0074\u0061\u002c\u0020\u0067\u006ft\u0020\u0025\u0054",_ffa );}else {switch string (_dab ){case "":*_fc =0;case "\u0045\u0078\u0074\u0065\u0072\u006e\u0061\u006c":*_fc =1;case "\u0049\u006e\u0074\u0065\u0072\u006e\u0061\u006c":*_fc =2;};};_ffa ,_dbg =d .Token ();if _dbg !=nil {return _dbg ;};if _afg ,_abe :=_ffa .(_c .EndElement );_abe &&_afg .Name ==start .Name {return nil ;};return _b .Errorf ("\u0065\u0078\u0070\u0065c\u0074\u0065\u0064\u0020\u0065\u006e\u0064\u0020\u0065\u006ce\u006de\u006e\u0074\u002c\u0020\u0067\u006f\u0074 \u0025\u0076",_ffa );};func (_gcc ST_TargetMode )ValidateWithPath (path string )error {switch _gcc {case 0,1,2:default:return _b .Errorf ("\u0025s\u003a\u0020\u006f\u0075t\u0020\u006f\u0066\u0020\u0072a\u006eg\u0065 \u0076\u0061\u006c\u0075\u0065\u0020\u0025d",path ,int (_gcc ));};return nil ;};func (_cge *ST_TargetMode )UnmarshalXMLAttr (attr _c .Attr )error {switch attr .Value {case "":*_cge =0;case "\u0045\u0078\u0074\u0065\u0072\u006e\u0061\u006c":*_cge =1;case "\u0049\u006e\u0074\u0065\u0072\u006e\u0061\u006c":*_cge =2;};return nil ;};func (_ef *Relationship )MarshalXML (e *_c .Encoder ,start _c .StartElement )error {return _ef .CT_Relationship .MarshalXML (e ,start );};
// ValidateWithPath validates the Relationships and its children, prefixing error messages with path
func (_gff *Relationships )ValidateWithPath (path string )error {if _geb :=_gff .CT_Relationships .ValidateWithPath (path );_geb !=nil {return _geb ;};return nil ;};func NewRelationship ()*Relationship {_gga :=&Relationship {};_gga .CT_Relationship =*NewCT_Relationship ();return _gga ;};func (_bbf ST_TargetMode )MarshalXMLAttr (name _c .Name )(_c .Attr ,error ){_adbf :=_c .Attr {};_adbf .Name =name ;switch _bbf {case ST_TargetModeUnset :_adbf .Value ="";case ST_TargetModeExternal :_adbf .Value ="\u0045\u0078\u0074\u0065\u0072\u006e\u0061\u006c";case ST_TargetModeInternal :_adbf .Value ="\u0049\u006e\u0074\u0065\u0072\u006e\u0061\u006c";};return _adbf ,nil ;};func (_e *CT_Relationship )MarshalXML (e *_c .Encoder ,start _c .StartElement )error {if _e .TargetModeAttr !=ST_TargetModeUnset {_f ,_gd :=_e .TargetModeAttr .MarshalXMLAttr (_c .Name {Local :"\u0054\u0061\u0072\u0067\u0065\u0074\u004d\u006f\u0064\u0065"});if _gd !=nil {return _gd ;};start .Attr =append (start .Attr ,_f );};start .Attr =append (start .Attr ,_c .Attr {Name :_c .Name {Local :"\u0054\u0061\u0072\u0067\u0065\u0074"},Value :_b .Sprintf ("\u0025\u0076",_e .TargetAttr )});start .Attr =append (start .Attr ,_c .Attr {Name :_c .Name {Local :"\u0054\u0079\u0070\u0065"},Value :_b .Sprintf ("\u0025\u0076",_e .TypeAttr )});start .Attr =append (start .Attr ,_c .Attr {Name :_c .Name {Local :"\u0049\u0064"},Value :_b .Sprintf ("\u0025\u0076",_e .IdAttr )});e .EncodeElement (_e .Content ,start );e .EncodeToken (_c .EndElement {Name :start .Name });return nil ;};func (_ebe ST_TargetMode )Validate ()error {return _ebe .ValidateWithPath ("")};type Relationships struct{CT_Relationships };const (ST_TargetModeUnset ST_TargetMode =0;ST_TargetModeExternal ST_TargetMode =1;ST_TargetModeInternal ST_TargetMode =2;);
// Validate validates the Relationships and its children
func (_dgc *Relationships )Validate ()error {return _dgc .ValidateWithPath ("\u0052\u0065\u006c\u0061\u0074\u0069\u006f\u006e\u0073\u0068\u0069\u0070\u0073");};type CT_Relationship struct{TargetModeAttr ST_TargetMode ;TargetAttr string ;TypeAttr string ;IdAttr string ;Content string ;};type CT_Relationships struct{Relationship []*Relationship ;};
package relationships ;import (_e "encoding/xml";_f "fmt";_c "github.com/unidoc/unioffice";_a "github.com/unidoc/unioffice/common/logger";);
// Validate validates the CT_Relationships and its children
func (_ee *CT_Relationships )Validate ()error {return _ee .ValidateWithPath ("\u0043\u0054_\u0052\u0065\u006ca\u0074\u0069\u006f\u006e\u0073\u0068\u0069\u0070\u0073");};type Relationship struct{CT_Relationship };func init (){_bd .RegisterConstructor ("ht\u0074\u0070:\u002f\u002f\u0073\u0063\u0068\u0065\u006d\u0061\u0073.\u006f\u0070\u0065\u006e\u0078\u006d\u006c\u0066\u006f\u0072\u006d\u0061\u0074\u0073\u002e\u006f\u0072\u0067\u002f\u0070\u0061\u0063\u006b\u0061\u0067\u0065\u002f\u00320\u00306\u002f\u0072\u0065\u006c\u0061\u0074\u0069\u006fn\u0073h\u0069\u0070s","\u0043\u0054_\u0052\u0065\u006ca\u0074\u0069\u006f\u006e\u0073\u0068\u0069\u0070\u0073",NewCT_Relationships );_bd .RegisterConstructor ("ht\u0074\u0070:\u002f\u002f\u0073\u0063\u0068\u0065\u006d\u0061\u0073.\u006f\u0070\u0065\u006e\u0078\u006d\u006c\u0066\u006f\u0072\u006d\u0061\u0074\u0073\u002e\u006f\u0072\u0067\u002f\u0070\u0061\u0063\u006b\u0061\u0067\u0065\u002f\u00320\u00306\u002f\u0072\u0065\u006c\u0061\u0074\u0069\u006fn\u0073h\u0069\u0070s","\u0043T\u005fR\u0065\u006c\u0061\u0074\u0069\u006f\u006e\u0073\u0068\u0069\u0070",NewCT_Relationship );_bd .RegisterConstructor ("ht\u0074\u0070:\u002f\u002f\u0073\u0063\u0068\u0065\u006d\u0061\u0073.\u006f\u0070\u0065\u006e\u0078\u006d\u006c\u0066\u006f\u0072\u006d\u0061\u0074\u0073\u002e\u006f\u0072\u0067\u002f\u0070\u0061\u0063\u006b\u0061\u0067\u0065\u002f\u00320\u00306\u002f\u0072\u0065\u006c\u0061\u0074\u0069\u006fn\u0073h\u0069\u0070s","\u0052\u0065\u006c\u0061\u0074\u0069\u006f\u006e\u0073\u0068\u0069\u0070\u0073",NewRelationships );_bd .RegisterConstructor ("ht\u0074\u0070:\u002f\u002f\u0073\u0063\u0068\u0065\u006d\u0061\u0073.\u006f\u0070\u0065\u006e\u0078\u006d\u006c\u0066\u006f\u0072\u006d\u0061\u0074\u0073\u002e\u006f\u0072\u0067\u002f\u0070\u0061\u0063\u006b\u0061\u0067\u0065\u002f\u00320\u00306\u002f\u0072\u0065\u006c\u0061\u0074\u0069\u006fn\u0073h\u0069\u0070s","\u0052\u0065\u006ca\u0074\u0069\u006f\u006e\u0073\u0068\u0069\u0070",NewRelationship );};
func (_ecg *CT_Relationships )Validate ()error {return _ecg .ValidateWithPath ("\u0043\u0054_\u0052\u0065\u006ca\u0074\u0069\u006f\u006e\u0073\u0068\u0069\u0070\u0073");};func NewRelationship ()*Relationship {_cad :=&Relationship {};_cad .CT_Relationship =*NewCT_Relationship ();return _cad ;};type CT_Relationship struct{TargetModeAttr ST_TargetMode ;TargetAttr string ;TypeAttr string ;IdAttr string ;Content string ;};
// Validate validates the Relationship and its children
func (_gd *Relationship )Validate ()error {return _gd .ValidateWithPath ("\u0052\u0065\u006ca\u0074\u0069\u006f\u006e\u0073\u0068\u0069\u0070");};func (_cec *ST_TargetMode )UnmarshalXMLAttr (attr _e .Attr )error {switch attr .Value {case "":*_cec =0;case "\u0045\u0078\u0074\u0065\u0072\u006e\u0061\u006c":*_cec =1;case "\u0049\u006e\u0074\u0065\u0072\u006e\u0061\u006c":*_cec =2;};return nil ;};type ST_TargetMode byte ;type Relationships struct{CT_Relationships };func (_aaa *CT_Relationships )MarshalXML (e *_e .Encoder ,start _e .StartElement )error {e .EncodeToken (start );if _aaa .Relationship !=nil {_cbf :=_e .StartElement {Name :_e .Name {Local :"\u0052\u0065\u006ca\u0074\u0069\u006f\u006e\u0073\u0068\u0069\u0070"}};for _ ,_fgc :=range _aaa .Relationship {e .EncodeElement (_fgc ,_cbf );};};e .EncodeToken (_e .EndElement {Name :start .Name });return nil ;};func NewCT_Relationship ()*CT_Relationship {_eg :=&CT_Relationship {};return _eg };
// ValidateWithPath validates the Relationships and its children, prefixing error messages with path
func (_aca *Relationships )ValidateWithPath (path string )error {if _gg :=_aca .CT_Relationships .ValidateWithPath (path );_gg !=nil {return _gg ;};return nil ;};
// Validate validates the Relationships and its children
func (_fgg *Relationships )Validate ()error {return _fgg .ValidateWithPath ("\u0052\u0065\u006c\u0061\u0074\u0069\u006f\u006e\u0073\u0068\u0069\u0070\u0073");};func (_cadg *ST_TargetMode )UnmarshalXML (d *_e .Decoder ,start _e .StartElement )error {_gge ,_ea :=d .Token ();if _ea !=nil {return _ea ;};if _bdb ,_cdg :=_gge .(_e .EndElement );_cdg &&_bdb .Name ==start .Name {*_cadg =1;return nil ;};if _gbgg ,_bea :=_gge .(_e .CharData );!_bea {return _f .Errorf ("\u0065\u0078\u0070\u0065\u0063\u0074\u0065\u0064\u0020\u0063\u0068a\u0072\u0020\u0064\u0061\u0074\u0061\u002c\u0020\u0067\u006ft\u0020\u0025\u0054",_gge );}else {switch string (_gbgg ){case "":*_cadg =0;case "\u0045\u0078\u0074\u0065\u0072\u006e\u0061\u006c":*_cadg =1;case "\u0049\u006e\u0074\u0065\u0072\u006e\u0061\u006c":*_cadg =2;};};_gge ,_ea =d .Token ();if _ea !=nil {return _ea ;};if _da ,_deb :=_gge .(_e .EndElement );_deb &&_da .Name ==start .Name {return nil ;};return _f .Errorf ("\u0065\u0078\u0070\u0065c\u0074\u0065\u0064\u0020\u0065\u006e\u0064\u0020\u0065\u006ce\u006de\u006e\u0074\u002c\u0020\u0067\u006f\u0074 \u0025\u0076",_gge );};func (_be ST_TargetMode )MarshalXMLAttr (name _e .Name )(_e .Attr ,error ){_ffg :=_e .Attr {};_ffg .Name =name ;switch _be {case ST_TargetModeUnset :_ffg .Value ="";case ST_TargetModeExternal :_ffg .Value ="\u0045\u0078\u0074\u0065\u0072\u006e\u0061\u006c";case ST_TargetModeInternal :_ffg .Value ="\u0049\u006e\u0074\u0065\u0072\u006e\u0061\u006c";};return _ffg ,nil ;};func NewCT_Relationships ()*CT_Relationships {_ce :=&CT_Relationships {};return _ce };
// Validate validates the CT_Relationship and its children
func (_aa *CT_Relationship )Validate ()error {return _aa .ValidateWithPath ("\u0043T\u005fR\u0065\u006c\u0061\u0074\u0069\u006f\u006e\u0073\u0068\u0069\u0070");};
// ValidateWithPath validates the CT_Relationships and its children, prefixing error messages with path
func (_ba *CT_Relationships )ValidateWithPath (path string )error {for _edb ,_dgef :=range _ba .Relationship {if _bgf :=_dgef .ValidateWithPath (_f .Sprintf ("\u0025\u0073\u002f\u0052el\u0061\u0074\u0069\u006f\u006e\u0073\u0068\u0069\u0070\u005b\u0025\u0064\u005d",path ,_edb ));_bgf !=nil {return _bgf ;};};return nil ;};func (_ga *Relationships )UnmarshalXML (d *_e .Decoder ,start _e .StartElement )error {_ga .CT_Relationships =*NewCT_Relationships ();_bb :for {_bce ,_ged :=d .Token ();if _ged !=nil {return _ged ;};switch _bd :=_bce .(type ){case _e .StartElement :switch _bd .Name {case _e .Name {Space :"ht\u0074\u0070:\u002f\u002f\u0073\u0063\u0068\u0065\u006d\u0061\u0073.\u006f\u0070\u0065\u006e\u0078\u006d\u006c\u0066\u006f\u0072\u006d\u0061\u0074\u0073\u002e\u006f\u0072\u0067\u002f\u0070\u0061\u0063\u006b\u0061\u0067\u0065\u002f\u00320\u00306\u002f\u0072\u0065\u006c\u0061\u0074\u0069\u006fn\u0073h\u0069\u0070s",Local :"\u0052\u0065\u006ca\u0074\u0069\u006f\u006e\u0073\u0068\u0069\u0070"}:_bgb :=NewRelationship ();if _fcb :=d .DecodeElement (_bgb ,&_bd );_fcb !=nil {return _fcb ;};_ga .Relationship =append (_ga .Relationship ,_bgb );default:_a .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\u0052\u0065\u006c\u0061t\u0069\u006f\u006e\u0073\u0068\u0069\u0070\u0073 \u0025\u0076",_bd .Name );if _ecf :=d .Skip ();_ecf !=nil {return _ecf ;};};case _e .EndElement :break _bb ;case _e .CharData :};};return nil ;};type Relationship struct{CT_Relationship };func (_bdba ST_TargetMode )String ()string {switch _bdba {case 0:return "";case 1:return "\u0045\u0078\u0074\u0065\u0072\u006e\u0061\u006c";case 2:return "\u0049\u006e\u0074\u0065\u0072\u006e\u0061\u006c";};return "";};const (ST_TargetModeUnset ST_TargetMode =0;ST_TargetModeExternal ST_TargetMode =1;ST_TargetModeInternal ST_TargetMode =2;);
// ValidateWithPath validates the CT_Relationship and its children, prefixing error messages with path
func (_cd *CT_Relationship )ValidateWithPath (path string )error {if _aag :=_cd .TargetModeAttr .ValidateWithPath (path +"\u002fT\u0061r\u0067\u0065\u0074\u004d\u006f\u0064\u0065\u0041\u0074\u0074\u0072");_aag !=nil {return _aag ;};return nil ;};func (_gb *Relationship )MarshalXML (e *_e .Encoder ,start _e .StartElement )error {return _gb .CT_Relationship .MarshalXML (e ,start );};func (_ef *CT_Relationship )UnmarshalXML (d *_e .Decoder ,start _e .StartElement )error {for _ ,_dg :=range start .Attr {if _dg .Name .Local =="\u0054\u0061\u0072\u0067\u0065\u0074\u004d\u006f\u0064\u0065"{_ef .TargetModeAttr .UnmarshalXMLAttr (_dg );continue ;};if _dg .Name .Local =="\u0054\u0061\u0072\u0067\u0065\u0074"{_ge ,_cb :=_dg .Value ,error (nil );if _cb !=nil {return _cb ;};_ef .TargetAttr =_ge ;continue ;};if _dg .Name .Local =="\u0054\u0079\u0070\u0065"{_ed ,_eb :=_dg .Value ,error (nil );if _eb !=nil {return _eb ;};_ef .TypeAttr =_ed ;continue ;};if _dg .Name .Local =="\u0049\u0064"{_fg ,_dge :=_dg .Value ,error (nil );if _dge !=nil {return _dge ;};_ef .IdAttr =_fg ;continue ;};};for {_ca ,_fc :=d .Token ();if _fc !=nil {return _f .Errorf ("p\u0061\u0072\u0073\u0069\u006e\u0067 \u0043\u0054\u005f\u0052\u0065\u006c\u0061\u0074\u0069o\u006e\u0073\u0068i\u0070:\u0020\u0025\u0073",_fc );};if _ae ,_ec :=_ca .(_e .CharData );_ec {_ef .Content =string (_ae );};if _cg ,_ccf :=_ca .(_e .EndElement );_ccf &&_cg .Name ==start .Name {break ;};};return nil ;};func (_eea ST_TargetMode )Validate ()error {return _eea .ValidateWithPath ("")};func (_gbg *Relationship )UnmarshalXML (d *_e .Decoder ,start _e .StartElement )error {_gbg .CT_Relationship =*NewCT_Relationship ();for _ ,_df :=range start .Attr {if _df .Name .Local =="\u0054\u0061\u0072\u0067\u0065\u0074\u004d\u006f\u0064\u0065"{_gbg .TargetModeAttr .UnmarshalXMLAttr (_df );continue ;};if _df .Name .Local =="\u0054\u0061\u0072\u0067\u0065\u0074"{_fcd ,_fd :=_df .Value ,error (nil );if _fd !=nil {return _fd ;};_gbg .TargetAttr =_fcd ;continue ;};if _df .Name .Local =="\u0054\u0079\u0070\u0065"{_aab ,_ebb :=_df .Value ,error (nil );if _ebb !=nil {return _ebb ;};_gbg .TypeAttr =_aab ;continue ;};if _df .Name .Local =="\u0049\u0064"{_ebf ,_gbgb :=_df .Value ,error (nil );if _gbgb !=nil {return _gbgb ;};_gbg .IdAttr =_ebf ;continue ;};};for {_fe ,_ac :=d .Token ();if _ac !=nil {return _f .Errorf ("\u0070a\u0072\u0073\u0069\u006e\u0067\u0020\u0052\u0065\u006c\u0061\u0074i\u006f\u006e\u0073\u0068\u0069\u0070\u003a\u0020\u0025\u0073",_ac );};if _fgce ,_ff :=_fe .(_e .EndElement );_ff &&_fgce .Name ==start .Name {break ;};};return nil ;};func NewRelationships ()*Relationships {_aee :=&Relationships {};_aee .CT_Relationships =*NewCT_Relationships ();return _aee ;};func (_ag *CT_Relationship )MarshalXML (e *_e .Encoder ,start _e .StartElement )error {if _ag .TargetModeAttr !=ST_TargetModeUnset {_b ,_cc :=_ag .TargetModeAttr .MarshalXMLAttr (_e .Name {Local :"\u0054\u0061\u0072\u0067\u0065\u0074\u004d\u006f\u0064\u0065"});if _cc !=nil {return _cc ;};start .Attr =append (start .Attr ,_b );};start .Attr =append (start .Attr ,_e .Attr {Name :_e .Name {Local :"\u0054\u0061\u0072\u0067\u0065\u0074"},Value :_f .Sprintf ("\u0025\u0076",_ag .TargetAttr )});start .Attr =append (start .Attr ,_e .Attr {Name :_e .Name {Local :"\u0054\u0079\u0070\u0065"},Value :_f .Sprintf ("\u0025\u0076",_ag .TypeAttr )});start .Attr =append (start .Attr ,_e .Attr {Name :_e .Name {Local :"\u0049\u0064"},Value :_f .Sprintf ("\u0025\u0076",_ag .IdAttr )});e .EncodeElement (_ag .Content ,start );e .EncodeToken (_e .EndElement {Name :start .Name });return nil ;};
// ValidateWithPath validates the Relationship and its children, prefixing error messages with path
func (_de *Relationship )ValidateWithPath (path string )error {if _gec :=_de .CT_Relationship .ValidateWithPath (path );_gec !=nil {return _gec ;};return nil ;};func (_caa ST_TargetMode )ValidateWithPath (path string )error {switch _caa {case 0,1,2:default:return _f .Errorf ("\u0025s\u003a\u0020\u006f\u0075t\u0020\u006f\u0066\u0020\u0072a\u006eg\u0065 \u0076\u0061\u006c\u0075\u0065\u0020\u0025d",path ,int (_caa ));};return nil ;};func (_gc *Relationships )MarshalXML (e *_e .Encoder ,start _e .StartElement )error {start .Attr =append (start .Attr ,_e .Attr {Name :_e .Name {Local :"\u0078\u006d\u006cn\u0073"},Value :"ht\u0074\u0070:\u002f\u002f\u0073\u0063\u0068\u0065\u006d\u0061\u0073.\u006f\u0070\u0065\u006e\u0078\u006d\u006c\u0066\u006f\u0072\u006d\u0061\u0074\u0073\u002e\u006f\u0072\u0067\u002f\u0070\u0061\u0063\u006b\u0061\u0067\u0065\u002f\u00320\u00306\u002f\u0072\u0065\u006c\u0061\u0074\u0069\u006fn\u0073h\u0069\u0070s"});start .Attr =append (start .Attr ,_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 ="\u0052\u0065\u006c\u0061\u0074\u0069\u006f\u006e\u0073\u0068\u0069\u0070\u0073";return _gc .CT_Relationships .MarshalXML (e ,start );};func (_dgc *CT_Relationships )UnmarshalXML (d *_e .Decoder ,start _e .StartElement )error {_aec :for {_bc ,_ee :=d .Token ();if _ee !=nil {return _ee ;};switch _cf :=_bc .(type ){case _e .StartElement :switch _cf .Name {case _e .Name {Space :"ht\u0074\u0070:\u002f\u002f\u0073\u0063\u0068\u0065\u006d\u0061\u0073.\u006f\u0070\u0065\u006e\u0078\u006d\u006c\u0066\u006f\u0072\u006d\u0061\u0074\u0073\u002e\u006f\u0072\u0067\u002f\u0070\u0061\u0063\u006b\u0061\u0067\u0065\u002f\u00320\u00306\u002f\u0072\u0065\u006c\u0061\u0074\u0069\u006fn\u0073h\u0069\u0070s",Local :"\u0052\u0065\u006ca\u0074\u0069\u006f\u006e\u0073\u0068\u0069\u0070"}:_egg :=NewRelationship ();if _edd :=d .DecodeElement (_egg ,&_cf );_edd !=nil {return _edd ;};_dgc .Relationship =append (_dgc .Relationship ,_egg );default:_a .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\u0052\u0065\u006c\u0061\u0074\u0069\u006f\u006e\u0073\u0068\u0069\u0070\u0073\u0020\u0025v",_cf .Name );if _bg :=d .Skip ();_bg !=nil {return _bg ;};};case _e .EndElement :break _aec ;case _e .CharData :};};return nil ;};func (_gbd ST_TargetMode )MarshalXML (e *_e .Encoder ,start _e .StartElement )error {return e .EncodeElement (_gbd .String (),start );};type CT_Relationships struct{Relationship []*Relationship ;};func init (){_c .RegisterConstructor ("ht\u0074\u0070:\u002f\u002f\u0073\u0063\u0068\u0065\u006d\u0061\u0073.\u006f\u0070\u0065\u006e\u0078\u006d\u006c\u0066\u006f\u0072\u006d\u0061\u0074\u0073\u002e\u006f\u0072\u0067\u002f\u0070\u0061\u0063\u006b\u0061\u0067\u0065\u002f\u00320\u00306\u002f\u0072\u0065\u006c\u0061\u0074\u0069\u006fn\u0073h\u0069\u0070s","\u0043\u0054_\u0052\u0065\u006ca\u0074\u0069\u006f\u006e\u0073\u0068\u0069\u0070\u0073",NewCT_Relationships );_c .RegisterConstructor ("ht\u0074\u0070:\u002f\u002f\u0073\u0063\u0068\u0065\u006d\u0061\u0073.\u006f\u0070\u0065\u006e\u0078\u006d\u006c\u0066\u006f\u0072\u006d\u0061\u0074\u0073\u002e\u006f\u0072\u0067\u002f\u0070\u0061\u0063\u006b\u0061\u0067\u0065\u002f\u00320\u00306\u002f\u0072\u0065\u006c\u0061\u0074\u0069\u006fn\u0073h\u0069\u0070s","\u0043T\u005fR\u0065\u006c\u0061\u0074\u0069\u006f\u006e\u0073\u0068\u0069\u0070",NewCT_Relationship );_c .RegisterConstructor ("ht\u0074\u0070:\u002f\u002f\u0073\u0063\u0068\u0065\u006d\u0061\u0073.\u006f\u0070\u0065\u006e\u0078\u006d\u006c\u0066\u006f\u0072\u006d\u0061\u0074\u0073\u002e\u006f\u0072\u0067\u002f\u0070\u0061\u0063\u006b\u0061\u0067\u0065\u002f\u00320\u00306\u002f\u0072\u0065\u006c\u0061\u0074\u0069\u006fn\u0073h\u0069\u0070s","\u0052\u0065\u006c\u0061\u0074\u0069\u006f\u006e\u0073\u0068\u0069\u0070\u0073",NewRelationships );_c .RegisterConstructor ("ht\u0074\u0070:\u002f\u002f\u0073\u0063\u0068\u0065\u006d\u0061\u0073.\u006f\u0070\u0065\u006e\u0078\u006d\u006c\u0066\u006f\u0072\u006d\u0061\u0074\u0073\u002e\u006f\u0072\u0067\u002f\u0070\u0061\u0063\u006b\u0061\u0067\u0065\u002f\u00320\u00306\u002f\u0072\u0065\u006c\u0061\u0074\u0069\u006fn\u0073h\u0069\u0070s","\u0052\u0065\u006ca\u0074\u0069\u006f\u006e\u0073\u0068\u0069\u0070",NewRelationship );};

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 (_f "encoding/xml";_fb "fmt";_c "github.com/unidoc/unioffice";_fd "github.com/unidoc/unioffice/common/logger";);func NewCT_Schema ()*CT_Schema {_d :=&CT_Schema {};return _d };
// ValidateWithPath validates the SchemaLibrary and its children, prefixing error messages with path
func (_fdg *SchemaLibrary )ValidateWithPath (path string )error {if _bb :=_fdg .CT_SchemaLibrary .ValidateWithPath (path );_bb !=nil {return _bb ;};return nil ;};func NewSchemaLibrary ()*SchemaLibrary {_eg :=&SchemaLibrary {};_eg .CT_SchemaLibrary =*NewCT_SchemaLibrary ();return _eg ;};
package schemaLibrary ;import (_d "encoding/xml";_a "fmt";_aa "github.com/unidoc/unioffice";_e "github.com/unidoc/unioffice/common/logger";);
// Validate validates the CT_SchemaLibrary and its children
func (_ca *CT_SchemaLibrary )Validate ()error {return _ca .ValidateWithPath ("\u0043\u0054_\u0053\u0063\u0068e\u006d\u0061\u004c\u0069\u0062\u0072\u0061\u0072\u0079");};func (_fa *SchemaLibrary )MarshalXML (e *_f .Encoder ,start _f .StartElement )error {start .Attr =append (start .Attr ,_f .Attr {Name :_f .Name {Local :"\u0078\u006d\u006cn\u0073"},Value :"\u0068\u0074\u0074\u0070:\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 ,_f .Attr {Name :_f .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 ,_f .Attr {Name :_f .Name {Local :"\u0078m\u006c\u006e\u0073\u003a\u0078\u006dl"},Value :"\u0068\u0074tp\u003a\u002f\u002fw\u0077\u0077\u002e\u00773.o\u0072g/\u0058\u004d\u004c\u002f\u0031\u0039\u00398/\u006e\u0061\u006d\u0065\u0073\u0070\u0061c\u0065"});start .Name .Local ="\u006d\u0061:\u0073\u0063\u0068e\u006d\u0061\u004c\u0069\u0062\u0072\u0061\u0072\u0079";return _fa .CT_SchemaLibrary .MarshalXML (e ,start );};type SchemaLibrary struct{CT_SchemaLibrary };func (_a *CT_Schema )MarshalXML (e *_f .Encoder ,start _f .StartElement )error {if _a .UriAttr !=nil {start .Attr =append (start .Attr ,_f .Attr {Name :_f .Name {Local :"\u006d\u0061\u003a\u0075\u0072\u0069"},Value :_fb .Sprintf ("\u0025\u0076",*_a .UriAttr )});};if _a .ManifestLocationAttr !=nil {start .Attr =append (start .Attr ,_f .Attr {Name :_f .Name {Local :"\u006d\u0061\u003a\u006dan\u0069\u0066\u0065\u0073\u0074\u004c\u006f\u0063\u0061\u0074\u0069\u006f\u006e"},Value :_fb .Sprintf ("\u0025\u0076",*_a .ManifestLocationAttr )});};if _a .SchemaLocationAttr !=nil {start .Attr =append (start .Attr ,_f .Attr {Name :_f .Name {Local :"\u006d\u0061\u003a\u0073\u0063\u0068\u0065\u006d\u0061\u004c\u006f\u0063a\u0074\u0069\u006f\u006e"},Value :_fb .Sprintf ("\u0025\u0076",*_a .SchemaLocationAttr )});};if _a .SchemaLanguageAttr !=nil {start .Attr =append (start .Attr ,_f .Attr {Name :_f .Name {Local :"\u006d\u0061\u003a\u0073\u0063\u0068\u0065\u006d\u0061\u004c\u0061\u006eg\u0075\u0061\u0067\u0065"},Value :_fb .Sprintf ("\u0025\u0076",*_a .SchemaLanguageAttr )});};e .EncodeToken (start );e .EncodeToken (_f .EndElement {Name :start .Name });return nil ;};func (_bc *CT_SchemaLibrary )UnmarshalXML (d *_f .Decoder ,start _f .StartElement )error {_bcg :for {_bge ,_addc :=d .Token ();if _addc !=nil {return _addc ;};switch _gac :=_bge .(type ){case _f .StartElement :switch _gac .Name {case _f .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"}:_bdg :=NewCT_Schema ();if _eb :=d .DecodeElement (_bdg ,&_gac );_eb !=nil {return _eb ;};_bc .Schema =append (_bc .Schema ,_bdg );default:_fd .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",_gac .Name );if _aa :=d .Skip ();_aa !=nil {return _aa ;};};case _f .EndElement :break _bcg ;case _f .CharData :};};return nil ;};func NewCT_SchemaLibrary ()*CT_SchemaLibrary {_ed :=&CT_SchemaLibrary {};return _ed };
// ValidateWithPath validates the CT_SchemaLibrary and its children, prefixing error messages with path
func (_cgb *CT_SchemaLibrary )ValidateWithPath (path string )error {for _aae ,_dg :=range _cgb .Schema {if _dd :=_dg .ValidateWithPath (_fb .Sprintf ("\u0025\u0073\u002f\u0053\u0063\u0068\u0065\u006d\u0061\u005b\u0025\u0064\u005d",path ,_aae ));_dd !=nil {return _dd ;};};return nil ;};
// ValidateWithPath validates the CT_Schema and its children, prefixing error messages with path
func (_cee *CT_Schema )ValidateWithPath (path string )error {return nil };func (_cd *CT_SchemaLibrary )MarshalXML (e *_f .Encoder ,start _f .StartElement )error {e .EncodeToken (start );if _cd .Schema !=nil {_agb :=_f .StartElement {Name :_f .Name {Local :"\u006da\u003a\u0073\u0063\u0068\u0065\u006da"}};for _ ,_cg :=range _cd .Schema {e .EncodeElement (_cg ,_agb );};};e .EncodeToken (_f .EndElement {Name :start .Name });return nil ;};func (_daf *SchemaLibrary )UnmarshalXML (d *_f .Decoder ,start _f .StartElement )error {_daf .CT_SchemaLibrary =*NewCT_SchemaLibrary ();_ae :for {_gg ,_dgc :=d .Token ();if _dgc !=nil {return _dgc ;};switch _ea :=_gg .(type ){case _f .StartElement :switch _ea .Name {case _f .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"}:_cdf :=NewCT_Schema ();if _bfa :=d .DecodeElement (_cdf ,&_ea );_bfa !=nil {return _bfa ;};_daf .Schema =append (_daf .Schema ,_cdf );default:_fd .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",_ea .Name );if _gc :=d .Skip ();_gc !=nil {return _gc ;};};case _f .EndElement :break _ae ;case _f .CharData :};};return nil ;};func (_fbe *CT_Schema )UnmarshalXML (d *_f .Decoder ,start _f .StartElement )error {for _ ,_e :=range start .Attr {if _e .Name .Local =="\u0075\u0072\u0069"{_g ,_bg :=_e .Value ,error (nil );if _bg !=nil {return _bg ;};_fbe .UriAttr =&_g ;continue ;};if _e .Name .Local =="\u006d\u0061n\u0069\u0066\u0065s\u0074\u004c\u006f\u0063\u0061\u0074\u0069\u006f\u006e"{_ce ,_bd :=_e .Value ,error (nil );if _bd !=nil {return _bd ;};_fbe .ManifestLocationAttr =&_ce ;continue ;};if _e .Name .Local =="\u0073\u0063\u0068\u0065\u006d\u0061\u004c\u006f\u0063a\u0074\u0069\u006f\u006e"{_ag ,_bf :=_e .Value ,error (nil );if _bf !=nil {return _bf ;};_fbe .SchemaLocationAttr =&_ag ;continue ;};if _e .Name .Local =="\u0073\u0063\u0068\u0065\u006d\u0061\u004c\u0061\u006eg\u0075\u0061\u0067\u0065"{_ba ,_cf :=_e .Value ,error (nil );if _cf !=nil {return _cf ;};_fbe .SchemaLanguageAttr =&_ba ;continue ;};};for {_add ,_gf :=d .Token ();if _gf !=nil {return _fb .Errorf ("p\u0061\u0072\u0073\u0069ng\u0020C\u0054\u005f\u0053\u0063\u0068e\u006d\u0061\u003a\u0020\u0025\u0073",_gf );};if _ga ,_da :=_add .(_f .EndElement );_da &&_ga .Name ==start .Name {break ;};};return nil ;};
func (_ada *CT_SchemaLibrary )Validate ()error {return _ada .ValidateWithPath ("\u0043\u0054_\u0053\u0063\u0068e\u006d\u0061\u004c\u0069\u0062\u0072\u0061\u0072\u0079");};func (_ge *CT_Schema )UnmarshalXML (d *_d .Decoder ,start _d .StartElement )error {for _ ,_de :=range start .Attr {if _de .Name .Local =="\u0075\u0072\u0069"{_dc ,_fa :=_de .Value ,error (nil );if _fa !=nil {return _fa ;};_ge .UriAttr =&_dc ;continue ;};if _de .Name .Local =="\u006d\u0061n\u0069\u0066\u0065s\u0074\u004c\u006f\u0063\u0061\u0074\u0069\u006f\u006e"{_cg ,_dcf :=_de .Value ,error (nil );if _dcf !=nil {return _dcf ;};_ge .ManifestLocationAttr =&_cg ;continue ;};if _de .Name .Local =="\u0073\u0063\u0068\u0065\u006d\u0061\u004c\u006f\u0063a\u0074\u0069\u006f\u006e"{_gea ,_ff :=_de .Value ,error (nil );if _ff !=nil {return _ff ;};_ge .SchemaLocationAttr =&_gea ;continue ;};if _de .Name .Local =="\u0073\u0063\u0068\u0065\u006d\u0061\u004c\u0061\u006eg\u0075\u0061\u0067\u0065"{_ga ,_fb :=_de .Value ,error (nil );if _fb !=nil {return _fb ;};_ge .SchemaLanguageAttr =&_ga ;continue ;};};for {_fag ,_cb :=d .Token ();if _cb !=nil {return _a .Errorf ("p\u0061\u0072\u0073\u0069ng\u0020C\u0054\u005f\u0053\u0063\u0068e\u006d\u0061\u003a\u0020\u0025\u0073",_cb );};if _gg ,_ffb :=_fag .(_d .EndElement );_ffb &&_gg .Name ==start .Name {break ;};};return nil ;};type SchemaLibrary struct{CT_SchemaLibrary };
// Validate validates the CT_Schema and its children
func (_be *CT_Schema )Validate ()error {return _be .ValidateWithPath ("\u0043T\u005f\u0053\u0063\u0068\u0065\u006da");};
func (_gd *CT_Schema )Validate ()error {return _gd .ValidateWithPath ("\u0043T\u005f\u0053\u0063\u0068\u0065\u006da");};type CT_Schema struct{UriAttr *string ;ManifestLocationAttr *string ;SchemaLocationAttr *string ;SchemaLanguageAttr *string ;};func (_eb *SchemaLibrary )MarshalXML (e *_d .Encoder ,start _d .StartElement )error {start .Attr =append (start .Attr ,_d .Attr {Name :_d .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 ,_d .Attr {Name :_d .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 ,_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 ="\u006d\u0061:\u0073\u0063\u0068e\u006d\u0061\u004c\u0069\u0062\u0072\u0061\u0072\u0079";return _eb .CT_SchemaLibrary .MarshalXML (e ,start );};
// ValidateWithPath validates the CT_SchemaLibrary and its children, prefixing error messages with path
func (_dac *CT_SchemaLibrary )ValidateWithPath (path string )error {for _cbe ,_geb :=range _dac .Schema {if _cea :=_geb .ValidateWithPath (_a .Sprintf ("\u0025\u0073\u002f\u0053\u0063\u0068\u0065\u006d\u0061\u005b\u0025\u0064\u005d",path ,_cbe ));_cea !=nil {return _cea ;};};return nil ;};func (_ce *CT_SchemaLibrary )UnmarshalXML (d *_d .Decoder ,start _d .StartElement )error {_cc :for {_gfc ,_bf :=d .Token ();if _bf !=nil {return _bf ;};switch _gge :=_gfc .(type ){case _d .StartElement :switch _gge .Name {case _d .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"}:_dg :=NewCT_Schema ();if _gff :=d .DecodeElement (_dg ,&_gge );_gff !=nil {return _gff ;};_ce .Schema =append (_ce .Schema ,_dg );default:_e .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",_gge .Name );if _cf :=d .Skip ();_cf !=nil {return _cf ;};};case _d .EndElement :break _cc ;case _d .CharData :};};return nil ;};
// ValidateWithPath validates the CT_Schema and its children, prefixing error messages with path
func (_da *CT_Schema )ValidateWithPath (path string )error {return nil };func NewCT_Schema ()*CT_Schema {_f :=&CT_Schema {};return _f };
// ValidateWithPath validates the SchemaLibrary and its children, prefixing error messages with path
func (_adac *SchemaLibrary )ValidateWithPath (path string )error {if _dba :=_adac .CT_SchemaLibrary .ValidateWithPath (path );_dba !=nil {return _dba ;};return nil ;};func NewCT_SchemaLibrary ()*CT_SchemaLibrary {_ad :=&CT_SchemaLibrary {};return _ad };func (_gf *CT_SchemaLibrary )MarshalXML (e *_d .Encoder ,start _d .StartElement )error {e .EncodeToken (start );if _gf .Schema !=nil {_b :=_d .StartElement {Name :_d .Name {Local :"\u006da\u003a\u0073\u0063\u0068\u0065\u006da"}};for _ ,_ggb :=range _gf .Schema {e .EncodeElement (_ggb ,_b );};};e .EncodeToken (_d .EndElement {Name :start .Name });return nil ;};type CT_SchemaLibrary struct{Schema []*CT_Schema ;};
// Validate validates the SchemaLibrary and its children
func (_bed *SchemaLibrary )Validate ()error {return _bed .ValidateWithPath ("\u0053\u0063\u0068\u0065\u006d\u0061\u004c\u0069\u0062\u0072\u0061\u0072\u0079");};type CT_Schema struct{UriAttr *string ;ManifestLocationAttr *string ;SchemaLocationAttr *string ;SchemaLanguageAttr *string ;};type CT_SchemaLibrary struct{Schema []*CT_Schema ;};func init (){_c .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 );_c .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 );_c .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 (_fae *SchemaLibrary )Validate ()error {return _fae .ValidateWithPath ("\u0053\u0063\u0068\u0065\u006d\u0061\u004c\u0069\u0062\u0072\u0061\u0072\u0079");};func (_g *CT_Schema )MarshalXML (e *_d .Encoder ,start _d .StartElement )error {if _g .UriAttr !=nil {start .Attr =append (start .Attr ,_d .Attr {Name :_d .Name {Local :"\u006d\u0061\u003a\u0075\u0072\u0069"},Value :_a .Sprintf ("\u0025\u0076",*_g .UriAttr )});};if _g .ManifestLocationAttr !=nil {start .Attr =append (start .Attr ,_d .Attr {Name :_d .Name {Local :"\u006d\u0061\u003a\u006dan\u0069\u0066\u0065\u0073\u0074\u004c\u006f\u0063\u0061\u0074\u0069\u006f\u006e"},Value :_a .Sprintf ("\u0025\u0076",*_g .ManifestLocationAttr )});};if _g .SchemaLocationAttr !=nil {start .Attr =append (start .Attr ,_d .Attr {Name :_d .Name {Local :"\u006d\u0061\u003a\u0073\u0063\u0068\u0065\u006d\u0061\u004c\u006f\u0063a\u0074\u0069\u006f\u006e"},Value :_a .Sprintf ("\u0025\u0076",*_g .SchemaLocationAttr )});};if _g .SchemaLanguageAttr !=nil {start .Attr =append (start .Attr ,_d .Attr {Name :_d .Name {Local :"\u006d\u0061\u003a\u0073\u0063\u0068\u0065\u006d\u0061\u004c\u0061\u006eg\u0075\u0061\u0067\u0065"},Value :_a .Sprintf ("\u0025\u0076",*_g .SchemaLanguageAttr )});};e .EncodeToken (start );e .EncodeToken (_d .EndElement {Name :start .Name });return nil ;};func (_cd *SchemaLibrary )UnmarshalXML (d *_d .Decoder ,start _d .StartElement )error {_cd .CT_SchemaLibrary =*NewCT_SchemaLibrary ();_gb :for {_ac ,_bg :=d .Token ();if _bg !=nil {return _bg ;};switch _dd :=_ac .(type ){case _d .StartElement :switch _dd .Name {case _d .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"}:_cca :=NewCT_Schema ();if _cefb :=d .DecodeElement (_cca ,&_dd );_cefb !=nil {return _cefb ;};_cd .Schema =append (_cd .Schema ,_cca );default:_e .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",_dd .Name );if _df :=d .Skip ();_df !=nil {return _df ;};};case _d .EndElement :break _gb ;case _d .CharData :};};return nil ;};func NewSchemaLibrary ()*SchemaLibrary {_cef :=&SchemaLibrary {};_cef .CT_SchemaLibrary =*NewCT_SchemaLibrary ();return _cef ;};func init (){_aa .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 );_aa .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 );_aa .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 (_d "encoding/xml";_da "fmt";_g "github.com/unidoc/unioffice";);func (_fd *Iscomment )UnmarshalXML (d *_d .Decoder ,start _d .StartElement )error {_fd .CT_Empty =*NewCT_Empty ();for {_ag ,_fdg :=d .Token ();if _fdg !=nil {return _da .Errorf ("p\u0061\u0072\u0073\u0069ng\u0020I\u0073\u0063\u006f\u006d\u006de\u006e\u0074\u003a\u0020\u0025\u0073",_fdg );};if _bd ,_ee :=_ag .(_d .EndElement );_ee &&_bd .Name ==start .Name {break ;};};return nil ;};
// ValidateWithPath validates the CT_Rel and its children, prefixing error messages with path
func (_gc *CT_Rel )ValidateWithPath (path string )error {return nil };type CT_Empty struct{};func NewCT_Rel ()*CT_Rel {_fa :=&CT_Rel {};return _fa };type Iscomment struct{CT_Empty };
// ValidateWithPath validates the Iscomment and its children, prefixing error messages with path
func (_ca *Iscomment )ValidateWithPath (path string )error {if _aga :=_ca .CT_Empty .ValidateWithPath (path );_aga !=nil {return _aga ;};return nil ;};
// ValidateWithPath validates the CT_Empty and its children, prefixing error messages with path
func (_ef *CT_Empty )ValidateWithPath (path string )error {return nil };
// ValidateWithPath validates the Textdata and its children, prefixing error messages with path
func (_gcd *Textdata )ValidateWithPath (path string )error {if _faf :=_gcd .CT_Rel .ValidateWithPath (path );_faf !=nil {return _faf ;};return nil ;};func NewIscomment ()*Iscomment {_aaa :=&Iscomment {};_aaa .CT_Empty =*NewCT_Empty ();return _aaa };func (_a *CT_Empty )UnmarshalXML (d *_d .Decoder ,start _d .StartElement )error {for {_c ,_e :=d .Token ();if _e !=nil {return _da .Errorf ("p\u0061r\u0073\u0069\u006e\u0067\u0020\u0043\u0054\u005fE\u006d\u0070\u0074\u0079: \u0025\u0073",_e );};if _ge ,_ab :=_c .(_d .EndElement );_ab &&_ge .Name ==start .Name {break ;};};return nil ;};type CT_Rel struct{IdAttr *string ;};func (_cd *Textdata )UnmarshalXML (d *_d .Decoder ,start _d .StartElement )error {_cd .CT_Rel =*NewCT_Rel ();for _ ,_gec :=range start .Attr {if _gec .Name .Local =="\u0069\u0064"{_eef ,_be :=_gec .Value ,error (nil );if _be !=nil {return _be ;};_cd .IdAttr =&_eef ;continue ;};};for {_bdb ,_fe :=d .Token ();if _fe !=nil {return _da .Errorf ("p\u0061r\u0073\u0069\u006e\u0067\u0020\u0054\u0065\u0078t\u0064\u0061\u0074\u0061: \u0025\u0073",_fe );};if _eg ,_gda :=_bdb .(_d .EndElement );_gda &&_eg .Name ==start .Name {break ;};};return nil ;};func (_cc *CT_Rel )MarshalXML (e *_d .Encoder ,start _d .StartElement )error {if _cc .IdAttr !=nil {start .Attr =append (start .Attr ,_d .Attr {Name :_d .Name {Local :"\u0069\u0064"},Value :_da .Sprintf ("\u0025\u0076",*_cc .IdAttr )});};e .EncodeToken (start );e .EncodeToken (_d .EndElement {Name :start .Name });return nil ;};
package powerpoint ;import (_g "encoding/xml";_ge "fmt";_ga "github.com/unidoc/unioffice";);
// Validate validates the Textdata and its children
func (_gdb *Textdata )Validate ()error {return _gdb .ValidateWithPath ("\u0054\u0065\u0078\u0074\u0064\u0061\u0074\u0061");};func (_ga *CT_Empty )MarshalXML (e *_d .Encoder ,start _d .StartElement )error {e .EncodeToken (start );e .EncodeToken (_d .EndElement {Name :start .Name });return nil ;};func NewCT_Empty ()*CT_Empty {_dad :=&CT_Empty {};return _dad };type Textdata struct{CT_Rel };
func (_af *Textdata )Validate ()error {return _af .ValidateWithPath ("\u0054\u0065\u0078\u0074\u0064\u0061\u0074\u0061");};func (_ae *Textdata )UnmarshalXML (d *_g .Decoder ,start _g .StartElement )error {_ae .CT_Rel =*NewCT_Rel ();for _ ,_eg :=range start .Attr {if _eg .Name .Local =="\u0069\u0064"{_cfb ,_bf :=_eg .Value ,error (nil );if _bf !=nil {return _bf ;};_ae .IdAttr =&_cfb ;continue ;};};for {_ca ,_gc :=d .Token ();if _gc !=nil {return _ge .Errorf ("p\u0061r\u0073\u0069\u006e\u0067\u0020\u0054\u0065\u0078t\u0064\u0061\u0074\u0061: \u0025\u0073",_gc );};if _be ,_cb :=_ca .(_g .EndElement );_cb &&_be .Name ==start .Name {break ;};};return nil ;};type CT_Empty struct{};
// ValidateWithPath validates the CT_Rel and its children, prefixing error messages with path
func (_faa *CT_Rel )ValidateWithPath (path string )error {return nil };type Textdata struct{CT_Rel };
// ValidateWithPath validates the Textdata and its children, prefixing error messages with path
func (_fab *Textdata )ValidateWithPath (path string )error {if _bgb :=_fab .CT_Rel .ValidateWithPath (path );_bgb !=nil {return _bgb ;};return nil ;};type Iscomment struct{CT_Empty };func (_fe *CT_Rel )MarshalXML (e *_g .Encoder ,start _g .StartElement )error {if _fe .IdAttr !=nil {start .Attr =append (start .Attr ,_g .Attr {Name :_g .Name {Local :"\u0069\u0064"},Value :_ge .Sprintf ("\u0025\u0076",*_fe .IdAttr )});};e .EncodeToken (start );e .EncodeToken (_g .EndElement {Name :start .Name });return nil ;};
// Validate validates the CT_Empty and its children
func (_fc *CT_Empty )Validate ()error {return _fc .ValidateWithPath ("\u0043\u0054\u005f\u0045\u006d\u0070\u0074\u0079");};func (_ed *Iscomment )MarshalXML (e *_d .Encoder ,start _d .StartElement )error {start .Attr =append (start .Attr ,_d .Attr {Name :_d .Name {Local :"\u0078\u006d\u006cn\u0073"},Value :"\u0075\u0072\u006e\u003a\u0073\u0063\u0068e\u006d\u0061\u0073-\u006d\u0069\u0063\u0072o\u0073\u006f\u0066\u0074\u002d\u0063\u006f\u006d\u003a\u006f\u0066\u0066\u0069\u0063\u0065\u003a\u0070\u006f\u0077\u0065\u0072\u0070\u006f\u0069\u006e\u0074"});start .Attr =append (start .Attr ,_d .Attr {Name :_d .Name {Local :"\u0078m\u006c\u006e\u0073\u003a\u0078\u006dl"},Value :"\u0068\u0074tp\u003a\u002f\u002fw\u0077\u0077\u002e\u00773.o\u0072g/\u0058\u004d\u004c\u002f\u0031\u0039\u00398/\u006e\u0061\u006d\u0065\u0073\u0070\u0061c\u0065"});start .Name .Local ="\u0069s\u0063\u006f\u006d\u006d\u0065\u006et";return _ed .CT_Empty .MarshalXML (e ,start );};
func (_f *CT_Empty )Validate ()error {return _f .ValidateWithPath ("\u0043\u0054\u005f\u0045\u006d\u0070\u0074\u0079");};func NewTextdata ()*Textdata {_abd :=&Textdata {};_abd .CT_Rel =*NewCT_Rel ();return _abd };func (_fg *Iscomment )MarshalXML (e *_g .Encoder ,start _g .StartElement )error {start .Attr =append (start .Attr ,_g .Attr {Name :_g .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 ,_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 ="\u0069s\u0063\u006f\u006d\u006d\u0065\u006et";return _fg .CT_Empty .MarshalXML (e ,start );};func (_c *CT_Empty )UnmarshalXML (d *_g .Decoder ,start _g .StartElement )error {for {_bc ,_d :=d .Token ();if _d !=nil {return _ge .Errorf ("p\u0061r\u0073\u0069\u006e\u0067\u0020\u0043\u0054\u005fE\u006d\u0070\u0074\u0079: \u0025\u0073",_d );};if _ce ,_dg :=_bc .(_g .EndElement );_dg &&_ce .Name ==start .Name {break ;};};return nil ;};func (_fc *CT_Rel )UnmarshalXML (d *_g .Decoder ,start _g .StartElement )error {for _ ,_gee :=range start .Attr {if _gee .Name .Local =="\u0069\u0064"{_dc ,_ee :=_gee .Value ,error (nil );if _ee !=nil {return _ee ;};_fc .IdAttr =&_dc ;continue ;};};for {_bd ,_cf :=d .Token ();if _cf !=nil {return _ge .Errorf ("\u0070a\u0072s\u0069\u006e\u0067\u0020\u0043T\u005f\u0052e\u006c\u003a\u0020\u0025\u0073",_cf );};if _bg ,_ba :=_bd .(_g .EndElement );_ba &&_bg .Name ==start .Name {break ;};};return nil ;};func NewCT_Rel ()*CT_Rel {_gg :=&CT_Rel {};return _gg };
// Validate validates the CT_Rel and its children
func (_bf *CT_Rel )Validate ()error {return _bf .ValidateWithPath ("\u0043\u0054\u005f\u0052\u0065\u006c");};func NewTextdata ()*Textdata {_cce :=&Textdata {};_cce .CT_Rel =*NewCT_Rel ();return _cce };func (_cg *Textdata )MarshalXML (e *_d .Encoder ,start _d .StartElement )error {start .Attr =append (start .Attr ,_d .Attr {Name :_d .Name {Local :"\u0078\u006d\u006cn\u0073"},Value :"\u0075\u0072\u006e\u003a\u0073\u0063\u0068e\u006d\u0061\u0073-\u006d\u0069\u0063\u0072o\u0073\u006f\u0066\u0074\u002d\u0063\u006f\u006d\u003a\u006f\u0066\u0066\u0069\u0063\u0065\u003a\u0070\u006f\u0077\u0065\u0072\u0070\u006f\u0069\u006e\u0074"});start .Attr =append (start .Attr ,_d .Attr {Name :_d .Name {Local :"\u0078m\u006c\u006e\u0073\u003a\u0078\u006dl"},Value :"\u0068\u0074tp\u003a\u002f\u002fw\u0077\u0077\u002e\u00773.o\u0072g/\u0058\u004d\u004c\u002f\u0031\u0039\u00398/\u006e\u0061\u006d\u0065\u0073\u0070\u0061c\u0065"});start .Name .Local ="\u0074\u0065\u0078\u0074\u0064\u0061\u0074\u0061";return _cg .CT_Rel .MarshalXML (e ,start );};
// ValidateWithPath validates the CT_Empty and its children, prefixing error messages with path
func (_fa *CT_Empty )ValidateWithPath (path string )error {return nil };func NewCT_Empty ()*CT_Empty {_b :=&CT_Empty {};return _b };func (_a *CT_Empty )MarshalXML (e *_g .Encoder ,start _g .StartElement )error {e .EncodeToken (start );e .EncodeToken (_g .EndElement {Name :start .Name });return nil ;};
// Validate validates the Iscomment and its children
func (_ged *Iscomment )Validate ()error {return _ged .ValidateWithPath ("\u0049s\u0063\u006f\u006d\u006d\u0065\u006et");};func (_gad *CT_Rel )UnmarshalXML (d *_d .Decoder ,start _d .StartElement )error {for _ ,_gd :=range start .Attr {if _gd .Name .Local =="\u0069\u0064"{_dc ,_bg :=_gd .Value ,error (nil );if _bg !=nil {return _bg ;};_gad .IdAttr =&_dc ;continue ;};};for {_abe ,_fb :=d .Token ();if _fb !=nil {return _da .Errorf ("\u0070a\u0072s\u0069\u006e\u0067\u0020\u0043T\u005f\u0052e\u006c\u003a\u0020\u0025\u0073",_fb );};if _aa ,_cf :=_abe .(_d .EndElement );_cf &&_aa .Name ==start .Name {break ;};};return nil ;};func init (){_g .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 );_g .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 );_g .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 );_g .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 (_efa *Iscomment )Validate ()error {return _efa .ValidateWithPath ("\u0049s\u0063\u006f\u006d\u006d\u0065\u006et");};func (_fgb *Textdata )MarshalXML (e *_g .Encoder ,start _g .StartElement )error {start .Attr =append (start .Attr ,_g .Attr {Name :_g .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 ,_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 ="\u0074\u0065\u0078\u0074\u0064\u0061\u0074\u0061";return _fgb .CT_Rel .MarshalXML (e ,start );};
// Validate validates the CT_Rel and its children
func (_dd *CT_Rel )Validate ()error {return _dd .ValidateWithPath ("\u0043\u0054\u005f\u0052\u0065\u006c");};
// ValidateWithPath validates the Iscomment and its children, prefixing error messages with path
func (_eedf *Iscomment )ValidateWithPath (path string )error {if _gec :=_eedf .CT_Empty .ValidateWithPath (path );_gec !=nil {return _gec ;};return nil ;};func NewIscomment ()*Iscomment {_da :=&Iscomment {};_da .CT_Empty =*NewCT_Empty ();return _da };type CT_Rel struct{IdAttr *string ;};func (_ab *Iscomment )UnmarshalXML (d *_g .Decoder ,start _g .StartElement )error {_ab .CT_Empty =*NewCT_Empty ();for {_db ,_eed :=d .Token ();if _eed !=nil {return _ge .Errorf ("p\u0061\u0072\u0073\u0069ng\u0020I\u0073\u0063\u006f\u006d\u006de\u006e\u0074\u003a\u0020\u0025\u0073",_eed );};if _ea ,_bb :=_db .(_g .EndElement );_bb &&_ea .Name ==start .Name {break ;};};return nil ;};func init (){_ga .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 );_ga .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 );_ga .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 );_ga .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 (_e "errors";_eeb "fmt";_d "github.com/unidoc/unioffice/spreadsheet/update";_c "regexp";_ea "strconv";_ee "strings";);
package reference ;import (_f "errors";_fd "fmt";_g "github.com/unidoc/unioffice/spreadsheet/update";_a "regexp";_ed "strconv";_e "strings";);
// 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 _d .UpdateAction )*CellReference {switch updateType {case _d .UpdateActionRemoveColumn :_cc :=_cg ;_cc .ColumnIdx =_cg .ColumnIdx -1;_cc .Column =IndexToColumn (_cc .ColumnIdx );return _cc ;default:return _cg ;};};
// 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 =_ee .TrimSpace (s );if len (s )< 1{return ColumnReference {},_e .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");};_g :=ColumnReference {};_bgb ,_bb ,_ag :=_cb (s );if _ag !=nil {return ColumnReference {},_ag ;};if _bgb !=""{_g .SheetName =_bgb ;};if _bb [0]=='$'{_g .AbsoluteColumn =true ;_bb =_bb [1:];};if !_ab .MatchString (_bb ){return ColumnReference {},_e .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");};_g .Column =_bb ;_g .ColumnIdx =ColumnToIndex (_g .Column );return _g ,nil ;};
// ParseCellReference parses a cell reference of the form 'A10' and splits it
// into column/row segments.
func ParseCellReference (s string )(CellReference ,error ){s =_ee .TrimSpace (s );if len (s )< 2{return CellReference {},_e .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");};_ca :=CellReference {};_a ,_f ,_fa :=_cb (s );if _fa !=nil {return CellReference {},_fa ;};if _a !=""{_ca .SheetName =_a ;};if s [0]=='$'{_ca .AbsoluteColumn =true ;_f =_f [1:];};_cd :=-1;_cdg :for _bg :=0;_bg < len (_f );_bg ++{switch {case _f [_bg ]>='0'&&_f [_bg ]<='9'||_f [_bg ]=='$':_cd =_bg ;break _cdg ;};};switch _cd {case 0:return CellReference {},_eeb .Errorf ("\u006e\u006f\u0020\u006cet\u0074\u0065\u0072\u0020\u0070\u0072\u0065\u0066\u0069\u0078\u0020\u0069\u006e\u0020%\u0073",_f );case -1:return CellReference {},_eeb .Errorf ("\u006eo\u0020d\u0069\u0067\u0069\u0074\u0073\u0020\u0069\u006e\u0020\u0025\u0073",_f );};_ca .Column =_f [0:_cd ];if _f [_cd ]=='$'{_ca .AbsoluteRow =true ;_cd ++;};_ca .ColumnIdx =ColumnToIndex (_ca .Column );_cfe ,_fa :=_ea .ParseUint (_f [_cd :],10,32);if _fa !=nil {return CellReference {},_eeb .Errorf ("e\u0072\u0072\u006f\u0072 p\u0061r\u0073\u0069\u006e\u0067\u0020r\u006f\u0077\u003a\u0020\u0025\u0073",_fa );};if _cfe ==0{return CellReference {},_eeb .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");};_ca .RowIdx =uint32 (_cfe );return _ca ,nil ;};
// String returns a string representation of ColumnReference.
func (_ac ColumnReference )String ()string {_cce :=make ([]byte ,0,4);if _ac .AbsoluteColumn {_cce =append (_cce ,'$');};_cce =append (_cce ,_ac .Column ...);return string (_cce );};
// IndexToColumn maps a column number to a column name (e.g. 0 = A, 1 = B, 26 = AA)
func IndexToColumn (col uint32 )string {var _ge [64+1]byte ;_dae :=len (_ge );_eag :=col ;const _dg =26;for _eag >=_dg {_dae --;_acb :=_eag /_dg ;_ge [_dae ]=byte ('A'+uint (_eag -_acb *_dg ));_eag =_acb -1;};_dae --;_ge [_dae ]=byte ('A'+uint (_eag ));return string (_ge [_dae :]);};
// 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 ;};
// ParseColumnRangeReference splits a range reference of the form "A:B" into its
// components.
func ParseColumnRangeReference (s string )(_cbb ,_df ColumnReference ,_fe error ){_cad :="";_dfe :=_ee .Split (s ,"\u0021");if len (_dfe )==2{_cad =_dfe [0];s =_dfe [1];};_dc :=_ee .Split (s ,"\u003a");if len (_dc )!=2{return ColumnReference {},ColumnReference {},_e .New ("i\u006ev\u0061\u006c\u0069\u0064\u0020\u0072\u0061\u006eg\u0065\u0020\u0066\u006frm\u0061\u0074");};if _cad !=""{_dc [0]=_cad +"\u0021"+_dc [0];_dc [1]=_cad +"\u0021"+_dc [1];};_bda ,_fe :=ParseColumnReference (_dc [0]);if _fe !=nil {return ColumnReference {},ColumnReference {},_fe ;};_fg ,_fe :=ParseColumnReference (_dc [1]);if _fe !=nil {return ColumnReference {},ColumnReference {},_fe ;};return _bda ,_fg ,nil ;};
// String returns a string representation of CellReference.
func (_cf CellReference )String ()string {_eebb :=make ([]byte ,0,4);if _cf .AbsoluteColumn {_eebb =append (_eebb ,'$');};_eebb =append (_eebb ,_cf .Column ...);if _cf .AbsoluteRow {_eebb =append (_eebb ,'$');};_eebb =_ea .AppendInt (_eebb ,int64 (_cf .RowIdx ),10);return string (_eebb );};
// Update updates reference to point one of the neighboring columns with respect to the update type after removing a row/column.
func (_gc *ColumnReference )Update (updateType _g .UpdateAction )*ColumnReference {switch updateType {case _g .UpdateActionRemoveColumn :_fbd :=_gc ;_fbd .ColumnIdx =_gc .ColumnIdx -1;_fbd .Column =IndexToColumn (_fbd .ColumnIdx );return _fbd ;default:return _gc ;};};var _caa =_a .MustCompile ("^\u005b\u0061\u002d\u007aA-\u005a]\u0028\u005b\u0061\u002d\u007aA\u002d\u005a\u005d\u003f\u0029\u0024");
// ColumnToIndex maps a column to a zero based index (e.g. A = 0, B = 1, AA = 26)
func ColumnToIndex (col string )uint32 {col =_ee .ToUpper (col );_da :=uint32 (0);for _ ,_acf :=range col {_da *=26;_da +=uint32 (_acf -'A'+1);};return _da -1;};func _cb (_db string )(string ,string ,error ){_bd :="";_fac :=_ee .LastIndex (_db ,"\u0021");if _fac > -1{_bd =_db [:_fac ];_db =_db [_fac +1:];if _bd ==""{return "","",_e .New ("\u0049n\u0076a\u006c\u0069\u0064\u0020\u0073h\u0065\u0065t\u0020\u006e\u0061\u006d\u0065");};};return _bd ,_db ,nil ;};
func ColumnToIndex (col string )uint32 {col =_e .ToUpper (col );_ae :=uint32 (0);for _ ,_ga :=range col {_ae *=26;_ae +=uint32 (_ga -'A'+1);};return _ae -1;};
// CellReference is a parsed reference to a cell. Input is of the form 'A1',
// '$C$2', etc.
type CellReference struct{RowIdx uint32 ;ColumnIdx uint32 ;Column string ;AbsoluteColumn bool ;AbsoluteRow bool ;SheetName string ;};
// Update updates reference to point one of the neighboring columns with respect to the update type after removing a row/column.
func (_de *ColumnReference )Update (updateType _d .UpdateAction )*ColumnReference {switch updateType {case _d .UpdateActionRemoveColumn :_gb :=_de ;_gb .ColumnIdx =_de .ColumnIdx -1;_gb .Column =IndexToColumn (_gb .ColumnIdx );return _gb ;default:return _de ;};};
// ParseCellReference parses a cell reference of the form 'A10' and splits it
// into column/row segments.
func ParseCellReference (s string )(CellReference ,error ){s =_e .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");};_edf :=CellReference {};_d ,_ca ,_ff :=_ac (s );if _ff !=nil {return CellReference {},_ff ;};if _d !=""{_edf .SheetName =_d ;};if s [0]=='$'{_edf .AbsoluteColumn =true ;_ca =_ca [1:];};_db :=-1;_fa :for _bf :=0;_bf < len (_ca );_bf ++{switch {case _ca [_bf ]>='0'&&_ca [_bf ]<='9'||_ca [_bf ]=='$':_db =_bf ;break _fa ;};};switch _db {case 0:return CellReference {},_fd .Errorf ("\u006e\u006f\u0020\u006cet\u0074\u0065\u0072\u0020\u0070\u0072\u0065\u0066\u0069\u0078\u0020\u0069\u006e\u0020%\u0073",_ca );case -1:return CellReference {},_fd .Errorf ("\u006eo\u0020d\u0069\u0067\u0069\u0074\u0073\u0020\u0069\u006e\u0020\u0025\u0073",_ca );};_edf .Column =_ca [0:_db ];if _ca [_db ]=='$'{_edf .AbsoluteRow =true ;_db ++;};_edf .ColumnIdx =ColumnToIndex (_edf .Column );_de ,_ff :=_ed .ParseUint (_ca [_db :],10,32);if _ff !=nil {return CellReference {},_fd .Errorf ("e\u0072\u0072\u006f\u0072 p\u0061r\u0073\u0069\u006e\u0067\u0020r\u006f\u0077\u003a\u0020\u0025\u0073",_ff );};if _de ==0{return CellReference {},_fd .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");};_edf .RowIdx =uint32 (_de );return _edf ,nil ;};func _ac (_eef string )(string ,string ,error ){_fe :="";_aa :=_e .LastIndex (_eef ,"\u0021");if _aa > -1{_fe =_eef [:_aa ];_eef =_eef [_aa +1:];if _fe ==""{return "","",_f .New ("\u0049n\u0076a\u006c\u0069\u0064\u0020\u0073h\u0065\u0065t\u0020\u006e\u0061\u006d\u0065");};};return _fe ,_eef ,nil ;};
// 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 ;};
// Update updates reference to point one of the neighboring cells with respect to the update type after removing a row/column.
func (_gb *CellReference )Update (updateType _g .UpdateAction )*CellReference {switch updateType {case _g .UpdateActionRemoveColumn :_af :=_gb ;_af .ColumnIdx =_gb .ColumnIdx -1;_af .Column =IndexToColumn (_af .ColumnIdx );return _af ;default:return _gb ;};};
// IndexToColumn maps a column number to a column name (e.g. 0 = A, 1 = B, 26 = AA)
func IndexToColumn (col uint32 )string {var _fdg [64+1]byte ;_ea :=len (_fdg );_ba :=col ;const _ad =26;for _ba >=_ad {_ea --;_ee :=_ba /_ad ;_fdg [_ea ]=byte ('A'+uint (_ba -_ee *_ad ));_ba =_ee -1;};_ea --;_fdg [_ea ]=byte ('A'+uint (_ba ));return string (_fdg [_ea :]);};
// 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 =_e .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");};_fdb :=ColumnReference {};_dea ,_fb ,_be :=_ac (s );if _be !=nil {return ColumnReference {},_be ;};if _dea !=""{_fdb .SheetName =_dea ;};if _fb [0]=='$'{_fdb .AbsoluteColumn =true ;_fb =_fb [1:];};if !_caa .MatchString (_fb ){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");};_fdb .Column =_fb ;_fdb .ColumnIdx =ColumnToIndex (_fdb .Column );return _fdb ,nil ;};
// ParseRangeReference splits a range reference of the form "A1:B5" into its
// components.
func ParseRangeReference (s string )(_bf ,_dea CellReference ,_aa error ){_daa ,_aaa ,_aa :=_cb (s );if _aa !=nil {return CellReference {},CellReference {},_aa ;};_fab :=_ee .Split (_aaa ,"\u003a");if len (_fab )!=2{return CellReference {},CellReference {},_e .New ("i\u006ev\u0061\u006c\u0069\u0064\u0020\u0072\u0061\u006eg\u0065\u0020\u0066\u006frm\u0061\u0074");};if _daa !=""{_fab [0]=_daa +"\u0021"+_fab [0];_fab [1]=_daa +"\u0021"+_fab [1];};_cdd ,_aa :=ParseCellReference (_fab [0]);if _aa !=nil {return CellReference {},CellReference {},_aa ;};_bfa ,_aa :=ParseCellReference (_fab [1]);if _aa !=nil {return CellReference {},CellReference {},_aa ;};return _cdd ,_bfa ,nil ;};var _ab =_c .MustCompile ("^\u005b\u0061\u002d\u007aA-\u005a]\u0028\u005b\u0061\u002d\u007aA\u002d\u005a\u005d\u003f\u0029\u0024");
func ParseRangeReference (s string )(_ffe ,_cg CellReference ,_da error ){_fab ,_afa ,_da :=_ac (s );if _da !=nil {return CellReference {},CellReference {},_da ;};_ag :=_e .Split (_afa ,"\u003a");if len (_ag )!=2{return CellReference {},CellReference {},_f .New ("i\u006ev\u0061\u006c\u0069\u0064\u0020\u0072\u0061\u006eg\u0065\u0020\u0066\u006frm\u0061\u0074");};if _fab !=""{_ag [0]=_fab +"\u0021"+_ag [0];_ag [1]=_fab +"\u0021"+_ag [1];};_fbf ,_da :=ParseCellReference (_ag [0]);if _da !=nil {return CellReference {},CellReference {},_da ;};_cc ,_da :=ParseCellReference (_ag [1]);if _da !=nil {return CellReference {},CellReference {},_da ;};return _fbf ,_cc ,nil ;};
// ParseColumnRangeReference splits a range reference of the form "A:B" into its
// components.
func ParseColumnRangeReference (s string )(_bfb ,_aca ColumnReference ,_ge error ){_baf :="";_afg :=_e .Split (s ,"\u0021");if len (_afg )==2{_baf =_afg [0];s =_afg [1];};_eba :=_e .Split (s ,"\u003a");if len (_eba )!=2{return ColumnReference {},ColumnReference {},_f .New ("i\u006ev\u0061\u006c\u0069\u0064\u0020\u0072\u0061\u006eg\u0065\u0020\u0066\u006frm\u0061\u0074");};if _baf !=""{_eba [0]=_baf +"\u0021"+_eba [0];_eba [1]=_baf +"\u0021"+_eba [1];};_dda ,_ge :=ParseColumnReference (_eba [0]);if _ge !=nil {return ColumnReference {},ColumnReference {},_ge ;};_ab ,_ge :=ParseColumnReference (_eba [1]);if _ge !=nil {return ColumnReference {},ColumnReference {},_ge ;};return _dda ,_ab ,nil ;};
// String returns a string representation of CellReference.
func (_c CellReference )String ()string {_eg :=make ([]byte ,0,4);if _c .AbsoluteColumn {_eg =append (_eg ,'$');};_eg =append (_eg ,_c .Column ...);if _c .AbsoluteRow {_eg =append (_eg ,'$');};_eg =_ed .AppendInt (_eg ,int64 (_c .RowIdx ),10);return string (_eg );};
// String returns a string representation of ColumnReference.
func (_dd ColumnReference )String ()string {_dg :=make ([]byte ,0,4);if _dd .AbsoluteColumn {_dg =append (_dg ,'$');};_dg =append (_dg ,_dd .Column ...);return string (_dg );};

File diff suppressed because one or more lines are too long

View File

@ -25,7 +25,7 @@ ColumnIdx uint32 ;
SheetToUpdate string ;
// UpdateCurrentSheet is true if references without sheet prefix should be updated as well.
UpdateCurrentSheet bool ;};
UpdateCurrentSheet bool ;};const (UpdateActionRemoveColumn UpdateAction =iota ;);
// UpdateAction is the type for update types constants.
type UpdateAction byte ;const (UpdateActionRemoveColumn UpdateAction =iota ;);
type UpdateAction byte ;

File diff suppressed because one or more lines are too long

View File

@ -9,92 +9,92 @@
// 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 (_gd "encoding/xml";_f "fmt";_b "github.com/unidoc/unioffice";_fb "github.com/unidoc/unioffice/common/logger";_fbf "github.com/unidoc/unioffice/schema/soo/ofc/sharedTypes";_bc "github.com/unidoc/unioffice/schema/urn/schemas_microsoft_com/office/excel";_gc "github.com/unidoc/unioffice/schema/urn/schemas_microsoft_com/vml";_d "strconv";_g "strings";);
package vmldrawing ;import (_cb "encoding/xml";_d "fmt";_cg "github.com/unidoc/unioffice";_dd "github.com/unidoc/unioffice/common/logger";_cc "github.com/unidoc/unioffice/schema/soo/ofc/sharedTypes";_f "github.com/unidoc/unioffice/schema/urn/schemas_microsoft_com/office/excel";_g "github.com/unidoc/unioffice/schema/urn/schemas_microsoft_com/vml";_e "strconv";_a "strings";);
// SetHeight set height of shape.
func (_cga *ShapeStyle )SetHeight (height float64 ){_cga ._bg =height };
// NewCommentDrawing constructs a new comment drawing.
func NewCommentDrawing ()*Container {_b :=NewContainer ();_b .Layout =_g .NewOfcShapelayout ();_b .Layout .ExtAttr =_g .ST_ExtEdit ;_b .Layout .Idmap =_g .NewOfcCT_IdMap ();_b .Layout .Idmap .DataAttr =_cg .String ("\u0031");_b .Layout .Idmap .ExtAttr =_g .ST_ExtEdit ;_b .ShapeType =_g .NewShapetype ();_b .ShapeType .IdAttr =_cg .String ("_\u0078\u0030\u0030\u0030\u0030\u005f\u0074\u0032\u0030\u0032");_b .ShapeType .CoordsizeAttr =_cg .String ("2\u0031\u0036\u0030\u0030\u002c\u0032\u0031\u0036\u0030\u0030");_b .ShapeType .SptAttr =_cg .Float32 (202);_b .ShapeType .PathAttr =_cg .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");_cd :=_g .NewEG_ShapeElements ();_b .ShapeType .EG_ShapeElements =append (_b .ShapeType .EG_ShapeElements ,_cd );_cd .Path =_g .NewPath ();_cd .Path .GradientshapeokAttr =_cc .ST_TrueFalseT ;_cd .Path .ConnecttypeAttr =_g .OfcST_ConnectTypeRect ;return _b ;};
// ShapeStyle is style attribute of v:shape element.
type ShapeStyle struct{_bca string ;_agb float64 ;_gfb float64 ;_c float64 ;_ae float64 ;_fbb float64 ;_gcd float64 ;_cg float64 ;_ee float64 ;_db float64 ;_bg float64 ;_fbg int64 ;_gcb string ;_agf string ;_dcc string ;_gg string ;};
// ToString formatting ShapeStyle to string.
func (_aba *ShapeStyle )String ()string {_dc :="";_dc +=_d .Sprintf ("\u0070\u006f\u0073i\u0074\u0069\u006f\u006e\u003a\u0025\u0073\u003b",_aba ._gg );_dc +=_d .Sprintf ("\u006da\u0072g\u0069\u006e\u002d\u006c\u0065\u0066\u0074\u003a\u0025\u0064\u003b",int64 (_aba ._ae ));_dc +=_d .Sprintf ("\u006d\u0061\u0072\u0067\u0069\u006e\u002d\u0074\u006fp\u003a\u0025\u0064\u003b",int64 (_aba ._daa ));_dc +=_d .Sprintf ("w\u0069\u0064\u0074\u0068\u003a\u0025\u0064\u0070\u0074\u003b",int64 (_aba ._fd ));_dc +=_d .Sprintf ("\u0068\u0065\u0069g\u0068\u0074\u003a\u0025\u0064\u0070\u0074\u003b",int64 (_aba ._ed ));_dc +=_d .Sprintf ("z\u002d\u0069\u006e\u0064\u0065\u0078\u003a\u0025\u0064\u003b",_aba ._abc );_dc +=_d .Sprintf ("m\u0073\u006f\u002d\u0070\u006f\u0073i\u0074\u0069\u006f\u006e\u002d\u0068\u006f\u0072\u0069z\u006f\u006e\u0074a\u006c:\u0025\u0073\u003b",_aba ._efg );_dc +=_d .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",_aba ._afa );_dc +=_d .Sprintf ("\u006ds\u006f\u002d\u0070\u006fs\u0069\u0074\u0069\u006f\u006e-\u0076e\u0072t\u0069\u0063\u0061\u006c\u003a\u0025\u0073;",_aba ._gb );_dc +=_d .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",_aba ._gd );return _dc ;};func (_da *Container )UnmarshalXML (d *_cb .Decoder ,start _cb .StartElement )error {_da .Shape =nil ;_be :for {_fe ,_eff :=d .Token ();if _eff !=nil {return _eff ;};switch _ab :=_fe .(type ){case _cb .StartElement :switch _ab .Name .Local {case "s\u0068\u0061\u0070\u0065\u006c\u0061\u0079\u006f\u0075\u0074":_da .Layout =_g .NewOfcShapelayout ();if _beb :=d .DecodeElement (_da .Layout ,&_ab );_beb !=nil {return _beb ;};case "\u0073h\u0061\u0070\u0065\u0074\u0079\u0070e":_da .ShapeType =_g .NewShapetype ();if _ad :=d .DecodeElement (_da .ShapeType ,&_ab );_ad !=nil {return _ad ;};case "\u0073\u0068\u0061p\u0065":_dag :=_g .NewShape ();if _ccd :=d .DecodeElement (_dag ,&_ab );_ccd !=nil {return _ccd ;};_da .Shape =append (_da .Shape ,_dag );};case _cb .EndElement :break _be ;};};return nil ;};
// Height return height of shape.
func (_fa *ShapeStyle )Height ()float64 {return _fa ._bg };func (_gad *Container )MarshalXML (e *_gd .Encoder ,start _gd .StartElement )error {start .Attr =append (start .Attr ,_gd .Attr {Name :_gd .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 ,_gd .Attr {Name :_gd .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 ,_gd .Attr {Name :_gd .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 _gad .Layout !=nil {_ag :=_gd .StartElement {Name :_gd .Name {Local :"\u006f\u003a\u0073\u0068\u0061\u0070\u0065\u006c\u0061\u0079\u006f\u0075\u0074"}};e .EncodeElement (_gad .Layout ,_ag );};if _gad .ShapeType !=nil {_dg :=_gd .StartElement {Name :_gd .Name {Local :"v\u003a\u0073\u0068\u0061\u0070\u0065\u0074\u0079\u0070\u0065"}};e .EncodeElement (_gad .ShapeType ,_dg );};for _ ,_dd :=range _gad .Shape {_gf :=_gd .StartElement {Name :_gd .Name {Local :"\u0076:\u0073\u0068\u0061\u0070\u0065"}};e .EncodeElement (_dd ,_gf );};return e .EncodeToken (_gd .EndElement {Name :start .Name });};
// SetWidth set width of shape.
func (_bbg *ShapeStyle )SetWidth (width float64 ){_bbg ._fd =width };
// MSOPositionHorizontalRelative get `mso-position-horizontal-relative` attribute of shape style.
func (_ecf *ShapeStyle )MSOPositionHorizontalRelative ()string {return _ecf ._agf };
// NewShapeStyle accept value of string style attribute in v:shape and format it to generate ShapeStyle.
func NewShapeStyle (style string )ShapeStyle {_dgc :=ShapeStyle {_fd :0,_ed :0};_ge :=_a .Split (style ,"\u003b");for _ ,_de :=range _ge {_dfe :=_a .Split (_de ,"\u003a");if len (_dfe )!=2{continue ;};var _bef error ;switch _dfe [0]{case "\u0070\u006f\u0073\u0069\u0074\u0069\u006f\u006e":_dgc ._gg =_dfe [1];break ;case "\u006d\u0061\u0072\u0067\u0069\u006e\u002d\u0074\u006f\u0070":_dgc ._daa ,_bef =_e .ParseFloat (_a .ReplaceAll (_dfe [1],"\u0070\u0074",""),64);break ;case "m\u0061\u0072\u0067\u0069\u006e\u002d\u006c\u0065\u0066\u0074":_dgc ._ae ,_bef =_e .ParseFloat (_a .ReplaceAll (_dfe [1],"\u0070\u0074",""),64);break ;case "\u006d\u0061\u0072\u0067\u0069\u006e\u002d\u0062\u006f\u0074\u0074\u006f\u006d":_dgc ._af ,_bef =_e .ParseFloat (_a .ReplaceAll (_dfe [1],"\u0070\u0074",""),64);break ;case "\u006d\u0061\u0072g\u0069\u006e\u002d\u0072\u0069\u0067\u0068\u0074":_dgc ._ba ,_bef =_e .ParseFloat (_a .ReplaceAll (_dfe [1],"\u0070\u0074",""),64);break ;case "\u0074\u006f\u0070":_dgc ._bf ,_bef =_e .ParseFloat (_a .ReplaceAll (_dfe [1],"\u0070\u0074",""),64);break ;case "\u006c\u0065\u0066\u0074":_dgc ._fc ,_bef =_e .ParseFloat (_a .ReplaceAll (_dfe [1],"\u0070\u0074",""),64);break ;case "\u0062\u006f\u0074\u0074\u006f\u006d":_dgc ._ccb ,_bef =_e .ParseFloat (_a .ReplaceAll (_dfe [1],"\u0070\u0074",""),64);break ;case "\u0072\u0069\u0067h\u0074":_dgc ._ffe ,_bef =_e .ParseFloat (_a .ReplaceAll (_dfe [1],"\u0070\u0074",""),64);break ;case "\u0077\u0069\u0064t\u0068":_dgc ._fd ,_bef =_e .ParseFloat (_a .ReplaceAll (_dfe [1],"\u0070\u0074",""),64);break ;case "\u0068\u0065\u0069\u0067\u0068\u0074":_dgc ._ed ,_bef =_e .ParseFloat (_a .ReplaceAll (_dfe [1],"\u0070\u0074",""),64);break ;case "\u007a-\u0069\u006e\u0064\u0065\u0078":_dgc ._abc ,_bef =_e .ParseInt (_dfe [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":_dgc ._efg =_dfe [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":_dgc ._afa =_dfe [1];break ;case "m\u0073\u006f\u002d\u0070os\u0069t\u0069\u006f\u006e\u002d\u0076e\u0072\u0074\u0069\u0063\u0061\u006c":_dgc ._gb =_dfe [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":_dgc ._gd =_dfe [1];break ;};if _bef !=nil {_dd .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",_dfe [0],_dfe [1]);};};return _dgc ;};
// CreateFormula creates F element for typeFormulas.
func CreateFormula (s string )*_gc .CT_F {_bcc :=_gc .NewCT_F ();_bcc .EqnAttr =&s ;return _bcc };
// TextpathStyle is style attribute of element v:textpath.
type TextpathStyle struct{_fg string ;_ec int64 ;_dea bool ;_fac bool ;};
// Top get top attribute of shape style.
func (_bf *ShapeStyle )Top ()float64 {return _bf ._fbb };func NewContainer ()*Container {return &Container {}};
// Width return width of shape.
func (_bdg *ShapeStyle )Width ()float64 {return _bdg ._fd };
// Left get left attribute of shape style.
func (_dbe *ShapeStyle )Left ()float64 {return _dbe ._gcd };
// ToString generate string of TextpathStyle.
func (_ggf *TextpathStyle )String ()string {_acb :="";_acb +=_d .Sprintf ("\u0066o\u006et\u002d\u0066\u0061\u006d\u0069\u006c\u0079\u003a\u0025\u0073\u003b",_ggf ._fg );_acb +=_d .Sprintf ("\u0066o\u006et\u002d\u0073\u0069\u007a\u0065\u003a\u0025\u0064\u0070\u0074\u003b",_ggf ._ec );if _ggf ._fac {_acb +=_d .Sprintf ("\u0066o\u006et\u002d\u0073\u0074\u0079\u006ce\u003a\u0069t\u0061\u006c\u0069\u0063\u003b");};if _ggf ._dea {_acb +=_d .Sprintf ("\u0066\u006f\u006e\u0074\u002d\u0077\u0065\u0069\u0067\u0068\u0074\u003ab\u006f\u006c\u0064\u003b");};return _acb ;};
// NewCommentShape creates a new comment shape for a given cell index. The
// indices here are zero based.
func NewCommentShape (col ,row int64 )*_gc .Shape {_eb :=_gc .NewShape ();_eb .IdAttr =_b .String (_f .Sprintf ("\u0063\u0073\u005f\u0025\u0064\u005f\u0025\u0064",col ,row ));_eb .TypeAttr =_b .String ("\u0023\u005f\u00780\u0030\u0030\u0030\u005f\u0074\u0032\u0030\u0032");_eb .StyleAttr =_b .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");_eb .FillcolorAttr =_b .String ("\u0023f\u0062\u0066\u0036\u0064\u0036");_eb .StrokecolorAttr =_b .String ("\u0023e\u0064\u0065\u0061\u0061\u0031");_ef :=_gc .NewEG_ShapeElements ();_ef .Fill =_gc .NewFill ();_ef .Fill .Color2Attr =_b .String ("\u0023f\u0062\u0066\u0065\u0038\u0032");_ef .Fill .AngleAttr =_b .Float64 (-180);_ef .Fill .TypeAttr =_gc .ST_FillTypeGradient ;_ef .Fill .Fill =_gc .NewOfcFill ();_ef .Fill .Fill .ExtAttr =_gc .ST_ExtView ;_ef .Fill .Fill .TypeAttr =_gc .OfcST_FillTypeGradientUnscaled ;_eb .EG_ShapeElements =append (_eb .EG_ShapeElements ,_ef );_ga :=_gc .NewEG_ShapeElements ();_ga .Shadow =_gc .NewShadow ();_ga .Shadow .OnAttr =_fbf .ST_TrueFalseT ;_ga .Shadow .ObscuredAttr =_fbf .ST_TrueFalseT ;_eb .EG_ShapeElements =append (_eb .EG_ShapeElements ,_ga );_ea :=_gc .NewEG_ShapeElements ();_ea .Path =_gc .NewPath ();_ea .Path .ConnecttypeAttr =_gc .OfcST_ConnectTypeNone ;_eb .EG_ShapeElements =append (_eb .EG_ShapeElements ,_ea );_ec :=_gc .NewEG_ShapeElements ();_ec .Textbox =_gc .NewTextbox ();_ec .Textbox .StyleAttr =_b .String ("\u006d\u0073\u006f\u002ddi\u0072\u0065\u0063\u0074\u0069\u006f\u006e\u002d\u0061\u006c\u0074\u003a\u0061\u0075t\u006f");_eb .EG_ShapeElements =append (_eb .EG_ShapeElements ,_ec );_fc :=_gc .NewEG_ShapeElements ();_fc .ClientData =_bc .NewClientData ();_fc .ClientData .ObjectTypeAttr =_bc .ST_ObjectTypeNote ;_fc .ClientData .MoveWithCells =_fbf .ST_TrueFalseBlankT ;_fc .ClientData .SizeWithCells =_fbf .ST_TrueFalseBlankT ;_fc .ClientData .Anchor =_b .String ("\u0031,\u0020\u0031\u0035\u002c\u0020\u0030\u002c\u0020\u0032\u002c\u00202\u002c\u0020\u0035\u0034\u002c\u0020\u0035\u002c\u0020\u0033");_fc .ClientData .AutoFill =_fbf .ST_TrueFalseBlankFalse ;_fc .ClientData .Row =_b .Int64 (row );_fc .ClientData .Column =_b .Int64 (col );_eb .EG_ShapeElements =append (_eb .EG_ShapeElements ,_fc );return _eb ;};type Container struct{Layout *_gc .OfcShapelayout ;ShapeType *_gc .Shapetype ;Shape []*_gc .Shape ;};
func NewCommentShape (col ,row int64 )*_g .Shape {_ef :=_g .NewShape ();_ef .IdAttr =_cg .String (_d .Sprintf ("\u0063\u0073\u005f\u0025\u0064\u005f\u0025\u0064",col ,row ));_ef .TypeAttr =_cg .String ("\u0023\u005f\u00780\u0030\u0030\u0030\u005f\u0074\u0032\u0030\u0032");_ef .StyleAttr =_cg .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");_ef .FillcolorAttr =_cg .String ("\u0023f\u0062\u0066\u0036\u0064\u0036");_ef .StrokecolorAttr =_cg .String ("\u0023e\u0064\u0065\u0061\u0061\u0031");_dg :=_g .NewEG_ShapeElements ();_dg .Fill =_g .NewFill ();_dg .Fill .Color2Attr =_cg .String ("\u0023f\u0062\u0066\u0065\u0038\u0032");_dg .Fill .AngleAttr =_cg .Float64 (-180);_dg .Fill .TypeAttr =_g .ST_FillTypeGradient ;_dg .Fill .Fill =_g .NewOfcFill ();_dg .Fill .Fill .ExtAttr =_g .ST_ExtView ;_dg .Fill .Fill .TypeAttr =_g .OfcST_FillTypeGradientUnscaled ;_ef .EG_ShapeElements =append (_ef .EG_ShapeElements ,_dg );_fa :=_g .NewEG_ShapeElements ();_fa .Shadow =_g .NewShadow ();_fa .Shadow .OnAttr =_cc .ST_TrueFalseT ;_fa .Shadow .ObscuredAttr =_cc .ST_TrueFalseT ;_ef .EG_ShapeElements =append (_ef .EG_ShapeElements ,_fa );_ff :=_g .NewEG_ShapeElements ();_ff .Path =_g .NewPath ();_ff .Path .ConnecttypeAttr =_g .OfcST_ConnectTypeNone ;_ef .EG_ShapeElements =append (_ef .EG_ShapeElements ,_ff );_df :=_g .NewEG_ShapeElements ();_df .Textbox =_g .NewTextbox ();_df .Textbox .StyleAttr =_cg .String ("\u006d\u0073\u006f\u002ddi\u0072\u0065\u0063\u0074\u0069\u006f\u006e\u002d\u0061\u006c\u0074\u003a\u0061\u0075t\u006f");_ef .EG_ShapeElements =append (_ef .EG_ShapeElements ,_df );_bb :=_g .NewEG_ShapeElements ();_bb .ClientData =_f .NewClientData ();_bb .ClientData .ObjectTypeAttr =_f .ST_ObjectTypeNote ;_bb .ClientData .MoveWithCells =_cc .ST_TrueFalseBlankT ;_bb .ClientData .SizeWithCells =_cc .ST_TrueFalseBlankT ;_bb .ClientData .Anchor =_cg .String ("\u0031,\u0020\u0031\u0035\u002c\u0020\u0030\u002c\u0020\u0032\u002c\u00202\u002c\u0020\u0035\u0034\u002c\u0020\u0035\u002c\u0020\u0033");_bb .ClientData .AutoFill =_cc .ST_TrueFalseBlankFalse ;_bb .ClientData .Row =_cg .Int64 (row );_bb .ClientData .Column =_cg .Int64 (col );_ef .EG_ShapeElements =append (_ef .EG_ShapeElements ,_bb );return _ef ;};
// ToString formatting ShapeStyle to string.
func (_cce *ShapeStyle )String ()string {_fg :="";_fg +=_f .Sprintf ("\u0070\u006f\u0073i\u0074\u0069\u006f\u006e\u003a\u0025\u0073\u003b",_cce ._bca );_fg +=_f .Sprintf ("\u006da\u0072g\u0069\u006e\u002d\u006c\u0065\u0066\u0074\u003a\u0025\u0064\u003b",int64 (_cce ._gfb ));_fg +=_f .Sprintf ("\u006d\u0061\u0072\u0067\u0069\u006e\u002d\u0074\u006fp\u003a\u0025\u0064\u003b",int64 (_cce ._agb ));_fg +=_f .Sprintf ("w\u0069\u0064\u0074\u0068\u003a\u0025\u0064\u0070\u0074\u003b",int64 (_cce ._db ));_fg +=_f .Sprintf ("\u0068\u0065\u0069g\u0068\u0074\u003a\u0025\u0064\u0070\u0074\u003b",int64 (_cce ._bg ));_fg +=_f .Sprintf ("z\u002d\u0069\u006e\u0064\u0065\u0078\u003a\u0025\u0064\u003b",_cce ._fbg );_fg +=_f .Sprintf ("m\u0073\u006f\u002d\u0070\u006f\u0073i\u0074\u0069\u006f\u006e\u002d\u0068\u006f\u0072\u0069z\u006f\u006e\u0074a\u006c:\u0025\u0073\u003b",_cce ._gcb );_fg +=_f .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",_cce ._agf );_fg +=_f .Sprintf ("\u006ds\u006f\u002d\u0070\u006fs\u0069\u0074\u0069\u006f\u006e-\u0076e\u0072t\u0069\u0063\u0061\u006c\u003a\u0025\u0073;",_cce ._dcc );_fg +=_f .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",_cce ._gg );return _fg ;};
// SetWidth set width of shape.
func (_ed *ShapeStyle )SetWidth (width float64 ){_ed ._db =width };
// NewShapeStyle accept value of string style attribute in v:shape and format it to generate ShapeStyle.
func NewShapeStyle (style string )ShapeStyle {_ggf :=ShapeStyle {_db :0,_bg :0};_cgd :=_g .Split (style ,"\u003b");for _ ,_fce :=range _cgd {_ecg :=_g .Split (_fce ,"\u003a");if len (_ecg )!=2{continue ;};var _cf error ;switch _ecg [0]{case "\u0070\u006f\u0073\u0069\u0074\u0069\u006f\u006e":_ggf ._bca =_ecg [1];break ;case "\u006d\u0061\u0072\u0067\u0069\u006e\u002d\u0074\u006f\u0070":_ggf ._agb ,_cf =_d .ParseFloat (_g .ReplaceAll (_ecg [1],"\u0070\u0074",""),64);break ;case "m\u0061\u0072\u0067\u0069\u006e\u002d\u006c\u0065\u0066\u0074":_ggf ._gfb ,_cf =_d .ParseFloat (_g .ReplaceAll (_ecg [1],"\u0070\u0074",""),64);break ;case "\u006d\u0061\u0072\u0067\u0069\u006e\u002d\u0062\u006f\u0074\u0074\u006f\u006d":_ggf ._c ,_cf =_d .ParseFloat (_g .ReplaceAll (_ecg [1],"\u0070\u0074",""),64);break ;case "\u006d\u0061\u0072g\u0069\u006e\u002d\u0072\u0069\u0067\u0068\u0074":_ggf ._ae ,_cf =_d .ParseFloat (_g .ReplaceAll (_ecg [1],"\u0070\u0074",""),64);break ;case "\u0074\u006f\u0070":_ggf ._fbb ,_cf =_d .ParseFloat (_g .ReplaceAll (_ecg [1],"\u0070\u0074",""),64);break ;case "\u006c\u0065\u0066\u0074":_ggf ._gcd ,_cf =_d .ParseFloat (_g .ReplaceAll (_ecg [1],"\u0070\u0074",""),64);break ;case "\u0062\u006f\u0074\u0074\u006f\u006d":_ggf ._cg ,_cf =_d .ParseFloat (_g .ReplaceAll (_ecg [1],"\u0070\u0074",""),64);break ;case "\u0072\u0069\u0067h\u0074":_ggf ._ee ,_cf =_d .ParseFloat (_g .ReplaceAll (_ecg [1],"\u0070\u0074",""),64);break ;case "\u0077\u0069\u0064t\u0068":_ggf ._db ,_cf =_d .ParseFloat (_g .ReplaceAll (_ecg [1],"\u0070\u0074",""),64);break ;case "\u0068\u0065\u0069\u0067\u0068\u0074":_ggf ._bg ,_cf =_d .ParseFloat (_g .ReplaceAll (_ecg [1],"\u0070\u0074",""),64);break ;case "\u007a-\u0069\u006e\u0064\u0065\u0078":_ggf ._fbg ,_cf =_d .ParseInt (_ecg [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":_ggf ._gcb =_ecg [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":_ggf ._agf =_ecg [1];break ;case "m\u0073\u006f\u002d\u0070os\u0069t\u0069\u006f\u006e\u002d\u0076e\u0072\u0074\u0069\u0063\u0061\u006c":_ggf ._dcc =_ecg [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":_ggf ._gg =_ecg [1];break ;};if _cf !=nil {_fb .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",_ecg [0],_ecg [1]);};};return _ggf ;};const (ShapeStylePositionAbsolute ="\u0061\u0062\u0073\u006f\u006c\u0075\u0074\u0065";ShapeStylePositionRelative ="\u0072\u0065\u006c\u0061\u0074\u0069\u0076\u0065";);
// SetFontFamily sets text's fontFamily.
func (_ba *TextpathStyle )SetFontFamily (fontFamily string ){_ba ._bfe =fontFamily };func (_ddf *Container )UnmarshalXML (d *_gd .Decoder ,start _gd .StartElement )error {_ddf .Shape =nil ;_eag :for {_eg ,_bcd :=d .Token ();if _bcd !=nil {return _bcd ;};switch _bb :=_eg .(type ){case _gd .StartElement :switch _bb .Name .Local {case "s\u0068\u0061\u0070\u0065\u006c\u0061\u0079\u006f\u0075\u0074":_ddf .Layout =_gc .NewOfcShapelayout ();if _aa :=d .DecodeElement (_ddf .Layout ,&_bb );_aa !=nil {return _aa ;};case "\u0073h\u0061\u0070\u0065\u0074\u0079\u0070e":_ddf .ShapeType =_gc .NewShapetype ();if _da :=d .DecodeElement (_ddf .ShapeType ,&_bb );_da !=nil {return _da ;};case "\u0073\u0068\u0061p\u0065":_fd :=_gc .NewShape ();if _eaa :=d .DecodeElement (_fd ,&_bb );_eaa !=nil {return _eaa ;};_ddf .Shape =append (_ddf .Shape ,_fd );};case _gd .EndElement :break _eag ;};};return nil ;};
// Margins get margin top, left, bottom, and right of shape style.
func (_bge *ShapeStyle )Margins ()(float64 ,float64 ,float64 ,float64 ){return _bge ._agb ,_bge ._gfb ,_bge ._c ,_bge ._ae ;};
// NewTextpathStyle accept value of string style attribute of element v:textpath and format it to generate TextpathStyle.
func NewTextpathStyle (style string )TextpathStyle {_bdb :=TextpathStyle {_bfe :"\u0022C\u0061\u006c\u0069\u0062\u0072\u0069\"",_eca :44,_aeb :false ,_ab :false };_dcb :=_g .Split (style ,"\u003b");for _ ,_ce :=range _dcb {_ecc :=_g .Split (_ce ,"\u003a");if len (_ecc )!=2{continue ;};switch _ecc [0]{case "f\u006f\u006e\u0074\u002d\u0066\u0061\u006d\u0069\u006c\u0079":_bdb ._bfe =_ecc [1];break ;case "\u0066o\u006e\u0074\u002d\u0073\u0069\u007ae":_bdb ._eca ,_ =_d .ParseInt (_g .ReplaceAll (_ecc [1],"\u0070\u0074",""),10,64);break ;case "f\u006f\u006e\u0074\u002d\u0077\u0065\u0069\u0067\u0068\u0074":_bdb ._aeb =_ecc [1]=="\u0062\u006f\u006c\u0064";break ;case "\u0066\u006f\u006e\u0074\u002d\u0073\u0074\u0079\u006c\u0065":_bdb ._ab =_ecc [1]=="\u0069\u0074\u0061\u006c\u0069\u0063";break ;};};return _bdb ;};
// SetFontSize sets text's fontSize.
func (_ggg *TextpathStyle )SetFontSize (fontSize int64 ){_ggg ._eca =fontSize };
// Bottom get bottom attribute of shape style.
func (_fcec *ShapeStyle )Bottom ()float64 {return _fcec ._cg };
// Right get right attribute of shape style.
func (_cc *ShapeStyle )Right ()float64 {return _cc ._ee };
// IsItalic returns true if text is italic.
func (_fe *TextpathStyle )IsItalic ()bool {return _fe ._ab };
// Height return height of shape.
func (_deg *ShapeStyle )Height ()float64 {return _deg ._ed };
// SetItalic sets text to italic.
func (_dbd *TextpathStyle )SetItalic (italic bool ){_dbd ._ab =italic };
func (_age *TextpathStyle )SetItalic (italic bool ){_age ._fac =italic };
// Right get right attribute of shape style.
func (_fdf *ShapeStyle )Right ()float64 {return _fdf ._ffe };
// Left get left attribute of shape style.
func (_ac *ShapeStyle )Left ()float64 {return _ac ._fc };
// MSOPositionHorizontalRelative get `mso-position-horizontal-relative` attribute of shape style.
func (_bbe *ShapeStyle )MSOPositionHorizontalRelative ()string {return _bbe ._afa };
// IsBold returns true if text is bold.
func (_gge *TextpathStyle )IsBold ()bool {return _gge ._aeb };
// SetBold sets text to bold.
func (_efa *TextpathStyle )SetBold (bold bool ){_efa ._aeb =bold };
func (_ffg *TextpathStyle )IsBold ()bool {return _ffg ._dea };
// FontFamily returns fontFamily of the text.
func (_ebd *TextpathStyle )FontFamily ()string {return _ebd ._bfe };
func (_dge *TextpathStyle )FontFamily ()string {return _dge ._fg };
// NewCommentDrawing constructs a new comment drawing.
func NewCommentDrawing ()*Container {_de :=NewContainer ();_de .Layout =_gc .NewOfcShapelayout ();_de .Layout .ExtAttr =_gc .ST_ExtEdit ;_de .Layout .Idmap =_gc .NewOfcCT_IdMap ();_de .Layout .Idmap .DataAttr =_b .String ("\u0031");_de .Layout .Idmap .ExtAttr =_gc .ST_ExtEdit ;_de .ShapeType =_gc .NewShapetype ();_de .ShapeType .IdAttr =_b .String ("_\u0078\u0030\u0030\u0030\u0030\u005f\u0074\u0032\u0030\u0032");_de .ShapeType .CoordsizeAttr =_b .String ("2\u0031\u0036\u0030\u0030\u002c\u0032\u0031\u0036\u0030\u0030");_de .ShapeType .SptAttr =_b .Float32 (202);_de .ShapeType .PathAttr =_b .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");_e :=_gc .NewEG_ShapeElements ();_de .ShapeType .EG_ShapeElements =append (_de .ShapeType .EG_ShapeElements ,_e );_e .Path =_gc .NewPath ();_e .Path .GradientshapeokAttr =_fbf .ST_TrueFalseT ;_e .Path .ConnecttypeAttr =_gc .OfcST_ConnectTypeRect ;return _de ;};
// CreateFormula creates F element for typeFormulas.
func CreateFormula (s string )*_g .CT_F {_edb :=_g .NewCT_F ();_edb .EqnAttr =&s ;return _edb };
// TextpathStyle is style attribute of element v:textpath.
type TextpathStyle struct{_bfe string ;_eca int64 ;_aeb bool ;_ab bool ;};
// Bottom get bottom attribute of shape style.
func (_dba *ShapeStyle )Bottom ()float64 {return _dba ._ccb };
// MSOPositionVerticalRelative get `mso-position-vertical-relative` attribute of shape style.
func (_agd *ShapeStyle )MSOPositionVerticalRelative ()string {return _agd ._gg };
// Position get position attribute of shape style.
func (_bd *ShapeStyle )Position ()string {return _bd ._bca };
// ToString generate string of TextpathStyle.
func (_bgf *TextpathStyle )String ()string {_dbda :="";_dbda +=_f .Sprintf ("\u0066o\u006et\u002d\u0066\u0061\u006d\u0069\u006c\u0079\u003a\u0025\u0073\u003b",_bgf ._bfe );_dbda +=_f .Sprintf ("\u0066o\u006et\u002d\u0073\u0069\u007a\u0065\u003a\u0025\u0064\u0070\u0074\u003b",_bgf ._eca );if _bgf ._ab {_dbda +=_f .Sprintf ("\u0066o\u006et\u002d\u0073\u0074\u0079\u006ce\u003a\u0069t\u0061\u006c\u0069\u0063\u003b");};if _bgf ._aeb {_dbda +=_f .Sprintf ("\u0066\u006f\u006e\u0074\u002d\u0077\u0065\u0069\u0067\u0068\u0074\u003ab\u006f\u006c\u0064\u003b");};return _dbda ;};
// Width return width of shape.
func (_eagb *ShapeStyle )Width ()float64 {return _eagb ._db };
// SetFontSize sets text's fontSize.
func (_eba *TextpathStyle )SetFontSize (fontSize int64 ){_eba ._ec =fontSize };
// FontSize returns fontSize of the text.
func (_gff *TextpathStyle )FontSize ()int64 {return _gff ._eca };
func (_eb *TextpathStyle )FontSize ()int64 {return _eb ._ec };type Container struct{Layout *_g .OfcShapelayout ;ShapeType *_g .Shapetype ;Shape []*_g .Shape ;};
// IsItalic returns true if text is italic.
func (_ece *TextpathStyle )IsItalic ()bool {return _ece ._fac };
// NewTextpathStyle accept value of string style attribute of element v:textpath and format it to generate TextpathStyle.
func NewTextpathStyle (style string )TextpathStyle {_ggb :=TextpathStyle {_fg :"\u0022C\u0061\u006c\u0069\u0062\u0072\u0069\"",_ec :44,_dea :false ,_fac :false };_ccg :=_a .Split (style ,"\u003b");for _ ,_gf :=range _ccg {_ce :=_a .Split (_gf ,"\u003a");if len (_ce )!=2{continue ;};switch _ce [0]{case "f\u006f\u006e\u0074\u002d\u0066\u0061\u006d\u0069\u006c\u0079":_ggb ._fg =_ce [1];break ;case "\u0066o\u006e\u0074\u002d\u0073\u0069\u007ae":_ggb ._ec ,_ =_e .ParseInt (_a .ReplaceAll (_ce [1],"\u0070\u0074",""),10,64);break ;case "f\u006f\u006e\u0074\u002d\u0077\u0065\u0069\u0067\u0068\u0074":_ggb ._dea =_ce [1]=="\u0062\u006f\u006c\u0064";break ;case "\u0066\u006f\u006e\u0074\u002d\u0073\u0074\u0079\u006c\u0065":_ggb ._fac =_ce [1]=="\u0069\u0074\u0061\u006c\u0069\u0063";break ;};};return _ggb ;};const (ShapeStylePositionAbsolute ="\u0061\u0062\u0073\u006f\u006c\u0075\u0074\u0065";ShapeStylePositionRelative ="\u0072\u0065\u006c\u0061\u0074\u0069\u0076\u0065";);func NewContainer ()*Container {return &Container {}};
// MSOPositionVerticalRelative get `mso-position-vertical-relative` attribute of shape style.
func (_aea *ShapeStyle )MSOPositionVerticalRelative ()string {return _aea ._gd };
// ShapeStyle is style attribute of v:shape element.
type ShapeStyle struct{_gg string ;_daa float64 ;_ae float64 ;_af float64 ;_ba float64 ;_bf float64 ;_fc float64 ;_ccb float64 ;_ffe float64 ;_fd float64 ;_ed float64 ;_abc int64 ;_efg string ;_afa string ;_gb string ;_gd string ;};
// SetFontFamily sets text's fontFamily.
func (_eg *TextpathStyle )SetFontFamily (fontFamily string ){_eg ._fg =fontFamily };
// Position get position attribute of shape style.
func (_fea *ShapeStyle )Position ()string {return _fea ._gg };
// SetBold sets text to bold.
func (_baa *TextpathStyle )SetBold (bold bool ){_baa ._dea =bold };func (_bbb *Container )MarshalXML (e *_cb .Encoder ,start _cb .StartElement )error {start .Attr =append (start .Attr ,_cb .Attr {Name :_cb .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 ,_cb .Attr {Name :_cb .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 ,_cb .Attr {Name :_cb .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 _bbb .Layout !=nil {_db :=_cb .StartElement {Name :_cb .Name {Local :"\u006f\u003a\u0073\u0068\u0061\u0070\u0065\u006c\u0061\u0079\u006f\u0075\u0074"}};e .EncodeElement (_bbb .Layout ,_db );};if _bbb .ShapeType !=nil {_ddg :=_cb .StartElement {Name :_cb .Name {Local :"v\u003a\u0073\u0068\u0061\u0070\u0065\u0074\u0079\u0070\u0065"}};e .EncodeElement (_bbb .ShapeType ,_ddg );};for _ ,_bd :=range _bbb .Shape {_fb :=_cb .StartElement {Name :_cb .Name {Local :"\u0076:\u0073\u0068\u0061\u0070\u0065"}};e .EncodeElement (_bd ,_fb );};return e .EncodeToken (_cb .EndElement {Name :start .Name });};
// Margins get margin top, left, bottom, and right of shape style.
func (_gbc *ShapeStyle )Margins ()(float64 ,float64 ,float64 ,float64 ){return _gbc ._daa ,_gbc ._ae ,_gbc ._af ,_gbc ._ba ;};
// SetHeight set height of shape.
func (_ea *ShapeStyle )SetHeight (height float64 ){_ea ._ed =height };
// Top get top attribute of shape style.
func (_ag *ShapeStyle )Top ()float64 {return _ag ._bf };

View File

@ -9,40 +9,21 @@
// 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 (_d "archive/zip";_f "bytes";_gg "encoding/xml";_e "fmt";_bg "github.com/unidoc/unioffice";_ff "github.com/unidoc/unioffice/algo";_cg "github.com/unidoc/unioffice/common/tempstorage";_cb "github.com/unidoc/unioffice/schema/soo/pkg/relationships";_c "io";_eg "path";_b "sort";_a "strings";_da "time";);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 {_aae :=_a .Split (path ,"\u002f");_ge :=_a .Join (_aae [0:len (_aae )-1],"\u002f");_ab :=_aae [len (_aae )-1];_ge +="\u002f_\u0072\u0065\u006c\u0073\u002f";_ab +="\u002e\u0072\u0065l\u0073";return _ge +_ab ;};
package zippkg ;import (_g "archive/zip";_db "bytes";_f "encoding/xml";_gc "fmt";_be "github.com/unidoc/unioffice";_cf "github.com/unidoc/unioffice/algo";_e "github.com/unidoc/unioffice/common/tempstorage";_fd "github.com/unidoc/unioffice/schema/soo/pkg/relationships";_ce "io";_df "path";_dd "sort";_c "strings";_d "time";);
// 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 (_gf *DecodeMap )AddTarget (filePath string ,ifc interface{},sourceFileType string ,idx uint32 )bool {if _gf ._cgf ==nil {_gf ._cgf =make (map[string ]Target );_gf ._bf =make (map[*_cb .Relationships ]string );_gf ._gd =make (map[string ]struct{});_gf ._fg =make (map[string ]int );};_ba :=_eg .Clean (filePath );if _ ,_ef :=_gf ._gd [_ba ];_ef {return false ;};_gf ._gd [_ba ]=struct{}{};_gf ._cgf [_ba ]=Target {Path :filePath ,Typ :sourceFileType ,Ifc :ifc ,Index :idx };return true ;};
// Decode loops decoding targets registered with AddTarget and calling th
func (_bff *DecodeMap )Decode (files []*_d .File )error {_dcb :=1;for _dcb > 0{for len (_bff ._ed )> 0{_dcg :=_bff ._ed [0];_bff ._ed =_bff ._ed [1:];_cbf :=_dcg .Ifc .(*_cb .Relationships );for _ ,_ga :=range _cbf .Relationship {_ffec ,_ :=_bff ._bf [_cbf ];_bff ._dc (_bff ,_ffec +_ga .TargetAttr ,_ga .TypeAttr ,files ,_ga ,_dcg );};};for _ea ,_ddd :=range files {if _ddd ==nil {continue ;};if _ced ,_efa :=_bff ._cgf [_ddd .Name ];_efa {delete (_bff ._cgf ,_ddd .Name );if _gda :=Decode (_ddd ,_ced .Ifc );_gda !=nil {return _gda ;};files [_ea ]=nil ;if _fbb ,_egd :=_ced .Ifc .(*_cb .Relationships );_egd {_bff ._ed =append (_bff ._ed ,_ced );_ac ,_ :=_eg .Split (_eg .Clean (_ddd .Name +"\u002f\u002e\u002e\u002f"));_bff ._bf [_fbb ]=_ac ;_dcb ++;};};};_dcb --;};return nil ;};
func (_geg *DecodeMap )AddTarget (filePath string ,ifc interface{},sourceFileType string ,idx uint32 )bool {if _geg ._bb ==nil {_geg ._bb =make (map[string ]Target );_geg ._eb =make (map[*_fd .Relationships ]string );_geg ._edd =make (map[string ]struct{});_geg ._eed =make (map[string ]int );};_ea :=_df .Clean (filePath );if _ ,_dag :=_geg ._edd [_ea ];_dag {return false ;};_geg ._edd [_ea ]=struct{}{};_geg ._bb [_ea ]=Target {Path :filePath ,Typ :sourceFileType ,Ifc :ifc ,Index :idx };return true ;};var _agg =[]byte {'\r','\n'};func (_ab *DecodeMap )IndexFor (path string )int {return _ab ._eed [path ]};
// Decode unmarshals the content of a *zip.File as XML to a given destination.
func Decode (f *_d .File ,dest interface{})error {_dab ,_gfd :=f .Open ();if _gfd !=nil {return _e .Errorf ("e\u0072r\u006f\u0072\u0020\u0072\u0065\u0061\u0064\u0069n\u0067\u0020\u0025\u0073: \u0025\u0073",f .Name ,_gfd );};defer _dab .Close ();_fga :=_gg .NewDecoder (_dab );if _baf :=_fga .Decode (dest );_baf !=nil {return _e .Errorf ("e\u0072\u0072\u006f\u0072 d\u0065c\u006f\u0064\u0069\u006e\u0067 \u0025\u0073\u003a\u0020\u0025\u0073",f .Name ,_baf );};if _be ,_bec :=dest .(*_cb .Relationships );_bec {for _gfc ,_bc :=range _be .Relationship {switch _bc .TypeAttr {case _bg .OfficeDocumentTypeStrict :_be .Relationship [_gfc ].TypeAttr =_bg .OfficeDocumentType ;case _bg .StylesTypeStrict :_be .Relationship [_gfc ].TypeAttr =_bg .StylesType ;case _bg .ThemeTypeStrict :_be .Relationship [_gfc ].TypeAttr =_bg .ThemeType ;case _bg .ControlTypeStrict :_be .Relationship [_gfc ].TypeAttr =_bg .ControlType ;case _bg .SettingsTypeStrict :_be .Relationship [_gfc ].TypeAttr =_bg .SettingsType ;case _bg .ImageTypeStrict :_be .Relationship [_gfc ].TypeAttr =_bg .ImageType ;case _bg .CommentsTypeStrict :_be .Relationship [_gfc ].TypeAttr =_bg .CommentsType ;case _bg .ThumbnailTypeStrict :_be .Relationship [_gfc ].TypeAttr =_bg .ThumbnailType ;case _bg .DrawingTypeStrict :_be .Relationship [_gfc ].TypeAttr =_bg .DrawingType ;case _bg .ChartTypeStrict :_be .Relationship [_gfc ].TypeAttr =_bg .ChartType ;case _bg .ExtendedPropertiesTypeStrict :_be .Relationship [_gfc ].TypeAttr =_bg .ExtendedPropertiesType ;case _bg .CustomXMLTypeStrict :_be .Relationship [_gfc ].TypeAttr =_bg .CustomXMLType ;case _bg .WorksheetTypeStrict :_be .Relationship [_gfc ].TypeAttr =_bg .WorksheetType ;case _bg .SharedStringsTypeStrict :_be .Relationship [_gfc ].TypeAttr =_bg .SharedStringsType ;case _bg .TableTypeStrict :_be .Relationship [_gfc ].TypeAttr =_bg .TableType ;case _bg .HeaderTypeStrict :_be .Relationship [_gfc ].TypeAttr =_bg .HeaderType ;case _bg .FooterTypeStrict :_be .Relationship [_gfc ].TypeAttr =_bg .FooterType ;case _bg .NumberingTypeStrict :_be .Relationship [_gfc ].TypeAttr =_bg .NumberingType ;case _bg .FontTableTypeStrict :_be .Relationship [_gfc ].TypeAttr =_bg .FontTableType ;case _bg .WebSettingsTypeStrict :_be .Relationship [_gfc ].TypeAttr =_bg .WebSettingsType ;case _bg .FootNotesTypeStrict :_be .Relationship [_gfc ].TypeAttr =_bg .FootNotesType ;case _bg .EndNotesTypeStrict :_be .Relationship [_gfc ].TypeAttr =_bg .EndNotesType ;case _bg .SlideTypeStrict :_be .Relationship [_gfc ].TypeAttr =_bg .SlideType ;case _bg .VMLDrawingTypeStrict :_be .Relationship [_gfc ].TypeAttr =_bg .VMLDrawingType ;};};_b .Slice (_be .Relationship ,func (_fac ,_fc int )bool {_acf :=_be .Relationship [_fac ];_gac :=_be .Relationship [_fc ];return _ff .NaturalLess (_acf .IdAttr ,_gac .IdAttr );});};return nil ;};
func Decode (f *_g .File ,dest interface{})error {_beg ,_gf :=f .Open ();if _gf !=nil {return _gc .Errorf ("e\u0072r\u006f\u0072\u0020\u0072\u0065\u0061\u0064\u0069n\u0067\u0020\u0025\u0073: \u0025\u0073",f .Name ,_gf );};defer _beg .Close ();_cea :=_f .NewDecoder (_beg );if _cgb :=_cea .Decode (dest );_cgb !=nil {return _gc .Errorf ("e\u0072\u0072\u006f\u0072 d\u0065c\u006f\u0064\u0069\u006e\u0067 \u0025\u0073\u003a\u0020\u0025\u0073",f .Name ,_cgb );};if _ccc ,_fb :=dest .(*_fd .Relationships );_fb {for _ba ,_def :=range _ccc .Relationship {switch _def .TypeAttr {case _be .OfficeDocumentTypeStrict :_ccc .Relationship [_ba ].TypeAttr =_be .OfficeDocumentType ;case _be .StylesTypeStrict :_ccc .Relationship [_ba ].TypeAttr =_be .StylesType ;case _be .ThemeTypeStrict :_ccc .Relationship [_ba ].TypeAttr =_be .ThemeType ;case _be .ControlTypeStrict :_ccc .Relationship [_ba ].TypeAttr =_be .ControlType ;case _be .SettingsTypeStrict :_ccc .Relationship [_ba ].TypeAttr =_be .SettingsType ;case _be .ImageTypeStrict :_ccc .Relationship [_ba ].TypeAttr =_be .ImageType ;case _be .CommentsTypeStrict :_ccc .Relationship [_ba ].TypeAttr =_be .CommentsType ;case _be .ThumbnailTypeStrict :_ccc .Relationship [_ba ].TypeAttr =_be .ThumbnailType ;case _be .DrawingTypeStrict :_ccc .Relationship [_ba ].TypeAttr =_be .DrawingType ;case _be .ChartTypeStrict :_ccc .Relationship [_ba ].TypeAttr =_be .ChartType ;case _be .ExtendedPropertiesTypeStrict :_ccc .Relationship [_ba ].TypeAttr =_be .ExtendedPropertiesType ;case _be .CustomXMLTypeStrict :_ccc .Relationship [_ba ].TypeAttr =_be .CustomXMLType ;case _be .WorksheetTypeStrict :_ccc .Relationship [_ba ].TypeAttr =_be .WorksheetType ;case _be .SharedStringsTypeStrict :_ccc .Relationship [_ba ].TypeAttr =_be .SharedStringsType ;case _be .TableTypeStrict :_ccc .Relationship [_ba ].TypeAttr =_be .TableType ;case _be .HeaderTypeStrict :_ccc .Relationship [_ba ].TypeAttr =_be .HeaderType ;case _be .FooterTypeStrict :_ccc .Relationship [_ba ].TypeAttr =_be .FooterType ;case _be .NumberingTypeStrict :_ccc .Relationship [_ba ].TypeAttr =_be .NumberingType ;case _be .FontTableTypeStrict :_ccc .Relationship [_ba ].TypeAttr =_be .FontTableType ;case _be .WebSettingsTypeStrict :_ccc .Relationship [_ba ].TypeAttr =_be .WebSettingsType ;case _be .FootNotesTypeStrict :_ccc .Relationship [_ba ].TypeAttr =_be .FootNotesType ;case _be .EndNotesTypeStrict :_ccc .Relationship [_ba ].TypeAttr =_be .EndNotesType ;case _be .SlideTypeStrict :_ccc .Relationship [_ba ].TypeAttr =_be .SlideType ;case _be .VMLDrawingTypeStrict :_ccc .Relationship [_ba ].TypeAttr =_be .VMLDrawingType ;};};_dd .Slice (_ccc .Relationship ,func (_dee ,_ddg int )bool {_daf :=_ccc .Relationship [_dee ];_fc :=_ccc .Relationship [_ddg ];return _cf .NaturalLess (_daf .IdAttr ,_fc .IdAttr );});};return nil ;};
// DecodeMap is used to walk a tree of relationships, decoding files and passing
// control back to the document.
type DecodeMap struct{_cgf map[string ]Target ;_bf map[*_cb .Relationships ]string ;_ed []Target ;_dc OnNewRelationshipFunc ;_gd map[string ]struct{};_fg map[string ]int ;};
// SelfClosingWriter wraps a writer and replaces XML tags of the
// type <foo></foo> with <foo/>
type SelfClosingWriter struct{W _c .Writer ;};var _dcba =[]byte {'\r','\n'};func (_egf *DecodeMap )RecordIndex (path string ,idx int ){_egf ._fg [path ]=idx };const XMLHeader ="\u003c\u003f\u0078\u006d\u006c\u0020\u0076e\u0072\u0073\u0069o\u006e\u003d\u00221\u002e\u0030\"\u0020\u0065\u006e\u0063\u006f\u0064i\u006eg=\u0022\u0055\u0054\u0046\u002d\u0038\u0022\u0020\u0073\u0074\u0061\u006e\u0064\u0061\u006c\u006f\u006e\u0065\u003d\u0022\u0079\u0065\u0073\u0022\u003f\u003e"+"\u000a";func MarshalXMLByTypeIndex (z *_d .Writer ,dt _bg .DocType ,typ string ,idx int ,v interface{})error {_add :=_bg .AbsoluteFilename (dt ,typ ,idx );return MarshalXML (z ,_add ,v );};
// 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 *_d .Writer ,zipPath ,storagePath string )error {_aed ,_eb :=z .Create (zipPath );if _eb !=nil {return _e .Errorf ("e\u0072\u0072\u006f\u0072 c\u0072e\u0061\u0074\u0069\u006e\u0067 \u0025\u0073\u003a\u0020\u0025\u0073",zipPath ,_eb );};_cf ,_eb :=_cg .Open (storagePath );if _eb !=nil {return _e .Errorf ("e\u0072r\u006f\u0072\u0020\u006f\u0070\u0065\u006e\u0069n\u0067\u0020\u0025\u0073: \u0025\u0073",storagePath ,_eb );};defer _cf .Close ();_ ,_eb =_c .Copy (_aed ,_cf );return _eb ;};
// MarshalXML creates a file inside of a zip and marshals an object as xml, prefixing it
// with a standard XML header.
func MarshalXML (z *_d .Writer ,filename string ,v interface{})error {_aag :=&_d .FileHeader {};_aag .Method =_d .Deflate ;_aag .Name =filename ;_aag .SetModTime (_da .Now ());_acfd ,_bcd :=z .CreateHeader (_aag );if _bcd !=nil {return _e .Errorf ("\u0063\u0072\u0065\u0061ti\u006e\u0067\u0020\u0025\u0073\u0020\u0069\u006e\u0020\u007a\u0069\u0070\u003a\u0020%\u0073",filename ,_bcd );};_ ,_bcd =_acfd .Write ([]byte (XMLHeader ));if _bcd !=nil {return _e .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 ,_bcd );};if _bcd =_gg .NewEncoder (SelfClosingWriter {_acfd }).Encode (v );_bcd !=nil {return _e .Errorf ("\u006d\u0061\u0072\u0073\u0068\u0061\u006c\u0069\u006e\u0067\u0020\u0025s\u003a\u0020\u0025\u0073",filename ,_bcd );};_ ,_bcd =_acfd .Write (_dcba );return _bcd ;};
type DecodeMap struct{_bb map[string ]Target ;_eb map[*_fd .Relationships ]string ;_a []Target ;_ed OnNewRelationshipFunc ;_edd map[string ]struct{};_eed map[string ]int ;};
// OnNewRelationshipFunc is called when a new relationship has been discovered.
//
@ -56,15 +37,34 @@ func MarshalXML (z *_d .Writer ,filename string ,v interface{})error {_aag :=&_d
// 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 (_fd *DecodeMap ,_fa ,_fb string ,_aa []*_d .File ,_ca *_cb .Relationship ,_cbb Target )error ;
type OnNewRelationshipFunc func (_ge *DecodeMap ,_ee ,_gd string ,_cb []*_g .File ,_da *_fd .Relationship ,_fe Target )error ;func (_deg SelfClosingWriter )Write (b []byte )(int ,error ){_aff :=0;_feg :=0;for _gdf :=0;_gdf < len (b )-2;_gdf ++{if b [_gdf ]=='>'&&b [_gdf +1]=='<'&&b [_gdf +2]=='/'{_bae :=[]byte {};_fg :=_gdf ;for _bd :=_gdf ;_bd >=0;_bd --{if b [_bd ]==' '{_fg =_bd ;}else if b [_bd ]=='<'{_bae =b [_bd +1:_fg ];break ;};};_ef :=[]byte {};for _gg :=_gdf +3;_gg < len (b );_gg ++{if b [_gg ]=='>'{_ef =b [_gdf +3:_gg ];break ;};};if !_db .Equal (_bae ,_ef ){continue ;};_bfa ,_bga :=_deg .W .Write (b [_aff :_gdf ]);if _bga !=nil {return _feg +_bfa ,_bga ;};_feg +=_bfa ;_ ,_bga =_deg .W .Write (_bgb );if _bga !=nil {return _feg ,_bga ;};_feg +=3;for _bfad :=_gdf +2;_bfad < len (b )&&b [_bfad ]!='>';_bfad ++{_feg ++;_aff =_bfad +2;_gdf =_aff ;};};};_egdf ,_ca :=_deg .W .Write (b [_aff :]);return _egdf +_feg ,_ca ;};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";
// SetOnNewRelationshipFunc sets the function to be called when a new
// relationship has been discovered.
func (_cc *DecodeMap )SetOnNewRelationshipFunc (fn OnNewRelationshipFunc ){_cc ._dc =fn };func (_ffe *DecodeMap )IndexFor (path string )int {return _ffe ._fg [path ]};func MarshalXMLByType (z *_d .Writer ,dt _bg .DocType ,typ string ,v interface{})error {_gacf :=_bg .AbsoluteFilename (dt ,typ ,0);return MarshalXML (z ,_gacf ,v );};var _gfe =[]byte {'/','>'};
// AddFileFromDisk reads a file from internal storage and adds it at a given path to a zip file.
// TODO: Rename to AddFileFromStorage in next major version release (v2).
// NOTE: If disk storage cannot be used, memory storage can be used instead by calling memstore.SetAsStorage().
func AddFileFromDisk (z *_g .Writer ,zipPath ,storagePath string )error {_fcb ,_egc :=z .Create (zipPath );if _egc !=nil {return _gc .Errorf ("e\u0072\u0072\u006f\u0072 c\u0072e\u0061\u0074\u0069\u006e\u0067 \u0025\u0073\u003a\u0020\u0025\u0073",zipPath ,_egc );};_dbb ,_egc :=_e .Open (storagePath );if _egc !=nil {return _gc .Errorf ("e\u0072r\u006f\u0072\u0020\u006f\u0070\u0065\u006e\u0069n\u0067\u0020\u0025\u0073: \u0025\u0073",storagePath ,_egc );};defer _dbb .Close ();_ ,_egc =_ce .Copy (_fcb ,_dbb );return _egc ;};func MarshalXMLByType (z *_g .Writer ,dt _be .DocType ,typ string ,v interface{})error {_ebd :=_be .AbsoluteFilename (dt ,typ ,0);return MarshalXML (z ,_ebd ,v );};
// AddFileFromBytes takes a byte array and adds it at a given path to a zip file.
func AddFileFromBytes (z *_g .Writer ,zipPath string ,data []byte )error {_eaf ,_fce :=z .Create (zipPath );if _fce !=nil {return _gc .Errorf ("e\u0072\u0072\u006f\u0072 c\u0072e\u0061\u0074\u0069\u006e\u0067 \u0025\u0073\u003a\u0020\u0025\u0073",zipPath ,_fce );};_ ,_fce =_ce .Copy (_eaf ,_db .NewReader (data ));return _fce ;};func (_ff *DecodeMap )RecordIndex (path string ,idx int ){_ff ._eed [path ]=idx };var _bgb =[]byte {'/','>'};
// ExtractToDiskTmp extracts a zip file to a temporary file in a given path,
// returning the name of the file.
func ExtractToDiskTmp (f *_d .File ,path string )(string ,error ){_af ,_fab :=_cg .TempFile (path ,"\u007a\u007a");if _fab !=nil {return "",_fab ;};defer _af .Close ();_ad ,_fab :=f .Open ();if _fab !=nil {return "",_fab ;};defer _ad .Close ();_ ,_fab =_c .Copy (_af ,_ad );if _fab !=nil {return "",_fab ;};return _af .Name (),nil ;};func (_cbfc SelfClosingWriter )Write (b []byte )(int ,error ){_dg :=0;_fef :=0;for _ag :=0;_ag < len (b )-2;_ag ++{if b [_ag ]=='>'&&b [_ag +1]=='<'&&b [_ag +2]=='/'{_aee :=[]byte {};_afe :=_ag ;for _cec :=_ag ;_cec >=0;_cec --{if b [_cec ]==' '{_afe =_cec ;}else if b [_cec ]=='<'{_aee =b [_cec +1:_afe ];break ;};};_addf :=[]byte {};for _fda :=_ag +3;_fda < len (b );_fda ++{if b [_fda ]=='>'{_addf =b [_ag +3:_fda ];break ;};};if !_f .Equal (_aee ,_addf ){continue ;};_afa ,_dda :=_cbfc .W .Write (b [_dg :_ag ]);if _dda !=nil {return _fef +_afa ,_dda ;};_fef +=_afa ;_ ,_dda =_cbfc .W .Write (_gfe );if _dda !=nil {return _fef ,_dda ;};_fef +=3;for _db :=_ag +2;_db < len (b )&&b [_db ]!='>';_db ++{_fef ++;_dg =_db +2;_ag =_dg ;};};};_gdad ,_beg :=_cbfc .W .Write (b [_dg :]);return _gdad +_fef ,_beg ;};
func ExtractToDiskTmp (f *_g .File ,path string )(string ,error ){_egd ,_gfe :=_e .TempFile (path ,"\u007a\u007a");if _gfe !=nil {return "",_gfe ;};defer _egd .Close ();_cec ,_gfe :=f .Open ();if _gfe !=nil {return "",_gfe ;};defer _cec .Close ();_ ,_gfe =_ce .Copy (_egd ,_cec );if _gfe !=nil {return "",_gfe ;};return _egd .Name (),nil ;};func MarshalXMLByTypeIndex (z *_g .Writer ,dt _be .DocType ,typ string ,idx int ,v interface{})error {_faa :=_be .AbsoluteFilename (dt ,typ ,idx );return MarshalXML (z ,_faa ,v );};
// AddFileFromBytes takes a byte array and adds it at a given path to a zip file.
func AddFileFromBytes (z *_d .Writer ,zipPath string ,data []byte )error {_fe ,_fgd :=z .Create (zipPath );if _fgd !=nil {return _e .Errorf ("e\u0072\u0072\u006f\u0072 c\u0072e\u0061\u0074\u0069\u006e\u0067 \u0025\u0073\u003a\u0020\u0025\u0073",zipPath ,_fgd );};_ ,_fgd =_c .Copy (_fe ,_f .NewReader (data ));return _fgd ;};
// RelationsPathFor returns the relations path for a given filename.
func RelationsPathFor (path string )string {_cd :=_c .Split (path ,"\u002f");_gdg :=_c .Join (_cd [0:len (_cd )-1],"\u002f");_ffc :=_cd [len (_cd )-1];_gdg +="\u002f_\u0072\u0065\u006c\u0073\u002f";_ffc +="\u002e\u0072\u0065l\u0073";return _gdg +_ffc ;};
// MarshalXML creates a file inside of a zip and marshals an object as xml, prefixing it
// with a standard XML header.
func MarshalXML (z *_g .Writer ,filename string ,v interface{})error {_bc :=&_g .FileHeader {};_bc .Method =_g .Deflate ;_bc .Name =filename ;_bc .SetModTime (_d .Now ());_cbg ,_agd :=z .CreateHeader (_bc );if _agd !=nil {return _gc .Errorf ("\u0063\u0072\u0065\u0061ti\u006e\u0067\u0020\u0025\u0073\u0020\u0069\u006e\u0020\u007a\u0069\u0070\u003a\u0020%\u0073",filename ,_agd );};_ ,_agd =_cbg .Write ([]byte (XMLHeader ));if _agd !=nil {return _gc .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 ,_agd );};if _agd =_f .NewEncoder (SelfClosingWriter {_cbg }).Encode (v );_agd !=nil {return _gc .Errorf ("\u006d\u0061\u0072\u0073\u0068\u0061\u006c\u0069\u006e\u0067\u0020\u0025s\u003a\u0020\u0025\u0073",filename ,_agd );};_ ,_agd =_cbg .Write (_agg );return _agd ;};
// SetOnNewRelationshipFunc sets the function to be called when a new
// relationship has been discovered.
func (_fa *DecodeMap )SetOnNewRelationshipFunc (fn OnNewRelationshipFunc ){_fa ._ed =fn };type Target struct{Path string ;Typ string ;Ifc interface{};Index uint32 ;};
// Decode loops decoding targets registered with AddTarget and calling th
func (_af *DecodeMap )Decode (files []*_g .File )error {_bg :=1;for _bg > 0{for len (_af ._a )> 0{_bbe :=_af ._a [0];_af ._a =_af ._a [1:];_ad :=_bbe .Ifc .(*_fd .Relationships );for _ ,_de :=range _ad .Relationship {_eg ,_ :=_af ._eb [_ad ];_af ._ed (_af ,_eg +_de .TargetAttr ,_de .TypeAttr ,files ,_de ,_bbe );};};for _dac ,_gdc :=range files {if _gdc ==nil {continue ;};if _cc ,_ag :=_af ._bb [_gdc .Name ];_ag {delete (_af ._bb ,_gdc .Name );if _fdb :=Decode (_gdc ,_cc .Ifc );_fdb !=nil {return _fdb ;};files [_dac ]=nil ;if _ec ,_cg :=_cc .Ifc .(*_fd .Relationships );_cg {_af ._a =append (_af ._a ,_cc );_ede ,_ :=_df .Split (_df .Clean (_gdc .Name +"\u002f\u002e\u002e\u002f"));_af ._eb [_ec ]=_ede ;_bg ++;};};};_bg --;};return nil ;};
// SelfClosingWriter wraps a writer and replaces XML tags of the
// type <foo></foo> with <foo/>
type SelfClosingWriter struct{W _ce .Writer ;};