1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
namespace PhpOffice\PhpSpreadsheet\Shared\Escher; |
4
|
|
|
|
5
|
|
|
/** |
6
|
|
|
* Copyright (c) 2006 - 2016 PhpSpreadsheet. |
7
|
|
|
* |
8
|
|
|
* This library is free software; you can redistribute it and/or |
9
|
|
|
* modify it under the terms of the GNU Lesser General Public |
10
|
|
|
* License as published by the Free Software Foundation; either |
11
|
|
|
* version 2.1 of the License, or (at your option) any later version. |
12
|
|
|
* |
13
|
|
|
* This library is distributed in the hope that it will be useful, |
14
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
15
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
16
|
|
|
* Lesser General Public License for more details. |
17
|
|
|
* |
18
|
|
|
* You should have received a copy of the GNU Lesser General Public |
19
|
|
|
* License along with this library; if not, write to the Free Software |
20
|
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
21
|
|
|
* |
22
|
|
|
* @category PhpSpreadsheet |
23
|
|
|
* |
24
|
|
|
* @copyright Copyright (c) 2006 - 2016 PhpSpreadsheet (https://github.com/PHPOffice/PhpSpreadsheet) |
25
|
|
|
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL |
26
|
|
|
*/ |
27
|
|
|
class DggContainer |
28
|
|
|
{ |
29
|
|
|
/** |
30
|
|
|
* Maximum shape index of all shapes in all drawings increased by one. |
31
|
|
|
* |
32
|
|
|
* @var int |
33
|
|
|
*/ |
34
|
|
|
private $spIdMax; |
35
|
|
|
|
36
|
|
|
/** |
37
|
|
|
* Total number of drawings saved. |
38
|
|
|
* |
39
|
|
|
* @var int |
40
|
|
|
*/ |
41
|
|
|
private $cDgSaved; |
42
|
|
|
|
43
|
|
|
/** |
44
|
|
|
* Total number of shapes saved (including group shapes). |
45
|
|
|
* |
46
|
|
|
* @var int |
47
|
|
|
*/ |
48
|
|
|
private $cSpSaved; |
49
|
|
|
|
50
|
|
|
/** |
51
|
|
|
* BLIP Store Container. |
52
|
|
|
* |
53
|
|
|
* @var DggContainer\BstoreContainer |
54
|
|
|
*/ |
55
|
|
|
private $bstoreContainer; |
56
|
|
|
|
57
|
|
|
/** |
58
|
|
|
* Array of options for the drawing group. |
59
|
|
|
* |
60
|
|
|
* @var array |
61
|
|
|
*/ |
62
|
|
|
private $OPT = []; |
63
|
|
|
|
64
|
|
|
/** |
65
|
|
|
* Array of identifier clusters containg information about the maximum shape identifiers. |
66
|
|
|
* |
67
|
|
|
* @var array |
68
|
|
|
*/ |
69
|
|
|
private $IDCLs = []; |
70
|
|
|
|
71
|
|
|
/** |
72
|
|
|
* Get maximum shape index of all shapes in all drawings (plus one). |
73
|
|
|
* |
74
|
|
|
* @return int |
75
|
|
|
*/ |
76
|
10 |
|
public function getSpIdMax() |
77
|
|
|
{ |
78
|
10 |
|
return $this->spIdMax; |
79
|
|
|
} |
80
|
|
|
|
81
|
|
|
/** |
82
|
|
|
* Set maximum shape index of all shapes in all drawings (plus one). |
83
|
|
|
* |
84
|
|
|
* @param int |
85
|
|
|
* @param mixed $value |
86
|
|
|
*/ |
87
|
10 |
|
public function setSpIdMax($value) |
88
|
|
|
{ |
89
|
10 |
|
$this->spIdMax = $value; |
90
|
10 |
|
} |
91
|
|
|
|
92
|
|
|
/** |
93
|
|
|
* Get total number of drawings saved. |
94
|
|
|
* |
95
|
|
|
* @return int |
96
|
|
|
*/ |
97
|
10 |
|
public function getCDgSaved() |
98
|
|
|
{ |
99
|
10 |
|
return $this->cDgSaved; |
100
|
|
|
} |
101
|
|
|
|
102
|
|
|
/** |
103
|
|
|
* Set total number of drawings saved. |
104
|
|
|
* |
105
|
|
|
* @param int |
106
|
|
|
* @param mixed $value |
107
|
|
|
*/ |
108
|
10 |
|
public function setCDgSaved($value) |
109
|
|
|
{ |
110
|
10 |
|
$this->cDgSaved = $value; |
111
|
10 |
|
} |
112
|
|
|
|
113
|
|
|
/** |
114
|
|
|
* Get total number of shapes saved (including group shapes). |
115
|
|
|
* |
116
|
|
|
* @return int |
117
|
|
|
*/ |
118
|
10 |
|
public function getCSpSaved() |
119
|
|
|
{ |
120
|
10 |
|
return $this->cSpSaved; |
121
|
|
|
} |
122
|
|
|
|
123
|
|
|
/** |
124
|
|
|
* Set total number of shapes saved (including group shapes). |
125
|
|
|
* |
126
|
|
|
* @param int |
127
|
|
|
* @param mixed $value |
128
|
|
|
*/ |
129
|
10 |
|
public function setCSpSaved($value) |
130
|
|
|
{ |
131
|
10 |
|
$this->cSpSaved = $value; |
132
|
10 |
|
} |
133
|
|
|
|
134
|
|
|
/** |
135
|
|
|
* Get BLIP Store Container. |
136
|
|
|
* |
137
|
|
|
* @return DggContainer\BstoreContainer |
138
|
|
|
*/ |
139
|
10 |
|
public function getBstoreContainer() |
140
|
|
|
{ |
141
|
10 |
|
return $this->bstoreContainer; |
142
|
|
|
} |
143
|
|
|
|
144
|
|
|
/** |
145
|
|
|
* Set BLIP Store Container. |
146
|
|
|
* |
147
|
|
|
* @param DggContainer\BstoreContainer $bstoreContainer |
148
|
|
|
*/ |
149
|
10 |
|
public function setBstoreContainer($bstoreContainer) |
150
|
|
|
{ |
151
|
10 |
|
$this->bstoreContainer = $bstoreContainer; |
152
|
10 |
|
} |
153
|
|
|
|
154
|
|
|
/** |
155
|
|
|
* Set an option for the drawing group. |
156
|
|
|
* |
157
|
|
|
* @param int $property The number specifies the option |
158
|
|
|
* @param mixed $value |
159
|
|
|
*/ |
160
|
2 |
|
public function setOPT($property, $value) |
161
|
|
|
{ |
162
|
2 |
|
$this->OPT[$property] = $value; |
163
|
2 |
|
} |
164
|
|
|
|
165
|
|
|
/** |
166
|
|
|
* Get an option for the drawing group. |
167
|
|
|
* |
168
|
|
|
* @param int $property The number specifies the option |
169
|
|
|
* |
170
|
|
|
* @return mixed |
171
|
|
|
*/ |
172
|
|
|
public function getOPT($property) |
173
|
|
|
{ |
174
|
|
|
if (isset($this->OPT[$property])) { |
175
|
|
|
return $this->OPT[$property]; |
176
|
|
|
} |
177
|
|
|
|
178
|
|
|
return null; |
179
|
|
|
} |
180
|
|
|
|
181
|
|
|
/** |
182
|
|
|
* Get identifier clusters. |
183
|
|
|
* |
184
|
|
|
* @return array |
185
|
|
|
*/ |
186
|
10 |
|
public function getIDCLs() |
187
|
|
|
{ |
188
|
10 |
|
return $this->IDCLs; |
189
|
|
|
} |
190
|
|
|
|
191
|
|
|
/** |
192
|
|
|
* Set identifier clusters. array(<drawingId> => <max shape id>, ...). |
193
|
|
|
* |
194
|
|
|
* @param array $pValue |
195
|
|
|
*/ |
196
|
10 |
|
public function setIDCLs($pValue) |
197
|
|
|
{ |
198
|
10 |
|
$this->IDCLs = $pValue; |
199
|
10 |
|
} |
200
|
|
|
} |
201
|
|
|
|