Changeset 22882

Show
Ignore:
Timestamp:
08.09.2010 13:14:47 (9 years ago)
Author:
kjdon
Message:

set up convert_to list for the case when windows_scripting and openoffice_conversion are both available

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/perllib/plugins/PowerPointPlugin.pm

    r22880 r22882  
    5252    'desc' => "{ConvertBinaryFile.convert_to.text}" }, 
    5353      { 'name' => "pagedimg_jpg", 
    54     'desc' => "{ConvertBinaryFile.convert_to.pagedimg_jpg}" }, 
     54    'desc' => "{PowerPointPlugin.convert_to.pagedimg_jpg}" }, 
    5555      { 'name' => "pagedimg_gif", 
    56     'desc' => "{ConvertBinaryFile.convert_to.pagedimg_gif}" }, 
     56    'desc' => "{PowerPointPlugin.convert_to.pagedimg_gif}" }, 
    5757      { 'name' => "pagedimg_png", 
    58     'desc' => "{ConvertBinaryFile.convert_to.pagedimg_png}" } 
     58    'desc' => "{PowerPointPlugin.convert_to.pagedimg_png}" } 
    5959      ]; 
    6060 
     
    6666      { 'name' => "text", 
    6767    'desc' => "{ConvertBinaryFile.convert_to.text}" }, 
     68      { 'name' => "pagedimg", 
     69    'desc' => "{PowerPointPlugin.convert_to.pagedimg}" } 
     70      ]; 
     71 
     72my $openoffice_extra_convert_to_list =  
     73    [ { 'name' => "html_multi", 
     74    'desc' => "{PowerPointPlugin.convert_to.html_multi}" }, 
    6875      { 'name' => "pagedimg", 
    6976    'desc' => "{PowerPointPlugin.convert_to.pagedimg}" } 
     
    119126    push(@{$hashArgOptLists->{"OptList"}},$options); 
    120127 
     128    my $auto_converter_self = new AutoLoadConverters($pluginlist,$inputargs,$hashArgOptLists,["OpenOfficeConverter"],1); 
     129 
    121130    if ($ENV{'GSDLOS'} =~ m/^windows$/i) { 
     131    if ($auto_converter_self->{'openoffice_available'}) { 
     132        # add openoffice convert_to options into list 
     133        push (@$windows_convert_to_list, @$openoffice_extra_convert_to_list); 
     134    } 
    122135    push(@$arguments,@$opt_windows_args); 
    123136    } 
    124  
    125     my $auto_converter_self = new AutoLoadConverters($pluginlist,$inputargs,$hashArgOptLists,["OpenOfficeConverter"],1); 
    126  
    127     if ($auto_converter_self->{'openoffice_available'}) { 
     137    elsif ($auto_converter_self->{'openoffice_available'}) { 
    128138    push (@$arguments,@$opt_office_args); 
    129139    $openoffice_available = 1;