X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;f=www%2Fplugins%2Fodt2spip_32%2Finc%2Fconvertir_avec_libreoffice.php;fp=www%2Fplugins%2Fodt2spip_32%2Finc%2Fconvertir_avec_libreoffice.php;h=a43a27b2e3835e706040e159b5240ee0d392a91a;hb=4f443dce95ff6f8221c189880a70c74ce1c1f238;hp=0000000000000000000000000000000000000000;hpb=4a628e9b277d3617535f99d663ca79fa2e891177;p=lhc%2Fweb%2Fwww.git diff --git a/www/plugins/odt2spip_32/inc/convertir_avec_libreoffice.php b/www/plugins/odt2spip_32/inc/convertir_avec_libreoffice.php new file mode 100644 index 00000000..a43a27b2 --- /dev/null +++ b/www/plugins/odt2spip_32/inc/convertir_avec_libreoffice.php @@ -0,0 +1,44 @@ +setConvertTo($format_destination) + ->setOutputDir($destination) + ->execute(); + } catch (\Exception $e) { + spip_log($e->getMessage(), 'odtspip.' . _LOG_ERREUR); + return false; + } + + if ($libreoffice->getErrors()) { + return false; + } + + return $libreoffice->getConvertedFile(); +} \ No newline at end of file