ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
Properties.php
Go to the documentation of this file.
1<?php
9abstract class PHPExcel_Properties {
10
11 const
15
16 const
21
22 const
26 TICK_MARK_CROSS = 'cross';
27
28 const
31
32 const
34 FORMAT_CODE_NUMBER = '#,##0.00',
35 FORMAT_CODE_CURRENCY = '$#,##0.00',
36 FORMAT_CODE_ACCOUNTING = '_($* #,##0.00_);_($* (#,##0.00);_($* "-"??_);_(@_)',
37 FORMAT_CODE_DATE = 'm/d/yyyy',
38 FORMAT_CODE_TIME = '[$-F400]h:mm:ss AM/PM',
44
45 const
48
49 const
55
64
68
72
79
89
90 const
115
116 protected function getExcelPointsWidth($width) {
117 return $width * 12700;
118 }
119
120 protected function getExcelPointsAngle($angle) {
121 return $angle * 60000;
122 }
123
124 protected function getTrueAlpha($alpha) {
125 return (string) 100 - $alpha . '000';
126 }
127
128 protected function setColorProperties($color, $alpha, $type) {
129 return array(
130 'type' => (string) $type,
131 'value' => (string) $color,
132 'alpha' => (string) $this->getTrueAlpha($alpha)
133 );
134 }
135
136 protected function getLineStyleArrowSize($array_selector, $array_kay_selector) {
137 $sizes = array(
138 1 => array('w' => 'sm', 'len' => 'sm'),
139 2 => array('w' => 'sm', 'len' => 'med'),
140 3 => array('w' => 'sm', 'len' => 'lg'),
141 4 => array('w' => 'med', 'len' => 'sm'),
142 5 => array('w' => 'med', 'len' => 'med'),
143 6 => array('w' => 'med', 'len' => 'lg'),
144 7 => array('w' => 'lg', 'len' => 'sm'),
145 8 => array('w' => 'lg', 'len' => 'med'),
146 9 => array('w' => 'lg', 'len' => 'lg')
147 );
148
149 return $sizes[$array_selector][$array_kay_selector];
150 }
151
152 protected function getShadowPresetsMap($shadow_presets_option) {
153 $presets_options = array(
154 //OUTER
155 1 => array(
156 'effect' => 'outerShdw',
157 'blur' => '50800',
158 'distance' => '38100',
159 'direction' => '2700000',
160 'algn' => 'tl',
161 'rotWithShape' => '0'
162 ),
163 2 => array(
164 'effect' => 'outerShdw',
165 'blur' => '50800',
166 'distance' => '38100',
167 'direction' => '5400000',
168 'algn' => 't',
169 'rotWithShape' => '0'
170 ),
171 3 => array(
172 'effect' => 'outerShdw',
173 'blur' => '50800',
174 'distance' => '38100',
175 'direction' => '8100000',
176 'algn' => 'tr',
177 'rotWithShape' => '0'
178 ),
179 4 => array(
180 'effect' => 'outerShdw',
181 'blur' => '50800',
182 'distance' => '38100',
183 'algn' => 'l',
184 'rotWithShape' => '0'
185 ),
186 5 => array(
187 'effect' => 'outerShdw',
188 'size' => array(
189 'sx' => '102000',
190 'sy' => '102000'
191 )
192 ,
193 'blur' => '63500',
194 'distance' => '38100',
195 'algn' => 'ctr',
196 'rotWithShape' => '0'
197 ),
198 6 => array(
199 'effect' => 'outerShdw',
200 'blur' => '50800',
201 'distance' => '38100',
202 'direction' => '10800000',
203 'algn' => 'r',
204 'rotWithShape' => '0'
205 ),
206 7 => array(
207 'effect' => 'outerShdw',
208 'blur' => '50800',
209 'distance' => '38100',
210 'direction' => '18900000',
211 'algn' => 'bl',
212 'rotWithShape' => '0'
213 ),
214 8 => array(
215 'effect' => 'outerShdw',
216 'blur' => '50800',
217 'distance' => '38100',
218 'direction' => '16200000',
219 'rotWithShape' => '0'
220 ),
221 9 => array(
222 'effect' => 'outerShdw',
223 'blur' => '50800',
224 'distance' => '38100',
225 'direction' => '13500000',
226 'algn' => 'br',
227 'rotWithShape' => '0'
228 ),
229 //INNER
230 10 => array(
231 'effect' => 'innerShdw',
232 'blur' => '63500',
233 'distance' => '50800',
234 'direction' => '2700000',
235 ),
236 11 => array(
237 'effect' => 'innerShdw',
238 'blur' => '63500',
239 'distance' => '50800',
240 'direction' => '5400000',
241 ),
242 12 => array(
243 'effect' => 'innerShdw',
244 'blur' => '63500',
245 'distance' => '50800',
246 'direction' => '8100000',
247 ),
248 13 => array(
249 'effect' => 'innerShdw',
250 'blur' => '63500',
251 'distance' => '50800',
252 ),
253 14 => array(
254 'effect' => 'innerShdw',
255 'blur' => '114300',
256 ),
257 15 => array(
258 'effect' => 'innerShdw',
259 'blur' => '63500',
260 'distance' => '50800',
261 'direction' => '10800000',
262 ),
263 16 => array(
264 'effect' => 'innerShdw',
265 'blur' => '63500',
266 'distance' => '50800',
267 'direction' => '18900000',
268 ),
269 17 => array(
270 'effect' => 'innerShdw',
271 'blur' => '63500',
272 'distance' => '50800',
273 'direction' => '16200000',
274 ),
275 18 => array(
276 'effect' => 'innerShdw',
277 'blur' => '63500',
278 'distance' => '50800',
279 'direction' => '13500000',
280 ),
281 //perspective
282 19 => array(
283 'effect' => 'outerShdw',
284 'blur' => '152400',
285 'distance' => '317500',
286 'size' => array(
287 'sx' => '90000',
288 'sy' => '-19000',
289 ),
290 'direction' => '5400000',
291 'rotWithShape' => '0',
292 ),
293 20 => array(
294 'effect' => 'outerShdw',
295 'blur' => '76200',
296 'direction' => '18900000',
297 'size' => array(
298 'sy' => '23000',
299 'kx' => '-1200000',
300 ),
301 'algn' => 'bl',
302 'rotWithShape' => '0',
303 ),
304 21 => array(
305 'effect' => 'outerShdw',
306 'blur' => '76200',
307 'direction' => '13500000',
308 'size' => array(
309 'sy' => '23000',
310 'kx' => '1200000',
311 ),
312 'algn' => 'br',
313 'rotWithShape' => '0',
314 ),
315 22 => array(
316 'effect' => 'outerShdw',
317 'blur' => '76200',
318 'distance' => '12700',
319 'direction' => '2700000',
320 'size' => array(
321 'sy' => '-23000',
322 'kx' => '-800400',
323 ),
324 'algn' => 'bl',
325 'rotWithShape' => '0',
326 ),
327 23 => array(
328 'effect' => 'outerShdw',
329 'blur' => '76200',
330 'distance' => '12700',
331 'direction' => '8100000',
332 'size' => array(
333 'sy' => '-23000',
334 'kx' => '800400',
335 ),
336 'algn' => 'br',
337 'rotWithShape' => '0',
338 ),
339 );
340
341 return $presets_options[$shadow_presets_option];
342 }
343
344 protected function getArrayElementsValue($properties, $elements) {
345 $reference = & $properties;
346 if (!is_array($elements)) {
347 return $reference[$elements];
348 } else {
349 foreach ($elements as $keys) {
350 $reference = & $reference[$keys];
351 }
352
353 return $reference;
354 }
355
356 return $this;
357 }
358
359}
An exception for terminatinating execution or to throw for unit testing.
Created by PhpStorm.
Definition: Properties.php:9
const SHADOW_PRESETS_OUTER_TOP
Definition: Properties.php:99
const SHADOW_PRESETS_INNER_CENTER
Definition: Properties.php:105
const LINE_STYLE_COMPOUND_SIMPLE
Definition: Properties.php:50
getLineStyleArrowSize($array_selector, $array_kay_selector)
Definition: Properties.php:136
const EXCEL_COLOR_TYPE_SCHEME
Definition: Properties.php:13
const FORMAT_CODE_ACCOUNTING
Definition: Properties.php:36
const LINE_STYLE_ARROW_SIZE_8
Definition: Properties.php:87
const LINE_STYLE_DASH_LONG_DASH_DOT_DOT
Definition: Properties.php:63
const LINE_STYLE_COMPOUND_TRIPLE
Definition: Properties.php:54
const SHADOW_PRESETS_INNER_BOTTOM
Definition: Properties.php:102
const LINE_STYLE_DASH_DASH_DOT
Definition: Properties.php:60
const LINE_STYLE_ARROW_SIZE_7
Definition: Properties.php:86
const LINE_STYLE_DASH_LONG_DASH
Definition: Properties.php:61
const SHADOW_PRESETS_PERSPECTIVE_LOWER_LEFT
Definition: Properties.php:114
const LINE_STYLE_ARROW_SIZE_6
Definition: Properties.php:85
const LINE_STYLE_ARROW_TYPE_OVAL
Definition: Properties.php:78
const ORIENTATION_REVERSED
Definition: Properties.php:47
const LINE_STYLE_ARROW_TYPE_ARROW
Definition: Properties.php:74
const SHADOW_PRESETS_PERSPECTIVE_LOWER_RIGHT
Definition: Properties.php:113
const LINE_STYPE_DASH_DASH
Definition: Properties.php:59
const SHADOW_PRESETS_INNER_LEFT
Definition: Properties.php:106
const FORMAT_CODE_FRACTION
Definition: Properties.php:40
const LINE_STYLE_COMPOUND_DOUBLE
Definition: Properties.php:51
const HORIZONTAL_CROSSES_AUTOZERO
Definition: Properties.php:29
const SHADOW_PRESETS_OUTER_RIGHT
Definition: Properties.php:95
const SHADOW_PRESETS_OUTER_BOTTOM
Definition: Properties.php:93
const LINE_STYLE_CAP_SQUARE
Definition: Properties.php:65
const LINE_STYLE_COMPOUND_THICKTHIN
Definition: Properties.php:52
const LINE_STYLE_ARROW_TYPE_DIAMOND
Definition: Properties.php:77
const LINE_STYLE_ARROW_SIZE_2
Definition: Properties.php:81
const LINE_STYLE_ARROW_SIZE_5
Definition: Properties.php:84
const SHADOW_PRESETS_INNER_TOP
Definition: Properties.php:108
const SHADOW_PRESETS_OUTER_TOP_RIGHT
Definition: Properties.php:98
const SHADOW_PRESETS_OUTER_TOP_LEFT
Definition: Properties.php:100
const SHADOW_PRESETS_INNER_BOTTOM_LEFT
Definition: Properties.php:103
const SHADOW_PRESETS_PERSPECTIVE_UPPER_LEFT
Definition: Properties.php:112
const SHADOW_PRESETS_INNER_RIGHT
Definition: Properties.php:104
const EXCEL_COLOR_TYPE_STANDARD
Definition: Properties.php:12
const SHADOW_PRESETS_OUTER_CENTER
Definition: Properties.php:96
const LINE_STYLE_ARROW_TYPE_OPEN
Definition: Properties.php:75
const LINE_STYLE_DASH_SOLID
Definition: Properties.php:56
getShadowPresetsMap($shadow_presets_option)
Definition: Properties.php:152
const LINE_STYLE_DASH_SQUERE_DOT
Definition: Properties.php:58
const LINE_STYLE_ARROW_SIZE_3
Definition: Properties.php:82
const HORIZONTAL_CROSSES_MAXIMUM
Definition: Properties.php:30
const LINE_STYLE_JOIN_MITER
Definition: Properties.php:70
const SHADOW_PRESETS_OUTER_BOTTOM_LEFT
Definition: Properties.php:94
const FORMAT_CODE_PERCENTAGE
Definition: Properties.php:39
const LINE_STYLE_ARROW_SIZE_9
Definition: Properties.php:88
const LINE_STYLE_DASH_ROUND_DOT
Definition: Properties.php:57
getArrayElementsValue($properties, $elements)
Definition: Properties.php:344
const SHADOW_PRESETS_PERSPECTIVE_UPPER_RIGHT
Definition: Properties.php:111
const SHADOW_PRESETS_INNER_TOP_RIGHT
Definition: Properties.php:107
const SHADOW_PRESETS_OUTER_BOTTTOM_RIGHT
Definition: Properties.php:92
const FORMAT_CODE_SCIENTIFIC
Definition: Properties.php:41
const SHADOW_PRESETS_INNER_TOP_LEFT
Definition: Properties.php:109
const LINE_STYLE_CAP_ROUND
Definition: Properties.php:66
const FORMAT_CODE_CURRENCY
Definition: Properties.php:35
const EXCEL_COLOR_TYPE_ARGB
Definition: Properties.php:14
const SHADOW_PRESETS_PERSPECTIVE_BELOW
Definition: Properties.php:110
const LINE_STYLE_DASH_LONG_DASH_DOT
Definition: Properties.php:62
const LINE_STYLE_COMPOUND_THINTHICK
Definition: Properties.php:53
const LINE_STYLE_JOIN_ROUND
Definition: Properties.php:69
const SHADOW_PRESETS_NOSHADOW
Definition: Properties.php:91
const LINE_STYLE_JOIN_BEVEL
Definition: Properties.php:71
setColorProperties($color, $alpha, $type)
Definition: Properties.php:128
const LINE_STYLE_ARROW_TYPE_STEALTH
Definition: Properties.php:76
const SHADOW_PRESETS_OUTER_LEFT
Definition: Properties.php:97
const SHADOW_PRESETS_INNER_BOTTTOM_RIGHT
Definition: Properties.php:101
const LINE_STYLE_ARROW_SIZE_4
Definition: Properties.php:83
const LINE_STYLE_ARROW_TYPE_NOARROW
Definition: Properties.php:73
getExcelPointsWidth($width)
Definition: Properties.php:116
getExcelPointsAngle($angle)
Definition: Properties.php:120
const LINE_STYLE_ARROW_SIZE_1
Definition: Properties.php:80
$angle
$keys
$type