r19249 by fschmid - Adding Corel Draw cdr import filter.
scribus-commit
scribus-commit at lists.scribus.net
Wed Jun 18 08:42:27 UTC 2014
Author: fschmid
Date: Wed Jun 18 08:42:27 2014
New Revision: 19249
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=19249
Log:
Adding Corel Draw cdr import filter.
Added:
trunk/Scribus/scribus/plugins/import/cdr/
trunk/Scribus/scribus/plugins/import/cdr/CMakeLists.txt
trunk/Scribus/scribus/plugins/import/cdr/importcdr.cpp
trunk/Scribus/scribus/plugins/import/cdr/importcdr.h
trunk/Scribus/scribus/plugins/import/cdr/importcdrplugin.cpp
trunk/Scribus/scribus/plugins/import/cdr/importcdrplugin.h
Modified:
trunk/Scribus/scribus/plugins/import/CMakeLists.txt
trunk/Scribus/scribus/plugins/import/uniconvertor/uniconvplugin.cpp
trunk/Scribus/scribus/util_formats.cpp
Modified: trunk/Scribus/scribus/plugins/import/CMakeLists.txt
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19249&path=/trunk/Scribus/scribus/plugins/import/CMakeLists.txt
==============================================================================
--- trunk/Scribus/scribus/plugins/import/CMakeLists.txt (original)
+++ trunk/Scribus/scribus/plugins/import/CMakeLists.txt Wed Jun 18 08:42:27 2014
@@ -1,8 +1,9 @@
ADD_SUBDIRECTORY(ai)
-# ADD_SUBDIRECTORY(cdr)
+ADD_SUBDIRECTORY(cdr)
ADD_SUBDIRECTORY(cgm)
ADD_SUBDIRECTORY(cvg)
ADD_SUBDIRECTORY(drw)
+# ADD_SUBDIRECTORY(fh)
ADD_SUBDIRECTORY(idml)
ADD_SUBDIRECTORY(odg)
ADD_SUBDIRECTORY(oodraw)
@@ -15,6 +16,7 @@
ENDIF(HAVE_POPPLER)
# ADD_SUBDIRECTORY(pgs)
# ADD_SUBDIRECTORY(ppp)
+# ADD_SUBDIRECTORY(pm)
ADD_SUBDIRECTORY(pub)
ADD_SUBDIRECTORY(shape)
ADD_SUBDIRECTORY(sml)
Modified: trunk/Scribus/scribus/plugins/import/uniconvertor/uniconvplugin.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19249&path=/trunk/Scribus/scribus/plugins/import/uniconvertor/uniconvplugin.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/uniconvertor/uniconvplugin.cpp (original)
+++ trunk/Scribus/scribus/plugins/import/uniconvertor/uniconvplugin.cpp Wed Jun 18 08:42:27 2014
@@ -110,14 +110,14 @@
registerFormat(fmt);
}
-bool UniconvImportPlugin::fileSupported(QIODevice* /* file */,
+bool UniconvImportPlugin::fileSupported(QIODevice* /* file */,
const QString & fileName) const
{
// TODO: It's hard to tell if a file is supported without first loading it
return true;
}
-bool UniconvImportPlugin::loadFile(const QString & fileName,
+bool UniconvImportPlugin::loadFile(const QString & fileName,
const FileFormat & /* fmt */, int flags, int /*index*/)
{
// For now, "load file" and import are the same thing for this plugin
@@ -143,15 +143,15 @@
//prepare arguments for uniconvertor call
QStringList arguments;
arguments << fileName << tempFileName;
-
+
//execute uniconvertor
QProcess uniconv;
uniconv.setProcessChannelMode(QProcess::MergedChannels);
uniconv.start(PrefsManager::instance()->uniconvExecutable(), arguments);
-
+
//handle errors
if (!uniconv.waitForStarted(120000)) {
- qWarning() << "Uniconvertor failed:" <<
+ qWarning() << "Uniconvertor failed:" <<
PrefsManager::instance()->uniconvExecutable() << arguments;
QMessageBox::warning(mw, CommonStrings::trWarning,
tr("Starting Uniconvertor failed! The executable name in "
@@ -177,7 +177,7 @@
delete tempFile;
return false;
}
-
+
//Import SVG
const FileFormat *fmt = LoadSavePlugin::getFormatByExt("svg");
if (!fmt) {
Modified: trunk/Scribus/scribus/util_formats.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19249&path=/trunk/Scribus/scribus/util_formats.cpp
==============================================================================
--- trunk/Scribus/scribus/util_formats.cpp (original)
+++ trunk/Scribus/scribus/util_formats.cpp Wed Jun 18 08:42:27 2014
@@ -40,7 +40,7 @@
#endif
m_fmts.insert(FormatsManager::UNICONV, QStringList() << "cdt" << "ccx" << "cmx" << "aff" << "sk" << "sk1" << "plt" << "dxf" << "dst" << "pes" << "exp" << "pcs");
m_fmts.insert(FormatsManager::PCT, QStringList() << "pct" << "pic" << "pict");
-
+
m_fmtNames[FormatsManager::EPS] = QObject::tr("Encapsulated PostScript \"*.eps\"");
m_fmtNames[FormatsManager::GIF] = QObject::tr("GIF");
m_fmtNames[FormatsManager::JPEG] = QObject::tr("JPEG");
@@ -65,7 +65,7 @@
#endif
m_fmtNames[FormatsManager::UNICONV] = QObject::tr("UniConvertor File");
m_fmtNames[FormatsManager::PCT] = QObject::tr("Macintosh Pict File");
-
+
m_fmtMimeTypes.insert(FormatsManager::EPS, QStringList() << "application/postscript");
m_fmtMimeTypes.insert(FormatsManager::GIF, QStringList() << "image/gif");
m_fmtMimeTypes.insert(FormatsManager::JPEG, QStringList() << "image/jpeg");
@@ -85,9 +85,9 @@
m_fmtMimeTypes.insert(FormatsManager::WPG, QStringList() << "");
m_fmtMimeTypes.insert(FormatsManager::PCT, QStringList() << "");
m_fmtMimeTypes.insert(FormatsManager::ORA, QStringList() << "");
-
+
QMapIterator<int, QStringList> i(m_fmts);
- while (i.hasNext())
+ while (i.hasNext())
{
i.next();
m_fmtList << i.value().first().toUpper();
@@ -351,7 +351,7 @@
ret = "tif";
else if ((buf[0] == '/') && (buf[1] == '*') && (buf[2] == ' ') && (buf[3] == 'X') && (buf[4] == 'P') && (buf[5] == 'M'))
ret = "xpm";
-
+
f.close();
}
}
More information about the scribus-commit
mailing list