libgsf r994 - in trunk: . thumbnailer
- From: hub svn gnome org
- To: svn-commits-list gnome org
- Subject: libgsf r994 - in trunk: . thumbnailer
- Date: Wed, 30 Jul 2008 03:22:13 +0000 (UTC)
Author: hub
Date: Wed Jul 30 03:22:13 2008
New Revision: 994
URL: http://svn.gnome.org/viewvc/libgsf?rev=994&view=rev
Log:
* thumbnailer/gsf-office-thumbnailer.schemas.in:
* thumbnailer/main.c (zip_thumbnail): Add support for OpenPkg
(MS Office Open XML) thumbnailing.
Modified:
trunk/ChangeLog
trunk/thumbnailer/gsf-office-thumbnailer.schemas.in
trunk/thumbnailer/main.c
Modified: trunk/thumbnailer/gsf-office-thumbnailer.schemas.in
==============================================================================
--- trunk/thumbnailer/gsf-office-thumbnailer.schemas.in (original)
+++ trunk/thumbnailer/gsf-office-thumbnailer.schemas.in Wed Jul 30 03:22:13 2008
@@ -24,6 +24,29 @@
<long>Valid command plus arguments for the Microsoft PowerPoint thumbnailer</long>
</locale>
</schema>
+<!-- XML MS Powerpoint 2007 -->
+ <schema>
+ <key>/schemas/desktop/gnome/thumbnailers/application vnd openxmlformats-officedocument presentationml presentation/enable</key>
+ <applyto>/desktop/gnome/thumbnailers/application vnd openxmlformats-officedocument presentationml presentation/enable</applyto>
+ <owner>libgsf</owner>
+ <type>bool</type>
+ <default>true</default>
+ <locale name="C">
+ <short>Enable thumbnailing of Microsoft PowerPoint 2007 presentations</short>
+ <long>Boolean options available, true enables thumbnailing and false disables the creation of new thumbnails</long>
+ </locale>
+ </schema>
+ <schema>
+ <key>/schemas/desktop/gnome/thumbnailers/application vnd openxmlformats-officedocument presentationml presentation/command</key>
+ <applyto>/desktop/gnome/thumbnailers/application vnd openxmlformats-officedocument presentationml presentation/command</applyto>
+ <owner>libgsf</owner>
+ <type>string</type>
+ <default>gsf-office-thumbnailer -i %i -o %o -s %s</default>
+ <locale name="C">
+ <short>Thumbnail command for Microsoft PowerPoint 2007 presentations</short>
+ <long>Valid command plus arguments for the Microsoft PowerPoint 2007 thumbnailer</long>
+ </locale>
+ </schema>
<!-- MS Excel -->
<schema>
<key>/schemas/desktop/gnome/thumbnailers/application vnd ms-excel/enable</key>
@@ -47,6 +70,29 @@
<long>Valid command plus arguments for the Microsoft Excel spreadsheets.</long>
</locale>
</schema>
+<!-- XML MS Excel 2007 -->
+ <schema>
+ <key>/schemas/desktop/gnome/thumbnailers/application vnd openxmlformats-officedocument spreadsheetml sheet/enable</key>
+ <applyto>/desktop/gnome/thumbnailers/application vnd openxmlformats-officedocument spreadsheetml sheet/enable</applyto>
+ <owner>libgsf</owner>
+ <type>bool</type>
+ <default>true</default>
+ <locale name="C">
+ <short>Enable thumbnailing of Microsoft Excel 2007 spreadsheets</short>
+ <long>Boolean options available, true enables thumbnailing and false disables the creation of new thumbnails</long>
+ </locale>
+ </schema>
+ <schema>
+ <key>/schemas/desktop/gnome/thumbnailers/application vnd openxmlformats-officedocument spreadsheetml sheet/command</key>
+ <applyto>/desktop/gnome/thumbnailers/application vnd openxmlformats-officedocument spreadsheetml sheet/command</applyto>
+ <owner>libgsf</owner>
+ <type>string</type>
+ <default>gsf-office-thumbnailer -i %i -o %o -s %s</default>
+ <locale name="C">
+ <short>Thumbnail command for Microsoft Excel 2007 spreadsheets</short>
+ <long>Valid command plus arguments for the Microsoft Excel 2007 spreadsheets.</long>
+ </locale>
+ </schema>
<!-- MS Word -->
<schema>
<key>/schemas/desktop/gnome/thumbnailers/application msword/enable</key>
@@ -70,6 +116,29 @@
<long>Valid command plus arguments for the Microsoft Word thumbnailer</long>
</locale>
</schema>
+<!-- XML MS Word 2007 -->
+ <schema>
+ <key>/schemas/desktop/gnome/thumbnailers/application vnd openxmlformats-officedocument wordprocessingml document/enable</key>
+ <applyto>/desktop/gnome/thumbnailers/application vnd openxmlformats-officedocument wordprocessingml document/enable</applyto>
+ <owner>libgsf</owner>
+ <type>bool</type>
+ <default>true</default>
+ <locale name="C">
+ <short>Enable thumbnailing of Microsoft Word 2007 documents</short>
+ <long>Boolean options available, true enables thumbnailing and false disables the creation of new thumbnails</long>
+ </locale>
+ </schema>
+ <schema>
+ <key>/schemas/desktop/gnome/thumbnailers/application vnd openxmlformats-officedocument wordprocessingml document/command</key>
+ <applyto>/desktop/gnome/thumbnailers/application vnd openxmlformats-officedocument wordprocessingml document/command</applyto>
+ <owner>libgsf</owner>
+ <type>string</type>
+ <default>gsf-office-thumbnailer -i %i -o %o -s %s</default>
+ <locale name="C">
+ <short>Thumbnail command for Microsoft Word 2007 documents</short>
+ <long>Valid command plus arguments for the Microsoft Word 2007 thumbnailer</long>
+ </locale>
+ </schema>
<!-- From http://framework.openoffice.org/documentation/mimetypes/mimetypes.html -->
<!-- OpenDoc Presentation Templates -->
<schema>
Modified: trunk/thumbnailer/main.c
==============================================================================
--- trunk/thumbnailer/main.c (original)
+++ trunk/thumbnailer/main.c Wed Jul 30 03:22:13 2008
@@ -28,6 +28,7 @@
#include <gsf/gsf-msole-utils.h>
#include <gsf/gsf-utils.h>
#include <gsf/gsf-clip-data.h>
+#include <gsf/gsf-open-pkg-utils.h>
#include <stdlib.h>
#include <unistd.h>
#include <glib.h>
@@ -125,6 +126,13 @@
write_thumbnail (out_filename, data, len, thumb_size);
g_object_unref (thumbnail);
/* Check MS Office Open thumbnail */
+ } else if (NULL != (thumbnail = gsf_open_pkg_open_rel_by_type (GSF_INPUT(infile),
+ "http://schemas.openxmlformats.org/package/2006/relationships/metadata/thumbnail",
+ NULL))) {
+ gsf_off_t len = gsf_input_remaining (thumbnail);
+ guint8 const *data = gsf_input_read (thumbnail, len, NULL);
+ write_thumbnail (out_filename, data, len, thumb_size);
+ g_object_unref (thumbnail);
} else
show_error_string_and_exit ("Could not find thumbnail in zip file");
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]