File tree Expand file tree Collapse file tree 3 files changed +43
-0
lines changed
src/PhpPresentation/Shape/Chart
tests/PhpPresentation/Tests/Shape/Chart Expand file tree Collapse file tree 3 files changed +43
-0
lines changed Original file line number Diff line number Diff line change 16
16
- ODPresentation Writer : Axis Bounds in Chart - @Progi1984 GH-269
17
17
- PowerPoint2007 Writer : Implement character spacing - @jvanoostrom GH-301
18
18
- PowerPoint2007 Writer : Axis Bounds in Chart - @Progi1984 GH-269
19
+ - Misc : Added two methods for setting Border & Fill in Legend - @Progi1984 GH-265
19
20
20
21
## 0.7.0 - 2016-09-12
21
22
Original file line number Diff line number Diff line change @@ -281,6 +281,18 @@ public function getBorder()
281
281
return $ this ->border ;
282
282
}
283
283
284
+ /**
285
+ * Set Border
286
+ *
287
+ * @param \PhpOffice\PhpPresentation\Style\Border $border
288
+ * @return \PhpOffice\PhpPresentation\Shape\RichText\Paragraph
289
+ */
290
+ public function setBorder (Border $ border )
291
+ {
292
+ $ this ->border = $ border ;
293
+ return $ this ;
294
+ }
295
+
284
296
/**
285
297
* Get Fill
286
298
*
@@ -291,6 +303,18 @@ public function getFill()
291
303
return $ this ->fill ;
292
304
}
293
305
306
+ /**
307
+ * Set Fill
308
+ *
309
+ * @param \PhpOffice\PhpPresentation\Style\Fill $fill
310
+ * @return \PhpOffice\PhpPresentation\Shape\RichText\Paragraph
311
+ */
312
+ public function setFill (Fill $ fill )
313
+ {
314
+ $ this ->fill = $ fill ;
315
+ return $ this ;
316
+ }
317
+
294
318
/**
295
319
* Get alignment
296
320
*
Original file line number Diff line number Diff line change @@ -48,6 +48,24 @@ public function testAlignment()
48
48
$ this ->assertInstanceOf ('PhpOffice \\PhpPresentation \\Style \\Alignment ' , $ object ->getAlignment ());
49
49
}
50
50
51
+ public function testBorder ()
52
+ {
53
+ $ object = new Legend ();
54
+
55
+ $ this ->assertInstanceOf ('PhpOffice \\PhpPresentation \\Style \\Border ' , $ object ->getBorder ());
56
+ $ this ->assertInstanceOf ('PhpOffice \\PhpPresentation \\Shape \\Chart \\Legend ' , $ object ->setBorder (new Border ()));
57
+ $ this ->assertInstanceOf ('PhpOffice \\PhpPresentation \\Style \\Border ' , $ object ->getBorder ());
58
+ }
59
+
60
+ public function testFill ()
61
+ {
62
+ $ object = new Legend ();
63
+
64
+ $ this ->assertInstanceOf ('PhpOffice \\PhpPresentation \\Style \\Fill ' , $ object ->getFill ());
65
+ $ this ->assertInstanceOf ('PhpOffice \\PhpPresentation \\Shape \\Chart \\Legend ' , $ object ->setFill (new Fill ()));
66
+ $ this ->assertInstanceOf ('PhpOffice \\PhpPresentation \\Style \\Fill ' , $ object ->getFill ());
67
+ }
68
+
51
69
public function testFont ()
52
70
{
53
71
$ object = new Legend ();
You can’t perform that action at this time.
0 commit comments