Documentation
¶
Overview ¶
Package ctypes provides complex types used in various components of Office Open XML (OOXML) WordprocessingML (WML) documents. It includes structured definitions for paragraphs, tables, styles, headers, footers, and other complex document elements, facilitating structured data handling and manipulation within WML files.
Index ¶
- Constants
- Variables
- func CentimetersToTwips(cm float64) uint64
- func HeightRuleFromStr(value string) (stypes.HeightRule, error)
- func InchesToTwips(inches float64) uint64
- func MillimetersToTwips(mm float64) uint64
- func PointsToTwips(points float64) int
- type ActiveWritingStyle
- type AnnotationVMerge
- type BookmarkEnd
- type BookmarkStart
- type Border
- type Break
- type CTString
- type Cell
- type CellBorders
- type CellMargins
- func (tcm CellMargins) Margin(top, left, bottom, right int) CellMargins
- func (tcm CellMargins) MarginBottom(v int, t stypes.TableWidth) CellMargins
- func (tcm CellMargins) MarginLeft(v int, t stypes.TableWidth) CellMargins
- func (tcm CellMargins) MarginRight(v int, t stypes.TableWidth) CellMargins
- func (tcm CellMargins) MarginTop(v int, t stypes.TableWidth) CellMargins
- func (tcm CellMargins) MarshalXML(e *xml.Encoder, start xml.StartElement) (err error)
- type CellMerge
- type CellProperty
- type CharacterSpacingValues
- type Color
- type Column
- type Comment
- type CommentChild
- type CommentRangeEnd
- type CommentRangeStart
- type CommentReference
- type Compat
- type DecimalNum
- type DocDefault
- type DocGrid
- type DocVar
- type DocumentSettings
- type EALayout
- type Effect
- type Empty
- type EndnoteProperties
- type ExpaComp
- type FFCheckBox
- type FFDDList
- type FFData
- type FFHelpText
- type FFListEntry
- type FFMacro
- type FFName
- type FFStatusText
- type FFTextInput
- type FieldChar
- type FieldCode
- type FitText
- type FloatPos
- type FontSize
- type FontSizeCS
- type FooterReference
- type FootnoteProperties
- type FrameProp
- type GenOptStrVal
- type GenSingleStrVal
- type Grid
- type GridChange
- type HeaderReference
- type Hyperlink
- type Indent
- type Lang
- type LatentStyle
- type LsdException
- type Markup
- type MathPr
- type NumProp
- type OnOff
- type PPrChange
- type PTab
- type PageMargin
- type PageNumbering
- type PageSize
- type ParaBorder
- type ParaPropDefault
- type Paragraph
- type ParagraphChild
- type ParagraphProp
- type ProofState
- type PropException
- type RngMarkupElem
- type Row
- type RowContent
- type RowProperty
- type Rsids
- type Run
- type RunChild
- type RunFonts
- type RunPropDefault
- type RunProperty
- type SaveThroughXSLT
- type SdtCheckbox
- type SdtCheckboxSymbol
- type SdtComboBox
- type SdtContent
- type SdtContentChild
- type SdtDate
- type SdtDropDownList
- type SdtListItem
- type SdtProperties
- type SdtText
- type SectionProp
- type Shading
- type Spacing
- type StructuredDocumentTag
- type Style
- type Styles
- type Sym
- type TCBlockContent
- type TCPrChange
- type TRCellContent
- type TRPrChange
- type Tab
- type Table
- type TableBorders
- type TableLayout
- type TableProp
- type TableRowHeight
- type TableStyleProp
- type TableWidth
- type Tabs
- type TblPrChange
- type Text
- type TrackChange
- type TrackChangeNum
- type Uint64Elem
- type View
- type Zoom
Constants ¶
const ( TextSpaceDefault = "default" TextSpacePreserve = "preserve" )
Variables ¶
var ( // A1 A1Width = uint64(23386) // 594mm in twips A1Height = uint64(33110) // 841mm in twips A1Code = 4 A1 = &PageSize{ Width: &A1Width, Height: &A1Height, Orient: stypes.PageOrientPortrait, Code: &A1Code, } // A2 A2Width = uint64(16535) // 420mm in twips A2Height = uint64(23386) // 594mm in twips A2Code = 4 A2 = &PageSize{ Width: &A2Width, Height: &A2Height, Orient: stypes.PageOrientPortrait, Code: &A2Code, } // A3 A3Width = uint64(11693) // 297mm in twips A3Height = uint64(16535) // 420mm in twips A3Code = 4 A3 = &PageSize{ Width: &A3Width, Height: &A3Height, Orient: stypes.PageOrientPortrait, Code: &A3Code, } // A4 A4Width = uint64(11906) // 210mm in twips A4Height = uint64(16838) // 297mm in twips A4Code = 1 A4 = &PageSize{ Width: &A4Width, Height: &A4Height, Orient: stypes.PageOrientPortrait, Code: &A4Code, } // A5 A5Width = uint64(8268) // 148mm in twips A5Height = uint64(11693) // 210mm in twips A5Code = 1 A5 = &PageSize{ Width: &A5Width, Height: &A5Height, Orient: stypes.PageOrientPortrait, Code: &A5Code, } )
Functions ¶
func CentimetersToTwips ¶
func HeightRuleFromStr ¶
func HeightRuleFromStr(value string) (stypes.HeightRule, error)
HeightRuleFromStr converts a string to HeightRule type.
func MillimetersToTwips ¶
func PointsToTwips ¶
Types ¶
type ActiveWritingStyle ¶
type ActiveWritingStyle struct {
// Writing Style Language
Lang *CTString `xml:"lang,attr,omitempty"`
// Grammatical Engine ID
VendorID *DecimalNum `xml:"vendorID,attr,omitempty"`
// Grammatical Check Engine Version
DllVersion *DecimalNum `xml:"dllVersion,attr,omitempty"`
// Natural Language Grammar Check
NlCheck *OnOff `xml:"nlCheck,attr,omitempty"`
// Check Stylistic Rules With Grammar
CheckStyle *OnOff `xml:"checkStyle,attr,omitempty"`
// Application Defined Writing Style
AppName *CTString `xml:"appName,attr,omitempty"`
}
ActiveWritingStyle represents active writing style settings (w:activeWritingStyle)
type AnnotationVMerge ¶
type AnnotationVMerge string
const ( // AnnotationVMergeCont represents a vertically merged cell. AnnotationVMergeCont AnnotationVMerge = "cont" // AnnotationVMergeRest represents a vertically split cell. AnnotationVMergeRest AnnotationVMerge = "rest" )
func AnnotationVMergeFromStr ¶
func AnnotationVMergeFromStr(value string) (AnnotationVMerge, error)
AnnotationVMergeFromStr converts a string to AnnotationVMerge type.
func (*AnnotationVMerge) UnmarshalXMLAttr ¶
func (a *AnnotationVMerge) UnmarshalXMLAttr(attr xml.Attr) error
UnmarshalXMLAttr unmarshals XML attribute into AnnotationVMerge.
type BookmarkEnd ¶
type BookmarkEnd struct {
// Bookmark ID
ID *DecimalNum `xml:"id,attr"`
// Disable Column Spanning for Revision
DisplacedByCustomXml *stypes.DisplacedByCustomXml `xml:"displacedByCustomXml,attr,omitempty"`
}
BookmarkEnd represents the end of a bookmark (w:bookmarkEnd)
func (BookmarkEnd) MarshalXML ¶
func (b BookmarkEnd) MarshalXML(e *xml.Encoder, start xml.StartElement) error
MarshalXML implements xml.Marshaler for BookmarkEnd
func (*BookmarkEnd) UnmarshalXML ¶
func (b *BookmarkEnd) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error
UnmarshalXML implements xml.Unmarshaler for BookmarkEnd
type BookmarkStart ¶
type BookmarkStart struct {
// Bookmark ID
ID *DecimalNum `xml:"id,attr"`
// Bookmark Name
Name *CTString `xml:"name,attr"`
// Column First
ColFirst *DecimalNum `xml:"colFirst,attr,omitempty"`
// Column Last
ColLast *DecimalNum `xml:"colLast,attr,omitempty"`
// Disable Column Spanning for Revision
DisplacedByCustomXml *stypes.DisplacedByCustomXml `xml:"displacedByCustomXml,attr,omitempty"`
}
BookmarkStart represents the start of a bookmark (w:bookmarkStart)
func (BookmarkStart) MarshalXML ¶
func (b BookmarkStart) MarshalXML(e *xml.Encoder, start xml.StartElement) error
MarshalXML implements xml.Marshaler for BookmarkStart
func (*BookmarkStart) UnmarshalXML ¶
func (b *BookmarkStart) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error
UnmarshalXML implements xml.Unmarshaler for BookmarkStart
type Border ¶
type Border struct {
Val stypes.BorderStyle `xml:"val,attr"`
Color *string `xml:"color,attr,omitempty"`
ThemeColor *stypes.ThemeColor `xml:"themeColor,attr,omitempty"`
ThemeTint *string `xml:"themeTint,attr,omitempty"`
ThemeShade *string `xml:"themeShade,attr,omitempty"`
Space *string `xml:"space,attr,omitempty"`
Shadow *stypes.OnOff `xml:"shadow,attr,omitempty"`
Frame *stypes.OnOff `xml:"frame,attr,omitempty"`
Size *int `xml:"sz,attr,omitempty"`
}
func NewCellBorder ¶
new cell border @param style: border style @param color: border color; @see github.com/bfoley13/godocx/wml/color @param space: the gap between the border and the cell content @param size: border size
func (Border) MarshalXML ¶
type Break ¶
type Break struct {
BreakType *stypes.BreakType `xml:"type,attr,omitempty"`
Clear *stypes.BreakClear `xml:"clear,attr,omitempty"`
}
func (Break) MarshalXML ¶
MarshalXML implements the xml.Marshaler interface.
type CTString ¶
type CTString struct {
Val string `xml:"val,attr"`
}
CTString - Generic Element that has only one string-type attribute And the String type does not have validation dont use this if the element requires validation
func DefaultParagraphStyle ¶
func DefaultParagraphStyle() *CTString
DefaultParagraphStyle creates the default ParagraphStyle with the value "Normal".
func DefaultRunStyle ¶
func DefaultRunStyle() *CTString
DefaultRunStyle creates the default RunStyle with the value "Normal".
func NewCTString ¶
func NewParagraphStyle ¶
NewParagraphStyle creates a new ParagraphStyle.
func (CTString) MarshalXML ¶
MarshalXML implements the xml.Marshaler interface for the CTString type. It encodes the instance into XML using the "w:ELEMENT_NAME" element with a "w:val" attribute.
type Cell ¶
type Cell struct {
// 1.Table Cell Properties
Property *CellProperty
// 2.1 Choice: ZeroOrMore
// Any number of elements can exists within this choice group
Contents []TCBlockContent
}
func DefaultCell ¶
func DefaultCell() *Cell
func (Cell) MarshalXML ¶
func (*Cell) UnmarshalXML ¶
type CellBorders ¶
type CellBorders struct {
// 1. Table Cell Top Border
Top *Border `xml:"top,omitempty"`
// 2. Table Cell Left Border
Left *Border `xml:"left,omitempty"`
// 3. Table Cell Bottom Border
Bottom *Border `xml:"bottom,omitempty"`
// 4. Table Cell Right Border
Right *Border `xml:"right,omitempty"`
// 5. Table Cell Inside Horizontal Edges Border
InsideH *Border `xml:"insideH,omitempty"`
// 6. Table Cell Inside Vertical Edges Border
InsideV *Border `xml:"insideV,omitempty"`
// 7. Table Cell Top Left to Bottom Right Diagonal Border
TL2BR *Border `xml:"tl2br,omitempty"`
// 8. Table Cell Top Right to Bottom Left Diagonal Border
TR2BL *Border `xml:"tr2bl,omitempty"`
}
Table Cell Borders
func DefaultCellBorders ¶
func DefaultCellBorders() *CellBorders
func (CellBorders) MarshalXML ¶
func (t CellBorders) MarshalXML(e *xml.Encoder, start xml.StartElement) error
type CellMargins ¶
type CellMargins struct {
// 1. Table Cell Top Margin Default
Top *TableWidth `xml:"top,omitempty"`
// 2. Table Cell Left Margin Default
Left *TableWidth `xml:"left,omitempty"`
// 3. Table Cell Bottom Margin Default
Bottom *TableWidth `xml:"bottom,omitempty"`
// 4. Table Cell Right Margin Default
Right *TableWidth `xml:"right,omitempty"`
}
Table Cell Margin Defaults
func DefaultCellMargins ¶
func DefaultCellMargins() CellMargins
func (CellMargins) Margin ¶
func (tcm CellMargins) Margin(top, left, bottom, right int) CellMargins
func (CellMargins) MarginBottom ¶
func (tcm CellMargins) MarginBottom(v int, t stypes.TableWidth) CellMargins
func (CellMargins) MarginLeft ¶
func (tcm CellMargins) MarginLeft(v int, t stypes.TableWidth) CellMargins
func (CellMargins) MarginRight ¶
func (tcm CellMargins) MarginRight(v int, t stypes.TableWidth) CellMargins
func (CellMargins) MarginTop ¶
func (tcm CellMargins) MarginTop(v int, t stypes.TableWidth) CellMargins
func (CellMargins) MarshalXML ¶
func (tcm CellMargins) MarshalXML(e *xml.Encoder, start xml.StartElement) (err error)
type CellMerge ¶
type CellMerge struct {
ID int `xml:"id,attr"`
Author string `xml:"author,attr"`
Date *string `xml:"date,attr,omitempty"`
VMerge *AnnotationVMerge `xml:"vMerge,attr,omitempty"` //Revised Vertical Merge Setting
VMergeOrig *AnnotationVMerge `xml:"vMergeOrig,attr,omitempty"` //Vertical Merge Setting Removed by Revision
}
func (CellMerge) MarshalXML ¶
type CellProperty ¶
type CellProperty struct {
// 1. Table Cell Conditional Formatting
CnfStyle *CTString `xml:"cnfStyle,omitempty"`
// 2. Preferred Table Cell Width
Width *TableWidth `xml:"tcW,omitempty"`
// 3.Grid Columns Spanned by Current Table Cell
GridSpan *DecimalNum `xml:"gridSpan,omitempty"`
// 4.Horizontally Merged Cell
HMerge *GenOptStrVal[stypes.MergeCell] `xml:"hMerge,omitempty"`
// 5.Vertically Merged Cell
VMerge *GenOptStrVal[stypes.MergeCell] `xml:"vMerge,omitempty"`
// 6.Table Cell Borders
Borders *CellBorders `xml:"tcBorders,omitempty"`
//7.Table Cell Shading
Shading *Shading `xml:"shd,omitempty"`
//8.Don't Wrap Cell Content
NoWrap *OnOff `xml:"noWrap,omitempty"`
//9.Single Table Cell Margins
Margins *CellMargins `xml:"tcMar,omitempty"`
//10.Table Cell Text Flow Direction
TextDirection *GenSingleStrVal[stypes.TextDirection] `xml:"textDirection,omitempty"`
//11.Fit Text Within Cell
FitText *OnOff `xml:"tcFitText,omitempty"`
//12. Table Cell Vertical Alignment
VAlign *GenSingleStrVal[stypes.VerticalJc] `xml:"vAlign,omitempty"`
//13.Ignore End Of Cell Marker In Row Height Calculation
HideMark *OnOff `xml:"hideMark,omitempty"`
//Table Cell Insertion
CellInsertion *TrackChange `xml:"cellIns,omitempty"`
//Table Cell Deletion
CellDeletion *TrackChange `xml:"cellDel,omitempty"`
//Vertically Merged/Split Table Cells
CellMerge *CellMerge `xml:"cellMerge,omitempty"`
//15.Revision Information for Table Cell Properties
PrChange *TCPrChange `xml:"tcPrChange,omitempty"`
}
func (CellProperty) MarshalXML ¶
func (t CellProperty) MarshalXML(e *xml.Encoder, start xml.StartElement) (err error)
type CharacterSpacingValues ¶
type CharacterSpacingValues struct {
// Value
Val *GenSingleStrVal[stypes.CharacterSpacing] `xml:"val,attr,omitempty"`
}
CharacterSpacingValues represents character spacing control values
type Color ¶
type Color struct {
//Run Content Color
Val string `xml:"val,attr"`
//Run Content Theme Color
ThemeColor *stypes.ThemeColor `xml:"themeColor,attr,omitempty"`
//Run Content Theme Color Tint
ThemeTint *string `xml:"themeTint,attr,omitempty"`
//Run Content Theme Color Shade
ThemeShade *string `xml:"themeShade,attr,omitempty"`
}
Color represents the color of a text or element.
func (Color) MarshalXML ¶
MarshalXML implements the xml.Marshaler interface for the Color type.
func (*Color) UnmarshalXML ¶
type Column ¶
type Column struct {
Width *uint64 `xml:"w,attr,omitempty"` //Grid Column Width
}
Grid Column Definition
func (Column) MarshalXML ¶
type Comment ¶
type Comment struct {
// Comment ID
ID *DecimalNum `xml:"id,attr"`
// Comment Author
Author *CTString `xml:"author,attr,omitempty"`
// Comment Date
Date *CTString `xml:"date,attr,omitempty"`
// Annotation Identifier
Initials *CTString `xml:"initials,attr,omitempty"`
// Comment content - can contain paragraphs, tables, etc.
Children []CommentChild
}
Comment represents a comment (w:comment)
func (Comment) MarshalXML ¶
MarshalXML implements xml.Marshaler for Comment
func (*Comment) UnmarshalXML ¶
UnmarshalXML implements xml.Unmarshaler for Comment
type CommentChild ¶
type CommentChild struct {
Paragraph *Paragraph `xml:"p,omitempty"`
Table *Table `xml:"tbl,omitempty"`
}
CommentChild represents possible children of comment content
type CommentRangeEnd ¶
type CommentRangeEnd struct {
// Comment ID
ID *DecimalNum `xml:"id,attr"`
// Disable Column Spanning for Revision
DisplacedByCustomXml *stypes.DisplacedByCustomXml `xml:"displacedByCustomXml,attr,omitempty"`
}
CommentRangeEnd represents the end of a comment range (w:commentRangeEnd)
func (CommentRangeEnd) MarshalXML ¶
func (c CommentRangeEnd) MarshalXML(e *xml.Encoder, start xml.StartElement) error
MarshalXML implements xml.Marshaler for CommentRangeEnd
func (*CommentRangeEnd) UnmarshalXML ¶
func (c *CommentRangeEnd) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error
UnmarshalXML implements xml.Unmarshaler for CommentRangeEnd
type CommentRangeStart ¶
type CommentRangeStart struct {
// Comment ID
ID *DecimalNum `xml:"id,attr"`
// Disable Column Spanning for Revision
DisplacedByCustomXml *stypes.DisplacedByCustomXml `xml:"displacedByCustomXml,attr,omitempty"`
}
CommentRangeStart represents the start of a comment range (w:commentRangeStart)
func (CommentRangeStart) MarshalXML ¶
func (c CommentRangeStart) MarshalXML(e *xml.Encoder, start xml.StartElement) error
MarshalXML implements xml.Marshaler for CommentRangeStart
func (*CommentRangeStart) UnmarshalXML ¶
func (c *CommentRangeStart) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error
UnmarshalXML implements xml.Unmarshaler for CommentRangeStart
type CommentReference ¶
type CommentReference struct {
// Comment ID
ID *DecimalNum `xml:"id,attr"`
}
CommentReference represents a comment reference (w:commentReference)
func (CommentReference) MarshalXML ¶
func (c CommentReference) MarshalXML(e *xml.Encoder, start xml.StartElement) error
MarshalXML implements xml.Marshaler for CommentReference
func (*CommentReference) UnmarshalXML ¶
func (c *CommentReference) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error
UnmarshalXML implements xml.Unmarshaler for CommentReference
type Compat ¶
type Compat struct {
// Use Simplified Rules For Table Border Conflicts
UseSingleBorderforContiguousCells *OnOff `xml:"useSingleBorderforContiguousCells,omitempty"`
// Emulate Word 6.x/Word 95/Word 97 Text Wrapping Around Objects
WpJustification *OnOff `xml:"wpJustification,omitempty"`
// Do Not Create Custom Tab Stop for Hanging Indent
NoTabHangInd *OnOff `xml:"noTabHangInd,omitempty"`
// Do Not Add Leading Between Lines of Text
NoLeading *OnOff `xml:"noLeading,omitempty"`
// Do Not Add Space For Underlines
SpaceForUL *OnOff `xml:"spaceForUL,omitempty"`
// Balance SBCS Characters and DBCS Characters
NoColumnBalance *OnOff `xml:"noColumnBalance,omitempty"`
// Do Not Balance Text Columns within a Section
BalanceSingleByteDoubleByteWidth *OnOff `xml:"balanceSingleByteDoubleByteWidth,omitempty"`
// Do Not Snap to Grid in Table Cells with Objects
NoExtraLineSpacing *OnOff `xml:"noExtraLineSpacing,omitempty"`
// Do Not Allow Hanging Punctuation With Character Grid
DoNotLeaveBackslashAlone *OnOff `xml:"doNotLeaveBackslashAlone,omitempty"`
// Convert Backslash To Yen Sign When Entered
UlTrailSpace *OnOff `xml:"ulTrailSpace,omitempty"`
// Add Space for Underlines
DoNotExpandShiftReturn *OnOff `xml:"doNotExpandShiftReturn,omitempty"`
// Don't Justify Lines Ending in Soft Line Break
SpacingInWholePoints *OnOff `xml:"spacingInWholePoints,omitempty"`
// Line Wrap Trailing Spaces
LineWrapLikeWord6 *OnOff `xml:"lineWrapLikeWord6,omitempty"`
// Emulate Word 6.0 Line Wrapping for East Asian Text
PrintBodyTextBeforeHeader *OnOff `xml:"printBodyTextBeforeHeader,omitempty"`
// Print Colors as Black And White without Dithering
PrintColBlack *OnOff `xml:"printColBlack,omitempty"`
// Space Width Like WordPerfect 5.x
WpSpaceWidth *OnOff `xml:"wpSpaceWidth,omitempty"`
// Display Page/Column Breaks As Printed
ShowBreaksInFrames *OnOff `xml:"showBreaksInFrames,omitempty"`
// Increase Priority of Font Size During Font Substitution
SubFontBySize *OnOff `xml:"subFontBySize,omitempty"`
// Ignore Exact Line Height for Last Line on Page
SuppressBottomSpacing *OnOff `xml:"suppressBottomSpacing,omitempty"`
// Ignore Minimum and Exact Line Height for First Line on Page
SuppressTopSpacing *OnOff `xml:"suppressTopSpacing,omitempty"`
// Ignore Minimum Line Height for First Line on Page
SuppressSpacingAtTopOfPage *OnOff `xml:"suppressSpacingAtTopOfPage,omitempty"`
// Emulate WordPerfect 6.x Font Height Calculation
SuppressTopSpacingWP *OnOff `xml:"suppressTopSpacingWP,omitempty"`
// Emulate Word 5.x Line Spacing
SuppressSpBfAfterPgBrk *OnOff `xml:"suppressSpBfAfterPgBrk,omitempty"`
// Use Printer Metrics to Display Documents
SwapBordersFacingPages *OnOff `xml:"swapBordersFacingPages,omitempty"`
// Treat Backslash Quote Delimiter as Two Backslash Characters
ConvMailMergeEsc *OnOff `xml:"convMailMergeEsc,omitempty"`
// Truncate Font Height
TruncateFontHeightsLikeWP6 *OnOff `xml:"truncateFontHeightsLikeWP6,omitempty"`
// Emulate Word 6.x/Word 95/Word 97 Text Wrapping Around Objects
MwSmallCaps *OnOff `xml:"mwSmallCaps,omitempty"`
// Use ANSI Kerning Pairs from Fonts
UsePrinterMetrics *OnOff `xml:"usePrinterMetrics,omitempty"`
// Do Not Use HTML Paragraph Auto Spacing
DoNotSuppressParagraphBorders *OnOff `xml:"doNotSuppressParagraphBorders,omitempty"`
// Ignore Width of Last Tab Stop When Aligning Paragraph If It Is Not Left Aligned
WrapTrailSpaces *OnOff `xml:"wrapTrailSpaces,omitempty"`
// Do Not Use East Asian Break Rules
FootnoteLayoutLikeWW8 *OnOff `xml:"footnoteLayoutLikeWW8,omitempty"`
// Do Not Automatically Apply List Paragraph Style To Bulleted/Numbered Text
ShapeLayoutLikeWW8 *OnOff `xml:"shapeLayoutLikeWW8,omitempty"`
// Align Table Rows Independently
AlignTablesRowByRow *OnOff `xml:"alignTablesRowByRow,omitempty"`
// Ignore Hanging Indent When Creating Tab Stop After Numbering
ForgetLastTabAlignment *OnOff `xml:"forgetLastTabAlignment,omitempty"`
// Use Word 2002 Table Style Rules
DoNotUseHTMLParagraphAutoSpacing *OnOff `xml:"doNotUseHTMLParagraphAutoSpacing,omitempty"`
// Emulate Word 6.x/Word 95 Full-Width Character Spacing
LayoutRawTableWidth *OnOff `xml:"layoutRawTableWidth,omitempty"`
// Emulate Word 97 Text Wrapping Around Floating Objects
LayoutTableRowsApart *OnOff `xml:"layoutTableRowsApart,omitempty"`
// Allow Tables to AutoFit Into Page Margins
UseWord97LineBreakRules *OnOff `xml:"useWord97LineBreakRules,omitempty"`
// Emulate Microsoft Word Version
DoNotBreakWrappedTables *OnOff `xml:"doNotBreakWrappedTables,omitempty"`
// Don't Allow Rows to Break Across Pages in Tables
DoNotSnapToGridInCell *OnOff `xml:"doNotSnapToGridInCell,omitempty"`
// Select Field When First or Last Character is Selected
SelectFldWithFirstOrLastChar *OnOff `xml:"selectFldWithFirstOrLastChar,omitempty"`
// Use Legacy Ethiopic and Amharic Line Breaking Rules
ApplyBreakingRules *OnOff `xml:"applyBreakingRules,omitempty"`
// Do Not Allow Floating Tables To Break Across Pages
DoNotAllowInsOfMoveOfMoveIntoTextbox *OnOff `xml:"doNotAllowInsOfMoveOfMoveIntoTextbox,omitempty"`
// Use Word 2003 Kashida Justification Method
UseWord2002TableStyleRules *OnOff `xml:"useWord2002TableStyleRules,omitempty"`
// Grow AutoFit Tables Into Page Margins
GrowAutofit *OnOff `xml:"growAutofit,omitempty"`
// Don't Bypass East Asian/Complex Script Layout Code
UseFELayout *OnOff `xml:"useFELayout,omitempty"`
// Don't Automatically Apply List Paragraph Style To Bulleted/Numbered Text
UseNormalStyleForList *OnOff `xml:"useNormalStyleForList,omitempty"`
// Ignore Hanging Indent When Creating Tab Stop After Numbering
DoNotUseIndentAsNumberingTabStop *OnOff `xml:"doNotUseIndentAsNumberingTabStop,omitempty"`
// Use Alternate Set of East Asian Line Breaking Rules
UseAltKinsokuLineBreakRules *OnOff `xml:"useAltKinsokuLineBreakRules,omitempty"`
// Allow Contextual Spacing of Paragraphs in Tables
AllowSpaceOfSameStyleInTable *OnOff `xml:"allowSpaceOfSameStyleInTable,omitempty"`
// Do Not Ignore Floating Objects When Calculating Paragraph Indentation
DoNotSuppressIndentation *OnOff `xml:"doNotSuppressIndentation,omitempty"`
// Do Not AutoFit Tables To Fit Next To Wrapped Objects
DoNotAutofitConstrainedTables *OnOff `xml:"doNotAutofitConstrainedTables,omitempty"`
// Allow Table Columns To Exceed Preferred Widths of Constituent Cells
AutofitToFirstFixedWidthCell *OnOff `xml:"autofitToFirstFixedWidthCell,omitempty"`
// Underline Following Character Following Numbering
UnderlineTabInNumList *OnOff `xml:"underlineTabInNumList,omitempty"`
// Always Use Fixed Width for Hangul Characters
DisplayHangulFixedWidth *OnOff `xml:"displayHangulFixedWidth,omitempty"`
// Always Move Paragraph Mark to Page after a Page Break
SplitPgBreakAndParaMark *OnOff `xml:"splitPgBreakAndParaMark,omitempty"`
// Don't Vertically Align Cells Containing Floating Objects
DoNotVertAlignCellWithSp *OnOff `xml:"doNotVertAlignCellWithSp,omitempty"`
// Don't Break Table Rows Around Floating Tables
DoNotBreakConstrainedForcedTable *OnOff `xml:"doNotBreakConstrainedForcedTable,omitempty"`
// Ignore Vertical Alignment in Textboxes
DoNotVertAlignInTxbx *OnOff `xml:"doNotVertAlignInTxbx,omitempty"`
// Use ANSI Kerning Pairs from Fonts
UseAnsiKerningPairs *OnOff `xml:"useAnsiKerningPairs,omitempty"`
// Use Cached Paragraph Information for Column Balancing
CachedColBalance *OnOff `xml:"cachedColBalance,omitempty"`
}
Compat represents compatibility settings (w:compat)
func (Compat) MarshalXML ¶
MarshalXML implements xml.Marshaler for Compat
func (*Compat) UnmarshalXML ¶
UnmarshalXML implements xml.Unmarshaler for Compat
type DecimalNum ¶
type DecimalNum struct {
Val int `xml:"val,attr"`
}
func NewDecimalNum ¶
func NewDecimalNum(value int) *DecimalNum
func (DecimalNum) MarshalXML ¶
func (s DecimalNum) MarshalXML(e *xml.Encoder, start xml.StartElement) error
type DocDefault ¶
type DocDefault struct {
//1.Default Run Properties
RunProp *RunPropDefault `xml:"rPrDefault,omitempty"`
//2.Default Paragraph Properties
ParaProp *ParaPropDefault `xml:"pPrDefault,omitempty"`
}
Document Default Paragraph and Run Properties
func (*DocDefault) MarshalXML ¶
func (d *DocDefault) MarshalXML(e *xml.Encoder, start xml.StartElement) error
type DocGrid ¶
type DocGrid struct {
Type stypes.DocGridType `xml:"type,attr,omitempty"`
LinePitch *int `xml:"linePitch,attr,omitempty"`
CharSpace *int `xml:"charSpace,attr,omitempty"`
}
DocGrid represents the document grid settings.
func (DocGrid) MarshalXML ¶
MarshalXML implements the xml.Marshaler interface for the DocGrid type. It encodes the DocGrid to its corresponding XML representation.
type DocVar ¶
type DocVar struct {
// Document Variable Name
Name *CTString `xml:"name,attr,omitempty"`
// Document Variable Value
Val *CTString `xml:"val,attr,omitempty"`
}
DocVar represents document variable (w:docVar)
func (DocVar) MarshalXML ¶
MarshalXML implements xml.Marshaler for DocVar
func (*DocVar) UnmarshalXML ¶
UnmarshalXML implements xml.Unmarshaler for DocVar
type DocumentSettings ¶
type DocumentSettings struct {
// View Settings
View *View `xml:"view,omitempty"`
// Zoom Settings
Zoom *Zoom `xml:"zoom,omitempty"`
// Remove Personal Information from File Properties
RemovePersonalInfo *OnOff `xml:"removePersonalInfo,omitempty"`
// Remove Date and Time from Annotations
RemoveDateAndTime *OnOff `xml:"removeDateAndTime,omitempty"`
// Do Not Display Visual Boundary For Header/Footer or Between Pages and Text
DoNotDisplayPageBoundaries *OnOff `xml:"doNotDisplayPageBoundaries,omitempty"`
// Display Background Objects When Displaying Document
DisplayBackgroundShape *OnOff `xml:"displayBackgroundShape,omitempty"`
// Print PostScript Over Text
PrintPostScriptOverText *OnOff `xml:"printPostScriptOverText,omitempty"`
// Print Fractional Character Widths
PrintFractionalWidths *OnOff `xml:"printFractionalWidths,omitempty"`
// Only Print Form Field Content
PrintFormsData *OnOff `xml:"printFormsData,omitempty"`
// Embed TrueType Fonts
EmbedTrueTypeFonts *OnOff `xml:"embedTrueTypeFonts,omitempty"`
// Embed Common System Fonts
EmbedSystemFonts *OnOff `xml:"embedSystemFonts,omitempty"`
// Subset Fonts When Percent of Characters Used is Greater Than...
SaveSubsetFonts *OnOff `xml:"saveSubsetFonts,omitempty"`
// Save Form Data as Delimited Text File
SaveFormsData *OnOff `xml:"saveFormsData,omitempty"`
// Embed Linguistic Data
MirrorMargins *OnOff `xml:"mirrorMargins,omitempty"`
// Align Border and Edges With Page Border
AlignBorderAndEdges *OnOff `xml:"alignBorderAndEdges,omitempty"`
// Page Border Excludes Header
BordersDoNotSurroundHeader *OnOff `xml:"bordersDoNotSurroundHeader,omitempty"`
BordersDoNotSurroundFooter *OnOff `xml:"bordersDoNotSurroundFooter,omitempty"`
// Position Gutter At Top of Page
GutterAtTop *OnOff `xml:"gutterAtTop,omitempty"`
// Do Not Add Space For Underlines
HideSpellingErrors *OnOff `xml:"hideSpellingErrors,omitempty"`
// Do Not Display Grammar Errors
HideGrammaticalErrors *OnOff `xml:"hideGrammaticalErrors,omitempty"`
// Writing Style Language Settings
ActiveWritingStyle []ActiveWritingStyle `xml:"activeWritingStyle,omitempty"`
// Proof State
ProofState *ProofState `xml:"proofState,omitempty"`
// Forms Design Mode
FormsDesign *OnOff `xml:"formsDesign,omitempty"`
// Structured Document Tag Placeholder Text Should be Resaved
AttachedTemplate *CTString `xml:"attachedTemplate,omitempty"`
// Linked Style Type
LinkStyles *OnOff `xml:"linkStyles,omitempty"`
// Stylistic Set Version
StylePaneFormatFilter *CTString `xml:"stylePaneFormatFilter,omitempty"`
// Default Tab Stop
DefaultTabStop *DecimalNum `xml:"defaultTabStop,omitempty"`
// Automatically Hyphenate Document Contents When Displayed
AutoHyphenation *OnOff `xml:"autoHyphenation,omitempty"`
// Maximum Number of Consecutively Hyphenated Lines
ConsecutiveHyphenLimit *DecimalNum `xml:"consecutiveHyphenLimit,omitempty"`
// Hyphenation Zone
HyphenationZone *DecimalNum `xml:"hyphenationZone,omitempty"`
// Do Not Hyphenate Words In ALL CAPITAL LETTERS
DoNotHyphenateCaps *OnOff `xml:"doNotHyphenateCaps,omitempty"`
// Show E-Mail Message Header
ShowEnvelope *OnOff `xml:"showEnvelope,omitempty"`
// Summary Length
SummaryLength *DecimalNum `xml:"summaryLength,omitempty"`
// Divider Character Between Click and Type Text
ClickAndTypeStyle *CTString `xml:"clickAndTypeStyle,omitempty"`
// Default Table Style for Newly Inserted Tables
DefaultTableStyle *CTString `xml:"defaultTableStyle,omitempty"`
// Do Not Validate Custom XML Markup Against Schema
DoNotValidateAgainstSchema *OnOff `xml:"doNotValidateAgainstSchema,omitempty"`
// Save Invalid Custom XML Markup
SaveInvalidXML *OnOff `xml:"saveInvalidXML,omitempty"`
// Ignore Mixed Content When Validating Custom XML Markup
IgnoreMixedContent *OnOff `xml:"ignoreMixedContent,omitempty"`
// Allow Storing of Previous Save Locations
AlwaysShowPlaceholderText *OnOff `xml:"alwaysShowPlaceholderText,omitempty"`
// Do Not Mark Grammar Errors in this Document
DoNotDemarcateInvalidXML *OnOff `xml:"doNotDemarcateInvalidXML,omitempty"`
// Save XML Data Only
SaveXMLDataOnly *OnOff `xml:"saveXMLDataOnly,omitempty"`
// Use XSL Transform When Saving
UseXSLTWhenSaving *OnOff `xml:"useXSLTWhenSaving,omitempty"`
// Save Document as XML File through Custom XSL Transform
SaveThroughXSLT *SaveThroughXSLT `xml:"saveThroughXSLT,omitempty"`
// Do Not Show Custom XML Markup Start/End Locations
ShowXMLTags *OnOff `xml:"showXMLTags,omitempty"`
// Always Show Placeholder Text
AlwaysMergeEmptyNamespace *OnOff `xml:"alwaysMergeEmptyNamespace,omitempty"`
// Update Fields on Open
UpdateFields *OnOff `xml:"updateFields,omitempty"`
// Footnote and Endnote Numbering Settings
FootnoteDocumentWideProperties *FootnoteProperties `xml:"footnotePr,omitempty"`
EndnoteDocumentWideProperties *EndnoteProperties `xml:"endnotePr,omitempty"`
// Compatibility Settings
Compat *Compat `xml:"compat,omitempty"`
// Document Variables
DocVars []DocVar `xml:"docVar,omitempty"`
// Revision Identifiers for Parts of a Document
Rsids *Rsids `xml:"rsids,omitempty"`
// Math Properties
MathPr *MathPr `xml:"mathPr,omitempty"`
// Settings for Universal Input Method Editor
UICompat97To2003 *OnOff `xml:"uiCompat97To2003,omitempty"`
// Character Spacing Control Settings
CharacterSpacingControl *CharacterSpacingValues `xml:"characterSpacingControl,omitempty"`
// Do Not Automatically Compress Pictures
DoNotAutoCompressPictures *OnOff `xml:"doNotAutoCompressPictures,omitempty"`
}
DocumentSettings represents document settings (w:settings)
func (DocumentSettings) MarshalXML ¶
func (d DocumentSettings) MarshalXML(e *xml.Encoder, start xml.StartElement) error
MarshalXML implements xml.Marshaler for DocumentSettings
func (*DocumentSettings) UnmarshalXML ¶
func (d *DocumentSettings) UnmarshalXML(decoder *xml.Decoder, start xml.StartElement) error
UnmarshalXML implements xml.Unmarshaler for DocumentSettings
type EALayout ¶
type EALayout struct {
ID *int `xml:"id,attr,omitempty"`
Combine *stypes.OnOff `xml:"combine,attr,omitempty"`
CombineBrkts *stypes.CombineBrackets `xml:"combineBrackets,attr,omitempty"`
Vert *stypes.OnOff `xml:"vert,attr,omitempty"`
VertCompress *stypes.OnOff `xml:"vertCompress,attr,omitempty"`
}
East Asian Typography Settings
func (EALayout) MarshalXML ¶
type Effect ¶
type Effect struct {
Val *stypes.TextEffect `xml:"val,attr,omitempty"`
}
func (Effect) MarshalXML ¶
MarshalXML implements the xml.Marshaler interface for the Effect type. It encodes the instance into XML using the "w:XMLName" element with a "w:val" attribute.
type EndnoteProperties ¶
type EndnoteProperties struct {
// Endnote Positioning
Pos *GenSingleStrVal[stypes.FootnoteEndnoteType] `xml:"pos,omitempty"`
// Endnote Numbering Format
NumFmt *GenSingleStrVal[stypes.NumFmt] `xml:"numFmt,omitempty"`
// Footnote and Endnote Numbering Starting Value
NumStart *DecimalNum `xml:"numStart,omitempty"`
// Footnote and Endnote Numbering Restart Location
NumRestart *GenSingleStrVal[stypes.RestartNumber] `xml:"numRestart,omitempty"`
}
EndnoteProperties represents endnote properties (w:endnotePr)
type ExpaComp ¶
This element specifies the amount by which each character shall be expanded or when the character is rendered in the document
This property has an of stretching or compressing each character in the run, as opposed to the spacing element (§2.3.2.33) which expands/compresses the text by adding additional character pitch but not changing the width of the actual characters displayed on the line.
func (ExpaComp) MarshalXML ¶
MarshalXML implements the xml.Marshaler interface for the ExpaComp type. It encodes the instance into XML using the "w:XMLName" element with a "w:val" attribute.
type FFCheckBox ¶
type FFCheckBox struct {
// Checkbox Size Type
Size *DecimalNum `xml:"size,omitempty"`
// Checkbox Size Automatic
SizeAuto *OnOff `xml:"sizeAuto,omitempty"`
// Default Checkbox Form Field State
Default *OnOff `xml:"default,omitempty"`
// Checkbox Form Field State
Checked *OnOff `xml:"checked,omitempty"`
}
FFCheckBox represents checkbox form field properties (w:checkBox)
func (FFCheckBox) MarshalXML ¶
func (f FFCheckBox) MarshalXML(e *xml.Encoder, start xml.StartElement) error
MarshalXML implements xml.Marshaler for FFCheckBox
func (*FFCheckBox) UnmarshalXML ¶
func (f *FFCheckBox) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error
UnmarshalXML implements xml.Unmarshaler for FFCheckBox
type FFDDList ¶
type FFDDList struct {
// Drop-Down List Selection
Result *DecimalNum `xml:"result,omitempty"`
// Default Drop-Down List Selection
Default *DecimalNum `xml:"default,omitempty"`
// Drop-Down List Entries
ListEntries []FFListEntry `xml:"listEntry,omitempty"`
}
FFDDList represents drop-down list form field properties (w:ddList)
func (FFDDList) MarshalXML ¶
MarshalXML implements xml.Marshaler for FFDDList
func (*FFDDList) UnmarshalXML ¶
UnmarshalXML implements xml.Unmarshaler for FFDDList
type FFData ¶
type FFData struct {
// Form Field Name
Name *FFName `xml:"name,omitempty"`
// Form Field Status Text
StatusText *FFStatusText `xml:"statusText,omitempty"`
// Form Field Help Text
HelpText *FFHelpText `xml:"helpText,omitempty"`
// Form Field Properties
Enabled *OnOff `xml:"enabled,omitempty"`
// Calculate on Exit
CalcOnExit *OnOff `xml:"calcOnExit,omitempty"`
// Entry Macro
EntryMacro *FFMacro `xml:"entryMacro,omitempty"`
// Exit Macro
ExitMacro *FFMacro `xml:"exitMacro,omitempty"`
// Text Form Field Properties
TextInput *FFTextInput `xml:"textInput,omitempty"`
// Checkbox Form Field Properties
CheckBox *FFCheckBox `xml:"checkBox,omitempty"`
// Drop-Down List Form Field Properties
DDList *FFDDList `xml:"ddList,omitempty"`
}
FFData represents form field data (w:ffData)
func (FFData) MarshalXML ¶
MarshalXML implements xml.Marshaler for FFData
func (*FFData) UnmarshalXML ¶
UnmarshalXML implements xml.Unmarshaler for FFData
type FFHelpText ¶
type FFHelpText struct {
// Help Text Type
Type *GenSingleStrVal[stypes.InfoTextType] `xml:"type,attr,omitempty"`
// Help Text Value
Val *CTString `xml:"val,attr,omitempty"`
}
FFHelpText represents form field help text (w:helpText)
func (FFHelpText) MarshalXML ¶
func (f FFHelpText) MarshalXML(e *xml.Encoder, start xml.StartElement) error
MarshalXML implements xml.Marshaler for FFHelpText
func (*FFHelpText) UnmarshalXML ¶
func (f *FFHelpText) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error
UnmarshalXML implements xml.Unmarshaler for FFHelpText
type FFListEntry ¶
type FFListEntry struct {
// List Entry Value
Val *CTString `xml:"val,attr,omitempty"`
}
FFListEntry represents drop-down list entry (w:listEntry)
func (FFListEntry) MarshalXML ¶
func (f FFListEntry) MarshalXML(e *xml.Encoder, start xml.StartElement) error
MarshalXML implements xml.Marshaler for FFListEntry
func (*FFListEntry) UnmarshalXML ¶
func (f *FFListEntry) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error
UnmarshalXML implements xml.Unmarshaler for FFListEntry
type FFMacro ¶
type FFMacro struct {
// Macro Name
Val *CTString `xml:"val,attr,omitempty"`
}
FFMacro represents form field macro (w:entryMacro, w:exitMacro)
func (FFMacro) MarshalXML ¶
MarshalXML implements xml.Marshaler for FFMacro
func (*FFMacro) UnmarshalXML ¶
UnmarshalXML implements xml.Unmarshaler for FFMacro
type FFName ¶
type FFName struct {
// Form Field Name Value
Val *CTString `xml:"val,attr,omitempty"`
}
FFName represents form field name (w:name)
func (FFName) MarshalXML ¶
MarshalXML implements xml.Marshaler for FFName
func (*FFName) UnmarshalXML ¶
UnmarshalXML implements xml.Unmarshaler for FFName
type FFStatusText ¶
type FFStatusText struct {
// Status Text Type
Type *GenSingleStrVal[stypes.InfoTextType] `xml:"type,attr,omitempty"`
// Status Text Value
Val *CTString `xml:"val,attr,omitempty"`
}
FFStatusText represents form field status text (w:statusText)
func (FFStatusText) MarshalXML ¶
func (f FFStatusText) MarshalXML(e *xml.Encoder, start xml.StartElement) error
MarshalXML implements xml.Marshaler for FFStatusText
func (*FFStatusText) UnmarshalXML ¶
func (f *FFStatusText) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error
UnmarshalXML implements xml.Unmarshaler for FFStatusText
type FFTextInput ¶
type FFTextInput struct {
// Text Form Field Type
Type *GenSingleStrVal[stypes.TextFormFieldType] `xml:"type,omitempty"`
// Default Text Form Field String
Default *CTString `xml:"default,omitempty"`
// Text Form Field Maximum Length
MaxLength *DecimalNum `xml:"maxLength,omitempty"`
// Text Form Field Formatting
Format *CTString `xml:"format,omitempty"`
}
FFTextInput represents text form field properties (w:textInput)
func (FFTextInput) MarshalXML ¶
func (f FFTextInput) MarshalXML(e *xml.Encoder, start xml.StartElement) error
MarshalXML implements xml.Marshaler for FFTextInput
func (*FFTextInput) UnmarshalXML ¶
func (f *FFTextInput) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error
UnmarshalXML implements xml.Unmarshaler for FFTextInput
type FieldChar ¶
type FieldChar struct {
// Field Character Type
FldCharType *GenSingleStrVal[stypes.FldCharType] `xml:"fldCharType,attr"`
// Field Should Not Be Recalculated
Dirty *OnOff `xml:"dirty,attr,omitempty"`
// Field Result Invalidated
Lock *OnOff `xml:"lock,attr,omitempty"`
// Form Field Properties
FFData *FFData `xml:"ffData,omitempty"`
// Numbering Level Associated with Field
NumId *DecimalNum `xml:"numId,omitempty"`
}
FieldChar represents a field character (w:fldChar)
func (FieldChar) MarshalXML ¶
MarshalXML implements xml.Marshaler for FieldChar
func (*FieldChar) UnmarshalXML ¶
UnmarshalXML implements xml.Unmarshaler for FieldChar
type FieldCode ¶
type FieldCode struct {
// Preserve Whitespace
Space *stypes.Space `xml:"space,attr,omitempty"`
// Field instruction text
Text string `xml:",chardata"`
}
FieldCode represents field code (w:instrText)
func (FieldCode) MarshalXML ¶
MarshalXML implements xml.Marshaler for FieldCode
func (*FieldCode) UnmarshalXML ¶
UnmarshalXML implements xml.Unmarshaler for FieldCode
type FitText ¶
func (FitText) MarshalXML ¶
type FloatPos ¶
type FloatPos struct {
LeftFromText *uint64 `xml:"leftFromText,attr,omitempty"`
RightFromText *uint64 `xml:"rightFromText,attr,omitempty"`
TopFromText *uint64 `xml:"topFromText,attr,omitempty"`
BottomFromText *uint64 `xml:"bottomFromText,attr,omitempty"`
//Frame Horizontal Positioning Base
HAnchor *stypes.Anchor `xml:"hAnchor,attr,omitempty"`
//Frame Vertical Positioning Base
VAnchor *stypes.Anchor `xml:"vAnchor,attr,omitempty"`
//Relative Horizontal Alignment From Anchor
XAlign *stypes.XAlign `xml:"tblpXSpec,attr,omitempty"`
//Relative Vertical Alignment from Anchor
YAlign *stypes.YAlign `xml:"tblpYSpec,attr,omitempty"`
//Absolute Horizontal Distance From Anchor
AbsXDist *int `xml:"tblpX,attr,omitempty"`
// Absolute Vertical Distance From Anchor
AbsYDist *int `xml:"tblpY,attr,omitempty"`
}
func (FloatPos) MarshalXML ¶
type FontSize ¶
type FontSize struct {
Value uint64 `xml:"val,attr,omitempty"`
}
FontSize represents the font size of a text or element.
func NewFontSize ¶
NewFontSize creates a new FontSize with the specified font size value.
func (FontSize) MarshalXML ¶
type FontSizeCS ¶
type FontSizeCS struct {
Value uint64 `xml:"val,attr,omitempty"`
}
FontSizeCs represents the font size of a text or element.
func NewFontSizeCS ¶
func NewFontSizeCS(value uint64) *FontSizeCS
NewFontSizeCs creates a new FontSizeCs with the specified font size value.
func (FontSizeCS) MarshalXML ¶
func (s FontSizeCS) MarshalXML(e *xml.Encoder, start xml.StartElement) error
type FooterReference ¶
type FooterReference struct {
}
Footer Reference
func (FooterReference) MarshalXML ¶
func (h FooterReference) MarshalXML(e *xml.Encoder, start xml.StartElement) error
type FootnoteProperties ¶
type FootnoteProperties struct {
// Footnote Positioning
Pos *GenSingleStrVal[stypes.FootnoteEndnoteType] `xml:"pos,omitempty"`
// Footnote Numbering Format
NumFmt *GenSingleStrVal[stypes.NumFmt] `xml:"numFmt,omitempty"`
// Footnote and Endnote Numbering Starting Value
NumStart *DecimalNum `xml:"numStart,omitempty"`
// Footnote and Endnote Numbering Restart Location
NumRestart *GenSingleStrVal[stypes.RestartNumber] `xml:"numRestart,omitempty"`
}
FootnoteProperties represents footnote properties (w:footnotePr)
type FrameProp ¶
type FrameProp struct {
Width *int64 `xml:"w,attr,omitempty"`
Height *int64 `xml:"h,attr,omitempty"`
//Drop Cap Frame
DropCap *stypes.DropCap `xml:"dropCap,attr,omitempty"`
//Drop Cap Vertical Height in Lines
Lines *int `xml:"lines,attr,omitempty"`
//Frame Padding
VSpace *int64 `xml:"vSpace,attr,omitempty"`
HSpace *int64 `xml:"hSpace,attr,omitempty"`
//Text Wrapping Around Frame
Wrap *stypes.Wrap `xml:"wrap,attr,omitempty"`
//Frame Horizontal Positioning Base
HAnchor *stypes.Anchor `xml:"hAnchor,attr,omitempty"`
//Frame Vertical Positioning Base
VAnchor *stypes.Anchor `xml:"vAnchor,attr,omitempty"`
//Absolute Horizontal Position
AbsHPos *int `xml:"x,attr,omitempty"`
//Absolute Vertical Position
AbsVPos *int `xml:"y,attr,omitempty"`
//Relative Horizontal Position
XAlign *stypes.XAlign `xml:"xAlign,attr,omitempty"`
//Relative Vertical Position
YAlign *stypes.YAlign `xml:"yAlign,attr,omitempty"`
//Frame Height Type
HRule *stypes.HeightRule `xml:"hRule,attr,omitempty"`
//Lock Frame Anchor to Paragraph
AnchorLock *stypes.OnOff `xml:"anchorLock,attr,omitempty"`
}
func (FrameProp) MarshalXML ¶
type GenOptStrVal ¶
type GenOptStrVal[T ~string] struct { Val *T `xml:"val,attr"` }
Generic Element with Optional Single Val attribute
func NewGenOptStrVal ¶
func NewGenOptStrVal[T ~string](val T) *GenOptStrVal[T]
func (GenOptStrVal[T]) MarshalXML ¶
func (g GenOptStrVal[T]) MarshalXML(e *xml.Encoder, start xml.StartElement) error
type GenSingleStrVal ¶
type GenSingleStrVal[T ~string] struct { Val T `xml:"val,attr"` }
Generic Element with Single Val attribute
func NewGenSingleStrVal ¶
func NewGenSingleStrVal[T ~string](val T) *GenSingleStrVal[T]
func (GenSingleStrVal[T]) MarshalXML ¶
func (g GenSingleStrVal[T]) MarshalXML(e *xml.Encoder, start xml.StartElement) error
type Grid ¶
type Grid struct {
//1. Grid Column Definition
Col []Column `xml:"gridCol,omitempty"`
//2.Revision Information for Table Grid Column Definitions
GridChange *GridChange `xml:"tblGridChange,omitempty"`
}
Table Grid
func (Grid) MarshalXML ¶
type GridChange ¶
type GridChange struct {
ID int `xml:"id,attr,omitempty"` //Annotation Identifier
}
Revision Information for Table Grid Column Definitions
func (GridChange) MarshalXML ¶
func (g GridChange) MarshalXML(e *xml.Encoder, start xml.StartElement) error
type HeaderReference ¶
type HeaderReference struct {
Type stypes.HdrFtrType `xml:"type,attr"` //Header or Footer Type
ID string `xml:"id,attr"` //Relationship to Part
}
Header Reference
func (HeaderReference) MarshalXML ¶
func (h HeaderReference) MarshalXML(e *xml.Encoder, start xml.StartElement) error
type Hyperlink ¶
type Hyperlink struct {
XMLName xml.Name `xml:"http://schemas.openxmlformats.org/wordprocessingml/2006/main hyperlink,omitempty"`
ID string `xml:"http://schemas.openxmlformats.org/officeDocument/2006/relationships id,attr"`
Run *Run
Children []ParagraphChild
}
type Indent ¶
type Indent struct {
Left *int `xml:"left,attr,omitempty"` // Left Indentation
LeftChars *int `xml:"leftChars,attr,omitempty"` // Left Indentation in Character Units
Right *int `xml:"right,attr,omitempty"` // Right Indentation
RightChars *int `xml:"rightChars,attr,omitempty"` // Right Indentation in Character Units
Hanging *uint64 `xml:"hanging,attr,omitempty"` // Indentation Removed from First Line
HangingChars *int `xml:"hangingChars,attr,omitempty"` // Indentation Removed From First Line in Character Units
FirstLine *uint64 `xml:"firstLine,attr,omitempty"` // Additional First Line Indentation
FirstLineChars *int `xml:"firstLineChars,attr,omitempty"` // Additional First Line Indentation in Character Units
}
Indent represents the Paragraph Indentation structure.
func (Indent) MarshalXML ¶
MarshalXML implements the xml.Marshaler interface for Indent.
func (*Indent) UnmarshalXML ¶
type Lang ¶
type Lang struct {
Val *string `xml:"val,attr,omitempty"`
EastAsia *string `xml:"eastAsia,attr,omitempty"`
Bidi *string `xml:"bidi,attr,omitempty"`
}
Languages for Run Content
func (Lang) MarshalXML ¶
type LatentStyle ¶
type LatentStyle struct {
//Default Style Locking Setting
DefLockedState *stypes.OnOff `xml:"defLockedState,attr,omitempty"`
//Default User Interface Priority Setting
DefUIPriority *int `xml:"defUIPriority,attr,omitempty"`
//Default Semi-Hidden Setting
DefSemiHidden *stypes.OnOff `xml:"defSemiHidden,attr,omitempty"`
//Default Hidden Until Used Setting
DefUnhideWhenUsed *stypes.OnOff `xml:"defUnhideWhenUsed,attr,omitempty"`
//Default Primary Style Setting
DefQFormat *stypes.OnOff `xml:"defQFormat,attr,omitempty"`
//Latent Style Count
Count *int `xml:"count,attr,omitempty"`
LsdExceptions []LsdException `xml:",any"`
}
Latent Style Information
func (LatentStyle) MarshalXML ¶
func (l LatentStyle) MarshalXML(e *xml.Encoder, start xml.StartElement) error
type LsdException ¶
type LsdException struct {
Name string `xml:"name,attr"`
Locked *stypes.OnOff `xml:"locked,attr,omitempty"`
UIPriority *int `xml:"uiPriority,attr,omitempty"`
SemiHidden *stypes.OnOff `xml:"semiHidden,attr,omitempty"`
UnhideWhenUsed *stypes.OnOff `xml:"unhideWhenUsed,attr,omitempty"`
QFormat *stypes.OnOff `xml:"qFormat,attr,omitempty"`
}
Latent Style Exception
func (LsdException) MarshalXML ¶
func (l LsdException) MarshalXML(e *xml.Encoder, start xml.StartElement) error
type MathPr ¶
type MathPr struct {
// Math Font
MathFont *CTString `xml:"mathFont,omitempty"`
// Break Binary Operators
BrkBin *GenSingleStrVal[stypes.BreakBinaryOperatorType] `xml:"brkBin,omitempty"`
// Break Binary Subtraction
BrkBinSub *GenSingleStrVal[stypes.BreakBinarySubtractionType] `xml:"brkBinSub,omitempty"`
// Small Fraction
SmallFrac *OnOff `xml:"smallFrac,omitempty"`
// Display Math
DispDef *OnOff `xml:"dispDef,omitempty"`
// Left Margin
LMargin *DecimalNum `xml:"lMargin,omitempty"`
// Right Margin
RMargin *DecimalNum `xml:"rMargin,omitempty"`
// Default Justification
DefJc *GenSingleStrVal[stypes.JustificationType] `xml:"defJc,omitempty"`
// Pre-Equation Spacing
PreSpacing *DecimalNum `xml:"preSpacing,omitempty"`
// Post-Equation Spacing
PostSpacing *DecimalNum `xml:"postSpacing,omitempty"`
// Inter-Equation Spacing
InterSpacing *DecimalNum `xml:"interSpacing,omitempty"`
// Intra-Equation Spacing
IntraSpacing *DecimalNum `xml:"intraSpacing,omitempty"`
// Wrap Indent
WrapIndent *DecimalNum `xml:"wrapIndent,omitempty"`
// Wrap Right
WrapRight *OnOff `xml:"wrapRight,omitempty"`
// Integral Limit Locations
IntLim *GenSingleStrVal[stypes.LimitLocationType] `xml:"intLim,omitempty"`
// n-ary Limit Locations
NaryLim *GenSingleStrVal[stypes.LimitLocationType] `xml:"naryLim,omitempty"`
}
MathPr represents math properties (w:mathPr)
type NumProp ¶
type NumProp struct {
//Numbering Level Reference
ILvl *DecimalNum `xml:"ilvl,omitempty"`
//Numbering Definition Instance Reference
NumID *DecimalNum `xml:"numId,omitempty"`
//Previous Paragraph Numbering Properties
NumChange *TrackChangeNum `xml:"numberingChange,omitempty"`
//Inserted Numbering Properties
Ins *TrackChange `xml:"ins,omitempty"`
}
Numbering Definition Instance Reference
func NewNumberingProperty ¶
func NewNumberingProperty() *NumProp
NewNumberingProperty creates a new NumberingProperty instance.
func (NumProp) MarshalXML ¶
type OnOff ¶
Optional Bool Element: Helper element that only has one attribute which is optional
func OnOffFromBool ¶
func OnOffFromStr ¶
func (*OnOff) Disable ¶
func (n *OnOff) Disable()
Disable sets the value to false and valexists true
func (OnOff) MarshalXML ¶
MarshalXML implements the xml.Marshaler interface for the Bold type. It encodes the instance into XML using the "w:XMLName" element with a "w:val" attribute.
type PPrChange ¶
type PPrChange struct {
ID int `xml:"id,attr"`
Author string `xml:"author,attr"`
Date *string `xml:"date,attr,omitempty"`
ParaProp *ParagraphProp `xml:"pPr"`
}
Revision Information for Paragraph Properties
func (PPrChange) MarshalXML ¶
type PTab ¶
type PTab struct {
Alignment stypes.PTabAlignment `xml:"alignment,attr,omitempty"`
RelativeTo stypes.PTabRelativeTo `xml:"relativeTo,attr,omitempty"`
Leader stypes.PTabLeader `xml:"leader,attr,omitempty"`
}
func (PTab) MarshalXML ¶
type PageMargin ¶
type PageMargin struct {
Left *int `xml:"left,attr,omitempty"`
Right *int `xml:"right,attr,omitempty"`
Gutter *int `xml:"gutter,attr,omitempty"`
Header *int `xml:"header,attr,omitempty"`
Top *int `xml:"top,attr,omitempty"`
Bottom *int `xml:"bottom,attr,omitempty"`
}
PageMargin represents the page margins of a Word document.
func (PageMargin) MarshalXML ¶
func (p PageMargin) MarshalXML(e *xml.Encoder, start xml.StartElement) error
MarshalXML implements the xml.Marshaler interface for the PageMargin type. It encodes the PageMargin to its corresponding XML representation.
type PageNumbering ¶
PageNumbering represents the page numbering format in a Word document.
func (PageNumbering) MarshalXML ¶
func (p PageNumbering) MarshalXML(e *xml.Encoder, start xml.StartElement) error
MarshalXML implements the xml.Marshaler interface for the PageNumbering type. It encodes the PageNumbering to its corresponding XML representation.
type PageSize ¶
type PageSize struct {
Width *uint64 `xml:"w,attr,omitempty"`
Height *uint64 `xml:"h,attr,omitempty"`
Orient stypes.PageOrient `xml:"orient,attr,omitempty"`
Code *int `xml:"code,attr,omitempty"`
}
Page Size : w:pgSz
func (PageSize) MarshalXML ¶
type ParaBorder ¶
type ParaBorder struct {
Top *Border `xml:"top,omitempty"`
Left *Border `xml:"left,omitempty"`
Right *Border `xml:"right,omitempty"`
Bottom *Border `xml:"bottom,omitempty"`
Between *Border `xml:"between,omitempty"`
Bar *Border `xml:"bar,omitempty"`
}
func (ParaBorder) MarshalXML ¶
func (p ParaBorder) MarshalXML(e *xml.Encoder, start xml.StartElement) error
type ParaPropDefault ¶
type ParaPropDefault struct {
ParaProp *ParagraphProp `xml:"pPr,omitempty"`
}
func (*ParaPropDefault) MarshalXML ¶
func (p *ParaPropDefault) MarshalXML(e *xml.Encoder, start xml.StartElement) error
type Paragraph ¶
type Paragraph struct {
// Attributes
RsidRPr *stypes.LongHexNum // Revision Identifier for Paragraph Glyph Formatting
RsidR *stypes.LongHexNum // Revision Identifier for Paragraph
RsidDel *stypes.LongHexNum // Revision Identifier for Paragraph Deletion
RsidP *stypes.LongHexNum // Revision Identifier for Paragraph Properties
RsidRDefault *stypes.LongHexNum // Default Revision Identifier for Runs
// 1. Paragraph Properties
Property *ParagraphProp
// 2. Choices (Slice of Child elements)
Children []ParagraphChild
// contains filtered or unexported fields
}
func AddParagraph ¶
func (Paragraph) MarshalXML ¶
func (*Paragraph) UnmarshalXML ¶
type ParagraphChild ¶
type ParagraphChild struct {
Link *Hyperlink // w:hyperlink
Run *Run // w:r
Sdt *StructuredDocumentTag // w:sdt - Content Control
}
type ParagraphProp ¶
type ParagraphProp struct {
// 1. This element specifies the style ID of the paragraph style which shall be used to format the contents of this paragraph.
Style *CTString `xml:"pStyle,omitempty"`
// 2. Keep Paragraph With Next Paragraph
KeepNext *OnOff `xml:"keepNext,omitempty"`
// 3. Keep All Lines On One Page
KeepLines *OnOff `xml:"keepLines,omitempty"`
// 4. Start Paragraph on Next Page
PageBreakBefore *OnOff `xml:"pageBreakBefore,omitempty"`
// 5. Text Frame Properties
FrameProp *FrameProp `xml:"framePr,omitempty"`
// 6. Allow First/Last Line to Display on a Separate Page
WindowControl *OnOff `xml:"widowControl,omitempty"`
// 7. Numbering Definition Instance Reference
NumProp *NumProp `xml:"numPr,omitempty"`
// 8. Suppress Line Numbers for Paragraph
SuppressLineNmbrs *OnOff `xml:"suppressLineNumbers,omitempty"`
// 9. Paragraph Borders
Border *ParaBorder `xml:"pBdr,omitempty"`
// 10. This element specifies the shading applied to the contents of the paragraph.
Shading *Shading `xml:"shd,omitempty"`
// 11. Set of Custom Tab Stops
Tabs Tabs `xml:"tabs,omitempty"`
// 12. Suppress Hyphenation for Paragraph
SuppressAutoHyphens *OnOff `xml:"suppressAutoHyphens,omitempty"`
// 13. Use East Asian Typography Rules for First and Last Character per Line
Kinsoku *OnOff `xml:"kinsoku,omitempty"`
// 14. Allow Line Breaking At Character Level
WordWrap *OnOff `xml:"wordWrap,omitempty"`
// 15. Allow Punctuation to Extent Past Text Extents
OverflowPunct *OnOff `xml:"overflowPunct,omitempty"`
// 16. Compress Punctuation at Start of a Line
TopLinePunct *OnOff `xml:"topLinePunct,omitempty"`
// 17. Automatically Adjust Spacing of Latin and East Asian Text
AutoSpaceDE *OnOff `xml:"autoSpaceDE,omitempty"`
// 18. Automatically Adjust Spacing of East Asian Text and Numbers
AutoSpaceDN *OnOff `xml:"autoSpaceDN,omitempty"`
// 19. Right to Left Paragraph Layout
Bidi *OnOff `xml:"bidi,omitempty"`
// 20. Automatically Adjust Right Indent When Using Document Grid
AdjustRightInd *OnOff `xml:"adjustRightInd,omitempty"`
// 21. Use Document Grid Settings for Inter-Line Paragraph Spacing
SnapToGrid *OnOff `xml:"snapToGrid,omitempty"`
// 22. Spacing Between Lines and Above/Below Paragraph
Spacing *Spacing `xml:"spacing,omitempty"`
// 23. Paragraph Indentation
Indent *Indent `xml:"ind,omitempty"`
// 24. Ignore Spacing Above and Below When Using Identical Styles
CtxlSpacing *OnOff `xml:"contextualSpacing,omitempty"`
// 25. Use Left/Right Indents as Inside/Outside Indents
MirrorIndents *OnOff `xml:"mirrorIndents,omitempty"`
// 26. Prevent Text Frames From Overlapping
SuppressOverlap *OnOff `xml:"suppressOverlap,omitempty"`
// 27. Paragraph Alignment
Justification *GenSingleStrVal[stypes.Justification] `xml:"jc,omitempty"`
// 28. Paragraph Text Flow Direction
TextDirection *GenSingleStrVal[stypes.TextDirection] `xml:"textDirection,omitempty"`
// 29. Vertical Character Alignment on Line
TextAlignment *GenSingleStrVal[stypes.TextAlign] `xml:"textAlignment,omitempty"`
// 30.Allow Surrounding Paragraphs to Tight Wrap to Text Box Contents
TextboxTightWrap *GenSingleStrVal[stypes.TextboxTightWrap] `xml:"textboxTightWrap,omitempty"`
// 31. Associated Outline Level
OutlineLvl *DecimalNum `xml:"outlineLvl,omitempty"`
// 32. Associated HTML div ID
DivID *DecimalNum `xml:"divId,omitempty"`
// 33. Paragraph Conditional Formatting
CnfStyle *CTString `xml:"cnfStyle,omitempty"`
// 34. Run Properties for the Paragraph Mark
RunProperty *RunProperty `xml:"rPr,omitempty"`
// 35. Section Properties
SectPr *SectionProp `xml:"sectPr,omitempty"`
// 36. Revision Information for Paragraph Properties
PPrChange *PPrChange `xml:"pPrChange,omitempty"`
}
Numbering Level Associated Paragraph Properties
func DefaultParaProperty ¶
func DefaultParaProperty() *ParagraphProp
func (ParagraphProp) MarshalXML ¶
func (pp ParagraphProp) MarshalXML(e *xml.Encoder, start xml.StartElement) (err error)
type ProofState ¶
type ProofState struct {
// Spell Checking State
Spelling *GenSingleStrVal[stypes.ProofingState] `xml:"spelling,attr,omitempty"`
// Grammatical Checking State
Grammar *GenSingleStrVal[stypes.ProofingState] `xml:"grammar,attr,omitempty"`
}
ProofState represents proof state settings (w:proofState)
type PropException ¶
type PropException struct {
}
func (PropException) MarshalXML ¶
func (p PropException) MarshalXML(e *xml.Encoder, start xml.StartElement) error
type RngMarkupElem ¶
type RngMarkupElem struct {
}
Range Markup elements
func (RngMarkupElem) MarshalXML ¶
func (r RngMarkupElem) MarshalXML(e *xml.Encoder, start xml.StartElement) error
type Row ¶
type Row struct {
// 1. Table-Level Property Exceptions
PropException *PropException
// 2.Table Row Properties
Property *RowProperty
// 3.1 Choice
Contents []TRCellContent
}
func DefaultRow ¶
func DefaultRow() *Row
func (Row) MarshalXML ¶
func (*Row) UnmarshalXML ¶
type RowContent ¶
type RowContent struct {
Row *Row `xml:"tr,omitempty"`
}
func (RowContent) MarshalXML ¶
func (r RowContent) MarshalXML(e *xml.Encoder, start xml.StartElement) error
type RowProperty ¶
type RowProperty struct {
//Table Row Conditional Formatting
Cnf *CTString
// Associated HTML div ID
DivId *DecimalNum
//Grid Columns Before First Cell
GridBefore *DecimalNum
//Grid Columns After Last Cell
GridAfter *DecimalNum
//Preferred Width Before Table Row
WidthBefore *TableWidth
//Preferred Width After Table Row
WidthAfter *TableWidth
//Table Row Cannot Break Across Pages
CantSplit *OnOff
//Table Row Height
Height *TableRowHeight
//Repeat Table Row on Every New Page
Header *OnOff
//Table Row Cell Spacing
CellSpacing *TableWidth
// Table Row Alignment
JC *GenSingleStrVal[stypes.Justification]
//Hidden Table Row Marker
Hidden *OnOff
//2.Inserted Table Row
Ins *TrackChange
//3. Deleted Table Row
Del *TrackChange
//4.Revision Information for Table Row Properties
Change *TRPrChange
}
Table Row Properties
func DefaultRowProperty ¶
func DefaultRowProperty() *RowProperty
NewRowProperty creates a new RowProperty instance.
func (*RowProperty) MarshalChoice ¶
func (r *RowProperty) MarshalChoice(e *xml.Encoder, start xml.StartElement) error
func (*RowProperty) MarshalXML ¶
func (r *RowProperty) MarshalXML(e *xml.Encoder, start xml.StartElement) error
func (*RowProperty) UnmarshalXML ¶
func (r *RowProperty) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error
type Rsids ¶
type Rsids struct {
// Original Document Revision Save ID
RsidRoot *stypes.LongHexNum `xml:"rsidRoot,omitempty"`
// Revision Save ID Values
Rsid []stypes.LongHexNum `xml:"rsid,omitempty"`
}
Rsids represents revision save IDs (w:rsids)
type Run ¶
type Run struct {
// Attributes
RsidRPr *stypes.LongHexNum // Revision Identifier for Run Properties
RsidR *stypes.LongHexNum // Revision Identifier for Run
RsidDel *stypes.LongHexNum // Revision Identifier for Run Deletion
//1. Run Properties
Property *RunProperty
// 2. Choice - Run Inner content
Children []RunChild
}
A Run is part of a paragraph that has its own style. It could be
func (Run) MarshalXML ¶
func (*Run) UnmarshalXML ¶
type RunChild ¶
type RunChild struct {
//specifies that a break shall be placed at the current location in the run content
Break *Break `xml:"br,omitempty"`
//specifies that this run contains literal text which shall be displayed in the document
Text *Text `xml:"t,omitempty"`
//specifies that this run contains literal text which shall be displayed in the document
DelText *Text `xml:"delText,omitempty"`
//Field Code
InstrText *Text `xml:"instrText,omitempty"`
//Deleted Field Code
DelInstrText *Text `xml:"delInstrText,omitempty"`
//Non Breaking Hyphen Character
NoBreakHyphen *Empty `xml:"noBreakHyphen,omitempty"`
//Non Breaking Hyphen Character
SoftHyphen *Empty `xml:"softHyphen,omitempty"`
//Date Block - Short Day Format
DayShort *Empty `xml:"dayShort,omitempty"`
//Date Block - Short Month Format
MonthShort *Empty `xml:"monthShort,omitempty"`
//Date Block - Short Year Format
YearShort *Empty `xml:"yearShort,omitempty"`
//Date Block - Long Day Format
DayLong *Empty `xml:"dayLong,omitempty"`
//Date Block - Long Month Format
MonthLong *Empty `xml:"monthLong,omitempty"`
//Date Block - Long Year Format
YearLong *Empty `xml:"yearLong,omitempty"`
//Comment Information Block
AnnotationRef *Empty `xml:"annotationRef,omitempty"`
//Footnote Reference Mark
FootnoteRef *Empty `xml:"footnoteRef,omitempty"`
//Endnote Reference Mark
EndnoteRef *Empty `xml:"endnoteRef,omitempty"`
//Footnote/Endnote Separator Mark
Separator *Empty `xml:"separator,omitempty"`
//Continuation Separator Mark
ContSeparator *Empty `xml:"continuationSeparator,omitempty"`
//Symbol Character
Sym *Sym `xml:"sym,omitempty"`
//Page Number Block
PgNumBlock *Empty `xml:"pgNum,omitempty"`
//Carriage Return
CarrRtn *Empty `xml:"cr,omitempty"`
//Tab Character
Tab *Empty `xml:"tab,omitempty"`
//Complex Field Character
FldChar *FieldChar `xml:"fldChar,omitempty"`
//Comment Content Reference Mark
CmntRef *Markup `xml:"commentReference,omitempty"`
//DrawingML Object
Drawing *dml.Drawing `xml:"drawing,omitempty"`
//Absolute Position Tab Character
PTab *PTab `xml:"ptab,omitempty"`
//Position of Last Calculated Page Break
LastRenPgBrk *Empty `xml:"lastRenderedPageBreak,omitempty"`
}
type RunFonts ¶
type RunFonts struct {
Hint stypes.FontTypeHint `xml:"hint,attr,omitempty"`
Ascii string `xml:"ascii,attr,omitempty"`
HAnsi string `xml:"hAnsi,attr,omitempty"`
EastAsia string `xml:"eastAsia,attr,omitempty"`
CS string `xml:"cs,attr,omitempty"`
AsciiTheme stypes.ThemeFont `xml:"asciiTheme,attr,omitempty"`
HAnsiTheme stypes.ThemeFont `xml:"hAnsiTheme,attr,omitempty"`
EastAsiaTheme stypes.ThemeFont `xml:"eastAsiaTheme,attr,omitempty"`
CSTheme stypes.ThemeFont `xml:"cstheme,attr,omitempty"`
}
Run Fonts
func (RunFonts) MarshalXML ¶
type RunPropDefault ¶
type RunPropDefault struct {
RunProp *RunProperty `xml:"rPr,omitempty"`
}
func (*RunPropDefault) MarshalXML ¶
func (r *RunPropDefault) MarshalXML(e *xml.Encoder, start xml.StartElement) error
type RunProperty ¶
type RunProperty struct {
//1. Referenced Character Style
Style *CTString `xml:"rStyle,omitempty"`
//2. Run Fonts
Fonts *RunFonts `xml:"rFonts,omitempty"`
//3. Bold
Bold *OnOff `xml:"b,omitempty"`
//4.Complex Script Bold
BoldCS *OnOff `xml:"bCs,omitempty"`
// 5.Italics
Italic *OnOff `xml:"i,omitempty"`
//6.Complex Script Italics
ItalicCS *OnOff `xml:"iCs,omitempty"`
//7.Display All Characters As Capital Letters
Caps *OnOff `xml:"caps,omitempty"`
//8.Small Caps
SmallCaps *OnOff `xml:"smallCaps,omitempty"`
//9.Single Strikethrough
Strike *OnOff `xml:"strike,omitempty"`
//10.Double Strikethrough
DoubleStrike *OnOff `xml:"dstrike,omitempty"`
//11.Display Character Outline
Outline *OnOff `xml:"outline,omitempty"`
//12.Shadow
Shadow *OnOff `xml:"shadow,omitempty"`
//13.Embossing
Emboss *OnOff `xml:"emboss,omitempty"`
//14.Imprinting
Imprint *OnOff `xml:"imprint,omitempty"`
//15.Do Not Check Spelling or Grammar
NoGrammar *OnOff `xml:"noProof,omitempty"`
//16.Use Document Grid Settings For Inter-Character Spacing
SnapToGrid *OnOff `xml:"snapToGrid,omitempty"`
//17.Hidden Text
Vanish *OnOff `xml:"vanish,omitempty"`
//18.Web Hidden Text
WebHidden *OnOff `xml:"webHidden,omitempty"`
//19.Run Content Color
Color *Color `xml:"color,omitempty"`
//20. Character Spacing Adjustment
Spacing *DecimalNum `xml:"spacing,omitempty"`
//21.Expanded/Compressed Text
ExpaComp *ExpaComp `xml:"w,omitempty"`
//22.Font Kerning
Kern *Uint64Elem `xml:"kern,omitempty"`
//23. Vertically Raised or Lowered Text
Position *DecimalNum `xml:"position,omitempty"`
//24.Font Size
Size *FontSize `xml:"sz,omitempty"`
//25.Complex Script Font Size
SizeCs *FontSizeCS `xml:"szCs,omitempty"`
//26.Text Highlighting
Highlight *CTString `xml:"highlight,omitempty"`
//27.Underline
Underline *GenSingleStrVal[stypes.Underline] `xml:"u,omitempty"`
//28.Animated Text Effect
Effect *Effect `xml:"effect,omitempty"`
//29.Text Border
Border *Border `xml:"bdr,omitempty"`
//30.Run Shading
Shading *Shading `xml:"shd,omitempty"`
//31.Manual Run Width
FitText *FitText `xml:"fitText,omitempty"`
//32.Subscript/Superscript Text
VertAlign *GenSingleStrVal[stypes.VerticalAlignRun] `xml:"vertAlign,omitempty"`
//33.Right To Left Text
RightToLeft *OnOff `xml:"rtl,omitempty"`
//34.Use Complex Script Formatting on Run
CSFormat *OnOff `xml:"cs,omitempty"`
//35.Emphasis Mark
Em *GenSingleStrVal[stypes.Em] `xml:"em,omitempty"`
//36.Languages for Run Content
Lang *Lang `xml:"lang,omitempty"`
//37.East Asian Typography Settings
EALayout *EALayout `xml:"eastAsianLayout,omitempty"`
//38.Paragraph Mark Is Always Hidden
SpecVanish *OnOff `xml:"specVanish,omitempty"`
//39.Office Open XML Math
OMath *OnOff `xml:"oMath,omitempty"`
}
RunProperty represents the properties of a run of text within a paragraph.
func NewRunProperty ¶
func NewRunProperty() RunProperty
NewRunProperty creates a new RunProperty with default values.
func (RunProperty) MarshalXML ¶
func (rp RunProperty) MarshalXML(e *xml.Encoder, start xml.StartElement) error
MarshalXML marshals RunProperty to XML.
type SaveThroughXSLT ¶
type SaveThroughXSLT struct {
// XSL Transform Location
ID *CTString `xml:"id,attr,omitempty"`
// Local Identifier for XSL Transform
SolutionID *CTString `xml:"solutionID,attr,omitempty"`
}
SaveThroughXSLT represents save through XSLT settings (w:saveThroughXSLT)
type SdtCheckbox ¶
type SdtCheckbox struct {
// Checked State
Checked *GenSingleStrVal[stypes.OnOff] `xml:"checked,omitempty"`
// Checked Symbol
CheckedState *SdtCheckboxSymbol `xml:"checkedState,omitempty"`
// Unchecked Symbol
UncheckedState *SdtCheckboxSymbol `xml:"uncheckedState,omitempty"`
}
SdtCheckbox represents checkbox content control
func (SdtCheckbox) MarshalXML ¶
func (checkbox SdtCheckbox) MarshalXML(e *xml.Encoder, start xml.StartElement) error
MarshalXML implements xml.Marshaler for SdtCheckbox
func (*SdtCheckbox) UnmarshalXML ¶
func (checkbox *SdtCheckbox) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error
UnmarshalXML implements xml.Unmarshaler for SdtCheckbox
type SdtCheckboxSymbol ¶
type SdtCheckboxSymbol struct {
// Font
Font *CTString `xml:"font,attr,omitempty"`
// Character Code
Val *stypes.HexChar `xml:"val,attr,omitempty"`
}
SdtCheckboxSymbol represents checkbox symbol
func (SdtCheckboxSymbol) MarshalXML ¶
func (symbol SdtCheckboxSymbol) MarshalXML(e *xml.Encoder, start xml.StartElement) error
MarshalXML implements xml.Marshaler for SdtCheckboxSymbol
func (*SdtCheckboxSymbol) UnmarshalXML ¶
func (symbol *SdtCheckboxSymbol) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error
UnmarshalXML implements xml.Unmarshaler for SdtCheckboxSymbol
type SdtComboBox ¶
type SdtComboBox struct {
// Last Saved Value
LastValue *CTString `xml:"lastValue,attr,omitempty"`
// Combo Box List Items
ListItems []SdtListItem `xml:"listItem,omitempty"`
}
SdtComboBox represents combo box content control
func (SdtComboBox) MarshalXML ¶
func (combo SdtComboBox) MarshalXML(e *xml.Encoder, start xml.StartElement) error
MarshalXML implements xml.Marshaler for SdtComboBox
func (*SdtComboBox) UnmarshalXML ¶
func (combo *SdtComboBox) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error
UnmarshalXML implements xml.Unmarshaler for SdtComboBox
type SdtContent ¶
type SdtContent struct {
// Can contain paragraphs, runs, tables, etc.
Children []SdtContentChild
}
SdtContent represents structured document tag content (w:sdtContent)
func (SdtContent) MarshalXML ¶
func (content SdtContent) MarshalXML(e *xml.Encoder, start xml.StartElement) error
MarshalXML implements xml.Marshaler for SdtContent
func (*SdtContent) UnmarshalXML ¶
func (content *SdtContent) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error
UnmarshalXML implements xml.Unmarshaler for SdtContent
type SdtContentChild ¶
type SdtContentChild struct {
Paragraph *Paragraph `xml:"p,omitempty"`
Run *Run `xml:"r,omitempty"`
Table *Table `xml:"tbl,omitempty"`
}
SdtContentChild represents possible children of structured document tag content
type SdtDate ¶
type SdtDate struct {
// Full Date
FullDate *CTString `xml:"fullDate,attr,omitempty"`
// Date Format
DateFormat *CTString `xml:"dateFormat,omitempty"`
// Language ID
Lid *CTString `xml:"lid,omitempty"`
// Storage Format
StorageFormat *CTString `xml:"storageFormat,omitempty"`
// Calendar Type
Calendar *GenSingleStrVal[stypes.CalendarType] `xml:"calendar,omitempty"`
}
SdtDate represents date picker content control
func (SdtDate) MarshalXML ¶
MarshalXML implements xml.Marshaler for SdtDate
func (*SdtDate) UnmarshalXML ¶
UnmarshalXML implements xml.Unmarshaler for SdtDate
type SdtDropDownList ¶
type SdtDropDownList struct {
// Last Saved Value
LastValue *CTString `xml:"lastValue,attr,omitempty"`
// Drop-Down List Items
ListItems []SdtListItem `xml:"listItem,omitempty"`
}
SdtDropDownList represents drop-down list content control
func (SdtDropDownList) MarshalXML ¶
func (dropdown SdtDropDownList) MarshalXML(e *xml.Encoder, start xml.StartElement) error
MarshalXML implements xml.Marshaler for SdtDropDownList
func (*SdtDropDownList) UnmarshalXML ¶
func (dropdown *SdtDropDownList) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error
UnmarshalXML implements xml.Unmarshaler for SdtDropDownList
type SdtListItem ¶
type SdtListItem struct {
// Display Text
DisplayText string `xml:"displayText,attr"`
// Value
Value string `xml:"value,attr"`
}
SdtListItem represents a list item in combo box or drop-down list
func (SdtListItem) MarshalXML ¶
func (item SdtListItem) MarshalXML(e *xml.Encoder, start xml.StartElement) error
MarshalXML implements xml.Marshaler for SdtListItem
func (*SdtListItem) UnmarshalXML ¶
func (item *SdtListItem) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error
UnmarshalXML implements xml.Unmarshaler for SdtListItem
type SdtProperties ¶
type SdtProperties struct {
// Friendly Name
Alias *CTString `xml:"alias,omitempty"`
// Tag
Tag *CTString `xml:"tag,omitempty"`
// Unique ID
ID *DecimalNum `xml:"id,omitempty"`
// Lock Setting
Lock *GenSingleStrVal[stypes.SdtLock] `xml:"lock,omitempty"`
// Placeholder Document Part Reference
Placeholder *CTString `xml:"placeholder,omitempty"`
// Temporary
Temporary *OnOff `xml:"temporary,omitempty"`
// Content control type-specific properties
Text *SdtText `xml:"text,omitempty"`
RichText *Empty `xml:"richText,omitempty"`
Picture *Empty `xml:"picture,omitempty"`
ComboBox *SdtComboBox `xml:"comboBox,omitempty"`
DropDownList *SdtDropDownList `xml:"dropDownList,omitempty"`
Date *SdtDate `xml:"date,omitempty"`
Checkbox *SdtCheckbox `xml:"checkbox,omitempty"`
Group *Empty `xml:"group,omitempty"`
Citation *Empty `xml:"citation,omitempty"`
}
SdtProperties represents structured document tag properties (w:sdtPr)
func (SdtProperties) MarshalXML ¶
func (props SdtProperties) MarshalXML(e *xml.Encoder, start xml.StartElement) error
MarshalXML implements xml.Marshaler for SdtProperties
func (*SdtProperties) UnmarshalXML ¶
func (props *SdtProperties) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error
UnmarshalXML implements xml.Unmarshaler for SdtProperties
type SdtText ¶
type SdtText struct {
// Multi-line
MultiLine *OnOff `xml:"multiLine,omitempty"`
}
SdtText represents text content control properties
func (SdtText) MarshalXML ¶
MarshalXML implements xml.Marshaler for SdtText
func (*SdtText) UnmarshalXML ¶
UnmarshalXML implements xml.Unmarshaler for SdtText
type SectionProp ¶
type SectionProp struct {
HeaderReference *HeaderReference `xml:"headerReference,omitempty"`
PageSize *PageSize `xml:"pgSz,omitempty"`
Type *GenSingleStrVal[stypes.SectionMark] `xml:"type,omitempty"`
PageMargin *PageMargin `xml:"pgMar,omitempty"`
PageNum *PageNumbering `xml:"pgNumType,omitempty"`
FormProt *GenSingleStrVal[stypes.OnOff] `xml:"formProt,omitempty"`
TitlePg *GenSingleStrVal[stypes.OnOff] `xml:"titlePg,omitempty"`
TextDir *GenSingleStrVal[stypes.TextDirection] `xml:"textDirection,omitempty"`
DocGrid *DocGrid `xml:"docGrid,omitempty"`
}
Document Final Section Properties : w:sectPr
func NewSectionProper ¶
func NewSectionProper() *SectionProp
func (SectionProp) MarshalXML ¶
func (s SectionProp) MarshalXML(e *xml.Encoder, start xml.StartElement) error
type Shading ¶
type Shading struct {
Val stypes.Shading `xml:"val,attr"`
Color *string `xml:"color,attr,omitempty"`
ThemeColor *stypes.ThemeColor `xml:"themeColor,attr,omitempty"`
ThemeFill *stypes.ThemeColor `xml:"themeFill,attr,omitempty"`
ThemeTint *string `xml:"themeTint,attr,omitempty"`
ThemeShade *string `xml:"themeShade,attr,omitempty"`
Fill *string `xml:"fill,attr,omitempty"`
ThemeFillTint *string `xml:"themeFillTint,attr,omitempty"`
ThemeFillShade *string `xml:"themeFillShade,attr,omitempty"`
}
Shading represents the shading properties for a run in a WordprocessingML document.
func DefaultShading ¶
func DefaultShading() *Shading
DefaultShading creates a new Shading with default values.
func (Shading) MarshalXML ¶
type Spacing ¶
type Spacing struct {
//Spacing Above Paragraph
Before *uint64 `xml:"before,attr,omitempty"`
//Spacing Above Paragraph IN Line Units
BeforeLines *int `xml:"beforeLines,attr,omitempty"`
//Spacing Below Paragraph
After *uint64 `xml:"after,attr,omitempty"`
// Automatically Determine Spacing Above Paragraph
BeforeAutospacing *stypes.OnOff `xml:"beforeAutospacing,attr,omitempty"`
// Automatically Determine Spacing Below Paragraph
AfterAutospacing *stypes.OnOff `xml:"afterAutospacing,attr,omitempty"`
//Spacing Between Lines in Paragraph
Line *int `xml:"line,omitempty"`
//Type of Spacing Between Lines
LineRule *stypes.LineSpacingRule `xml:"lineRule,attr,omitempty"`
}
Spacing Between Lines and Above/Below Paragraph
func NewParagraphSpacing ¶
func (Spacing) MarshalXML ¶
func (*Spacing) UnmarshalXML ¶
type StructuredDocumentTag ¶
type StructuredDocumentTag struct {
// Structured Document Tag Properties
Properties *SdtProperties `xml:"sdtPr,omitempty"`
// Structured Document Tag Content
Content *SdtContent `xml:"sdtContent,omitempty"`
}
StructuredDocumentTag represents a content control (w:sdt)
func (StructuredDocumentTag) MarshalXML ¶
func (sdt StructuredDocumentTag) MarshalXML(e *xml.Encoder, start xml.StartElement) error
MarshalXML implements xml.Marshaler for StructuredDocumentTag
func (*StructuredDocumentTag) UnmarshalXML ¶
func (sdt *StructuredDocumentTag) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error
UnmarshalXML implements xml.Unmarshaler for StructuredDocumentTag
type Style ¶
type Style struct {
//1. Primary Style Name
Name *CTString `xml:"name,omitempty"`
//2. Alternate Style Names
Alias *CTString `xml:"alias,omitempty"`
//3. Parent Style ID
BasedOn *CTString `xml:"basedOn,omitempty"`
//4. Style For Next Paragraph
Next *CTString `xml:"next,omitempty"`
//5. Linked Style Reference
Link *CTString `xml:"link,omitempty"`
//6.Automatically Merge User Formatting Into Style Definition
AutoRedefine *OnOff `xml:"autoRedefine,omitempty"`
//7.Hide Style From User Interface
Hidden *OnOff `xml:"hidden,omitempty"`
//8.Optional User Interface Sorting Order
UIPriority *DecimalNum `xml:"uiPriority,omitempty"`
// 9. Hide Style From Main User Interface
SemiHidden *OnOff `xml:"semiHidden,omitempty"`
// 10. Remove Semi-Hidden Property When Style Is Used
UnhideWhenUsed *OnOff `xml:"unhideWhenUsed,omitempty"`
// 11. Primary Style
QFormat *OnOff `xml:"qFormat,omitempty"`
// 12. Style Cannot Be Applied
Locked *OnOff `xml:"locked,omitempty"`
// 13. E-Mail Message Text Style
Personal *OnOff `xml:"personal,omitempty"`
// 14. E-Mail Message Composition Style
PersonalCompose *OnOff `xml:"personalCompose,omitempty"`
// 15. E-Mail Message Reply Style
PersonalReply *OnOff `xml:"personalReply,omitempty"`
//16. Revision Identifier for Style Definition
RevID *GenSingleStrVal[stypes.LongHexNum] `xml:"rsid,omitempty"`
//17. Style Paragraph Properties
ParaProp *ParagraphProp `xml:"pPr,omitempty"`
//18. Run Properties
RunProp *RunProperty `xml:"rPr,omitempty"`
//19. Style Table Properties
TableProp *TableProp `xml:"tblPr,omitempty"`
//20. Style Table Row Properties
TableRowProp *RowProperty `xml:"trPr,omitempty"`
//21. Style Table Cell Properties
TableCellProp *CellProperty `xml:"tcPr,omitempty"`
//22.Style Conditional Table Formatting Properties
TableStylePr []TableStyleProp `xml:",any"`
//Style Type
Type *stypes.StyleType `xml:"type,attr,omitempty"`
//Style ID
ID *string `xml:"styleId,attr,omitempty"`
//Default Style
Default *stypes.OnOff `xml:"default,attr,omitempty"`
//User-Defined Style
CustomStyle *stypes.OnOff `xml:"customStyle,attr,omitempty"`
}
func (*Style) MarshalXML ¶
type Styles ¶
type Styles struct {
RelativePath string `xml:"-"`
Attr []xml.Attr
//1. Document Default Paragraph and Run Properties
DocDefaults *DocDefault `xml:"docDefaults,omitempty"`
//2. Latent Style Information
LatentStyle *LatentStyle `xml:"latentStyles,omitempty"`
//3. Style Definition
StyleList []Style `xml:",any"`
}
Style Definitions
func (*Styles) MarshalXML ¶
func (*Styles) UnmarshalXML ¶
type Sym ¶
type Sym struct {
Font *string `xml:"font,attr,omitempty"`
Char *string `xml:"char,attr,omitempty"`
}
Sym represents a symbol character in a document.
func (Sym) MarshalXML ¶
type TCBlockContent ¶
type TCBlockContent struct {
//Paragraph
// - ZeroOrMore: Any number of times Paragraph can repeat within cell
Paragraph *Paragraph
//Table
// - ZeroOrMore: Any number of times Table can repeat within cell
Table *Table
}
Table Cell - ContentBlockContent
func (TCBlockContent) MarshalXML ¶
func (t TCBlockContent) MarshalXML(e *xml.Encoder, start xml.StartElement) error
type TCPrChange ¶
type TCPrChange struct {
ID int `xml:"id,attr"`
Author string `xml:"author,attr"`
Date *string `xml:"date,attr,omitempty"`
Prop CellProperty `xml:"tcPr"`
}
func (TCPrChange) MarshalXML ¶
func (t TCPrChange) MarshalXML(e *xml.Encoder, start xml.StartElement) error
type TRCellContent ¶
type TRCellContent struct {
Cell *Cell `xml:"tc,omitempty"`
}
func (TRCellContent) MarshalXML ¶
func (c TRCellContent) MarshalXML(e *xml.Encoder, start xml.StartElement) error
type TRPrChange ¶
type TRPrChange struct {
ID int `xml:"id,attr"`
Author string `xml:"author,attr"`
Date *string `xml:"date,attr,omitempty"`
Prop RowProperty `xml:"tcPr"`
}
func (TRPrChange) MarshalXML ¶
func (t TRPrChange) MarshalXML(e *xml.Encoder, start xml.StartElement) error
type Tab ¶
type Tab struct {
// Tab Stop Type
Val stypes.CustTabStop `xml:"val,attr,omitempty"`
//Tab Stop Position
Position int `xml:"pos,attr,omitempty"`
//Custom Tab Stop Leader Character
LeaderChar *stypes.CustLeadChar `xml:"leader,attr,omitempty"`
}
Custom Tab Stop
func (Tab) MarshalXML ¶
type Table ¶
type Table struct {
//1.Choice: RangeMarkupElements
RngMarkupElems []RngMarkupElem
//2. Table Properties
TableProp TableProp `xml:"tblPr,omitempty"`
//3. Table Grid
Grid Grid `xml:"tblGrid,omitempty"`
//4.1 Choice:
RowContents []RowContent
}
Table
func DefaultTable ¶
func DefaultTable() *Table
func (Table) MarshalXML ¶
func (*Table) UnmarshalXML ¶
type TableBorders ¶
type TableBorders struct {
// 1. Table Top Border
Top *Border `xml:"top,omitempty"`
// 2. Table Left Border
Left *Border `xml:"left,omitempty"`
// 3. Table Bottom Border
Bottom *Border `xml:"bottom,omitempty"`
// 4. Table Right Border
Right *Border `xml:"right,omitempty"`
// 5. Table Inside Horizontal Edges Border
InsideH *Border `xml:"insideH,omitempty"`
// 6. Table Inside Vertical Edges Border
InsideV *Border `xml:"insideV,omitempty"`
}
func DefaultTableBorders ¶
func DefaultTableBorders() *TableBorders
func (TableBorders) MarshalXML ¶
func (t TableBorders) MarshalXML(e *xml.Encoder, start xml.StartElement) error
type TableLayout ¶
type TableLayout struct {
LayoutType *stypes.TableLayout `xml:"type,attr,omitempty"`
}
TableLayout represents the layout of a table in a document.
func DefaultTableLayout ¶
func DefaultTableLayout() *TableLayout
func NewTableLayout ¶
func NewTableLayout(t stypes.TableLayout) *TableLayout
NewTableLayout creates a new TableLayout instance.
func (TableLayout) MarshalXML ¶
func (t TableLayout) MarshalXML(e *xml.Encoder, start xml.StartElement) error
MarshalXML implements the xml.Marshaler interface for TableLayout.
type TableProp ¶
type TableProp struct {
// 1. Referenced Table Style
// TableStyle represents the style of a table in a document.
// This is applicable when creating a new document. When using this style in a new document, you need to ensure
// that the specified style ID exists in your document's style base or is manually created through the library.
//
// Some examples of predefined style IDs that can be used for table styles:
//
// - "LightShading"
// - "LightShading-Accent1"
// - "LightShading-Accent2"
// - "LightShading-Accent3"
// - "LightShading-Accent4"
// - "LightShading-Accent5"
// - "LightShading-Accent6"
// - "LightList"
// - "LightList-Accent1"..."LightList-Accent6"
// - "LightGrid"
// - "LightGrid-Accent1"..."LightGrid-Accent6"
// - "MediumShading"
// - "MediumShading-Accent1"..."MediumShading-Accent6"
// - "MediumShading2"
// - "MediumShading2-Accent1"..."MediumShading2-Accent6"
// - "MediumList1"
// - "MediumList1-Accent1"..."MediumList1-Accent6"
// - "MediumList2"
// - "MediumList2-Accent1"..."MediumList2-Accent6"
// - "TableGrid"
// - "MediumGrid1"
// - "MediumGrid1-Accent1"..."MediumGrid1-Accent6"
// - "MediumGrid2"
// - "MediumGrid2-Accent1"..."MediumGrid2-Accent6"
// - "MediumGrid3"
// - "MediumGrid3-Accent1"..."MediumGrid3-Accent6"
// - "DarkList"
// - "DarkList-Accent1"..."DarkList-Accent6"
// - "ColorfulShading"
// - "ColorfulShading-Accent1"..."ColorfulShading-Accent6"
// - "ColorfulList"
// - "ColorfulList-Accent1"..."ColorfulList-Accent6"
// - "ColorfulGrid"
// - "ColorfulGrid-Accent1"..."ColorfulGrid-Accent6"
Style *CTString `xml:"tblStyle,omitempty"`
// 2. Floating Table Positioning
FloatPos *FloatPos `xml:"tblpPr,omitempty"`
// 3.Floating Table Allows Other Tables to Overlap
Overlap *GenSingleStrVal[stypes.TblOverlap] `xml:"tblOverlap,omitempty"`
// 4. Visually Right to Left Table
BidiVisual *OnOff `xml:"bidiVisual,omitempty"`
// 5. Number of Rows in Row Band
RowCountInRowBand *DecimalNum `xml:"tblStyleRowBandSize,omitempty"`
// 6. Number of Columns in Column Band
RowCountInColBand *DecimalNum `xml:"tblStyleColBandSize,omitempty"`
// 7. Preferred Table Width
Width *TableWidth `xml:"tblW,omitempty"`
// 8.Table Alignment
Justification *GenSingleStrVal[stypes.Justification] `xml:"jc,omitempty"`
// 9.Table Cell Spacing Default
CellSpacing *TableWidth `xml:"blCellSpacing,omitempty"`
// 10. Table Indent from Leading Margin
Indent *TableWidth `xml:"tblInd,omitempty"`
// 11. Table Indent from Leading Margin
Borders *TableBorders `xml:"tblBorders,omitempty"`
// 12. Table Shading
Shading *Shading `xml:"shd,omitempty"`
// 13. Table Layout
Layout *TableLayout `xml:"tblLayout,omitempty"`
// 14. Table Cell Margin Defaults
CellMargin *CellMargins `xml:"tblCellMar,omitempty"`
// 15. Table Style Conditional Formatting Settings
TableLook *CTString `xml:"tblLook,omitempty"`
//16. Revision Information for Table Properties
PrChange *TblPrChange `xml:"tblPrChange,omitempty"`
}
This element specifies the set of table-wide properties applied to the current table. These properties affect the appearance of all rows and cells within the parent table, but may be overridden by individual table-level exception, row, and cell level properties as defined by each TableProp.
func DefaultTableProp ¶
func DefaultTableProp() *TableProp
func (TableProp) MarshalXML ¶
type TableRowHeight ¶
type TableRowHeight struct {
Val *int `xml:"val,attr,omitempty"`
HRule *stypes.HeightRule `xml:"hRule,attr,omitempty"`
}
TableRowHeight represents the height of a table row in a document.
func NewTableRowHeight ¶
func NewTableRowHeight(val int, hRule stypes.HeightRule) *TableRowHeight
NewTableRowHeight creates a new TableRowHeight instance.
func (TableRowHeight) MarshalXML ¶
func (h TableRowHeight) MarshalXML(e *xml.Encoder, start xml.StartElement) error
MarshalXML marshals TableRowHeight to XML.
func (*TableRowHeight) UnmarshalXML ¶
func (h *TableRowHeight) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error
UnmarshalXML unmarshals XML into TableRowHeight.
type TableStyleProp ¶
type TableStyleProp struct {
//1.Table Style Conditional Formatting Paragraph Properties
ParaProp *ParagraphProp `xml:"pPr,omitempty"`
//2.Table Style Conditional Formatting Run Properties
RunProp *RunProperty `xml:"rPr,omitempty"`
//3.Table Style Conditional Formatting Table Properties
TableProp *TableProp `xml:"tblPr,omitempty"`
//4.Table Style Conditional Formatting Table Row Properties
RowProp *RowProperty `xml:"trPr,omitempty"`
//5.Table Style Conditional Formatting Table Cell Properties
CellProp *CellProperty `xml:"tcPr,omitempty"`
//Table Style Conditional Formatting Type
Type stypes.TblStyleOverrideType `xml:"type,attr"`
}
Style Conditional Table Formatting Properties
func (*TableStyleProp) MarshalXML ¶
func (t *TableStyleProp) MarshalXML(e *xml.Encoder, start xml.StartElement) error
type TableWidth ¶
type TableWidth struct {
Width *int `xml:"w,attr,omitempty"`
WidthType *stypes.TableWidth `xml:"type,attr,omitempty"`
}
TableWidth represents the width of a table in a document.
func NewTableWidth ¶
func NewTableWidth(width int, widthType stypes.TableWidth) *TableWidth
func (TableWidth) MarshalXML ¶
func (t TableWidth) MarshalXML(e *xml.Encoder, start xml.StartElement) (err error)
type TblPrChange ¶
type TblPrChange struct {
ID int `xml:"id,attr"`
Author string `xml:"author,attr"`
Date *string `xml:"date,attr,omitempty"`
Prop TableProp `xml:"tblPr"`
}
func (TblPrChange) MarshalXML ¶
func (t TblPrChange) MarshalXML(e *xml.Encoder, start xml.StartElement) error
type TrackChange ¶
type TrackChange struct {
ID int `xml:"id,attr"`
Author string `xml:"author,attr"`
Date *string `xml:"date,attr,omitempty"`
}
TrackChange represents the complex type for track change
func (TrackChange) MarshalXML ¶
func (t TrackChange) MarshalXML(e *xml.Encoder, start xml.StartElement) error
type TrackChangeNum ¶
type TrackChangeNum struct {
ID int `xml:"id,attr"`
Author string `xml:"author,attr"`
Date *string `xml:"date,attr,omitempty"`
Original *string `xml:"original,attr,omitempty"`
}
TrackChangeNum represents the complex type for track change numbering
func (TrackChangeNum) MarshalXML ¶
func (t TrackChangeNum) MarshalXML(e *xml.Encoder, start xml.StartElement) error
type Uint64Elem ¶
type Uint64Elem struct {
Val uint64 `xml:"val,attr"`
}
Uint64Elem - Gomplex type that contains single val attribute which is type of uint64 can be used where w:ST_UnsignedDecimalNumber is applicable example: ST_HpsMeasure
func NewUint64Elem ¶
func NewUint64Elem(value uint64) *Uint64Elem
func (Uint64Elem) MarshalXML ¶
func (s Uint64Elem) MarshalXML(e *xml.Encoder, start xml.StartElement) error
MarshalXML implements the xml.Marshaler interface for the Uint64Elem type. It encodes the instance into XML using the "w:ELEMENT_NAME" element with a "w:val" attribute.
type View ¶
type View struct {
// Document View Setting
Val *GenSingleStrVal[stypes.ViewType] `xml:"val,attr,omitempty"`
}
View represents view settings (w:view)
func (View) MarshalXML ¶
MarshalXML implements xml.Marshaler for View
func (*View) UnmarshalXML ¶
UnmarshalXML implements xml.Unmarshaler for View
type Zoom ¶
type Zoom struct {
// Zoom Type
Val *GenSingleStrVal[stypes.ZoomType] `xml:"val,attr,omitempty"`
// Zoom Percentage
Percent *CTString `xml:"percent,attr,omitempty"`
}
Zoom represents zoom settings (w:zoom)
func (Zoom) MarshalXML ¶
MarshalXML implements xml.Marshaler for Zoom
func (*Zoom) UnmarshalXML ¶
UnmarshalXML implements xml.Unmarshaler for Zoom
Source Files
¶
- bookmark.go
- border.go
- br.go
- cell.go
- cellBorder.go
- cellMar.go
- cellMerge.go
- cellProp.go
- col.go
- color.go
- comment.go
- common.go
- doc.go
- docDefaults.go
- docGrid.go
- document_settings.go
- eALayout.go
- effect.go
- expaComp.go
- field.go
- fitText.go
- fontSize.go
- footer.go
- framePr.go
- grid.go
- gridChg.go
- header.go
- indent.go
- lang.go
- latentStyle.go
- lsdException.go
- numPr.go
- onoff.go
- pBdr.go
- pPr.go
- pageMargin.go
- pageNum.go
- pageSize.go
- pagesize_default.go
- para.go
- rFonts.go
- rngMkElems.go
- row.go
- rowProp.go
- run.go
- runprop.go
- runstyle.go
- sdt.go
- sectionProp.go
- shd.go
- spacing.go
- style.go
- tab.go
- table.go
- tblBorders.go
- tblHeight.go
- tblLayout.go
- tblPr.go
- tblPrEx.go
- tblStylePr.go
- tblWidth.go
- tblpPr.go
- text.go
- trackChange.go
- trkchgnum.go
- unit.go