1*cdf0e10cSrcweir: 2*cdf0e10cSrcweireval 'exec perl -wS $0 ${1+"$@"}' 3*cdf0e10cSrcweir if 0; 4*cdf0e10cSrcweir 5*cdf0e10cSrcweir 6*cdf0e10cSrcweiruse IO::File; 7*cdf0e10cSrcweiruse Cwd; 8*cdf0e10cSrcweiruse File::Spec; 9*cdf0e10cSrcweiruse File::Spec::Functions; 10*cdf0e10cSrcweiruse File::Temp; 11*cdf0e10cSrcweiruse File::Path; 12*cdf0e10cSrcweir 13*cdf0e10cSrcweir$TempDir = ""; 14*cdf0e10cSrcweir 15*cdf0e10cSrcweir 16*cdf0e10cSrcweir# all the XML package generation is a blatant rip from AF's 17*cdf0e10cSrcweir# write-calc-doc.pl 18*cdf0e10cSrcweir 19*cdf0e10cSrcweir 20*cdf0e10cSrcweir############################################################################### 21*cdf0e10cSrcweir# Open a file with the given name. 22*cdf0e10cSrcweir# First it is checked if the temporary directory, in which all files for 23*cdf0e10cSrcweir# the document are gathered, is already present and create it if it is not. 24*cdf0e10cSrcweir# Then create the path to the file inside the temporary directory. 25*cdf0e10cSrcweir# Finally open the file and return a file handle to it. 26*cdf0e10cSrcweir# 27*cdf0e10cSrcweirsub open_file 28*cdf0e10cSrcweir{ 29*cdf0e10cSrcweir my $filename = pop @_; 30*cdf0e10cSrcweir 31*cdf0e10cSrcweir # Create base directory of temporary directory tree if not alreay 32*cdf0e10cSrcweir # present. 33*cdf0e10cSrcweir if ($TempDir eq "") 34*cdf0e10cSrcweir { 35*cdf0e10cSrcweir $TempDir = File::Temp::tempdir (CLEANUP => 1); 36*cdf0e10cSrcweir } 37*cdf0e10cSrcweir 38*cdf0e10cSrcweir # Create the path to the file. 39*cdf0e10cSrcweir my $fullname = File::Spec->catfile ($TempDir, $filename); 40*cdf0e10cSrcweir my ($volume,$directories,$file) = File::Spec->splitpath ($fullname); 41*cdf0e10cSrcweir mkpath (File::Spec->catpath ($volume,$directories,"")); 42*cdf0e10cSrcweir 43*cdf0e10cSrcweir # Open the file and return a file handle to it. 44*cdf0e10cSrcweir return new IO::File ($fullname, "w"); 45*cdf0e10cSrcweir} 46*cdf0e10cSrcweir 47*cdf0e10cSrcweir 48*cdf0e10cSrcweir############################################################################### 49*cdf0e10cSrcweir# Zip the files in the directory tree into the given file. 50*cdf0e10cSrcweir# 51*cdf0e10cSrcweirsub zip_dirtree 52*cdf0e10cSrcweir{ 53*cdf0e10cSrcweir my $filename = pop @_; 54*cdf0e10cSrcweir 55*cdf0e10cSrcweir my $cwd = getcwd; 56*cdf0e10cSrcweir my $zip_name = $filename; 57*cdf0e10cSrcweir 58*cdf0e10cSrcweir # We are about to change the directory. 59*cdf0e10cSrcweir # Therefore create an absolute pathname for the zip archive. 60*cdf0e10cSrcweir 61*cdf0e10cSrcweir # First transfer the drive from $cwd to $zip_name. This is a 62*cdf0e10cSrcweir # workaround for a bug in file_name_is_absolute which thinks 63*cdf0e10cSrcweir # the the path \bla is an absolute path under DOS. 64*cdf0e10cSrcweir my ($volume,$directories,$file) = File::Spec->splitpath ($zip_name); 65*cdf0e10cSrcweir my ($volume_cwd,$directories_cwd,$file_cwd) = File::Spec->splitpath ($cwd); 66*cdf0e10cSrcweir $volume = $volume_cwd if ($volume eq ""); 67*cdf0e10cSrcweir $zip_name = File::Spec->catpath ($volume,$directories,$file); 68*cdf0e10cSrcweir 69*cdf0e10cSrcweir # Add the current working directory to a relative path. 70*cdf0e10cSrcweir if ( ! file_name_is_absolute ($zip_name)) 71*cdf0e10cSrcweir { 72*cdf0e10cSrcweir $zip_name = File::Spec->catfile ($cwd, $zip_name); 73*cdf0e10cSrcweir 74*cdf0e10cSrcweir # Try everything to clean up the name. 75*cdf0e10cSrcweir $zip_name = File::Spec->rel2abs ($filename); 76*cdf0e10cSrcweir $zip_name = File::Spec->canonpath ($zip_name); 77*cdf0e10cSrcweir 78*cdf0e10cSrcweir # Remove .. directories from the middle of the path. 79*cdf0e10cSrcweir while ($zip_name =~ /\/[^\/][^\.\/][^\/]*\/\.\.\//) 80*cdf0e10cSrcweir { 81*cdf0e10cSrcweir $zip_name = $` . "/" . $'; 82*cdf0e10cSrcweir } 83*cdf0e10cSrcweir } 84*cdf0e10cSrcweir 85*cdf0e10cSrcweir # Just in case the zip program gets confused by an existing file with the 86*cdf0e10cSrcweir # same name as the one to be written that file is removed first. 87*cdf0e10cSrcweir if ( -e $filename) 88*cdf0e10cSrcweir { 89*cdf0e10cSrcweir if (unlink ($filename) == 0) 90*cdf0e10cSrcweir { 91*cdf0e10cSrcweir print "Existing file $filename could not be deleted.\n"; 92*cdf0e10cSrcweir print "Please close the application that uses it, then try again.\n"; 93*cdf0e10cSrcweir return; 94*cdf0e10cSrcweir } 95*cdf0e10cSrcweir } 96*cdf0e10cSrcweir 97*cdf0e10cSrcweir # Finally create the zip file. First change into the temporary directory 98*cdf0e10cSrcweir # so that the resulting zip file contains only paths relative to it. 99*cdf0e10cSrcweir print "zipping [$ZipCmd $ZipFlags $zip_name *]\n"; 100*cdf0e10cSrcweir chdir ($TempDir); 101*cdf0e10cSrcweir system ("$ZipCmd $ZipFlags $zip_name *"); 102*cdf0e10cSrcweir chdir ($cwd); 103*cdf0e10cSrcweir} 104*cdf0e10cSrcweir 105*cdf0e10cSrcweir 106*cdf0e10cSrcweirsub writeHeader 107*cdf0e10cSrcweir{ 108*cdf0e10cSrcweir print $OUT qq~<?xml version="1.0" encoding="UTF-8"?> 109*cdf0e10cSrcweir 110*cdf0e10cSrcweir<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"> 111*cdf0e10cSrcweir <office:scripts/> 112*cdf0e10cSrcweir <office:automatic-styles> 113*cdf0e10cSrcweir <style:style style:name="dp1" style:family="drawing-page"> 114*cdf0e10cSrcweir <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"/> 115*cdf0e10cSrcweir </style:style> 116*cdf0e10cSrcweir <style:style style:name="gr1" style:family="graphic" style:parent-style-name="standard"> 117*cdf0e10cSrcweir <style:graphic-properties draw:textarea-horizontal-align="center" draw:textarea-vertical-align="middle"/> 118*cdf0e10cSrcweir </style:style> 119*cdf0e10cSrcweir <style:style style:name="pr1" style:family="presentation" style:parent-style-name="Default-title"> 120*cdf0e10cSrcweir <style:graphic-properties draw:fill-color="#ffffff" draw:auto-grow-height="true" fo:min-height="3.508cm"/> 121*cdf0e10cSrcweir </style:style> 122*cdf0e10cSrcweir <style:style style:name="pr2" style:family="presentation" style:parent-style-name="Default-notes"> 123*cdf0e10cSrcweir <style:graphic-properties draw:fill-color="#ffffff" draw:auto-grow-height="true" fo:min-height="13.367cm"/> 124*cdf0e10cSrcweir </style:style> 125*cdf0e10cSrcweir <style:style style:name="P1" style:family="paragraph"> 126*cdf0e10cSrcweir <style:paragraph-properties fo:margin-left="0cm" fo:margin-right="0cm" fo:text-indent="0cm"/> 127*cdf0e10cSrcweir </style:style> 128*cdf0e10cSrcweir <style:style style:name="P2" style:family="paragraph"> 129*cdf0e10cSrcweir <style:paragraph-properties fo:margin-left="0.6cm" fo:margin-right="0cm" fo:text-indent="-0.6cm"/> 130*cdf0e10cSrcweir </style:style> 131*cdf0e10cSrcweir <text:list-style style:name="L1"> 132*cdf0e10cSrcweir <text:list-level-style-bullet text:level="1" text:bullet-char="●"> 133*cdf0e10cSrcweir <style:text-properties fo:font-family="StarSymbol" style:use-window-font-color="true" fo:font-size="45%"/> 134*cdf0e10cSrcweir </text:list-level-style-bullet> 135*cdf0e10cSrcweir <text:list-level-style-bullet text:level="2" text:bullet-char="●"> 136*cdf0e10cSrcweir <style:list-level-properties text:space-before="0.6cm" text:min-label-width="0.6cm"/> 137*cdf0e10cSrcweir <style:text-properties fo:font-family="StarSymbol" style:use-window-font-color="true" fo:font-size="45%"/> 138*cdf0e10cSrcweir </text:list-level-style-bullet> 139*cdf0e10cSrcweir <text:list-level-style-bullet text:level="3" text:bullet-char="●"> 140*cdf0e10cSrcweir <style:list-level-properties text:space-before="1.2cm" text:min-label-width="0.6cm"/> 141*cdf0e10cSrcweir <style:text-properties fo:font-family="StarSymbol" style:use-window-font-color="true" fo:font-size="45%"/> 142*cdf0e10cSrcweir </text:list-level-style-bullet> 143*cdf0e10cSrcweir <text:list-level-style-bullet text:level="4" text:bullet-char="●"> 144*cdf0e10cSrcweir <style:list-level-properties text:space-before="1.8cm" text:min-label-width="0.6cm"/> 145*cdf0e10cSrcweir <style:text-properties fo:font-family="StarSymbol" style:use-window-font-color="true" fo:font-size="45%"/> 146*cdf0e10cSrcweir </text:list-level-style-bullet> 147*cdf0e10cSrcweir <text:list-level-style-bullet text:level="5" text:bullet-char="●"> 148*cdf0e10cSrcweir <style:list-level-properties text:space-before="2.4cm" text:min-label-width="0.6cm"/> 149*cdf0e10cSrcweir <style:text-properties fo:font-family="StarSymbol" style:use-window-font-color="true" fo:font-size="45%"/> 150*cdf0e10cSrcweir </text:list-level-style-bullet> 151*cdf0e10cSrcweir <text:list-level-style-bullet text:level="6" text:bullet-char="●"> 152*cdf0e10cSrcweir <style:list-level-properties text:space-before="3cm" text:min-label-width="0.6cm"/> 153*cdf0e10cSrcweir <style:text-properties fo:font-family="StarSymbol" style:use-window-font-color="true" fo:font-size="45%"/> 154*cdf0e10cSrcweir </text:list-level-style-bullet> 155*cdf0e10cSrcweir <text:list-level-style-bullet text:level="7" text:bullet-char="●"> 156*cdf0e10cSrcweir <style:list-level-properties text:space-before="3.6cm" text:min-label-width="0.6cm"/> 157*cdf0e10cSrcweir <style:text-properties fo:font-family="StarSymbol" style:use-window-font-color="true" fo:font-size="45%"/> 158*cdf0e10cSrcweir </text:list-level-style-bullet> 159*cdf0e10cSrcweir <text:list-level-style-bullet text:level="8" text:bullet-char="●"> 160*cdf0e10cSrcweir <style:list-level-properties text:space-before="4.2cm" text:min-label-width="0.6cm"/> 161*cdf0e10cSrcweir <style:text-properties fo:font-family="StarSymbol" style:use-window-font-color="true" fo:font-size="45%"/> 162*cdf0e10cSrcweir </text:list-level-style-bullet> 163*cdf0e10cSrcweir <text:list-level-style-bullet text:level="9" text:bullet-char="●"> 164*cdf0e10cSrcweir <style:list-level-properties text:space-before="4.8cm" text:min-label-width="0.6cm"/> 165*cdf0e10cSrcweir <style:text-properties fo:font-family="StarSymbol" style:use-window-font-color="true" fo:font-size="45%"/> 166*cdf0e10cSrcweir </text:list-level-style-bullet> 167*cdf0e10cSrcweir </text:list-style> 168*cdf0e10cSrcweir </office:automatic-styles> 169*cdf0e10cSrcweir <office:body> 170*cdf0e10cSrcweir <office:presentation> 171*cdf0e10cSrcweir~; 172*cdf0e10cSrcweir 173*cdf0e10cSrcweir} 174*cdf0e10cSrcweir 175*cdf0e10cSrcweirsub writeSlideHeader 176*cdf0e10cSrcweir{ 177*cdf0e10cSrcweir my $titleText = pop @_; 178*cdf0e10cSrcweir my $slideNum = pop @_; 179*cdf0e10cSrcweir 180*cdf0e10cSrcweir print $OUT " <draw:page draw:name=\"page1\" draw:style-name=\"dp1\" draw:master-page-name=\"Default\">\n"; 181*cdf0e10cSrcweir print $OUT " <office:forms form:automatic-focus=\"false\" form:apply-design-mode=\"false\"/>\n"; 182*cdf0e10cSrcweir 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"; 183*cdf0e10cSrcweir print $OUT " <text:p text:style-name=\"P2\">Slide: $slideNum</text:p>\n"; 184*cdf0e10cSrcweir print $OUT " <text:p text:style-name=\"P2\">Topic: $titleText</text:p>\n"; 185*cdf0e10cSrcweir print $OUT " <text:p text:id=\"textid$slideNum\" text:style-name=\"P2\">Some text to show text effects</text:p>\n"; 186*cdf0e10cSrcweir print $OUT " </draw:rect>\n"; 187*cdf0e10cSrcweir print $OUT " <anim:par presentation:node-type=\"timing-root\">\n"; 188*cdf0e10cSrcweir print $OUT " <anim:seq presentation:node-type=\"main-sequence\">\n"; 189*cdf0e10cSrcweir} 190*cdf0e10cSrcweir 191*cdf0e10cSrcweir 192*cdf0e10cSrcweirsub writeSlideFooter 193*cdf0e10cSrcweir{ 194*cdf0e10cSrcweir print $OUT " </anim:seq>\n"; 195*cdf0e10cSrcweir print $OUT " </anim:par>\n"; 196*cdf0e10cSrcweir print $OUT " <presentation:notes draw:style-name=\"dp1\">\n"; 197*cdf0e10cSrcweir 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"; 198*cdf0e10cSrcweir 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"; 199*cdf0e10cSrcweir print $OUT " <draw:text-box/>\n"; 200*cdf0e10cSrcweir print $OUT " </draw:frame>\n"; 201*cdf0e10cSrcweir print $OUT " </presentation:notes>\n"; 202*cdf0e10cSrcweir print $OUT " </draw:page>\n"; 203*cdf0e10cSrcweir} 204*cdf0e10cSrcweir 205*cdf0e10cSrcweirsub writeFooter 206*cdf0e10cSrcweir{ 207*cdf0e10cSrcweir print $OUT qq~ <presentation:settings presentation:full-screen="false"/> 208*cdf0e10cSrcweir </office:presentation> 209*cdf0e10cSrcweir </office:body> 210*cdf0e10cSrcweir</office:document-content> 211*cdf0e10cSrcweir~; 212*cdf0e10cSrcweir 213*cdf0e10cSrcweir} 214*cdf0e10cSrcweir 215*cdf0e10cSrcweirsub writeTransitionAnimation 216*cdf0e10cSrcweir{ 217*cdf0e10cSrcweir my $transitionSubtype = pop @_; 218*cdf0e10cSrcweir my $transitionType = pop @_; 219*cdf0e10cSrcweir my $slideNum = pop @_; 220*cdf0e10cSrcweir 221*cdf0e10cSrcweir print $OUT " <anim:par smil:begin=\"0s\" smil:fill=\"remove\">\n"; 222*cdf0e10cSrcweir 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"; 223*cdf0e10cSrcweir print $OUT " <anim:transitionFilter smil:dur=\"1s\" smil:targetElement=\"textid$slideNum\" smil:type=\"$transitionType\" smil:subtype=\"$transitionSubtype\"/>\n"; 224*cdf0e10cSrcweir 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"; 225*cdf0e10cSrcweir print $OUT " <anim:transitionFilter smil:begin=\"0.3s\" smil:dur=\"1s\" smil:targetElement=\"id$slideNum\" smil:type=\"$transitionType\" smil:subtype=\"$transitionSubtype\"/>\n"; 226*cdf0e10cSrcweir print $OUT " </anim:par>\n"; 227*cdf0e10cSrcweir} 228*cdf0e10cSrcweir 229*cdf0e10cSrcweirsub writePropertyAnimation 230*cdf0e10cSrcweir{ 231*cdf0e10cSrcweir my $propertyEnd = pop @_; 232*cdf0e10cSrcweir my $propertyStart = pop @_; 233*cdf0e10cSrcweir my $propertyName = pop @_; 234*cdf0e10cSrcweir my $slideNum = pop @_; 235*cdf0e10cSrcweir 236*cdf0e10cSrcweir print $OUT " <anim:par smil:begin=\"0s\" smil:dur=\"3s\" smil:fill=\"remove\">\n"; 237*cdf0e10cSrcweir 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"; 238*cdf0e10cSrcweir 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"; 239*cdf0e10cSrcweir 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"; 240*cdf0e10cSrcweir 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"; 241*cdf0e10cSrcweir print $OUT " </anim:par>\n"; 242*cdf0e10cSrcweir} 243*cdf0e10cSrcweir 244*cdf0e10cSrcweirsub writeTransformAnimation 245*cdf0e10cSrcweir{ 246*cdf0e10cSrcweir my $propertyBy = pop @_; 247*cdf0e10cSrcweir my $propertyName = pop @_; 248*cdf0e10cSrcweir my $slideNum = pop @_; 249*cdf0e10cSrcweir 250*cdf0e10cSrcweir print $OUT " <anim:par smil:begin=\"0s\" smil:dur=\"3s\" smil:fill=\"remove\">\n"; 251*cdf0e10cSrcweir 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"; 252*cdf0e10cSrcweir 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"; 253*cdf0e10cSrcweir 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"; 254*cdf0e10cSrcweir 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"; 255*cdf0e10cSrcweir print $OUT " </anim:par>\n"; 256*cdf0e10cSrcweir} 257*cdf0e10cSrcweir 258*cdf0e10cSrcweirsub writePathMotionAnimation 259*cdf0e10cSrcweir{ 260*cdf0e10cSrcweir my $slideNum = pop @_; 261*cdf0e10cSrcweir 262*cdf0e10cSrcweir print $OUT " <anim:par smil:begin=\"0s\" smil:dur=\"10s\" smil:fill=\"remove\">\n"; 263*cdf0e10cSrcweir 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"; 264*cdf0e10cSrcweir 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"; 265*cdf0e10cSrcweir 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"; 266*cdf0e10cSrcweir 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"; 267*cdf0e10cSrcweir print $OUT " </anim:par>\n"; 268*cdf0e10cSrcweir} 269*cdf0e10cSrcweir 270*cdf0e10cSrcweirsub writeManifest 271*cdf0e10cSrcweir{ 272*cdf0e10cSrcweir my $outFile = open_file("META-INF/manifest.xml"); 273*cdf0e10cSrcweir 274*cdf0e10cSrcweir print $outFile qq~<?xml version="1.0" encoding="UTF-8"?> 275*cdf0e10cSrcweir<!DOCTYPE manifest:manifest PUBLIC "-//OpenOffice.org//DTD Manifest 1.0//EN" "Manifest.dtd"> 276*cdf0e10cSrcweir<manifest:manifest xmlns:manifest="urn:oasis:names:tc:opendocument:xmlns:manifest:1.0"> 277*cdf0e10cSrcweir <manifest:file-entry manifest:media-type="application/vnd.oasis.opendocument.presentation" manifest:full-path="/"/> 278*cdf0e10cSrcweir <manifest:file-entry manifest:media-type="text/xml" manifest:full-path="content.xml"/> 279*cdf0e10cSrcweir</manifest:manifest> 280*cdf0e10cSrcweir~; 281*cdf0e10cSrcweir 282*cdf0e10cSrcweir $outFile->close; 283*cdf0e10cSrcweir} 284*cdf0e10cSrcweir 285*cdf0e10cSrcweir 286*cdf0e10cSrcweir############################################################################### 287*cdf0e10cSrcweir# Print usage information. 288*cdf0e10cSrcweir# 289*cdf0e10cSrcweirsub usage () 290*cdf0e10cSrcweir{ 291*cdf0e10cSrcweir print <<END_OF_USAGE; 292*cdf0e10cSrcweirusage: $0 <option>* [<output-file-name>] 293*cdf0e10cSrcweir 294*cdf0e10cSrcweiroutput-file-name defaults to alltransitions.odp. 295*cdf0e10cSrcweir 296*cdf0e10cSrcweiroptions: -a Generate _all_ combinations of type, subtype, 297*cdf0e10cSrcweir direction, and mode 298*cdf0e10cSrcweir -h Print this usage information. 299*cdf0e10cSrcweirEND_OF_USAGE 300*cdf0e10cSrcweir} 301*cdf0e10cSrcweir 302*cdf0e10cSrcweir############################################################################### 303*cdf0e10cSrcweir# Process the command line. 304*cdf0e10cSrcweir# 305*cdf0e10cSrcweirsub process_command_line 306*cdf0e10cSrcweir{ 307*cdf0e10cSrcweir foreach (@ARGV) 308*cdf0e10cSrcweir { 309*cdf0e10cSrcweir if (/^-h/) 310*cdf0e10cSrcweir { 311*cdf0e10cSrcweir usage; 312*cdf0e10cSrcweir exit 0; 313*cdf0e10cSrcweir } 314*cdf0e10cSrcweir } 315*cdf0e10cSrcweir 316*cdf0e10cSrcweir $global_gen_all=0; 317*cdf0e10cSrcweir $global_output_name = "alltransitions.odp"; 318*cdf0e10cSrcweir 319*cdf0e10cSrcweir my $j = 0; 320*cdf0e10cSrcweir for (my $i=0; $i<=$#ARGV; $i++) 321*cdf0e10cSrcweir { 322*cdf0e10cSrcweir if ($ARGV[$i] eq "-a") 323*cdf0e10cSrcweir { 324*cdf0e10cSrcweir $global_gen_all=1; 325*cdf0e10cSrcweir } 326*cdf0e10cSrcweir elsif ($ARGV[$i] =~ /^-/) 327*cdf0e10cSrcweir { 328*cdf0e10cSrcweir print "Unknown option $ARGV[$i]\n"; 329*cdf0e10cSrcweir usage; 330*cdf0e10cSrcweir exit 1; 331*cdf0e10cSrcweir } 332*cdf0e10cSrcweir elsif ($#ARGV == $i ) 333*cdf0e10cSrcweir { 334*cdf0e10cSrcweir $global_output_name = $ARGV[$i]; 335*cdf0e10cSrcweir } 336*cdf0e10cSrcweir } 337*cdf0e10cSrcweir 338*cdf0e10cSrcweir print "output to $global_output_name\n"; 339*cdf0e10cSrcweir} 340*cdf0e10cSrcweir 341*cdf0e10cSrcweir$transitionsRef = [ 342*cdf0e10cSrcweir 343*cdf0e10cSrcweir ["barWipe", 344*cdf0e10cSrcweir ["leftToRight", 345*cdf0e10cSrcweir "topToBottom"]], 346*cdf0e10cSrcweir 347*cdf0e10cSrcweir ["blindsWipe", 348*cdf0e10cSrcweir ["vertical", 349*cdf0e10cSrcweir "horizontal"]], 350*cdf0e10cSrcweir 351*cdf0e10cSrcweir ["boxWipe", 352*cdf0e10cSrcweir ["topLeft", 353*cdf0e10cSrcweir "topRight", 354*cdf0e10cSrcweir "bottomRight", 355*cdf0e10cSrcweir "bottomLeft", 356*cdf0e10cSrcweir "topCenter", 357*cdf0e10cSrcweir "rightCenter", 358*cdf0e10cSrcweir "bottomCenter", 359*cdf0e10cSrcweir "leftCenter"]], 360*cdf0e10cSrcweir 361*cdf0e10cSrcweir ["fourBoxWipe", 362*cdf0e10cSrcweir ["cornersIn", 363*cdf0e10cSrcweir "cornersOut"]], 364*cdf0e10cSrcweir 365*cdf0e10cSrcweir ["barnDoorWipe", 366*cdf0e10cSrcweir ["vertical", 367*cdf0e10cSrcweir "horizontal", 368*cdf0e10cSrcweir "diagonalBottomLeft", 369*cdf0e10cSrcweir "diagonalTopLeft"]], 370*cdf0e10cSrcweir 371*cdf0e10cSrcweir ["bowTieWipe", 372*cdf0e10cSrcweir ["vertical", 373*cdf0e10cSrcweir "horizontal"]], 374*cdf0e10cSrcweir 375*cdf0e10cSrcweir ["miscDiagonalWipe", 376*cdf0e10cSrcweir ["doubleBarnDoor", 377*cdf0e10cSrcweir "doubleDiamond"]], 378*cdf0e10cSrcweir 379*cdf0e10cSrcweir ["veeWipe", 380*cdf0e10cSrcweir ["down", 381*cdf0e10cSrcweir "left", 382*cdf0e10cSrcweir "up", 383*cdf0e10cSrcweir "right"]], 384*cdf0e10cSrcweir 385*cdf0e10cSrcweir ["barnVeeWipe", 386*cdf0e10cSrcweir ["top", 387*cdf0e10cSrcweir "left", 388*cdf0e10cSrcweir "up", 389*cdf0e10cSrcweir "right"]], 390*cdf0e10cSrcweir 391*cdf0e10cSrcweir ["zigZagWipe", 392*cdf0e10cSrcweir ["leftToRight", 393*cdf0e10cSrcweir "topToBottom"]], 394*cdf0e10cSrcweir 395*cdf0e10cSrcweir ["barnZigZagWipe", 396*cdf0e10cSrcweir ["vertical", 397*cdf0e10cSrcweir "horizontal"]], 398*cdf0e10cSrcweir 399*cdf0e10cSrcweir ["irisWipe", 400*cdf0e10cSrcweir ["rectangle", 401*cdf0e10cSrcweir "diamond"]], 402*cdf0e10cSrcweir 403*cdf0e10cSrcweir ["triangleWipe", 404*cdf0e10cSrcweir ["up", 405*cdf0e10cSrcweir "right", 406*cdf0e10cSrcweir "down", 407*cdf0e10cSrcweir "left"]], 408*cdf0e10cSrcweir 409*cdf0e10cSrcweir ["arrowHeadWipe", 410*cdf0e10cSrcweir ["up", 411*cdf0e10cSrcweir "right", 412*cdf0e10cSrcweir "down", 413*cdf0e10cSrcweir "left"]], 414*cdf0e10cSrcweir 415*cdf0e10cSrcweir ["pentagonWipe", 416*cdf0e10cSrcweir ["up", 417*cdf0e10cSrcweir "down"]], 418*cdf0e10cSrcweir 419*cdf0e10cSrcweir ["hexagonWipe", 420*cdf0e10cSrcweir ["horizontal", 421*cdf0e10cSrcweir "vertical"]], 422*cdf0e10cSrcweir 423*cdf0e10cSrcweir ["ellipseWipe", 424*cdf0e10cSrcweir ["circle", 425*cdf0e10cSrcweir "horizontal", 426*cdf0e10cSrcweir "vertical"]], 427*cdf0e10cSrcweir 428*cdf0e10cSrcweir ["eyeWipe", 429*cdf0e10cSrcweir ["vertical", 430*cdf0e10cSrcweir "horizontal"]], 431*cdf0e10cSrcweir 432*cdf0e10cSrcweir ["roundRectWipe", 433*cdf0e10cSrcweir ["horizontal", 434*cdf0e10cSrcweir "vertical"]], 435*cdf0e10cSrcweir 436*cdf0e10cSrcweir ["starWipe", 437*cdf0e10cSrcweir ["fourPoint", 438*cdf0e10cSrcweir "fivePoint", 439*cdf0e10cSrcweir "sixPoint"]], 440*cdf0e10cSrcweir 441*cdf0e10cSrcweir ["miscShapeWipe", 442*cdf0e10cSrcweir ["heart", 443*cdf0e10cSrcweir "keyhole"]], 444*cdf0e10cSrcweir 445*cdf0e10cSrcweir ["clockWipe", 446*cdf0e10cSrcweir ["clockwiseTwelve", 447*cdf0e10cSrcweir "clockwiseThree", 448*cdf0e10cSrcweir "clockwiseSix", 449*cdf0e10cSrcweir "clockwiseNine"]], 450*cdf0e10cSrcweir 451*cdf0e10cSrcweir ["pinWheelWipe", 452*cdf0e10cSrcweir ["oneBlade", 453*cdf0e10cSrcweir "twoBladeVertical", 454*cdf0e10cSrcweir "twoBladeHorizontal", 455*cdf0e10cSrcweir "threeBlade", 456*cdf0e10cSrcweir "fourBlade", 457*cdf0e10cSrcweir "eightBlade"]], 458*cdf0e10cSrcweir 459*cdf0e10cSrcweir ["singleSweepWipe", 460*cdf0e10cSrcweir ["clockwiseTop", 461*cdf0e10cSrcweir "clockwiseRight", 462*cdf0e10cSrcweir "clockwiseBottom", 463*cdf0e10cSrcweir "clockwiseLeft", 464*cdf0e10cSrcweir "clockwiseTopLeft", 465*cdf0e10cSrcweir "counterClockwiseBottomLeft", 466*cdf0e10cSrcweir "clockwiseBottomRight", 467*cdf0e10cSrcweir "counterClockwiseTopRight"]], 468*cdf0e10cSrcweir 469*cdf0e10cSrcweir ["fanWipe", 470*cdf0e10cSrcweir ["centerTop", 471*cdf0e10cSrcweir "centerRight", 472*cdf0e10cSrcweir "top", 473*cdf0e10cSrcweir "right", 474*cdf0e10cSrcweir "bottom", 475*cdf0e10cSrcweir "left"]], 476*cdf0e10cSrcweir 477*cdf0e10cSrcweir ["doubleFanWipe", 478*cdf0e10cSrcweir ["fanOutVertical", 479*cdf0e10cSrcweir "fanOutHorizontal", 480*cdf0e10cSrcweir "fanInVertical", 481*cdf0e10cSrcweir "fanInHorizontal"]], 482*cdf0e10cSrcweir 483*cdf0e10cSrcweir ["doubleSweepWipe", 484*cdf0e10cSrcweir ["parallelVertical", 485*cdf0e10cSrcweir "parallelDiagonal", 486*cdf0e10cSrcweir "oppositeVertical", 487*cdf0e10cSrcweir "oppositeHorizontal", 488*cdf0e10cSrcweir "parallelDiagonalTopLeft", 489*cdf0e10cSrcweir "parallelDiagonalBottomLeft"]], 490*cdf0e10cSrcweir 491*cdf0e10cSrcweir ["saloonDoorWipe", 492*cdf0e10cSrcweir ["top", 493*cdf0e10cSrcweir "left", 494*cdf0e10cSrcweir "bottom", 495*cdf0e10cSrcweir "right"]], 496*cdf0e10cSrcweir 497*cdf0e10cSrcweir ["windshieldWipe", 498*cdf0e10cSrcweir ["right", 499*cdf0e10cSrcweir "up", 500*cdf0e10cSrcweir "vertical", 501*cdf0e10cSrcweir "horizontal"]], 502*cdf0e10cSrcweir 503*cdf0e10cSrcweir ["snakeWipe", 504*cdf0e10cSrcweir ["topLeftHorizontal", 505*cdf0e10cSrcweir "topLeftVertical", 506*cdf0e10cSrcweir "topLeftDiagonal", 507*cdf0e10cSrcweir "topRightDiagonal", 508*cdf0e10cSrcweir "bottomRightDiagonal", 509*cdf0e10cSrcweir "bottomLeftDiagonal"]], 510*cdf0e10cSrcweir 511*cdf0e10cSrcweir ["spiralWipe", 512*cdf0e10cSrcweir ["topLeftClockwise", 513*cdf0e10cSrcweir "topRightClockwise", 514*cdf0e10cSrcweir "bottomRightClockwise", 515*cdf0e10cSrcweir "bottomLeftClockwise", 516*cdf0e10cSrcweir "topLeftCounterClockwise", 517*cdf0e10cSrcweir "topRightCounterClockwise", 518*cdf0e10cSrcweir "bottomRightCounterClockwise", 519*cdf0e10cSrcweir "bottomLeftCounterClockwise"]], 520*cdf0e10cSrcweir 521*cdf0e10cSrcweir ["parallelSnakesWipe", 522*cdf0e10cSrcweir ["verticalTopSame", 523*cdf0e10cSrcweir "verticalBottomSame", 524*cdf0e10cSrcweir "verticalTopLeftOpposite", 525*cdf0e10cSrcweir "verticalBottomLeftOpposite", 526*cdf0e10cSrcweir "horizontalLeftSame", 527*cdf0e10cSrcweir "horizontalRightSame", 528*cdf0e10cSrcweir "horizontalTopLeftOpposite", 529*cdf0e10cSrcweir "horizontalTopRightOpposite", 530*cdf0e10cSrcweir "diagonalBottomLeftOpposite", 531*cdf0e10cSrcweir "diagonalTopLeftOpposite"]], 532*cdf0e10cSrcweir 533*cdf0e10cSrcweir ["boxSnakesWipe", 534*cdf0e10cSrcweir ["twoBoxTop", 535*cdf0e10cSrcweir "twoBoxLeft", 536*cdf0e10cSrcweir "twoBoxRight", 537*cdf0e10cSrcweir "fourBoxVertical", 538*cdf0e10cSrcweir "fourBoxHorizontal"]], 539*cdf0e10cSrcweir 540*cdf0e10cSrcweir ["waterfallWipe", 541*cdf0e10cSrcweir ["verticalLeft", 542*cdf0e10cSrcweir "verticalRight", 543*cdf0e10cSrcweir "horizontalLeft", 544*cdf0e10cSrcweir "horizontalRight"]], 545*cdf0e10cSrcweir 546*cdf0e10cSrcweir ["pushWipe", 547*cdf0e10cSrcweir ["fromLeft", 548*cdf0e10cSrcweir "fromTop", 549*cdf0e10cSrcweir "fromRight", 550*cdf0e10cSrcweir "fromBottom", 551*cdf0e10cSrcweir "fromBottomRight", 552*cdf0e10cSrcweir "fromBottomLeft", 553*cdf0e10cSrcweir "fromTopRight", 554*cdf0e10cSrcweir "fromTopLeft", 555*cdf0e10cSrcweir "combHorizontal", 556*cdf0e10cSrcweir "combVertical"]], 557*cdf0e10cSrcweir 558*cdf0e10cSrcweir ["slideWipe", 559*cdf0e10cSrcweir ["fromLeft", 560*cdf0e10cSrcweir "fromTop", 561*cdf0e10cSrcweir "fromRight", 562*cdf0e10cSrcweir "fromBottom"]], 563*cdf0e10cSrcweir 564*cdf0e10cSrcweir ["fade", 565*cdf0e10cSrcweir ["crossfade", 566*cdf0e10cSrcweir "fadeToColor", 567*cdf0e10cSrcweir "fadeFromColor", 568*cdf0e10cSrcweir "fadeOverColor"]], 569*cdf0e10cSrcweir 570*cdf0e10cSrcweir ["randomBarWipe", 571*cdf0e10cSrcweir ["vertical", 572*cdf0e10cSrcweir "horizontal"]], 573*cdf0e10cSrcweir 574*cdf0e10cSrcweir ["checkerBoardWipe", 575*cdf0e10cSrcweir ["down", 576*cdf0e10cSrcweir "across"]], 577*cdf0e10cSrcweir 578*cdf0e10cSrcweir ["dissolve", 579*cdf0e10cSrcweir ["default"]] 580*cdf0e10cSrcweir]; 581*cdf0e10cSrcweir 582*cdf0e10cSrcweir$propertiesRef = [ 583*cdf0e10cSrcweir [ "value", "color", "#000000", "#FF0000" ], 584*cdf0e10cSrcweir 585*cdf0e10cSrcweir [ "string", "font-family", "Helvetica", "Times New Roman" ], 586*cdf0e10cSrcweir 587*cdf0e10cSrcweir [ "value", "font-size", "1pt", "1.5pt" ], 588*cdf0e10cSrcweir 589*cdf0e10cSrcweir [ "string", "font-style", "normal", "italic" ], 590*cdf0e10cSrcweir 591*cdf0e10cSrcweir [ "string", "text-underline", "none", "solid" ], 592*cdf0e10cSrcweir 593*cdf0e10cSrcweir [ "string", "font-weight", "normal", "bold" ], 594*cdf0e10cSrcweir 595*cdf0e10cSrcweir [ "value", "fill-color", "#000000", "#00FF00" ], 596*cdf0e10cSrcweir 597*cdf0e10cSrcweir [ "string", "fill", "none", "solid" ], 598*cdf0e10cSrcweir 599*cdf0e10cSrcweir [ "value", "height", "0.5*height", "height" ], 600*cdf0e10cSrcweir 601*cdf0e10cSrcweir [ "value", "stroke-color", "#000000", "#0000FF" ], 602*cdf0e10cSrcweir 603*cdf0e10cSrcweir [ "string", "stroke", "none", "solid" ], 604*cdf0e10cSrcweir 605*cdf0e10cSrcweir [ "value", "opacity", "0.0", "0.9" ], 606*cdf0e10cSrcweir 607*cdf0e10cSrcweir [ "value", "rotate", "0", "90" ], 608*cdf0e10cSrcweir 609*cdf0e10cSrcweir [ "value", "skewX", "0", "-1" ], 610*cdf0e10cSrcweir 611*cdf0e10cSrcweir [ "value", "skewY", "0", "-1" ], 612*cdf0e10cSrcweir 613*cdf0e10cSrcweir [ "string", "visibility", "hidden", "visible" ], 614*cdf0e10cSrcweir 615*cdf0e10cSrcweir [ "value", "width", "0.5*width", "width" ], 616*cdf0e10cSrcweir 617*cdf0e10cSrcweir [ "value", "x", "x-0.1", "x+0.1" ], 618*cdf0e10cSrcweir 619*cdf0e10cSrcweir [ "value", "y", "y-0.1", "y+0.1" ] 620*cdf0e10cSrcweir ]; 621*cdf0e10cSrcweir 622*cdf0e10cSrcweir$transformsRef = [ 623*cdf0e10cSrcweir ["translate", "0.5*width,0.5*height"], 624*cdf0e10cSrcweir ["scale", "0.5*width,0.5*height"], 625*cdf0e10cSrcweir ["rotate", "270"], 626*cdf0e10cSrcweir ["skewX", "-1"], 627*cdf0e10cSrcweir ["skewY", "1"] 628*cdf0e10cSrcweir]; 629*cdf0e10cSrcweir 630*cdf0e10cSrcweir 631*cdf0e10cSrcweir############################################################################### 632*cdf0e10cSrcweir# Main 633*cdf0e10cSrcweir############################################################################### 634*cdf0e10cSrcweir 635*cdf0e10cSrcweir$ZipCmd = $ENV{LOG_FILE_ZIP_CMD}; 636*cdf0e10cSrcweir$ZipFlags = $ENV{LOG_FILE_ZIP_FLAGS}; 637*cdf0e10cSrcweir# Provide default values for the zip command and it's flags. 638*cdf0e10cSrcweirif ( ! defined $ZipCmd) 639*cdf0e10cSrcweir{ 640*cdf0e10cSrcweir $ZipCmd = "zip" unless defined $ZipCmd; 641*cdf0e10cSrcweir $ZipFlags = "-r -q" unless defined $ZipFlags; 642*cdf0e10cSrcweir} 643*cdf0e10cSrcweir 644*cdf0e10cSrcweirprocess_command_line(); 645*cdf0e10cSrcweir 646*cdf0e10cSrcweirwriteManifest(); 647*cdf0e10cSrcweir 648*cdf0e10cSrcweir$OUT = open_file( "content.xml" ); 649*cdf0e10cSrcweir 650*cdf0e10cSrcweirwriteHeader(); 651*cdf0e10cSrcweir 652*cdf0e10cSrcweir$transitionNum=0; 653*cdf0e10cSrcweirwriteSlideHeader($transitionNum, "Transition effects"); 654*cdf0e10cSrcweir 655*cdf0e10cSrcweirforeach $transitionRef (@$transitionsRef) 656*cdf0e10cSrcweir{ 657*cdf0e10cSrcweir $transitionType = @$transitionRef[0]; 658*cdf0e10cSrcweir 659*cdf0e10cSrcweir foreach $subtype (@{$transitionRef->[1]}) 660*cdf0e10cSrcweir { 661*cdf0e10cSrcweir writeTransitionAnimation($transitionNum, 662*cdf0e10cSrcweir $transitionType, 663*cdf0e10cSrcweir $subtype); 664*cdf0e10cSrcweir } 665*cdf0e10cSrcweir} 666*cdf0e10cSrcweir 667*cdf0e10cSrcweirwriteSlideFooter(); 668*cdf0e10cSrcweir 669*cdf0e10cSrcweirwriteSlideHeader(++$transitionNum, "Property effects"); 670*cdf0e10cSrcweir 671*cdf0e10cSrcweirforeach $propertyRef (@$propertiesRef) 672*cdf0e10cSrcweir{ 673*cdf0e10cSrcweir $propertyType = @$propertyRef[0]; 674*cdf0e10cSrcweir 675*cdf0e10cSrcweir if( $propertyType eq "value" ) 676*cdf0e10cSrcweir { 677*cdf0e10cSrcweir writePropertyAnimation( $transitionNum, @$propertyRef[1], @$propertyRef[2], @$propertyRef[3] ); 678*cdf0e10cSrcweir } 679*cdf0e10cSrcweir elsif( $propertyType eq "string" ) 680*cdf0e10cSrcweir { 681*cdf0e10cSrcweir } 682*cdf0e10cSrcweir else 683*cdf0e10cSrcweir { 684*cdf0e10cSrcweir die "Unexpected case"; 685*cdf0e10cSrcweir } 686*cdf0e10cSrcweir} 687*cdf0e10cSrcweir 688*cdf0e10cSrcweirwriteSlideFooter(); 689*cdf0e10cSrcweir 690*cdf0e10cSrcweirwriteSlideHeader(++$transitionNum, "Transformation effects"); 691*cdf0e10cSrcweir 692*cdf0e10cSrcweirforeach $transformRef (@$transformsRef) 693*cdf0e10cSrcweir{ 694*cdf0e10cSrcweir writeTransformAnimation( $transitionNum, @$transformRef[0], @$transformRef[1] ); 695*cdf0e10cSrcweir} 696*cdf0e10cSrcweir 697*cdf0e10cSrcweirwriteSlideFooter(); 698*cdf0e10cSrcweir 699*cdf0e10cSrcweirwriteSlideHeader(++$transitionNum, "Path motion effects"); 700*cdf0e10cSrcweirwritePathMotionAnimation($transitionNum); 701*cdf0e10cSrcweirwriteSlideFooter(); 702*cdf0e10cSrcweir 703*cdf0e10cSrcweir print $OUT qq~ 704*cdf0e10cSrcweir <draw:page draw:name="page1" draw:style-name="dp1" draw:master-page-name="Default"> 705*cdf0e10cSrcweir <office:forms form:automatic-focus="false" form:apply-design-mode="false"/> 706*cdf0e10cSrcweir <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"> 707*cdf0e10cSrcweir <text:p text:style-name="P2">Slide: 4</text:p> 708*cdf0e10cSrcweir <text:p text:style-name="P2">Topic: Misc effects</text:p> 709*cdf0e10cSrcweir <text:p text:id="textid10001" text:style-name="P2">Some text to show accelerate effects</text:p> 710*cdf0e10cSrcweir <text:p text:id="textid10002" text:style-name="P2">Some text to show decelerate effects</text:p> 711*cdf0e10cSrcweir <text:p text:id="textid10003" text:style-name="P2">Some text to show additive effects</text:p> 712*cdf0e10cSrcweir <text:p text:id="textid10004" text:style-name="P2">Some text to show autoreverse effects</text:p> 713*cdf0e10cSrcweir <text:p text:id="textid10005" text:style-name="P2">Some text to show key value effects</text:p> 714*cdf0e10cSrcweir <text:p text:id="textid10006" text:style-name="P2">Some text to show discrete key value effects</text:p> 715*cdf0e10cSrcweir <text:p text:id="textid10007" text:style-name="P2">Some text to show formula effects</text:p> 716*cdf0e10cSrcweir </draw:rect> 717*cdf0e10cSrcweir <anim:par presentation:node-type="timing-root"> 718*cdf0e10cSrcweir <anim:seq presentation:node-type="main-sequence"> 719*cdf0e10cSrcweir 720*cdf0e10cSrcweir <anim:par smil:begin="0s" smil:fill="remove"> 721*cdf0e10cSrcweir <anim:set smil:begin="0s" smil:dur="0.001s" smil:fill="hold" smil:targetElement="textid10001" smil:attributeName="visibility" smil:to="visible"/> 722*cdf0e10cSrcweir <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"/> 723*cdf0e10cSrcweir </anim:par> 724*cdf0e10cSrcweir 725*cdf0e10cSrcweir <anim:par smil:begin="0s" smil:fill="remove"> 726*cdf0e10cSrcweir <anim:set smil:begin="0s" smil:dur="0.001s" smil:fill="hold" smil:targetElement="textid10002" smil:attributeName="visibility" smil:to="visible"/> 727*cdf0e10cSrcweir <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"/> 728*cdf0e10cSrcweir </anim:par> 729*cdf0e10cSrcweir 730*cdf0e10cSrcweir <anim:par smil:begin="0s" smil:fill="remove"> 731*cdf0e10cSrcweir <anim:set smil:begin="0s" smil:dur="0.001s" smil:fill="hold" smil:targetElement="textid10003" smil:attributeName="visibility" smil:to="visible"/> 732*cdf0e10cSrcweir <anim:animate smil:begin="0s" smil:dur="3s" smil:fill="hold" smil:targetElement="textid10003" smil:attributeName="x" smil:to="0.3" presentation:additive="sum"/> 733*cdf0e10cSrcweir <anim:animate smil:begin="0s" smil:dur="6s" smil:fill="hold" smil:targetElement="textid10003" smil:attributeName="x" smil:to="0.3" presentation:additive="sum"/> 734*cdf0e10cSrcweir </anim:par> 735*cdf0e10cSrcweir 736*cdf0e10cSrcweir <anim:par smil:begin="0s" smil:fill="remove"> 737*cdf0e10cSrcweir <anim:set smil:begin="0s" smil:dur="0.001s" smil:fill="hold" smil:targetElement="textid10004" smil:attributeName="visibility" smil:to="visible"/> 738*cdf0e10cSrcweir <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"/> 739*cdf0e10cSrcweir </anim:par> 740*cdf0e10cSrcweir 741*cdf0e10cSrcweir <anim:par smil:begin="0s" smil:fill="remove"> 742*cdf0e10cSrcweir <anim:set smil:begin="0s" smil:dur="0.001s" smil:fill="hold" smil:targetElement="textid10005" smil:attributeName="visibility" smil:to="visible"/> 743*cdf0e10cSrcweir <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"/> 744*cdf0e10cSrcweir </anim:par> 745*cdf0e10cSrcweir 746*cdf0e10cSrcweir <anim:par smil:begin="0s" smil:fill="remove"> 747*cdf0e10cSrcweir <anim:set smil:begin="0s" smil:dur="0.001s" smil:fill="hold" smil:targetElement="textid10006" smil:attributeName="visibility" smil:to="visible"/> 748*cdf0e10cSrcweir <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"/> 749*cdf0e10cSrcweir </anim:par> 750*cdf0e10cSrcweir 751*cdf0e10cSrcweir <anim:par smil:begin="0s" smil:fill="remove"> 752*cdf0e10cSrcweir <anim:set smil:begin="0s" smil:dur="0.001s" smil:fill="hold" smil:targetElement="textid10007" smil:attributeName="visibility" smil:to="visible"/> 753*cdf0e10cSrcweir <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"/> 754*cdf0e10cSrcweir </anim:par> 755*cdf0e10cSrcweir~; 756*cdf0e10cSrcweir 757*cdf0e10cSrcweirwriteSlideFooter(); 758*cdf0e10cSrcweir 759*cdf0e10cSrcweir# iterate, single paragraphs, word, lines, sentences, characters 760*cdf0e10cSrcweir 761*cdf0e10cSrcweir print $OUT qq~ 762*cdf0e10cSrcweir <draw:page draw:name="page1" draw:style-name="dp1" draw:master-page-name="Default"> 763*cdf0e10cSrcweir <office:forms form:automatic-focus="false" form:apply-design-mode="false"/> 764*cdf0e10cSrcweir <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"> 765*cdf0e10cSrcweir <text:p text:style-name="P2">Slide: 5</text:p> 766*cdf0e10cSrcweir <text:p text:style-name="P2">Topic: Text effects</text:p> 767*cdf0e10cSrcweir <text:p text:id="textid20001" text:style-name="P2">Some text to show iterated single paragraph</text:p> 768*cdf0e10cSrcweir <text:p text:id="textid20002" text:style-name="P2">Some text to show iterated word-by-word effects</text:p> 769*cdf0e10cSrcweir <text:p text:id="textid20003" text:style-name="P2">Some text to show iterated letter-by-letter effects</text:p> 770*cdf0e10cSrcweir <text:p text:id="textid20004" text:style-name="P2">Some more text</text:p> 771*cdf0e10cSrcweir <text:p text:id="textid20005" text:style-name="P2">Some more text</text:p> 772*cdf0e10cSrcweir <text:p text:id="textid20006" text:style-name="P2">Some more text</text:p> 773*cdf0e10cSrcweir <text:p text:id="textid20007" text:style-name="P2">Some more text</text:p> 774*cdf0e10cSrcweir <text:p text:id="textid20008" text:style-name="P2">Some more text</text:p> 775*cdf0e10cSrcweir </draw:rect> 776*cdf0e10cSrcweir <anim:par presentation:node-type="timing-root"> 777*cdf0e10cSrcweir <anim:seq presentation:node-type="main-sequence"> 778*cdf0e10cSrcweir 779*cdf0e10cSrcweir <anim:par smil:begin="0s" smil:fill="remove"> 780*cdf0e10cSrcweir <anim:iterate smil:begin="0s" smil:fill="hold" smil:targetElement="id20000" anim:iterate-type="by-paragraph" anim:iterate-interval="0.2s"> 781*cdf0e10cSrcweir <anim:set smil:begin="0s" smil:dur="0.001s" smil:fill="hold" smil:attributeName="visibility" smil:to="visible"/> 782*cdf0e10cSrcweir <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"/> 783*cdf0e10cSrcweir </anim:iterate> 784*cdf0e10cSrcweir </anim:par> 785*cdf0e10cSrcweir 786*cdf0e10cSrcweir <anim:par smil:begin="0s" smil:fill="remove"> 787*cdf0e10cSrcweir <anim:set smil:begin="0s" smil:dur="0.001s" smil:targetElement="id20000" smil:fill="hold" smil:attributeName="visibility" smil:to="visible"/> 788*cdf0e10cSrcweir <anim:iterate smil:begin="0s" smil:fill="hold" smil:targetElement="textid20002" anim:iterate-type="by-word" anim:iterate-interval="0.2s"> 789*cdf0e10cSrcweir <anim:set smil:begin="0s" smil:dur="0.001s" smil:fill="hold" smil:attributeName="visibility" smil:to="visible"/> 790*cdf0e10cSrcweir <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"/> 791*cdf0e10cSrcweir </anim:iterate> 792*cdf0e10cSrcweir </anim:par> 793*cdf0e10cSrcweir 794*cdf0e10cSrcweir <anim:par smil:begin="0s" smil:fill="remove"> 795*cdf0e10cSrcweir <anim:set smil:begin="0s" smil:dur="0.001s" smil:targetElement="id20000" smil:fill="hold" smil:attributeName="visibility" smil:to="visible"/> 796*cdf0e10cSrcweir <anim:iterate smil:begin="0s" smil:fill="hold" smil:targetElement="textid20003" anim:iterate-type="by-letter" anim:iterate-interval="0.2s"> 797*cdf0e10cSrcweir <anim:set smil:begin="0s" smil:dur="0.001s" smil:fill="hold" smil:attributeName="visibility" smil:to="visible"/> 798*cdf0e10cSrcweir <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"/> 799*cdf0e10cSrcweir </anim:iterate> 800*cdf0e10cSrcweir </anim:par> 801*cdf0e10cSrcweir~; 802*cdf0e10cSrcweir 803*cdf0e10cSrcweirwriteSlideFooter(); 804*cdf0e10cSrcweir 805*cdf0e10cSrcweirwriteFooter(); 806*cdf0e10cSrcweir 807*cdf0e10cSrcweir$OUT->close; 808*cdf0e10cSrcweir 809*cdf0e10cSrcweirzip_dirtree ($global_output_name); 810*cdf0e10cSrcweir 811