Ignore:
Timestamp:
2018-07-30T20:34:58+12:00 (6 years 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.

File:
1 edited

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    }
Note: See TracChangeset for help on using the changeset viewer.