]> wagnertech.de Git - mfinanz.git/blobdiff - SL/Template/OpenDocument.pm
Merge branch 'master' of vc.linet-services.de:public/lx-office-erp
[mfinanz.git] / SL / Template / OpenDocument.pm
index 88b4cffbfb70b21543a17aff56bf9ea97e5dbc89..b4ea1f2a5d24d2f4a64da6c224766354a8c9f562 100644 (file)
@@ -270,14 +270,14 @@ sub parse {
 
   $zip->contents("content.xml", Encode::encode('utf-8-strict', $new_contents));
 
-  my $styles = $zip->contents("styles.xml");
+  my $styles = Encode::decode('utf-8-strict', $zip->contents("styles.xml"));
   if ($contents) {
     my $new_styles = $self->parse_block($styles);
     if (!defined($new_contents)) {
       $main::lxdebug->leave_sub();
       return 0;
     }
-    $zip->contents("styles.xml", $new_styles);
+    $zip->contents("styles.xml", Encode::encode('utf-8-strict', $new_styles));
   }
 
   $zip->writeToFileNamed($form->{"tmpfile"}, 1);
@@ -389,7 +389,7 @@ sub spawn_xvfb {
 
   local *OUT;
   my $dfname = $self->{"userspath"} . "/xvfb_display";
-  if (!open(OUT, ">$dfname")) {
+  if (!open(OUT, ">", $dfname)) {
     $self->{"error"} = "Conversion to PDF failed because OpenOffice could not be started ($dfname: $!)";
     unlink($xauthority);
     kill($pid);