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