r23381 by jghali - Remove old commented out code

scribus-commit scribus-commit at lists.scribus.net
Tue Nov 26 11:53:54 UTC 2019


Author: jghali
Date: Tue Nov 26 11:53:54 2019
New Revision: 23381

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=23381
Log:
Remove old commented out code

Modified:
    trunk/Scribus/scribus/plugins/scriptplugin/svgimport.cpp

Modified: trunk/Scribus/scribus/plugins/scriptplugin/svgimport.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23381&path=/trunk/Scribus/scribus/plugins/scriptplugin/svgimport.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/scriptplugin/svgimport.cpp	(original)
+++ trunk/Scribus/scribus/plugins/scriptplugin/svgimport.cpp	Tue Nov 26 11:53:54 2019
@@ -66,131 +66,6 @@
 	}
 	Py_RETURN_NONE;
 }
-#if 0
-PyObject *scribus_placesvg(PyObject* /* self */, PyObject* args)
-{
-	char *Image;
-	double x = 0.0;
-	double y = 0.0;
-	if (!PyArg_ParseTuple(args, "es|dd", "utf-8", &Image, &x, &y))
-		return nullptr;
-	if (!checkHaveDocument())
-		return nullptr;
-	const FileFormat * fmt = LoadSavePlugin::getFormatById(FORMATID_SVGIMPORT);
-	if (fmt)
-	{
-		fmt->loadFile(QString::fromUtf8(Image), LoadSavePlugin::lfUseCurrentPage|LoadSavePlugin::lfInteractive|LoadSavePlugin::lfScripted);
-		if (ScCore->primaryMainWindow()->doc->m_Selection->count() >= 1)
-		{
-			double x2, y2, w, h;
-			ScCore->primaryMainWindow()->doc->m_Selection->getGroupRect(&x2, &y2, &w, &h);
-			ScCore->primaryMainWindow()->view->startGroupTransaction();
-			ScCore->primaryMainWindow()->doc->moveGroup(pageUnitXToDocX(x) - x2, pageUnitYToDocY(y) - y2);
-			ScCore->primaryMainWindow()->view->endGroupTransaction();
-			ScCore->primaryMainWindow()->requestUpdate(reqColorsUpdate | reqLineStylesUpdate | reqTextStylesUpdate);
-		}
-	}
-	else
-	{
-		PyErr_SetString(PyExc_Exception, "SVG Import plugin not available");
-		return nullptr;
-	}
-	Py_RETURN_NONE;
-}
-
-PyObject *scribus_placeeps(PyObject* /* self */, PyObject* args)
-{
-	char *Image;
-	double x = 0.0;
-	double y = 0.0;
-	if (!PyArg_ParseTuple(args, "es|dd", "utf-8", &Image, &x, &y))
-		return nullptr;
-	if (!checkHaveDocument())
-		return nullptr;
-	const FileFormat * fmt = LoadSavePlugin::getFormatById(FORMATID_PSIMPORT);
-	if (fmt)
-	{
-		fmt->loadFile(QString::fromUtf8(Image), LoadSavePlugin::lfUseCurrentPage|LoadSavePlugin::lfInteractive|LoadSavePlugin::lfScripted);
-		if (ScCore->primaryMainWindow()->doc->m_Selection->count() >= 1)
-		{
-			double x2, y2, w, h;
-			ScCore->primaryMainWindow()->doc->m_Selection->getGroupRect(&x2, &y2, &w, &h);
-			ScCore->primaryMainWindow()->view->startGroupTransaction();
-			ScCore->primaryMainWindow()->doc->moveGroup(pageUnitXToDocX(x) - x2, pageUnitYToDocY(y) - y2);
-			ScCore->primaryMainWindow()->view->endGroupTransaction();
-			ScCore->primaryMainWindow()->requestUpdate(reqColorsUpdate | reqLineStylesUpdate | reqTextStylesUpdate);
-		}
-	}
-	else
-	{
-		PyErr_SetString(PyExc_Exception, "EPS Import plugin not available");
-		return nullptr;
-	}
-	Py_RETURN_NONE;
-}
-
-PyObject *scribus_placesxd(PyObject* /* self */, PyObject* args)
-{
-	char *Image;
-	double x = 0.0;
-	double y = 0.0;
-	if (!PyArg_ParseTuple(args, "es|dd", "utf-8", &Image, &x, &y))
-		return nullptr;
-	if (!checkHaveDocument())
-		return nullptr;
-	const FileFormat * fmt = LoadSavePlugin::getFormatById(FORMATID_SXDIMPORT);
-	if (fmt)
-	{
-		fmt->loadFile(QString::fromUtf8(Image), LoadSavePlugin::lfUseCurrentPage|LoadSavePlugin::lfInteractive|LoadSavePlugin::lfScripted);
-		if (ScCore->primaryMainWindow()->doc->m_Selection->count() >= 1)
-		{
-			double x2, y2, w, h;
-			ScCore->primaryMainWindow()->doc->m_Selection->getGroupRect(&x2, &y2, &w, &h);
-			ScCore->primaryMainWindow()->view->startGroupTransaction();
-			ScCore->primaryMainWindow()->doc->moveGroup(pageUnitXToDocX(x) - x2, pageUnitYToDocY(y) - y2);
-			ScCore->primaryMainWindow()->view->endGroupTransaction();
-			ScCore->primaryMainWindow()->requestUpdate(reqColorsUpdate | reqLineStylesUpdate | reqTextStylesUpdate)
-		}
-	}
-	else
-	{
-		PyErr_SetString(PyExc_Exception, "OpenOffice Import plugin not available");
-		return nullptr;
-	}
-	Py_RETURN_NONE;
-}
-
-PyObject *scribus_placeodg(PyObject* /* self */, PyObject* args)
-{
-	char *Image;
-	double x = 0.0;
-	double y = 0.0;
-	if (!PyArg_ParseTuple(args, "es|dd", "utf-8", &Image, &x, &y))
-		return NULL;
-	if (!checkHaveDocument())
-		return nullptr;
-	const FileFormat * fmt = LoadSavePlugin::getFormatById(FORMATID_ODGIMPORT);
-	if (fmt)
-	{
-		fmt->loadFile(QString::fromUtf8(Image), LoadSavePlugin::lfUseCurrentPage|LoadSavePlugin::lfInteractive|LoadSavePlugin::lfScripted);
-		if (ScCore->primaryMainWindow()->doc->m_Selection->count() >= 1)
-		{
-			double x2, y2, w, h;
-			ScCore->primaryMainWindow()->doc->m_Selection->getGroupRect(&x2, &y2, &w, &h);
-			ScCore->primaryMainWindow()->view->startGroupTransaction();
-			ScCore->primaryMainWindow()->doc->moveGroup(pageUnitXToDocX(x) - x2, pageUnitYToDocY(y) - y2);
-			ScCore->primaryMainWindow()->view->endGroupTransaction();
-			ScCore->primaryMainWindow()->requestUpdate(reqColorsUpdate | reqLineStylesUpdate | reqTextStylesUpdate)
-		}
-	}
-	else
-	{
-		PyErr_SetString(PyExc_Exception, "OpenOffice Import plugin not available");
-		return nullptr;
-	}
-	Py_RETURN_NONE;
-}
-#endif
 
 /*! HACK: this removes "warning: 'blah' defined but not used" compiler warnings
 with header files structure untouched (docstrings are kept near declarations)




More information about the scribus-commit mailing list