summaryrefslogtreecommitdiff
path: root/xmlDrawing.go
diff options
context:
space:
mode:
authorRi Xu <xuri.me@gmail.com>2017-06-19 11:18:58 +0800
committerRi Xu <xuri.me@gmail.com>2017-06-19 11:18:58 +0800
commit7bc43301dabaef70b785133caf4fb4f1f978e089 (patch)
treeaf84982ced1e3c7b0d62f0830cdd04bbab817280 /xmlDrawing.go
parent9928bbc7c80dc9b3ab6599b9e472c2e00936ae84 (diff)
- Support insert new lines into shape, relate issue #38, note that the format set parameter of function `AddShape()` changed;
- go test and go doc updated
Diffstat (limited to 'xmlDrawing.go')
-rw-r--r--xmlDrawing.go23
1 files changed, 15 insertions, 8 deletions
diff --git a/xmlDrawing.go b/xmlDrawing.go
index bf263a5..e61fe6a 100644
--- a/xmlDrawing.go
+++ b/xmlDrawing.go
@@ -330,7 +330,7 @@ type aFontRef struct {
// paragraphs multiple runs of text.
type xdrTxBody struct {
BodyPr *aBodyPr `xml:"a:bodyPr"`
- P *aP `xml:"a:p"`
+ P []*aP `xml:"a:p"`
}
// formatPicture directly maps the format settings of the picture.
@@ -346,15 +346,22 @@ type formatPicture struct {
// formatShape directly maps the format settings of the shape.
type formatShape struct {
- Type string `json:"type"`
- Width int `json:"width"`
- Height int `json:"height"`
- Format formatPicture `json:"format"`
- Font formatFont `json:"font"`
- Text string `json:"text"`
- Color formatShapeColor `json:"color"`
+ Type string `json:"type"`
+ Width int `json:"width"`
+ Height int `json:"height"`
+ Format formatPicture `json:"format"`
+ Color formatShapeColor `json:"color"`
+ Paragraph []formatShapeParagraph `json:"paragraph"`
}
+// formatShapeParagraph directly maps the format settings of the paragraph in
+// the shape.
+type formatShapeParagraph struct {
+ Font formatFont `json:"font"`
+ Text string `json:"text"`
+}
+
+// formatShapeColor directly maps the color settings of the shape.
type formatShapeColor struct {
Line string `json:"line"`
Fill string `json:"fill"`