Subversion Repositories Scribus

Compare Revisions

Ignore whitespace Rev 2607 → Rev 2608

/branches/Version13x/Scribus/scribus/plugins/scriptplugin/svgimport.h
0,0 → 1,20
#ifndef IMPORTSVG_H
#define IMPORTSVG_H
 
// Brings in <Python.h> first
#include "cmdvar.h"
 
PyDoc_STRVAR(scribus_importsvg__doc__,
QT_TR_NOOP("importSVG(\"string\")\n\
\n\
The \"string\" must be a valid filename for a SVG image. The text\n\
must be UTF8 encoded or 'unicode' string(recommended).\n\
"));
/**
Imports a SVG image file.
(Henning Schroeder 2005-06-29)
*/
PyObject *scribus_importsvg(PyObject* /*self*/, PyObject* args);
 
 
#endif
Property changes:
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Author Date Id Revision
\ No newline at end of property
Index: branches/Version13x/Scribus/scribus/plugins/scriptplugin/scriptplugin.cpp
===================================================================
--- branches/Version13x/Scribus/scribus/plugins/scriptplugin/scriptplugin.cpp (revision 2607)
+++ branches/Version13x/Scribus/scribus/plugins/scriptplugin/scriptplugin.cpp (revision 2608)
@@ -35,6 +35,7 @@
#include "objpdffile.h"
#include "objimageexport.h"
#include "guiapp.h"
+#include "svgimport.h"
#include "scriptercore.h"
#include "customfdialog.h"
@@ -299,6 +300,7 @@
{const_cast<char*>("gotoPage"), scribus_gotopage, METH_VARARGS, tr(scribus_gotopage__doc__)},
{const_cast<char*>("groupObjects"), scribus_groupobj, METH_VARARGS, tr(scribus_groupobj__doc__)},
{const_cast<char*>("haveDoc"), (PyCFunction)scribus_havedoc, METH_NOARGS, tr(scribus_havedoc__doc__)},
+ {const_cast<char*>("importSVG"), scribus_importsvg, METH_VARARGS, tr(scribus_importsvg__doc__)},
{const_cast<char*>("insertText"), scribus_inserttext, METH_VARARGS, tr(scribus_inserttext__doc__)},
{const_cast<char*>("isLayerPrintable"), scribus_glayerprint, METH_VARARGS, tr(scribus_glayerprint__doc__)},
{const_cast<char*>("isLayerVisible"), scribus_glayervisib, METH_VARARGS, tr(scribus_glayervisib__doc__)},
/branches/Version13x/Scribus/scribus/plugins/scriptplugin/Makefile.am
4,8 → 4,8
INCLUDES = $(LIBFREETYPE_CFLAGS) $(all_includes)
libscriptplugin_la_LDFLAGS = -version-info 0:0:0
libscriptplugin_la_METASOURCES = AUTO
libscriptplugin_la_SOURCES = scriptercore.cpp valuedialog.cpp cmdutil.cpp cmddialog.cpp cmddoc.cpp cmdpage.cpp cmdobj.cpp cmdgetprop.cpp cmdsetprop.cpp cmdtext.cpp cmdmani.cpp cmdcolor.cpp cmdmisc.cpp objprinter.cpp objpdffile.cpp guiapp.cpp pconsole.cpp scriptplugin.cpp objimageexport.cpp cmdgetsetprop.cpp
EXTRA_DIST = valuedialog.h cmdvar.h cmdutil.cpp cmdutil.h cmddialog.cpp cmddialog.h cmddoc.cpp cmddoc.h cmdpage.cpp cmdpage.h cmdobj.cpp cmdobj.h cmdgetprop.cpp cmdgetprop.h cmdsetprop.cpp cmdsetprop.h cmdtext.cpp cmdtext.h cmdmani.cpp cmdmani.h cmdcolor.cpp cmdcolor.h cmdmisc.cpp cmdmisc.h objprinter.cpp objprinter.h objpdffile.cpp objpdffile.h guiapp.cpp guiapp.h scriptplugin.cpp scriptplugin.h pconsole.cpp pconsole.h objimageexport.h cmdgetsetprop.h cmdgetsetprop.cpp scriptercore.h
libscriptplugin_la_SOURCES = scriptercore.cpp valuedialog.cpp cmdutil.cpp cmddialog.cpp cmddoc.cpp cmdpage.cpp cmdobj.cpp cmdgetprop.cpp cmdsetprop.cpp cmdtext.cpp cmdmani.cpp cmdcolor.cpp cmdmisc.cpp objprinter.cpp objpdffile.cpp guiapp.cpp svgimport.cpp pconsole.cpp scriptplugin.cpp objimageexport.cpp cmdgetsetprop.cpp
EXTRA_DIST = valuedialog.h cmdvar.h cmdutil.cpp cmdutil.h cmddialog.cpp cmddialog.h cmddoc.cpp cmddoc.h cmdpage.cpp cmdpage.h cmdobj.cpp cmdobj.h cmdgetprop.cpp cmdgetprop.h cmdsetprop.cpp cmdsetprop.h cmdtext.cpp cmdtext.h cmdmani.cpp cmdmani.h cmdcolor.cpp cmdcolor.h cmdmisc.cpp cmdmisc.h objprinter.cpp objprinter.h objpdffile.cpp objpdffile.h guiapp.cpp guiapp.h svgimport.cpp svgimport.h scriptplugin.cpp scriptplugin.h pconsole.cpp pconsole.h objimageexport.h cmdgetsetprop.h cmdgetsetprop.cpp scriptercore.h
KDE_OPTIONS = qtonly
AM_LDFLAGS = $(PYTHONLIB) $(LIBPYTHON) $(MODULE_LINK_FLAGS)
 
/branches/Version13x/Scribus/scribus/plugins/scriptplugin/svgimport.cpp
0,0 → 1,28
#include "svgimport.h"
#include "cmdvar.h"
#include "cmdutil.h"
 
#include "pluginmanager.h"
#include <qstring.h>
 
 
PyObject *scribus_importsvg(PyObject* /* self */, PyObject* args)
{
char *aText;
if (!PyArg_ParseTuple(args, "es", "utf-8", &aText))
return NULL;
 
if(!checkHaveDocument())
return NULL;
 
if (!Carrier->pluginManager->DLLexists(10))
return NULL;
 
Carrier->pluginManager->dllInput = QString::fromUtf8(aText);
Carrier->pluginManager->callDLL(10);
Carrier->doc->loading = false;
 
Py_INCREF(Py_None);
return Py_None;
}
 
Property changes:
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Author Date Id Revision
\ No newline at end of property