summaryrefslogtreecommitdiff
path: root/slideshow
diff options
context:
space:
mode:
authorAndre Fischer <af@apache.org>2012-08-29 13:51:27 +0000
committerCaolán McNamara <caolanm@redhat.com>2013-05-23 14:01:23 +0100
commitde63defeabe25842f22461748ae71931e4fdb279 (patch)
tree1e55a001a5aa72fd16840d6468eb364a10323e79 /slideshow
parent2ae6f9d1d27f699a6dcf369ba018c93ea7d5def5 (diff)
Added options to create subset of full animation set.
(cherry picked from commit 017cdba28f99bd599e1651e709914453069e1080) Change-Id: I55bc8a183990544dcf47086cebc495bcd240463a
Diffstat (limited to 'slideshow')
-rw-r--r--slideshow/qa/tools/mktransitions.pl18
1 files changed, 17 insertions, 1 deletions
diff --git a/slideshow/qa/tools/mktransitions.pl b/slideshow/qa/tools/mktransitions.pl
index de39a0b08f4d..8096e0541bec 100644
--- a/slideshow/qa/tools/mktransitions.pl
+++ b/slideshow/qa/tools/mktransitions.pl
@@ -28,6 +28,8 @@ use File::Temp;
use File::Path;
$TempDir = "";
+my $FirstTransitionIndex = 0;
+my $LastTransitionIndex = -1;
# all the XML package generation is a blatant rip from AF's
@@ -95,7 +97,7 @@ sub zip_dirtree
# Remove .. directories from the middle of the path.
while ($zip_name =~ /\/[^\/][^\.\/][^\/]*\/\.\.\//)
{
- $zip_name = $` . "/" . $';
+ $zip_name = $` . "/" . $'; # $'
}
}
@@ -140,6 +142,8 @@ sub writeSlideStyles
my $transitionType = pop @_;
my $slideNum = pop @_;
+ return if $slideNum<$FirstTransitionIndex || ($LastTransitionIndex>=0 && $slideNum>$LastTransitionIndex);
+
print $OUT " <style:style style:name=\"dp",$slideNum,"\" style:family=\"drawing-page\">\n";
print $OUT " <style:drawing-page-properties presentation:transition-type=\"automatic\" presentation:duration=\"PT00H00M01S\" presentation:background-visible=\"true\" presentation:background-objects-visible=\"true\" draw:fill=\"solid\" draw:fill-color=\"#ff",$slideNum % 2 ? "ff99" : "cc99","\" smil:type=\"",$transitionType,"\" smil:subtype=\"",$transitionSubType,"\" ",$direction == 0 ? "" : "smil:direction=\"reverse\" ",$mode == 0 ? "" : "smil:mode=\"out\"","/>\n";
print $OUT " </style:style>\n";
@@ -214,6 +218,8 @@ sub writeSlide
my $transitionType = pop @_;
my $slideNum = pop @_;
+ return if $slideNum<$FirstTransitionIndex || ($LastTransitionIndex>=0 && $slideNum>$LastTransitionIndex);
+
print $OUT " <draw:page draw:name=\"page",$slideNum,"\" draw:style-name=\"dp",$slideNum,"\" draw:master-page-name=\"Default\" presentation:presentation-page-layout-name=\"AL1T19\">";
print $OUT " <draw:frame presentation:style-name=\"pr1\" draw:layer=\"layout\" svg:width=\"25.199cm\" svg:height=\"3.256cm\" svg:x=\"1.4cm\" svg:y=\"0.962cm\" presentation:class=\"title\">\n";
@@ -552,6 +558,8 @@ output-file-name defaults to alltransitions.odp.
options: -a Generate _all_ combinations of type, subtype,
direction, and mode
-h Print this usage information.
+ -f First transition to include, defaults to 0
+ -l Last transition to include
END_OF_USAGE
}
@@ -579,6 +587,14 @@ sub process_command_line
{
$global_gen_all=1;
}
+ elsif ($ARGV[$i] eq "-f")
+ {
+ $FirstTransitionIndex = $ARGV[++$i];
+ }
+ elsif ($ARGV[$i] eq "-l")
+ {
+ $LastTransitionIndex = $ARGV[++$i];
+ }
elsif ($ARGV[$i] =~ /^-/)
{
print "Unknown option $ARGV[$i]\n";