OpenOfficeorgThumbnail-1.0.0/000775 001750 001750 00000000000 11253164510 014301 5ustar00000000 000000 OpenOfficeorgThumbnail-1.0.0/src/000775 001750 001750 00000000000 11251476477 015110 5ustar00000000 000000 OpenOfficeorgThumbnail-1.0.0/src/CMakeLists.txt000644 001750 001750 00000000657 11240134146 017634 0ustar00000000 000000 set(OpenOfficeorgThumbnail_SRCS openofficeorgcreator.cpp) qt4_add_resources(OpenOfficeorgThumbnail_SRCS openofficeorgthumbnail.qrc) kde4_add_plugin(openofficeorgthumbnail ${OpenOfficeorgThumbnail_SRCS}) target_link_libraries(openofficeorgthumbnail ${KDE4_KIO_LIBS} ) install(TARGETS openofficeorgthumbnail DESTINATION ${PLUGIN_INSTALL_DIR} ) install(FILES openofficeorgthumbnail.desktop DESTINATION ${SERVICES_INSTALL_DIR}) OpenOfficeorgThumbnail-1.0.0/src/openofficeorgthumbnail.desktop000644 001750 001750 00000001510 11240076675 023221 0ustar00000000 000000 [Desktop Entry] Type=Service Name=OpenOffice.org Files Name[es]=Archivos de OpenOffice.org X-KDE-ServiceTypes=ThumbCreator MimeType=application/vnd.oasis.opendocument.text;application/vnd.oasis.opendocument.text-template;application/vnd.oasis.opendocument.text-master;application/vnd.oasis.opendocument.spreadsheet;application/vnd.oasis.opendocument.spreadsheet-template;application/vnd.oasis.opendocument.graphics;application/vnd.oasis.opendocument.graphics-template;application/vnd.oasis.opendocument.presentation;application/vnd.oasis.opendocument.presentation-template;application/vnd.oasis.opendocument.formula;application/vnd.oasis.opendocument.formula-template;application/vnd.oasis.opendocument.chart;application/vnd.oasis.opendocument.chart-template; X-KDE-Library=openofficeorgthumbnail CacheThumbnail=true IgnoreMaximumSize=true OpenOfficeorgThumbnail-1.0.0/src/openofficeorgcreator.h000644 001750 001750 00000002450 11251475507 021456 0ustar00000000 000000 /* * Copyright (C) 2009 * by Ariel Constenla-Haile * * This file is part of OpenOffice.org Thumbnail Creator. * * This is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License version 3 * only, as published by the Free Software Foundation. * * This is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License version 3 for more details * (a copy is included in the LICENSE file that accompanied this code). * * You should have received a copy of the GNU Lesser General Public License * version 3 along with OpenOffice.org Thumbnail Creator. If not, see * for a copy of the LGPLv3 License. */ #ifndef _OPENOFFICE_ORG_CREATOR_H_ #define _OPENOFFICE_ORG_CREATOR_H_ #include #include class OOoCreator : public QObject, public ThumbCreator { Q_OBJECT public: OOoCreator(); virtual ~OOoCreator(); virtual bool create(const QString &path, int w, int h, QImage &img); virtual Flags flags() const; private: QImage* m_signet; }; #endif // _OPEN_OFFICE_ORG_CREATOR_H_ OpenOfficeorgThumbnail-1.0.0/src/openofficeorgcreator.cpp000644 001750 001750 00000005414 11251475522 022011 0ustar00000000 000000 /* * Copyright (C) 2009 * by Ariel Constenla-Haile * * This file is part of OpenOffice.org Thumbnail Creator. * * This is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License version 3 * only, as published by the Free Software Foundation. * * This is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License version 3 for more details * (a copy is included in the LICENSE file that accompanied this code). * * You should have received a copy of the GNU Lesser General Public License * version 3 along with OpenOffice.org Thumbnail Creator. If not, see * for a copy of the LGPLv3 License. */ #include "openofficeorgcreator.h" #include #include #include extern "C" { KDE_EXPORT ThumbCreator *new_creator() { return new OOoCreator; } } OOoCreator::OOoCreator() { m_signet = new QImage( ":/images/signet.png" ); } OOoCreator::~OOoCreator() { if ( m_signet != NULL ) { delete m_signet; m_signet = 0; } } bool OOoCreator::create ( const QString &path, int /*w*/, int /*h*/, QImage &img ) { bool bRet = false; KZip zip ( path ); if ( zip.open ( QIODevice::ReadOnly ) ) { const KArchiveDirectory* dir = zip.directory(); const KArchiveEntry* entry = dir->entry ( "Thumbnails/thumbnail.png" ); if ( ( entry != NULL ) && ( entry->isFile() ) ) { const KArchiveFile* file = ( KArchiveFile* ) entry; QByteArray data ( file->data() ); if ( data.size() > 0 ) { img.loadFromData ( data,"PNG" ); #ifndef KEEP_ALPHA_CHANNEL if ( !img.isNull() && img.hasAlphaChannel() ) img = img.convertToFormat ( QImage::Format_RGB32 ); #endif #ifndef IGNORE_DOC_SIGNATURE const KArchiveEntry* docSigEntry = dir->entry( "META-INF/documentsignatures.xml" ); if ( m_signet != NULL && !img.isNull() && docSigEntry != NULL ) { int x = img.width() - m_signet->width() - 4; x = qMax( x, 0 ); int y = 6; QPainter p( &img ); p.drawImage( x, y, *m_signet ); } #endif if ( !img.isNull() ) bRet = true; } } } zip.close(); return bRet; } ThumbCreator::Flags OOoCreator::flags() const { return (Flags)(DrawFrame | BlendIcon); } // kate: indent-mode cstyle; space-indent on; indent-width 4; OpenOfficeorgThumbnail-1.0.0/src/images/000775 001750 001750 00000000000 11240131060 016323 5ustar00000000 000000 OpenOfficeorgThumbnail-1.0.0/src/images/signet.png000775 001750 001750 00000010767 11233203212 020341 0ustar00000000 000000 PNG  IHDR,4gAMAOX2tEXtSoftwareAdobe ImageReadyqe<tEXtCopyrightStella Schulzeb}eIDATxb? 222P `db`af͛ }#ۙ36} @,d;hjiC^ ext3>~d`AM?"Wb;7#n޺{d^[g3|$'􊁝0DTU32<Ç@Gzÿ_-3 ۷j?@<<}@G3<p*#0¢ $dgzF 00~ m.~%߿{t0)11K/`3 affߢo-8? TNTn2* DD|P{ Qqf[_mPU}ؽ2i0 v? M Lǭ7 ǑL"eo..Fo߰: ʘTTt89K]O'O;{7` @l@0)4?j@4@ +;03=") UǏ}\VJFfbV!>|&/2ܻvȱA aeܠ*^Ai HCd(Ġ4h` a ,_C@u @b abBq#ҥ~/]~.߻? \?Cyi(͂(M3nI@!@ œ\ EE9g`}rQ*++J e #G{ x GT BNCMd2k5(,R@W!fzlrXAiT`.LL+"VRR;4OA븫Η* ߯/_ρe,0Uq,wAi `emL%&Xڅ}Cfbch|m33a aBw?sW_V_؀x`2pbd4pȂI`-pu fCC ,PuL:AY  $z_ f/\gT^`P2@Kh2E &0m303 .Kf35>; 0Jcw~r='02afP \ 302C D3C Т őP: 8$0 v|gd@Q1@a8˗ GD4@! XR X)j2&9 YCa Y=''#0 3C?Pk<ܿ_U @L׀X}p l:TC @O *`E`Ocf&``9p&`,~5?~bdI y~6TmphZ e$+Ad 9/, a`ϼd):$دN|%@qw`2C?AHX29@ct,e;k!l˷o f7 ~WLL12|! ]}v PA p*XIb+ȓ$|P߮] Cاf (02xf =Mcv"޼;,P<(DAl`R Y @ mg`߻o5ܑ?bf?Áۿ~~υI?d` 6/r32S- wLlO{e6'8AI@v~ݺo2АCwߘ|g`y珵 @zȸEQ+?`/.̪z4,8%Ʒo?~pa1*[P&{89|0>Vן/J"f ZU2ef܁yy8c٘SWI&hb M0=o&o3٩}}bay|ϟF~^<0ǿJSn70{}}`jL@?#;۷?~׌w(y0ca~@}ZB?Y9s 2p|kaik &F%nǧ|WoO_~ `,}Uf`{l22(k~!sD >>a~үހ?}>(+w;P 737;$@ܴi dOUY??o|ggpQ=h  +'/#;ϏLf<u0@')SY~|{y*Pcxiړ\Ll~ w? 9_>|ǯ?z POUYY@ i/_~ɒ`"_<$~/￘~׿o4ӧ+n_N.V`/U: Hv߿Z}?56^p e,X>r @$o}\ן>`?ogu0@O/=߷/~gx1\US_>}ϯ@@=u0@Ÿ?yַ|O~cbaf#|?>y?>}?: HMO=y ^yϟy78<|^KԨ4P׵=z#^t/`>3 ! /%H6v Ym>NϾz`2G@ᇏX=:Hz 8 images/signet.png OpenOfficeorgThumbnail-1.0.0/CMakeLists.txt000664 001750 001750 00000000233 11231433256 017041 0ustar00000000 000000 project(OOoThumbnail) find_package(KDE4 REQUIRED) include (KDE4Defaults) include_directories( ${KDE4_INCLUDES} ${QT_INCLUDES} ) add_subdirectory( src ) OpenOfficeorgThumbnail-1.0.0/README000664 001750 001750 00000001752 11250360020 015155 0ustar00000000 000000 OpenOffice.org Thumbnail Creator ================================ KDE thumbnail-plugin that generates small images (thumbnails) for ODF (Open Document Format) files, to be displayed, for example, on Konqueror and Dolphin file managers. DEPENDENCIES ````````````` The following libraries and development packages are needed: KDE >=4.2.x QT >=4.4.x INSTALLATION ````````````` mkdir build cd build cmake -DCMAKE_INSTALL_PREFIX=`kde4-config --prefix` .. <- DON'T forget .. make su -c 'make install' kbuildsycoca4 Because KOffice's own thumbnail-plugin supports the same mime-types, you may (== untested) need to disable/remove /usr/lib/kde4/kofficethumbnail.so /usr/share/kde4/services/kofficethumbnail.desktop LICENCE ```````` See the LGPL 3.0 (GNU Lesser General Public License) http://www.fsf.org/licenses/lgpl.html http://www.gnu.org/licenses/lgpl-3.0.txt DEVELOPER `````````` Ariel Constenla-Haile La Plata, Argentina ariel.constenla.haile@gmail.com OpenOfficeorgThumbnail-1.0.0/LICENSE.html000664 001750 001750 00000020634 11250357742 016266 0ustar00000000 000000 GNU Lesser General Public License - GNU Project - Free Software Foundation (FSF)

GNU LESSER GENERAL PUBLIC LICENSE

Version 3, 29 June 2007

Copyright © 2007 Free Software Foundation, Inc. <http://fsf.org/>

Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.

This version of the GNU Lesser General Public License incorporates the terms and conditions of version 3 of the GNU General Public License, supplemented by the additional permissions listed below.

0. Additional Definitions.

As used herein, “this License” refers to version 3 of the GNU Lesser General Public License, and the “GNU GPL” refers to version 3 of the GNU General Public License.

“The Library” refers to a covered work governed by this License, other than an Application or a Combined Work as defined below.

An “Application” is any work that makes use of an interface provided by the Library, but which is not otherwise based on the Library. Defining a subclass of a class defined by the Library is deemed a mode of using an interface provided by the Library.

A “Combined Work” is a work produced by combining or linking an Application with the Library. The particular version of the Library with which the Combined Work was made is also called the “Linked Version”.

The “Minimal Corresponding Source” for a Combined Work means the Corresponding Source for the Combined Work, excluding any source code for portions of the Combined Work that, considered in isolation, are based on the Application, and not on the Linked Version.

The “Corresponding Application Code” for a Combined Work means the object code and/or source code for the Application, including any data and utility programs needed for reproducing the Combined Work from the Application, but excluding the System Libraries of the Combined Work.

1. Exception to Section 3 of the GNU GPL.

You may convey a covered work under sections 3 and 4 of this License without being bound by section 3 of the GNU GPL.

2. Conveying Modified Versions.

If you modify a copy of the Library, and, in your modifications, a facility refers to a function or data to be supplied by an Application that uses the facility (other than as an argument passed when the facility is invoked), then you may convey a copy of the modified version:

  • a) under this License, provided that you make a good faith effort to ensure that, in the event an Application does not supply the function or data, the facility still operates, and performs whatever part of its purpose remains meaningful, or
  • b) under the GNU GPL, with none of the additional permissions of this License applicable to that copy.

3. Object Code Incorporating Material from Library Header Files.

The object code form of an Application may incorporate material from a header file that is part of the Library. You may convey such object code under terms of your choice, provided that, if the incorporated material is not limited to numerical parameters, data structure layouts and accessors, or small macros, inline functions and templates (ten or fewer lines in length), you do both of the following:

  • a) Give prominent notice with each copy of the object code that the Library is used in it and that the Library and its use are covered by this License.
  • b) Accompany the object code with a copy of the GNU GPL and this license document.

4. Combined Works.

You may convey a Combined Work under terms of your choice that, taken together, effectively do not restrict modification of the portions of the Library contained in the Combined Work and reverse engineering for debugging such modifications, if you also do each of the following:

  • a) Give prominent notice with each copy of the Combined Work that the Library is used in it and that the Library and its use are covered by this License.
  • b) Accompany the Combined Work with a copy of the GNU GPL and this license document.
  • c) For a Combined Work that displays copyright notices during execution, include the copyright notice for the Library among these notices, as well as a reference directing the user to the copies of the GNU GPL and this license document.
  • d) Do one of the following:
    • 0) Convey the Minimal Corresponding Source under the terms of this License, and the Corresponding Application Code in a form suitable for, and under terms that permit, the user to recombine or relink the Application with a modified version of the Linked Version to produce a modified Combined Work, in the manner specified by section 6 of the GNU GPL for conveying Corresponding Source.
    • 1) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (a) uses at run time a copy of the Library already present on the user's computer system, and (b) will operate properly with a modified version of the Library that is interface-compatible with the Linked Version.
  • e) Provide Installation Information, but only if you would otherwise be required to provide such information under section 6 of the GNU GPL, and only to the extent that such information is necessary to install and execute a modified version of the Combined Work produced by recombining or relinking the Application with a modified version of the Linked Version. (If you use option 4d0, the Installation Information must accompany the Minimal Corresponding Source and Corresponding Application Code. If you use option 4d1, you must provide the Installation Information in the manner specified by section 6 of the GNU GPL for conveying Corresponding Source.)

5. Combined Libraries.

You may place library facilities that are a work based on the Library side by side in a single library together with other library facilities that are not Applications and are not covered by this License, and convey such a combined library under terms of your choice, if you do both of the following:

  • a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities, conveyed under the terms of this License.
  • b) Give prominent notice with the combined library that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work.

6. Revised Versions of the GNU Lesser General Public License.

The Free Software Foundation may publish revised and/or new versions of the GNU Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns.

Each version is given a distinguishing version number. If the Library as you received it specifies that a certain numbered version of the GNU Lesser General Public License “or any later version” applies to it, you have the option of following the terms and conditions either of that published version or of any later version published by the Free Software Foundation. If the Library as you received it does not specify a version number of the GNU Lesser General Public License, you may choose any version of the GNU Lesser General Public License ever published by the Free Software Foundation.

If the Library as you received it specifies that a proxy can decide whether future versions of the GNU Lesser General Public License shall apply, that proxy's public statement of acceptance of any version is permanent authorization for you to choose that version for the Library.

OpenOfficeorgThumbnail-1.0.0/LICENSE000664 001750 001750 00000016725 11250357721 015326 0ustar00000000 000000 GNU LESSER GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. This version of the GNU Lesser General Public License incorporates the terms and conditions of version 3 of the GNU General Public License, supplemented by the additional permissions listed below. 0. Additional Definitions. As used herein, "this License" refers to version 3 of the GNU Lesser General Public License, and the "GNU GPL" refers to version 3 of the GNU General Public License. "The Library" refers to a covered work governed by this License, other than an Application or a Combined Work as defined below. An "Application" is any work that makes use of an interface provided by the Library, but which is not otherwise based on the Library. Defining a subclass of a class defined by the Library is deemed a mode of using an interface provided by the Library. A "Combined Work" is a work produced by combining or linking an Application with the Library. The particular version of the Library with which the Combined Work was made is also called the "Linked Version". The "Minimal Corresponding Source" for a Combined Work means the Corresponding Source for the Combined Work, excluding any source code for portions of the Combined Work that, considered in isolation, are based on the Application, and not on the Linked Version. The "Corresponding Application Code" for a Combined Work means the object code and/or source code for the Application, including any data and utility programs needed for reproducing the Combined Work from the Application, but excluding the System Libraries of the Combined Work. 1. Exception to Section 3 of the GNU GPL. You may convey a covered work under sections 3 and 4 of this License without being bound by section 3 of the GNU GPL. 2. Conveying Modified Versions. If you modify a copy of the Library, and, in your modifications, a facility refers to a function or data to be supplied by an Application that uses the facility (other than as an argument passed when the facility is invoked), then you may convey a copy of the modified version: a) under this License, provided that you make a good faith effort to ensure that, in the event an Application does not supply the function or data, the facility still operates, and performs whatever part of its purpose remains meaningful, or b) under the GNU GPL, with none of the additional permissions of this License applicable to that copy. 3. Object Code Incorporating Material from Library Header Files. The object code form of an Application may incorporate material from a header file that is part of the Library. You may convey such object code under terms of your choice, provided that, if the incorporated material is not limited to numerical parameters, data structure layouts and accessors, or small macros, inline functions and templates (ten or fewer lines in length), you do both of the following: a) Give prominent notice with each copy of the object code that the Library is used in it and that the Library and its use are covered by this License. b) Accompany the object code with a copy of the GNU GPL and this license document. 4. Combined Works. You may convey a Combined Work under terms of your choice that, taken together, effectively do not restrict modification of the portions of the Library contained in the Combined Work and reverse engineering for debugging such modifications, if you also do each of the following: a) Give prominent notice with each copy of the Combined Work that the Library is used in it and that the Library and its use are covered by this License. b) Accompany the Combined Work with a copy of the GNU GPL and this license document. c) For a Combined Work that displays copyright notices during execution, include the copyright notice for the Library among these notices, as well as a reference directing the user to the copies of the GNU GPL and this license document. d) Do one of the following: 0) Convey the Minimal Corresponding Source under the terms of this License, and the Corresponding Application Code in a form suitable for, and under terms that permit, the user to recombine or relink the Application with a modified version of the Linked Version to produce a modified Combined Work, in the manner specified by section 6 of the GNU GPL for conveying Corresponding Source. 1) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (a) uses at run time a copy of the Library already present on the user's computer system, and (b) will operate properly with a modified version of the Library that is interface-compatible with the Linked Version. e) Provide Installation Information, but only if you would otherwise be required to provide such information under section 6 of the GNU GPL, and only to the extent that such information is necessary to install and execute a modified version of the Combined Work produced by recombining or relinking the Application with a modified version of the Linked Version. (If you use option 4d0, the Installation Information must accompany the Minimal Corresponding Source and Corresponding Application Code. If you use option 4d1, you must provide the Installation Information in the manner specified by section 6 of the GNU GPL for conveying Corresponding Source.) 5. Combined Libraries. You may place library facilities that are a work based on the Library side by side in a single library together with other library facilities that are not Applications and are not covered by this License, and convey such a combined library under terms of your choice, if you do both of the following: a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities, conveyed under the terms of this License. b) Give prominent notice with the combined library that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work. 6. Revised Versions of the GNU Lesser General Public License. The Free Software Foundation may publish revised and/or new versions of the GNU Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Library as you received it specifies that a certain numbered version of the GNU Lesser General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that published version or of any later version published by the Free Software Foundation. If the Library as you received it does not specify a version number of the GNU Lesser General Public License, you may choose any version of the GNU Lesser General Public License ever published by the Free Software Foundation. If the Library as you received it specifies that a proxy can decide whether future versions of the GNU Lesser General Public License shall apply, that proxy's public statement of acceptance of any version is permanent authorization for you to choose that version for the Library.