tdf#130857 qt weld: Support mail merge "Server Auth" dialog
[LibreOffice.git] / slideshow / qa / tools / mkeffects.pl
bloba3065b9a81f63d220fea59a3194da569bdea85ae
2 eval 'exec perl -wS $0 ${1+"$@"}'
3 if 0;
6 # This file is part of the LibreOffice project.
8 # This Source Code Form is subject to the terms of the Mozilla Public
9 # License, v. 2.0. If a copy of the MPL was not distributed with this
10 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
12 # This file incorporates work covered by the following license notice:
14 # Licensed to the Apache Software Foundation (ASF) under one or more
15 # contributor license agreements. See the NOTICE file distributed
16 # with this work for additional information regarding copyright
17 # ownership. The ASF licenses this file to you under the Apache
18 # License, Version 2.0 (the "License"); you may not use this file
19 # except in compliance with the License. You may obtain a copy of
20 # the License at http://www.apache.org/licenses/LICENSE-2.0 .
23 use IO::File;
24 use Cwd;
25 use File::Spec;
26 use File::Spec::Functions;
27 use File::Temp;
28 use File::Path;
30 $TempDir = "";
33 # all the XML package generation is a blatant rip from AF's
34 # write-calc-doc.pl
37 ###############################################################################
38 # Open a file with the given name.
39 # First it is checked if the temporary directory, in which all files for
40 # the document are gathered, is already present and create it if it is not.
41 # Then create the path to the file inside the temporary directory.
42 # Finally open the file and return a file handle to it.
44 sub open_file
46 my $filename = pop @_;
48 # Create base directory of temporary directory tree if not already
49 # present.
50 if ($TempDir eq "")
52 $TempDir = File::Temp::tempdir (CLEANUP => 1);
55 # Create the path to the file.
56 my $fullname = File::Spec->catfile ($TempDir, $filename);
57 my ($volume,$directories,$file) = File::Spec->splitpath ($fullname);
58 mkpath (File::Spec->catpath ($volume,$directories,""));
60 # Open the file and return a file handle to it.
61 return new IO::File ($fullname, "w");
65 ###############################################################################
66 # Zip the files in the directory tree into the given file.
68 sub zip_dirtree
70 my $filename = pop @_;
72 my $cwd = getcwd;
73 my $zip_name = $filename;
75 # We are about to change the directory.
76 # Therefore create an absolute pathname for the zip archive.
78 # First transfer the drive from $cwd to $zip_name. This is a
79 # workaround for a bug in file_name_is_absolute which thinks
80 # the path \bla is an absolute path under DOS.
81 my ($volume,$directories,$file) = File::Spec->splitpath ($zip_name);
82 my ($volume_cwd,$directories_cwd,$file_cwd) = File::Spec->splitpath ($cwd);
83 $volume = $volume_cwd if ($volume eq "");
84 $zip_name = File::Spec->catpath ($volume,$directories,$file);
86 # Add the current working directory to a relative path.
87 if ( ! file_name_is_absolute ($zip_name))
89 $zip_name = File::Spec->catfile ($cwd, $zip_name);
91 # Try everything to clean up the name.
92 $zip_name = File::Spec->rel2abs ($filename);
93 $zip_name = File::Spec->canonpath ($zip_name);
95 # Remove .. directories from the middle of the path.
96 while ($zip_name =~ /\/[^\/][^\.\/][^\/]*\/\.\.\//)
98 $zip_name = $` . "/" . $';
102 # Just in case the zip program gets confused by an existing file with the
103 # same name as the one to be written that file is removed first.
104 if ( -e $filename)
106 if (unlink ($filename) == 0)
108 print "Existing file $filename could not be deleted.\n";
109 print "Please close the application that uses it, then try again.\n";
110 return;
114 # Finally create the zip file. First change into the temporary directory
115 # so that the resulting zip file contains only paths relative to it.
116 print "zipping [$ZipCmd $ZipFlags $zip_name *]\n";
117 chdir ($TempDir);
118 system ("$ZipCmd $ZipFlags $zip_name *");
119 chdir ($cwd);
123 sub writeHeader
125 print $OUT qq~<?xml version="1.0" encoding="UTF-8"?>
127 <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">
128 <office:scripts/>
129 <office:automatic-styles>
130 <style:style style:name="dp1" style:family="drawing-page">
131 <style:drawing-page-properties presentation:background-visible="true" presentation:background-objects-visible="true" presentation:display-footer="true" presentation:display-page-number="false" presentation:display-date-time="true"/>
132 </style:style>
133 <style:style style:name="gr1" style:family="graphic" style:parent-style-name="standard">
134 <style:graphic-properties draw:textarea-horizontal-align="center" draw:textarea-vertical-align="middle"/>
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>
192 sub writeSlideHeader
194 my $titleText = pop @_;
195 my $slideNum = pop @_;
197 print $OUT " <draw:page draw:name=\"page1\" draw:style-name=\"dp1\" draw:master-page-name=\"Default\">\n";
198 print $OUT " <office:forms form:automatic-focus=\"false\" form:apply-design-mode=\"false\"/>\n";
199 print $OUT " <draw:rect draw:style-name=\"gr1\" draw:text-style-name=\"P1\" draw:id=\"id$slideNum\" draw:layer=\"layout\" svg:width=\"17.5cm\" svg:height=\"13cm\" svg:x=\"5cm\" svg:y=\"4cm\">\n";
200 print $OUT " <text:p text:style-name=\"P2\">Slide: $slideNum</text:p>\n";
201 print $OUT " <text:p text:style-name=\"P2\">Topic: $titleText</text:p>\n";
202 print $OUT " <text:p text:id=\"textid$slideNum\" text:style-name=\"P2\">Some text to show text effects</text:p>\n";
203 print $OUT " </draw:rect>\n";
204 print $OUT " <anim:par presentation:node-type=\"timing-root\">\n";
205 print $OUT " <anim:seq presentation:node-type=\"main-sequence\">\n";
209 sub writeSlideFooter
211 print $OUT " </anim:seq>\n";
212 print $OUT " </anim:par>\n";
213 print $OUT " <presentation:notes draw:style-name=\"dp1\">\n";
214 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";
215 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";
216 print $OUT " <draw:text-box/>\n";
217 print $OUT " </draw:frame>\n";
218 print $OUT " </presentation:notes>\n";
219 print $OUT " </draw:page>\n";
222 sub writeFooter
224 print $OUT qq~ <presentation:settings presentation:full-screen="false"/>
225 </office:presentation>
226 </office:body>
227 </office:document-content>
232 sub writeTransitionAnimation
234 my $transitionSubtype = pop @_;
235 my $transitionType = pop @_;
236 my $slideNum = pop @_;
238 print $OUT " <anim:par smil:begin=\"0s\" smil:fill=\"remove\">\n";
239 print $OUT " <anim:set smil:begin=\"0s\" smil:dur=\"0.001s\" smil:fill=\"hold\" smil:targetElement=\"textid$slideNum\" smil:attributeName=\"visibility\" smil:to=\"visible\"/>\n";
240 print $OUT " <anim:transitionFilter smil:dur=\"1s\" smil:targetElement=\"textid$slideNum\" smil:type=\"$transitionType\" smil:subtype=\"$transitionSubtype\"/>\n";
241 print $OUT " <anim:set smil:begin=\"0.3s\" smil:dur=\"0.001s\" smil:fill=\"hold\" smil:targetElement=\"id$slideNum\" smil:attributeName=\"visibility\" smil:to=\"visible\"/>\n";
242 print $OUT " <anim:transitionFilter smil:begin=\"0.3s\" smil:dur=\"1s\" smil:targetElement=\"id$slideNum\" smil:type=\"$transitionType\" smil:subtype=\"$transitionSubtype\"/>\n";
243 print $OUT " </anim:par>\n";
246 sub writePropertyAnimation
248 my $propertyEnd = pop @_;
249 my $propertyStart = pop @_;
250 my $propertyName = pop @_;
251 my $slideNum = pop @_;
253 print $OUT " <anim:par smil:begin=\"0s\" smil:dur=\"3s\" smil:fill=\"remove\">\n";
254 print $OUT " <anim:set smil:begin=\"0s\" smil:dur=\"0.001s\" smil:fill=\"hold\" smil:targetElement=\"id$slideNum\" smil:attributeName=\"visibility\" smil:to=\"visible\"/>\n";
255 print $OUT " <anim:animate smil:begin=\"0s\" smil:dur=\"1s\" smil:fill=\"hold\" smil:targetElement=\"id$slideNum\" smil:attributeName=\"$propertyName\" smil:values=\"$propertyStart;$propertyEnd\" smil:keyTimes=\"0;1\" presentation:additive=\"base\"/>\n";
256 print $OUT " <anim:set smil:begin=\"0.6s\" smil:dur=\"0.001s\" smil:fill=\"hold\" smil:targetElement=\"textid$slideNum\" smil:attributeName=\"visibility\" smil:to=\"visible\"/>\n";
257 print $OUT " <anim:animate smil:begin=\"0.6s\" smil:dur=\"1s\" smil:fill=\"hold\" smil:targetElement=\"textid$slideNum\" smil:attributeName=\"$propertyName\" smil:values=\"$propertyStart;$propertyEnd\" smil:keyTimes=\"0;1\" presentation:additive=\"base\"/>\n";
258 print $OUT " </anim:par>\n";
261 sub writeTransformAnimation
263 my $propertyBy = pop @_;
264 my $propertyName = pop @_;
265 my $slideNum = pop @_;
267 print $OUT " <anim:par smil:begin=\"0s\" smil:dur=\"3s\" smil:fill=\"remove\">\n";
268 print $OUT " <anim:set smil:begin=\"0s\" smil:dur=\"0.001s\" smil:fill=\"hold\" smil:targetElement=\"id$slideNum\" smil:attributeName=\"visibility\" smil:to=\"visible\"/>\n";
269 print $OUT " <anim:animateTransform smil:begin=\"0s\" smil:dur=\"1s\" smil:targetElement=\"id$slideNum\" smil:fill=\"hold\" smil:by=\"$propertyBy\" presentation:additive=\"base\" svg:type=\"$propertyName\"/>\n";
270 print $OUT " <anim:set smil:begin=\"0.6s\" smil:dur=\"0.001s\" smil:fill=\"hold\" smil:targetElement=\"textid$slideNum\" smil:attributeName=\"visibility\" smil:to=\"visible\"/>\n";
271 print $OUT " <anim:animateTransform smil:begin=\"0.6s\" smil:dur=\"1s\" smil:targetElement=\"textid$slideNum\" smil:fill=\"hold\" smil:by=\"$propertyBy\" presentation:additive=\"base\" svg:type=\"$propertyName\"/>\n";
272 print $OUT " </anim:par>\n";
275 sub writePathMotionAnimation
277 my $slideNum = pop @_;
279 print $OUT " <anim:par smil:begin=\"0s\" smil:dur=\"10s\" smil:fill=\"remove\">\n";
280 print $OUT " <anim:set smil:begin=\"0s\" smil:dur=\"0.001s\" smil:fill=\"hold\" smil:targetElement=\"id$slideNum\" smil:attributeName=\"visibility\" smil:to=\"visible\"/>\n";
281 print $OUT " <anim:animateMotion smil:dur=\"5s\" smil:fill=\"hold\" smil:targetElement=\"id$slideNum\" presentation:additive=\"base\" svg:path=\"m0.0 0.07658c0.0098-0.00493 0.00197-0.00985 0.00295-0.01478 0.00191 0.00 0.00383 0.00 0.00574 0.00-0.00005 0.00033-0.00011 0.00065-0.00016 0.00098-0.00034 0.00276-0.00060 0.00446-0.00077 0.00512-0.00021 0.00086-0.00031 0.00143-0.00031 0.00170 0.00 0.00200 0.00150 0.00369 0.00452 0.00507 0.00301 0.00138 0.00671 0.00206 0.01108 0.00206 0.00438 0.00 0.00816-0.00164 0.01134-0.00493 0.00319-0.00329 0.00478-0.00719 0.00478-0.01170 0.00-0.00514-0.00311-0.01022-0.00935-0.01525-0.00162-0.00129-0.00324-0.00258-0.00486-0.00387-0.00806-0.00651-0.01209-0.01290-0.01209-0.01917s0.0251-0.01148 0.00752-0.01561 0.01131-0.00620 0.01889-0.00620c0.0585 0.00 0.01276 0.00126 0.02072 0.00377-0.00102 0.00512-0.00203 0.01023-0.00305 0.01535-0.00191 0.00-0.00383 0.00-0.00574 0.00 0.00009-0.00052 0.00017-0.00103 0.00026-0.00155 0.00019-0.00195 0.00038-0.00389 0.00057-0.00584 0.00009-0.00062 0.00017-0.00124 0.00026-0.00186-0.00014-0.00183-0.00155-0.00337-0.00424-0.00462-0.00269-0.00126-0.00589-0.00189-0.00961-0.00189-0.00424 0.00-0.00782 0.00144-0.01075 0.00431-0.00293 0.00288-0.00439 0.00640-0.00439 0.01057 0.00 0.00510 0.00334 0.01035 0.01002 0.01576 0.00172 0.00138 0.00345 0.00275 0.00517 0.00413 0.00782 0.00631 0.01173 0.01277 0.01173 0.01938 0.00 0.00675-0.00272 0.01224-0.00816 0.01646-0.00545 0.00422-0.01256 0.00633-0.02134 0.00633-0.00538 0.00-0.01165-0.00105-0.01881-0.00315-0.00064-0.00019-0.00128-0.00038-0.00192-0.00057z\"/>\n";
282 print $OUT " <anim:set smil:begin=\"3.6s\" smil:dur=\"0.001s\" smil:fill=\"hold\" smil:targetElement=\"textid$slideNum\" smil:attributeName=\"visibility\" smil:to=\"visible\"/>\n";
283 print $OUT " <anim:animateMotion smil:begin=\"3.6s\" smil:dur=\"5s\" smil:fill=\"hold\" smil:targetElement=\"textid$slideNum\" presentation:additive=\"base\" svg:path=\"m0.0 0.07658c0.0098-0.00493 0.00197-0.00985 0.00295-0.01478 0.00191 0.00 0.00383 0.00 0.00574 0.00-0.00005 0.00033-0.00011 0.00065-0.00016 0.00098-0.00034 0.00276-0.00060 0.00446-0.00077 0.00512-0.00021 0.00086-0.00031 0.00143-0.00031 0.00170 0.00 0.00200 0.00150 0.00369 0.00452 0.00507 0.00301 0.00138 0.00671 0.00206 0.01108 0.00206 0.00438 0.00 0.00816-0.00164 0.01134-0.00493 0.00319-0.00329 0.00478-0.00719 0.00478-0.01170 0.00-0.00514-0.00311-0.01022-0.00935-0.01525-0.00162-0.00129-0.00324-0.00258-0.00486-0.00387-0.00806-0.00651-0.01209-0.01290-0.01209-0.01917s0.0251-0.01148 0.00752-0.01561 0.01131-0.00620 0.01889-0.00620c0.0585 0.00 0.01276 0.00126 0.02072 0.00377-0.00102 0.00512-0.00203 0.01023-0.00305 0.01535-0.00191 0.00-0.00383 0.00-0.00574 0.00 0.00009-0.00052 0.00017-0.00103 0.00026-0.00155 0.00019-0.00195 0.00038-0.00389 0.00057-0.00584 0.00009-0.00062 0.00017-0.00124 0.00026-0.00186-0.00014-0.00183-0.00155-0.00337-0.00424-0.00462-0.00269-0.00126-0.00589-0.00189-0.00961-0.00189-0.00424 0.00-0.00782 0.00144-0.01075 0.00431-0.00293 0.00288-0.00439 0.00640-0.00439 0.01057 0.00 0.00510 0.00334 0.01035 0.01002 0.01576 0.00172 0.00138 0.00345 0.00275 0.00517 0.00413 0.00782 0.00631 0.01173 0.01277 0.01173 0.01938 0.00 0.00675-0.00272 0.01224-0.00816 0.01646-0.00545 0.00422-0.01256 0.00633-0.02134 0.00633-0.00538 0.00-0.01165-0.00105-0.01881-0.00315-0.00064-0.00019-0.00128-0.00038-0.00192-0.00057z\"/>\n";
284 print $OUT " </anim:par>\n";
287 sub writeManifest
289 my $outFile = open_file("META-INF/manifest.xml");
291 print $outFile qq~<?xml version="1.0" encoding="UTF-8"?>
292 <!DOCTYPE manifest:manifest PUBLIC "-//OpenOffice.org//DTD Manifest 1.0//EN" "Manifest.dtd">
293 <manifest:manifest xmlns:manifest="urn:oasis:names:tc:opendocument:xmlns:manifest:1.0">
294 <manifest:file-entry manifest:media-type="application/vnd.oasis.opendocument.presentation" manifest:full-path="/"/>
295 <manifest:file-entry manifest:media-type="text/xml" manifest:full-path="content.xml"/>
296 </manifest:manifest>
299 $outFile->close;
303 ###############################################################################
304 # Print usage information.
306 sub usage ()
308 print <<END_OF_USAGE;
309 usage: $0 <option>* [<output-file-name>]
311 output-file-name defaults to alltransitions.odp.
313 options: -a Generate _all_ combinations of type, subtype,
314 direction, and mode
315 -h Print this usage information.
316 END_OF_USAGE
319 ###############################################################################
320 # Process the command line.
322 sub process_command_line
324 foreach (@ARGV)
326 if (/^-h/)
328 usage;
329 exit 0;
333 $global_gen_all=0;
334 $global_output_name = "alltransitions.odp";
336 my $j = 0;
337 for (my $i=0; $i<=$#ARGV; $i++)
339 if ($ARGV[$i] eq "-a")
341 $global_gen_all=1;
343 elsif ($ARGV[$i] =~ /^-/)
345 print "Unknown option $ARGV[$i]\n";
346 usage;
347 exit 1;
349 elsif ($#ARGV == $i )
351 $global_output_name = $ARGV[$i];
355 print "output to $global_output_name\n";
358 $transitionsRef = [
360 ["barWipe",
361 ["leftToRight",
362 "topToBottom"]],
364 ["blindsWipe",
365 ["vertical",
366 "horizontal"]],
368 ["boxWipe",
369 ["topLeft",
370 "topRight",
371 "bottomRight",
372 "bottomLeft",
373 "topCenter",
374 "rightCenter",
375 "bottomCenter",
376 "leftCenter"]],
378 ["fourBoxWipe",
379 ["cornersIn",
380 "cornersOut"]],
382 ["barnDoorWipe",
383 ["vertical",
384 "horizontal",
385 "diagonalBottomLeft",
386 "diagonalTopLeft"]],
388 ["bowTieWipe",
389 ["vertical",
390 "horizontal"]],
392 ["miscDiagonalWipe",
393 ["doubleBarnDoor",
394 "doubleDiamond"]],
396 ["veeWipe",
397 ["down",
398 "left",
399 "up",
400 "right"]],
402 ["barnVeeWipe",
403 ["top",
404 "left",
405 "up",
406 "right"]],
408 ["zigZagWipe",
409 ["leftToRight",
410 "topToBottom"]],
412 ["barnZigZagWipe",
413 ["vertical",
414 "horizontal"]],
416 ["irisWipe",
417 ["rectangle",
418 "diamond"]],
420 ["triangleWipe",
421 ["up",
422 "right",
423 "down",
424 "left"]],
426 ["arrowHeadWipe",
427 ["up",
428 "right",
429 "down",
430 "left"]],
432 ["pentagonWipe",
433 ["up",
434 "down"]],
436 ["hexagonWipe",
437 ["horizontal",
438 "vertical"]],
440 ["ellipseWipe",
441 ["circle",
442 "horizontal",
443 "vertical"]],
445 ["eyeWipe",
446 ["vertical",
447 "horizontal"]],
449 ["roundRectWipe",
450 ["horizontal",
451 "vertical"]],
453 ["starWipe",
454 ["fourPoint",
455 "fivePoint",
456 "sixPoint"]],
458 ["miscShapeWipe",
459 ["heart",
460 "keyhole"]],
462 ["clockWipe",
463 ["clockwiseTwelve",
464 "clockwiseThree",
465 "clockwiseSix",
466 "clockwiseNine"]],
468 ["pinWheelWipe",
469 ["oneBlade",
470 "twoBladeVertical",
471 "twoBladeHorizontal",
472 "threeBlade",
473 "fourBlade",
474 "eightBlade"]],
476 ["singleSweepWipe",
477 ["clockwiseTop",
478 "clockwiseRight",
479 "clockwiseBottom",
480 "clockwiseLeft",
481 "clockwiseTopLeft",
482 "counterClockwiseBottomLeft",
483 "clockwiseBottomRight",
484 "counterClockwiseTopRight"]],
486 ["fanWipe",
487 ["centerTop",
488 "centerRight",
489 "top",
490 "right",
491 "bottom",
492 "left"]],
494 ["doubleFanWipe",
495 ["fanOutVertical",
496 "fanOutHorizontal",
497 "fanInVertical",
498 "fanInHorizontal"]],
500 ["doubleSweepWipe",
501 ["parallelVertical",
502 "parallelDiagonal",
503 "oppositeVertical",
504 "oppositeHorizontal",
505 "parallelDiagonalTopLeft",
506 "parallelDiagonalBottomLeft"]],
508 ["saloonDoorWipe",
509 ["top",
510 "left",
511 "bottom",
512 "right"]],
514 ["windshieldWipe",
515 ["right",
516 "up",
517 "vertical",
518 "horizontal"]],
520 ["snakeWipe",
521 ["topLeftHorizontal",
522 "topLeftVertical",
523 "topLeftDiagonal",
524 "topRightDiagonal",
525 "bottomRightDiagonal",
526 "bottomLeftDiagonal"]],
528 ["spiralWipe",
529 ["topLeftClockwise",
530 "topRightClockwise",
531 "bottomRightClockwise",
532 "bottomLeftClockwise",
533 "topLeftCounterClockwise",
534 "topRightCounterClockwise",
535 "bottomRightCounterClockwise",
536 "bottomLeftCounterClockwise"]],
538 ["parallelSnakesWipe",
539 ["verticalTopSame",
540 "verticalBottomSame",
541 "verticalTopLeftOpposite",
542 "verticalBottomLeftOpposite",
543 "horizontalLeftSame",
544 "horizontalRightSame",
545 "horizontalTopLeftOpposite",
546 "horizontalTopRightOpposite",
547 "diagonalBottomLeftOpposite",
548 "diagonalTopLeftOpposite"]],
550 ["boxSnakesWipe",
551 ["twoBoxTop",
552 "twoBoxLeft",
553 "twoBoxRight",
554 "fourBoxVertical",
555 "fourBoxHorizontal"]],
557 ["waterfallWipe",
558 ["verticalLeft",
559 "verticalRight",
560 "horizontalLeft",
561 "horizontalRight"]],
563 ["pushWipe",
564 ["fromLeft",
565 "fromTop",
566 "fromRight",
567 "fromBottom",
568 "fromBottomRight",
569 "fromBottomLeft",
570 "fromTopRight",
571 "fromTopLeft",
572 "combHorizontal",
573 "combVertical"]],
575 ["slideWipe",
576 ["fromLeft",
577 "fromTop",
578 "fromRight",
579 "fromBottom"]],
581 ["fade",
582 ["crossfade",
583 "fadeToColor",
584 "fadeFromColor",
585 "fadeOverColor"]],
587 ["randomBarWipe",
588 ["vertical",
589 "horizontal"]],
591 ["checkerBoardWipe",
592 ["down",
593 "across"]],
595 ["dissolve",
596 ["default"]]
599 $propertiesRef = [
600 [ "value", "color", "#000000", "#FF0000" ],
602 [ "string", "font-family", "Helvetica", "Times New Roman" ],
604 [ "value", "font-size", "1pt", "1.5pt" ],
606 [ "string", "font-style", "normal", "italic" ],
608 [ "string", "text-underline", "none", "solid" ],
610 [ "string", "font-weight", "normal", "bold" ],
612 [ "value", "fill-color", "#000000", "#00FF00" ],
614 [ "string", "fill", "none", "solid" ],
616 [ "value", "height", "0.5*height", "height" ],
618 [ "value", "stroke-color", "#000000", "#0000FF" ],
620 [ "string", "stroke", "none", "solid" ],
622 [ "value", "opacity", "0.0", "0.9" ],
624 [ "value", "rotate", "0", "90" ],
626 [ "value", "skewX", "0", "-1" ],
628 [ "value", "skewY", "0", "-1" ],
630 [ "string", "visibility", "hidden", "visible" ],
632 [ "value", "width", "0.5*width", "width" ],
634 [ "value", "x", "x-0.1", "x+0.1" ],
636 [ "value", "y", "y-0.1", "y+0.1" ]
639 $transformsRef = [
640 ["translate", "0.5*width,0.5*height"],
641 ["scale", "0.5*width,0.5*height"],
642 ["rotate", "270"],
643 ["skewX", "-1"],
644 ["skewY", "1"]
648 ###############################################################################
649 # Main
650 ###############################################################################
652 $ZipCmd = $ENV{LOG_FILE_ZIP_CMD};
653 $ZipFlags = $ENV{LOG_FILE_ZIP_FLAGS};
654 # Provide default values for the zip command and it's flags.
655 if ( ! defined $ZipCmd)
657 $ZipCmd = "zip" unless defined $ZipCmd;
658 $ZipFlags = "-r -q" unless defined $ZipFlags;
661 process_command_line();
663 writeManifest();
665 $OUT = open_file( "content.xml" );
667 writeHeader();
669 $transitionNum=0;
670 writeSlideHeader($transitionNum, "Transition effects");
672 foreach $transitionRef (@$transitionsRef)
674 $transitionType = @$transitionRef[0];
676 foreach $subtype (@{$transitionRef->[1]})
678 writeTransitionAnimation($transitionNum,
679 $transitionType,
680 $subtype);
684 writeSlideFooter();
686 writeSlideHeader(++$transitionNum, "Property effects");
688 foreach $propertyRef (@$propertiesRef)
690 $propertyType = @$propertyRef[0];
692 if( $propertyType eq "value" )
694 writePropertyAnimation( $transitionNum, @$propertyRef[1], @$propertyRef[2], @$propertyRef[3] );
696 elsif( $propertyType eq "string" )
699 else
701 die "Unexpected case";
705 writeSlideFooter();
707 writeSlideHeader(++$transitionNum, "Transformation effects");
709 foreach $transformRef (@$transformsRef)
711 writeTransformAnimation( $transitionNum, @$transformRef[0], @$transformRef[1] );
714 writeSlideFooter();
716 writeSlideHeader(++$transitionNum, "Path motion effects");
717 writePathMotionAnimation($transitionNum);
718 writeSlideFooter();
720 print $OUT qq~
721 <draw:page draw:name="page1" draw:style-name="dp1" draw:master-page-name="Default">
722 <office:forms form:automatic-focus="false" form:apply-design-mode="false"/>
723 <draw:rect draw:style-name="gr1" draw:text-style-name="P1" draw:id="id10000" draw:layer="layout" svg:width="17.5cm" svg:height="13cm" svg:x="5cm" svg:y="4cm">
724 <text:p text:style-name="P2">Slide: 4</text:p>
725 <text:p text:style-name="P2">Topic: Misc effects</text:p>
726 <text:p text:id="textid10001" text:style-name="P2">Some text to show accelerate effects</text:p>
727 <text:p text:id="textid10002" text:style-name="P2">Some text to show decelerate effects</text:p>
728 <text:p text:id="textid10003" text:style-name="P2">Some text to show additive effects</text:p>
729 <text:p text:id="textid10004" text:style-name="P2">Some text to show autoreverse effects</text:p>
730 <text:p text:id="textid10005" text:style-name="P2">Some text to show key value effects</text:p>
731 <text:p text:id="textid10006" text:style-name="P2">Some text to show discrete key value effects</text:p>
732 <text:p text:id="textid10007" text:style-name="P2">Some text to show formula effects</text:p>
733 </draw:rect>
734 <anim:par presentation:node-type="timing-root">
735 <anim:seq presentation:node-type="main-sequence">
737 <anim:par smil:begin="0s" smil:fill="remove">
738 <anim:set smil:begin="0s" smil:dur="0.001s" smil:fill="hold" smil:targetElement="textid10001" smil:attributeName="visibility" smil:to="visible"/>
739 <anim:animate smil:begin="0s" smil:dur="10s" smil:fill="hold" smil:targetElement="textid10001" smil:accelerate="0.5" smil:attributeName="x" smil:by="0.3" presentation:additive="base"/>
740 </anim:par>
742 <anim:par smil:begin="0s" smil:fill="remove">
743 <anim:set smil:begin="0s" smil:dur="0.001s" smil:fill="hold" smil:targetElement="textid10002" smil:attributeName="visibility" smil:to="visible"/>
744 <anim:animate smil:begin="0s" smil:dur="10s" smil:fill="hold" smil:targetElement="textid10002" smil:decelerate="0.5" smil:attributeName="x" smil:by="0.3" presentation:additive="base"/>
745 </anim:par>
747 <anim:par smil:begin="0s" smil:fill="remove">
748 <anim:set smil:begin="0s" smil:dur="0.001s" smil:fill="hold" smil:targetElement="textid10003" smil:attributeName="visibility" smil:to="visible"/>
749 <anim:animate smil:begin="0s" smil:dur="3s" smil:fill="hold" smil:targetElement="textid10003" smil:attributeName="x" smil:to="0.3" presentation:additive="sum"/>
750 <anim:animate smil:begin="0s" smil:dur="6s" smil:fill="hold" smil:targetElement="textid10003" smil:attributeName="x" smil:to="0.3" presentation:additive="sum"/>
751 </anim:par>
753 <anim:par smil:begin="0s" smil:fill="remove">
754 <anim:set smil:begin="0s" smil:dur="0.001s" smil:fill="hold" smil:targetElement="textid10004" smil:attributeName="visibility" smil:to="visible"/>
755 <anim:animate smil:begin="0s" smil:dur="5s" smil:fill="hold" smil:targetElement="textid10004" smil:attributeName="y" smil:from="0.3" smil:to="0.8" smil:autoReverse="true" presentation:additive="base"/>
756 </anim:par>
758 <anim:par smil:begin="0s" smil:fill="remove">
759 <anim:set smil:begin="0s" smil:dur="0.001s" smil:fill="hold" smil:targetElement="textid10005" smil:attributeName="visibility" smil:to="visible"/>
760 <anim:animateTransform smil:begin="0s" smil:dur="10s" smil:fill="hold" smil:targetElement="textid10005" smil:values="0.5,0.5;0.8,0.5;0.8,0.8;0.5,0.5" smil:keyTimes="0;0.3;0.6;1" presentation:additive="base" svg:type="translate"/>
761 </anim:par>
763 <anim:par smil:begin="0s" smil:fill="remove">
764 <anim:set smil:begin="0s" smil:dur="0.001s" smil:fill="hold" smil:targetElement="textid10006" smil:attributeName="visibility" smil:to="visible"/>
765 <anim:animateTransform smil:begin="0s" smil:dur="10s" smil:fill="hold" smil:targetElement="textid10006" smil:values="0.5,0.5;0.8,0.5;0.8,0.8;0.5,0.5" smil:keyTimes="0;0.3;0.6;1" smil:calcMode="discrete" presentation:additive="base" svg:type="translate"/>
766 </anim:par>
768 <anim:par smil:begin="0s" smil:fill="remove">
769 <anim:set smil:begin="0s" smil:dur="0.001s" smil:fill="hold" smil:targetElement="textid10007" smil:attributeName="visibility" smil:to="visible"/>
770 <anim:animate smil:begin="0s" smil:dur="3s" smil:fill="hold" smil:targetElement="textid10007" smil:attributeName="y" smil:values="0;1" smil:keyTimes="0;1" anim:formula="y+0.3*height*sin(5*pi*\$)" presentation:additive="base"/>
771 </anim:par>
774 writeSlideFooter();
776 # iterate, single paragraphs, word, lines, sentences, characters
778 print $OUT qq~
779 <draw:page draw:name="page1" draw:style-name="dp1" draw:master-page-name="Default">
780 <office:forms form:automatic-focus="false" form:apply-design-mode="false"/>
781 <draw:rect draw:style-name="gr1" draw:text-style-name="P1" draw:id="id20000" draw:layer="layout" svg:width="17.5cm" svg:height="13cm" svg:x="5cm" svg:y="4cm">
782 <text:p text:style-name="P2">Slide: 5</text:p>
783 <text:p text:style-name="P2">Topic: Text effects</text:p>
784 <text:p text:id="textid20001" text:style-name="P2">Some text to show iterated single paragraph</text:p>
785 <text:p text:id="textid20002" text:style-name="P2">Some text to show iterated word-by-word effects</text:p>
786 <text:p text:id="textid20003" text:style-name="P2">Some text to show iterated letter-by-letter effects</text:p>
787 <text:p text:id="textid20004" text:style-name="P2">Some more text</text:p>
788 <text:p text:id="textid20005" text:style-name="P2">Some more text</text:p>
789 <text:p text:id="textid20006" text:style-name="P2">Some more text</text:p>
790 <text:p text:id="textid20007" text:style-name="P2">Some more text</text:p>
791 <text:p text:id="textid20008" text:style-name="P2">Some more text</text:p>
792 </draw:rect>
793 <anim:par presentation:node-type="timing-root">
794 <anim:seq presentation:node-type="main-sequence">
796 <anim:par smil:begin="0s" smil:fill="remove">
797 <anim:iterate smil:begin="0s" smil:fill="hold" smil:targetElement="id20000" anim:iterate-type="by-paragraph" anim:iterate-interval="0.2s">
798 <anim:set smil:begin="0s" smil:dur="0.001s" smil:fill="hold" smil:attributeName="visibility" smil:to="visible"/>
799 <anim:animate smil:begin="0s" smil:dur="2s" smil:fill="hold" smil:decelerate="0.5" smil:attributeName="x" smil:from="1.0" smil:to="x" presentation:additive="base"/>
800 </anim:iterate>
801 </anim:par>
803 <anim:par smil:begin="0s" smil:fill="remove">
804 <anim:set smil:begin="0s" smil:dur="0.001s" smil:targetElement="id20000" smil:fill="hold" smil:attributeName="visibility" smil:to="visible"/>
805 <anim:iterate smil:begin="0s" smil:fill="hold" smil:targetElement="textid20002" anim:iterate-type="by-word" anim:iterate-interval="0.2s">
806 <anim:set smil:begin="0s" smil:dur="0.001s" smil:fill="hold" smil:attributeName="visibility" smil:to="visible"/>
807 <anim:animate smil:begin="0s" smil:dur="2s" smil:fill="hold" smil:decelerate="0.5" smil:attributeName="x" smil:from="1.0" smil:to="x" presentation:additive="base"/>
808 </anim:iterate>
809 </anim:par>
811 <anim:par smil:begin="0s" smil:fill="remove">
812 <anim:set smil:begin="0s" smil:dur="0.001s" smil:targetElement="id20000" smil:fill="hold" smil:attributeName="visibility" smil:to="visible"/>
813 <anim:iterate smil:begin="0s" smil:fill="hold" smil:targetElement="textid20003" anim:iterate-type="by-letter" anim:iterate-interval="0.2s">
814 <anim:set smil:begin="0s" smil:dur="0.001s" smil:fill="hold" smil:attributeName="visibility" smil:to="visible"/>
815 <anim:animate smil:begin="0s" smil:dur="2s" smil:fill="hold" smil:decelerate="0.5" smil:attributeName="x" smil:from="1.0" smil:to="x" presentation:additive="base"/>
816 </anim:iterate>
817 </anim:par>
820 writeSlideFooter();
822 writeFooter();
824 $OUT->close;
826 zip_dirtree ($global_output_name);