Ignore:
Timestamp:
2009-01-19T18:08:49+13:00 (15 years ago)
Author:
ak19
Message:

Modified srcreplaceable plugins (plugins which operate on docs where the source file can be replaced with their converted htmls) to set the file_rename_method to none for secondary plugins (for Text, HTML, and PagedImage plugins) so that the file is not renamed several times.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • gsdl/trunk/perllib/plugins/PowerPointPlugin.pm

    r17744 r18406  
    106106    my $secondary_plugin_options = $self->{'secondary_plugin_options'};
    107107
    108     if ($self->{'windows_scripting'} && ($self->{'convert_to'} eq "PagedImg")) {
     108    if ($self->{'windows_scripting'} && ($self->{'convert_to'} =~ m/(pagedimage|pagedimg).*/i)) {
    109109    $secondary_plugin_options->{'PagedImagePlugin'} = [];
    110110    } else {
    111111    $secondary_plugin_options->{'HTMLPlugin'} = [];
     112    $secondary_plugin_options->{'TextPlugin'} = [];
    112113    }
    113114    my $html_options = $secondary_plugin_options->{'HTMLPlugin'};
     115    my $text_options = $secondary_plugin_options->{'TextPlugin'};
    114116    my $pageimg_options = $secondary_plugin_options->{'PagedImagePlugin'};
    115117 
    116     if (defined $secondary_plugin_options->{'HTMLPlugin'}){
     118    if (defined $html_options){
    117119    push(@$html_options,"-input_encoding", "utf8");
    118120    push(@$html_options,"-extract_language") if $self->{'extract_language'};
     121    push(@$html_options,"-file_rename_method", "none");
    119122   
    120123    # Instruct HTMLPlugin (when eventually accessed through read_into_doc_obj)
     
    122125    push(@$html_options,"-metadata_fields","Title,GENERATOR,date,author<Creator>");
    123126    }
    124     if (defined $secondary_plugin_options->{'PagedImagePlugin'}){
     127    if (defined $text_options){
     128    push(@$text_options,"-input_encoding", "utf8");
     129    push(@$text_options,"-extract_language") if $self->{'extract_language'};
     130    push(@$text_options,"-file_rename_method", "none");
     131    }
     132    if (defined $pageimg_options){
    125133    push(@$pageimg_options,"-input_encoding", "utf8");
    126     push(@$pageimg_options,"-extract_language") if $self->{'extract_language'};
     134    push(@$pageimg_options,"-extract_language") if $self->{'extract_language'};
     135    push(@$pageimg_options,"-file_rename_method", "none");
    127136    }
    128137
Note: See TracChangeset for help on using the changeset viewer.