Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 232d7868

Von Bernd Bleßmann vor mehr als 9 Jahren hinzugefügt

  • ID 232d78687663884df38c106f9089f637509722fd
  • Vorgänger d0b60417
  • Nachfolger d13c7050

Rückgabewert von system-Aufrufen prüfen und ggf. Fehler ausgeben.

Unterschiede anzeigen:

SL/Template/OpenDocument.pm
$main::lxdebug->message(LXDebug->DEBUG2(), " xauthority $xauthority\n");
system("xauth add \"${display}\" . \"${mcookie}\"");
if (system("xauth add \"${display}\" . \"${mcookie}\"") == -1) {
die "system call to xauth failed: $!";
}
if ($? != 0) {
$self->{"error"} = "Conversion to PDF failed because OpenOffice could not be started (xauth: $!)";
$main::lxdebug->leave_sub();
......
}
if (!$::lx_office_conf{print_templates}->{openofficeorg_daemon}) {
system($::lx_office_conf{applications}->{openofficeorg_writer},
"-minimized", "-norestore", "-nologo", "-nolockcheck", "-headless",
"file:${filename}.odt",
"macro://" . (split('/', $filename))[-1] . "/Standard.Conversion.ConvertSelfToPDF()");
if (system($::lx_office_conf{applications}->{openofficeorg_writer},
"-minimized", "-norestore", "-nologo", "-nolockcheck", "-headless",
"file:${filename}.odt",
"macro://" . (split('/', $filename))[-1] . "/Standard.Conversion.ConvertSelfToPDF()") == -1) {
die "system call to $::lx_office_conf{applications}->{openofficeorg_writer} failed: $!";
}
} else {
if (!$self->spawn_openoffice()) {
$main::lxdebug->leave_sub();

Auch abrufbar als: Unified diff