1: <?php
2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37:
38: namespace MOC\Module\Office\Document\Excel\Page;
39: use MOC\Api;
40: use MOC\Generic\Device\Module;
41:
42: 43: 44:
45: class Size implements Module {
46: 47: 48: 49: 50: 51:
52: public static function InterfaceChangelog() {
53: return Api::Core()->Changelog()->Create( __CLASS__ );
54: }
55:
56: 57: 58: 59: 60: 61:
62: public static function InterfaceDepending() {
63: return Api::Core()->Depending();
64: }
65:
66: 67: 68: 69: 70: 71:
72: public static function InterfaceInstance() {
73: return new Size();
74: }
75:
76: 77: 78:
79: public function Letter() {
80: $this->getActiveSheet()->getPageSetup()->setPaperSize( \PHPExcel_Worksheet_PageSetup::PAPERSIZE_LETTER );
81: return Api::Module()->Office()->Document()->Excel();
82: }
83: 84: 85:
86: public function LetterSmall() {
87: $this->getActiveSheet()->getPageSetup()->setPaperSize( \PHPExcel_Worksheet_PageSetup::PAPERSIZE_LETTER_SMALL );
88: return Api::Module()->Office()->Document()->Excel();
89: }
90: 91: 92:
93: public function Tabloid() {
94: $this->getActiveSheet()->getPageSetup()->setPaperSize( \PHPExcel_Worksheet_PageSetup::PAPERSIZE_TABLOID );
95: return Api::Module()->Office()->Document()->Excel();
96: }
97: 98: 99:
100: public function Ledger() {
101: $this->getActiveSheet()->getPageSetup()->setPaperSize( \PHPExcel_Worksheet_PageSetup::PAPERSIZE_LEDGER );
102: return Api::Module()->Office()->Document()->Excel();
103: }
104: 105: 106:
107: public function Legal() {
108: $this->getActiveSheet()->getPageSetup()->setPaperSize( \PHPExcel_Worksheet_PageSetup::PAPERSIZE_LEGAL );
109: return Api::Module()->Office()->Document()->Excel();
110: }
111: 112: 113:
114: public function Statement() {
115: $this->getActiveSheet()->getPageSetup()->setPaperSize( \PHPExcel_Worksheet_PageSetup::PAPERSIZE_STATEMENT );
116: return Api::Module()->Office()->Document()->Excel();
117: }
118: 119: 120:
121: public function Executive() {
122: $this->getActiveSheet()->getPageSetup()->setPaperSize( \PHPExcel_Worksheet_PageSetup::PAPERSIZE_EXECUTIVE );
123: return Api::Module()->Office()->Document()->Excel();
124: }
125: 126: 127:
128: public function A3() {
129: $this->getActiveSheet()->getPageSetup()->setPaperSize( \PHPExcel_Worksheet_PageSetup::PAPERSIZE_A3 );
130: return Api::Module()->Office()->Document()->Excel();
131: }
132: 133: 134:
135: public function A4() {
136: $this->getActiveSheet()->getPageSetup()->setPaperSize( \PHPExcel_Worksheet_PageSetup::PAPERSIZE_A4 );
137: return Api::Module()->Office()->Document()->Excel();
138: }
139: 140: 141:
142: public function A4Small() {
143: $this->getActiveSheet()->getPageSetup()->setPaperSize( \PHPExcel_Worksheet_PageSetup::PAPERSIZE_A4_SMALL );
144: return Api::Module()->Office()->Document()->Excel();
145: }
146: 147: 148:
149: public function A5() {
150: $this->getActiveSheet()->getPageSetup()->setPaperSize( \PHPExcel_Worksheet_PageSetup::PAPERSIZE_A5 );
151: return Api::Module()->Office()->Document()->Excel();
152: }
153: 154: 155:
156: public function B4() {
157: $this->getActiveSheet()->getPageSetup()->setPaperSize( \PHPExcel_Worksheet_PageSetup::PAPERSIZE_B4 );
158: return Api::Module()->Office()->Document()->Excel();
159: }
160: 161: 162:
163: public function B5() {
164: $this->getActiveSheet()->getPageSetup()->setPaperSize( \PHPExcel_Worksheet_PageSetup::PAPERSIZE_B5 );
165: return Api::Module()->Office()->Document()->Excel();
166: }
167: 168: 169:
170: public function Folio() {
171: $this->getActiveSheet()->getPageSetup()->setPaperSize( \PHPExcel_Worksheet_PageSetup::PAPERSIZE_FOLIO );
172: return Api::Module()->Office()->Document()->Excel();
173: }
174: 175: 176:
177: public function Quarto() {
178: $this->getActiveSheet()->getPageSetup()->setPaperSize( \PHPExcel_Worksheet_PageSetup::PAPERSIZE_QUARTO );
179: return Api::Module()->Office()->Document()->Excel();
180: }
181: 182: 183:
184: public function Standard1() {
185: $this->getActiveSheet()->getPageSetup()->setPaperSize( \PHPExcel_Worksheet_PageSetup::PAPERSIZE_STANDARD_1 );
186: return Api::Module()->Office()->Document()->Excel();
187: }
188: 189: 190:
191: public function Standard2() {
192: $this->getActiveSheet()->getPageSetup()->setPaperSize( \PHPExcel_Worksheet_PageSetup::PAPERSIZE_STANDARD_2 );
193: return Api::Module()->Office()->Document()->Excel();
194: }
195: 196: 197:
198: public function Note() {
199: $this->getActiveSheet()->getPageSetup()->setPaperSize( \PHPExcel_Worksheet_PageSetup::PAPERSIZE_NOTE );
200: return Api::Module()->Office()->Document()->Excel();
201: }
202: 203: 204:
205: public function No9Envelope() {
206: $this->getActiveSheet()->getPageSetup()->setPaperSize( \PHPExcel_Worksheet_PageSetup::PAPERSIZE_NO9_ENVELOPE );
207: return Api::Module()->Office()->Document()->Excel();
208: }
209: 210: 211:
212: public function No10Envelope() {
213: $this->getActiveSheet()->getPageSetup()->setPaperSize( \PHPExcel_Worksheet_PageSetup::PAPERSIZE_NO10_ENVELOPE );
214: return Api::Module()->Office()->Document()->Excel();
215: }
216: 217: 218:
219: public function No11Envelope() {
220: $this->getActiveSheet()->getPageSetup()->setPaperSize( \PHPExcel_Worksheet_PageSetup::PAPERSIZE_NO11_ENVELOPE );
221: return Api::Module()->Office()->Document()->Excel();
222: }
223: 224: 225:
226: public function No12Envelope() {
227: $this->getActiveSheet()->getPageSetup()->setPaperSize( \PHPExcel_Worksheet_PageSetup::PAPERSIZE_NO12_ENVELOPE );
228: return Api::Module()->Office()->Document()->Excel();
229: }
230: 231: 232:
233: public function No14Envelope() {
234: $this->getActiveSheet()->getPageSetup()->setPaperSize( \PHPExcel_Worksheet_PageSetup::PAPERSIZE_NO14_ENVELOPE );
235: return Api::Module()->Office()->Document()->Excel();
236: }
237: 238: 239:
240: public function C() {
241: $this->getActiveSheet()->getPageSetup()->setPaperSize( \PHPExcel_Worksheet_PageSetup::PAPERSIZE_C );
242: return Api::Module()->Office()->Document()->Excel();
243: }
244: 245: 246:
247: public function D() {
248: $this->getActiveSheet()->getPageSetup()->setPaperSize( \PHPExcel_Worksheet_PageSetup::PAPERSIZE_D );
249: return Api::Module()->Office()->Document()->Excel();
250: }
251: 252: 253:
254: public function E() {
255: $this->getActiveSheet()->getPageSetup()->setPaperSize( \PHPExcel_Worksheet_PageSetup::PAPERSIZE_E );
256: return Api::Module()->Office()->Document()->Excel();
257: }
258: 259: 260:
261: public function DlEnvelope() {
262: $this->getActiveSheet()->getPageSetup()->setPaperSize( \PHPExcel_Worksheet_PageSetup::PAPERSIZE_DL_ENVELOPE );
263: return Api::Module()->Office()->Document()->Excel();
264: }
265: 266: 267:
268: public function C5Envelope() {
269: $this->getActiveSheet()->getPageSetup()->setPaperSize( \PHPExcel_Worksheet_PageSetup::PAPERSIZE_C5_ENVELOPE );
270: return Api::Module()->Office()->Document()->Excel();
271: }
272: 273: 274:
275: public function C3Envelope() {
276: $this->getActiveSheet()->getPageSetup()->setPaperSize( \PHPExcel_Worksheet_PageSetup::PAPERSIZE_C3_ENVELOPE );
277: return Api::Module()->Office()->Document()->Excel();
278: }
279: 280: 281:
282: public function C4Envelope() {
283: $this->getActiveSheet()->getPageSetup()->setPaperSize( \PHPExcel_Worksheet_PageSetup::PAPERSIZE_C4_ENVELOPE );
284: return Api::Module()->Office()->Document()->Excel();
285: }
286: 287: 288:
289: public function C6Envelope() {
290: $this->getActiveSheet()->getPageSetup()->setPaperSize( \PHPExcel_Worksheet_PageSetup::PAPERSIZE_C6_ENVELOPE );
291: return Api::Module()->Office()->Document()->Excel();
292: }
293: 294: 295:
296: public function C65Envelope() {
297: $this->getActiveSheet()->getPageSetup()->setPaperSize( \PHPExcel_Worksheet_PageSetup::PAPERSIZE_C65_ENVELOPE );
298: return Api::Module()->Office()->Document()->Excel();
299: }
300: 301: 302:
303: public function B4Envelope() {
304: $this->getActiveSheet()->getPageSetup()->setPaperSize( \PHPExcel_Worksheet_PageSetup::PAPERSIZE_B4_ENVELOPE );
305: return Api::Module()->Office()->Document()->Excel();
306: }
307: 308: 309:
310: public function B5Envelope() {
311: $this->getActiveSheet()->getPageSetup()->setPaperSize( \PHPExcel_Worksheet_PageSetup::PAPERSIZE_B5_ENVELOPE );
312: return Api::Module()->Office()->Document()->Excel();
313: }
314: 315: 316:
317: public function B6Envelope() {
318: $this->getActiveSheet()->getPageSetup()->setPaperSize( \PHPExcel_Worksheet_PageSetup::PAPERSIZE_B6_ENVELOPE );
319: return Api::Module()->Office()->Document()->Excel();
320: }
321: 322: 323:
324: public function ItalyEnvelope() {
325: $this->getActiveSheet()->getPageSetup()->setPaperSize( \PHPExcel_Worksheet_PageSetup::PAPERSIZE_ITALY_ENVELOPE );
326: return Api::Module()->Office()->Document()->Excel();
327: }
328: 329: 330:
331: public function MonarchEnvelope() {
332: $this->getActiveSheet()->getPageSetup()->setPaperSize( \PHPExcel_Worksheet_PageSetup::PAPERSIZE_MONARCH_ENVELOPE );
333: return Api::Module()->Office()->Document()->Excel();
334: }
335: 336: 337:
338: public function No634Envelope() {
339: $this->getActiveSheet()->getPageSetup()->setPaperSize( \PHPExcel_Worksheet_PageSetup::PAPERSIZE_6_3_4_ENVELOPE );
340: return Api::Module()->Office()->Document()->Excel();
341: }
342: 343: 344:
345: public function UsStandardFanfold() {
346: $this->getActiveSheet()->getPageSetup()->setPaperSize( \PHPExcel_Worksheet_PageSetup::PAPERSIZE_US_STANDARD_FANFOLD );
347: return Api::Module()->Office()->Document()->Excel();
348: }
349: 350: 351:
352: public function GermanStandardFanfold() {
353: $this->getActiveSheet()->getPageSetup()->setPaperSize( \PHPExcel_Worksheet_PageSetup::PAPERSIZE_GERMAN_STANDARD_FANFOLD );
354: return Api::Module()->Office()->Document()->Excel();
355: }
356: 357: 358:
359: public function GermanLegalFanfold() {
360: $this->getActiveSheet()->getPageSetup()->setPaperSize( \PHPExcel_Worksheet_PageSetup::PAPERSIZE_GERMAN_LEGAL_FANFOLD );
361: return Api::Module()->Office()->Document()->Excel();
362: }
363: 364: 365:
366: public function IsoB4() {
367: $this->getActiveSheet()->getPageSetup()->setPaperSize( \PHPExcel_Worksheet_PageSetup::PAPERSIZE_ISO_B4 );
368: return Api::Module()->Office()->Document()->Excel();
369: }
370: 371: 372:
373: public function JapaneseDoublePostcard() {
374: $this->getActiveSheet()->getPageSetup()->setPaperSize( \PHPExcel_Worksheet_PageSetup::PAPERSIZE_JAPANESE_DOUBLE_POSTCARD );
375: return Api::Module()->Office()->Document()->Excel();
376: }
377: 378: 379:
380: public function StandardPaper1() {
381: $this->getActiveSheet()->getPageSetup()->setPaperSize( \PHPExcel_Worksheet_PageSetup::PAPERSIZE_STANDARD_PAPER_1 );
382: return Api::Module()->Office()->Document()->Excel();
383: }
384: 385: 386:
387: public function StandardPaper2() {
388: $this->getActiveSheet()->getPageSetup()->setPaperSize( \PHPExcel_Worksheet_PageSetup::PAPERSIZE_STANDARD_PAPER_2 );
389: return Api::Module()->Office()->Document()->Excel();
390: }
391: 392: 393:
394: public function StandardPaper3() {
395: $this->getActiveSheet()->getPageSetup()->setPaperSize( \PHPExcel_Worksheet_PageSetup::PAPERSIZE_STANDARD_PAPER_3 );
396: return Api::Module()->Office()->Document()->Excel();
397: }
398: 399: 400:
401: public function InviteEnvelope() {
402: $this->getActiveSheet()->getPageSetup()->setPaperSize( \PHPExcel_Worksheet_PageSetup::PAPERSIZE_INVITE_ENVELOPE );
403: return Api::Module()->Office()->Document()->Excel();
404: }
405: 406: 407:
408: public function () {
409: $this->getActiveSheet()->getPageSetup()->setPaperSize( \PHPExcel_Worksheet_PageSetup::PAPERSIZE_LETTER_EXTRA_PAPER );
410: return Api::Module()->Office()->Document()->Excel();
411: }
412: 413: 414:
415: public function () {
416: $this->getActiveSheet()->getPageSetup()->setPaperSize( \PHPExcel_Worksheet_PageSetup::PAPERSIZE_LEGAL_EXTRA_PAPER );
417: return Api::Module()->Office()->Document()->Excel();
418: }
419: 420: 421:
422: public function () {
423: $this->getActiveSheet()->getPageSetup()->setPaperSize( \PHPExcel_Worksheet_PageSetup::PAPERSIZE_TABLOID_EXTRA_PAPER );
424: return Api::Module()->Office()->Document()->Excel();
425: }
426: 427: 428:
429: public function () {
430: $this->getActiveSheet()->getPageSetup()->setPaperSize( \PHPExcel_Worksheet_PageSetup::PAPERSIZE_A4_EXTRA_PAPER );
431: return Api::Module()->Office()->Document()->Excel();
432: }
433: 434: 435:
436: public function LetterTransversePaper() {
437: $this->getActiveSheet()->getPageSetup()->setPaperSize( \PHPExcel_Worksheet_PageSetup::PAPERSIZE_LETTER_TRANSVERSE_PAPER );
438: return Api::Module()->Office()->Document()->Excel();
439: }
440: 441: 442:
443: public function A4TransversePaper() {
444: $this->getActiveSheet()->getPageSetup()->setPaperSize( \PHPExcel_Worksheet_PageSetup::PAPERSIZE_A4_TRANSVERSE_PAPER );
445: return Api::Module()->Office()->Document()->Excel();
446: }
447: 448: 449:
450: public function () {
451: $this->getActiveSheet()->getPageSetup()->setPaperSize( \PHPExcel_Worksheet_PageSetup::PAPERSIZE_LETTER_EXTRA_TRANSVERSE_PAPER );
452: return Api::Module()->Office()->Document()->Excel();
453: }
454: 455: 456:
457: public function SuperaSuperaA4Paper() {
458: $this->getActiveSheet()->getPageSetup()->setPaperSize( \PHPExcel_Worksheet_PageSetup::PAPERSIZE_SUPERA_SUPERA_A4_PAPER );
459: return Api::Module()->Office()->Document()->Excel();
460: }
461: 462: 463:
464: public function SuperbSuperbA3Paper() {
465: $this->getActiveSheet()->getPageSetup()->setPaperSize( \PHPExcel_Worksheet_PageSetup::PAPERSIZE_SUPERB_SUPERB_A3_PAPER );
466: return Api::Module()->Office()->Document()->Excel();
467: }
468: 469: 470:
471: public function LetterPlusPaper() {
472: $this->getActiveSheet()->getPageSetup()->setPaperSize( \PHPExcel_Worksheet_PageSetup::PAPERSIZE_LETTER_PLUS_PAPER );
473: return Api::Module()->Office()->Document()->Excel();
474: }
475: 476: 477:
478: public function A4PlusPaper() {
479: $this->getActiveSheet()->getPageSetup()->setPaperSize( \PHPExcel_Worksheet_PageSetup::PAPERSIZE_A4_PLUS_PAPER );
480: return Api::Module()->Office()->Document()->Excel();
481: }
482: 483: 484:
485: public function A5TransversePaper() {
486: $this->getActiveSheet()->getPageSetup()->setPaperSize( \PHPExcel_Worksheet_PageSetup::PAPERSIZE_A5_TRANSVERSE_PAPER );
487: return Api::Module()->Office()->Document()->Excel();
488: }
489: 490: 491:
492: public function JisB5TransversePaper() {
493: $this->getActiveSheet()->getPageSetup()->setPaperSize( \PHPExcel_Worksheet_PageSetup::PAPERSIZE_JIS_B5_TRANSVERSE_PAPER );
494: return Api::Module()->Office()->Document()->Excel();
495: }
496: 497: 498:
499: public function () {
500: $this->getActiveSheet()->getPageSetup()->setPaperSize( \PHPExcel_Worksheet_PageSetup::PAPERSIZE_A3_EXTRA_PAPER );
501: return Api::Module()->Office()->Document()->Excel();
502: }
503: 504: 505:
506: public function () {
507: $this->getActiveSheet()->getPageSetup()->setPaperSize( \PHPExcel_Worksheet_PageSetup::PAPERSIZE_A5_EXTRA_PAPER );
508: return Api::Module()->Office()->Document()->Excel();
509: }
510: 511: 512:
513: public function () {
514: $this->getActiveSheet()->getPageSetup()->setPaperSize( \PHPExcel_Worksheet_PageSetup::PAPERSIZE_ISO_B5_EXTRA_PAPER );
515: return Api::Module()->Office()->Document()->Excel();
516: }
517: 518: 519:
520: public function A2Paper() {
521: $this->getActiveSheet()->getPageSetup()->setPaperSize( \PHPExcel_Worksheet_PageSetup::PAPERSIZE_A2_PAPER );
522: return Api::Module()->Office()->Document()->Excel();
523: }
524: 525: 526:
527: public function A3TransversePaper() {
528: $this->getActiveSheet()->getPageSetup()->setPaperSize( \PHPExcel_Worksheet_PageSetup::PAPERSIZE_A3_TRANSVERSE_PAPER );
529: return Api::Module()->Office()->Document()->Excel();
530: }
531: 532: 533:
534: public function () {
535: $this->getActiveSheet()->getPageSetup()->setPaperSize( \PHPExcel_Worksheet_PageSetup::PAPERSIZE_A3_EXTRA_TRANSVERSE_PAPER );
536: return Api::Module()->Office()->Document()->Excel();
537: }
538:
539: 540: 541:
542: private function getActiveSheet() {
543: return Api::Extension()->Excel()->Current()->getActiveSheet();
544: }
545: }
546: