@@ 222-235 (lines=14) @@ | ||
219 | * |
|
220 | * @return Alignment |
|
221 | */ |
|
222 | public function setHorizontal($pValue = self::HORIZONTAL_GENERAL) |
|
223 | { |
|
224 | if ($pValue == '') { |
|
225 | $pValue = self::HORIZONTAL_GENERAL; |
|
226 | } |
|
227 | ||
228 | if ($this->isSupervisor) { |
|
229 | $styleArray = $this->getStyleArray(['horizontal' => $pValue]); |
|
230 | $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($styleArray); |
|
231 | } else { |
|
232 | $this->horizontal = $pValue; |
|
233 | } |
|
234 | ||
235 | return $this; |
|
236 | } |
|
237 | ||
238 | /** |
|
@@ 259-272 (lines=14) @@ | ||
256 | * |
|
257 | * @return Alignment |
|
258 | */ |
|
259 | public function setVertical($pValue = self::VERTICAL_BOTTOM) |
|
260 | { |
|
261 | if ($pValue == '') { |
|
262 | $pValue = self::VERTICAL_BOTTOM; |
|
263 | } |
|
264 | ||
265 | if ($this->isSupervisor) { |
|
266 | $styleArray = $this->getStyleArray(['vertical' => $pValue]); |
|
267 | $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($styleArray); |
|
268 | } else { |
|
269 | $this->vertical = $pValue; |
|
270 | } |
|
271 | ||
272 | return $this; |
|
273 | } |
|
274 | ||
275 | /** |
@@ 410-422 (lines=13) @@ | ||
407 | * |
|
408 | * @return Borders |
|
409 | */ |
|
410 | public function setDiagonalDirection($pValue = self::DIAGONAL_NONE) |
|
411 | { |
|
412 | if ($pValue == '') { |
|
413 | $pValue = self::DIAGONAL_NONE; |
|
414 | } |
|
415 | if ($this->isSupervisor) { |
|
416 | $styleArray = $this->getStyleArray(['diagonaldirection' => $pValue]); |
|
417 | $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($styleArray); |
|
418 | } else { |
|
419 | $this->diagonalDirection = $pValue; |
|
420 | } |
|
421 | ||
422 | return $this; |
|
423 | } |
|
424 | ||
425 | /** |
@@ 196-208 (lines=13) @@ | ||
193 | * |
|
194 | * @return Color |
|
195 | */ |
|
196 | public function setARGB($pValue = self::COLOR_BLACK) |
|
197 | { |
|
198 | if ($pValue == '') { |
|
199 | $pValue = self::COLOR_BLACK; |
|
200 | } |
|
201 | if ($this->isSupervisor) { |
|
202 | $styleArray = $this->getStyleArray(['argb' => $pValue]); |
|
203 | $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($styleArray); |
|
204 | } else { |
|
205 | $this->argb = $pValue; |
|
206 | } |
|
207 | ||
208 | return $this; |
|
209 | } |
|
210 | ||
211 | /** |
@@ 199-213 (lines=15) @@ | ||
196 | * |
|
197 | * @return NumberFormat |
|
198 | */ |
|
199 | public function setFormatCode($pValue = self::FORMAT_GENERAL) |
|
200 | { |
|
201 | if ($pValue == '') { |
|
202 | $pValue = self::FORMAT_GENERAL; |
|
203 | } |
|
204 | if ($this->isSupervisor) { |
|
205 | $styleArray = $this->getStyleArray(['code' => $pValue]); |
|
206 | $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($styleArray); |
|
207 | } else { |
|
208 | $this->formatCode = $pValue; |
|
209 | $this->builtInFormatCode = self::builtInFormatCodeIndex($pValue); |
|
210 | } |
|
211 | ||
212 | return $this; |
|
213 | } |
|
214 | ||
215 | /** |
|
216 | * Get Built-In Format Code. |