- Timestamp:
- 2010-08-10T14:31:53+12:00 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone2/perllib/plugins/PowerPointPlugin.pm
r22515 r22597 34 34 no strict 'subs'; 35 35 use gsprintf 'gsprintf'; 36 37 #sub BEGIN {38 # @PowerPointPlugin::ISA = ('ConvertBinaryFile');39 #}40 36 41 37 # @ISA dynamically configured to be either OpenOfficeConverter or ConvertBinaryFile … … 157 153 } 158 154 159 my $outhandle = $self->{'outhandle'};160 161 155 $self->{'filename_extension'} = "ppt"; 162 156 $self->{'file_type'} = "PPT"; 157 158 if ($self->{'convert_to'} eq "auto") { 159 if ($self->{'windows_scripting'}) { 160 $self->{'convert_to'} = "pagedimg_jpg"; 161 } 162 else { 163 $self->{'convert_to'} = "html"; 164 } 165 } 166 167 my $outhandle = $self->{'outhandle'}; 163 168 164 169 # can't have windows_scripting and openoffice_scripting at the same time … … 172 177 $self->{'convert_options'} = "-windows_scripting" if $self->{'windows_scripting'}; 173 178 $self->{'convert_options'} = "-openoffice_scripting" if $self->{'openoffice_scripting'}; 179 180 # set convert_to_plugin and convert_to_ext 181 $self->ConvertBinaryFile::set_standard_convert_settings(); 182 183 my $secondary_plugin_name = $self->{'convert_to_plugin'}; 174 184 my $secondary_plugin_options = $self->{'secondary_plugin_options'}; 175 185 176 if ($self->{'windows_scripting'} && ($self->{'convert_to'} =~ m/(pagedimage|pagedimg).*/i)) { 177 $secondary_plugin_options->{'PagedImagePlugin'} = []; 178 } else { 179 $secondary_plugin_options->{'HTMLPlugin'} = []; 180 $secondary_plugin_options->{'TextPlugin'} = []; 181 } 182 my $html_options = $secondary_plugin_options->{'HTMLPlugin'}; 183 my $text_options = $secondary_plugin_options->{'TextPlugin'}; 184 my $pageimg_options = $secondary_plugin_options->{'PagedImagePlugin'}; 185 186 if (defined $html_options){ 187 # ppthtml doesn't output utf-8 necessarily - let Greenstone determine the encoding 188 #push(@$html_options,"-input_encoding", "utf8"); 189 push(@$html_options,"-extract_language") if $self->{'extract_language'}; 190 push(@$html_options,"-file_rename_method", "none"); 191 192 push(@$html_options, "-processing_tmp_files"); 193 194 # Instruct HTMLPlugin (when eventually accessed through read_into_doc_obj) 195 # to extract these metadata fields from the HEAD META fields 196 push(@$html_options,"-metadata_fields","Title,GENERATOR,date,author<Creator>"); 197 } 198 if (defined $text_options){ 199 #push(@$text_options,"-input_encoding", "utf8"); 200 push(@$text_options,"-extract_language") if $self->{'extract_language'}; 201 push(@$text_options,"-file_rename_method", "none"); 202 } 203 if (defined $pageimg_options){ 186 if (!defined $secondary_plugin_options->{$secondary_plugin_name}) { 187 $secondary_plugin_options->{$secondary_plugin_name} = []; 188 } 189 my $specific_options = $secondary_plugin_options->{$secondary_plugin_name}; 190 191 push(@$specific_options, "-file_rename_method", "none"); 192 push(@$specific_options, "-extract_language") if $self->{'extract_language'}; 193 194 if ($secondary_plugin_name eq "HTMLPlugin") { 195 push(@$specific_options, "-processing_tmp_files"); 196 push(@$specific_options,"-metadata_fields","Title,GENERATOR,date,author<Creator>"); 197 } 198 elsif ($secondary_plugin_name eq "PagedImagePlugin") { 199 push(@$specific_options, "-processing_tmp_files"); 204 200 #is this true?? 205 push(@$pageimg_options,"-input_encoding", "utf8"); 206 push(@$pageimg_options,"-extract_language") if $self->{'extract_language'}; 207 push(@$pageimg_options,"-file_rename_method", "none"); 208 push(@$pageimg_options, "-processing_tmp_files"); 201 push(@$specific_options,"-input_encoding", "utf8"); 209 202 } 210 203
Note:
See TracChangeset
for help on using the changeset viewer.