1 Star 0 Fork 1

青大叔 / gooxml

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
common.go 78.07 KB
一键复制 编辑 原始数据 按行查看 历史
qwj 提交于 2021-09-03 14:09 . 修改包名
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665
// Copyright 2017 Baliance. All rights reserved.
//
// DO NOT EDIT: generated by gooxml ECMA-376 generator
//
// Use of this source code is governed by the terms of the Affero GNU General
// Public License version 3.0 as published by the Free Software Foundation and
// appearing in the file LICENSE included in the packaging of this file. A
// commercial license can be purchased by contacting sales@baliance.com.
package vml
import (
"encoding/xml"
"fmt"
"gitee.com/jiewen/gooxml"
)
type ST_Ext byte
const (
ST_ExtUnset ST_Ext = 0
ST_ExtView ST_Ext = 1
ST_ExtEdit ST_Ext = 2
ST_ExtBackwardCompatible ST_Ext = 3
)
func (e ST_Ext) MarshalXMLAttr(name xml.Name) (xml.Attr, error) {
attr := xml.Attr{}
attr.Name = name
switch e {
case ST_ExtUnset:
attr.Value = ""
case ST_ExtView:
attr.Value = "view"
case ST_ExtEdit:
attr.Value = "edit"
case ST_ExtBackwardCompatible:
attr.Value = "backwardCompatible"
}
return attr, nil
}
func (e *ST_Ext) UnmarshalXMLAttr(attr xml.Attr) error {
switch attr.Value {
case "":
*e = 0
case "view":
*e = 1
case "edit":
*e = 2
case "backwardCompatible":
*e = 3
}
return nil
}
func (m ST_Ext) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
return e.EncodeElement(m.String(), start)
}
func (m *ST_Ext) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
tok, err := d.Token()
if err != nil {
return err
}
if el, ok := tok.(xml.EndElement); ok && el.Name == start.Name {
*m = 1
return nil
}
if cd, ok := tok.(xml.CharData); !ok {
return fmt.Errorf("expected char data, got %T", tok)
} else {
switch string(cd) {
case "":
*m = 0
case "view":
*m = 1
case "edit":
*m = 2
case "backwardCompatible":
*m = 3
}
}
tok, err = d.Token()
if err != nil {
return err
}
if el, ok := tok.(xml.EndElement); ok && el.Name == start.Name {
return nil
}
return fmt.Errorf("expected end element, got %v", tok)
}
func (m ST_Ext) String() string {
switch m {
case 0:
return ""
case 1:
return "view"
case 2:
return "edit"
case 3:
return "backwardCompatible"
}
return ""
}
func (m ST_Ext) Validate() error {
return m.ValidateWithPath("")
}
func (m ST_Ext) ValidateWithPath(path string) error {
switch m {
case 0, 1, 2, 3:
default:
return fmt.Errorf("%s: out of range value %d", path, int(m))
}
return nil
}
type ST_FillType byte
const (
ST_FillTypeUnset ST_FillType = 0
ST_FillTypeSolid ST_FillType = 1
ST_FillTypeGradient ST_FillType = 2
ST_FillTypeGradientRadial ST_FillType = 3
ST_FillTypeTile ST_FillType = 4
ST_FillTypePattern ST_FillType = 5
ST_FillTypeFrame ST_FillType = 6
)
func (e ST_FillType) MarshalXMLAttr(name xml.Name) (xml.Attr, error) {
attr := xml.Attr{}
attr.Name = name
switch e {
case ST_FillTypeUnset:
attr.Value = ""
case ST_FillTypeSolid:
attr.Value = "solid"
case ST_FillTypeGradient:
attr.Value = "gradient"
case ST_FillTypeGradientRadial:
attr.Value = "gradientRadial"
case ST_FillTypeTile:
attr.Value = "tile"
case ST_FillTypePattern:
attr.Value = "pattern"
case ST_FillTypeFrame:
attr.Value = "frame"
}
return attr, nil
}
func (e *ST_FillType) UnmarshalXMLAttr(attr xml.Attr) error {
switch attr.Value {
case "":
*e = 0
case "solid":
*e = 1
case "gradient":
*e = 2
case "gradientRadial":
*e = 3
case "tile":
*e = 4
case "pattern":
*e = 5
case "frame":
*e = 6
}
return nil
}
func (m ST_FillType) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
return e.EncodeElement(m.String(), start)
}
func (m *ST_FillType) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
tok, err := d.Token()
if err != nil {
return err
}
if el, ok := tok.(xml.EndElement); ok && el.Name == start.Name {
*m = 1
return nil
}
if cd, ok := tok.(xml.CharData); !ok {
return fmt.Errorf("expected char data, got %T", tok)
} else {
switch string(cd) {
case "":
*m = 0
case "solid":
*m = 1
case "gradient":
*m = 2
case "gradientRadial":
*m = 3
case "tile":
*m = 4
case "pattern":
*m = 5
case "frame":
*m = 6
}
}
tok, err = d.Token()
if err != nil {
return err
}
if el, ok := tok.(xml.EndElement); ok && el.Name == start.Name {
return nil
}
return fmt.Errorf("expected end element, got %v", tok)
}
func (m ST_FillType) String() string {
switch m {
case 0:
return ""
case 1:
return "solid"
case 2:
return "gradient"
case 3:
return "gradientRadial"
case 4:
return "tile"
case 5:
return "pattern"
case 6:
return "frame"
}
return ""
}
func (m ST_FillType) Validate() error {
return m.ValidateWithPath("")
}
func (m ST_FillType) ValidateWithPath(path string) error {
switch m {
case 0, 1, 2, 3, 4, 5, 6:
default:
return fmt.Errorf("%s: out of range value %d", path, int(m))
}
return nil
}
type ST_FillMethod byte
const (
ST_FillMethodUnset ST_FillMethod = 0
ST_FillMethodNone ST_FillMethod = 1
ST_FillMethodLinear ST_FillMethod = 2
ST_FillMethodSigma ST_FillMethod = 3
ST_FillMethodAny ST_FillMethod = 4
ST_FillMethodLinearSigma ST_FillMethod = 5
)
func (e ST_FillMethod) MarshalXMLAttr(name xml.Name) (xml.Attr, error) {
attr := xml.Attr{}
attr.Name = name
switch e {
case ST_FillMethodUnset:
attr.Value = ""
case ST_FillMethodNone:
attr.Value = "none"
case ST_FillMethodLinear:
attr.Value = "linear"
case ST_FillMethodSigma:
attr.Value = "sigma"
case ST_FillMethodAny:
attr.Value = "any"
case ST_FillMethodLinearSigma:
attr.Value = "linear sigma"
}
return attr, nil
}
func (e *ST_FillMethod) UnmarshalXMLAttr(attr xml.Attr) error {
switch attr.Value {
case "":
*e = 0
case "none":
*e = 1
case "linear":
*e = 2
case "sigma":
*e = 3
case "any":
*e = 4
case "linear sigma":
*e = 5
}
return nil
}
func (m ST_FillMethod) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
return e.EncodeElement(m.String(), start)
}
func (m *ST_FillMethod) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
tok, err := d.Token()
if err != nil {
return err
}
if el, ok := tok.(xml.EndElement); ok && el.Name == start.Name {
*m = 1
return nil
}
if cd, ok := tok.(xml.CharData); !ok {
return fmt.Errorf("expected char data, got %T", tok)
} else {
switch string(cd) {
case "":
*m = 0
case "none":
*m = 1
case "linear":
*m = 2
case "sigma":
*m = 3
case "any":
*m = 4
case "linear sigma":
*m = 5
}
}
tok, err = d.Token()
if err != nil {
return err
}
if el, ok := tok.(xml.EndElement); ok && el.Name == start.Name {
return nil
}
return fmt.Errorf("expected end element, got %v", tok)
}
func (m ST_FillMethod) String() string {
switch m {
case 0:
return ""
case 1:
return "none"
case 2:
return "linear"
case 3:
return "sigma"
case 4:
return "any"
case 5:
return "linear sigma"
}
return ""
}
func (m ST_FillMethod) Validate() error {
return m.ValidateWithPath("")
}
func (m ST_FillMethod) ValidateWithPath(path string) error {
switch m {
case 0, 1, 2, 3, 4, 5:
default:
return fmt.Errorf("%s: out of range value %d", path, int(m))
}
return nil
}
type ST_ShadowType byte
const (
ST_ShadowTypeUnset ST_ShadowType = 0
ST_ShadowTypeSingle ST_ShadowType = 1
ST_ShadowTypeDouble ST_ShadowType = 2
ST_ShadowTypeEmboss ST_ShadowType = 3
ST_ShadowTypePerspective ST_ShadowType = 4
)
func (e ST_ShadowType) MarshalXMLAttr(name xml.Name) (xml.Attr, error) {
attr := xml.Attr{}
attr.Name = name
switch e {
case ST_ShadowTypeUnset:
attr.Value = ""
case ST_ShadowTypeSingle:
attr.Value = "single"
case ST_ShadowTypeDouble:
attr.Value = "double"
case ST_ShadowTypeEmboss:
attr.Value = "emboss"
case ST_ShadowTypePerspective:
attr.Value = "perspective"
}
return attr, nil
}
func (e *ST_ShadowType) UnmarshalXMLAttr(attr xml.Attr) error {
switch attr.Value {
case "":
*e = 0
case "single":
*e = 1
case "double":
*e = 2
case "emboss":
*e = 3
case "perspective":
*e = 4
}
return nil
}
func (m ST_ShadowType) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
return e.EncodeElement(m.String(), start)
}
func (m *ST_ShadowType) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
tok, err := d.Token()
if err != nil {
return err
}
if el, ok := tok.(xml.EndElement); ok && el.Name == start.Name {
*m = 1
return nil
}
if cd, ok := tok.(xml.CharData); !ok {
return fmt.Errorf("expected char data, got %T", tok)
} else {
switch string(cd) {
case "":
*m = 0
case "single":
*m = 1
case "double":
*m = 2
case "emboss":
*m = 3
case "perspective":
*m = 4
}
}
tok, err = d.Token()
if err != nil {
return err
}
if el, ok := tok.(xml.EndElement); ok && el.Name == start.Name {
return nil
}
return fmt.Errorf("expected end element, got %v", tok)
}
func (m ST_ShadowType) String() string {
switch m {
case 0:
return ""
case 1:
return "single"
case 2:
return "double"
case 3:
return "emboss"
case 4:
return "perspective"
}
return ""
}
func (m ST_ShadowType) Validate() error {
return m.ValidateWithPath("")
}
func (m ST_ShadowType) ValidateWithPath(path string) error {
switch m {
case 0, 1, 2, 3, 4:
default:
return fmt.Errorf("%s: out of range value %d", path, int(m))
}
return nil
}
type ST_StrokeLineStyle byte
const (
ST_StrokeLineStyleUnset ST_StrokeLineStyle = 0
ST_StrokeLineStyleSingle ST_StrokeLineStyle = 1
ST_StrokeLineStyleThinThin ST_StrokeLineStyle = 2
ST_StrokeLineStyleThinThick ST_StrokeLineStyle = 3
ST_StrokeLineStyleThickThin ST_StrokeLineStyle = 4
ST_StrokeLineStyleThickBetweenThin ST_StrokeLineStyle = 5
)
func (e ST_StrokeLineStyle) MarshalXMLAttr(name xml.Name) (xml.Attr, error) {
attr := xml.Attr{}
attr.Name = name
switch e {
case ST_StrokeLineStyleUnset:
attr.Value = ""
case ST_StrokeLineStyleSingle:
attr.Value = "single"
case ST_StrokeLineStyleThinThin:
attr.Value = "thinThin"
case ST_StrokeLineStyleThinThick:
attr.Value = "thinThick"
case ST_StrokeLineStyleThickThin:
attr.Value = "thickThin"
case ST_StrokeLineStyleThickBetweenThin:
attr.Value = "thickBetweenThin"
}
return attr, nil
}
func (e *ST_StrokeLineStyle) UnmarshalXMLAttr(attr xml.Attr) error {
switch attr.Value {
case "":
*e = 0
case "single":
*e = 1
case "thinThin":
*e = 2
case "thinThick":
*e = 3
case "thickThin":
*e = 4
case "thickBetweenThin":
*e = 5
}
return nil
}
func (m ST_StrokeLineStyle) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
return e.EncodeElement(m.String(), start)
}
func (m *ST_StrokeLineStyle) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
tok, err := d.Token()
if err != nil {
return err
}
if el, ok := tok.(xml.EndElement); ok && el.Name == start.Name {
*m = 1
return nil
}
if cd, ok := tok.(xml.CharData); !ok {
return fmt.Errorf("expected char data, got %T", tok)
} else {
switch string(cd) {
case "":
*m = 0
case "single":
*m = 1
case "thinThin":
*m = 2
case "thinThick":
*m = 3
case "thickThin":
*m = 4
case "thickBetweenThin":
*m = 5
}
}
tok, err = d.Token()
if err != nil {
return err
}
if el, ok := tok.(xml.EndElement); ok && el.Name == start.Name {
return nil
}
return fmt.Errorf("expected end element, got %v", tok)
}
func (m ST_StrokeLineStyle) String() string {
switch m {
case 0:
return ""
case 1:
return "single"
case 2:
return "thinThin"
case 3:
return "thinThick"
case 4:
return "thickThin"
case 5:
return "thickBetweenThin"
}
return ""
}
func (m ST_StrokeLineStyle) Validate() error {
return m.ValidateWithPath("")
}
func (m ST_StrokeLineStyle) ValidateWithPath(path string) error {
switch m {
case 0, 1, 2, 3, 4, 5:
default:
return fmt.Errorf("%s: out of range value %d", path, int(m))
}
return nil
}
type ST_StrokeJoinStyle byte
const (
ST_StrokeJoinStyleUnset ST_StrokeJoinStyle = 0
ST_StrokeJoinStyleRound ST_StrokeJoinStyle = 1
ST_StrokeJoinStyleBevel ST_StrokeJoinStyle = 2
ST_StrokeJoinStyleMiter ST_StrokeJoinStyle = 3
)
func (e ST_StrokeJoinStyle) MarshalXMLAttr(name xml.Name) (xml.Attr, error) {
attr := xml.Attr{}
attr.Name = name
switch e {
case ST_StrokeJoinStyleUnset:
attr.Value = ""
case ST_StrokeJoinStyleRound:
attr.Value = "round"
case ST_StrokeJoinStyleBevel:
attr.Value = "bevel"
case ST_StrokeJoinStyleMiter:
attr.Value = "miter"
}
return attr, nil
}
func (e *ST_StrokeJoinStyle) UnmarshalXMLAttr(attr xml.Attr) error {
switch attr.Value {
case "":
*e = 0
case "round":
*e = 1
case "bevel":
*e = 2
case "miter":
*e = 3
}
return nil
}
func (m ST_StrokeJoinStyle) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
return e.EncodeElement(m.String(), start)
}
func (m *ST_StrokeJoinStyle) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
tok, err := d.Token()
if err != nil {
return err
}
if el, ok := tok.(xml.EndElement); ok && el.Name == start.Name {
*m = 1
return nil
}
if cd, ok := tok.(xml.CharData); !ok {
return fmt.Errorf("expected char data, got %T", tok)
} else {
switch string(cd) {
case "":
*m = 0
case "round":
*m = 1
case "bevel":
*m = 2
case "miter":
*m = 3
}
}
tok, err = d.Token()
if err != nil {
return err
}
if el, ok := tok.(xml.EndElement); ok && el.Name == start.Name {
return nil
}
return fmt.Errorf("expected end element, got %v", tok)
}
func (m ST_StrokeJoinStyle) String() string {
switch m {
case 0:
return ""
case 1:
return "round"
case 2:
return "bevel"
case 3:
return "miter"
}
return ""
}
func (m ST_StrokeJoinStyle) Validate() error {
return m.ValidateWithPath("")
}
func (m ST_StrokeJoinStyle) ValidateWithPath(path string) error {
switch m {
case 0, 1, 2, 3:
default:
return fmt.Errorf("%s: out of range value %d", path, int(m))
}
return nil
}
type ST_StrokeEndCap byte
const (
ST_StrokeEndCapUnset ST_StrokeEndCap = 0
ST_StrokeEndCapFlat ST_StrokeEndCap = 1
ST_StrokeEndCapSquare ST_StrokeEndCap = 2
ST_StrokeEndCapRound ST_StrokeEndCap = 3
)
func (e ST_StrokeEndCap) MarshalXMLAttr(name xml.Name) (xml.Attr, error) {
attr := xml.Attr{}
attr.Name = name
switch e {
case ST_StrokeEndCapUnset:
attr.Value = ""
case ST_StrokeEndCapFlat:
attr.Value = "flat"
case ST_StrokeEndCapSquare:
attr.Value = "square"
case ST_StrokeEndCapRound:
attr.Value = "round"
}
return attr, nil
}
func (e *ST_StrokeEndCap) UnmarshalXMLAttr(attr xml.Attr) error {
switch attr.Value {
case "":
*e = 0
case "flat":
*e = 1
case "square":
*e = 2
case "round":
*e = 3
}
return nil
}
func (m ST_StrokeEndCap) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
return e.EncodeElement(m.String(), start)
}
func (m *ST_StrokeEndCap) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
tok, err := d.Token()
if err != nil {
return err
}
if el, ok := tok.(xml.EndElement); ok && el.Name == start.Name {
*m = 1
return nil
}
if cd, ok := tok.(xml.CharData); !ok {
return fmt.Errorf("expected char data, got %T", tok)
} else {
switch string(cd) {
case "":
*m = 0
case "flat":
*m = 1
case "square":
*m = 2
case "round":
*m = 3
}
}
tok, err = d.Token()
if err != nil {
return err
}
if el, ok := tok.(xml.EndElement); ok && el.Name == start.Name {
return nil
}
return fmt.Errorf("expected end element, got %v", tok)
}
func (m ST_StrokeEndCap) String() string {
switch m {
case 0:
return ""
case 1:
return "flat"
case 2:
return "square"
case 3:
return "round"
}
return ""
}
func (m ST_StrokeEndCap) Validate() error {
return m.ValidateWithPath("")
}
func (m ST_StrokeEndCap) ValidateWithPath(path string) error {
switch m {
case 0, 1, 2, 3:
default:
return fmt.Errorf("%s: out of range value %d", path, int(m))
}
return nil
}
type ST_StrokeArrowLength byte
const (
ST_StrokeArrowLengthUnset ST_StrokeArrowLength = 0
ST_StrokeArrowLengthShort ST_StrokeArrowLength = 1
ST_StrokeArrowLengthMedium ST_StrokeArrowLength = 2
ST_StrokeArrowLengthLong ST_StrokeArrowLength = 3
)
func (e ST_StrokeArrowLength) MarshalXMLAttr(name xml.Name) (xml.Attr, error) {
attr := xml.Attr{}
attr.Name = name
switch e {
case ST_StrokeArrowLengthUnset:
attr.Value = ""
case ST_StrokeArrowLengthShort:
attr.Value = "short"
case ST_StrokeArrowLengthMedium:
attr.Value = "medium"
case ST_StrokeArrowLengthLong:
attr.Value = "long"
}
return attr, nil
}
func (e *ST_StrokeArrowLength) UnmarshalXMLAttr(attr xml.Attr) error {
switch attr.Value {
case "":
*e = 0
case "short":
*e = 1
case "medium":
*e = 2
case "long":
*e = 3
}
return nil
}
func (m ST_StrokeArrowLength) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
return e.EncodeElement(m.String(), start)
}
func (m *ST_StrokeArrowLength) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
tok, err := d.Token()
if err != nil {
return err
}
if el, ok := tok.(xml.EndElement); ok && el.Name == start.Name {
*m = 1
return nil
}
if cd, ok := tok.(xml.CharData); !ok {
return fmt.Errorf("expected char data, got %T", tok)
} else {
switch string(cd) {
case "":
*m = 0
case "short":
*m = 1
case "medium":
*m = 2
case "long":
*m = 3
}
}
tok, err = d.Token()
if err != nil {
return err
}
if el, ok := tok.(xml.EndElement); ok && el.Name == start.Name {
return nil
}
return fmt.Errorf("expected end element, got %v", tok)
}
func (m ST_StrokeArrowLength) String() string {
switch m {
case 0:
return ""
case 1:
return "short"
case 2:
return "medium"
case 3:
return "long"
}
return ""
}
func (m ST_StrokeArrowLength) Validate() error {
return m.ValidateWithPath("")
}
func (m ST_StrokeArrowLength) ValidateWithPath(path string) error {
switch m {
case 0, 1, 2, 3:
default:
return fmt.Errorf("%s: out of range value %d", path, int(m))
}
return nil
}
type ST_StrokeArrowWidth byte
const (
ST_StrokeArrowWidthUnset ST_StrokeArrowWidth = 0
ST_StrokeArrowWidthNarrow ST_StrokeArrowWidth = 1
ST_StrokeArrowWidthMedium ST_StrokeArrowWidth = 2
ST_StrokeArrowWidthWide ST_StrokeArrowWidth = 3
)
func (e ST_StrokeArrowWidth) MarshalXMLAttr(name xml.Name) (xml.Attr, error) {
attr := xml.Attr{}
attr.Name = name
switch e {
case ST_StrokeArrowWidthUnset:
attr.Value = ""
case ST_StrokeArrowWidthNarrow:
attr.Value = "narrow"
case ST_StrokeArrowWidthMedium:
attr.Value = "medium"
case ST_StrokeArrowWidthWide:
attr.Value = "wide"
}
return attr, nil
}
func (e *ST_StrokeArrowWidth) UnmarshalXMLAttr(attr xml.Attr) error {
switch attr.Value {
case "":
*e = 0
case "narrow":
*e = 1
case "medium":
*e = 2
case "wide":
*e = 3
}
return nil
}
func (m ST_StrokeArrowWidth) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
return e.EncodeElement(m.String(), start)
}
func (m *ST_StrokeArrowWidth) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
tok, err := d.Token()
if err != nil {
return err
}
if el, ok := tok.(xml.EndElement); ok && el.Name == start.Name {
*m = 1
return nil
}
if cd, ok := tok.(xml.CharData); !ok {
return fmt.Errorf("expected char data, got %T", tok)
} else {
switch string(cd) {
case "":
*m = 0
case "narrow":
*m = 1
case "medium":
*m = 2
case "wide":
*m = 3
}
}
tok, err = d.Token()
if err != nil {
return err
}
if el, ok := tok.(xml.EndElement); ok && el.Name == start.Name {
return nil
}
return fmt.Errorf("expected end element, got %v", tok)
}
func (m ST_StrokeArrowWidth) String() string {
switch m {
case 0:
return ""
case 1:
return "narrow"
case 2:
return "medium"
case 3:
return "wide"
}
return ""
}
func (m ST_StrokeArrowWidth) Validate() error {
return m.ValidateWithPath("")
}
func (m ST_StrokeArrowWidth) ValidateWithPath(path string) error {
switch m {
case 0, 1, 2, 3:
default:
return fmt.Errorf("%s: out of range value %d", path, int(m))
}
return nil
}
type ST_StrokeArrowType byte
const (
ST_StrokeArrowTypeUnset ST_StrokeArrowType = 0
ST_StrokeArrowTypeNone ST_StrokeArrowType = 1
ST_StrokeArrowTypeBlock ST_StrokeArrowType = 2
ST_StrokeArrowTypeClassic ST_StrokeArrowType = 3
ST_StrokeArrowTypeOval ST_StrokeArrowType = 4
ST_StrokeArrowTypeDiamond ST_StrokeArrowType = 5
ST_StrokeArrowTypeOpen ST_StrokeArrowType = 6
)
func (e ST_StrokeArrowType) MarshalXMLAttr(name xml.Name) (xml.Attr, error) {
attr := xml.Attr{}
attr.Name = name
switch e {
case ST_StrokeArrowTypeUnset:
attr.Value = ""
case ST_StrokeArrowTypeNone:
attr.Value = "none"
case ST_StrokeArrowTypeBlock:
attr.Value = "block"
case ST_StrokeArrowTypeClassic:
attr.Value = "classic"
case ST_StrokeArrowTypeOval:
attr.Value = "oval"
case ST_StrokeArrowTypeDiamond:
attr.Value = "diamond"
case ST_StrokeArrowTypeOpen:
attr.Value = "open"
}
return attr, nil
}
func (e *ST_StrokeArrowType) UnmarshalXMLAttr(attr xml.Attr) error {
switch attr.Value {
case "":
*e = 0
case "none":
*e = 1
case "block":
*e = 2
case "classic":
*e = 3
case "oval":
*e = 4
case "diamond":
*e = 5
case "open":
*e = 6
}
return nil
}
func (m ST_StrokeArrowType) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
return e.EncodeElement(m.String(), start)
}
func (m *ST_StrokeArrowType) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
tok, err := d.Token()
if err != nil {
return err
}
if el, ok := tok.(xml.EndElement); ok && el.Name == start.Name {
*m = 1
return nil
}
if cd, ok := tok.(xml.CharData); !ok {
return fmt.Errorf("expected char data, got %T", tok)
} else {
switch string(cd) {
case "":
*m = 0
case "none":
*m = 1
case "block":
*m = 2
case "classic":
*m = 3
case "oval":
*m = 4
case "diamond":
*m = 5
case "open":
*m = 6
}
}
tok, err = d.Token()
if err != nil {
return err
}
if el, ok := tok.(xml.EndElement); ok && el.Name == start.Name {
return nil
}
return fmt.Errorf("expected end element, got %v", tok)
}
func (m ST_StrokeArrowType) String() string {
switch m {
case 0:
return ""
case 1:
return "none"
case 2:
return "block"
case 3:
return "classic"
case 4:
return "oval"
case 5:
return "diamond"
case 6:
return "open"
}
return ""
}
func (m ST_StrokeArrowType) Validate() error {
return m.ValidateWithPath("")
}
func (m ST_StrokeArrowType) ValidateWithPath(path string) error {
switch m {
case 0, 1, 2, 3, 4, 5, 6:
default:
return fmt.Errorf("%s: out of range value %d", path, int(m))
}
return nil
}
type ST_ImageAspect byte
const (
ST_ImageAspectUnset ST_ImageAspect = 0
ST_ImageAspectIgnore ST_ImageAspect = 1
ST_ImageAspectAtMost ST_ImageAspect = 2
ST_ImageAspectAtLeast ST_ImageAspect = 3
)
func (e ST_ImageAspect) MarshalXMLAttr(name xml.Name) (xml.Attr, error) {
attr := xml.Attr{}
attr.Name = name
switch e {
case ST_ImageAspectUnset:
attr.Value = ""
case ST_ImageAspectIgnore:
attr.Value = "ignore"
case ST_ImageAspectAtMost:
attr.Value = "atMost"
case ST_ImageAspectAtLeast:
attr.Value = "atLeast"
}
return attr, nil
}
func (e *ST_ImageAspect) UnmarshalXMLAttr(attr xml.Attr) error {
switch attr.Value {
case "":
*e = 0
case "ignore":
*e = 1
case "atMost":
*e = 2
case "atLeast":
*e = 3
}
return nil
}
func (m ST_ImageAspect) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
return e.EncodeElement(m.String(), start)
}
func (m *ST_ImageAspect) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
tok, err := d.Token()
if err != nil {
return err
}
if el, ok := tok.(xml.EndElement); ok && el.Name == start.Name {
*m = 1
return nil
}
if cd, ok := tok.(xml.CharData); !ok {
return fmt.Errorf("expected char data, got %T", tok)
} else {
switch string(cd) {
case "":
*m = 0
case "ignore":
*m = 1
case "atMost":
*m = 2
case "atLeast":
*m = 3
}
}
tok, err = d.Token()
if err != nil {
return err
}
if el, ok := tok.(xml.EndElement); ok && el.Name == start.Name {
return nil
}
return fmt.Errorf("expected end element, got %v", tok)
}
func (m ST_ImageAspect) String() string {
switch m {
case 0:
return ""
case 1:
return "ignore"
case 2:
return "atMost"
case 3:
return "atLeast"
}
return ""
}
func (m ST_ImageAspect) Validate() error {
return m.ValidateWithPath("")
}
func (m ST_ImageAspect) ValidateWithPath(path string) error {
switch m {
case 0, 1, 2, 3:
default:
return fmt.Errorf("%s: out of range value %d", path, int(m))
}
return nil
}
type ST_EditAs byte
const (
ST_EditAsUnset ST_EditAs = 0
ST_EditAsCanvas ST_EditAs = 1
ST_EditAsOrgchart ST_EditAs = 2
ST_EditAsRadial ST_EditAs = 3
ST_EditAsCycle ST_EditAs = 4
ST_EditAsStacked ST_EditAs = 5
ST_EditAsVenn ST_EditAs = 6
ST_EditAsBullseye ST_EditAs = 7
)
func (e ST_EditAs) MarshalXMLAttr(name xml.Name) (xml.Attr, error) {
attr := xml.Attr{}
attr.Name = name
switch e {
case ST_EditAsUnset:
attr.Value = ""
case ST_EditAsCanvas:
attr.Value = "canvas"
case ST_EditAsOrgchart:
attr.Value = "orgchart"
case ST_EditAsRadial:
attr.Value = "radial"
case ST_EditAsCycle:
attr.Value = "cycle"
case ST_EditAsStacked:
attr.Value = "stacked"
case ST_EditAsVenn:
attr.Value = "venn"
case ST_EditAsBullseye:
attr.Value = "bullseye"
}
return attr, nil
}
func (e *ST_EditAs) UnmarshalXMLAttr(attr xml.Attr) error {
switch attr.Value {
case "":
*e = 0
case "canvas":
*e = 1
case "orgchart":
*e = 2
case "radial":
*e = 3
case "cycle":
*e = 4
case "stacked":
*e = 5
case "venn":
*e = 6
case "bullseye":
*e = 7
}
return nil
}
func (m ST_EditAs) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
return e.EncodeElement(m.String(), start)
}
func (m *ST_EditAs) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
tok, err := d.Token()
if err != nil {
return err
}
if el, ok := tok.(xml.EndElement); ok && el.Name == start.Name {
*m = 1
return nil
}
if cd, ok := tok.(xml.CharData); !ok {
return fmt.Errorf("expected char data, got %T", tok)
} else {
switch string(cd) {
case "":
*m = 0
case "canvas":
*m = 1
case "orgchart":
*m = 2
case "radial":
*m = 3
case "cycle":
*m = 4
case "stacked":
*m = 5
case "venn":
*m = 6
case "bullseye":
*m = 7
}
}
tok, err = d.Token()
if err != nil {
return err
}
if el, ok := tok.(xml.EndElement); ok && el.Name == start.Name {
return nil
}
return fmt.Errorf("expected end element, got %v", tok)
}
func (m ST_EditAs) String() string {
switch m {
case 0:
return ""
case 1:
return "canvas"
case 2:
return "orgchart"
case 3:
return "radial"
case 4:
return "cycle"
case 5:
return "stacked"
case 6:
return "venn"
case 7:
return "bullseye"
}
return ""
}
func (m ST_EditAs) Validate() error {
return m.ValidateWithPath("")
}
func (m ST_EditAs) ValidateWithPath(path string) error {
switch m {
case 0, 1, 2, 3, 4, 5, 6, 7:
default:
return fmt.Errorf("%s: out of range value %d", path, int(m))
}
return nil
}
// init registers constructor functions for dynamically creating elements based off the XML namespace and name
func init() {
gooxml.RegisterConstructor("urn:schemas-microsoft-com:vml", "CT_Shape", NewCT_Shape)
gooxml.RegisterConstructor("urn:schemas-microsoft-com:vml", "CT_Shapetype", NewCT_Shapetype)
gooxml.RegisterConstructor("urn:schemas-microsoft-com:vml", "CT_Group", NewCT_Group)
gooxml.RegisterConstructor("urn:schemas-microsoft-com:vml", "CT_Background", NewCT_Background)
gooxml.RegisterConstructor("urn:schemas-microsoft-com:vml", "CT_Fill", NewCT_Fill)
gooxml.RegisterConstructor("urn:schemas-microsoft-com:vml", "CT_Formulas", NewCT_Formulas)
gooxml.RegisterConstructor("urn:schemas-microsoft-com:vml", "CT_F", NewCT_F)
gooxml.RegisterConstructor("urn:schemas-microsoft-com:vml", "CT_Handles", NewCT_Handles)
gooxml.RegisterConstructor("urn:schemas-microsoft-com:vml", "CT_H", NewCT_H)
gooxml.RegisterConstructor("urn:schemas-microsoft-com:vml", "CT_ImageData", NewCT_ImageData)
gooxml.RegisterConstructor("urn:schemas-microsoft-com:vml", "CT_Path", NewCT_Path)
gooxml.RegisterConstructor("urn:schemas-microsoft-com:vml", "CT_Shadow", NewCT_Shadow)
gooxml.RegisterConstructor("urn:schemas-microsoft-com:vml", "CT_Stroke", NewCT_Stroke)
gooxml.RegisterConstructor("urn:schemas-microsoft-com:vml", "CT_Textbox", NewCT_Textbox)
gooxml.RegisterConstructor("urn:schemas-microsoft-com:vml", "CT_TextPath", NewCT_TextPath)
gooxml.RegisterConstructor("urn:schemas-microsoft-com:vml", "CT_Arc", NewCT_Arc)
gooxml.RegisterConstructor("urn:schemas-microsoft-com:vml", "CT_Curve", NewCT_Curve)
gooxml.RegisterConstructor("urn:schemas-microsoft-com:vml", "CT_Image", NewCT_Image)
gooxml.RegisterConstructor("urn:schemas-microsoft-com:vml", "CT_Line", NewCT_Line)
gooxml.RegisterConstructor("urn:schemas-microsoft-com:vml", "CT_Oval", NewCT_Oval)
gooxml.RegisterConstructor("urn:schemas-microsoft-com:vml", "CT_PolyLine", NewCT_PolyLine)
gooxml.RegisterConstructor("urn:schemas-microsoft-com:vml", "CT_Rect", NewCT_Rect)
gooxml.RegisterConstructor("urn:schemas-microsoft-com:vml", "CT_RoundRect", NewCT_RoundRect)
gooxml.RegisterConstructor("urn:schemas-microsoft-com:vml", "shape", NewShape)
gooxml.RegisterConstructor("urn:schemas-microsoft-com:vml", "shapetype", NewShapetype)
gooxml.RegisterConstructor("urn:schemas-microsoft-com:vml", "group", NewGroup)
gooxml.RegisterConstructor("urn:schemas-microsoft-com:vml", "background", NewBackground)
gooxml.RegisterConstructor("urn:schemas-microsoft-com:vml", "fill", NewFill)
gooxml.RegisterConstructor("urn:schemas-microsoft-com:vml", "formulas", NewFormulas)
gooxml.RegisterConstructor("urn:schemas-microsoft-com:vml", "handles", NewHandles)
gooxml.RegisterConstructor("urn:schemas-microsoft-com:vml", "imagedata", NewImagedata)
gooxml.RegisterConstructor("urn:schemas-microsoft-com:vml", "path", NewPath)
gooxml.RegisterConstructor("urn:schemas-microsoft-com:vml", "textbox", NewTextbox)
gooxml.RegisterConstructor("urn:schemas-microsoft-com:vml", "shadow", NewShadow)
gooxml.RegisterConstructor("urn:schemas-microsoft-com:vml", "stroke", NewStroke)
gooxml.RegisterConstructor("urn:schemas-microsoft-com:vml", "textpath", NewTextpath)
gooxml.RegisterConstructor("urn:schemas-microsoft-com:vml", "arc", NewArc)
gooxml.RegisterConstructor("urn:schemas-microsoft-com:vml", "curve", NewCurve)
gooxml.RegisterConstructor("urn:schemas-microsoft-com:vml", "image", NewImage)
gooxml.RegisterConstructor("urn:schemas-microsoft-com:vml", "line", NewLine)
gooxml.RegisterConstructor("urn:schemas-microsoft-com:vml", "oval", NewOval)
gooxml.RegisterConstructor("urn:schemas-microsoft-com:vml", "polyline", NewPolyline)
gooxml.RegisterConstructor("urn:schemas-microsoft-com:vml", "rect", NewRect)
gooxml.RegisterConstructor("urn:schemas-microsoft-com:vml", "roundrect", NewRoundrect)
gooxml.RegisterConstructor("urn:schemas-microsoft-com:vml", "EG_ShapeElements", NewEG_ShapeElements)
gooxml.RegisterConstructor("urn:schemas-microsoft-com:vml", "AG_Id", NewAG_Id)
gooxml.RegisterConstructor("urn:schemas-microsoft-com:vml", "AG_Style", NewAG_Style)
gooxml.RegisterConstructor("urn:schemas-microsoft-com:vml", "AG_Type", NewAG_Type)
gooxml.RegisterConstructor("urn:schemas-microsoft-com:vml", "AG_Adj", NewAG_Adj)
gooxml.RegisterConstructor("urn:schemas-microsoft-com:vml", "AG_Path", NewAG_Path)
gooxml.RegisterConstructor("urn:schemas-microsoft-com:vml", "AG_Fill", NewAG_Fill)
gooxml.RegisterConstructor("urn:schemas-microsoft-com:vml", "AG_Chromakey", NewAG_Chromakey)
gooxml.RegisterConstructor("urn:schemas-microsoft-com:vml", "AG_Ext", NewAG_Ext)
gooxml.RegisterConstructor("urn:schemas-microsoft-com:vml", "AG_CoreAttributes", NewAG_CoreAttributes)
gooxml.RegisterConstructor("urn:schemas-microsoft-com:vml", "AG_ShapeAttributes", NewAG_ShapeAttributes)
gooxml.RegisterConstructor("urn:schemas-microsoft-com:vml", "AG_OfficeCoreAttributes", NewAG_OfficeCoreAttributes)
gooxml.RegisterConstructor("urn:schemas-microsoft-com:vml", "AG_OfficeShapeAttributes", NewAG_OfficeShapeAttributes)
gooxml.RegisterConstructor("urn:schemas-microsoft-com:vml", "AG_AllCoreAttributes", NewAG_AllCoreAttributes)
gooxml.RegisterConstructor("urn:schemas-microsoft-com:vml", "AG_AllShapeAttributes", NewAG_AllShapeAttributes)
gooxml.RegisterConstructor("urn:schemas-microsoft-com:vml", "AG_ImageAttributes", NewAG_ImageAttributes)
gooxml.RegisterConstructor("urn:schemas-microsoft-com:vml", "AG_StrokeAttributes", NewAG_StrokeAttributes)
}
type OfcST_RType byte
const (
OfcST_RTypeUnset OfcST_RType = 0
OfcST_RTypeArc OfcST_RType = 1
OfcST_RTypeCallout OfcST_RType = 2
OfcST_RTypeConnector OfcST_RType = 3
OfcST_RTypeAlign OfcST_RType = 4
)
func (e OfcST_RType) MarshalXMLAttr(name xml.Name) (xml.Attr, error) {
attr := xml.Attr{}
attr.Name = name
switch e {
case OfcST_RTypeUnset:
attr.Value = ""
case OfcST_RTypeArc:
attr.Value = "arc"
case OfcST_RTypeCallout:
attr.Value = "callout"
case OfcST_RTypeConnector:
attr.Value = "connector"
case OfcST_RTypeAlign:
attr.Value = "align"
}
return attr, nil
}
func (e *OfcST_RType) UnmarshalXMLAttr(attr xml.Attr) error {
switch attr.Value {
case "":
*e = 0
case "arc":
*e = 1
case "callout":
*e = 2
case "connector":
*e = 3
case "align":
*e = 4
}
return nil
}
func (m OfcST_RType) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
return e.EncodeElement(m.String(), start)
}
func (m *OfcST_RType) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
tok, err := d.Token()
if err != nil {
return err
}
if el, ok := tok.(xml.EndElement); ok && el.Name == start.Name {
*m = 1
return nil
}
if cd, ok := tok.(xml.CharData); !ok {
return fmt.Errorf("expected char data, got %T", tok)
} else {
switch string(cd) {
case "":
*m = 0
case "arc":
*m = 1
case "callout":
*m = 2
case "connector":
*m = 3
case "align":
*m = 4
}
}
tok, err = d.Token()
if err != nil {
return err
}
if el, ok := tok.(xml.EndElement); ok && el.Name == start.Name {
return nil
}
return fmt.Errorf("expected end element, got %v", tok)
}
func (m OfcST_RType) String() string {
switch m {
case 0:
return ""
case 1:
return "arc"
case 2:
return "callout"
case 3:
return "connector"
case 4:
return "align"
}
return ""
}
func (m OfcST_RType) Validate() error {
return m.ValidateWithPath("")
}
func (m OfcST_RType) ValidateWithPath(path string) error {
switch m {
case 0, 1, 2, 3, 4:
default:
return fmt.Errorf("%s: out of range value %d", path, int(m))
}
return nil
}
type OfcST_How byte
const (
OfcST_HowUnset OfcST_How = 0
OfcST_HowTop OfcST_How = 1
OfcST_HowMiddle OfcST_How = 2
OfcST_HowBottom OfcST_How = 3
OfcST_HowLeft OfcST_How = 4
OfcST_HowCenter OfcST_How = 5
OfcST_HowRight OfcST_How = 6
)
func (e OfcST_How) MarshalXMLAttr(name xml.Name) (xml.Attr, error) {
attr := xml.Attr{}
attr.Name = name
switch e {
case OfcST_HowUnset:
attr.Value = ""
case OfcST_HowTop:
attr.Value = "top"
case OfcST_HowMiddle:
attr.Value = "middle"
case OfcST_HowBottom:
attr.Value = "bottom"
case OfcST_HowLeft:
attr.Value = "left"
case OfcST_HowCenter:
attr.Value = "center"
case OfcST_HowRight:
attr.Value = "right"
}
return attr, nil
}
func (e *OfcST_How) UnmarshalXMLAttr(attr xml.Attr) error {
switch attr.Value {
case "":
*e = 0
case "top":
*e = 1
case "middle":
*e = 2
case "bottom":
*e = 3
case "left":
*e = 4
case "center":
*e = 5
case "right":
*e = 6
}
return nil
}
func (m OfcST_How) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
return e.EncodeElement(m.String(), start)
}
func (m *OfcST_How) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
tok, err := d.Token()
if err != nil {
return err
}
if el, ok := tok.(xml.EndElement); ok && el.Name == start.Name {
*m = 1
return nil
}
if cd, ok := tok.(xml.CharData); !ok {
return fmt.Errorf("expected char data, got %T", tok)
} else {
switch string(cd) {
case "":
*m = 0
case "top":
*m = 1
case "middle":
*m = 2
case "bottom":
*m = 3
case "left":
*m = 4
case "center":
*m = 5
case "right":
*m = 6
}
}
tok, err = d.Token()
if err != nil {
return err
}
if el, ok := tok.(xml.EndElement); ok && el.Name == start.Name {
return nil
}
return fmt.Errorf("expected end element, got %v", tok)
}
func (m OfcST_How) String() string {
switch m {
case 0:
return ""
case 1:
return "top"
case 2:
return "middle"
case 3:
return "bottom"
case 4:
return "left"
case 5:
return "center"
case 6:
return "right"
}
return ""
}
func (m OfcST_How) Validate() error {
return m.ValidateWithPath("")
}
func (m OfcST_How) ValidateWithPath(path string) error {
switch m {
case 0, 1, 2, 3, 4, 5, 6:
default:
return fmt.Errorf("%s: out of range value %d", path, int(m))
}
return nil
}
type OfcST_BWMode byte
const (
OfcST_BWModeUnset OfcST_BWMode = 0
OfcST_BWModeColor OfcST_BWMode = 1
OfcST_BWModeAuto OfcST_BWMode = 2
OfcST_BWModeGrayScale OfcST_BWMode = 3
OfcST_BWModeLightGrayscale OfcST_BWMode = 4
OfcST_BWModeInverseGray OfcST_BWMode = 5
OfcST_BWModeGrayOutline OfcST_BWMode = 6
OfcST_BWModeHighContrast OfcST_BWMode = 7
OfcST_BWModeBlack OfcST_BWMode = 8
OfcST_BWModeWhite OfcST_BWMode = 9
OfcST_BWModeHide OfcST_BWMode = 10
OfcST_BWModeUndrawn OfcST_BWMode = 11
OfcST_BWModeBlackTextAndLines OfcST_BWMode = 12
)
func (e OfcST_BWMode) MarshalXMLAttr(name xml.Name) (xml.Attr, error) {
attr := xml.Attr{}
attr.Name = name
switch e {
case OfcST_BWModeUnset:
attr.Value = ""
case OfcST_BWModeColor:
attr.Value = "color"
case OfcST_BWModeAuto:
attr.Value = "auto"
case OfcST_BWModeGrayScale:
attr.Value = "grayScale"
case OfcST_BWModeLightGrayscale:
attr.Value = "lightGrayscale"
case OfcST_BWModeInverseGray:
attr.Value = "inverseGray"
case OfcST_BWModeGrayOutline:
attr.Value = "grayOutline"
case OfcST_BWModeHighContrast:
attr.Value = "highContrast"
case OfcST_BWModeBlack:
attr.Value = "black"
case OfcST_BWModeWhite:
attr.Value = "white"
case OfcST_BWModeHide:
attr.Value = "hide"
case OfcST_BWModeUndrawn:
attr.Value = "undrawn"
case OfcST_BWModeBlackTextAndLines:
attr.Value = "blackTextAndLines"
}
return attr, nil
}
func (e *OfcST_BWMode) UnmarshalXMLAttr(attr xml.Attr) error {
switch attr.Value {
case "":
*e = 0
case "color":
*e = 1
case "auto":
*e = 2
case "grayScale":
*e = 3
case "lightGrayscale":
*e = 4
case "inverseGray":
*e = 5
case "grayOutline":
*e = 6
case "highContrast":
*e = 7
case "black":
*e = 8
case "white":
*e = 9
case "hide":
*e = 10
case "undrawn":
*e = 11
case "blackTextAndLines":
*e = 12
}
return nil
}
func (m OfcST_BWMode) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
return e.EncodeElement(m.String(), start)
}
func (m *OfcST_BWMode) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
tok, err := d.Token()
if err != nil {
return err
}
if el, ok := tok.(xml.EndElement); ok && el.Name == start.Name {
*m = 1
return nil
}
if cd, ok := tok.(xml.CharData); !ok {
return fmt.Errorf("expected char data, got %T", tok)
} else {
switch string(cd) {
case "":
*m = 0
case "color":
*m = 1
case "auto":
*m = 2
case "grayScale":
*m = 3
case "lightGrayscale":
*m = 4
case "inverseGray":
*m = 5
case "grayOutline":
*m = 6
case "highContrast":
*m = 7
case "black":
*m = 8
case "white":
*m = 9
case "hide":
*m = 10
case "undrawn":
*m = 11
case "blackTextAndLines":
*m = 12
}
}
tok, err = d.Token()
if err != nil {
return err
}
if el, ok := tok.(xml.EndElement); ok && el.Name == start.Name {
return nil
}
return fmt.Errorf("expected end element, got %v", tok)
}
func (m OfcST_BWMode) String() string {
switch m {
case 0:
return ""
case 1:
return "color"
case 2:
return "auto"
case 3:
return "grayScale"
case 4:
return "lightGrayscale"
case 5:
return "inverseGray"
case 6:
return "grayOutline"
case 7:
return "highContrast"
case 8:
return "black"
case 9:
return "white"
case 10:
return "hide"
case 11:
return "undrawn"
case 12:
return "blackTextAndLines"
}
return ""
}
func (m OfcST_BWMode) Validate() error {
return m.ValidateWithPath("")
}
func (m OfcST_BWMode) ValidateWithPath(path string) error {
switch m {
case 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12:
default:
return fmt.Errorf("%s: out of range value %d", path, int(m))
}
return nil
}
type OfcST_ScreenSize byte
const (
OfcST_ScreenSizeUnset OfcST_ScreenSize = 0
OfcST_ScreenSize544x376 OfcST_ScreenSize = 1
OfcST_ScreenSize640x480 OfcST_ScreenSize = 2
OfcST_ScreenSize720x512 OfcST_ScreenSize = 3
OfcST_ScreenSize800x600 OfcST_ScreenSize = 4
OfcST_ScreenSize1024x768 OfcST_ScreenSize = 5
OfcST_ScreenSize1152x862 OfcST_ScreenSize = 6
)
func (e OfcST_ScreenSize) MarshalXMLAttr(name xml.Name) (xml.Attr, error) {
attr := xml.Attr{}
attr.Name = name
switch e {
case OfcST_ScreenSizeUnset:
attr.Value = ""
case OfcST_ScreenSize544x376:
attr.Value = "544,376"
case OfcST_ScreenSize640x480:
attr.Value = "640,480"
case OfcST_ScreenSize720x512:
attr.Value = "720,512"
case OfcST_ScreenSize800x600:
attr.Value = "800,600"
case OfcST_ScreenSize1024x768:
attr.Value = "1024,768"
case OfcST_ScreenSize1152x862:
attr.Value = "1152,862"
}
return attr, nil
}
func (e *OfcST_ScreenSize) UnmarshalXMLAttr(attr xml.Attr) error {
switch attr.Value {
case "":
*e = 0
case "544,376":
*e = 1
case "640,480":
*e = 2
case "720,512":
*e = 3
case "800,600":
*e = 4
case "1024,768":
*e = 5
case "1152,862":
*e = 6
}
return nil
}
func (m OfcST_ScreenSize) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
return e.EncodeElement(m.String(), start)
}
func (m *OfcST_ScreenSize) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
tok, err := d.Token()
if err != nil {
return err
}
if el, ok := tok.(xml.EndElement); ok && el.Name == start.Name {
*m = 1
return nil
}
if cd, ok := tok.(xml.CharData); !ok {
return fmt.Errorf("expected char data, got %T", tok)
} else {
switch string(cd) {
case "":
*m = 0
case "544,376":
*m = 1
case "640,480":
*m = 2
case "720,512":
*m = 3
case "800,600":
*m = 4
case "1024,768":
*m = 5
case "1152,862":
*m = 6
}
}
tok, err = d.Token()
if err != nil {
return err
}
if el, ok := tok.(xml.EndElement); ok && el.Name == start.Name {
return nil
}
return fmt.Errorf("expected end element, got %v", tok)
}
func (m OfcST_ScreenSize) String() string {
switch m {
case 0:
return ""
case 1:
return "544,376"
case 2:
return "640,480"
case 3:
return "720,512"
case 4:
return "800,600"
case 5:
return "1024,768"
case 6:
return "1152,862"
}
return ""
}
func (m OfcST_ScreenSize) Validate() error {
return m.ValidateWithPath("")
}
func (m OfcST_ScreenSize) ValidateWithPath(path string) error {
switch m {
case 0, 1, 2, 3, 4, 5, 6:
default:
return fmt.Errorf("%s: out of range value %d", path, int(m))
}
return nil
}
type OfcST_InsetMode byte
const (
OfcST_InsetModeUnset OfcST_InsetMode = 0
OfcST_InsetModeAuto OfcST_InsetMode = 1
OfcST_InsetModeCustom OfcST_InsetMode = 2
)
func (e OfcST_InsetMode) MarshalXMLAttr(name xml.Name) (xml.Attr, error) {
attr := xml.Attr{}
attr.Name = name
switch e {
case OfcST_InsetModeUnset:
attr.Value = ""
case OfcST_InsetModeAuto:
attr.Value = "auto"
case OfcST_InsetModeCustom:
attr.Value = "custom"
}
return attr, nil
}
func (e *OfcST_InsetMode) UnmarshalXMLAttr(attr xml.Attr) error {
switch attr.Value {
case "":
*e = 0
case "auto":
*e = 1
case "custom":
*e = 2
}
return nil
}
func (m OfcST_InsetMode) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
return e.EncodeElement(m.String(), start)
}
func (m *OfcST_InsetMode) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
tok, err := d.Token()
if err != nil {
return err
}
if el, ok := tok.(xml.EndElement); ok && el.Name == start.Name {
*m = 1
return nil
}
if cd, ok := tok.(xml.CharData); !ok {
return fmt.Errorf("expected char data, got %T", tok)
} else {
switch string(cd) {
case "":
*m = 0
case "auto":
*m = 1
case "custom":
*m = 2
}
}
tok, err = d.Token()
if err != nil {
return err
}
if el, ok := tok.(xml.EndElement); ok && el.Name == start.Name {
return nil
}
return fmt.Errorf("expected end element, got %v", tok)
}
func (m OfcST_InsetMode) String() string {
switch m {
case 0:
return ""
case 1:
return "auto"
case 2:
return "custom"
}
return ""
}
func (m OfcST_InsetMode) Validate() error {
return m.ValidateWithPath("")
}
func (m OfcST_InsetMode) ValidateWithPath(path string) error {
switch m {
case 0, 1, 2:
default:
return fmt.Errorf("%s: out of range value %d", path, int(m))
}
return nil
}
type OfcST_ColorMode byte
const (
OfcST_ColorModeUnset OfcST_ColorMode = 0
OfcST_ColorModeAuto OfcST_ColorMode = 1
OfcST_ColorModeCustom OfcST_ColorMode = 2
)
func (e OfcST_ColorMode) MarshalXMLAttr(name xml.Name) (xml.Attr, error) {
attr := xml.Attr{}
attr.Name = name
switch e {
case OfcST_ColorModeUnset:
attr.Value = ""
case OfcST_ColorModeAuto:
attr.Value = "auto"
case OfcST_ColorModeCustom:
attr.Value = "custom"
}
return attr, nil
}
func (e *OfcST_ColorMode) UnmarshalXMLAttr(attr xml.Attr) error {
switch attr.Value {
case "":
*e = 0
case "auto":
*e = 1
case "custom":
*e = 2
}
return nil
}
func (m OfcST_ColorMode) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
return e.EncodeElement(m.String(), start)
}
func (m *OfcST_ColorMode) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
tok, err := d.Token()
if err != nil {
return err
}
if el, ok := tok.(xml.EndElement); ok && el.Name == start.Name {
*m = 1
return nil
}
if cd, ok := tok.(xml.CharData); !ok {
return fmt.Errorf("expected char data, got %T", tok)
} else {
switch string(cd) {
case "":
*m = 0
case "auto":
*m = 1
case "custom":
*m = 2
}
}
tok, err = d.Token()
if err != nil {
return err
}
if el, ok := tok.(xml.EndElement); ok && el.Name == start.Name {
return nil
}
return fmt.Errorf("expected end element, got %v", tok)
}
func (m OfcST_ColorMode) String() string {
switch m {
case 0:
return ""
case 1:
return "auto"
case 2:
return "custom"
}
return ""
}
func (m OfcST_ColorMode) Validate() error {
return m.ValidateWithPath("")
}
func (m OfcST_ColorMode) ValidateWithPath(path string) error {
switch m {
case 0, 1, 2:
default:
return fmt.Errorf("%s: out of range value %d", path, int(m))
}
return nil
}
type OfcST_DiagramLayout byte
const (
OfcST_DiagramLayoutUnset OfcST_DiagramLayout = 0
OfcST_DiagramLayout0 OfcST_DiagramLayout = 1
OfcST_DiagramLayout1 OfcST_DiagramLayout = 2
OfcST_DiagramLayout2 OfcST_DiagramLayout = 3
OfcST_DiagramLayout3 OfcST_DiagramLayout = 4
)
func (e OfcST_DiagramLayout) MarshalXMLAttr(name xml.Name) (xml.Attr, error) {
attr := xml.Attr{}
attr.Name = name
switch e {
case OfcST_DiagramLayoutUnset:
attr.Value = ""
case OfcST_DiagramLayout0:
attr.Value = "0"
case OfcST_DiagramLayout1:
attr.Value = "1"
case OfcST_DiagramLayout2:
attr.Value = "2"
case OfcST_DiagramLayout3:
attr.Value = "3"
}
return attr, nil
}
func (e *OfcST_DiagramLayout) UnmarshalXMLAttr(attr xml.Attr) error {
switch attr.Value {
case "":
*e = 0
case "0":
*e = 1
case "1":
*e = 2
case "2":
*e = 3
case "3":
*e = 4
}
return nil
}
func (m OfcST_DiagramLayout) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
return e.EncodeElement(m.String(), start)
}
func (m *OfcST_DiagramLayout) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
tok, err := d.Token()
if err != nil {
return err
}
if el, ok := tok.(xml.EndElement); ok && el.Name == start.Name {
*m = 1
return nil
}
if cd, ok := tok.(xml.CharData); !ok {
return fmt.Errorf("expected char data, got %T", tok)
} else {
switch string(cd) {
case "":
*m = 0
case "0":
*m = 1
case "1":
*m = 2
case "2":
*m = 3
case "3":
*m = 4
}
}
tok, err = d.Token()
if err != nil {
return err
}
if el, ok := tok.(xml.EndElement); ok && el.Name == start.Name {
return nil
}
return fmt.Errorf("expected end element, got %v", tok)
}
func (m OfcST_DiagramLayout) String() string {
switch m {
case 0:
return ""
case 1:
return "0"
case 2:
return "1"
case 3:
return "2"
case 4:
return "3"
}
return ""
}
func (m OfcST_DiagramLayout) Validate() error {
return m.ValidateWithPath("")
}
func (m OfcST_DiagramLayout) ValidateWithPath(path string) error {
switch m {
case 0, 1, 2, 3, 4:
default:
return fmt.Errorf("%s: out of range value %d", path, int(m))
}
return nil
}
type OfcST_ExtrusionType byte
const (
OfcST_ExtrusionTypeUnset OfcST_ExtrusionType = 0
OfcST_ExtrusionTypePerspective OfcST_ExtrusionType = 1
OfcST_ExtrusionTypeParallel OfcST_ExtrusionType = 2
)
func (e OfcST_ExtrusionType) MarshalXMLAttr(name xml.Name) (xml.Attr, error) {
attr := xml.Attr{}
attr.Name = name
switch e {
case OfcST_ExtrusionTypeUnset:
attr.Value = ""
case OfcST_ExtrusionTypePerspective:
attr.Value = "perspective"
case OfcST_ExtrusionTypeParallel:
attr.Value = "parallel"
}
return attr, nil
}
func (e *OfcST_ExtrusionType) UnmarshalXMLAttr(attr xml.Attr) error {
switch attr.Value {
case "":
*e = 0
case "perspective":
*e = 1
case "parallel":
*e = 2
}
return nil
}
func (m OfcST_ExtrusionType) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
return e.EncodeElement(m.String(), start)
}
func (m *OfcST_ExtrusionType) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
tok, err := d.Token()
if err != nil {
return err
}
if el, ok := tok.(xml.EndElement); ok && el.Name == start.Name {
*m = 1
return nil
}
if cd, ok := tok.(xml.CharData); !ok {
return fmt.Errorf("expected char data, got %T", tok)
} else {
switch string(cd) {
case "":
*m = 0
case "perspective":
*m = 1
case "parallel":
*m = 2
}
}
tok, err = d.Token()
if err != nil {
return err
}
if el, ok := tok.(xml.EndElement); ok && el.Name == start.Name {
return nil
}
return fmt.Errorf("expected end element, got %v", tok)
}
func (m OfcST_ExtrusionType) String() string {
switch m {
case 0:
return ""
case 1:
return "perspective"
case 2:
return "parallel"
}
return ""
}
func (m OfcST_ExtrusionType) Validate() error {
return m.ValidateWithPath("")
}
func (m OfcST_ExtrusionType) ValidateWithPath(path string) error {
switch m {
case 0, 1, 2:
default:
return fmt.Errorf("%s: out of range value %d", path, int(m))
}
return nil
}
type OfcST_ExtrusionRender byte
const (
OfcST_ExtrusionRenderUnset OfcST_ExtrusionRender = 0
OfcST_ExtrusionRenderSolid OfcST_ExtrusionRender = 1
OfcST_ExtrusionRenderWireFrame OfcST_ExtrusionRender = 2
OfcST_ExtrusionRenderBoundingCube OfcST_ExtrusionRender = 3
)
func (e OfcST_ExtrusionRender) MarshalXMLAttr(name xml.Name) (xml.Attr, error) {
attr := xml.Attr{}
attr.Name = name
switch e {
case OfcST_ExtrusionRenderUnset:
attr.Value = ""
case OfcST_ExtrusionRenderSolid:
attr.Value = "solid"
case OfcST_ExtrusionRenderWireFrame:
attr.Value = "wireFrame"
case OfcST_ExtrusionRenderBoundingCube:
attr.Value = "boundingCube"
}
return attr, nil
}
func (e *OfcST_ExtrusionRender) UnmarshalXMLAttr(attr xml.Attr) error {
switch attr.Value {
case "":
*e = 0
case "solid":
*e = 1
case "wireFrame":
*e = 2
case "boundingCube":
*e = 3
}
return nil
}
func (m OfcST_ExtrusionRender) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
return e.EncodeElement(m.String(), start)
}
func (m *OfcST_ExtrusionRender) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
tok, err := d.Token()
if err != nil {
return err
}
if el, ok := tok.(xml.EndElement); ok && el.Name == start.Name {
*m = 1
return nil
}
if cd, ok := tok.(xml.CharData); !ok {
return fmt.Errorf("expected char data, got %T", tok)
} else {
switch string(cd) {
case "":
*m = 0
case "solid":
*m = 1
case "wireFrame":
*m = 2
case "boundingCube":
*m = 3
}
}
tok, err = d.Token()
if err != nil {
return err
}
if el, ok := tok.(xml.EndElement); ok && el.Name == start.Name {
return nil
}
return fmt.Errorf("expected end element, got %v", tok)
}
func (m OfcST_ExtrusionRender) String() string {
switch m {
case 0:
return ""
case 1:
return "solid"
case 2:
return "wireFrame"
case 3:
return "boundingCube"
}
return ""
}
func (m OfcST_ExtrusionRender) Validate() error {
return m.ValidateWithPath("")
}
func (m OfcST_ExtrusionRender) ValidateWithPath(path string) error {
switch m {
case 0, 1, 2, 3:
default:
return fmt.Errorf("%s: out of range value %d", path, int(m))
}
return nil
}
type OfcST_ExtrusionPlane byte
const (
OfcST_ExtrusionPlaneUnset OfcST_ExtrusionPlane = 0
OfcST_ExtrusionPlaneXY OfcST_ExtrusionPlane = 1
OfcST_ExtrusionPlaneZX OfcST_ExtrusionPlane = 2
OfcST_ExtrusionPlaneYZ OfcST_ExtrusionPlane = 3
)
func (e OfcST_ExtrusionPlane) MarshalXMLAttr(name xml.Name) (xml.Attr, error) {
attr := xml.Attr{}
attr.Name = name
switch e {
case OfcST_ExtrusionPlaneUnset:
attr.Value = ""
case OfcST_ExtrusionPlaneXY:
attr.Value = "XY"
case OfcST_ExtrusionPlaneZX:
attr.Value = "ZX"
case OfcST_ExtrusionPlaneYZ:
attr.Value = "YZ"
}
return attr, nil
}
func (e *OfcST_ExtrusionPlane) UnmarshalXMLAttr(attr xml.Attr) error {
switch attr.Value {
case "":
*e = 0
case "XY":
*e = 1
case "ZX":
*e = 2
case "YZ":
*e = 3
}
return nil
}
func (m OfcST_ExtrusionPlane) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
return e.EncodeElement(m.String(), start)
}
func (m *OfcST_ExtrusionPlane) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
tok, err := d.Token()
if err != nil {
return err
}
if el, ok := tok.(xml.EndElement); ok && el.Name == start.Name {
*m = 1
return nil
}
if cd, ok := tok.(xml.CharData); !ok {
return fmt.Errorf("expected char data, got %T", tok)
} else {
switch string(cd) {
case "":
*m = 0
case "XY":
*m = 1
case "ZX":
*m = 2
case "YZ":
*m = 3
}
}
tok, err = d.Token()
if err != nil {
return err
}
if el, ok := tok.(xml.EndElement); ok && el.Name == start.Name {
return nil
}
return fmt.Errorf("expected end element, got %v", tok)
}
func (m OfcST_ExtrusionPlane) String() string {
switch m {
case 0:
return ""
case 1:
return "XY"
case 2:
return "ZX"
case 3:
return "YZ"
}
return ""
}
func (m OfcST_ExtrusionPlane) Validate() error {
return m.ValidateWithPath("")
}
func (m OfcST_ExtrusionPlane) ValidateWithPath(path string) error {
switch m {
case 0, 1, 2, 3:
default:
return fmt.Errorf("%s: out of range value %d", path, int(m))
}
return nil
}
type OfcST_Angle byte
const (
OfcST_AngleUnset OfcST_Angle = 0
OfcST_AngleAny OfcST_Angle = 1
OfcST_Angle30 OfcST_Angle = 2
OfcST_Angle45 OfcST_Angle = 3
OfcST_Angle60 OfcST_Angle = 4
OfcST_Angle90 OfcST_Angle = 5
OfcST_AngleAuto OfcST_Angle = 6
)
func (e OfcST_Angle) MarshalXMLAttr(name xml.Name) (xml.Attr, error) {
attr := xml.Attr{}
attr.Name = name
switch e {
case OfcST_AngleUnset:
attr.Value = ""
case OfcST_AngleAny:
attr.Value = "any"
case OfcST_Angle30:
attr.Value = "30"
case OfcST_Angle45:
attr.Value = "45"
case OfcST_Angle60:
attr.Value = "60"
case OfcST_Angle90:
attr.Value = "90"
case OfcST_AngleAuto:
attr.Value = "auto"
}
return attr, nil
}
func (e *OfcST_Angle) UnmarshalXMLAttr(attr xml.Attr) error {
switch attr.Value {
case "":
*e = 0
case "any":
*e = 1
case "30":
*e = 2
case "45":
*e = 3
case "60":
*e = 4
case "90":
*e = 5
case "auto":
*e = 6
}
return nil
}
func (m OfcST_Angle) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
return e.EncodeElement(m.String(), start)
}
func (m *OfcST_Angle) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
tok, err := d.Token()
if err != nil {
return err
}
if el, ok := tok.(xml.EndElement); ok && el.Name == start.Name {
*m = 1
return nil
}
if cd, ok := tok.(xml.CharData); !ok {
return fmt.Errorf("expected char data, got %T", tok)
} else {
switch string(cd) {
case "":
*m = 0
case "any":
*m = 1
case "30":
*m = 2
case "45":
*m = 3
case "60":
*m = 4
case "90":
*m = 5
case "auto":
*m = 6
}
}
tok, err = d.Token()
if err != nil {
return err
}
if el, ok := tok.(xml.EndElement); ok && el.Name == start.Name {
return nil
}
return fmt.Errorf("expected end element, got %v", tok)
}
func (m OfcST_Angle) String() string {
switch m {
case 0:
return ""
case 1:
return "any"
case 2:
return "30"
case 3:
return "45"
case 4:
return "60"
case 5:
return "90"
case 6:
return "auto"
}
return ""
}
func (m OfcST_Angle) Validate() error {
return m.ValidateWithPath("")
}
func (m OfcST_Angle) ValidateWithPath(path string) error {
switch m {
case 0, 1, 2, 3, 4, 5, 6:
default:
return fmt.Errorf("%s: out of range value %d", path, int(m))
}
return nil
}
type OfcST_CalloutPlacement byte
const (
OfcST_CalloutPlacementUnset OfcST_CalloutPlacement = 0
OfcST_CalloutPlacementTop OfcST_CalloutPlacement = 1
OfcST_CalloutPlacementCenter OfcST_CalloutPlacement = 2
OfcST_CalloutPlacementBottom OfcST_CalloutPlacement = 3
OfcST_CalloutPlacementUser OfcST_CalloutPlacement = 4
)
func (e OfcST_CalloutPlacement) MarshalXMLAttr(name xml.Name) (xml.Attr, error) {
attr := xml.Attr{}
attr.Name = name
switch e {
case OfcST_CalloutPlacementUnset:
attr.Value = ""
case OfcST_CalloutPlacementTop:
attr.Value = "top"
case OfcST_CalloutPlacementCenter:
attr.Value = "center"
case OfcST_CalloutPlacementBottom:
attr.Value = "bottom"
case OfcST_CalloutPlacementUser:
attr.Value = "user"
}
return attr, nil
}
func (e *OfcST_CalloutPlacement) UnmarshalXMLAttr(attr xml.Attr) error {
switch attr.Value {
case "":
*e = 0
case "top":
*e = 1
case "center":
*e = 2
case "bottom":
*e = 3
case "user":
*e = 4
}
return nil
}
func (m OfcST_CalloutPlacement) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
return e.EncodeElement(m.String(), start)
}
func (m *OfcST_CalloutPlacement) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
tok, err := d.Token()
if err != nil {
return err
}
if el, ok := tok.(xml.EndElement); ok && el.Name == start.Name {
*m = 1
return nil
}
if cd, ok := tok.(xml.CharData); !ok {
return fmt.Errorf("expected char data, got %T", tok)
} else {
switch string(cd) {
case "":
*m = 0
case "top":
*m = 1
case "center":
*m = 2
case "bottom":
*m = 3
case "user":
*m = 4
}
}
tok, err = d.Token()
if err != nil {
return err
}
if el, ok := tok.(xml.EndElement); ok && el.Name == start.Name {
return nil
}
return fmt.Errorf("expected end element, got %v", tok)
}
func (m OfcST_CalloutPlacement) String() string {
switch m {
case 0:
return ""
case 1:
return "top"
case 2:
return "center"
case 3:
return "bottom"
case 4:
return "user"
}
return ""
}
func (m OfcST_CalloutPlacement) Validate() error {
return m.ValidateWithPath("")
}
func (m OfcST_CalloutPlacement) ValidateWithPath(path string) error {
switch m {
case 0, 1, 2, 3, 4:
default:
return fmt.Errorf("%s: out of range value %d", path, int(m))
}
return nil
}
type OfcST_ConnectorType byte
const (
OfcST_ConnectorTypeUnset OfcST_ConnectorType = 0
OfcST_ConnectorTypeNone OfcST_ConnectorType = 1
OfcST_ConnectorTypeStraight OfcST_ConnectorType = 2
OfcST_ConnectorTypeElbow OfcST_ConnectorType = 3
OfcST_ConnectorTypeCurved OfcST_ConnectorType = 4
)
func (e OfcST_ConnectorType) MarshalXMLAttr(name xml.Name) (xml.Attr, error) {
attr := xml.Attr{}
attr.Name = name
switch e {
case OfcST_ConnectorTypeUnset:
attr.Value = ""
case OfcST_ConnectorTypeNone:
attr.Value = "none"
case OfcST_ConnectorTypeStraight:
attr.Value = "straight"
case OfcST_ConnectorTypeElbow:
attr.Value = "elbow"
case OfcST_ConnectorTypeCurved:
attr.Value = "curved"
}
return attr, nil
}
func (e *OfcST_ConnectorType) UnmarshalXMLAttr(attr xml.Attr) error {
switch attr.Value {
case "":
*e = 0
case "none":
*e = 1
case "straight":
*e = 2
case "elbow":
*e = 3
case "curved":
*e = 4
}
return nil
}
func (m OfcST_ConnectorType) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
return e.EncodeElement(m.String(), start)
}
func (m *OfcST_ConnectorType) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
tok, err := d.Token()
if err != nil {
return err
}
if el, ok := tok.(xml.EndElement); ok && el.Name == start.Name {
*m = 1
return nil
}
if cd, ok := tok.(xml.CharData); !ok {
return fmt.Errorf("expected char data, got %T", tok)
} else {
switch string(cd) {
case "":
*m = 0
case "none":
*m = 1
case "straight":
*m = 2
case "elbow":
*m = 3
case "curved":
*m = 4
}
}
tok, err = d.Token()
if err != nil {
return err
}
if el, ok := tok.(xml.EndElement); ok && el.Name == start.Name {
return nil
}
return fmt.Errorf("expected end element, got %v", tok)
}
func (m OfcST_ConnectorType) String() string {
switch m {
case 0:
return ""
case 1:
return "none"
case 2:
return "straight"
case 3:
return "elbow"
case 4:
return "curved"
}
return ""
}
func (m OfcST_ConnectorType) Validate() error {
return m.ValidateWithPath("")
}
func (m OfcST_ConnectorType) ValidateWithPath(path string) error {
switch m {
case 0, 1, 2, 3, 4:
default:
return fmt.Errorf("%s: out of range value %d", path, int(m))
}
return nil
}
type OfcST_HrAlign byte
const (
OfcST_HrAlignUnset OfcST_HrAlign = 0
OfcST_HrAlignLeft OfcST_HrAlign = 1
OfcST_HrAlignRight OfcST_HrAlign = 2
OfcST_HrAlignCenter OfcST_HrAlign = 3
)
func (e OfcST_HrAlign) MarshalXMLAttr(name xml.Name) (xml.Attr, error) {
attr := xml.Attr{}
attr.Name = name
switch e {
case OfcST_HrAlignUnset:
attr.Value = ""
case OfcST_HrAlignLeft:
attr.Value = "left"
case OfcST_HrAlignRight:
attr.Value = "right"
case OfcST_HrAlignCenter:
attr.Value = "center"
}
return attr, nil
}
func (e *OfcST_HrAlign) UnmarshalXMLAttr(attr xml.Attr) error {
switch attr.Value {
case "":
*e = 0
case "left":
*e = 1
case "right":
*e = 2
case "center":
*e = 3
}
return nil
}
func (m OfcST_HrAlign) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
return e.EncodeElement(m.String(), start)
}
func (m *OfcST_HrAlign) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
tok, err := d.Token()
if err != nil {
return err
}
if el, ok := tok.(xml.EndElement); ok && el.Name == start.Name {
*m = 1
return nil
}
if cd, ok := tok.(xml.CharData); !ok {
return fmt.Errorf("expected char data, got %T", tok)
} else {
switch string(cd) {
case "":
*m = 0
case "left":
*m = 1
case "right":
*m = 2
case "center":
*m = 3
}
}
tok, err = d.Token()
if err != nil {
return err
}
if el, ok := tok.(xml.EndElement); ok && el.Name == start.Name {
return nil
}
return fmt.Errorf("expected end element, got %v", tok)
}
func (m OfcST_HrAlign) String() string {
switch m {
case 0:
return ""
case 1:
return "left"
case 2:
return "right"
case 3:
return "center"
}
return ""
}
func (m OfcST_HrAlign) Validate() error {
return m.ValidateWithPath("")
}
func (m OfcST_HrAlign) ValidateWithPath(path string) error {
switch m {
case 0, 1, 2, 3:
default:
return fmt.Errorf("%s: out of range value %d", path, int(m))
}
return nil
}
type OfcST_ConnectType byte
const (
OfcST_ConnectTypeUnset OfcST_ConnectType = 0
OfcST_ConnectTypeNone OfcST_ConnectType = 1
OfcST_ConnectTypeRect OfcST_ConnectType = 2
OfcST_ConnectTypeSegments OfcST_ConnectType = 3
OfcST_ConnectTypeCustom OfcST_ConnectType = 4
)
func (e OfcST_ConnectType) MarshalXMLAttr(name xml.Name) (xml.Attr, error) {
attr := xml.Attr{}
attr.Name = name
switch e {
case OfcST_ConnectTypeUnset:
attr.Value = ""
case OfcST_ConnectTypeNone:
attr.Value = "none"
case OfcST_ConnectTypeRect:
attr.Value = "rect"
case OfcST_ConnectTypeSegments:
attr.Value = "segments"
case OfcST_ConnectTypeCustom:
attr.Value = "custom"
}
return attr, nil
}
func (e *OfcST_ConnectType) UnmarshalXMLAttr(attr xml.Attr) error {
switch attr.Value {
case "":
*e = 0
case "none":
*e = 1
case "rect":
*e = 2
case "segments":
*e = 3
case "custom":
*e = 4
}
return nil
}
func (m OfcST_ConnectType) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
return e.EncodeElement(m.String(), start)
}
func (m *OfcST_ConnectType) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
tok, err := d.Token()
if err != nil {
return err
}
if el, ok := tok.(xml.EndElement); ok && el.Name == start.Name {
*m = 1
return nil
}
if cd, ok := tok.(xml.CharData); !ok {
return fmt.Errorf("expected char data, got %T", tok)
} else {
switch string(cd) {
case "":
*m = 0
case "none":
*m = 1
case "rect":
*m = 2
case "segments":
*m = 3
case "custom":
*m = 4
}
}
tok, err = d.Token()
if err != nil {
return err
}
if el, ok := tok.(xml.EndElement); ok && el.Name == start.Name {
return nil
}
return fmt.Errorf("expected end element, got %v", tok)
}
func (m OfcST_ConnectType) String() string {
switch m {
case 0:
return ""
case 1:
return "none"
case 2:
return "rect"
case 3:
return "segments"
case 4:
return "custom"
}
return ""
}
func (m OfcST_ConnectType) Validate() error {
return m.ValidateWithPath("")
}
func (m OfcST_ConnectType) ValidateWithPath(path string) error {
switch m {
case 0, 1, 2, 3, 4:
default:
return fmt.Errorf("%s: out of range value %d", path, int(m))
}
return nil
}
type OfcST_OLEType byte
const (
OfcST_OLETypeUnset OfcST_OLEType = 0
OfcST_OLETypeEmbed OfcST_OLEType = 1
OfcST_OLETypeLink OfcST_OLEType = 2
)
func (e OfcST_OLEType) MarshalXMLAttr(name xml.Name) (xml.Attr, error) {
attr := xml.Attr{}
attr.Name = name
switch e {
case OfcST_OLETypeUnset:
attr.Value = ""
case OfcST_OLETypeEmbed:
attr.Value = "Embed"
case OfcST_OLETypeLink:
attr.Value = "Link"
}
return attr, nil
}
func (e *OfcST_OLEType) UnmarshalXMLAttr(attr xml.Attr) error {
switch attr.Value {
case "":
*e = 0
case "Embed":
*e = 1
case "Link":
*e = 2
}
return nil
}
func (m OfcST_OLEType) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
return e.EncodeElement(m.String(), start)
}
func (m *OfcST_OLEType) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
tok, err := d.Token()
if err != nil {
return err
}
if el, ok := tok.(xml.EndElement); ok && el.Name == start.Name {
*m = 1
return nil
}
if cd, ok := tok.(xml.CharData); !ok {
return fmt.Errorf("expected char data, got %T", tok)
} else {
switch string(cd) {
case "":
*m = 0
case "Embed":
*m = 1
case "Link":
*m = 2
}
}
tok, err = d.Token()
if err != nil {
return err
}
if el, ok := tok.(xml.EndElement); ok && el.Name == start.Name {
return nil
}
return fmt.Errorf("expected end element, got %v", tok)
}
func (m OfcST_OLEType) String() string {
switch m {
case 0:
return ""
case 1:
return "Embed"
case 2:
return "Link"
}
return ""
}
func (m OfcST_OLEType) Validate() error {
return m.ValidateWithPath("")
}
func (m OfcST_OLEType) ValidateWithPath(path string) error {
switch m {
case 0, 1, 2:
default:
return fmt.Errorf("%s: out of range value %d", path, int(m))
}
return nil
}
type OfcST_OLEDrawAspect byte
const (
OfcST_OLEDrawAspectUnset OfcST_OLEDrawAspect = 0
OfcST_OLEDrawAspectContent OfcST_OLEDrawAspect = 1
OfcST_OLEDrawAspectIcon OfcST_OLEDrawAspect = 2
)
func (e OfcST_OLEDrawAspect) MarshalXMLAttr(name xml.Name) (xml.Attr, error) {
attr := xml.Attr{}
attr.Name = name
switch e {
case OfcST_OLEDrawAspectUnset:
attr.Value = ""
case OfcST_OLEDrawAspectContent:
attr.Value = "Content"
case OfcST_OLEDrawAspectIcon:
attr.Value = "Icon"
}
return attr, nil
}
func (e *OfcST_OLEDrawAspect) UnmarshalXMLAttr(attr xml.Attr) error {
switch attr.Value {
case "":
*e = 0
case "Content":
*e = 1
case "Icon":
*e = 2
}
return nil
}
func (m OfcST_OLEDrawAspect) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
return e.EncodeElement(m.String(), start)
}
func (m *OfcST_OLEDrawAspect) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
tok, err := d.Token()
if err != nil {
return err
}
if el, ok := tok.(xml.EndElement); ok && el.Name == start.Name {
*m = 1
return nil
}
if cd, ok := tok.(xml.CharData); !ok {
return fmt.Errorf("expected char data, got %T", tok)
} else {
switch string(cd) {
case "":
*m = 0
case "Content":
*m = 1
case "Icon":
*m = 2
}
}
tok, err = d.Token()
if err != nil {
return err
}
if el, ok := tok.(xml.EndElement); ok && el.Name == start.Name {
return nil
}
return fmt.Errorf("expected end element, got %v", tok)
}
func (m OfcST_OLEDrawAspect) String() string {
switch m {
case 0:
return ""
case 1:
return "Content"
case 2:
return "Icon"
}
return ""
}
func (m OfcST_OLEDrawAspect) Validate() error {
return m.ValidateWithPath("")
}
func (m OfcST_OLEDrawAspect) ValidateWithPath(path string) error {
switch m {
case 0, 1, 2:
default:
return fmt.Errorf("%s: out of range value %d", path, int(m))
}
return nil
}
type OfcST_OLEUpdateMode byte
const (
OfcST_OLEUpdateModeUnset OfcST_OLEUpdateMode = 0
OfcST_OLEUpdateModeAlways OfcST_OLEUpdateMode = 1
OfcST_OLEUpdateModeOnCall OfcST_OLEUpdateMode = 2
)
func (e OfcST_OLEUpdateMode) MarshalXMLAttr(name xml.Name) (xml.Attr, error) {
attr := xml.Attr{}
attr.Name = name
switch e {
case OfcST_OLEUpdateModeUnset:
attr.Value = ""
case OfcST_OLEUpdateModeAlways:
attr.Value = "Always"
case OfcST_OLEUpdateModeOnCall:
attr.Value = "OnCall"
}
return attr, nil
}
func (e *OfcST_OLEUpdateMode) UnmarshalXMLAttr(attr xml.Attr) error {
switch attr.Value {
case "":
*e = 0
case "Always":
*e = 1
case "OnCall":
*e = 2
}
return nil
}
func (m OfcST_OLEUpdateMode) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
return e.EncodeElement(m.String(), start)
}
func (m *OfcST_OLEUpdateMode) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
tok, err := d.Token()
if err != nil {
return err
}
if el, ok := tok.(xml.EndElement); ok && el.Name == start.Name {
*m = 1
return nil
}
if cd, ok := tok.(xml.CharData); !ok {
return fmt.Errorf("expected char data, got %T", tok)
} else {
switch string(cd) {
case "":
*m = 0
case "Always":
*m = 1
case "OnCall":
*m = 2
}
}
tok, err = d.Token()
if err != nil {
return err
}
if el, ok := tok.(xml.EndElement); ok && el.Name == start.Name {
return nil
}
return fmt.Errorf("expected end element, got %v", tok)
}
func (m OfcST_OLEUpdateMode) String() string {
switch m {
case 0:
return ""
case 1:
return "Always"
case 2:
return "OnCall"
}
return ""
}
func (m OfcST_OLEUpdateMode) Validate() error {
return m.ValidateWithPath("")
}
func (m OfcST_OLEUpdateMode) ValidateWithPath(path string) error {
switch m {
case 0, 1, 2:
default:
return fmt.Errorf("%s: out of range value %d", path, int(m))
}
return nil
}
type OfcST_FillType byte
const (
OfcST_FillTypeUnset OfcST_FillType = 0
OfcST_FillTypeGradientCenter OfcST_FillType = 1
OfcST_FillTypeSolid OfcST_FillType = 2
OfcST_FillTypePattern OfcST_FillType = 3
OfcST_FillTypeTile OfcST_FillType = 4
OfcST_FillTypeFrame OfcST_FillType = 5
OfcST_FillTypeGradientUnscaled OfcST_FillType = 6
OfcST_FillTypeGradientRadial OfcST_FillType = 7
OfcST_FillTypeGradient OfcST_FillType = 8
OfcST_FillTypeBackground OfcST_FillType = 9
)
func (e OfcST_FillType) MarshalXMLAttr(name xml.Name) (xml.Attr, error) {
attr := xml.Attr{}
attr.Name = name
switch e {
case OfcST_FillTypeUnset:
attr.Value = ""
case OfcST_FillTypeGradientCenter:
attr.Value = "gradientCenter"
case OfcST_FillTypeSolid:
attr.Value = "solid"
case OfcST_FillTypePattern:
attr.Value = "pattern"
case OfcST_FillTypeTile:
attr.Value = "tile"
case OfcST_FillTypeFrame:
attr.Value = "frame"
case OfcST_FillTypeGradientUnscaled:
attr.Value = "gradientUnscaled"
case OfcST_FillTypeGradientRadial:
attr.Value = "gradientRadial"
case OfcST_FillTypeGradient:
attr.Value = "gradient"
case OfcST_FillTypeBackground:
attr.Value = "background"
}
return attr, nil
}
func (e *OfcST_FillType) UnmarshalXMLAttr(attr xml.Attr) error {
switch attr.Value {
case "":
*e = 0
case "gradientCenter":
*e = 1
case "solid":
*e = 2
case "pattern":
*e = 3
case "tile":
*e = 4
case "frame":
*e = 5
case "gradientUnscaled":
*e = 6
case "gradientRadial":
*e = 7
case "gradient":
*e = 8
case "background":
*e = 9
}
return nil
}
func (m OfcST_FillType) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
return e.EncodeElement(m.String(), start)
}
func (m *OfcST_FillType) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
tok, err := d.Token()
if err != nil {
return err
}
if el, ok := tok.(xml.EndElement); ok && el.Name == start.Name {
*m = 1
return nil
}
if cd, ok := tok.(xml.CharData); !ok {
return fmt.Errorf("expected char data, got %T", tok)
} else {
switch string(cd) {
case "":
*m = 0
case "gradientCenter":
*m = 1
case "solid":
*m = 2
case "pattern":
*m = 3
case "tile":
*m = 4
case "frame":
*m = 5
case "gradientUnscaled":
*m = 6
case "gradientRadial":
*m = 7
case "gradient":
*m = 8
case "background":
*m = 9
}
}
tok, err = d.Token()
if err != nil {
return err
}
if el, ok := tok.(xml.EndElement); ok && el.Name == start.Name {
return nil
}
return fmt.Errorf("expected end element, got %v", tok)
}
func (m OfcST_FillType) String() string {
switch m {
case 0:
return ""
case 1:
return "gradientCenter"
case 2:
return "solid"
case 3:
return "pattern"
case 4:
return "tile"
case 5:
return "frame"
case 6:
return "gradientUnscaled"
case 7:
return "gradientRadial"
case 8:
return "gradient"
case 9:
return "background"
}
return ""
}
func (m OfcST_FillType) Validate() error {
return m.ValidateWithPath("")
}
func (m OfcST_FillType) ValidateWithPath(path string) error {
switch m {
case 0, 1, 2, 3, 4, 5, 6, 7, 8, 9:
default:
return fmt.Errorf("%s: out of range value %d", path, int(m))
}
return nil
}
// init registers constructor functions for dynamically creating elements based off the XML namespace and name
func init() {
gooxml.RegisterConstructor("urn:schemas-microsoft-com:office:office", "CT_ShapeDefaults", NewOfcCT_ShapeDefaults)
gooxml.RegisterConstructor("urn:schemas-microsoft-com:office:office", "CT_Ink", NewOfcCT_Ink)
gooxml.RegisterConstructor("urn:schemas-microsoft-com:office:office", "CT_SignatureLine", NewOfcCT_SignatureLine)
gooxml.RegisterConstructor("urn:schemas-microsoft-com:office:office", "CT_ShapeLayout", NewOfcCT_ShapeLayout)
gooxml.RegisterConstructor("urn:schemas-microsoft-com:office:office", "CT_IdMap", NewOfcCT_IdMap)
gooxml.RegisterConstructor("urn:schemas-microsoft-com:office:office", "CT_RegroupTable", NewOfcCT_RegroupTable)
gooxml.RegisterConstructor("urn:schemas-microsoft-com:office:office", "CT_Entry", NewOfcCT_Entry)
gooxml.RegisterConstructor("urn:schemas-microsoft-com:office:office", "CT_Rules", NewOfcCT_Rules)
gooxml.RegisterConstructor("urn:schemas-microsoft-com:office:office", "CT_R", NewOfcCT_R)
gooxml.RegisterConstructor("urn:schemas-microsoft-com:office:office", "CT_Proxy", NewOfcCT_Proxy)
gooxml.RegisterConstructor("urn:schemas-microsoft-com:office:office", "CT_Diagram", NewOfcCT_Diagram)
gooxml.RegisterConstructor("urn:schemas-microsoft-com:office:office", "CT_EquationXml", NewOfcCT_EquationXml)
gooxml.RegisterConstructor("urn:schemas-microsoft-com:office:office", "CT_RelationTable", NewOfcCT_RelationTable)
gooxml.RegisterConstructor("urn:schemas-microsoft-com:office:office", "CT_Relation", NewOfcCT_Relation)
gooxml.RegisterConstructor("urn:schemas-microsoft-com:office:office", "CT_ColorMru", NewOfcCT_ColorMru)
gooxml.RegisterConstructor("urn:schemas-microsoft-com:office:office", "CT_ColorMenu", NewOfcCT_ColorMenu)
gooxml.RegisterConstructor("urn:schemas-microsoft-com:office:office", "CT_Skew", NewOfcCT_Skew)
gooxml.RegisterConstructor("urn:schemas-microsoft-com:office:office", "CT_Extrusion", NewOfcCT_Extrusion)
gooxml.RegisterConstructor("urn:schemas-microsoft-com:office:office", "CT_Callout", NewOfcCT_Callout)
gooxml.RegisterConstructor("urn:schemas-microsoft-com:office:office", "CT_Lock", NewOfcCT_Lock)
gooxml.RegisterConstructor("urn:schemas-microsoft-com:office:office", "CT_OLEObject", NewOfcCT_OLEObject)
gooxml.RegisterConstructor("urn:schemas-microsoft-com:office:office", "CT_Complex", NewOfcCT_Complex)
gooxml.RegisterConstructor("urn:schemas-microsoft-com:office:office", "CT_StrokeChild", NewOfcCT_StrokeChild)
gooxml.RegisterConstructor("urn:schemas-microsoft-com:office:office", "CT_ClipPath", NewOfcCT_ClipPath)
gooxml.RegisterConstructor("urn:schemas-microsoft-com:office:office", "CT_Fill", NewOfcCT_Fill)
gooxml.RegisterConstructor("urn:schemas-microsoft-com:office:office", "shapedefaults", NewOfcShapedefaults)
gooxml.RegisterConstructor("urn:schemas-microsoft-com:office:office", "shapelayout", NewOfcShapelayout)
gooxml.RegisterConstructor("urn:schemas-microsoft-com:office:office", "signatureline", NewOfcSignatureline)
gooxml.RegisterConstructor("urn:schemas-microsoft-com:office:office", "ink", NewOfcInk)
gooxml.RegisterConstructor("urn:schemas-microsoft-com:office:office", "diagram", NewOfcDiagram)
gooxml.RegisterConstructor("urn:schemas-microsoft-com:office:office", "equationxml", NewOfcEquationxml)
gooxml.RegisterConstructor("urn:schemas-microsoft-com:office:office", "skew", NewOfcSkew)
gooxml.RegisterConstructor("urn:schemas-microsoft-com:office:office", "extrusion", NewOfcExtrusion)
gooxml.RegisterConstructor("urn:schemas-microsoft-com:office:office", "callout", NewOfcCallout)
gooxml.RegisterConstructor("urn:schemas-microsoft-com:office:office", "lock", NewOfcLock)
gooxml.RegisterConstructor("urn:schemas-microsoft-com:office:office", "OLEObject", NewOfcOLEObject)
gooxml.RegisterConstructor("urn:schemas-microsoft-com:office:office", "complex", NewOfcComplex)
gooxml.RegisterConstructor("urn:schemas-microsoft-com:office:office", "left", NewOfcLeft)
gooxml.RegisterConstructor("urn:schemas-microsoft-com:office:office", "top", NewOfcTop)
gooxml.RegisterConstructor("urn:schemas-microsoft-com:office:office", "right", NewOfcRight)
gooxml.RegisterConstructor("urn:schemas-microsoft-com:office:office", "bottom", NewOfcBottom)
gooxml.RegisterConstructor("urn:schemas-microsoft-com:office:office", "column", NewOfcColumn)
gooxml.RegisterConstructor("urn:schemas-microsoft-com:office:office", "clippath", NewOfcClippath)
gooxml.RegisterConstructor("urn:schemas-microsoft-com:office:office", "fill", NewOfcFill)
}
1
https://gitee.com/jiewen/gooxml.git
git@gitee.com:jiewen/gooxml.git
jiewen
gooxml
gooxml
c517a803bade

搜索帮助