mirror of
https://github.com/fumiama/go-docx.git
synced 2026-06-07 08:40:25 +08:00
add xmlns:wpg
This commit is contained in:
1
empty.go
1
empty.go
@@ -36,6 +36,7 @@ func newEmptyA4File() *Docx {
|
||||
XMLWP: XMLNS_WP,
|
||||
XMLWPS: XMLNS_WPS,
|
||||
XMLWPC: XMLNS_WPC,
|
||||
XMLWPG: XMLNS_WPG,
|
||||
// XMLMC: XMLNS_MC,
|
||||
// XMLWP14: XMLNS_WP14,
|
||||
Body: Body{
|
||||
|
||||
@@ -33,6 +33,7 @@ const (
|
||||
XMLNS_WP = `http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing`
|
||||
XMLNS_WPS = `http://schemas.microsoft.com/office/word/2010/wordprocessingShape`
|
||||
XMLNS_WPC = `http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas`
|
||||
XMLNS_WPG = `http://schemas.microsoft.com/office/word/2010/wordprocessingGroup`
|
||||
// XMLNS_MC = `http://schemas.openxmlformats.org/markup-compatibility/2006`
|
||||
// XMLNS_WP14 = `http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing`
|
||||
|
||||
@@ -103,6 +104,7 @@ type Document struct {
|
||||
XMLWP string `xml:"xmlns:wp,attr,omitempty"` // cannot be unmarshalled in
|
||||
XMLWPS string `xml:"xmlns:wps,attr,omitempty"` // cannot be unmarshalled in
|
||||
XMLWPC string `xml:"xmlns:wpc,attr,omitempty"` // cannot be unmarshalled in
|
||||
XMLWPG string `xml:"xmlns:wpg,attr,omitempty"` // cannot be unmarshalled in
|
||||
// XMLMC string `xml:"xmlns:mc,attr,omitempty"` // cannot be unmarshalled in
|
||||
// XMLWP14 string `xml:"xmlns:wp14,attr,omitempty"` // cannot be unmarshalled in
|
||||
|
||||
|
||||
21
structgroup.go
Normal file
21
structgroup.go
Normal file
@@ -0,0 +1,21 @@
|
||||
/*
|
||||
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
|
||||
@@ -85,6 +85,7 @@ func (f *Docx) parseDocument(file *zip.File) error {
|
||||
// f.Document.XMLMC = XMLNS_MC
|
||||
f.Document.XMLWPS = XMLNS_WPS
|
||||
f.Document.XMLWPC = XMLNS_WPC
|
||||
f.Document.XMLWPG = XMLNS_WPG
|
||||
// f.Document.XMLWP14 = XMLNS_WP14
|
||||
f.Document.XMLName.Space = XMLNS_W
|
||||
f.Document.XMLName.Local = "document"
|
||||
|
||||
Reference in New Issue
Block a user