View Issue Details

IDProjectCategoryView StatusLast Update
0014997ScribusImport / Exportpublic2017-12-20 20:58
Reporterdtardon Assigned Tojghali  
PrioritynormalSeverityfeatureReproducibilityalways
Status closedResolutionfixed 
Product Version1.5.4.svn 
Target VersionFixed in Version1.5.4.svn 
Summary0014997: add QuarkXPress importer (using libqxp)
DescriptionSee the attached patches. Some sample docs can be found in libqxp's test suite: https://gerrit.libreoffice.org/gitweb?p=libqxp-test.git;a=tree;f=testset;h=14dccaf582af30f1fc32c5ac5af8d0fcb075c708;hb=HEAD . Note that the MSVC project files are untested.
Tagsimport
PatchYes

Activities

dtardon

2017-09-21 16:41

reporter  

0001-add-QuarkXPress-importer-using-libqxp.patch (24,557 bytes)
From c005b3163ce489d0c292df469ac16ea47b6e940c Mon Sep 17 00:00:00 2001
From: David Tardon <dtardon@redhat.com>
Date: Sun, 17 Sep 2017 17:12:56 +0200
Subject: [PATCH 1/4] add QuarkXPress importer (using libqxp)

---
 Scribus/scribus/plugins/import/CMakeLists.txt      |   1 +
 Scribus/scribus/plugins/import/qxp/CMakeLists.txt  |  16 +
 Scribus/scribus/plugins/import/qxp/importqxp.cpp   | 386 +++++++++++++++++++++
 Scribus/scribus/plugins/import/qxp/importqxp.h     |  81 +++++
 .../scribus/plugins/import/qxp/importqxpplugin.cpp | 173 +++++++++
 .../scribus/plugins/import/qxp/importqxpplugin.h   |  58 ++++
 6 files changed, 715 insertions(+)
 create mode 100644 Scribus/scribus/plugins/import/qxp/CMakeLists.txt
 create mode 100644 Scribus/scribus/plugins/import/qxp/importqxp.cpp
 create mode 100644 Scribus/scribus/plugins/import/qxp/importqxp.h
 create mode 100644 Scribus/scribus/plugins/import/qxp/importqxpplugin.cpp
 create mode 100644 Scribus/scribus/plugins/import/qxp/importqxpplugin.h

diff --git a/Scribus/scribus/plugins/import/CMakeLists.txt b/Scribus/scribus/plugins/import/CMakeLists.txt
index 56e00be82..9e1521b73 100644
--- a/Scribus/scribus/plugins/import/CMakeLists.txt
+++ b/Scribus/scribus/plugins/import/CMakeLists.txt
@@ -19,6 +19,7 @@ endif()
 # add_subdirectory(ppp)
 add_subdirectory(pm)
 add_subdirectory(pub)
+add_subdirectory(qxp)
 add_subdirectory(shape)
 add_subdirectory(sml)
 add_subdirectory(svg)
diff --git a/Scribus/scribus/plugins/import/qxp/CMakeLists.txt b/Scribus/scribus/plugins/import/qxp/CMakeLists.txt
new file mode 100644
index 000000000..0071a92f7
--- /dev/null
+++ b/Scribus/scribus/plugins/import/qxp/CMakeLists.txt
@@ -0,0 +1,16 @@
+include(FindPkgConfig)
+if (HAVE_REVENGE)
+	pkg_check_modules(LIBQXP libqxp-0.0)
+	if (LIBQXP_FOUND)
+		message("Building QuarkXPress Importer")
+		include_directories(${CMAKE_SOURCE_DIR} ${CMAKE_SOURCE_DIR}/scribus ${LIBREVENGE_INCLUDE_DIRS} ${LIBREVENGE_GENERATORS_INCLUDE_DIRS} ${LIBREVENGE_STREAM_INCLUDE_DIRS} ${LIBQXP_INCLUDE_DIRS})
+		set(IMPORTQXP_PLUGIN_MOC_CLASSES importqxp.h importqxpplugin.h)
+		set(IMPORTQXP_PLUGIN_SOURCES ../revenge/rawpainter.cpp importqxp.cpp importqxpplugin.cpp)
+		set(SCRIBUS_IMPORTQXP_PLUGIN "importqxp")
+		QT5_WRAP_CPP(IMPORTQXP_PLUGIN_MOC_SOURCES ${IMPORTQXP_PLUGIN_MOC_CLASSES})
+		add_library(${SCRIBUS_IMPORTQXP_PLUGIN} MODULE ${IMPORTQXP_PLUGIN_SOURCES} ${IMPORTQXP_PLUGIN_MOC_SOURCES})
+		target_link_libraries(${SCRIBUS_IMPORTQXP_PLUGIN} ${PLUGIN_LIBRARIES} ${LIBREVENGE_LDFLAGS} ${LIBREVENGE_GENERATORS_LDFLAGS} ${LIBREVENGE_STREAM_LDFLAGS} ${LIBQXP_LDFLAGS})
+		install(TARGETS ${SCRIBUS_IMPORTQXP_PLUGIN} LIBRARY DESTINATION ${PLUGINDIR} PERMISSIONS ${PLUGIN_PERMISSIONS})
+		add_dependencies(${SCRIBUS_IMPORTQXP_PLUGIN} ${EXE_NAME})
+	endif ()
+endif ()
diff --git a/Scribus/scribus/plugins/import/qxp/importqxp.cpp b/Scribus/scribus/plugins/import/qxp/importqxp.cpp
new file mode 100644
index 000000000..d2fb39152
--- /dev/null
+++ b/Scribus/scribus/plugins/import/qxp/importqxp.cpp
@@ -0,0 +1,386 @@
+/*
+For general Scribus (>=1.3.2) copyright and licensing information please refer
+to the COPYING file provided with the program. Following this notice may exist
+a copyright and/or license notice that predates the release of Scribus 1.3.2
+for which a new license (GPL+exception) is in place.
+*/
+
+#include <QByteArray>
+#include <QCursor>
+#include <QDrag>
+#include <QFile>
+#include <QList>
+#include <QMessageBox>
+#include <QMimeData>
+#include <QRegExp>
+#include <QStack>
+#include <QDebug>
+
+#include <cstdlib>
+#include "importqxp.h"
+#include "../revenge/rawpainter.h"
+#include <libqxp/libqxp.h>
+
+#include "commonstrings.h"
+#include "ui/customfdialog.h"
+#include "fileloader.h"
+#include "loadsaveplugin.h"
+#include "ui/missing.h"
+#include "ui/multiprogressdialog.h"
+#include "pagesize.h"
+#include "prefscontext.h"
+#include "prefsfile.h"
+#include "prefsmanager.h"
+#include "prefstable.h"
+#include "ui/propertiespalette.h"
+#include "rawimage.h"
+#include "scclocale.h"
+#include "sccolorengine.h"
+#include "scconfig.h"
+#include "scmimedata.h"
+#include "scpaths.h"
+#include "scpattern.h"
+#include "scribus.h"
+#include "scribusXml.h"
+#include "scribuscore.h"
+#include "scribusview.h"
+#include "sctextstream.h"
+#include "selection.h"
+#include "undomanager.h"
+#include "util.h"
+#include "util_formats.h"
+#include "util_math.h"
+
+extern SCRIBUS_API ScribusQApp * ScQApp;
+
+QxpPlug::QxpPlug(ScribusDoc* doc, int flags)
+{
+	baseX = baseY = 0;
+	docWidth = docHeight = 1;
+
+	tmpSel = new Selection(this, false);
+	m_Doc = doc;
+	importerFlags = flags;
+	interactive = (flags & LoadSavePlugin::lfInteractive);
+	progressDialog = NULL;
+	cancel = false;
+}
+
+QImage QxpPlug::readThumbnail(QString fName)
+{
+	QFileInfo fi = QFileInfo(fName);
+	double b, h;
+	b = PrefsManager::instance()->appPrefs.docSetupPrefs.pageWidth;
+	h = PrefsManager::instance()->appPrefs.docSetupPrefs.pageHeight;
+	docWidth = b;
+	docHeight = h;
+	progressDialog = NULL;
+	m_Doc = new ScribusDoc();
+	m_Doc->setup(0, 1, 1, 1, 1, "Custom", "Custom");
+	m_Doc->setPage(docWidth, docHeight, 0, 0, 0, 0, 0, 0, false, false);
+	m_Doc->addPage(0);
+	m_Doc->setGUI(false, ScCore->primaryMainWindow(), 0);
+	baseX = m_Doc->currentPage()->xOffset();
+	baseY = m_Doc->currentPage()->yOffset();
+	Elements.clear();
+	m_Doc->setLoading(true);
+	m_Doc->DoDrawing = false;
+	m_Doc->scMW()->setScriptRunning(true);
+	QString CurDirP = QDir::currentPath();
+	QDir::setCurrent(fi.path());
+	if (convert(fName))
+	{
+		tmpSel->clear();
+		QDir::setCurrent(CurDirP);
+		if (Elements.count() > 1)
+			m_Doc->groupObjectsList(Elements);
+		m_Doc->DoDrawing = true;
+		m_Doc->m_Selection->delaySignalsOn();
+		QImage tmpImage;
+		if (Elements.count() > 0)
+		{
+			for (int dre=0; dre<Elements.count(); ++dre)
+			{
+				tmpSel->addItem(Elements.at(dre), true);
+			}
+			tmpSel->setGroupRect();
+			double xs = tmpSel->width();
+			double ys = tmpSel->height();
+			tmpImage = Elements.at(0)->DrawObj_toImage(500);
+			tmpImage.setText("XSize", QString("%1").arg(xs));
+			tmpImage.setText("YSize", QString("%1").arg(ys));
+		}
+		m_Doc->scMW()->setScriptRunning(false);
+		m_Doc->setLoading(false);
+		m_Doc->m_Selection->delaySignalsOff();
+		delete m_Doc;
+		return tmpImage;
+	}
+	else
+	{
+		QDir::setCurrent(CurDirP);
+		m_Doc->DoDrawing = true;
+		m_Doc->scMW()->setScriptRunning(false);
+		delete m_Doc;
+	}
+	return QImage();
+}
+
+bool QxpPlug::import(QString fNameIn, const TransactionSettings& trSettings, int flags, bool showProgress)
+{
+	QString fName = fNameIn;
+	bool success = false;
+	interactive = (flags & LoadSavePlugin::lfInteractive);
+	importerFlags = flags;
+	cancel = false;
+	double b, h;
+	bool ret = false;
+	QFileInfo fi = QFileInfo(fName);
+	if ( !ScCore->usingGUI() )
+	{
+		interactive = false;
+		showProgress = false;
+	}
+	if ( showProgress )
+	{
+		ScribusMainWindow* mw=(m_Doc==0) ? ScCore->primaryMainWindow() : m_Doc->scMW();
+		progressDialog = new MultiProgressDialog( tr("Importing: %1").arg(fi.fileName()), CommonStrings::tr_Cancel, mw );
+		QStringList barNames, barTexts;
+		barNames << "GI";
+		barTexts << tr("Analyzing File:");
+		QList<bool> barsNumeric;
+		barsNumeric << false;
+		progressDialog->addExtraProgressBars(barNames, barTexts, barsNumeric);
+		progressDialog->setOverallTotalSteps(3);
+		progressDialog->setOverallProgress(0);
+		progressDialog->setProgress("GI", 0);
+		progressDialog->show();
+		connect(progressDialog, SIGNAL(canceled()), this, SLOT(cancelRequested()));
+		qApp->processEvents();
+	}
+	else
+		progressDialog = NULL;
+/* Set default Page to size defined in Preferences */
+	b = 0.0;
+	h = 0.0;
+	if (progressDialog)
+	{
+		progressDialog->setOverallProgress(1);
+		qApp->processEvents();
+	}
+	if (b == 0.0)
+		b = PrefsManager::instance()->appPrefs.docSetupPrefs.pageWidth;
+	if (h == 0.0)
+		h = PrefsManager::instance()->appPrefs.docSetupPrefs.pageHeight;
+	docWidth = b;
+	docHeight = h;
+	baseX = 0;
+	baseY = 0;
+	if (!interactive || (flags & LoadSavePlugin::lfInsertPage))
+	{
+		m_Doc->setPage(docWidth, docHeight, 0, 0, 0, 0, 0, 0, false, false);
+		m_Doc->addPage(0);
+		m_Doc->view()->addPage(0, true);
+		baseX = 0;
+		baseY = 0;
+	}
+	else
+	{
+		if (!m_Doc || (flags & LoadSavePlugin::lfCreateDoc))
+		{
+			m_Doc=ScCore->primaryMainWindow()->doFileNew(docWidth, docHeight, 0, 0, 0, 0, 0, 0, false, false, 0, false, 0, 1, "Custom", true);
+			ScCore->primaryMainWindow()->HaveNewDoc();
+			ret = true;
+			baseX = 0;
+			baseY = 0;
+			baseX = m_Doc->currentPage()->xOffset();
+			baseY = m_Doc->currentPage()->yOffset();
+		}
+	}
+	if ((!ret) && (interactive))
+	{
+		baseX = m_Doc->currentPage()->xOffset();
+		baseY = m_Doc->currentPage()->yOffset();
+	}
+	if ((ret) || (!interactive))
+	{
+		if (docWidth > docHeight)
+			m_Doc->setPageOrientation(1);
+		else
+			m_Doc->setPageOrientation(0);
+		m_Doc->setPageSize("Custom");
+	}
+	if ((!(flags & LoadSavePlugin::lfLoadAsPattern)) && (m_Doc->view() != NULL))
+		m_Doc->view()->Deselect();
+	Elements.clear();
+	m_Doc->setLoading(true);
+	m_Doc->DoDrawing = false;
+	if ((!(flags & LoadSavePlugin::lfLoadAsPattern)) && (m_Doc->view() != NULL))
+		m_Doc->view()->updatesOn(false);
+	m_Doc->scMW()->setScriptRunning(true);
+	qApp->setOverrideCursor(QCursor(Qt::WaitCursor));
+	QString CurDirP = QDir::currentPath();
+	QDir::setCurrent(fi.path());
+	if (convert(fName))
+	{
+		tmpSel->clear();
+		QDir::setCurrent(CurDirP);
+		if ((Elements.count() > 1) && (!(importerFlags & LoadSavePlugin::lfCreateDoc)))
+			m_Doc->groupObjectsList(Elements);
+		m_Doc->DoDrawing = true;
+		m_Doc->scMW()->setScriptRunning(false);
+		m_Doc->setLoading(false);
+		qApp->changeOverrideCursor(QCursor(Qt::ArrowCursor));
+		if ((Elements.count() > 0) && (!ret) && (interactive))
+		{
+			if (flags & LoadSavePlugin::lfScripted)
+			{
+				bool loadF = m_Doc->isLoading();
+				m_Doc->setLoading(false);
+				m_Doc->changed();
+				m_Doc->setLoading(loadF);
+				if (!(flags & LoadSavePlugin::lfLoadAsPattern))
+				{
+					m_Doc->m_Selection->delaySignalsOn();
+					for (int dre=0; dre<Elements.count(); ++dre)
+					{
+						m_Doc->m_Selection->addItem(Elements.at(dre), true);
+					}
+					m_Doc->m_Selection->delaySignalsOff();
+					m_Doc->m_Selection->setGroupRect();
+					if (m_Doc->view() != NULL)
+						m_Doc->view()->updatesOn(true);
+				}
+			}
+			else
+			{
+				m_Doc->DragP = true;
+				m_Doc->DraggedElem = 0;
+				m_Doc->DragElements.clear();
+				m_Doc->m_Selection->delaySignalsOn();
+				for (int dre=0; dre<Elements.count(); ++dre)
+				{
+					tmpSel->addItem(Elements.at(dre), true);
+				}
+				tmpSel->setGroupRect();
+				ScElemMimeData* md = ScriXmlDoc::WriteToMimeData(m_Doc, tmpSel);
+				m_Doc->itemSelection_DeleteItem(tmpSel);
+				m_Doc->view()->updatesOn(true);
+				if (importedPatterns.count() != 0)
+				{
+					for (int cd = 0; cd < importedPatterns.count(); cd++)
+					{
+						m_Doc->docPatterns.remove(importedPatterns[cd]);
+					}
+				}
+				if (importedColors.count() != 0)
+				{
+					for (int cd = 0; cd < importedColors.count(); cd++)
+					{
+						m_Doc->PageColors.remove(importedColors[cd]);
+					}
+				}
+				m_Doc->m_Selection->delaySignalsOff();
+				// We must copy the TransationSettings object as it is owned
+				// by handleObjectImport method afterwards
+				TransactionSettings* transacSettings = new TransactionSettings(trSettings);
+				m_Doc->view()->handleObjectImport(md, transacSettings);
+				m_Doc->DragP = false;
+				m_Doc->DraggedElem = 0;
+				m_Doc->DragElements.clear();
+			}
+		}
+		else
+		{
+			m_Doc->changed();
+			m_Doc->reformPages();
+			if (!(flags & LoadSavePlugin::lfLoadAsPattern))
+				m_Doc->view()->updatesOn(true);
+		}
+		success = true;
+	}
+	else
+	{
+		QDir::setCurrent(CurDirP);
+		m_Doc->DoDrawing = true;
+		m_Doc->scMW()->setScriptRunning(false);
+		m_Doc->view()->updatesOn(true);
+		qApp->changeOverrideCursor(QCursor(Qt::ArrowCursor));
+	}
+	if (interactive)
+		m_Doc->setLoading(false);
+	//CB If we have a gui we must refresh it if we have used the progressbar
+	if (!(flags & LoadSavePlugin::lfLoadAsPattern))
+	{
+		if ((showProgress) && (!interactive))
+			m_Doc->view()->DrawNew();
+	}
+	qApp->restoreOverrideCursor();
+	return success;
+}
+
+QxpPlug::~QxpPlug()
+{
+	if (progressDialog)
+		delete progressDialog;
+	delete tmpSel;
+}
+
+bool QxpPlug::convert(QString fn)
+{
+	importedColors.clear();
+	importedPatterns.clear();
+	QFile file(fn);
+	if ( !file.exists() )
+	{
+		qDebug() << "File " << QFile::encodeName(fn).data() << " does not exist" << endl;
+		return false;
+	}
+	librevenge::RVNGFileStream input(QFile::encodeName(fn).data());
+	libqxp::QXPDocument::Type type = libqxp::QXPDocument::TYPE_UNKNOWN;
+	if (!libqxp::QXPDocument::isSupported(&input, &type))
+	{
+		qDebug() << "ERROR: Unsupported file format!";
+		return false;
+	}
+	if (!(type == libqxp::QXPDocument::TYPE_DOCUMENT || type == libqxp::QXPDocument::TYPE_TEMPLATE))
+	{
+		qDebug() << "ERROR: Unsupported file format!";
+		return false;
+	}
+	RawPainter painter(m_Doc, baseX, baseY, docWidth, docHeight, importerFlags, &Elements, &importedColors, &importedPatterns, tmpSel, "qxp");
+	if (libqxp::QXPDocument::parse(&input, &painter) != libqxp::QXPDocument::RESULT_OK)
+	{
+		qDebug() << "ERROR: Import failed!";
+		if (progressDialog)
+			progressDialog->close();
+		if (importerFlags & LoadSavePlugin::lfCreateDoc)
+		{
+			ScribusMainWindow* mw=(m_Doc==0) ? ScCore->primaryMainWindow() : m_Doc->scMW();
+			qApp->changeOverrideCursor(QCursor(Qt::ArrowCursor));
+			ScMessageBox::warning(mw, CommonStrings::trWarning, tr("Parsing failed!\n\nPlease submit your file (if possible) to the\nDocument Liberation Project http://www.documentliberation.org"));
+			qApp->changeOverrideCursor(QCursor(Qt::WaitCursor));
+		}
+		return false;
+	}
+	if (Elements.count() == 0)
+	{
+		if (importedColors.count() != 0)
+		{
+			for (int cd = 0; cd < importedColors.count(); cd++)
+			{
+				m_Doc->PageColors.remove(importedColors[cd]);
+			}
+		}
+		if (importedPatterns.count() != 0)
+		{
+			for (int cd = 0; cd < importedPatterns.count(); cd++)
+			{
+				m_Doc->docPatterns.remove(importedPatterns[cd]);
+			}
+		}
+	}
+	if (progressDialog)
+		progressDialog->close();
+	return true;
+}
diff --git a/Scribus/scribus/plugins/import/qxp/importqxp.h b/Scribus/scribus/plugins/import/qxp/importqxp.h
new file mode 100644
index 000000000..155da4c07
--- /dev/null
+++ b/Scribus/scribus/plugins/import/qxp/importqxp.h
@@ -0,0 +1,81 @@
+/*
+For general Scribus (>=1.3.2) copyright and licensing information please refer
+to the COPYING file provided with the program. Following this notice may exist
+a copyright and/or license notice that predates the release of Scribus 1.3.2
+for which a new license (GPL+exception) is in place.
+*/
+#ifndef IMPORTQXP_H
+#define IMPORTQXP_H
+
+#include <QObject>
+#include <QString>
+
+#include "pluginapi.h"
+#include "pageitem.h"
+#include "sccolor.h"
+#include "fpointarray.h"
+#include "vgradient.h"
+#include <QList>
+#include <QTransform>
+#include <QMultiMap>
+#include <QVector>
+
+class MultiProgressDialog;
+class ScribusDoc;
+class Selection;
+class TransactionSettings;
+
+//! \brief QXP importer plugin
+class QxpPlug : public QObject
+{
+	Q_OBJECT
+
+public:
+	/*!
+	\author Franz Schmid
+	\date
+	\brief Create the Fh importer window.
+	\param fName QString
+	\param flags combination of loadFlags
+	\param showProgress if progress must be displayed
+	\retval EPSPlug plugin
+	*/
+	QxpPlug( ScribusDoc* doc, int flags );
+	~QxpPlug();
+
+	/*!
+	\author Franz Schmid
+	\date
+	\brief Perform import.
+	\param fn QString
+	\param trSettings undo transaction settings
+	\param flags combination of loadFlags
+	\param showProgress if progress must be displayed
+	\retval bool true if import was ok
+	 */
+	bool import(QString fn, const TransactionSettings& trSettings, int flags, bool showProgress = true);
+	QImage readThumbnail(QString fn);
+
+private:
+	bool convert(QString fn);
+
+	QList<PageItem*> Elements;
+	double baseX, baseY;
+	double docWidth;
+	double docHeight;
+
+	QStringList importedColors;
+	QStringList importedPatterns;
+
+	bool interactive;
+	MultiProgressDialog * progressDialog;
+	bool cancel;
+	ScribusDoc* m_Doc;
+	Selection* tmpSel;
+	int importerFlags;
+
+public slots:
+	void cancelRequested() { cancel = true; }
+};
+
+#endif
diff --git a/Scribus/scribus/plugins/import/qxp/importqxpplugin.cpp b/Scribus/scribus/plugins/import/qxp/importqxpplugin.cpp
new file mode 100644
index 000000000..23879d1bb
--- /dev/null
+++ b/Scribus/scribus/plugins/import/qxp/importqxpplugin.cpp
@@ -0,0 +1,173 @@
+/*
+For general Scribus (>=1.3.2) copyright and licensing information please refer
+to the COPYING file provided with the program. Following this notice may exist
+a copyright and/or license notice that predates the release of Scribus 1.3.2
+for which a new license (GPL+exception) is in place.
+*/
+#include "commonstrings.h"
+
+#include "importqxp.h"
+#include "importqxpplugin.h"
+#include "prefscontext.h"
+#include "prefsfile.h"
+#include "prefsmanager.h"
+#include "scpage.h"
+#include "scraction.h"
+#include "scribuscore.h"
+#include "undomanager.h"
+#include "util_formats.h"
+
+#include "ui/customfdialog.h"
+#include "ui/scmwmenumanager.h"
+
+int importqxp_getPluginAPIVersion()
+{
+	return PLUGIN_API_VERSION;
+}
+
+ScPlugin* importqxp_getPlugin()
+{
+	ImportQxpPlugin* plug = new ImportQxpPlugin();
+	Q_CHECK_PTR(plug);
+	return plug;
+}
+
+void importqxp_freePlugin(ScPlugin* plugin)
+{
+	ImportQxpPlugin* plug = dynamic_cast<ImportQxpPlugin*>(plugin);
+	Q_ASSERT(plug);
+	delete plug;
+}
+
+ImportQxpPlugin::ImportQxpPlugin() : LoadSavePlugin(),
+	importAction(new ScrAction(ScrAction::DLL, QPixmap(), QPixmap(), "", QKeySequence(), this))
+{
+	// Set action info in languageChange, so we only have to do it in one
+	// place. This includes registering file format support.
+	registerFormats();
+	languageChange();
+}
+
+void ImportQxpPlugin::languageChange()
+{
+	importAction->setText( tr("Import QuarkXPress..."));
+	FileFormat* fmt = getFormatByExt("qxd");
+	fmt->trName = tr("QuarkXPress");
+	fmt->filter = tr("QuarkXPress (*.qxd *.QXD *.qxt *.QXT)");
+}
+
+ImportQxpPlugin::~ImportQxpPlugin()
+{
+	unregisterAll();
+}
+
+const QString ImportQxpPlugin::fullTrName() const
+{
+	return QObject::tr("QuarkXPress Importer");
+}
+
+
+const ScActionPlugin::AboutData* ImportQxpPlugin::getAboutData() const
+{
+	AboutData* about = new AboutData;
+	about->authors = "Franz Schmid <franz@scribus.info>";
+	about->shortDescription = tr("Imports QuarkXPress Files");
+	about->description = tr("Imports QuarkXPress 3.1-4.1 files into the current document,\nconverting their vector data into Scribus objects.");
+	about->license = "GPL";
+	Q_CHECK_PTR(about);
+	return about;
+}
+
+void ImportQxpPlugin::deleteAboutData(const AboutData* about) const
+{
+	Q_ASSERT(about);
+	delete about;
+}
+
+void ImportQxpPlugin::registerFormats()
+{
+	FileFormat fmt(this);
+	fmt.trName = tr("QuarkXPress");
+	fmt.filter = tr("QuarkXPress (*.qxd *.QXD *.qxt *.QXT)");
+	fmt.formatId = 0;
+	fmt.fileExtensions = QStringList() << "qxd" << "qxt";
+	fmt.load = true;
+	fmt.save = false;
+	fmt.thumb = true;
+	fmt.colorReading = true;
+	fmt.mimeTypes = QStringList();
+	fmt.priority = 64; // Priority
+	registerFormat(fmt);
+}
+
+bool ImportQxpPlugin::fileSupported(QIODevice* /* file */, const QString & fileName) const
+{
+	return true;
+}
+
+bool ImportQxpPlugin::loadFile(const QString & fileName, const FileFormat &, int flags, int /*index*/)
+{
+	// There's only one format to handle, so we just call import(...)
+	return import(fileName, flags);
+}
+
+bool ImportQxpPlugin::import(QString fileName, int flags)
+{
+	if (!checkFlags(flags))
+		return false;
+	if( fileName.isEmpty() )
+	{
+		flags |= lfInteractive;
+		PrefsContext* prefs = PrefsManager::instance()->prefsFile->getPluginContext("importqxp");
+		QString wdir = prefs->get("wdir", ".");
+		CustomFDialog diaf(ScCore->primaryMainWindow(), wdir, QObject::tr("Open"), tr("All Supported Formats")+" (*.qxd *.QXD *.qxt *.QXT);;All Files (*)");
+		if (diaf.exec())
+		{
+			fileName = diaf.selectedFile();
+			prefs->set("wdir", fileName.left(fileName.lastIndexOf("/")));
+		}
+		else
+			return true;
+	}
+	m_Doc=ScCore->primaryMainWindow()->doc;
+	UndoTransaction* activeTransaction = NULL;
+	bool emptyDoc = (m_Doc == NULL);
+	bool hasCurrentPage = (m_Doc && m_Doc->currentPage());
+	TransactionSettings trSettings;
+	trSettings.targetName   = hasCurrentPage ? m_Doc->currentPage()->getUName() : "";
+	trSettings.targetPixmap = Um::IImageFrame;
+	trSettings.actionName   = Um::ImportXfig;
+	trSettings.description  = fileName;
+	trSettings.actionPixmap = Um::IXFIG;
+	if (emptyDoc || !(flags & lfInteractive) || !(flags & lfScripted))
+		UndoManager::instance()->setUndoEnabled(false);
+	if (UndoManager::undoEnabled())
+		activeTransaction = new UndoTransaction(UndoManager::instance()->beginTransaction(trSettings));
+	QxpPlug *dia = new QxpPlug(m_Doc, flags);
+	Q_CHECK_PTR(dia);
+	dia->import(fileName, trSettings, flags, !(flags & lfScripted));
+	if (activeTransaction)
+	{
+		activeTransaction->commit();
+		delete activeTransaction;
+		activeTransaction = NULL;
+	}
+	if (emptyDoc || !(flags & lfInteractive) || !(flags & lfScripted))
+		UndoManager::instance()->setUndoEnabled(true);
+	delete dia;
+	return true;
+}
+
+QImage ImportQxpPlugin::readThumbnail(const QString& fileName)
+{
+	if( fileName.isEmpty() )
+		return QImage();
+	UndoManager::instance()->setUndoEnabled(false);
+	m_Doc = NULL;
+	QxpPlug *dia = new QxpPlug(m_Doc, lfCreateThumbnail);
+	Q_CHECK_PTR(dia);
+	QImage ret = dia->readThumbnail(fileName);
+	UndoManager::instance()->setUndoEnabled(true);
+	delete dia;
+	return ret;
+}
diff --git a/Scribus/scribus/plugins/import/qxp/importqxpplugin.h b/Scribus/scribus/plugins/import/qxp/importqxpplugin.h
new file mode 100644
index 000000000..5afbbec1e
--- /dev/null
+++ b/Scribus/scribus/plugins/import/qxp/importqxpplugin.h
@@ -0,0 +1,58 @@
+/*
+For general Scribus (>=1.3.2) copyright and licensing information please refer
+to the COPYING file provided with the program. Following this notice may exist
+a copyright and/or license notice that predates the release of Scribus 1.3.2
+for which a new license (GPL+exception) is in place.
+*/
+#ifndef IMPORTQXPPLUGIN_H
+#define IMPORTQXPPLUGIN_H
+
+#include "pluginapi.h"
+#include "loadsaveplugin.h"
+#include "../../formatidlist.h"
+
+class ScrAction;
+
+class PLUGIN_API ImportQxpPlugin : public LoadSavePlugin
+{
+	Q_OBJECT
+
+	public:
+		// Standard plugin implementation
+		ImportQxpPlugin();
+		virtual ~ImportQxpPlugin();
+		/*!
+		\author Franz Schmid
+		\date
+		\brief Returns name of plugin
+		\retval QString containing name of plugin: Import EPS/PDF/PS...
+		*/
+		virtual const QString fullTrName() const;
+		virtual const AboutData* getAboutData() const;
+		virtual void deleteAboutData(const AboutData* about) const;
+		virtual void languageChange();
+		virtual bool fileSupported(QIODevice* file, const QString & fileName=QString::null) const;
+		virtual bool loadFile(const QString & fileName, const FileFormat & fmt, int flags, int index = 0);
+		virtual QImage readThumbnail(const QString& fileName);
+		virtual void addToMainWindowMenu(ScribusMainWindow *) {};
+
+	public slots:
+		/*!
+		\author Franz Schmid
+		\date
+		\brief Run the EPS import
+		\param fileName input filename, or QString::null to prompt.
+		\retval bool always true
+		 */
+		virtual bool import(QString fileName = QString::null, int flags = lfUseCurrentPage|lfInteractive);
+
+	private:
+		void registerFormats();
+		ScrAction* importAction;
+};
+
+extern "C" PLUGIN_API int importqxp_getPluginAPIVersion();
+extern "C" PLUGIN_API ScPlugin* importqxp_getPlugin();
+extern "C" PLUGIN_API void importqxp_freePlugin(ScPlugin* plugin);
+
+#endif
-- 
2.13.5

0002-add-MSVC-project-files-for-qxp-import.patch (39,681 bytes)
From 303b8daf0a566f1c5afcfecb8b6c9dc8441b5e46 Mon Sep 17 00:00:00 2001
From: David Tardon <dtardon@redhat.com>
Date: Sun, 17 Sep 2017 18:06:54 +0200
Subject: [PATCH 2/4] add MSVC project files for qxp import

---
 Scribus/win32/msvc2012/qxpimport/qxpimport.vcxproj | 229 +++++++++++++++++++++
 .../msvc2012/qxpimport/qxpimport.vcxproj.filters   |  43 ++++
 Scribus/win32/msvc2015/qxpimport/qxpimport.vcxproj | 229 +++++++++++++++++++++
 .../msvc2015/qxpimport/qxpimport.vcxproj.filters   |  43 ++++
 4 files changed, 544 insertions(+)
 create mode 100644 Scribus/win32/msvc2012/qxpimport/qxpimport.vcxproj
 create mode 100644 Scribus/win32/msvc2012/qxpimport/qxpimport.vcxproj.filters
 create mode 100644 Scribus/win32/msvc2015/qxpimport/qxpimport.vcxproj
 create mode 100644 Scribus/win32/msvc2015/qxpimport/qxpimport.vcxproj.filters

diff --git a/Scribus/win32/msvc2012/qxpimport/qxpimport.vcxproj b/Scribus/win32/msvc2012/qxpimport/qxpimport.vcxproj
new file mode 100644
index 000000000..1fb29aa82
--- /dev/null
+++ b/Scribus/win32/msvc2012/qxpimport/qxpimport.vcxproj
@@ -0,0 +1,229 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Debug|Win32">
+      <Configuration>Debug</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Debug|x64">
+      <Configuration>Debug</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|x64">
+      <Configuration>Release</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{DFABF9F6-3A94-441C-8E90-7C155278800E}</ProjectGuid>
+    <RootNamespace>qxpimport</RootNamespace>
+    <Keyword>Win32Proj</Keyword>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+    <ConfigurationType>DynamicLibrary</ConfigurationType>
+    <PlatformToolset>v110</PlatformToolset>
+    <CharacterSet>Unicode</CharacterSet>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+    <ConfigurationType>DynamicLibrary</ConfigurationType>
+    <PlatformToolset>v110</PlatformToolset>
+    <CharacterSet>Unicode</CharacterSet>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+    <ConfigurationType>DynamicLibrary</ConfigurationType>
+    <PlatformToolset>v110</PlatformToolset>
+    <CharacterSet>Unicode</CharacterSet>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+    <ConfigurationType>DynamicLibrary</ConfigurationType>
+    <PlatformToolset>v110</PlatformToolset>
+    <CharacterSet>Unicode</CharacterSet>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+  <ImportGroup Label="ExtensionSettings">
+    <Import Project="..\Scribus-build-rules.props" />
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+    <Import Project="..\Scribus-build-props.props" />
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+    <Import Project="..\Scribus-build-props.props" />
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+    <Import Project="..\Scribus-build-props.props" />
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+    <Import Project="..\Scribus-build-props.props" />
+  </ImportGroup>
+  <PropertyGroup Label="UserMacros" />
+  <PropertyGroup>
+    <_ProjectFileVersion>11.0.60610.1</_ProjectFileVersion>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+    <OutDir>..\..\..\..\Scribus-builds\Scribus-$(Configuration)-$(Platform)-$(PlatformToolset)\plugins\</OutDir>
+    <IntDir>..\..\..\..\Scribus-builds\Build-objs\$(Configuration)-$(Platform)-$(PlatformToolset)\$(TargetName)\</IntDir>
+    <LinkIncremental>true</LinkIncremental>
+    <TargetName>importqxp</TargetName>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+    <OutDir>..\..\..\..\Scribus-builds\Scribus-$(Configuration)-$(Platform)-$(PlatformToolset)\plugins\</OutDir>
+    <IntDir>..\..\..\..\Scribus-builds\Build-objs\$(Configuration)-$(Platform)-$(PlatformToolset)\$(TargetName)\</IntDir>
+    <LinkIncremental>true</LinkIncremental>
+    <TargetName>importqxp</TargetName>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+    <OutDir>..\..\..\..\Scribus-builds\Scribus-$(Configuration)-$(Platform)-$(PlatformToolset)\plugins\</OutDir>
+    <IntDir>..\..\..\..\Scribus-builds\Build-objs\$(Configuration)-$(Platform)-$(PlatformToolset)\$(TargetName)\</IntDir>
+    <LinkIncremental>false</LinkIncremental>
+    <TargetName>importqxp</TargetName>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+    <OutDir>..\..\..\..\Scribus-builds\Scribus-$(Configuration)-$(Platform)-$(PlatformToolset)\plugins\</OutDir>
+    <IntDir>..\..\..\..\Scribus-builds\Build-objs\$(Configuration)-$(Platform)-$(PlatformToolset)\$(TargetName)\</IntDir>
+    <LinkIncremental>false</LinkIncremental>
+    <TargetName>importqxp</TargetName>
+  </PropertyGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+    <ClCompile>
+      <Optimization>Disabled</Optimization>
+      <AdditionalIncludeDirectories>..;..\..\..\scribus;..\..\..\scribus\plugins\import\revenge;$(QT5_DIR)\include\QtANGLE;$(QT5_DIR)\include\QtCore;$(QT5_DIR)\include\QtGui;$(QT5_DIR)\include\QtWidgets;$(QT5_DIR)\include\QtXml;$(QT5_DIR)\include;$(CAIRO_INCLUDE_DIR);$(FREETYPE_INCLUDE_DIR);$(ICU_INCLUDE_DIR);$(LCMS_INCLUDE_DIR);$(LIBJPEG_INCLUDE_DIR);$(LIBQXP_INCLUDE_DIR);$(LIBREVENGE_INCLUDE_DIR);$(LIBTIFF_INCLUDE_DIR);$(ZLIB_INCLUDE_DIR);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>WIN32;_DEBUG;_USE_MATH_DEFINES;_USRDLL;_WINDOWS;QT_DLL;QT_GUI_LIB;QT_CORE_LIB;QT_THREAD_SUPPORT;COMPILE_PLUGIN_AS_DLL;AVOID_WIN32_FILEIO;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <MinimalRebuild>true</MinimalRebuild>
+      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+      <RuntimeTypeInfo>true</RuntimeTypeInfo>
+      <PrecompiledHeader>Use</PrecompiledHeader>
+      <WarningLevel>Level3</WarningLevel>
+      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+      <DisableSpecificWarnings>4190;4251;4267;4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+      <PrecompiledHeaderFile>plugins_pch.h</PrecompiledHeaderFile>
+      <ForcedIncludeFiles>plugins_pch.h;%(ForcedIncludeFiles)</ForcedIncludeFiles>
+    </ClCompile>
+    <Link>
+      <AdditionalDependencies>$(QT5CORE_LIB);$(QT5GUI_LIB);$(QT5WIDGETS_LIB);$(QT5XML_LIB);$(FREETYPE_LIB);$(LCMS_LIB);$(LIBJPEG_LIB);$(LIBQXP_LIB);$(LIBREVENGE_LIB);$(LIBREVENGE_GENERATORS_LIB);$(LIBREVENGE_STREAM_LIB);$(LIBTIFF_LIB);$(ZLIB_LIB);scribus-api.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalLibraryDirectories>$(FREETYPE_LIB_DIR);$(LCMS_LIB_DIR);$(LIBJPEG_LIB_DIR);$(LIBQXP_LIB_DIR);$(LIBREVENGE_LIB_DIR);$(LIBTIFF_LIB_DIR);$(ZLIB_LIB_DIR);$(QT5_DIR)\lib;$(OutDir)..;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <SubSystem>Windows</SubSystem>
+      <RandomizedBaseAddress>false</RandomizedBaseAddress>
+      <DataExecutionPrevention />
+      <TargetMachine>MachineX86</TargetMachine>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+    <ClCompile>
+      <Optimization>Disabled</Optimization>
+      <AdditionalIncludeDirectories>..;..\..\..\scribus;..\..\..\scribus\plugins\import\revenge;$(QT5_DIR)\include\QtANGLE;$(QT5_DIR)\include\QtCore;$(QT5_DIR)\include\QtGui;$(QT5_DIR)\include\QtWidgets;$(QT5_DIR)\include\QtXml;$(QT5_DIR)\include;$(CAIRO_INCLUDE_DIR);$(FREETYPE_INCLUDE_DIR);$(ICU_INCLUDE_DIR);$(LCMS_INCLUDE_DIR);$(LIBJPEG_INCLUDE_DIR);$(LIBQXP_INCLUDE_DIR);$(LIBREVENGE_INCLUDE_DIR);$(LIBTIFF_INCLUDE_DIR);$(ZLIB_INCLUDE_DIR);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>WIN32;_DEBUG;_USE_MATH_DEFINES;_USRDLL;_WINDOWS;QT_DLL;QT_GUI_LIB;QT_CORE_LIB;QT_THREAD_SUPPORT;COMPILE_PLUGIN_AS_DLL;AVOID_WIN32_FILEIO;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+      <RuntimeTypeInfo>true</RuntimeTypeInfo>
+      <PrecompiledHeader>Use</PrecompiledHeader>
+      <WarningLevel>Level3</WarningLevel>
+      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+      <DisableSpecificWarnings>4190;4251;4267;4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+      <PrecompiledHeaderFile>plugins_pch.h</PrecompiledHeaderFile>
+      <ForcedIncludeFiles>plugins_pch.h;%(ForcedIncludeFiles)</ForcedIncludeFiles>
+    </ClCompile>
+    <Link>
+      <AdditionalDependencies>$(QT5CORE_LIB);$(QT5GUI_LIB);$(QT5WIDGETS_LIB);$(QT5XML_LIB);$(FREETYPE_LIB);$(LCMS_LIB);$(LIBJPEG_LIB);$(LIBQXP_LIB);$(LIBREVENGE_LIB);$(LIBREVENGE_GENERATORS_LIB);$(LIBREVENGE_STREAM_LIB);$(LIBTIFF_LIB);$(ZLIB_LIB);scribus-api.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalLibraryDirectories>$(FREETYPE_LIB_DIR);$(LCMS_LIB_DIR);$(LIBJPEG_LIB_DIR);$(LIBQXP_LIB_DIR);$(LIBREVENGE_LIB_DIR);$(LIBTIFF_LIB_DIR);$(ZLIB_LIB_DIR);$(QT5_DIR)\lib;$(OutDir)..;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <SubSystem>Windows</SubSystem>
+      <RandomizedBaseAddress>false</RandomizedBaseAddress>
+      <DataExecutionPrevention>
+      </DataExecutionPrevention>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+    <ClCompile>
+      <Optimization>MinSpace</Optimization>
+      <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+      <OmitFramePointers>true</OmitFramePointers>
+      <AdditionalIncludeDirectories>..;..\..\..\scribus;..\..\..\scribus\plugins\import\revenge;$(QT5_DIR)\include\QtANGLE;$(QT5_DIR)\include\QtCore;$(QT5_DIR)\include\QtGui;$(QT5_DIR)\include\QtWidgets;$(QT5_DIR)\include\QtXml;$(QT5_DIR)\include;$(CAIRO_INCLUDE_DIR);$(FREETYPE_INCLUDE_DIR);$(ICU_INCLUDE_DIR);$(LCMS_INCLUDE_DIR);$(LIBJPEG_INCLUDE_DIR);$(LIBQXP_INCLUDE_DIR);$(LIBREVENGE_INCLUDE_DIR);$(LIBTIFF_INCLUDE_DIR);$(ZLIB_INCLUDE_DIR);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>WIN32;NDEBUG;_USE_MATH_DEFINES;_USRDLL;_WINDOWS;QT_DLL;QT_GUI_LIB;QT_CORE_LIB;QT_THREAD_SUPPORT;COMPILE_PLUGIN_AS_DLL;AVOID_WIN32_FILEIO;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <StringPooling>true</StringPooling>
+      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+      <FunctionLevelLinking>true</FunctionLevelLinking>
+      <RuntimeTypeInfo>true</RuntimeTypeInfo>
+      <PrecompiledHeader>Use</PrecompiledHeader>
+      <WarningLevel>Level3</WarningLevel>
+      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+      <DisableSpecificWarnings>4190;4251;4267;4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+      <PrecompiledHeaderFile>plugins_pch.h</PrecompiledHeaderFile>
+      <ForcedIncludeFiles>plugins_pch.h;%(ForcedIncludeFiles)</ForcedIncludeFiles>
+    </ClCompile>
+    <Link>
+      <AdditionalDependencies>$(QT5CORE_LIB);$(QT5GUI_LIB);$(QT5WIDGETS_LIB);$(QT5XML_LIB);$(FREETYPE_LIB);$(LCMS_LIB);$(LIBJPEG_LIB);$(LIBQXP_LIB);$(LIBREVENGE_LIB);$(LIBREVENGE_GENERATORS_LIB);$(LIBREVENGE_STREAM_LIB);$(LIBTIFF_LIB);$(ZLIB_LIB);scribus-api.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalLibraryDirectories>$(FREETYPE_LIB_DIR);$(LCMS_LIB_DIR);$(LIBJPEG_LIB_DIR);$(LIBQXP_LIB_DIR);$(LIBREVENGE_LIB_DIR);$(LIBTIFF_LIB_DIR);$(ZLIB_LIB_DIR);$(QT5_DIR)\lib;$(OutDir)..;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <SubSystem>Windows</SubSystem>
+      <OptimizeReferences>true</OptimizeReferences>
+      <EnableCOMDATFolding>true</EnableCOMDATFolding>
+      <RandomizedBaseAddress>false</RandomizedBaseAddress>
+      <DataExecutionPrevention />
+      <TargetMachine>MachineX86</TargetMachine>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+    <ClCompile>
+      <Optimization>MinSpace</Optimization>
+      <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+      <OmitFramePointers>true</OmitFramePointers>
+      <AdditionalIncludeDirectories>..;..\..\..\scribus;..\..\..\scribus\plugins\import\revenge;$(QT5_DIR)\include\QtANGLE;$(QT5_DIR)\include\QtCore;$(QT5_DIR)\include\QtGui;$(QT5_DIR)\include\QtWidgets;$(QT5_DIR)\include\QtXml;$(QT5_DIR)\include;$(CAIRO_INCLUDE_DIR);$(FREETYPE_INCLUDE_DIR);$(ICU_INCLUDE_DIR);$(LCMS_INCLUDE_DIR);$(LIBJPEG_INCLUDE_DIR);$(LIBQXP_INCLUDE_DIR);$(LIBREVENGE_INCLUDE_DIR);$(LIBTIFF_INCLUDE_DIR);$(ZLIB_INCLUDE_DIR);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>WIN32;NDEBUG;_USE_MATH_DEFINES;_USRDLL;_WINDOWS;QT_DLL;QT_GUI_LIB;QT_CORE_LIB;QT_THREAD_SUPPORT;COMPILE_PLUGIN_AS_DLL;AVOID_WIN32_FILEIO;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <StringPooling>true</StringPooling>
+      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+      <FunctionLevelLinking>true</FunctionLevelLinking>
+      <RuntimeTypeInfo>true</RuntimeTypeInfo>
+      <PrecompiledHeader>Use</PrecompiledHeader>
+      <WarningLevel>Level3</WarningLevel>
+      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+      <DisableSpecificWarnings>4190;4251;4267;4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+      <PrecompiledHeaderFile>plugins_pch.h</PrecompiledHeaderFile>
+      <ForcedIncludeFiles>plugins_pch.h;%(ForcedIncludeFiles)</ForcedIncludeFiles>
+    </ClCompile>
+    <Link>
+      <AdditionalDependencies>$(QT5CORE_LIB);$(QT5GUI_LIB);$(QT5WIDGETS_LIB);$(QT5XML_LIB);$(FREETYPE_LIB);$(LCMS_LIB);$(LIBJPEG_LIB);$(LIBQXP_LIB);$(LIBREVENGE_LIB);$(LIBREVENGE_GENERATORS_LIB);$(LIBREVENGE_STREAM_LIB);$(LIBTIFF_LIB);$(ZLIB_LIB);scribus-api.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalLibraryDirectories>$(FREETYPE_LIB_DIR);$(LCMS_LIB_DIR);$(LIBJPEG_LIB_DIR);$(LIBQXP_LIB_DIR);$(LIBREVENGE_LIB_DIR);$(LIBTIFF_LIB_DIR);$(ZLIB_LIB_DIR);$(QT5_DIR)\lib;$(OutDir)..;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <SubSystem>Windows</SubSystem>
+      <OptimizeReferences>true</OptimizeReferences>
+      <EnableCOMDATFolding>true</EnableCOMDATFolding>
+      <RandomizedBaseAddress>false</RandomizedBaseAddress>
+      <DataExecutionPrevention>
+      </DataExecutionPrevention>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemGroup>
+    <ClCompile Include="..\..\..\scribus\plugins\import\qxp\importqxp.cpp" />
+    <ClCompile Include="..\..\..\scribus\plugins\import\qxp\importqxpplugin.cpp" />
+    <ClCompile Include="..\..\..\scribus\plugins\import\revenge\rawpainter.cpp" />
+    <ClCompile Include="..\..\..\scribus\plugins\plugins_pch.cpp">
+      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>
+      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader>
+      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Create</PrecompiledHeader>
+      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Create</PrecompiledHeader>
+    </ClCompile>
+  </ItemGroup>
+  <ItemGroup>
+    <moc Include="..\..\..\scribus\plugins\import\qxp\importqxp.h" />
+    <moc Include="..\..\..\scribus\plugins\import\qxp\importqxpplugin.h" />
+  </ItemGroup>
+  <ItemGroup>
+    <ClInclude Include="..\..\..\scribus\plugins\import\revenge\rawpainter.h" />
+    <ClInclude Include="..\..\..\scribus\plugins\plugins_pch.h" />
+  </ItemGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+  <ImportGroup Label="ExtensionTargets">
+    <Import Project="..\Scribus-build-rules.targets" />
+  </ImportGroup>
+</Project>
diff --git a/Scribus/win32/msvc2012/qxpimport/qxpimport.vcxproj.filters b/Scribus/win32/msvc2012/qxpimport/qxpimport.vcxproj.filters
new file mode 100644
index 000000000..71642ca7d
--- /dev/null
+++ b/Scribus/win32/msvc2012/qxpimport/qxpimport.vcxproj.filters
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup>
+    <Filter Include="Source Files">
+      <UniqueIdentifier>{0aae3350-c3e2-4425-8494-3272a5fb1d0e}</UniqueIdentifier>
+      <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm</Extensions>
+    </Filter>
+    <Filter Include="Header Files">
+      <UniqueIdentifier>{b0c11a86-a75c-4de0-b834-26ae466b6417}</UniqueIdentifier>
+      <Extensions>h;hpp;hxx;hm;inl;inc</Extensions>
+    </Filter>
+  </ItemGroup>
+  <ItemGroup>
+    <ClCompile Include="..\..\..\scribus\plugins\import\qxp\importqxp.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\..\scribus\plugins\import\qxp\importqxpplugin.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\..\scribus\plugins\import\revenge\rawpainter.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\..\scribus\plugins\plugins_pch.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+  </ItemGroup>
+  <ItemGroup>
+    <moc Include="..\..\..\scribus\plugins\import\qxp\importqxp.h">
+      <Filter>Header Files</Filter>
+    </moc>
+    <moc Include="..\..\..\scribus\plugins\import\qxp\importqxpplugin.h">
+      <Filter>Header Files</Filter>
+    </moc>
+  </ItemGroup>
+  <ItemGroup>
+    <ClInclude Include="..\..\..\scribus\plugins\import\revenge\rawpainter.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\..\scribus\plugins\plugins_pch.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+  </ItemGroup>
+</Project>
diff --git a/Scribus/win32/msvc2015/qxpimport/qxpimport.vcxproj b/Scribus/win32/msvc2015/qxpimport/qxpimport.vcxproj
new file mode 100644
index 000000000..ea63292d7
--- /dev/null
+++ b/Scribus/win32/msvc2015/qxpimport/qxpimport.vcxproj
@@ -0,0 +1,229 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Debug|Win32">
+      <Configuration>Debug</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Debug|x64">
+      <Configuration>Debug</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|x64">
+      <Configuration>Release</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{DFABF9F6-3A94-441C-8E90-7C155278800E}</ProjectGuid>
+    <RootNamespace>qxpimport</RootNamespace>
+    <Keyword>Win32Proj</Keyword>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+    <ConfigurationType>DynamicLibrary</ConfigurationType>
+    <PlatformToolset>v140</PlatformToolset>
+    <CharacterSet>Unicode</CharacterSet>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+    <ConfigurationType>DynamicLibrary</ConfigurationType>
+    <PlatformToolset>v140</PlatformToolset>
+    <CharacterSet>Unicode</CharacterSet>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+    <ConfigurationType>DynamicLibrary</ConfigurationType>
+    <PlatformToolset>v140</PlatformToolset>
+    <CharacterSet>Unicode</CharacterSet>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+    <ConfigurationType>DynamicLibrary</ConfigurationType>
+    <PlatformToolset>v140</PlatformToolset>
+    <CharacterSet>Unicode</CharacterSet>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+  <ImportGroup Label="ExtensionSettings">
+    <Import Project="..\Scribus-build-rules.props" />
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+    <Import Project="..\Scribus-build-props.props" />
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+    <Import Project="..\Scribus-build-props.props" />
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+    <Import Project="..\Scribus-build-props.props" />
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+    <Import Project="..\Scribus-build-props.props" />
+  </ImportGroup>
+  <PropertyGroup Label="UserMacros" />
+  <PropertyGroup>
+    <_ProjectFileVersion>11.0.60610.1</_ProjectFileVersion>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+    <OutDir>..\..\..\..\Scribus-builds\Scribus-$(Configuration)-$(Platform)-$(PlatformToolset)\plugins\</OutDir>
+    <IntDir>..\..\..\..\Scribus-builds\Build-objs\$(Configuration)-$(Platform)-$(PlatformToolset)\$(TargetName)\</IntDir>
+    <LinkIncremental>true</LinkIncremental>
+    <TargetName>importqxp</TargetName>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+    <OutDir>..\..\..\..\Scribus-builds\Scribus-$(Configuration)-$(Platform)-$(PlatformToolset)\plugins\</OutDir>
+    <IntDir>..\..\..\..\Scribus-builds\Build-objs\$(Configuration)-$(Platform)-$(PlatformToolset)\$(TargetName)\</IntDir>
+    <LinkIncremental>true</LinkIncremental>
+    <TargetName>importqxp</TargetName>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+    <OutDir>..\..\..\..\Scribus-builds\Scribus-$(Configuration)-$(Platform)-$(PlatformToolset)\plugins\</OutDir>
+    <IntDir>..\..\..\..\Scribus-builds\Build-objs\$(Configuration)-$(Platform)-$(PlatformToolset)\$(TargetName)\</IntDir>
+    <LinkIncremental>false</LinkIncremental>
+    <TargetName>importqxp</TargetName>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+    <OutDir>..\..\..\..\Scribus-builds\Scribus-$(Configuration)-$(Platform)-$(PlatformToolset)\plugins\</OutDir>
+    <IntDir>..\..\..\..\Scribus-builds\Build-objs\$(Configuration)-$(Platform)-$(PlatformToolset)\$(TargetName)\</IntDir>
+    <LinkIncremental>false</LinkIncremental>
+    <TargetName>importqxp</TargetName>
+  </PropertyGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+    <ClCompile>
+      <Optimization>Disabled</Optimization>
+      <AdditionalIncludeDirectories>..;..\..\..\scribus;..\..\..\scribus\plugins\import\revenge;$(QT5_DIR)\include\QtANGLE;$(QT5_DIR)\include\QtCore;$(QT5_DIR)\include\QtGui;$(QT5_DIR)\include\QtWidgets;$(QT5_DIR)\include\QtXml;$(QT5_DIR)\include;$(CAIRO_INCLUDE_DIR);$(FREETYPE_INCLUDE_DIR);$(ICU_INCLUDE_DIR);$(LCMS_INCLUDE_DIR);$(LIBJPEG_INCLUDE_DIR);$(LIBQXP_INCLUDE_DIR);$(LIBREVENGE_INCLUDE_DIR);$(LIBTIFF_INCLUDE_DIR);$(ZLIB_INCLUDE_DIR);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>WIN32;_DEBUG;_USE_MATH_DEFINES;_USRDLL;_WINDOWS;QT_DLL;QT_GUI_LIB;QT_CORE_LIB;QT_THREAD_SUPPORT;COMPILE_PLUGIN_AS_DLL;AVOID_WIN32_FILEIO;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <MinimalRebuild>true</MinimalRebuild>
+      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+      <RuntimeTypeInfo>true</RuntimeTypeInfo>
+      <PrecompiledHeader>Use</PrecompiledHeader>
+      <WarningLevel>Level3</WarningLevel>
+      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+      <DisableSpecificWarnings>4190;4251;4267;4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+      <PrecompiledHeaderFile>plugins_pch.h</PrecompiledHeaderFile>
+      <ForcedIncludeFiles>plugins_pch.h;%(ForcedIncludeFiles)</ForcedIncludeFiles>
+    </ClCompile>
+    <Link>
+      <AdditionalDependencies>$(QT5CORE_LIB);$(QT5GUI_LIB);$(QT5WIDGETS_LIB);$(QT5XML_LIB);$(FREETYPE_LIB);$(LCMS_LIB);$(LIBJPEG_LIB);$(LIBQXP_LIB);$(LIBREVENGE_LIB);$(LIBREVENGE_GENERATORS_LIB);$(LIBREVENGE_STREAM_LIB);$(LIBTIFF_LIB);$(ZLIB_LIB);scribus-api.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalLibraryDirectories>$(FREETYPE_LIB_DIR);$(LCMS_LIB_DIR);$(LIBJPEG_LIB_DIR);$(LIBQXP_LIB_DIR);$(LIBREVENGE_LIB_DIR);$(LIBTIFF_LIB_DIR);$(ZLIB_LIB_DIR);$(QT5_DIR)\lib;$(OutDir)..;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <SubSystem>Windows</SubSystem>
+      <RandomizedBaseAddress>false</RandomizedBaseAddress>
+      <DataExecutionPrevention />
+      <TargetMachine>MachineX86</TargetMachine>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+    <ClCompile>
+      <Optimization>Disabled</Optimization>
+      <AdditionalIncludeDirectories>..;..\..\..\scribus;..\..\..\scribus\plugins\import\revenge;$(QT5_DIR)\include\QtANGLE;$(QT5_DIR)\include\QtCore;$(QT5_DIR)\include\QtGui;$(QT5_DIR)\include\QtWidgets;$(QT5_DIR)\include\QtXml;$(QT5_DIR)\include;$(CAIRO_INCLUDE_DIR);$(FREETYPE_INCLUDE_DIR);$(ICU_INCLUDE_DIR);$(LCMS_INCLUDE_DIR);$(LIBJPEG_INCLUDE_DIR);$(LIBQXP_INCLUDE_DIR);$(LIBREVENGE_INCLUDE_DIR);$(LIBTIFF_INCLUDE_DIR);$(ZLIB_INCLUDE_DIR);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>WIN32;_DEBUG;_USE_MATH_DEFINES;_USRDLL;_WINDOWS;QT_DLL;QT_GUI_LIB;QT_CORE_LIB;QT_THREAD_SUPPORT;COMPILE_PLUGIN_AS_DLL;AVOID_WIN32_FILEIO;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+      <RuntimeTypeInfo>true</RuntimeTypeInfo>
+      <PrecompiledHeader>Use</PrecompiledHeader>
+      <WarningLevel>Level3</WarningLevel>
+      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+      <DisableSpecificWarnings>4190;4251;4267;4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+      <PrecompiledHeaderFile>plugins_pch.h</PrecompiledHeaderFile>
+      <ForcedIncludeFiles>plugins_pch.h;%(ForcedIncludeFiles)</ForcedIncludeFiles>
+    </ClCompile>
+    <Link>
+      <AdditionalDependencies>$(QT5CORE_LIB);$(QT5GUI_LIB);$(QT5WIDGETS_LIB);$(QT5XML_LIB);$(FREETYPE_LIB);$(LCMS_LIB);$(LIBJPEG_LIB);$(LIBQXP_LIB);$(LIBREVENGE_LIB);$(LIBREVENGE_GENERATORS_LIB);$(LIBREVENGE_STREAM_LIB);$(LIBTIFF_LIB);$(ZLIB_LIB);scribus-api.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalLibraryDirectories>$(FREETYPE_LIB_DIR);$(LCMS_LIB_DIR);$(LIBJPEG_LIB_DIR);$(LIBQXP_LIB_DIR);$(LIBREVENGE_LIB_DIR);$(LIBTIFF_LIB_DIR);$(ZLIB_LIB_DIR);$(QT5_DIR)\lib;$(OutDir)..;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <SubSystem>Windows</SubSystem>
+      <RandomizedBaseAddress>false</RandomizedBaseAddress>
+      <DataExecutionPrevention>
+      </DataExecutionPrevention>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+    <ClCompile>
+      <Optimization>MinSpace</Optimization>
+      <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+      <OmitFramePointers>true</OmitFramePointers>
+      <AdditionalIncludeDirectories>..;..\..\..\scribus;..\..\..\scribus\plugins\import\revenge;$(QT5_DIR)\include\QtANGLE;$(QT5_DIR)\include\QtCore;$(QT5_DIR)\include\QtGui;$(QT5_DIR)\include\QtWidgets;$(QT5_DIR)\include\QtXml;$(QT5_DIR)\include;$(CAIRO_INCLUDE_DIR);$(FREETYPE_INCLUDE_DIR);$(ICU_INCLUDE_DIR);$(LCMS_INCLUDE_DIR);$(LIBJPEG_INCLUDE_DIR);$(LIBQXP_INCLUDE_DIR);$(LIBREVENGE_INCLUDE_DIR);$(LIBTIFF_INCLUDE_DIR);$(ZLIB_INCLUDE_DIR);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>WIN32;NDEBUG;_USE_MATH_DEFINES;_USRDLL;_WINDOWS;QT_DLL;QT_GUI_LIB;QT_CORE_LIB;QT_THREAD_SUPPORT;COMPILE_PLUGIN_AS_DLL;AVOID_WIN32_FILEIO;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <StringPooling>true</StringPooling>
+      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+      <FunctionLevelLinking>true</FunctionLevelLinking>
+      <RuntimeTypeInfo>true</RuntimeTypeInfo>
+      <PrecompiledHeader>Use</PrecompiledHeader>
+      <WarningLevel>Level3</WarningLevel>
+      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+      <DisableSpecificWarnings>4190;4251;4267;4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+      <PrecompiledHeaderFile>plugins_pch.h</PrecompiledHeaderFile>
+      <ForcedIncludeFiles>plugins_pch.h;%(ForcedIncludeFiles)</ForcedIncludeFiles>
+    </ClCompile>
+    <Link>
+      <AdditionalDependencies>$(QT5CORE_LIB);$(QT5GUI_LIB);$(QT5WIDGETS_LIB);$(QT5XML_LIB);$(FREETYPE_LIB);$(LCMS_LIB);$(LIBJPEG_LIB);$(LIBQXP_LIB);$(LIBREVENGE_LIB);$(LIBREVENGE_GENERATORS_LIB);$(LIBREVENGE_STREAM_LIB);$(LIBTIFF_LIB);$(ZLIB_LIB);scribus-api.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalLibraryDirectories>$(FREETYPE_LIB_DIR);$(LCMS_LIB_DIR);$(LIBJPEG_LIB_DIR);$(LIBQXP_LIB_DIR);$(LIBREVENGE_LIB_DIR);$(LIBTIFF_LIB_DIR);$(ZLIB_LIB_DIR);$(QT5_DIR)\lib;$(OutDir)..;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <SubSystem>Windows</SubSystem>
+      <OptimizeReferences>true</OptimizeReferences>
+      <EnableCOMDATFolding>true</EnableCOMDATFolding>
+      <RandomizedBaseAddress>false</RandomizedBaseAddress>
+      <DataExecutionPrevention />
+      <TargetMachine>MachineX86</TargetMachine>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+    <ClCompile>
+      <Optimization>MinSpace</Optimization>
+      <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+      <OmitFramePointers>true</OmitFramePointers>
+      <AdditionalIncludeDirectories>..;..\..\..\scribus;..\..\..\scribus\plugins\import\revenge;$(QT5_DIR)\include\QtANGLE;$(QT5_DIR)\include\QtCore;$(QT5_DIR)\include\QtGui;$(QT5_DIR)\include\QtWidgets;$(QT5_DIR)\include\QtXml;$(QT5_DIR)\include;$(CAIRO_INCLUDE_DIR);$(FREETYPE_INCLUDE_DIR);$(ICU_INCLUDE_DIR);$(LCMS_INCLUDE_DIR);$(LIBJPEG_INCLUDE_DIR);$(LIBQXP_INCLUDE_DIR);$(LIBREVENGE_INCLUDE_DIR);$(LIBTIFF_INCLUDE_DIR);$(ZLIB_INCLUDE_DIR);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>WIN32;NDEBUG;_USE_MATH_DEFINES;_USRDLL;_WINDOWS;QT_DLL;QT_GUI_LIB;QT_CORE_LIB;QT_THREAD_SUPPORT;COMPILE_PLUGIN_AS_DLL;AVOID_WIN32_FILEIO;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <StringPooling>true</StringPooling>
+      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+      <FunctionLevelLinking>true</FunctionLevelLinking>
+      <RuntimeTypeInfo>true</RuntimeTypeInfo>
+      <PrecompiledHeader>Use</PrecompiledHeader>
+      <WarningLevel>Level3</WarningLevel>
+      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+      <DisableSpecificWarnings>4190;4251;4267;4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+      <PrecompiledHeaderFile>plugins_pch.h</PrecompiledHeaderFile>
+      <ForcedIncludeFiles>plugins_pch.h;%(ForcedIncludeFiles)</ForcedIncludeFiles>
+    </ClCompile>
+    <Link>
+      <AdditionalDependencies>$(QT5CORE_LIB);$(QT5GUI_LIB);$(QT5WIDGETS_LIB);$(QT5XML_LIB);$(FREETYPE_LIB);$(LCMS_LIB);$(LIBJPEG_LIB);$(LIBQXP_LIB);$(LIBREVENGE_LIB);$(LIBREVENGE_GENERATORS_LIB);$(LIBREVENGE_STREAM_LIB);$(LIBTIFF_LIB);$(ZLIB_LIB);scribus-api.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalLibraryDirectories>$(FREETYPE_LIB_DIR);$(LCMS_LIB_DIR);$(LIBJPEG_LIB_DIR);$(LIBQXP_LIB_DIR);$(LIBREVENGE_LIB_DIR);$(LIBTIFF_LIB_DIR);$(ZLIB_LIB_DIR);$(QT5_DIR)\lib;$(OutDir)..;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <SubSystem>Windows</SubSystem>
+      <OptimizeReferences>true</OptimizeReferences>
+      <EnableCOMDATFolding>true</EnableCOMDATFolding>
+      <RandomizedBaseAddress>false</RandomizedBaseAddress>
+      <DataExecutionPrevention>
+      </DataExecutionPrevention>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemGroup>
+    <ClCompile Include="..\..\..\scribus\plugins\import\qxp\importqxp.cpp" />
+    <ClCompile Include="..\..\..\scribus\plugins\import\qxp\importqxpplugin.cpp" />
+    <ClCompile Include="..\..\..\scribus\plugins\import\revenge\rawpainter.cpp" />
+    <ClCompile Include="..\..\..\scribus\plugins\plugins_pch.cpp">
+      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>
+      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader>
+      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Create</PrecompiledHeader>
+      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Create</PrecompiledHeader>
+    </ClCompile>
+  </ItemGroup>
+  <ItemGroup>
+    <moc Include="..\..\..\scribus\plugins\import\qxp\importqxp.h" />
+    <moc Include="..\..\..\scribus\plugins\import\qxp\importqxpplugin.h" />
+  </ItemGroup>
+  <ItemGroup>
+    <ClInclude Include="..\..\..\scribus\plugins\import\revenge\rawpainter.h" />
+    <ClInclude Include="..\..\..\scribus\plugins\plugins_pch.h" />
+  </ItemGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+  <ImportGroup Label="ExtensionTargets">
+    <Import Project="..\Scribus-build-rules.targets" />
+  </ImportGroup>
+</Project>
diff --git a/Scribus/win32/msvc2015/qxpimport/qxpimport.vcxproj.filters b/Scribus/win32/msvc2015/qxpimport/qxpimport.vcxproj.filters
new file mode 100644
index 000000000..71642ca7d
--- /dev/null
+++ b/Scribus/win32/msvc2015/qxpimport/qxpimport.vcxproj.filters
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup>
+    <Filter Include="Source Files">
+      <UniqueIdentifier>{0aae3350-c3e2-4425-8494-3272a5fb1d0e}</UniqueIdentifier>
+      <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm</Extensions>
+    </Filter>
+    <Filter Include="Header Files">
+      <UniqueIdentifier>{b0c11a86-a75c-4de0-b834-26ae466b6417}</UniqueIdentifier>
+      <Extensions>h;hpp;hxx;hm;inl;inc</Extensions>
+    </Filter>
+  </ItemGroup>
+  <ItemGroup>
+    <ClCompile Include="..\..\..\scribus\plugins\import\qxp\importqxp.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\..\scribus\plugins\import\qxp\importqxpplugin.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\..\scribus\plugins\import\revenge\rawpainter.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\..\scribus\plugins\plugins_pch.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+  </ItemGroup>
+  <ItemGroup>
+    <moc Include="..\..\..\scribus\plugins\import\qxp\importqxp.h">
+      <Filter>Header Files</Filter>
+    </moc>
+    <moc Include="..\..\..\scribus\plugins\import\qxp\importqxpplugin.h">
+      <Filter>Header Files</Filter>
+    </moc>
+  </ItemGroup>
+  <ItemGroup>
+    <ClInclude Include="..\..\..\scribus\plugins\import\revenge\rawpainter.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\..\scribus\plugins\plugins_pch.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+  </ItemGroup>
+</Project>
-- 
2.13.5

0003-add-README-entry-for-QuarkXPress.patch (2,000 bytes)
From fcbedbca18e66255333a7a807e5ccda620ff2a1e Mon Sep 17 00:00:00 2001
From: David Tardon <dtardon@redhat.com>
Date: Sun, 17 Sep 2017 20:20:49 +0200
Subject: [PATCH 3/4] add README entry for QuarkXPress

---
 Scribus/README | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Scribus/README b/Scribus/README
index 13bca351f..18fc3fc59 100644
--- a/Scribus/README
+++ b/Scribus/README
@@ -110,6 +110,7 @@ A considerable amount of work has been spent on new import filters, as well as i
 - Open Raster File (ORA): Open Raster is an open standard for complex bitmap files. It’s supported by all major Free image editors, including GIMP and Krita.
 - Photoshop Custom Shapes (CSH): CSH is a vector format used for simple vector graphics collections in Adobe Photoshop. They can be imported via the new "Custom Shapes" manager. 
 - Progressive Graphics File (PGF): This is a fairly new image format, designed to replace JPEG, just like JPEG 2000 does, but emphasizing speed and quality over compression ratio.
+- QuarkXPress (QXD, QXT): An importer for QuarkXPress files has been made possible by the creation of libqxp, wich is also used for QuarkXPress import into LibreOffice. It is supposed to import at least QuarkXPress versions 3.1–4.1.
 - Rich Text Format (RTF): One of the most widely used exchange formats for formatted text, RTF is also very common in DTP workflows and can be exported by almost every word processor since the 90s.
 - StarView Metafile (SVM): This is an old Metafile format (similar to WMF) that was used by OpenOffice’s / LibreOffice’s predecessor StarOffice. Since both successors still use SVM in - OpenDocument Graphics, the SVM import filter was a by-product of the new ODG filter. 
 - UniConvertor Plug-in: As with the GraphicsMagick plug-in, Scribus won’t list any of the file types supported by UniConvertor to save space in file selectors. It will also ignore UniConvertor for importing file formats for which Scribus provides generic importers.
-- 
2.13.5

jghali

2017-09-24 19:54

administrator   ~0044451

Committed, thanks!

Issue History

Date Modified Username Field Change
2017-09-21 16:41 dtardon New Issue
2017-09-21 16:41 dtardon File Added: 0001-add-QuarkXPress-importer-using-libqxp.patch
2017-09-21 16:41 dtardon File Added: 0002-add-MSVC-project-files-for-qxp-import.patch
2017-09-21 16:41 dtardon File Added: 0003-add-README-entry-for-QuarkXPress.patch
2017-09-21 16:41 dtardon Tag Attached: import
2017-09-23 22:25 jghali Severity minor => feature
2017-09-24 19:54 jghali Summary add QuarkXPress import (using libqxp) => add QuarkXPress importer (using libqxp)
2017-09-24 19:54 jghali Assigned To => jghali
2017-09-24 19:54 jghali Status new => resolved
2017-09-24 19:54 jghali Resolution open => fixed
2017-09-24 19:54 jghali Fixed in Version => 1.5.4.svn
2017-09-24 19:54 jghali Note Added: 0044451
2017-12-20 20:58 cbradney Status resolved => closed