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