2013-06-03 13:24:31 +04:00
|
|
|
<?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.
|
|
|
|
*/
|
2013-06-05 12:50:20 +04:00
|
|
|
//let's see if there is libreoffice or openoffice on this machine
|
|
|
|
if(shell_exec('libreoffice --headless --version') || shell_exec('openoffice --headless --version') || is_string(\OC_Config::getValue('preview_libreoffice_path', null))) {
|
2013-06-03 13:24:31 +04:00
|
|
|
require_once('libreoffice-cl.php');
|
|
|
|
}else{
|
2013-06-05 12:50:20 +04:00
|
|
|
//in case there isn't, use our fallback
|
2013-06-03 13:24:31 +04:00
|
|
|
require_once('msoffice.php');
|
|
|
|
require_once('opendocument.php');
|
|
|
|
}
|