summaryrefslogtreecommitdiff
path: root/slideshow/qa/tools/mkeffects.pl
diff options
context:
space:
mode:
Diffstat (limited to 'slideshow/qa/tools/mkeffects.pl')
-rwxr-xr-xslideshow/qa/tools/mkeffects.pl192
1 files changed, 96 insertions, 96 deletions
diff --git a/slideshow/qa/tools/mkeffects.pl b/slideshow/qa/tools/mkeffects.pl
index 38673aea473d..954f9659f2c5 100755
--- a/slideshow/qa/tools/mkeffects.pl
+++ b/slideshow/qa/tools/mkeffects.pl
@@ -1,10 +1,10 @@
:
eval 'exec perl -wS $0 ${1+"$@"}'
- if 0;
+ if 0;
-use IO::File;
-use Cwd;
+use IO::File;
+use Cwd;
use File::Spec;
use File::Spec::Functions;
use File::Temp;
@@ -18,72 +18,72 @@ $TempDir = "";
###############################################################################
-# Open a file with the given name.
-# First it is checked if the temporary directory, in which all files for
-# the document are gathered, is already present and create it if it is not.
-# Then create the path to the file inside the temporary directory.
-# Finally open the file and return a file handle to it.
+# Open a file with the given name.
+# First it is checked if the temporary directory, in which all files for
+# the document are gathered, is already present and create it if it is not.
+# Then create the path to the file inside the temporary directory.
+# Finally open the file and return a file handle to it.
#
-sub open_file
+sub open_file
{
- my $filename = pop @_;
-
- # Create base directory of temporary directory tree if not alreay
- # present.
+ my $filename = pop @_;
+
+ # Create base directory of temporary directory tree if not alreay
+ # present.
if ($TempDir eq "")
{
$TempDir = File::Temp::tempdir (CLEANUP => 1);
}
-
- # Create the path to the file.
+
+ # Create the path to the file.
my $fullname = File::Spec->catfile ($TempDir, $filename);
my ($volume,$directories,$file) = File::Spec->splitpath ($fullname);
mkpath (File::Spec->catpath ($volume,$directories,""));
-
- # Open the file and return a file handle to it.
+
+ # Open the file and return a file handle to it.
return new IO::File ($fullname, "w");
}
###############################################################################
-# Zip the files in the directory tree into the given file.
+# Zip the files in the directory tree into the given file.
#
-sub zip_dirtree
+sub zip_dirtree
{
- my $filename = pop @_;
-
- my $cwd = getcwd;
- my $zip_name = $filename;
-
- # We are about to change the directory.
- # Therefore create an absolute pathname for the zip archive.
-
- # First transfer the drive from $cwd to $zip_name. This is a
- # workaround for a bug in file_name_is_absolute which thinks
- # the the path \bla is an absolute path under DOS.
+ my $filename = pop @_;
+
+ my $cwd = getcwd;
+ my $zip_name = $filename;
+
+ # We are about to change the directory.
+ # Therefore create an absolute pathname for the zip archive.
+
+ # First transfer the drive from $cwd to $zip_name. This is a
+ # workaround for a bug in file_name_is_absolute which thinks
+ # the the path \bla is an absolute path under DOS.
my ($volume,$directories,$file) = File::Spec->splitpath ($zip_name);
my ($volume_cwd,$directories_cwd,$file_cwd) = File::Spec->splitpath ($cwd);
$volume = $volume_cwd if ($volume eq "");
$zip_name = File::Spec->catpath ($volume,$directories,$file);
-
- # Add the current working directory to a relative path.
+
+ # Add the current working directory to a relative path.
if ( ! file_name_is_absolute ($zip_name))
{
$zip_name = File::Spec->catfile ($cwd, $zip_name);
-
- # Try everything to clean up the name.
+
+ # Try everything to clean up the name.
$zip_name = File::Spec->rel2abs ($filename);
$zip_name = File::Spec->canonpath ($zip_name);
-
- # Remove .. directories from the middle of the path.
+
+ # Remove .. directories from the middle of the path.
while ($zip_name =~ /\/[^\/][^\.\/][^\/]*\/\.\.\//)
{
$zip_name = $` . "/" . $';
}
}
- # Just in case the zip program gets confused by an existing file with the
- # same name as the one to be written that file is removed first.
+ # Just in case the zip program gets confused by an existing file with the
+ # same name as the one to be written that file is removed first.
if ( -e $filename)
{
if (unlink ($filename) == 0)
@@ -93,9 +93,9 @@ sub zip_dirtree
return;
}
}
-
- # Finally create the zip file. First change into the temporary directory
- # so that the resulting zip file contains only paths relative to it.
+
+ # Finally create the zip file. First change into the temporary directory
+ # so that the resulting zip file contains only paths relative to it.
print "zipping [$ZipCmd $ZipFlags $zip_name *]\n";
chdir ($TempDir);
system ("$ZipCmd $ZipFlags $zip_name *");
@@ -220,9 +220,9 @@ sub writeTransitionAnimation
print $OUT " <anim:par smil:begin=\"0s\" smil:fill=\"remove\">\n";
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";
- print $OUT " <anim:transitionFilter smil:dur=\"1s\" smil:targetElement=\"textid$slideNum\" smil:type=\"$transitionType\" smil:subtype=\"$transitionSubtype\"/>\n";
+ print $OUT " <anim:transitionFilter smil:dur=\"1s\" smil:targetElement=\"textid$slideNum\" smil:type=\"$transitionType\" smil:subtype=\"$transitionSubtype\"/>\n";
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";
- print $OUT " <anim:transitionFilter smil:begin=\"0.3s\" smil:dur=\"1s\" smil:targetElement=\"id$slideNum\" smil:type=\"$transitionType\" smil:subtype=\"$transitionSubtype\"/>\n";
+ print $OUT " <anim:transitionFilter smil:begin=\"0.3s\" smil:dur=\"1s\" smil:targetElement=\"id$slideNum\" smil:type=\"$transitionType\" smil:subtype=\"$transitionSubtype\"/>\n";
print $OUT " </anim:par>\n";
}
@@ -235,9 +235,9 @@ sub writePropertyAnimation
print $OUT " <anim:par smil:begin=\"0s\" smil:dur=\"3s\" smil:fill=\"remove\">\n";
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";
- 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";
+ 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";
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";
- 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";
+ 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";
print $OUT " </anim:par>\n";
}
@@ -284,9 +284,9 @@ sub writeManifest
###############################################################################
-# Print usage information.
+# Print usage information.
#
-sub usage ()
+sub usage ()
{
print <<END_OF_USAGE;
usage: $0 <option>* [<output-file-name>]
@@ -300,9 +300,9 @@ END_OF_USAGE
}
###############################################################################
-# Process the command line.
+# Process the command line.
#
-sub process_command_line
+sub process_command_line
{
foreach (@ARGV)
{
@@ -312,11 +312,11 @@ sub process_command_line
exit 0;
}
}
-
+
$global_gen_all=0;
$global_output_name = "alltransitions.odp";
- my $j = 0;
+ my $j = 0;
for (my $i=0; $i<=$#ARGV; $i++)
{
if ($ARGV[$i] eq "-a")
@@ -331,7 +331,7 @@ sub process_command_line
}
elsif ($#ARGV == $i )
{
- $global_output_name = $ARGV[$i];
+ $global_output_name = $ARGV[$i];
}
}
@@ -341,41 +341,41 @@ sub process_command_line
$transitionsRef = [
["barWipe",
- ["leftToRight",
+ ["leftToRight",
"topToBottom"]],
["blindsWipe",
- ["vertical",
+ ["vertical",
"horizontal"]],
-
+
["boxWipe",
- ["topLeft",
- "topRight",
- "bottomRight",
- "bottomLeft",
- "topCenter",
- "rightCenter",
- "bottomCenter",
- "leftCenter"]],
+ ["topLeft",
+ "topRight",
+ "bottomRight",
+ "bottomLeft",
+ "topCenter",
+ "rightCenter",
+ "bottomCenter",
+ "leftCenter"]],
["fourBoxWipe",
- ["cornersIn",
+ ["cornersIn",
"cornersOut"]],
["barnDoorWipe",
- ["vertical",
- "horizontal",
- "diagonalBottomLeft",
- "diagonalTopLeft"]],
+ ["vertical",
+ "horizontal",
+ "diagonalBottomLeft",
+ "diagonalTopLeft"]],
["bowTieWipe",
- ["vertical",
- "horizontal"]],
-
+ ["vertical",
+ "horizontal"]],
+
["miscDiagonalWipe",
["doubleBarnDoor",
"doubleDiamond"]],
-
+
["veeWipe",
["down",
"left",
@@ -395,11 +395,11 @@ $transitionsRef = [
["barnZigZagWipe",
["vertical",
"horizontal"]],
-
+
["irisWipe",
["rectangle",
"diamond"]],
-
+
["triangleWipe",
["up",
"right",
@@ -411,11 +411,11 @@ $transitionsRef = [
"right",
"down",
"left"]],
-
+
["pentagonWipe",
["up",
"down"]],
-
+
["hexagonWipe",
["horizontal",
"vertical"]],
@@ -437,7 +437,7 @@ $transitionsRef = [
["fourPoint",
"fivePoint",
"sixPoint"]],
-
+
["miscShapeWipe",
["heart",
"keyhole"]],
@@ -447,7 +447,7 @@ $transitionsRef = [
"clockwiseThree",
"clockwiseSix",
"clockwiseNine"]],
-
+
["pinWheelWipe",
["oneBlade",
"twoBladeVertical",
@@ -479,7 +479,7 @@ $transitionsRef = [
"fanOutHorizontal",
"fanInVertical",
"fanInHorizontal"]],
-
+
["doubleSweepWipe",
["parallelVertical",
"parallelDiagonal",
@@ -487,7 +487,7 @@ $transitionsRef = [
"oppositeHorizontal",
"parallelDiagonalTopLeft",
"parallelDiagonalBottomLeft"]],
-
+
["saloonDoorWipe",
["top",
"left",
@@ -507,7 +507,7 @@ $transitionsRef = [
"topRightDiagonal",
"bottomRightDiagonal",
"bottomLeftDiagonal"]],
-
+
["spiralWipe",
["topLeftClockwise",
"topRightClockwise",
@@ -517,7 +517,7 @@ $transitionsRef = [
"topRightCounterClockwise",
"bottomRightCounterClockwise",
"bottomLeftCounterClockwise"]],
-
+
["parallelSnakesWipe",
["verticalTopSame",
"verticalBottomSame",
@@ -529,7 +529,7 @@ $transitionsRef = [
"horizontalTopRightOpposite",
"diagonalBottomLeftOpposite",
"diagonalTopLeftOpposite"]],
-
+
["boxSnakesWipe",
["twoBoxTop",
"twoBoxLeft",
@@ -619,7 +619,7 @@ $propertiesRef = [
[ "value", "y", "y-0.1", "y+0.1" ]
];
-$transformsRef = [
+$transformsRef = [
["translate", "0.5*width,0.5*height"],
["scale", "0.5*width,0.5*height"],
["rotate", "270"],
@@ -629,12 +629,12 @@ $transformsRef = [
###############################################################################
-# Main
+# Main
###############################################################################
$ZipCmd = $ENV{LOG_FILE_ZIP_CMD};
$ZipFlags = $ENV{LOG_FILE_ZIP_FLAGS};
-# Provide default values for the zip command and it's flags.
+# Provide default values for the zip command and it's flags.
if ( ! defined $ZipCmd)
{
$ZipCmd = "zip" unless defined $ZipCmd;
@@ -719,23 +719,23 @@ writeSlideFooter();
<anim:par smil:begin="0s" smil:fill="remove">
<anim:set smil:begin="0s" smil:dur="0.001s" smil:fill="hold" smil:targetElement="textid10001" smil:attributeName="visibility" smil:to="visible"/>
- <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"/>
+ <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"/>
</anim:par>
<anim:par smil:begin="0s" smil:fill="remove">
<anim:set smil:begin="0s" smil:dur="0.001s" smil:fill="hold" smil:targetElement="textid10002" smil:attributeName="visibility" smil:to="visible"/>
- <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"/>
+ <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"/>
</anim:par>
<anim:par smil:begin="0s" smil:fill="remove">
<anim:set smil:begin="0s" smil:dur="0.001s" smil:fill="hold" smil:targetElement="textid10003" smil:attributeName="visibility" smil:to="visible"/>
- <anim:animate smil:begin="0s" smil:dur="3s" smil:fill="hold" smil:targetElement="textid10003" smil:attributeName="x" smil:to="0.3" presentation:additive="sum"/>
- <anim:animate smil:begin="0s" smil:dur="6s" smil:fill="hold" smil:targetElement="textid10003" smil:attributeName="x" smil:to="0.3" presentation:additive="sum"/>
+ <anim:animate smil:begin="0s" smil:dur="3s" smil:fill="hold" smil:targetElement="textid10003" smil:attributeName="x" smil:to="0.3" presentation:additive="sum"/>
+ <anim:animate smil:begin="0s" smil:dur="6s" smil:fill="hold" smil:targetElement="textid10003" smil:attributeName="x" smil:to="0.3" presentation:additive="sum"/>
</anim:par>
<anim:par smil:begin="0s" smil:fill="remove">
<anim:set smil:begin="0s" smil:dur="0.001s" smil:fill="hold" smil:targetElement="textid10004" smil:attributeName="visibility" smil:to="visible"/>
- <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"/>
+ <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"/>
</anim:par>
<anim:par smil:begin="0s" smil:fill="remove">
@@ -750,7 +750,7 @@ writeSlideFooter();
<anim:par smil:begin="0s" smil:fill="remove">
<anim:set smil:begin="0s" smil:dur="0.001s" smil:fill="hold" smil:targetElement="textid10007" smil:attributeName="visibility" smil:to="visible"/>
- <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"/>
+ <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"/>
</anim:par>
~;
@@ -764,7 +764,7 @@ writeSlideFooter();
<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">
<text:p text:style-name="P2">Slide: 5</text:p>
<text:p text:style-name="P2">Topic: Text effects</text:p>
- <text:p text:id="textid20001" text:style-name="P2">Some text to show iterated single paragraph</text:p>
+ <text:p text:id="textid20001" text:style-name="P2">Some text to show iterated single paragraph</text:p>
<text:p text:id="textid20002" text:style-name="P2">Some text to show iterated word-by-word effects</text:p>
<text:p text:id="textid20003" text:style-name="P2">Some text to show iterated letter-by-letter effects</text:p>
<text:p text:id="textid20004" text:style-name="P2">Some more text</text:p>
@@ -779,7 +779,7 @@ writeSlideFooter();
<anim:par smil:begin="0s" smil:fill="remove">
<anim:iterate smil:begin="0s" smil:fill="hold" smil:targetElement="id20000" anim:iterate-type="by-paragraph" anim:iterate-interval="0.2s">
<anim:set smil:begin="0s" smil:dur="0.001s" smil:fill="hold" smil:attributeName="visibility" smil:to="visible"/>
- <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"/>
+ <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"/>
</anim:iterate>
</anim:par>
@@ -787,7 +787,7 @@ writeSlideFooter();
<anim:set smil:begin="0s" smil:dur="0.001s" smil:targetElement="id20000" smil:fill="hold" smil:attributeName="visibility" smil:to="visible"/>
<anim:iterate smil:begin="0s" smil:fill="hold" smil:targetElement="textid20002" anim:iterate-type="by-word" anim:iterate-interval="0.2s">
<anim:set smil:begin="0s" smil:dur="0.001s" smil:fill="hold" smil:attributeName="visibility" smil:to="visible"/>
- <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"/>
+ <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"/>
</anim:iterate>
</anim:par>
@@ -795,7 +795,7 @@ writeSlideFooter();
<anim:set smil:begin="0s" smil:dur="0.001s" smil:targetElement="id20000" smil:fill="hold" smil:attributeName="visibility" smil:to="visible"/>
<anim:iterate smil:begin="0s" smil:fill="hold" smil:targetElement="textid20003" anim:iterate-type="by-letter" anim:iterate-interval="0.2s">
<anim:set smil:begin="0s" smil:dur="0.001s" smil:fill="hold" smil:attributeName="visibility" smil:to="visible"/>
- <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"/>
+ <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"/>
</anim:iterate>
</anim:par>
~;