summaryrefslogtreecommitdiff
path: root/xmlApp.go
diff options
context:
space:
mode:
authorxuri <xuri.me@gmail.com>2021-12-26 14:55:53 +0800
committerxuri <xuri.me@gmail.com>2021-12-26 14:55:53 +0800
commit6b1e592cbc7b1412da5f6d0badeaf1083117c762 (patch)
tree4fc4eeb3700c487ae041a4c74171d25006e12b7a /xmlApp.go
parent089cd365a33c1cb0b50af2f4e766a05468cb8277 (diff)
This closes #1095, support to set and get document application properties
Diffstat (limited to 'xmlApp.go')
-rw-r--r--xmlApp.go58
1 files changed, 35 insertions, 23 deletions
diff --git a/xmlApp.go b/xmlApp.go
index fdb6008..3226406 100644
--- a/xmlApp.go
+++ b/xmlApp.go
@@ -13,38 +13,50 @@ package excelize
import "encoding/xml"
+// AppProperties directly maps the document application properties.
+type AppProperties struct {
+ Application string
+ ScaleCrop bool
+ DocSecurity int
+ Company string
+ LinksUpToDate bool
+ HyperlinksChanged bool
+ AppVersion string
+}
+
// xlsxProperties specifies to an OOXML document properties such as the
// template used, the number of pages and words, and the application name and
// version.
type xlsxProperties struct {
XMLName xml.Name `xml:"http://schemas.openxmlformats.org/officeDocument/2006/extended-properties Properties"`
- Template string
- Manager string
- Company string
- Pages int
- Words int
- Characters int
- PresentationFormat string
- Lines int
- Paragraphs int
- Slides int
- Notes int
- TotalTime int
- HiddenSlides int
- MMClips int
- ScaleCrop bool
+ Vt string `xml:"xmlns:vt,attr"`
+ Template string `xml:",omitempty"`
+ Manager string `xml:",omitempty"`
+ Company string `xml:",omitempty"`
+ Pages int `xml:",omitempty"`
+ Words int `xml:",omitempty"`
+ Characters int `xml:",omitempty"`
+ PresentationFormat string `xml:",omitempty"`
+ Lines int `xml:",omitempty"`
+ Paragraphs int `xml:",omitempty"`
+ Slides int `xml:",omitempty"`
+ Notes int `xml:",omitempty"`
+ TotalTime int `xml:",omitempty"`
+ HiddenSlides int `xml:",omitempty"`
+ MMClips int `xml:",omitempty"`
+ ScaleCrop bool `xml:",omitempty"`
HeadingPairs *xlsxVectorVariant
TitlesOfParts *xlsxVectorLpstr
- LinksUpToDate bool
- CharactersWithSpaces int
- SharedDoc bool
- HyperlinkBase string
+ LinksUpToDate bool `xml:",omitempty"`
+ CharactersWithSpaces int `xml:",omitempty"`
+ SharedDoc bool `xml:",omitempty"`
+ HyperlinkBase string `xml:",omitempty"`
HLinks *xlsxVectorVariant
- HyperlinksChanged bool
+ HyperlinksChanged bool `xml:",omitempty"`
DigSig *xlsxDigSig
- Application string
- AppVersion string
- DocSecurity int
+ Application string `xml:",omitempty"`
+ AppVersion string `xml:",omitempty"`
+ DocSecurity int `xml:",omitempty"`
}
// xlsxVectorVariant specifies the set of hyperlinks that were in this