- Timestamp:
- 2010-08-23T00:27:23+12:00 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone2/perllib/plugins/PowerPointPlugin.pm
r22705 r22709 2 2 # 3 3 # PowerPointPlugin.pm -- plugin for importing Microsoft PowerPoint files. 4 # (currently only versions 95 and 97) 4 # (basic version supports versions 95 and 97) 5 # (through OpenOffice extension, supports all contempoary formats) 5 6 # 6 7 # A component of the Greenstone digital library software … … 59 60 'type' => "regexp", 60 61 'reqd' => "no", 61 'deft' => &get_default_process_exp()} 62 'deft' => "&get_default_process_exp(\$self)", # delayed (see below) 63 } 62 64 ]; 63 65 … … 99 101 $pluginlist, $inputargs, 100 102 $hashArgOptLists); 103 104 105 # plugin's process_exp can only be correctly determined once autoloading 106 # has taken place 107 my $plug_options = $self->{'option_list'}->[0]; 108 my $plug_args = $plug_options->{'args'}; 109 110 foreach my $a (@$plug_args) { 111 # consider changing this to search for all values that are 112 # tagged as 'deft-delayed' = 1 ?!? 113 114 if ($a->{'name'} eq "process_exp") { 115 my $eval_expr = $a->{'deft'}; 116 $a->{'deft'} = eval "$eval_expr"; 117 118 # Now see if process_exp needs updating 119 my $process_exp = $self->{'process_exp'}; 120 if (!$self->{'info_only'} && ($process_exp eq $eval_expr)) { 121 # process_exp is only defined if not 'info_only' 122 # 123 # if it does exist and it equals the unevaluated $eval_expr 124 # then it was set to the default (rather than overriden by 125 # the collect.cfg file) 126 127 $self->{'process_exp'} = $a->{'deft'}; 128 } 129 } 130 } 131 101 132 102 133 if ($self->{'info_only'}) { … … 161 192 sub get_default_process_exp { 162 193 my $self = shift (@_); 194 195 if ($self->{'scripting_ext_working'}) { 196 return q^(?i)\.(ppt|pptx|odp)$^; 197 } 198 163 199 return q^(?i)\.ppt$^; 164 200 }
Note:
See TracChangeset
for help on using the changeset viewer.