X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FTemplate%2FOpenDocument.pm;h=e2f7dcd6372e2ee72170501f47d44a8cf74a6e6c;hb=2b3391521b469f9f7b2928d104a9f620dddb25d2;hp=2ed3c60fa89db36100ff2bf0c1c47050a2ac8ba2;hpb=6cf3f7762efd40bee49a2b8f11bb4ab6915d9071;p=kivitendo-erp.git diff --git a/SL/Template/OpenDocument.pm b/SL/Template/OpenDocument.pm index 2ed3c60fa..e2f7dcd63 100644 --- a/SL/Template/OpenDocument.pm +++ b/SL/Template/OpenDocument.pm @@ -382,7 +382,7 @@ sub spawn_xvfb { my $pid = fork(); if (0 == $pid) { $main::lxdebug->message(LXDebug->DEBUG2(), " Child execing\n"); - exec($main::xvfb_bin, $display, "-screen", "0", "640x480x8", "-nolisten", "tcp"); + exec($::lx_office_conf{applications}->{xvfb}, $display, "-screen", "0", "640x480x8", "-nolisten", "tcp"); } sleep(3); $main::lxdebug->message(LXDebug->DEBUG2(), " parent dont sleeping\n"); @@ -419,7 +419,8 @@ sub spawn_xvfb { sub is_openoffice_running { $main::lxdebug->enter_sub(); - my $output = `./scripts/oo-uno-test-conn.py $main::openofficeorg_daemon_port 2> /dev/null`; + my $cmd = "./scripts/oo-uno-test-conn.py " . $::lx_office_conf{print_templates}->{openofficeorg_daemon_port} . " 2> /dev/null"; + my $output = `$cmd`; chomp $output; my $res = ($? == 0) || $output; @@ -457,11 +458,11 @@ sub spawn_openoffice { exit if ($new_pid); my $ssres = setsid(); $main::lxdebug->message(LXDebug->DEBUG2(), " Child execing\n"); - my @cmdline = ($main::openofficeorg_writer_bin, + my @cmdline = ($::lx_office_conf{applications}->{openofficeorg_writer}, "-minimized", "-norestore", "-nologo", "-nolockcheck", "-headless", "-accept=socket,host=localhost,port=" . - $main::openofficeorg_daemon_port . ";urp;"); + $::lx_office_conf{print_templates}->{openofficeorg_daemon_port} . ";urp;"); exec(@cmdline); } @@ -508,8 +509,8 @@ sub convert_to_pdf { } my @cmdline; - if (!$main::openofficeorg_daemon) { - @cmdline = ($main::openofficeorg_writer_bin, + if (!$::lx_office_conf{print_templates}->{openofficeorg_daemon}) { + @cmdline = ($::lx_office_conf{applications}->{openofficeorg_writer}, "-minimized", "-norestore", "-nologo", "-nolockcheck", "-headless", "file:${filename}.odt", @@ -522,7 +523,7 @@ sub convert_to_pdf { } @cmdline = ("./scripts/oo-uno-convert-pdf.py", - $main::openofficeorg_daemon_port, + $::lx_office_conf{print_templates}->{openofficeorg_daemon_port}, "${filename}.odt"); }