1
0
mirror of https://github.com/fumiama/go-docx.git synced 2026-06-10 18:40:28 +08:00

add AddShape api

This commit is contained in:
源文雨
2023-02-27 16:12:56 +08:00
parent c8aae913f2
commit d19032acad
11 changed files with 211 additions and 23 deletions

View File

@@ -39,6 +39,7 @@ import (
func unpack(zipReader *zip.Reader) (docx *Docx, err error) {
docx = new(Docx)
docx.mediaNameIdx = make(map[string]int, 64)
docx.slowIDs = make(map[string]uintptr, 64)
docx.tmplfs = zipReader
docx.tmpfslst = make([]string, 0, 64)
for _, f := range zipReader.File {
@@ -88,6 +89,7 @@ func (f *Docx) parseDocument(file *zip.File) error {
f.Document.XMLName.Local = "document"
f.Document.Body.file = f
//TODO: find last docID
err = xml.NewDecoder(zf).Decode(&f.Document)
return err
}