diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-01-20 01:29:50 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-01-20 01:29:50 +0000 |
commit | 8362bf63dea22bbf6736609b0f49c152f975eb63 (patch) | |
tree | 0eea3928e39e50fae91d4e68b21b1e6cbae25604 /filters/kpresenter/mng | |
download | koffice-8362bf63dea22bbf6736609b0f49c152f975eb63.tar.gz koffice-8362bf63dea22bbf6736609b0f49c152f975eb63.zip |
Added old abandoned KDE3 version of koffice
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/koffice@1077364 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'filters/kpresenter/mng')
-rw-r--r-- | filters/kpresenter/mng/Makefile.am | 24 | ||||
-rw-r--r-- | filters/kpresenter/mng/kpresenter_mng_export.desktop | 52 | ||||
-rw-r--r-- | filters/kpresenter/mng/mngexport.cpp | 78 | ||||
-rw-r--r-- | filters/kpresenter/mng/mngexport.h | 38 |
4 files changed, 192 insertions, 0 deletions
diff --git a/filters/kpresenter/mng/Makefile.am b/filters/kpresenter/mng/Makefile.am new file mode 100644 index 00000000..92cc0f3d --- /dev/null +++ b/filters/kpresenter/mng/Makefile.am @@ -0,0 +1,24 @@ +####### General stuff + +INCLUDES= -I$(srcdir) $(KOFFICE_INCLUDES) \ + -I$(top_srcdir)/kpresenter \ + -I$(top_srcdir)/lib/kotext \ + -I$(top_srcdir)/filters/libdialogfilter \ + -I$(top_srcdir)/filters/kpresenter/libimageexport \ + $(all_includes) + +####### Files + +kde_module_LTLIBRARIES = libkpresentermngexport.la + +libkpresentermngexport_la_SOURCES = mngexport.cpp +libkpresentermngexport_la_LDFLAGS = -module $(KDE_PLUGIN) -no-undefined +libkpresentermngexport_la_LIBADD = ../../../kpresenter/libkpresenterprivate.la ../../../filters/libdialogfilter/libdialogfilter.la ../libimageexport/libkpresenterimageexport.la $(KOFFICE_LIBS) +noinst_HEADERS = \ + mngexport.h + +METASOURCES = AUTO + +service_DATA = kpresenter_mng_export.desktop +servicedir = $(kde_servicesdir) + diff --git a/filters/kpresenter/mng/kpresenter_mng_export.desktop b/filters/kpresenter/mng/kpresenter_mng_export.desktop new file mode 100644 index 00000000..ebb619b6 --- /dev/null +++ b/filters/kpresenter/mng/kpresenter_mng_export.desktop @@ -0,0 +1,52 @@ +[Desktop Entry] +Type=Service +Name=KPresenter MNG Export Filter +Name[ar]=مرشح تصدير MNG لدى KPresenter +Name[bg]=Филтър за експортиране от Kpresenter в MNG +Name[br]=Sil ezporzh MNG evit KPresenter +Name[ca]=Filtre d'exportació MNG per a KPresenter +Name[da]=KPræsenter MNG-eksportfilter +Name[de]=KPresenter MNG-Exportfilter +Name[el]=Φίλτρο εξαγωγής MNG του KPresenter +Name[eo]=KPresenter MNG-eksportfiltrilo +Name[es]=Filtro de exportación a MNG para KPresenter +Name[et]=KPresenteri MNG ekspordifilter +Name[fa]=پالایۀ صادرات KPresenter MNG +Name[fi]=KPresenter MNG -vientisuodin +Name[fr]=Filtre d'exportation MNG de KPresenter +Name[fy]=MNG-Eksportfilter foar KPresenter +Name[ga]=Scagaire Easpórtála MNG KPresenter +Name[gl]=Filtro de Exportación de MNG para KPresenter +Name[he]=KPresenter MNG מסנן יצוא +Name[hr]=KPresenter MNG filtar izvoza +Name[hu]=KPresenter MNG exportszűrő +Name[is]=KPresenter MNG útflutningssía +Name[it]=Filtro di esportazione MNG per KPresenter +Name[ja]=KPresenter MNG エクスポートフィルタ +Name[km]=តម្រងនាំចេញ MNG សម្រាប់ KPresenter +Name[lt]=KPresenter MNG eksportavimo filtras +Name[lv]=KPresenter MNG eksporta filtrs +Name[nb]=MNG-eksportfilter for KPresenter +Name[nds]=MNG-Exportfilter för KPresenter +Name[ne]=केडीई प्रस्तुतकर्ता एमएनजी निर्यात फिल्टर +Name[nl]=MNG-exportfilter voor KPresenter +Name[pl]=Filtr eksportu do formatu MNG z KPresenter +Name[pt]=Filtro de Exportação de MNG para o KPresenter +Name[pt_BR]=Filtro de Exportação de MNG para o KPresenter +Name[ru]=Фильтр экспорта презентаций KPresenter в MNG +Name[se]=KPresenter MNG-olggosfievrridansilli +Name[sk]=Exportný filter KPresenter MNG +Name[sl]=Izvozni filter MNG za KPresenter +Name[sr]=KChart-ов филтер за извоз у MNG +Name[sr@Latn]=KChart-ov filter za izvoz u MNG +Name[sv]=Kpresenter MNG-exportfilter +Name[uk]=Фільтр експорту MNG для KPresenter +Name[uz]=KPresenter MNG eksport filteri +Name[uz@cyrillic]=KPresenter MNG экспорт филтери +Name[zh_CN]=KPresenter MNG 导出过滤器 +Name[zh_TW]=KPresenter MNG 匯出過濾程式 +X-KDE-Import=application/x-kpresenter +X-KDE-Export=video/x-mng +X-KDE-Weight=1 +X-KDE-Library=libkpresentermngexport +ServiceTypes=KOfficeFilter diff --git a/filters/kpresenter/mng/mngexport.cpp b/filters/kpresenter/mng/mngexport.cpp new file mode 100644 index 00000000..f56f4c77 --- /dev/null +++ b/filters/kpresenter/mng/mngexport.cpp @@ -0,0 +1,78 @@ +/* This file is part of the KDE project + Copyright (C) 2005 Laurent Montel <montel@kde.org> + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. +*/ + +#include <qpixmap.h> +#include <qpainter.h> + +#include <kmessagebox.h> + +#include <KoFilterChain.h> +#include <KoStore.h> +#include <kgenericfactory.h> +#include <KoDocument.h> + +#include "mngexport.h" +#include "exportsizedia.h" + +typedef KGenericFactory<MngExport, KoFilter> mngExportFactory; +K_EXPORT_COMPONENT_FACTORY( libkpresentermngexport, mngExportFactory( "mngexport" ) ) + +MngExport::MngExport(KoFilter *fil, const char *name, const QStringList&lst) + : ImageExport(fil,name,lst) +{ +} + +MngExport::~MngExport() +{ +} + +bool MngExport::extraImageAttribute() +{ + bool ret = false; + ExportSizeDia *exportDialog = new ExportSizeDia( width, height, + 0, "exportdialog"); + if (exportDialog->exec()) { + width = exportDialog->width(); + height = exportDialog->height(); + ret = true; + kdDebug() << "MNG Export: size = [" << width << "," << height << "]" << endl; + } + delete exportDialog; + return ret; +} + + +bool MngExport::saveImage( QString fileName) +{ + bool ret = pixmap.save( fileName, "MNG" ); + // Save the image. + if ( !ret ) { + KMessageBox::error( 0, i18n( "Failed to write file." ), + i18n( "MNG Export Error" ) ); + } + return ret; +} + +const char * MngExport::exportFormat() +{ + return "video/x-mng"; +} + +#include "mngexport.moc" + diff --git a/filters/kpresenter/mng/mngexport.h b/filters/kpresenter/mng/mngexport.h new file mode 100644 index 00000000..c479b1e0 --- /dev/null +++ b/filters/kpresenter/mng/mngexport.h @@ -0,0 +1,38 @@ +/* This file is part of the KDE project + Copyright (C) 2005 Laurent Montel <montel@kde.org> + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. +*/ + +#ifndef __XPMEXPORT_H__ +#define __XPMEXPORT_H__ + +#include "imageexport.h" + +class MngExport : public ImageExport +{ + Q_OBJECT + +public: + MngExport(KoFilter *parent, const char *name, const QStringList&); + virtual ~MngExport(); + virtual bool saveImage( QString fileName); + virtual bool extraImageAttribute(); + virtual const char * exportFormat(); +}; + +#endif // __XPMEXPORT_H__ + |