1: 2eval 'exec perl -wS $0 ${1+"$@"}' 3 if 0; 4 5 6use IO::File; 7use Cwd; 8use File::Spec; 9use File::Spec::Functions; 10use File::Temp; 11use File::Path; 12 13$TempDir = ""; 14 15 16# all the XML package generation is a blatant rip from AF's 17# write-calc-doc.pl 18 19 20############################################################################### 21# Open a file with the given name. 22# First it is checked if the temporary directory, in which all files for 23# the document are gathered, is already present and create it if it is not. 24# Then create the path to the file inside the temporary directory. 25# Finally open the file and return a file handle to it. 26# 27sub open_file 28{ 29 my $filename = pop @_; 30 31 # Create base directory of temporary directory tree if not alreay 32 # present. 33 if ($TempDir eq "") 34 { 35 $TempDir = File::Temp::tempdir (CLEANUP => 1); 36 } 37 38 # Create the path to the file. 39 my $fullname = File::Spec->catfile ($TempDir, $filename); 40 my ($volume,$directories,$file) = File::Spec->splitpath ($fullname); 41 mkpath (File::Spec->catpath ($volume,$directories,"")); 42 43 # Open the file and return a file handle to it. 44 return new IO::File ($fullname, "w"); 45} 46 47 48############################################################################### 49# Zip the files in the directory tree into the given file. 50# 51sub zip_dirtree 52{ 53 my $filename = pop @_; 54 55 my $cwd = getcwd; 56 my $zip_name = $filename; 57 58 # We are about to change the directory. 59 # Therefore create an absolute pathname for the zip archive. 60 61 # First transfer the drive from $cwd to $zip_name. This is a 62 # workaround for a bug in file_name_is_absolute which thinks 63 # the the path \bla is an absolute path under DOS. 64 my ($volume,$directories,$file) = File::Spec->splitpath ($zip_name); 65 my ($volume_cwd,$directories_cwd,$file_cwd) = File::Spec->splitpath ($cwd); 66 $volume = $volume_cwd if ($volume eq ""); 67 $zip_name = File::Spec->catpath ($volume,$directories,$file); 68 69 # Add the current working directory to a relative path. 70 if ( ! file_name_is_absolute ($zip_name)) 71 { 72 $zip_name = File::Spec->catfile ($cwd, $zip_name); 73 74 # Try everything to clean up the name. 75 $zip_name = File::Spec->rel2abs ($filename); 76 $zip_name = File::Spec->canonpath ($zip_name); 77 78 # Remove .. directories from the middle of the path. 79 while ($zip_name =~ /\/[^\/][^\.\/][^\/]*\/\.\.\//) 80 { 81 $zip_name = $` . "/" . $'; 82 } 83 } 84 85 # Just in case the zip program gets confused by an existing file with the 86 # same name as the one to be written that file is removed first. 87 if ( -e $filename) 88 { 89 if (unlink ($filename) == 0) 90 { 91 print "Existing file $filename could not be deleted.\n"; 92 print "Please close the application that uses it, then try again.\n"; 93 return; 94 } 95 } 96 97 # Finally create the zip file. First change into the temporary directory 98 # so that the resulting zip file contains only paths relative to it. 99 print "zipping [$ZipCmd $ZipFlags $zip_name *]\n"; 100 chdir ($TempDir); 101 system ("$ZipCmd $ZipFlags $zip_name *"); 102 chdir ($cwd); 103 104} 105 106 107sub writeHeader 108{ 109 print $OUT qq~<?xml version="1.0" encoding="UTF-8"?> 110 111<office:document-content xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" xmlns:presentation="urn:oasis:names:tc:opendocument:xmlns:presentation:1.0" xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" xmlns:math="http://www.w3.org/1998/Math/MathML" xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" xmlns:ooo="http://openoffice.org/2004/office" xmlns:ooow="http://openoffice.org/2004/writer" xmlns:oooc="http://openoffice.org/2004/calc" xmlns:dom="http://www.w3.org/2001/xml-events" xmlns:xforms="http://www.w3.org/2002/xforms" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:smil="urn:oasis:names:tc:opendocument:xmlns:smil-compatible:1.0" xmlns:anim="urn:oasis:names:tc:opendocument:xmlns:animation:1.0" office:version="1.0"> 112 <office:scripts/> 113 <office:automatic-styles> 114~; 115 116} 117 118sub writeSlideStyles 119{ 120 my $mode = pop @_; 121 my $direction = pop @_; 122 my $transitionSubType = pop @_; 123 my $transitionType = pop @_; 124 my $slideNum = pop @_; 125 126 print $OUT " <style:style style:name=\"dp",$slideNum,"\" style:family=\"drawing-page\">\n"; 127 print $OUT " <style:drawing-page-properties presentation:transition-type=\"automatic\" presentation:duration=\"PT00H00M01S\" presentation:background-visible=\"true\" presentation:background-objects-visible=\"true\" draw:fill=\"solid\" draw:fill-color=\"#ff",$slideNum % 2 ? "ff99" : "cc99","\" smil:type=\"",$transitionType,"\" smil:subtype=\"",$transitionSubType,"\" ",$direction == 0 ? "" : "smil:direction=\"reverse\" ",$mode == 0 ? "" : "smil:mode=\"out\"","/>\n"; 128 print $OUT " </style:style>\n"; 129} 130 131sub writeIntermediate 132{ 133 print $OUT qq~ <style:style style:name="gr1" style:family="graphic"> 134 <style:graphic-properties style:protect="size"/> 135 </style:style> 136 <style:style style:name="pr1" style:family="presentation" style:parent-style-name="Default-title"> 137 <style:graphic-properties draw:fill-color="#ffffff" draw:auto-grow-height="true" fo:min-height="3.508cm"/> 138 </style:style> 139 <style:style style:name="pr2" style:family="presentation" style:parent-style-name="Default-notes"> 140 <style:graphic-properties draw:fill-color="#ffffff" draw:auto-grow-height="true" fo:min-height="13.367cm"/> 141 </style:style> 142 <style:style style:name="P1" style:family="paragraph"> 143 <style:paragraph-properties fo:margin-left="0cm" fo:margin-right="0cm" fo:text-indent="0cm"/> 144 </style:style> 145 <style:style style:name="P2" style:family="paragraph"> 146 <style:paragraph-properties fo:margin-left="0.6cm" fo:margin-right="0cm" fo:text-indent="-0.6cm"/> 147 </style:style> 148 <text:list-style style:name="L1"> 149 <text:list-level-style-bullet text:level="1" text:bullet-char="●"> 150 <style:text-properties fo:font-family="StarSymbol" style:use-window-font-color="true" fo:font-size="45%"/> 151 </text:list-level-style-bullet> 152 <text:list-level-style-bullet text:level="2" text:bullet-char="●"> 153 <style:list-level-properties text:space-before="0.6cm" text:min-label-width="0.6cm"/> 154 <style:text-properties fo:font-family="StarSymbol" style:use-window-font-color="true" fo:font-size="45%"/> 155 </text:list-level-style-bullet> 156 <text:list-level-style-bullet text:level="3" text:bullet-char="●"> 157 <style:list-level-properties text:space-before="1.2cm" text:min-label-width="0.6cm"/> 158 <style:text-properties fo:font-family="StarSymbol" style:use-window-font-color="true" fo:font-size="45%"/> 159 </text:list-level-style-bullet> 160 <text:list-level-style-bullet text:level="4" text:bullet-char="●"> 161 <style:list-level-properties text:space-before="1.8cm" text:min-label-width="0.6cm"/> 162 <style:text-properties fo:font-family="StarSymbol" style:use-window-font-color="true" fo:font-size="45%"/> 163 </text:list-level-style-bullet> 164 <text:list-level-style-bullet text:level="5" text:bullet-char="●"> 165 <style:list-level-properties text:space-before="2.4cm" text:min-label-width="0.6cm"/> 166 <style:text-properties fo:font-family="StarSymbol" style:use-window-font-color="true" fo:font-size="45%"/> 167 </text:list-level-style-bullet> 168 <text:list-level-style-bullet text:level="6" text:bullet-char="●"> 169 <style:list-level-properties text:space-before="3cm" text:min-label-width="0.6cm"/> 170 <style:text-properties fo:font-family="StarSymbol" style:use-window-font-color="true" fo:font-size="45%"/> 171 </text:list-level-style-bullet> 172 <text:list-level-style-bullet text:level="7" text:bullet-char="●"> 173 <style:list-level-properties text:space-before="3.6cm" text:min-label-width="0.6cm"/> 174 <style:text-properties fo:font-family="StarSymbol" style:use-window-font-color="true" fo:font-size="45%"/> 175 </text:list-level-style-bullet> 176 <text:list-level-style-bullet text:level="8" text:bullet-char="●"> 177 <style:list-level-properties text:space-before="4.2cm" text:min-label-width="0.6cm"/> 178 <style:text-properties fo:font-family="StarSymbol" style:use-window-font-color="true" fo:font-size="45%"/> 179 </text:list-level-style-bullet> 180 <text:list-level-style-bullet text:level="9" text:bullet-char="●"> 181 <style:list-level-properties text:space-before="4.8cm" text:min-label-width="0.6cm"/> 182 <style:text-properties fo:font-family="StarSymbol" style:use-window-font-color="true" fo:font-size="45%"/> 183 </text:list-level-style-bullet> 184 </text:list-style> 185 </office:automatic-styles> 186 <office:body> 187 <office:presentation> 188~; 189 190} 191 192sub writeSlide 193{ 194 my $mode = pop @_; 195 my $direction = pop @_; 196 my $transitionSubtype = pop @_; 197 my $transitionType = pop @_; 198 my $slideNum = pop @_; 199 200 print $OUT " <draw:page draw:name=\"page",$slideNum,"\" draw:style-name=\"dp",$slideNum,"\" draw:master-page-name=\"Default\" presentation:presentation-page-layout-name=\"AL1T19\">"; 201 202 print $OUT " <draw:frame presentation:style-name=\"pr1\" draw:layer=\"layout\" svg:width=\"25.199cm\" svg:height=\"3.256cm\" svg:x=\"1.4cm\" svg:y=\"0.962cm\" presentation:class=\"title\">\n"; 203 print $OUT " <draw:text-box>\n"; 204 print $OUT " <text:p text:style-name=\"P1\">Transition “",$slideNum-1,"”</text:p>\n"; 205 print $OUT " </draw:text-box>\n"; 206 print $OUT " </draw:frame>\n"; 207 print $OUT " <draw:frame presentation:style-name=\"pr2\" draw:layer=\"layout\" svg:width=\"25.199cm\" svg:height=\"13.609cm\" svg:x=\"1.4cm\" svg:y=\"4.914cm\" presentation:class=\"outline\">\n"; 208 print $OUT " <draw:text-box>\n"; 209 print $OUT " <text:list text:style-name=\"L2\">\n"; 210 print $OUT " <text:list-item>\n"; 211 print $OUT " <text:p text:style-name=\"P2\">Transition: ",$transitionType,"</text:p>\n"; 212 print $OUT " </text:list-item>\n"; 213 print $OUT " </text:list>\n"; 214 print $OUT " <text:list text:style-name=\"L2\">\n"; 215 print $OUT " <text:list-item>\n"; 216 print $OUT " <text:list>\n"; 217 print $OUT " <text:list-item>\n"; 218 print $OUT " <text:p text:style-name=\"P3\">Subtype: ",$transitionSubtype,"</text:p>\n"; 219 print $OUT " </text:list-item>\n"; 220 print $OUT " </text:list>\n"; 221 print $OUT " </text:list-item>\n"; 222 print $OUT " </text:list>\n"; 223 print $OUT " <text:list text:style-name=\"L2\">\n"; 224 print $OUT " <text:list-item>\n"; 225 print $OUT " <text:list>\n"; 226 print $OUT " <text:list-item>\n"; 227 print $OUT " <text:p text:style-name=\"P3\">Direction: ",$direction == 0 ? "forward" : "reverse","</text:p>\n"; 228 print $OUT " </text:list-item>\n"; 229 print $OUT " </text:list>\n"; 230 print $OUT " </text:list-item>\n"; 231 print $OUT " </text:list>\n"; 232 print $OUT " <text:list text:style-name=\"L2\">\n"; 233 print $OUT " <text:list-item>\n"; 234 print $OUT " <text:list>\n"; 235 print $OUT " <text:list-item>\n"; 236 print $OUT " <text:p text:style-name=\"P3\">Mode: ",$mode == 0 ? "in" : "out","</text:p>\n"; 237 print $OUT " </text:list-item>\n"; 238 print $OUT " </text:list>\n"; 239 print $OUT " </text:list-item>\n"; 240 print $OUT " </text:list>\n"; 241 print $OUT " </draw:text-box>\n"; 242 print $OUT " </draw:frame>\n"; 243 print $OUT " <presentation:notes draw:style-name=\"dp2\">\n"; 244 print $OUT " <draw:page-thumbnail draw:style-name=\"gr1\" draw:layer=\"layout\" svg:width=\"14.851cm\" svg:height=\"11.138cm\" svg:x=\"3.068cm\" svg:y=\"2.257cm\" draw:page-number=\"1\" presentation:class=\"page\"/>\n"; 245 print $OUT " <draw:frame presentation:style-name=\"pr3\" draw:layer=\"layout\" svg:width=\"16.79cm\" svg:height=\"13.116cm\" svg:x=\"2.098cm\" svg:y=\"14.109cm\" presentation:class=\"notes\" presentation:placeholder=\"true\">\n"; 246 print $OUT " <draw:text-box/>\n"; 247 print $OUT " </draw:frame>\n"; 248 print $OUT " </presentation:notes>\n"; 249 print $OUT " </draw:page>\n"; 250 251} 252 253sub writeFooter 254{ 255 print $OUT qq~ <presentation:settings presentation:full-screen="false"/> 256 </office:presentation> 257 </office:body> 258</office:document-content> 259~; 260 261} 262 263sub writeManifest 264{ 265 my $outFile = open_file("META-INF/manifest.xml"); 266 267 print $outFile qq~<?xml version="1.0" encoding="UTF-8"?> 268<!DOCTYPE manifest:manifest PUBLIC "-//OpenOffice.org//DTD Manifest 1.0//EN" "Manifest.dtd"> 269<manifest:manifest xmlns:manifest="urn:oasis:names:tc:opendocument:xmlns:manifest:1.0"> 270 <manifest:file-entry manifest:media-type="application/vnd.oasis.opendocument.presentation" manifest:full-path="/"/> 271 <manifest:file-entry manifest:media-type="text/xml" manifest:full-path="content.xml"/> 272</manifest:manifest> 273~; 274 275 $outFile->close; 276} 277 278 279$transitionsRef = [ 280 281 ["barWipe", 282 ["leftToRight", 283 "topToBottom"]], 284 285 ["blindsWipe", 286 ["vertical", 287 "horizontal"]], 288 289 ["boxWipe", 290 ["topLeft", 291 "topRight", 292 "bottomRight", 293 "bottomLeft", 294 "topCenter", 295 "rightCenter", 296 "bottomCenter", 297 "leftCenter"]], 298 299 ["fourBoxWipe", 300 ["cornersIn", 301 "cornersOut"]], 302 303 ["barnDoorWipe", 304 ["vertical", 305 "horizontal", 306 "diagonalBottomLeft", 307 "diagonalTopLeft"]], 308 309 ["bowTieWipe", 310 ["vertical", 311 "horizontal"]], 312 313 ["miscDiagonalWipe", 314 ["doubleBarnDoor", 315 "doubleDiamond"]], 316 317 ["veeWipe", 318 ["down", 319 "left", 320 "up", 321 "right"]], 322 323 ["barnVeeWipe", 324 ["top", 325 "left", 326 "up", 327 "right"]], 328 329 ["zigZagWipe", 330 ["leftToRight", 331 "topToBottom"]], 332 333 ["barnZigZagWipe", 334 ["vertical", 335 "horizontal"]], 336 337 ["irisWipe", 338 ["rectangle", 339 "diamond"]], 340 341 ["triangleWipe", 342 ["up", 343 "right", 344 "down", 345 "left"]], 346 347 ["arrowHeadWipe", 348 ["up", 349 "right", 350 "down", 351 "left"]], 352 353 ["pentagonWipe", 354 ["up", 355 "down"]], 356 357 ["hexagonWipe", 358 ["horizontal", 359 "vertical"]], 360 361 ["ellipseWipe", 362 ["circle", 363 "horizontal", 364 "vertical"]], 365 366 ["eyeWipe", 367 ["vertical", 368 "horizontal"]], 369 370 ["roundRectWipe", 371 ["horizontal", 372 "vertical"]], 373 374 ["starWipe", 375 ["fourPoint", 376 "fivePoint", 377 "sixPoint"]], 378 379 ["miscShapeWipe", 380 ["heart", 381 "keyhole"]], 382 383 ["clockWipe", 384 ["clockwiseTwelve", 385 "clockwiseThree", 386 "clockwiseSix", 387 "clockwiseNine"]], 388 389 ["pinWheelWipe", 390 ["oneBlade", 391 "twoBladeVertical", 392 "twoBladeHorizontal", 393 "threeBlade", 394 "fourBlade", 395 "eightBlade"]], 396 397 ["singleSweepWipe", 398 ["clockwiseTop", 399 "clockwiseRight", 400 "clockwiseBottom", 401 "clockwiseLeft", 402 "clockwiseTopLeft", 403 "counterClockwiseBottomLeft", 404 "clockwiseBottomRight", 405 "counterClockwiseTopRight"]], 406 407 ["fanWipe", 408 ["centerTop", 409 "centerRight", 410 "top", 411 "right", 412 "bottom", 413 "left"]], 414 415 ["doubleFanWipe", 416 ["fanOutVertical", 417 "fanOutHorizontal", 418 "fanInVertical", 419 "fanInHorizontal"]], 420 421 ["doubleSweepWipe", 422 ["parallelVertical", 423 "parallelDiagonal", 424 "oppositeVertical", 425 "oppositeHorizontal", 426 "parallelDiagonalTopLeft", 427 "parallelDiagonalBottomLeft"]], 428 429 ["saloonDoorWipe", 430 ["top", 431 "left", 432 "bottom", 433 "right"]], 434 435 ["windshieldWipe", 436 ["right", 437 "up", 438 "vertical", 439 "horizontal"]], 440 441 ["snakeWipe", 442 ["topLeftHorizontal", 443 "topLeftVertical", 444 "topLeftDiagonal", 445 "topRightDiagonal", 446 "bottomRightDiagonal", 447 "bottomLeftDiagonal"]], 448 449 ["spiralWipe", 450 ["topLeftClockwise", 451 "topRightClockwise", 452 "bottomRightClockwise", 453 "bottomLeftClockwise", 454 "topLeftCounterClockwise", 455 "topRightCounterClockwise", 456 "bottomRightCounterClockwise", 457 "bottomLeftCounterClockwise"]], 458 459 ["parallelSnakesWipe", 460 ["verticalTopSame", 461 "verticalBottomSame", 462 "verticalTopLeftOpposite", 463 "verticalBottomLeftOpposite", 464 "horizontalLeftSame", 465 "horizontalRightSame", 466 "horizontalTopLeftOpposite", 467 "horizontalTopRightOpposite", 468 "diagonalBottomLeftOpposite", 469 "diagonalTopLeftOpposite"]], 470 471 ["boxSnakesWipe", 472 ["twoBoxTop", 473 "twoBoxLeft", 474 "twoBoxRight", 475 "fourBoxVertical", 476 "fourBoxHorizontal"]], 477 478 ["waterfallWipe", 479 ["verticalLeft", 480 "verticalRight", 481 "horizontalLeft", 482 "horizontalRight"]], 483 484 ["pushWipe", 485 ["fromLeft", 486 "fromTop", 487 "fromRight", 488 "fromBottom", 489 "fromBottomRight", 490 "fromBottomLeft", 491 "fromTopRight", 492 "fromTopLeft", 493 "combHorizontal", 494 "combVertical"]], 495 496 ["slideWipe", 497 ["fromLeft", 498 "fromTop", 499 "fromRight", 500 "fromBottom", 501 "fromBottomRight", 502 "fromBottomLeft", 503 "fromTopRight", 504 "fromTopLeft"]], 505 506 ["fade", 507 ["crossfade", 508 "fadeToColor", 509 "fadeFromColor", 510 "fadeOverColor"]], 511 512 ["randomBarWipe", 513 ["vertical", 514 "horizontal"]], 515 516 ["checkerBoardWipe", 517 ["down", 518 "across"]], 519 520 ["dissolve", 521 ["default"]] 522]; 523 524 525############################################################################### 526# Print usage information. 527# 528sub usage () 529{ 530 print <<END_OF_USAGE; 531usage: $0 <option>* [<output-file-name>] 532 533output-file-name defaults to alltransitions.odp. 534 535options: -a Generate _all_ combinations of type, subtype, 536 direction, and mode 537 -h Print this usage information. 538END_OF_USAGE 539} 540 541############################################################################### 542# Process the command line. 543# 544sub process_command_line 545{ 546 foreach (@ARGV) 547 { 548 if (/^-h/) 549 { 550 usage; 551 exit 0; 552 } 553 } 554 555 $global_gen_all=0; 556 $global_output_name = "alltransitions.odp"; 557 558 my $j = 0; 559 for (my $i=0; $i<=$#ARGV; $i++) 560 { 561 if ($ARGV[$i] eq "-a") 562 { 563 $global_gen_all=1; 564 } 565 elsif ($ARGV[$i] =~ /^-/) 566 { 567 print "Unknown option $ARGV[$i]\n"; 568 usage; 569 exit 1; 570 } 571 elsif ($#ARGV == $i ) 572 { 573 $global_output_name = $ARGV[$i]; 574 } 575 } 576 577 print "output to $global_output_name\n"; 578} 579 580 581############################################################################### 582# Main 583############################################################################### 584 585$ZipCmd = $ENV{LOG_FILE_ZIP_CMD}; 586$ZipFlags = $ENV{LOG_FILE_ZIP_FLAGS}; 587# Provide default values for the zip command and it's flags. 588if ( ! defined $ZipCmd) 589{ 590 $ZipCmd = "zip" unless defined $ZipCmd; 591 $ZipFlags = "-r -q" unless defined $ZipFlags; 592} 593 594process_command_line(); 595 596writeManifest(); 597 598$OUT = open_file( "content.xml" ); 599 600writeHeader(); 601 602$slideNum=1; 603foreach $transitionRef (@$transitionsRef) 604{ 605 $transitionType = @$transitionRef[0]; 606 607 foreach $subtype (@{$transitionRef->[1]}) 608 { 609 if( $global_gen_all != 0 ) 610 { 611 writeSlideStyles($slideNum++, 612 $transitionType, 613 $subtype, 614 0, 0); 615 writeSlideStyles($slideNum++, 616 $transitionType, 617 $subtype, 618 1, 0); 619 writeSlideStyles($slideNum++, 620 $transitionType, 621 $subtype, 622 0, 1); 623 writeSlideStyles($slideNum++, 624 $transitionType, 625 $subtype, 626 1, 1); 627 } 628 else 629 { 630 writeSlideStyles($slideNum++, 631 $transitionType, 632 $subtype, 633 0, 0); 634 } 635 } 636} 637 638writeIntermediate(); 639 640$slideNum=1; 641foreach $transitionRef (@$transitionsRef) 642{ 643 $transitionType = @$transitionRef[0]; 644 645 foreach $subtype (@{$transitionRef->[1]}) 646 { 647 if( $global_gen_all != 0 ) 648 { 649 writeSlide($slideNum++, 650 $transitionType, 651 $subtype, 652 0, 0); 653 writeSlide($slideNum++, 654 $transitionType, 655 $subtype, 656 1, 0); 657 writeSlide($slideNum++, 658 $transitionType, 659 $subtype, 660 0, 1); 661 writeSlide($slideNum++, 662 $transitionType, 663 $subtype, 664 1, 1); 665 } 666 else 667 { 668 writeSlide($slideNum++, 669 $transitionType, 670 $subtype, 671 0, 0); 672 } 673 } 674} 675 676writeFooter(); 677 678$OUT->close; 679 680zip_dirtree ($global_output_name); 681 682