Revision 2b339152
Von Moritz Bunkus vor fast 14 Jahren hinzugefügt
SL/Controller/Base.pm | ||
---|---|---|
70 | 70 |
LXCONFIG => { dbcharset => $::dbcharset, |
71 | 71 |
webdav => $::webdav, |
72 | 72 |
lizenzen => $::lizenzen, |
73 |
latex_templates => $::latex,
|
|
74 |
opendocument_templates => $::opendocument_templates,
|
|
73 |
latex_templates => $::lx_office_conf{print_templates}->{latex},
|
|
74 |
opendocument_templates => $::lx_office_conf{print_templates}->{opendocument},
|
|
75 | 75 |
vertreter => $::vertreter, |
76 | 76 |
show_best_before => $::show_best_before, |
77 | 77 |
}, |
SL/Form.pm | ||
---|---|---|
805 | 805 |
$additional_params->{"conf_dbcharset"} = $::dbcharset; |
806 | 806 |
$additional_params->{"conf_webdav"} = $::webdav; |
807 | 807 |
$additional_params->{"conf_lizenzen"} = $::lizenzen; |
808 |
$additional_params->{"conf_latex_templates"} = $::latex;
|
|
809 |
$additional_params->{"conf_opendocument_templates"} = $::opendocument_templates;
|
|
808 |
$additional_params->{"conf_latex_templates"} = $::lx_office_conf{print_templates}->{latex};
|
|
809 |
$additional_params->{"conf_opendocument_templates"} = $::lx_office_conf{print_templates}->{opendocument};
|
|
810 | 810 |
$additional_params->{"conf_vertreter"} = $::vertreter; |
811 | 811 |
$additional_params->{"conf_show_best_before"} = $::show_best_before; |
812 | 812 |
$additional_params->{"conf_parts_image_css"} = $::parts_image_css; |
SL/Template/OpenDocument.pm | ||
---|---|---|
419 | 419 |
sub is_openoffice_running { |
420 | 420 |
$main::lxdebug->enter_sub(); |
421 | 421 |
|
422 |
my $output = `./scripts/oo-uno-test-conn.py $main::openofficeorg_daemon_port 2> /dev/null`; |
|
422 |
my $cmd = "./scripts/oo-uno-test-conn.py " . $::lx_office_conf{print_templates}->{openofficeorg_daemon_port} . " 2> /dev/null"; |
|
423 |
my $output = `$cmd`; |
|
423 | 424 |
chomp $output; |
424 | 425 |
|
425 | 426 |
my $res = ($? == 0) || $output; |
... | ... | |
461 | 462 |
"-minimized", "-norestore", "-nologo", "-nolockcheck", |
462 | 463 |
"-headless", |
463 | 464 |
"-accept=socket,host=localhost,port=" . |
464 |
$main::openofficeorg_daemon_port . ";urp;");
|
|
465 |
$::lx_office_conf{print_templates}->{openofficeorg_daemon_port} . ";urp;");
|
|
465 | 466 |
exec(@cmdline); |
466 | 467 |
} |
467 | 468 |
|
... | ... | |
508 | 509 |
} |
509 | 510 |
|
510 | 511 |
my @cmdline; |
511 |
if (!$main::openofficeorg_daemon) {
|
|
512 |
if (!$::lx_office_conf{print_templates}->{openofficeorg_daemon}) {
|
|
512 | 513 |
@cmdline = ($::lx_office_conf{applications}->{openofficeorg_writer}, |
513 | 514 |
"-minimized", "-norestore", "-nologo", "-nolockcheck", |
514 | 515 |
"-headless", |
... | ... | |
522 | 523 |
} |
523 | 524 |
|
524 | 525 |
@cmdline = ("./scripts/oo-uno-convert-pdf.py", |
525 |
$main::openofficeorg_daemon_port,
|
|
526 |
$::lx_office_conf{print_templates}->{openofficeorg_daemon_port},
|
|
526 | 527 |
"${filename}.odt"); |
527 | 528 |
} |
528 | 529 |
|
bin/mozilla/am.pl | ||
---|---|---|
2457 | 2457 |
_build_cfg_options('numberformat', ('1,000.00', '1000.00', '1.000,00', '1000,00')); |
2458 | 2458 |
|
2459 | 2459 |
my @formats = (); |
2460 |
if ($main::opendocument_templates
|
|
2460 |
if ($::lx_office_conf{print_templates}->{opendocument}
|
|
2461 | 2461 |
&& $::lx_office_conf{applications}->{openofficeorg_writer} && (-x $::lx_office_conf{applications}->{openofficeorg_writer}) |
2462 | 2462 |
&& $::lx_office_conf{applications}->{xvfb} && (-x $::lx_office_conf{applications}->{xvfb})) { |
2463 | 2463 |
push(@formats, { "name" => $locale->text("PDF (OpenDocument/OASIS)"), |
2464 | 2464 |
"value" => "opendocument_pdf" }); |
2465 | 2465 |
} |
2466 |
if ($main::latex_templates) {
|
|
2466 |
if ($::lx_office_conf{print_templates}->{latex}) {
|
|
2467 | 2467 |
push(@formats, { "name" => $locale->text("PDF"), "value" => "pdf" }); |
2468 | 2468 |
} |
2469 | 2469 |
push(@formats, { "name" => "HTML", "value" => "html" }); |
2470 |
if ($main::latex_templates) {
|
|
2470 |
if ($::lx_office_conf{print_templates}->{latex}) {
|
|
2471 | 2471 |
push(@formats, { "name" => $locale->text("Postscript"), |
2472 | 2472 |
"value" => "postscript" }); |
2473 | 2473 |
} |
2474 |
if ($main::opendocument_templates) {
|
|
2474 |
if ($::lx_office_conf{print_templates}->{opendocument}) {
|
|
2475 | 2475 |
push(@formats, { "name" => $locale->text("OpenDocument/OASIS"), |
2476 | 2476 |
"value" => "opendocument" }); |
2477 | 2477 |
} |
bin/mozilla/io.pl | ||
---|---|---|
1166 | 1166 |
|
1167 | 1167 |
push @MEDIA, grep $_, |
1168 | 1168 |
opthash("screen", $form->{OP}{screen}, $locale->text('Screen')), |
1169 |
($form->{printers} && scalar @{ $form->{printers} } && $main::latex_templates) ?
|
|
1169 |
($form->{printers} && scalar @{ $form->{printers} } && $::lx_office_conf{print_templates}->{latex}) ?
|
|
1170 | 1170 |
opthash("printer", $form->{OP}{printer}, $locale->text('Printer')) : undef, |
1171 |
($main::latex_templates && !$options{no_queue}) ?
|
|
1171 |
($::lx_office_conf{print_templates}->{latex} && !$options{no_queue}) ?
|
|
1172 | 1172 |
opthash("queue", $form->{OP}{queue}, $locale->text('Queue')) : undef |
1173 | 1173 |
if ($form->{media} ne 'email'); |
1174 | 1174 |
|
1175 | 1175 |
push @FORMAT, grep $_, |
1176 |
($main::opendocument_templates && $::lx_office_conf{applications}->{openofficeorg_writer} && $::lx_office_conf{applications}->{xvfb}
|
|
1177 |
&& (-x $::lx_office_conf{applications}->{openofficeorg_writer}) && (-x $::lx_office_conf{applications}->{xvfb}) |
|
1176 |
($::lx_office_conf{print_templates}->{opendocument} && $::lx_office_conf{applications}->{openofficeorg_writer} && $::lx_office_conf{applications}->{xvfb}
|
|
1177 |
&& (-x $::lx_office_conf{applications}->{openofficeorg_writer}) && (-x $::lx_office_conf{applications}->{xvfb})
|
|
1178 | 1178 |
&& !$options{no_opendocument_pdf}) ? |
1179 | 1179 |
opthash("opendocument_pdf", $form->{DF}{"opendocument_pdf"}, $locale->text("PDF (OpenDocument/OASIS)")) : undef, |
1180 |
($main::latex_templates) ?
|
|
1180 |
($::lx_office_conf{print_templates}->{latex}) ?
|
|
1181 | 1181 |
opthash("pdf", $form->{DF}{pdf}, $locale->text('PDF')) : undef, |
1182 |
($main::latex_templates && !$options{no_postscript}) ?
|
|
1182 |
($::lx_office_conf{print_templates}->{latex} && !$options{no_postscript}) ?
|
|
1183 | 1183 |
opthash("postscript", $form->{DF}{postscript}, $locale->text('Postscript')) : undef, |
1184 | 1184 |
(!$options{no_html}) ? |
1185 | 1185 |
opthash("html", $form->{DF}{html}, "HTML") : undef, |
1186 |
($main::opendocument_templates && !$options{no_opendocument}) ?
|
|
1186 |
($::lx_office_conf{print_templates}->{opendocument} && !$options{no_opendocument}) ?
|
|
1187 | 1187 |
opthash("opendocument", $form->{DF}{opendocument}, $locale->text("OpenDocument/OASIS")) : undef, |
1188 |
($main::excel_templates && !$options{no_excel}) ?
|
|
1188 |
($::lx_office_conf{print_templates}->{excel} && !$options{no_excel}) ?
|
|
1189 | 1189 |
opthash("excel", $form->{DF}{excel}, $locale->text("Excel")) : undef; |
1190 | 1190 |
|
1191 | 1191 |
push @LANGUAGE_ID, |
... | ... | |
1213 | 1213 |
); |
1214 | 1214 |
|
1215 | 1215 |
my %template_vars = ( |
1216 |
display_copies => scalar @{ $form->{printers} || [] } && $main::latex_templates && $form->{media} ne 'email',
|
|
1216 |
display_copies => scalar @{ $form->{printers} || [] } && $::lx_office_conf{print_templates}->{latex} && $form->{media} ne 'email',
|
|
1217 | 1217 |
display_remove_draft => (!$form->{id} && $form->{draft_id}), |
1218 | 1218 |
display_groupitems => !$dont_display_groupitems{$form->{type}}, |
1219 | 1219 |
groupitems_checked => $form->{groupitems} ? "checked" : '', |
bin/mozilla/rp.pl | ||
---|---|---|
2542 | 2542 |
} else { |
2543 | 2543 |
$media = qq| |
2544 | 2544 |
<option value=screen $form->{OP}{screen}>| . $locale->text('Screen'); |
2545 |
if ($myconfig{printer} && $main::latex_templates) {
|
|
2545 |
if ($myconfig{printer} && $::lx_office_conf{print_templates}->{latex}) {
|
|
2546 | 2546 |
$media .= qq| |
2547 | 2547 |
<option value=printer $form->{OP}{printer}>| . $locale->text('Printer'); |
2548 | 2548 |
} |
2549 | 2549 |
} |
2550 | 2550 |
|
2551 | 2551 |
my $format; |
2552 |
if ($main::latex_templates) {
|
|
2552 |
if ($::lx_office_conf{print_templates}->{latex}) {
|
|
2553 | 2553 |
$format .= qq| |
2554 | 2554 |
<option value=html $form->{DF}{html}>| . $locale->text('HTML') |
2555 | 2555 |
. qq| <option value=pdf $form->{DF}{pdf}>| . $locale->text('PDF') |
... | ... | |
2564 | 2564 |
<td><select name=media>$media</select></td> |
2565 | 2565 |
|; |
2566 | 2566 |
|
2567 |
if ($myconfig{printer} && $main::latex_templates && $form->{media} ne 'email') {
|
|
2567 |
if ($myconfig{printer} && $::lx_office_conf{print_templates}->{latex} && $form->{media} ne 'email') {
|
|
2568 | 2568 |
$output .= qq| |
2569 | 2569 |
<td>| . $locale->text('Copies') . qq| |
2570 | 2570 |
<input name=copies size=2 value=$form->{copies}></td> |
config/lx-erp.conf | ||
---|---|---|
2 | 2 |
|
3 | 3 |
our ( |
4 | 4 |
$dbcharset, $eur, $language, |
5 |
$latex_templates, $lizenzen, $opendocument_templates, |
|
6 |
$openofficeorg_daemon, $openofficeorg_daemon_port, |
|
5 |
$lizenzen, |
|
7 | 6 |
$parts_image_css, $parts_listing_images, $parts_show_image, |
8 | 7 |
$show_best_before, $vertreter, $webdav |
9 | 8 |
); |
... | ... | |
16 | 15 |
# currently "de" (German), "de_DE" (new German) and "en" (English, not perfect) are available |
17 | 16 |
$language = "de"; |
18 | 17 |
|
19 |
# if you have latex installed set to 1 |
|
20 |
$latex_templates = 1; |
|
21 |
|
|
22 | 18 |
# Aktivierung der verschiedenen Spezialmodule |
23 | 19 |
$webdav = 0; |
24 | 20 |
$lizenzen = 1; |
25 | 21 |
$vertreter = 0; |
26 |
$excel_templates = 0; # Minimalunterstützung für Excel-Druckvorlagen |
|
27 | 22 |
|
28 | 23 |
# Zeige Felder für Mindesthaltbarkeitsdatum |
29 | 24 |
$show_best_before = 0; |
... | ... | |
35 | 30 |
# Artikelbilder per default in den Suchergebnissen anzeigen |
36 | 31 |
$parts_listing_images = 0; # [0|1] |
37 | 32 |
|
38 |
## Support fuer OpenDocument-Vorlagen |
|
39 |
# Diese Option legt fest, ob OpenDocument-Vorlagen generell verfuegbar sind. |
|
40 |
$opendocument_templates = 1; |
|
41 |
|
|
42 |
# Die folgenden zwei Variablen legen Pfade zu Programmen fest, die benoetigt |
|
43 |
# werden, um OpenDocument-Vorlagen in PDFs umzuwandeln. |
|
44 |
|
|
45 |
# Soll OpenOffice dauerhaft gestartet bleiben? Die Konvertierung nachfolgender |
|
46 |
# Dokumente geht dann schneller. Allerdings wird auf dem System ein |
|
47 |
# installiertes Python mit den Python-UNO-Bindings benoetigt, die Bestandteil |
|
48 |
# von OpenOffice sind. |
|
49 |
$openofficeorg_daemon = 1; |
|
50 |
$openofficeorg_daemon_port = 2002; |
|
51 |
|
|
52 | 33 |
# Das charset, in dem die Daten in der Datenbank abgelegt sind. |
53 | 34 |
$dbcharset = 'UTF-8'; # Für UNICODE UTF-8 |
54 | 35 |
# $dbcharset = "ISO-8859-15"; |
config/lx-erp.conf.default | ||
---|---|---|
2 | 2 |
|
3 | 3 |
our ( |
4 | 4 |
$dbcharset, $eur, $language, |
5 |
$latex_templates, $lizenzen, $opendocument_templates, |
|
6 |
$openofficeorg_daemon, $openofficeorg_daemon_port, |
|
5 |
$lizenzen, |
|
7 | 6 |
$parts_image_css, $parts_listing_images, $parts_show_image, |
8 | 7 |
$show_best_before, $vertreter, $webdav |
9 | 8 |
); |
... | ... | |
16 | 15 |
# currently "de" (German), "de_DE" (new German) and "en" (English, not perfect) are available |
17 | 16 |
$language = "de"; |
18 | 17 |
|
19 |
# if you have latex installed set to 1 |
|
20 |
$latex_templates = 1; |
|
21 |
|
|
22 | 18 |
# Aktivierung der verschiedenen Spezialmodule |
23 | 19 |
$webdav = 0; |
24 | 20 |
$lizenzen = 1; |
25 | 21 |
$vertreter = 0; |
26 |
$excel_templates = 0; # Minimalunterstützung für Excel-Druckvorlagen |
|
27 | 22 |
|
28 | 23 |
# Zeige Felder für Mindesthaltbarkeitsdatum |
29 | 24 |
$show_best_before = 0; |
... | ... | |
35 | 30 |
# Artikelbilder per default in den Suchergebnissen anzeigen |
36 | 31 |
$parts_listing_images = 0; # [0|1] |
37 | 32 |
|
38 |
## Support fuer OpenDocument-Vorlagen |
|
39 |
# Diese Option legt fest, ob OpenDocument-Vorlagen generell verfuegbar sind. |
|
40 |
$opendocument_templates = 1; |
|
41 |
|
|
42 |
# Die folgenden zwei Variablen legen Pfade zu Programmen fest, die benoetigt |
|
43 |
# werden, um OpenDocument-Vorlagen in PDFs umzuwandeln. |
|
44 |
|
|
45 |
# Soll OpenOffice dauerhaft gestartet bleiben? Die Konvertierung nachfolgender |
|
46 |
# Dokumente geht dann schneller. Allerdings wird auf dem System ein |
|
47 |
# installiertes Python mit den Python-UNO-Bindings benoetigt, die Bestandteil |
|
48 |
# von OpenOffice sind. |
|
49 |
$openofficeorg_daemon = 1; |
|
50 |
$openofficeorg_daemon_port = 2002; |
|
51 |
|
|
52 | 33 |
# Das charset, in dem die Daten in der Datenbank abgelegt sind. |
53 | 34 |
$dbcharset = 'UTF-8'; # Für UNICODE UTF-8 |
54 | 35 |
# $dbcharset = "ISO-8859-15"; |
config/lx_office.conf.default | ||
---|---|---|
36 | 36 |
# "/sw/lib/perl5" is for Mac OS X with Fink's Perl. |
37 | 37 |
lib = /sw/lib/perl5 |
38 | 38 |
|
39 |
[print_templates] |
|
40 |
# If you have LaTeX installed set to 1 |
|
41 |
latex = 1 |
|
42 |
# Minimal support for Excel print templates |
|
43 |
excel = 0 |
|
44 |
# Enable or disable support for OpenDocument print templates |
|
45 |
opendocument = 1 |
|
46 |
# Chose whether or not OpenOffice should remain running after a |
|
47 |
# conversion. If yes then the conversion of subsequent documents will |
|
48 |
# be a lot faster. You need to have Python and the Python UNO bindings |
|
49 |
# (part of OpenOffice) installed. |
|
50 |
openofficeorg_daemon = 1 |
|
51 |
openofficeorg_daemon_port = 2002 |
|
52 |
|
|
39 | 53 |
[task_server] |
40 | 54 |
# User name to use for database access |
41 | 55 |
login = mb |
Auch abrufbar als: Unified diff
Globale Variablen für Druckvorlagen nach %::lx_office_conf verschoben
Betroffen sind:
$latex_templates
$excel_templates
$opendocument_templates
$openofficeorg_daemon
$openofficeorg_daemon_port