summaryrefslogtreecommitdiffstats
path: root/filters/kchart/mng
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-01-20 01:29:50 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-01-20 01:29:50 +0000
commit8362bf63dea22bbf6736609b0f49c152f975eb63 (patch)
tree0eea3928e39e50fae91d4e68b21b1e6cbae25604 /filters/kchart/mng
downloadkoffice-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/kchart/mng')
-rw-r--r--filters/kchart/mng/Makefile.am24
-rw-r--r--filters/kchart/mng/kchart_mng_export.desktop47
-rw-r--r--filters/kchart/mng/mngexport.cpp76
-rw-r--r--filters/kchart/mng/mngexport.h38
4 files changed, 185 insertions, 0 deletions
diff --git a/filters/kchart/mng/Makefile.am b/filters/kchart/mng/Makefile.am
new file mode 100644
index 00000000..aaf62f2f
--- /dev/null
+++ b/filters/kchart/mng/Makefile.am
@@ -0,0 +1,24 @@
+####### General stuff
+
+INCLUDES= -I$(srcdir) $(KOFFICE_INCLUDES) \
+ -I$(top_srcdir)/kchart \
+ -I$(top_srcdir)/kchart/kdchart \
+ -I$(top_srcdir)/interfaces \
+ -I$(top_srcdir)/filters/libdialogfilter \
+ -I$(top_srcdir)/filters/kchart/libimageexport \
+ $(all_includes)
+####### Files
+
+kde_module_LTLIBRARIES = libkchartmngexport.la
+
+libkchartmngexport_la_SOURCES = mngexport.cpp
+libkchartmngexport_la_LDFLAGS = -module $(KDE_PLUGIN) -no-undefined
+libkchartmngexport_la_LIBADD = ../../../kchart/libkchartcommon.la ../libimageexport/libkchartimageexport.la ../../../filters/libdialogfilter/libdialogfilter.la $(KOFFICE_LIBS)
+noinst_HEADERS = \
+ mngexport.h
+
+METASOURCES = AUTO
+
+service_DATA = kchart_mng_export.desktop
+servicedir = $(kde_servicesdir)
+
diff --git a/filters/kchart/mng/kchart_mng_export.desktop b/filters/kchart/mng/kchart_mng_export.desktop
new file mode 100644
index 00000000..c2175574
--- /dev/null
+++ b/filters/kchart/mng/kchart_mng_export.desktop
@@ -0,0 +1,47 @@
+[Desktop Entry]
+Name=KChart MNG Export Filter
+Name[bg]=Филтър за експортиране от KChart в MNG
+Name[ca]=Filtre d'exportació MNG per a KChart
+Name[da]=KChart MNG-eksportfilter
+Name[de]=KChart MNG-Exportfilter
+Name[el]=Φίλτρο εξαγωγής MNG του KChart
+Name[eo]=KChart-MNG-eksportfiltrilo
+Name[es]=Filtro de exportación MNG para KChart
+Name[et]=KCharti MNG ekspordifilter
+Name[fa]=پالایۀ صادرات KChart MNG
+Name[fi]=KChart MNG -vientisuodin
+Name[fr]=Filtre d'exportation MNG de KChart
+Name[fy]=MNG-Eksportfilter foar KChart
+Name[he]=KChart MNG מסנן יצוא
+Name[hr]=KChart MNG filtar izvoza
+Name[hu]=KChart MNG exportszűrő
+Name[it]=Filtro di esportazione MNG per KChart
+Name[ja]=KChart MNG エクスポートフィルタ
+Name[km]=តម្រង​នាំចេញ MNG សម្រាប់ KChart
+Name[lt]=KChart MNG eksportavimo filtras
+Name[lv]=KChart MNG eksporta filtrs
+Name[nb]=MNG-eksportfilter for KChart
+Name[nds]=KMNG-Exportfilter för KChart
+Name[ne]=केडीई चित्रपट एमएनजी निर्यात फिल्टर
+Name[nl]=MNG-exportfilter voor KChart
+Name[pl]=Filtr eksportu do formatu MNG z KChart
+Name[pt]=Filtro de Exportação de MNG para o KChart
+Name[pt_BR]=Filtro de Exportação MNG do KChart
+Name[ru]=Фильтр экспорта диаграмм KChart в MNG
+Name[se]=KChart:a MNG-olggosfievrridansilli
+Name[sk]=Exportný filter KChart MNG
+Name[sl]=Izvozni filter MNG za KChart
+Name[sr]=KChart-ов филтер за извоз у MNG
+Name[sr@Latn]=KChart-ov filter za izvoz u MNG
+Name[sv]=Kchart MNG-exportfilter
+Name[uk]=Фільтр експорту MNG для KChart
+Name[uz]=KChart MNG eksport filteri
+Name[uz@cyrillic]=KChart MNG экспорт филтери
+Name[zh_CN]=KChart MNG 导出过滤器
+Name[zh_TW]=KChart MNG 匯出過濾程式
+Type=Service
+X-KDE-Import=application/x-kchart
+X-KDE-Export=video/x-mng
+X-KDE-Weight=1
+X-KDE-Library=libkchartmngexport
+ServiceTypes=KOfficeFilter
diff --git a/filters/kchart/mng/mngexport.cpp b/filters/kchart/mng/mngexport.cpp
new file mode 100644
index 00000000..b029beea
--- /dev/null
+++ b/filters/kchart/mng/mngexport.cpp
@@ -0,0 +1,76 @@
+/* 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( libkchartmngexport, mngExportFactory( "mngexport" ) )
+
+MngExport::MngExport(KoFilter *fil, const char *name, const QStringList&lst)
+ : ImageExport(fil,name,lst)
+{
+}
+
+MngExport::~MngExport()
+{
+}
+
+void MngExport::extraImageAttribute()
+{
+ ExportSizeDia *exportDialog = new ExportSizeDia( width, height,
+ 0, "exportdialog");
+ if (exportDialog->exec()) {
+ width = exportDialog->width();
+ height = exportDialog->height();
+
+ kdDebug() << "MNG Export: size = [" << width << "," << height << "]" << endl;
+ }
+ delete exportDialog;
+}
+
+
+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/kchart/mng/mngexport.h b/filters/kchart/mng/mngexport.h
new file mode 100644
index 00000000..38f7830e
--- /dev/null
+++ b/filters/kchart/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 void extraImageAttribute();
+ virtual const char * exportFormat();
+};
+
+#endif // __XPMEXPORT_H__
+