Changeset 32317

Show
Ignore:
Timestamp:
30.07.2018 20:34:58 (13 months ago)
Author:
ak19
Message:

Basic updates to OpenOffice? extension: 1. BasePlugin? is now BaseImporter? 2. Warnings notified a change from single minus prefix to accept and headless arguments, to double minus prefix. Still haven't resolved 2 bugs: GLI will get stuck when launching when the open office ext is included and if this gets stuck. Hard to track down so far, but this ext's jodconverter jar gets stuck running from the cmdline on these occasions too. And haven't resolved how to get jodconverter to convert (word) docs that contain images to HTML without always embedding the images inline as base64. jodconverter doesn't take the same names for options as the soffice commands it calls. Jodconverter's cmdline usage display is either not complete or the options are very limited.

Location:
gs2-extensions/open-office/trunk
Files:
4 modified

Legend:

Unmodified
Added
Removed
  • gs2-extensions/open-office/trunk/src/perllib/plugins/OpenOfficeConverter.pm

    r28335 r32317  
    7272        } 
    7373         
    74         #my $cmd = "soffice -headless 2>&1"; # for linux and mac 
    75         my $cmd = "soffice \"-accept=socket,host=$ENV{'SOFFICE_HOST'},port=$ENV{'SOFFICE_PORT'};urp;StarOffice.ServiceManager\" -headless 2>&1"; # for linux and mac 
     74        #my $cmd = "soffice --headless 2>&1"; # for linux and mac 
     75        my $cmd = "soffice \"--accept=socket,host=$ENV{'SOFFICE_HOST'},port=$ENV{'SOFFICE_PORT'};urp;StarOffice.ServiceManager\" --headless 2>&1"; # for linux and mac 
    7676        my $status = 0; 
    7777 
    7878        # No more JODCONVERTER_PORT env var: the port that jodconverter uses is now the 
    7979        # same as SOFFICE_PORT, because the 2 are meant to communicate on the same port. 
    80         # The default port that jodconverter expects OO to listen on is 8100, so we try that. 
     80        # The default port that jodconverter expects OO (OpenOffice/libreoffice/soffice/staroffice) to listen on is 8100, so we try that. 
    8181        if ($ENV{'GSDLOS'} =~ m/^windows$/) {        
    8282         
     
    100100        $status = system("which soffice >nul 2>&1"); # which.exe should be in bin/windows 
    101101        if ($status == 0) { 
    102             $cmd = "start \"soffice process\" soffice \"-accept=socket,host=$ENV{'SOFFICE_HOST'},port=$ENV{'SOFFICE_PORT'};urp;StarOffice.ServiceManager\" -headless 2>&1"; 
     102            $cmd = "start \"soffice process\" soffice \"--accept=socket,host=$ENV{'SOFFICE_HOST'},port=$ENV{'SOFFICE_PORT'};urp;StarOffice.ServiceManager\" --headless 2>&1"; 
    103103            $cmd .= " >nul"; 
    104104            #print STDERR "***** Tried to start-up OpenOffice with:\n$cmd\n";            
     
    179179 
    180180    my $launch_cmd = "soffice"; 
    181     $launch_cmd .= " \"-accept=socket,host=localhost,port=$oo_port;urp;StarOffice.ServiceManager\""; 
    182     $launch_cmd .= " -headless"; 
     181    $launch_cmd .= " \"--accept=socket,host=localhost,port=$oo_port;urp;StarOffice.ServiceManager\""; 
     182    $launch_cmd .= " --headless"; 
    183183    $self->{'openoffice_launch_cmd'} = $launch_cmd; 
    184184    } 
  • gs2-extensions/open-office/trunk/src/perllib/plugins/OpenOfficePlugin.pm

    r28335 r32317  
    4646my $arguments = 
    4747    [ { 'name' => "process_exp", 
    48     'desc' => "{BasePlugin.process_exp}", 
     48    'desc' => "{BaseImporter.process_exp}", 
    4949    'type' => "regexp", 
    5050    'deft' => &get_default_process_exp(), 
     
    6969    push(@{$hashArgOptLists->{"OptList"}},$options); 
    7070 
    71      
    7271    my $ooc_self = new OpenOfficeConverter($pluginlist, $inputargs, $hashArgOptLists, 1); 
    7372    my $cbf_self = new ConvertBinaryFile($pluginlist, $inputargs, $hashArgOptLists); 
    7473 
    75     my $self = BasePlugin::merge_inheritance($ooc_self, $cbf_self); 
     74    my $self = BaseImporter::merge_inheritance($ooc_self, $cbf_self); 
    7675 
    7776    if ($self->{'info_only'}) { 
     
    135134     
    136135    if (!$self->{'openoffice_ext_working'}) { 
    137     # use BasePlugin version to set up the doc obj, then we will do a little bit more in process 
    138     return $self->BasePlugin::read_into_doc_obj(@_); 
     136    # use BaseImporter version to set up the doc obj, then we will do a little bit more in process 
     137    return $self->BaseImporter::read_into_doc_obj(@_); 
    139138    } 
    140139    # use convertbinaryfile version, will call tmp_area_convert_file and use