Back to index

scribus-ng  1.3.4.dfsg+svn20071115
Functions
svgimport.h File Reference
#include "cmdvar.h"
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

 PyDoc_STRVAR (scribus_placesvg__doc__, QT_TR_NOOP("placeSVG(\"filename\", x, y)\n\ \n\ Places the SVG \"filename\" onto the current page,\n\ x and y specify the coordinate of the topleft corner of the SVG placed on the page\n\ \n\ If loading was successful, the selection contains the imported SVG\n\ "))
 docstring
PyObject * scribus_placesvg (PyObject *, PyObject *args)
 Places an SVG file.
 PyDoc_STRVAR (scribus_placeeps__doc__, QT_TR_NOOP("placeEPS(\"filename\", x, y)\n\ \n\ Places the EPS \"filename\" onto the current page,\n\ x and y specify the coordinate of the topleft corner of the EPS placed on the page\n\ \n\ If loading was successful, the selection contains the imported EPS\n\ "))
 docstring
PyObject * scribus_placeeps (PyObject *, PyObject *args)
 Places an EPS file.
 PyDoc_STRVAR (scribus_placesxd__doc__, QT_TR_NOOP("placeSXD(\"filename\", x, y)\n\ \n\ Places the SXD \"filename\" onto the current page,\n\ x and y specify the coordinate of the topleft corner of the SXD placed on the page\n\ \n\ If loading was successful, the selection contains the imported SXD\n\ "))
 docstring
PyObject * scribus_placesxd (PyObject *, PyObject *args)
 Places an SXD file.
 PyDoc_STRVAR (scribus_placeodg__doc__, QT_TR_NOOP("placeODG(\"filename\", x, y)\n\ \n\ Places the ODG \"filename\" onto the current page,\n\ x and y specify the coordinate of the topleft corner of the ODG placed on the page\n\ \n\ If loading was successful, the selection contains the imported ODG\n\ "))
 docstring
PyObject * scribus_placeodg (PyObject *, PyObject *args)
 Places an ODG file.

Function Documentation

PyDoc_STRVAR ( scribus_placesvg__doc__  ,
QT_TR_NOOP("placeSVG(\"filename\", x, y)\n\\n\Places the SVG \"filename\" onto the current page,\n\x and y specify the coordinate of the topleft corner of the SVG placed on the page\n\\n\If loading was successful, the selection contains the imported SVG\n\")   
)

docstring

PyDoc_STRVAR ( scribus_placeeps__doc__  ,
QT_TR_NOOP("placeEPS(\"filename\", x, y)\n\\n\Places the EPS \"filename\" onto the current page,\n\x and y specify the coordinate of the topleft corner of the EPS placed on the page\n\\n\If loading was successful, the selection contains the imported EPS\n\")   
)

docstring

PyDoc_STRVAR ( scribus_placesxd__doc__  ,
QT_TR_NOOP("placeSXD(\"filename\", x, y)\n\\n\Places the SXD \"filename\" onto the current page,\n\x and y specify the coordinate of the topleft corner of the SXD placed on the page\n\\n\If loading was successful, the selection contains the imported SXD\n\")   
)

docstring

PyDoc_STRVAR ( scribus_placeodg__doc__  ,
QT_TR_NOOP("placeODG(\"filename\", x, y)\n\\n\Places the ODG \"filename\" onto the current page,\n\x and y specify the coordinate of the topleft corner of the ODG placed on the page\n\\n\If loading was successful, the selection contains the imported ODG\n\")   
)

docstring

PyObject* scribus_placeeps ( PyObject *  ,
PyObject *  args 
)

Places an EPS file.

Definition at line 50 of file svgimport.cpp.

{
       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 NULL;
       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->moveGroup(pageUnitXToDocX(x) - x2, pageUnitYToDocY(y) - y2);
              }
       }
       else
       {
              PyErr_SetString(PyExc_Exception, "EPS Import plugin not available");
              return NULL;
       }
//     Py_INCREF(Py_None);
//     return Py_None;
       Py_RETURN_NONE;
}

Here is the call graph for this function:

PyObject* scribus_placeodg ( PyObject *  ,
PyObject *  args 
)

Places an ODG file.

Definition at line 110 of file svgimport.cpp.

{
       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 NULL;
       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->moveGroup(pageUnitXToDocX(x) - x2, pageUnitYToDocY(y) - y2);
              }
       }
       else
       {
              PyErr_SetString(PyExc_Exception, "OpenOffice Import plugin not available");
              return NULL;
       }
//     Py_INCREF(Py_None);
//     return Py_None;
       Py_RETURN_NONE;
}

Here is the call graph for this function:

PyObject* scribus_placesvg ( PyObject *  ,
PyObject *  args 
)

Places an SVG file.

Definition at line 20 of file svgimport.cpp.

{
       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 NULL;
       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->moveGroup(pageUnitXToDocX(x) - x2, pageUnitYToDocY(y) - y2);
              }
       }
       else
       {
              PyErr_SetString(PyExc_Exception, "SVG Import plugin not available");
              return NULL;
       }
//     Py_INCREF(Py_None);
//     return Py_None;
       Py_RETURN_NONE;
}

Here is the call graph for this function:

PyObject* scribus_placesxd ( PyObject *  ,
PyObject *  args 
)

Places an SXD file.

Definition at line 80 of file svgimport.cpp.

{
       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 NULL;
       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->moveGroup(pageUnitXToDocX(x) - x2, pageUnitYToDocY(y) - y2);
              }
       }
       else
       {
              PyErr_SetString(PyExc_Exception, "OpenOffice Import plugin not available");
              return NULL;
       }
//     Py_INCREF(Py_None);
//     return Py_None;
       Py_RETURN_NONE;
}

Here is the call graph for this function: