diff --git a/lib/preview.php b/lib/preview.php index a73f4cb1ac008b8af1be9d7daafe6a062dce6a7e..4705efe210787f15592887f8648181a4699e03bc 100755 --- a/lib/preview.php +++ b/lib/preview.php @@ -20,7 +20,7 @@ require_once('preview/pdf.php'); require_once('preview/svg.php'); require_once('preview/txt.php'); require_once('preview/unknown.php'); -require_once('preview/msoffice.php'); +//require_once('preview/msoffice.php'); //require_once('preview/opendocument.php'); class Preview { diff --git a/lib/preview/libreoffice-cl.php b/lib/preview/libreoffice-cl.php new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/lib/preview/office.php b/lib/preview/office.php new file mode 100644 index 0000000000000000000000000000000000000000..c66f5584f0715bea220622783cdf61948d4ff05a --- /dev/null +++ b/lib/preview/office.php @@ -0,0 +1,13 @@ +<?php +/** + * Copyright (c) 2013 Georg Ehrke georg@ownCloud.com + * This file is licensed under the Affero General Public License version 3 or + * later. + * See the COPYING-README file. + */ +if(shell_exec('libreoffice') || shell_exec('openoffice')) { + require_once('libreoffice-cl.php'); +}else{ + require_once('msoffice.php'); + require_once('opendocument.php'); +} \ No newline at end of file diff --git a/lib/preview/opendocument.php b/lib/preview/opendocument.php new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391