docx

package
v0.0.0-...-a886e2b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 15, 2017 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type A14Ext

type A14Ext struct {
	Uri         string          `xml:"uri,attr,omitempty"`
	UseLocalDpi *A14UseLocalDpi `xml:"a14:useLocalDpi,omitempty"`
}

type A14UseLocalDpi

type A14UseLocalDpi struct {
	A14 string `xml:"xmlns:a14,attr,omitempty"`
	Val string `xml:"val,attr,omitempty"`
}

type ABlip

type ABlip struct {
	Embed  string   `xml:"r:embed,attr,omitempty"`
	Cstate string   `xml:"cstate,attr,omitempty"`
	ExtLst *AExtLst `xml:"a:extLst,omitempty"`
}

type ABlipFill

type ABlipFill struct {
	Blip    *ABlip   `xml:"a:blip,omitempty"`
	Stretch AStretch `xml:"a:strecth,omitempty"`
}

type ACNvGraphicFramePr

type ACNvGraphicFramePr struct {
	GraphicFrameLocks *AXmlnSValue `xml:"a:graphicFrameLocks,omitempty"`
}

type AExtLst

type AExtLst struct {
	Ext *A14Ext `xml:"a:ext,omitempty"`
}

type AGraphic

type AGraphic struct {
	A              string          `xml:"xmlns:a,attr,omitempty"`
	NoChangeAspect string          `xml:"noChangeAspect,attr,omitempty"`
	GraphicData    *PicGraphicData `xml:"a:graphicData,omitempty"`
}

type APrstGeom

type APrstGeom struct {
	Prst  string `xml:"prst,attr,omitempty"`
	AvLst AvLst  `xml:"a:avLst,omitempty"`
}

type ASpPr

type ASpPr struct {
	Xfrm     *AXfrm     `xml:"a:xfrm,omitempty"`
	PrstGeom *APrstGeom `xml:"a:prstGeom,omitempty"`
}

type AStretch

type AStretch struct {
	FillRect FillRect `xml:"a:fillRect,omitempty"`
}

type AXfrm

type AXfrm struct {
	Rot string    `xml:"rot,attr,omitempty"`
	Off XyValue   `xml:"a:off,omitempty"`
	Ext CxCyValue `xml:"a:ext,omitempty"`
}

type AXmlnSValue

type AXmlnSValue struct {
	A              string `xml:"xmlns:a,attr,omitempty"`
	NoChangeAspect string `xml:"noChangeAspect,attr,omitempty"`
	Pic            string `xml:"pic,attr,omitempty"`
	Uri            string `xml:"uri,attr,omitempty"`
	A14            string `xml:"a14,attr,omitempty"`
}

type Anchor

type Anchor struct {
	DistT             string             `xml:"distT,attr,omitempty"`
	DistB             string             `xml:"distB,attr,omitempty"`
	DistL             string             `xml:"distL,attr,omitempty"`
	DistR             string             `xml:"distR,attr,omitempty"`
	SimplePosAttr     string             `xml:"simplePos,attr,omitempty"`
	SimplePos         *XyValue           `xml:"simplePos,omitempty"`
	RelativeHeight    string             `xml:"relativeHeight,attr,omitempty"`
	BehindDoc         string             `xml:"behindDoc,attr,omitempty"`
	Locked            string             `xml:"locked,attr,omitempty"`
	LayoutInCell      string             `xml:"layoutInCell,attr,omitempty"`
	AllowOverlap      string             `xml:"allowOverlap,attr,omitempty"`
	PositionH         *Position          `xml:"positionH,omitempty"`
	PositionV         *Position          `xml:"positionV,omitempty"`
	Extent            *CxCyValue         `xml:"extent,omitempty"`
	EffectExtent      *LtrbValue         `xml:"effectExtent,omitempty"`
	WrapNone          *EmptyValue        `xml:"wrapNone,omitempty"`
	DocPr             *IdNameValue       `xml:"docPr,omitempty"`
	CNvGraphicFramePr *CNvGraphicFramePr `xml:"cNvGraphicFramePr,omitempty"`
	Graphic           *Graphic           `xml:"graphic,omitempty"`
	SizeRelH          *SizeRel           `xml:"sizeRelH,omitempty"`
	SizeRelV          *SizeRel           `xml:"sizeRelV,omitempty"`
}

func (*Anchor) ToWAnchor

func (a *Anchor) ToWAnchor() *WAnchor

type AvLst

type AvLst struct {
}

type BdrValue

type BdrValue struct {
	Value string `xml:"val,attr,omitempty"`
	Sz    string `xml:"sz,attr,omitempty"`
	Space string `xml:"space,attr,omitempty"`
	Color string `xml:"color,attr,omitempty"`
}

func (*BdrValue) From

func (b *BdrValue) From(b1 *BdrValue)

type Blip

type Blip struct {
	Embed  string  `xml:"embed,attr,omitempty"`
	Cstate string  `xml:"cstate,attr,omitempty"`
	ExtLst *ExtLst `xml:"extLst,omitempty"`
}

func (*Blip) ToABlip

func (b *Blip) ToABlip() *ABlip

type BlipFill

type BlipFill struct {
	Blip    *Blip   `xml:"blip,omitempty"`
	Stretch Stretch `xml:"strecth,omitempty"`
}

func (*BlipFill) ToABlipFill

func (b *BlipFill) ToABlipFill() *ABlipFill

type Body

type Body struct {
	Items  []DocItem
	Params BodyParams `xml:"sectPr"`
}

Body - тело документа

type BodyParams

type BodyParams struct {
	HeaderReference *ReferenceValue `xml:"headerReference,omitempty"`
	FooterReference *ReferenceValue `xml:"footerReference,omitempty"`
	PageSize        SizeValue       `xml:"pgSz"`
	PageMargin      MarginValue     `xml:"pgMar"`
	Bidi            IntValue        `xml:"bidi"`
}

BodyParams - параметры тела документа

func (*BodyParams) ToWBodyParams

func (b *BodyParams) ToWBodyParams() WBodyParams

type BookMarkEnd

type BookMarkEnd struct {
	IBookMark
}

func (*BookMarkEnd) Clone

func (b *BookMarkEnd) Clone() DocItem

func (*BookMarkEnd) Tag

func (b *BookMarkEnd) Tag() string

type BookMarkStart

type BookMarkStart struct {
	IBookMark
}

func (*BookMarkStart) Clone

func (b *BookMarkStart) Clone() DocItem

func (*BookMarkStart) Tag

func (b *BookMarkStart) Tag() string

type BoolValue

type BoolValue struct {
	Value bool `xml:"val,attr"`
}

BoolValue - одиночное bool значение

type CNvGraphicFramePr

type CNvGraphicFramePr struct {
	GraphicFrameLocks *XmlnSValue `xml:"graphicFrameLocks,omitempty"`
}

func (*CNvGraphicFramePr) ToACNvGraphicFramePr

func (c *CNvGraphicFramePr) ToACNvGraphicFramePr() *ACNvGraphicFramePr

type CxCyValue

type CxCyValue struct {
	Cx string `xml:"cx,attr,omitempty"`
	Cy string `xml:"cy,attr,omitempty"`
}

type DocItem

type DocItem interface {
	Tag() string
	Type() DocItemType
	PlainText() string
	Clone() DocItem
	// contains filtered or unexported methods
}

DocItem - интерфейс элемента документа

type DocItemType

type DocItemType int

DocItemType - тип элемента

const (
	Paragraph DocItemType = iota
	Record
	Table
	BookMark
)

Paragraph - параграф

type Document

type Document struct {
	Scheme     map[string]string
	SkipScheme string
	Body       Body `xml:"body"`
}

Document - документ разметки DOCX

func (*Document) Decode

func (doc *Document) Decode(reader io.Reader) error

Decode (Document) - декодирование документа

func (*Document) Encode

func (doc *Document) Encode(writer io.Writer) error

Encode - кодирование

type Drawing

type Drawing struct {
	Inline *Inline `xml:"inline,omitempty"`
	Anchor *Anchor `xml:"anchor,omitempty"`
}

func (*Drawing) ToWDrawing

func (d *Drawing) ToWDrawing() *WDrawing

type EmptyValue

type EmptyValue struct {
}

EmptyValue - пустое значение

type Ext

type Ext struct {
	Uri         string       `xml:"uri,attr,omitempty"`
	UseLocalDpi *UseLocalDpi `xml:"useLocalDpi,omitempty"`
}

func (*Ext) ToA14Ext

func (e *Ext) ToA14Ext() *A14Ext

type ExtLst

type ExtLst struct {
	Ext *Ext `xml:"ext,omitempty"`
}

func (*ExtLst) ToAExtLst

func (e *ExtLst) ToAExtLst() *AExtLst

type FillRect

type FillRect struct {
}

type FloatValue

type FloatValue struct {
	Value float64 `xml:"val,attr"`
}

FloatValue - одиночное float значение

type Graphic

type Graphic struct {
	A              string       `xml:"a,attr,omitempty"`
	NoChangeAspect string       `xml:"noChangeAspect,attr,omitempty"`
	GraphicData    *GraphicData `xml:"graphicData,omitempty"`
}

func (*Graphic) ToAGraphic

func (g *Graphic) ToAGraphic() *AGraphic

type GraphicData

type GraphicData struct {
	Uri string `xml:"uri,attr,omitempty"`
	Pic *Pic   `xml:"pic,omitempty"`
}

func (*GraphicData) ToPicGraphicData

func (g *GraphicData) ToPicGraphicData() *PicGraphicData
type Header struct {
	Scheme     map[string]string
	SkipScheme string
	Items      []DocItem
}

Header - разметка заголовка DOCX

func (*Header) Decode

func (h *Header) Decode(reader io.Reader) error

Decode (Document) - декодирование документа

func (*Header) Encode

func (h *Header) Encode(writer io.Writer) error

Encode - кодирование

type HeightValue

type HeightValue struct {
	Value      int64  `xml:"val,attr"`
	HeightRule string `xml:"hRule,attr,omitempty"`
}

HeightValue - значение высоты

func (*HeightValue) From

func (h *HeightValue) From(h1 *HeightValue)

From (HeightValue)

type IBookMark

type IBookMark struct {
	ID   string `xml:"id,attr,omitempty"`
	Name string `xml:"name,attr,omitempty"`
}

func (*IBookMark) PlainText

func (b *IBookMark) PlainText() string

func (*IBookMark) Tag

func (b *IBookMark) Tag() string

func (*IBookMark) Type

func (b *IBookMark) Type() DocItemType

type IdNameValue

type IdNameValue struct {
	ID   string `xml:"id,attr,omitempty"`
	Name string `xml:"name,attr,omitempty"`
}

type Inline

type Inline struct {
	DistT             string             `xml:"distT,attr,omitempty"`
	DistB             string             `xml:"distB,attr,omitempty"`
	DistL             string             `xml:"distL,attr,omitempty"`
	DistR             string             `xml:"distR,attr,omitempty"`
	Extent            *CxCyValue         `xml:"extent,omitempty"`
	EffectExtent      *LtrbValue         `xml:"effectExtent,omitempty"`
	DocPr             *IdNameValue       `xml:"docPr,omitempty"`
	CNvGraphicFramePr *CNvGraphicFramePr `xml:"cNvGraphicFramePr,omitempty"`
	Graphic           *Graphic           `xml:"graphic,omitempty"`
}

func (*Inline) ToWInline

func (i *Inline) ToWInline() *WInline

type IntValue

type IntValue struct {
	Value int64 `xml:"val,attr"`
}

IntValue - одиночное int значение

func (*IntValue) From

func (i *IntValue) From(i1 *IntValue)

From (IntValue)

type LookValue

type LookValue struct {
	Value       string `xml:"val,attr,omitempty"`
	FirstRow    string `xml:"firstRow,attr,omitempty"`
	LastRow     string `xml:"lastRow,attr,omitempty"`
	FirstColumn string `xml:"firstColumn,attr,omitempty"`
	LastColumn  string `xml:"lastColumn,attr,omitempty"`
	NoHBand     string `xml:"noHBand,attr,omitempty"`
	NoVBand     string `xml:"noVBand,attr,omitempty"`
}

func (*LookValue) From

func (l *LookValue) From(l1 *LookValue)

type LtrbValue

type LtrbValue struct {
	L string `xml:"l,attr,omitempty"`
	T string `xml:"t,attr,omitempty"`
	R string `xml:"r,attr,omitempty"`
	B string `xml:"b,attr,omitempty"`
}

type MarginValue

type MarginValue struct {
	Top    int64 `xml:"top,attr,omitempty"`
	Left   int64 `xml:"left,attr,omitempty"`
	Bottom int64 `xml:"bottom,attr,omitempty"`
	Right  int64 `xml:"right,attr,omitempty"`
	Header int64 `xml:"header,attr,omitempty"`
	Footer int64 `xml:"footer,attr,omitempty"`
}

MarginValue - margin значение

func (*MarginValue) From

func (m *MarginValue) From(m1 *MarginValue)

From (MarginValue)

type Margins

type Margins struct {
	Top    WidthValue `xml:"top"`
	Left   WidthValue `xml:"left"`
	Bottom WidthValue `xml:"bottom"`
	Right  WidthValue `xml:"right"`
}

Margins - margins значение

func (*Margins) From

func (m *Margins) From(m1 *Margins)

From (Margins)

func (*Margins) ToWMargins

func (m *Margins) ToWMargins() *WMargins

type NvPicPr

type NvPicPr struct {
	CNvPr    *IdNameValue `xml:"cNvPr,omitempty"`
	CNvPicPr *EmptyValue  `xml:"cNvPicPr,omitempty"`
}

type PBdrValue

type PBdrValue struct {
	Top     BdrValue `xml:"top,omitempty"`
	Left    BdrValue `xml:"left,omitempty"`
	Bottom  BdrValue `xml:"bottom,omitempty"`
	Right   BdrValue `xml:"right,omitempty"`
	Between BdrValue `xml:"between,omitempty"`
	Bar     BdrValue `xml:"bar,omitempty"`
}

func (*PBdrValue) From

func (pb *PBdrValue) From(pb1 *PBdrValue)

func (*PBdrValue) ToWPBdrValue

func (pv *PBdrValue) ToWPBdrValue() *WPBdrValue

type ParagraphItem

type ParagraphItem struct {
	Params       ParagraphParams `xml:"pPr"`
	Items        []DocItem
	RsidR        string `xml:"rsidR,attr,omitempty"`
	RsidRDefault string `xml:"rsidRDefault,attr,omitempty"`
	RsidP        string `xml:"rsidP,attr,omitempty"`
	RsidRPr      string `xml:"rsidRPr,attr,omitempty"`
}

ParagraphItem - параграф

func (*ParagraphItem) Clone

func (item *ParagraphItem) Clone() DocItem

Clone - клонирование

func (*ParagraphItem) PlainText

func (item *ParagraphItem) PlainText() string

PlainText - текст

func (*ParagraphItem) Tag

func (item *ParagraphItem) Tag() string

Tag - имя тега элемента

func (*ParagraphItem) Type

func (item *ParagraphItem) Type() DocItemType

Type - тип элемента

type ParagraphParams

type ParagraphParams struct {
	Style         *StringValue  `xml:"pStyle,omitempty"`
	Spacing       *SpacingValue `xml:"spacing,omitempty"`
	Jc            *StringValue  `xml:"jc,omitempty"`
	Bidi          *IntValue     `xml:"bidi,omitempty"`
	PBdr          *PBdrValue    `xml:"pBdr,omitempty"`
	WindowControl *StringValue  `xml:"windowControl,omitempty"`
	Ind           *MarginValue  `xml:"ind,omitempty"`
	Rpr           *RecordParams `xml:"rPr,omitempty"`
}

ParagraphParams - параметры параграфа

func (*ParagraphParams) ToWParagraphParams

func (pp *ParagraphParams) ToWParagraphParams() *WParagraphParams

type Pic

type Pic struct {
	Pic      string    `xml:"pic,attr,omitempty"`
	NvPicPr  *NvPicPr  `xml:"nvPicPr,omitempty"`
	BlipFill *BlipFill `xml:"blipFill,omitempty"`
	SpPr     *SpPr     `xml:"spPr,omitempty"`
}

func (*Pic) ToPicPic

func (p *Pic) ToPicPic() *PicPic

type PicGraphicData

type PicGraphicData struct {
	Uri string  `xml:"uri,attr,omitempty"`
	Pic *PicPic `xml:"pic:pic,omitempty"`
}

type PicNvPicPr

type PicNvPicPr struct {
	CNvPr    *IdNameValue `xml:"pic:cNvPr,omitempty"`
	CNvPicPr *EmptyValue  `xml:"pic:cNvPicPr,omitempty"`
}

type PicPic

type PicPic struct {
	Pic      string      `xml:"xmlns:pic,attr,omitempty"`
	NvPicPr  *PicNvPicPr `xml:"pic:nvPicPr,omitempty"`
	BlipFill *ABlipFill  `xml:"pic:blipFill,omitempty"`
	SpPr     *ASpPr      `xml:"pic:spPr,omitempty"`
}

type Position

type Position struct {
	RelativeFrom string `xml:"relativeFrom,attr,omitempty"`
	PosOffset    string `xml:"posOffset,omitempty"`
}

type PrstGeom

type PrstGeom struct {
	Prst  string `xml:"prst,attr,omitempty"`
	AvLst AvLst  `xml:"avLst,omitempty"`
}

type RecordFonts

type RecordFonts struct {
	ASCII      string `xml:"ascii,attr"`
	CS         string `xml:"cs,attr"`
	HandleANSI string `xml:"hAnsi,attr"`
	EastAsia   string `xml:"eastAsia,attr"`
	HandleInt  string `xml:"hint,attr,omitempty"`
}

RecordFonts - fonts in record

type RecordItem

type RecordItem struct {
	Params  *RecordParams `xml:"rPr,omitempty"`
	Text    Text          `xml:"t,omitempty"`
	Tab     bool          `xml:"tab,omitempty"`
	Break   bool          `xml:"br,omitempty"`
	Drawing *Drawing      `xml:"drawing,omitempty"`
}

RecordItem - record item

func (*RecordItem) Clone

func (item *RecordItem) Clone() DocItem

Clone - клонирование

func (*RecordItem) PlainText

func (item *RecordItem) PlainText() string

PlainText - текст

func (*RecordItem) Tag

func (item *RecordItem) Tag() string

Tag - имя тега элемента

func (*RecordItem) Type

func (item *RecordItem) Type() DocItemType

Type - тип элемента

type RecordParams

type RecordParams struct {
	Fonts     *RecordFonts `xml:"rFonts,omitempty"`
	Rtl       *IntValue    `xml:"rtl,omitempty"`
	Size      *IntValue    `xml:"sz,omitempty"`
	SizeCs    *IntValue    `xml:"szCs,omitempty"`
	Lang      *StringValue `xml:"lang,omitempty"`
	Underline *ShadowValue `xml:"u,omitempty"`
	Italic    *EmptyValue  `xml:"i,omitempty"`
	Bold      *EmptyValue  `xml:"b,omitempty"`
	BoldCS    *EmptyValue  `xml:"bCs,omitempty"`
	Color     *StringValue `xml:"color,omitempty"`
	Highlight *StyleValue  `xml:"highlight,omitempty"`
	VertAlign *StyleValue  `xml:"vertAlign,omitempty"`
	Strike    *EmptyValue  `xml:"strike,omitempty"`
	NoProof   *EmptyValue  `xml:"noProof,omitempty"`
}

RecordParams - params record

func (*RecordParams) Clone

func (rp *RecordParams) Clone() *RecordParams

func (*RecordParams) ToWRecordParams

func (rp *RecordParams) ToWRecordParams() *WRecordParams

type ReferenceValue

type ReferenceValue struct {
	Type string `xml:"type,attr"`
	ID   string `xml:"id,attr"`
}

ReferenceValue - reference value

type ShadowValue

type ShadowValue struct {
	Value          string `xml:"val,attr"`
	Color          string `xml:"color,attr"`
	Fill           string `xml:"fill,attr"`
	ThemeFill      string `xml:"themeFill,attr,omitempty"`
	ThemeFillShade string `xml:"themeFillShade,attr,omitempty"`
}

ShadowValue - значение тени

func (*ShadowValue) From

func (s *ShadowValue) From(s1 *ShadowValue)

From (ShadowValue)

type SimpleDocxFile

type SimpleDocxFile struct {
	// contains filtered or unexported fields
}

SimpleDocxFile - файл docx

func OpenFile

func OpenFile(fileName string) (*SimpleDocxFile, error)

OpenFile - Открытие файла DOCX

func (*SimpleDocxFile) Render

func (f *SimpleDocxFile) Render(v interface{}) error

Render (SimpleDocxFile) - рендер шаблона

func (*SimpleDocxFile) RenderHeader

func (f *SimpleDocxFile) RenderHeader(index int, v interface{}) error

RenderHeader (SimpleDocxFile) - рендер заголовка шаблона

func (*SimpleDocxFile) Save

func (f *SimpleDocxFile) Save(fileName string) error

Save (SimpleDocxFile) - сохранить

func (*SimpleDocxFile) Write

func (f *SimpleDocxFile) Write(writer io.Writer) error

Write (SimpleDocxFile)

type SizeRel

type SizeRel struct {
	RelativeFrom string `xml:"relativeFrom,attr,omitempty"`
	PctWidth     string `xml:"pctWidth,omitempty"`
	PctHeight    string `xml:"pctHeight,omitempty"`
}

type SizeValue

type SizeValue struct {
	Width       int64  `xml:"w,attr"`
	Height      int64  `xml:"h,attr"`
	Orientation string `xml:"orient,attr,omitempty"`
}

SizeValue - значение размера

func (*SizeValue) From

func (s *SizeValue) From(s1 *SizeValue)

From (SizeValue)

type SpPr

type SpPr struct {
	Xfrm     *Xfrm     `xml:"xfrm,omitempty"`
	PrstGeom *PrstGeom `xml:"prstGeom,omitempty"`
}

func (*SpPr) ToASpPr

func (s *SpPr) ToASpPr() *ASpPr

type SpacingValue

type SpacingValue struct {
	After    int64  `xml:"after,attr"`
	Before   int64  `xml:"before,attr"`
	Line     int64  `xml:"line,attr"`
	LineRule string `xml:"lineRule,attr"`
}

SpacingValue - spacing value

func (*SpacingValue) From

func (s *SpacingValue) From(s1 *SpacingValue)

From (SpacingValue)

type Stretch

type Stretch struct {
	FillRect FillRect `xml:"fillRect,omitempty"`
}

type StringValue

type StringValue struct {
	Value string `xml:"val,attr,omitempty"`
}

StringValue - одиночное string значение

func (*StringValue) From

func (s *StringValue) From(s1 *StringValue)

From (StringValue)

type StyleValue

type StyleValue struct {
	Value string `xml:"val,attr,omitempty"`
}

func (*StyleValue) From

func (s *StyleValue) From(s1 *StyleValue)

type TableBorder

type TableBorder struct {
	Value  string `xml:"val,attr"`
	Color  string `xml:"color,attr"`
	Size   int64  `xml:"sz,attr"`
	Space  int64  `xml:"space,attr"`
	Shadow int64  `xml:"shadow,attr"`
	Frame  int64  `xml:"frame,attr"`
}

TableBorder in borders

func (*TableBorder) From

func (b *TableBorder) From(b1 *TableBorder)

From (TableBorder)

type TableBorders

type TableBorders struct {
	Top     TableBorder  `xml:"top"`
	Left    TableBorder  `xml:"left"`
	Bottom  TableBorder  `xml:"bottom"`
	Right   TableBorder  `xml:"right"`
	InsideH *TableBorder `xml:"insideH,omitempty"`
	InsideV *TableBorder `xml:"insideV,omitempty"`
}

TableBorders in table

func (*TableBorders) From

func (b *TableBorders) From(b1 *TableBorders)

From (TableBorders)

func (*TableBorders) ToWTableBorders

func (tb *TableBorders) ToWTableBorders() *WTableBorders

type TableCell

type TableCell struct {
	Params TableCellParams `xml:"tcPr"`
	Items  []DocItem
}

TableCell - table cell

func (*TableCell) Clone

func (cell *TableCell) Clone() *TableCell

Clone (TableCell) - клонирование ячейки

type TableCellParams

type TableCellParams struct {
	Width         *WidthValue   `xml:"tcW,omitempty"`
	Borders       *TableBorders `xml:"tcBorders,omitempty"`
	Shadow        *ShadowValue  `xml:"shd,omitempty"`
	Margins       *Margins      `xml:"tcMar,omitempty"`
	VerticalAlign *StringValue  `xml:"vAlign,omitempty"`
	VerticalMerge *StringValue  `xml:"vMerge,omitempty"`
	GridSpan      *IntValue     `xml:"gridSpan,omitempty"`
	HideMark      *EmptyValue   `xml:"hideMark,omitempty"`
	NoWrap        *EmptyValue   `xml:"noWrap,omitempty"`
}

TableCellParams - cell params

type TableGrid

type TableGrid struct {
	Cols []*WidthValue `xml:"gridCol,omitempty"`
}

TableGrid - Grid table

func (*TableGrid) ToWGirdParams

func (g *TableGrid) ToWGirdParams() *WTableGrid

type TableItem

type TableItem struct {
	Params TableParams `xml:"tblPr"`
	Grid   TableGrid   `xml:"tblGrid"`
	Rows   []*TableRow `xml:"tr,omitempty"`
}

TableItem - элемент таблици

func (*TableItem) Clone

func (item *TableItem) Clone() DocItem

Clone - клонирование

func (*TableItem) PlainText

func (item *TableItem) PlainText() string

PlainText - текст

func (*TableItem) Tag

func (item *TableItem) Tag() string

Tag - имя тега элемента

func (*TableItem) Type

func (item *TableItem) Type() DocItemType

Type - тип элемента

type TableLayout

type TableLayout struct {
	Type string `xml:"type,attr"`
}

TableLayout - layout params

type TableParams

type TableParams struct {
	Style   *StyleValue   `xml:"tblStyle,omitempty"`
	Width   *WidthValue   `xml:"tblW,omitempty"`
	Jc      *StringValue  `xml:"jc,omitempty"`
	Ind     *WidthValue   `xml:"tblInd,omitempty"`
	Borders *TableBorders `xml:"tblBorders,omitempty"`
	Shadow  *ShadowValue  `xml:"shd,omitempty"`
	Layout  *TableLayout  `xml:"tblLayout,omitempty"`
	DocGrid *IntValue     `xml:"docGrid,omitempty"`
	Look    *LookValue    `xml:"tblLook,omitempty"`
}

TableParams - Params table

func (*TableParams) ToWTableParams

func (tp *TableParams) ToWTableParams() *WTableParams

type TableParamsEx

type TableParamsEx struct {
	Shadow ShadowValue `xml:"shd"`
}

TableParamsEx - Other params table

type TableRow

type TableRow struct {
	OtherParams *TableParamsEx  `xml:"tblPrEx,omitempty"`
	Params      *TableRowParams `xml:"trPr"`
	Cells       []*TableCell    `xml:"tc,omitempty"`
	RsidR       string          `xml:"rsidR,attr,omitempty"`
	RsidTr      string          `xml:"rsidTr,attr,omitempty"`
}

TableRow - row in table

func (*TableRow) Clone

func (row *TableRow) Clone() *TableRow

Clone (TableRow) - клонирование строки таблицы

type TableRowParams

type TableRowParams struct {
	Height   HeightValue `xml:"trHeight"`
	IsHeader bool
}

TableRowParams - row params

type Text

type Text struct {
	Value string `xml:",chardata"`
	Space string `xml:"space,attr,omitempty"`
}

func (Text) ToWText

func (t Text) ToWText() *WText

type UseLocalDpi

type UseLocalDpi struct {
	A14 string `xml:"a14,attr,omitempty"`
	Val string `xml:"val,attr,omitempty"`
}

type WAnchor

type WAnchor struct {
	DistT             string              `xml:"distT,attr,omitempty"`
	DistB             string              `xml:"distB,attr,omitempty"`
	DistL             string              `xml:"distL,attr,omitempty"`
	DistR             string              `xml:"distR,attr,omitempty"`
	SimplePosAttr     string              `xml:"simplePos,attr,omitempty"`
	RelativeHeight    string              `xml:"relativeHeight,attr,omitempty"`
	BehindDoc         string              `xml:"behindDoc,attr,omitempty"`
	Locked            string              `xml:"locked,attr,omitempty"`
	LayoutInCell      string              `xml:"layoutInCell,attr,omitempty"`
	AllowOverlap      string              `xml:"allowOverlap,attr,omitempty"`
	SimplePos         *XyValue            `xml:"wp:simplePos,omitempty"`
	PositionH         *WPosition          `xml:"wp:positionH,omitempty"`
	PositionV         *WPosition          `xml:"wp:positionV,omitempty"`
	Extent            *CxCyValue          `xml:"wp:extent,omitempty"`
	EffectExtent      *LtrbValue          `xml:"wp:effectExtent,omitempty"`
	WrapNone          *EmptyValue         `xml:"wp:wrapNone,omitempty"`
	DocPr             *IdNameValue        `xml:"wp:docPr,omitempty"`
	CNvGraphicFramePr *ACNvGraphicFramePr `xml:"wp:cNvGraphicFramePr,omitempty"`
	Graphic           *AGraphic           `xml:"a:graphic,omitempty"`
	SizeRelH          *WSizeRel           `xml:"wp14:sizeRelH,omitempty"`
	SizeRelV          *WSizeRel           `xml:"wp14:sizeRelV,omitempty"`
}

type WBdrValue

type WBdrValue struct {
	Value string `xml:"w:val,attr,omitempty"`
	Sz    string `xml:"w:sz,attr,omitempty"`
	Space string `xml:"w:space,attr,omitempty"`
	Color string `xml:"w:color,attr,omitempty"`
}

type WBodyParams

type WBodyParams struct {
	HeaderReference *WReferenceValue `xml:"w:headerReference,omitempty"`
	FooterReference *WReferenceValue `xml:"w:footerReference,omitempty"`
	PageSize        WSizeValue       `xml:"w:pgSz"`
	PageMargin      WMarginValue     `xml:"w:pgMar"`
	Bidi            WIntValue        `xml:"w:bidi"`
}

type WDrawing

type WDrawing struct {
	Inline *WInline `xml:"wp:inline,omitempty"`
	Anchor *WAnchor `xml:"wp:anchor,omitempty"`
}

type WEmptyValue

type WEmptyValue struct {
}

type WInline

type WInline struct {
	DistT             string              `xml:"distT,attr,omitempty"`
	DistB             string              `xml:"distB,attr,omitempty"`
	DistL             string              `xml:"distL,attr,omitempty"`
	DistR             string              `xml:"distR,attr,omitempty"`
	Extent            *CxCyValue          `xml:"wp:extent,omitempty"`
	EffectExtent      *LtrbValue          `xml:"wp:effectExtent,omitempty"`
	DocPr             *IdNameValue        `xml:"wp:docPr,omitempty"`
	CNvGraphicFramePr *ACNvGraphicFramePr `xml:"wp:cNvGraphicFramePr,omitempty"`
	Graphic           *AGraphic           `xml:"a:graphic,omitempty"`
}

type WIntValue

type WIntValue struct {
	Value int64 `xml:"w:val,attr"`
}

type WLookValue

type WLookValue struct {
	Value       string `xml:"w:val,attr,omitempty"`
	FirstRow    string `xml:"w:firstRow,attr,omitempty"`
	LastRow     string `xml:"w:lastRow,attr,omitempty"`
	FirstColumn string `xml:"w:firstColumn,attr,omitempty"`
	LastColumn  string `xml:"w:lastColumn,attr,omitempty"`
	NoHBand     string `xml:"w:noHBand,attr,omitempty"`
	NoVBand     string `xml:"w:noVBand,attr,omitempty"`
}

type WMarginValue

type WMarginValue struct {
	Top    int64 `xml:"w:top,attr,omitempty"`
	Left   int64 `xml:"w:left,attr,omitempty"`
	Bottom int64 `xml:"w:bottom,attr,omitempty"`
	Right  int64 `xml:"w:right,attr,omitempty"`
	Header int64 `xml:"w:header,attr,omitempty"`
	Footer int64 `xml:"w:footer,attr,omitempty"`
}

type WMargins

type WMargins struct {
	Top    WWidthValue `xml:"w:top"`
	Left   WWidthValue `xml:"w:left"`
	Bottom WWidthValue `xml:"w:bottom"`
	Right  WWidthValue `xml:"w:right"`
}

type WPBdrValue

type WPBdrValue struct {
	Top     WBdrValue `xml:"w:top,omitempty"`
	Left    WBdrValue `xml:"w:left,omitempty"`
	Bottom  WBdrValue `xml:"w:bottom,omitempty"`
	Right   WBdrValue `xml:"w:right,omitempty"`
	Between WBdrValue `xml:"w:between,omitempty"`
	Bar     WBdrValue `xml:"w:bar,omitempty"`
}

type WParagraphParams

type WParagraphParams struct {
	Style         *WStringValue  `xml:"w:pStyle,omitempty"`
	Spacing       *WSpacingValue `xml:"w:spacing,omitempty"`
	Jc            *WStringValue  `xml:"w:jc,omitempty"`
	Bidi          *WIntValue     `xml:"w:bidi,omitempty"`
	PBdr          *WPBdrValue    `xml:"w:pBdr,omitempty"`
	WindowControl *WStringValue  `xml:"w:windowControl,omitempty"`
	Ind           *WMarginValue  `xml:"w:ind,omitempty"`
	Rpr           *WRecordParams `xml:"w:rPr,omitempty"`
}

type WPosition

type WPosition struct {
	RelativeFrom string `xml:"relativeFrom,attr,omitempty"`
	PosOffset    string `xml:"wp:posOffset,omitempty"`
}

type WRecordFonts

type WRecordFonts struct {
	ASCII      string `xml:"w:ascii,attr"`
	CS         string `xml:"w:cs,attr"`
	HandleANSI string `xml:"w:hAnsi,attr"`
	EastAsia   string `xml:"w:eastAsia,attr"`
	HandleInt  string `xml:"w:hint,attr,omitempty"`
}

type WRecordParams

type WRecordParams struct {
	Fonts     *WRecordFonts `xml:"w:rFonts,omitempty"`
	Rtl       *WIntValue    `xml:"w:rtl,omitempty"`
	Size      *WIntValue    `xml:"w:sz,omitempty"`
	SizeCs    *WIntValue    `xml:"w:szCs,omitempty"`
	Lang      *WStringValue `xml:"w:lang,omitempty"`
	Underline *WShadowValue `xml:"w:u,omitempty"`
	Italic    *WEmptyValue  `xml:"w:i,omitempty"`
	Bold      *WEmptyValue  `xml:"w:b,omitempty"`
	BoldCS    *WEmptyValue  `xml:"w:bCs,omitempty"`
	Color     *WStringValue `xml:"w:color,omitempty"`
	Highlight *WStyleValue  `xml:"w:highlight,omitempty"`
	VertAlign *WStyleValue  `xml:"w:vertAlign,omitempty"`
	Strike    *WEmptyValue  `xml:"w:strike,omitempty"`
	NoProof   *WEmptyValue  `xml:"w:noProof,omitempty"`
}

type WReferenceValue

type WReferenceValue struct {
	Type string `xml:"r:type,attr"`
	ID   string `xml:"r:id,attr"`
}

type WShadowValue

type WShadowValue struct {
	Value          string `xml:"w:val,attr"`
	Color          string `xml:"w:color,attr"`
	Fill           string `xml:"w:fill,attr"`
	ThemeFill      string `xml:"w:themeFill,attr,omitempty"`
	ThemeFillShade string `xml:"w:themeFillShade,attr,omitempty"`
}

type WSizeRel

type WSizeRel struct {
	RelativeFrom string `xml:"relativeFrom,attr,omitempty"`
	PctWidth     string `xml:"wp14:pctWidth,omitempty"`
	PctHeight    string `xml:"wp14:pctHeight,omitempty"`
}

type WSizeValue

type WSizeValue struct {
	Width       int64  `xml:"w:w,attr"`
	Height      int64  `xml:"w:h,attr"`
	Orientation string `xml:"w:orient,attr,omitempty"`
}

type WSpacingValue

type WSpacingValue struct {
	After    int64  `xml:"w:after,attr"`
	Before   int64  `xml:"w:before,attr"`
	Line     int64  `xml:"w:line,attr"`
	LineRule string `xml:"w:lineRule,attr"`
}

type WStringValue

type WStringValue struct {
	Value string `xml:"w:val,attr,omitempty"`
}

type WStyleValue

type WStyleValue struct {
	Value string `xml:"w:val,attr,omitempty"`
}

type WTableBorder

type WTableBorder struct {
	Value  string `xml:"w:val,attr"`
	Color  string `xml:"w:color,attr"`
	Size   int64  `xml:"w:sz,attr"`
	Space  int64  `xml:"w:space,attr"`
	Shadow int64  `xml:"w:shadow,attr"`
	Frame  int64  `xml:"w:frame,attr"`
}

type WTableBorders

type WTableBorders struct {
	Top     WTableBorder  `xml:"w:top"`
	Left    WTableBorder  `xml:"w:left"`
	Bottom  WTableBorder  `xml:"w:bottom"`
	Right   WTableBorder  `xml:"w:right"`
	InsideH *WTableBorder `xml:"w:insideH,omitempty"`
	InsideV *WTableBorder `xml:"w:insideV,omitempty"`
}

type WTableCellParams

type WTableCellParams struct {
	Width         *WWidthValue   `xml:"w:tcW,omitempty"`
	Borders       *WTableBorders `xml:"w:tcBorders,omitempty"`
	Shadow        *WShadowValue  `xml:"w:shd,omitempty"`
	Margins       *WMargins      `xml:"w:tcMar,omitempty"`
	VerticalAlign *WStringValue  `xml:"w:vAlign,omitempty"`
	VerticalMerge *WStringValue  `xml:"w:vMerge,omitempty"`
	GridSpan      *WIntValue     `xml:"w:gridSpan,omitempty"`
	HideMark      *WEmptyValue   `xml:"w:hideMark,omitempty"`
	NoWrap        *WEmptyValue   `xml:"w:noWrap,omitempty"`
}

type WTableGrid

type WTableGrid struct {
	Cols []*WWidthValue `xml:"w:gridCol,omitempty"`
}

type WTableLayout

type WTableLayout struct {
	Type string `xml:"w:type,attr"`
}

type WTableParams

type WTableParams struct {
	Style   *WStyleValue   `xml:"w:tblStyle,omitempty"`
	Width   *WWidthValue   `xml:"w:tblW,omitempty"`
	Jc      *WStringValue  `xml:"w:jc,omitempty"`
	Ind     *WWidthValue   `xml:"w:tblInd,omitempty"`
	Borders *WTableBorders `xml:"w:tblBorders,omitempty"`
	Shadow  *WShadowValue  `xml:"w:shd,omitempty"`
	Layout  *WTableLayout  `xml:"w:tblLayout,omitempty"`
	DocGrid *WIntValue     `xml:"w:docGrid,omitempty"`
	Look    *WLookValue    `xml:"w:tblLook,omitempty"`
}

type WTableParamsEx

type WTableParamsEx struct {
	Shadow ShadowValue `xml:"w:shd"`
}

type WText

type WText struct {
	Value string `xml:",chardata"`
	Space string `xml:"xml:space,attr,omitempty"`
}

type WWidthValue

type WWidthValue struct {
	Value int64  `xml:"w:w,attr"`
	Type  string `xml:"w:type,attr,omitempty"`
}

type WidthValue

type WidthValue struct {
	Value int64  `xml:"w,attr"`
	Type  string `xml:"type,attr,omitempty"`
}

WidthValue - значение длины

func (*WidthValue) From

func (w *WidthValue) From(w1 *WidthValue)

From (WidthValue)

type Xfrm

type Xfrm struct {
	Rot string    `xml:"rot,attr,omitempty"`
	Off XyValue   `xml:"off,omitempty"`
	Ext CxCyValue `xml:"ext,omitempty"`
}

type XmlnSValue

type XmlnSValue struct {
	A              string `xml:"a,attr,omitempty"`
	NoChangeAspect string `xml:"noChangeAspect,attr,omitempty"`
	Pic            string `xml:"pic,attr,omitempty"`
	Uri            string `xml:"uri,attr,omitempty"`
	A14            string `xml:"a14,attr,omitempty"`
}

type XyValue

type XyValue struct {
	X string `xml:"x,attr,omitempty"`
	Y string `xml:"y,attr,omitempty"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL