summaryrefslogtreecommitdiffstats
path: root/lib/preview
diff options
context:
space:
mode:
authorGeorg Ehrke <georg@ownCloud.com>2013-06-12 13:20:59 +0200
committerGeorg Ehrke <georg@ownCloud.com>2013-06-12 13:20:59 +0200
commit1f52ad0363e2cff05e2058d31317b580c27e2c31 (patch)
treee99ff33bec73b49de4c191fd409ae47daea9dbdd /lib/preview
parent228e084e65c8bcd56f7cce599df3639b28c5dd58 (diff)
downloadnextcloud-server-1f52ad0363e2cff05e2058d31317b580c27e2c31.tar.gz
nextcloud-server-1f52ad0363e2cff05e2058d31317b580c27e2c31.zip
work on powerpoint fallback
Diffstat (limited to 'lib/preview')
-rw-r--r--lib/preview/msoffice.php9
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/preview/msoffice.php b/lib/preview/msoffice.php
index c2e39d00d94..65886169e9a 100644
--- a/lib/preview/msoffice.php
+++ b/lib/preview/msoffice.php
@@ -59,7 +59,6 @@ class MSOfficeExcel extends Provider {
public function getThumbnail($path, $maxX, $maxY, $scalingup, $fileview) {
require_once('PHPExcel/Classes/PHPExcel.php');
require_once('PHPExcel/Classes/PHPExcel/IOFactory.php');
- //require_once('mpdf/mpdf.php');
$abspath = $fileview->toTmpFile($path);
$tmppath = \OC_Helper::tmpFile();
@@ -113,14 +112,12 @@ class MSOfficePowerPoint extends Provider {
}
public function getThumbnail($path, $maxX, $maxY, $scalingup, $fileview) {
- //require_once('');
- //require_once('');
+ return false;
$abspath = $fileview->toTmpFile($path);
$tmppath = \OC_Helper::tmpFile();
- $excel = PHPPowerPoint_IOFactory::createWriter($abspath, 'PDF');
- $excel->save($tmppath);
+ null;
$pdf = new \imagick($tmppath . '[0]');
$pdf->setImageFormat('jpg');
@@ -128,6 +125,8 @@ class MSOfficePowerPoint extends Provider {
unlink($abspath);
unlink($tmppath);
+ $image = new \OC_Image($pdf);
+
return $image->valid() ? $image : false;
}