summaryrefslogtreecommitdiff
path: root/libre/gloobus-preview-libre/fix-unoconv.patch
blob: f918f30196a9a294d0f853c673e861a588ed968a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
diff -Naur gloobus-preview-0.4.5-ubuntu11~ppa290.orig/src/plugin-pdf/office-loader.cpp gloobus-preview-0.4.5-ubuntu11~ppa290/src/plugin-pdf/office-loader.cpp
--- gloobus-preview-0.4.5-ubuntu11~ppa290.orig/src/plugin-pdf/office-loader.cpp	2012-04-06 15:07:29.000000000 +0200
+++ gloobus-preview-0.4.5-ubuntu11~ppa290/src/plugin-pdf/office-loader.cpp	2013-05-18 10:24:33.558221788 +0200
@@ -87,7 +87,7 @@
 
     if( NULL == uri && Utils::isProgramAvailable("unoconv") ) {
         gchar *path = g_file_get_path(file);
-        gchar *cmd = g_strdup_printf("unoconv --stdout \"%s\" > \"%s\"", path, tmp);
+        gchar *cmd = g_strdup_printf("unoconv -f pdf -o \"%s\" \"%s\"", tmp, path);
 
         if( system(cmd) == 0) {
             uri = pathToUri(tmp);
@@ -123,4 +123,4 @@
 {
     path = "file://" + path;
     return g_uri_escape_string(path.c_str(), G_URI_RESERVED_CHARS_ALLOWED_IN_PATH, false);
-}
\ No newline at end of file
+}
diff -Naur gloobus-preview-0.4.5-ubuntu11~ppa290.orig/src/plugin-pdf/office-plugin.h gloobus-preview-0.4.5-ubuntu11~ppa290/src/plugin-pdf/office-plugin.h
--- gloobus-preview-0.4.5-ubuntu11~ppa290.orig/src/plugin-pdf/office-plugin.h	2012-04-06 15:07:29.000000000 +0200
+++ gloobus-preview-0.4.5-ubuntu11~ppa290/src/plugin-pdf/office-plugin.h	2013-05-18 10:33:02.352806550 +0200
@@ -6,15 +6,21 @@
 PluginManager::register_plugin("office");
 
 PluginManager::register_filetype("application/vnd.oasis.opendocument.text", 1);
+PluginManager::register_filetype("application/vnd.openxmlformats-officedocument.wordprocessingml.document", 1);
 PluginManager::register_filetype("application/msword", 1);
 PluginManager::register_filetype("application/rtf", 1);
 PluginManager::register_filetype("application/vnd.ms-excel", 1);
 PluginManager::register_filetype("application/vnd.oasis.opendocument.spreadsheet", 1);
+PluginManager::register_filetype("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", 1);
 PluginManager::register_filetype("application/vnd.ms-powerpoint", 1);
+PluginManager::register_filetype("application/vnd.oasis.opendocument.presentation", 1);
+PluginManager::register_filetype("application/vnd.openxmlformats-officedocument.presentationml.presentation", 1);
 PluginManager::register_filetype("application/vnd.sun.xml.calc", 1);
+PluginManager::register_filetype("application/vnd.oasis.opendocument.graphics", 1);
+
 
 // TODO: add more filetypes supported by abiword and/or OpenOffice
 
 #endif
 
-#endif /* OFFICE_PLUGIN_H */
\ No newline at end of file
+#endif /* OFFICE_PLUGIN_H */