Changeset 10423


Ignore:
Timestamp:
2005-08-05T15:09:09+12:00 (19 years ago)
Author:
chi
Message:

Modify the structure of pushing argument and option lists to secondary plugin
in load_secondary_plugins().

File:
1 edited

Legend:

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

    r10406 r10423  
    2424#
    2525###########################################################################
     26
    2627# This plugin is inherited by such plugins as WordPlug, PPTPlug, PSPlug, RTFPlug
    2728# and PDFPlug. It facilitates the conversion of these document types to either
     
    121122{
    122123    my $self = shift (@_);
    123     my ($class,$plugin_options) = @_;
     124    my ($class,$input_args,$hashArgOptLists) = @_;
    124125
    125126    my @convert_to_list = split(",",$self->{'convert_to'});
     
    134135
    135136    # call its constructor with extra options that we've worked out!
    136     my $arglist = $plugin_options->{$plugin_class};
    137     my $secondary_plugin = new $plugin_class([], \@$arglist);
     137    my $arglist = $input_args->{$plugin_class};
     138    my $secondary_plugin = new $plugin_class([],$arglist, $hashArgOptLists);
    138139    $secondary_plugins->{$plugin_class} = $secondary_plugin;
    139140    }
     
    158159    my $self = {};
    159160    my $plugin_class ="";
    160     # If the WordPlug -windows_scripting is on, we will call StructuredHTMLPlug to format the
    161     # HTML documents and then pass to HTMLPlug
    162161    if ($classPluginName eq "WordPlug" && $blnWindowsScripting eq "true" &&
    163162    $ENV{'GSDLOS'} =~ /^windows$/i) {
     
    185184    elsif ($strConvertTo eq "text")
    186185    {
    187     #$self = (defined $hashArgOptLists)? new TEXTPlug($pluginlist,$inputargs,$hashArgOptLists): new TEXTPlug($pluginlist,$inputargs);
    188186    $self->{'convert_to'} = "TEXT";
    189187    $self->{'convert_to_ext'} = "txt";
     
    193191    }
    194192    elsif ($strConvertTo =~ /pagedimg.*/i){
    195 #   #$self = (defined $hashArgOptLists)? new PagedImgPlug($pluginlist,$inputargs,$hashArgOptLists): new PagedImgPlug($pluginlist,$inputargs);
    196193    $self->{'convert_to'} = "PagedImg";
    197194    my $convert_to_ext = $strConvertTo;
     
    237234sub deinit {
    238235    # called only once, after all plugin passes have been done
     236
    239237    my ($self) = @_;
    240238
     
    448446    # process the document
    449447    $processor->process($doc_obj);
    450     # We don't clear up the tmp directory here, the tmp directory will be deleted if the user setup -removeold option
    451     # in the import.pl
    452     #$self->cleanup_tmp_area();
     448    ##$self->cleanup_tmp_area();
    453449
    454450    $self->{'num_processed'} ++;
Note: See TracChangeset for help on using the changeset viewer.