mirror of
https://github.com/fumiama/go-docx.git
synced 2026-06-05 15:50:24 +08:00
优化完善 table canvas
This commit is contained in:
@@ -1,3 +1,23 @@
|
||||
/*
|
||||
Copyright (c) 2020 gingfrederik
|
||||
Copyright (c) 2021 Gonzalo Fernandez-Victorio
|
||||
Copyright (c) 2021 Basement Crowd Ltd (https://www.basementcrowd.com)
|
||||
Copyright (c) 2023 Fumiama Minamoto (源文雨)
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published
|
||||
by the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package docx
|
||||
|
||||
import "encoding/xml"
|
||||
@@ -27,6 +47,12 @@ type Size struct {
|
||||
Val string `xml:"w:val,attr"`
|
||||
}
|
||||
|
||||
// SizeCs contains the cs font size
|
||||
type SizeCs struct {
|
||||
XMLName xml.Name `xml:"w:szCs,omitempty"`
|
||||
Val string `xml:"w:val,attr"`
|
||||
}
|
||||
|
||||
// Bold ...
|
||||
type Bold struct {
|
||||
XMLName xml.Name `xml:"w:b,omitempty"`
|
||||
@@ -52,7 +78,7 @@ type Highlight struct {
|
||||
// Kern ...
|
||||
type Kern struct {
|
||||
XMLName xml.Name `xml:"w:kern,omitempty"`
|
||||
Val int64 `xml:"w:val,attr,omitempty"`
|
||||
Val int64 `xml:"w:val,attr"`
|
||||
}
|
||||
|
||||
// Justification contains the way of the horizonal alignment
|
||||
@@ -68,6 +94,18 @@ type Justification struct {
|
||||
Val string `xml:"w:val,attr"`
|
||||
}
|
||||
|
||||
// TextAlignment ...
|
||||
type TextAlignment struct {
|
||||
XMLName xml.Name `xml:"w:textAlignment,omitempty"`
|
||||
Val string `xml:"w:val,attr"`
|
||||
}
|
||||
|
||||
// VertAlign ...
|
||||
type VertAlign struct {
|
||||
XMLName xml.Name `xml:"w:vertAlign,omitempty"`
|
||||
Val string `xml:"w:val,attr"`
|
||||
}
|
||||
|
||||
// Shade is an element that represents a shading pattern applied to a document element.
|
||||
type Shade struct {
|
||||
XMLName xml.Name `xml:"w:shd,omitempty"`
|
||||
@@ -100,3 +138,27 @@ func (s *Shade) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
|
||||
_, err := d.Token()
|
||||
return err
|
||||
}
|
||||
|
||||
// AdjustRightInd ...
|
||||
type AdjustRightInd struct {
|
||||
XMLName xml.Name `xml:"w:adjustRightInd,omitempty"`
|
||||
Val int `xml:"w:val,attr"`
|
||||
}
|
||||
|
||||
// SnapToGrid ...
|
||||
type SnapToGrid struct {
|
||||
XMLName xml.Name `xml:"w:snapToGrid,omitempty"`
|
||||
Val int `xml:"w:val,attr"`
|
||||
}
|
||||
|
||||
// Kinsoku ...
|
||||
type Kinsoku struct {
|
||||
XMLName xml.Name `xml:"w:kinsoku,omitempty"`
|
||||
Val int `xml:"w:val,attr"`
|
||||
}
|
||||
|
||||
// OverflowPunct ...
|
||||
type OverflowPunct struct {
|
||||
XMLName xml.Name `xml:"w:overflowPunct,omitempty"`
|
||||
Val int `xml:"w:val,attr"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user