summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 9819d4e)
raw | patch | inline | side by side (parent: 9819d4e)
author | pjrm <pjrm@users.sourceforge.net> | |
Mon, 13 Mar 2006 04:07:37 +0000 (04:07 +0000) | ||
committer | pjrm <pjrm@users.sourceforge.net> | |
Mon, 13 Mar 2006 04:07:37 +0000 (04:07 +0000) |
src/extension/internal/odf.cpp | patch | blob | history | |
src/extension/internal/odf.h | patch | blob | history |
index 6918e9ebb169face5072b89675c8cfea6323ae4d..057ddecbb82634a55524183e2f36fee44dad1d20 100644 (file)
-/**\r
- * OpenDocument <drawing> input and output\r
- *\r
- * This is an an entry in the extensions mechanism to begin to enable\r
- * the inputting and outputting of OpenDocument Format (ODF) files from\r
- * within Inkscape. Although the initial implementations will be very lossy\r
- * do to the differences in the models of SVG and ODF, they will hopefully\r
- * improve greatly with time.\r
- *\r
- * http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/idl-definitions.html\r
- *\r
- * Authors:\r
- * Bob Jamison\r
- *\r
- * Copyright (C) 2006 Bob Jamison\r
- *\r
- * This library is free software; you can redistribute it and/or\r
- * modify it under the terms of the GNU Lesser General Public\r
- * License as published by the Free Software Foundation; either\r
- * version 2.1 of the License, or (at your option) any later version.\r
- *\r
- * This library is distributed in the hope that it will be useful,\r
- * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\r
- * Lesser General Public License for more details.\r
- *\r
- * You should have received a copy of the GNU Lesser General Public\r
- * License along with this library; if not, write to the Free Software\r
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA\r
- */\r
-\r
-\r
-\r
-#ifdef HAVE_CONFIG_H\r
-# include <config.h>\r
-#endif\r
-#include "odf.h"\r
-#include "clear-n_.h"\r
-#include "inkscape.h"\r
-#include "sp-path.h"\r
-#include <style.h>\r
-#include "display/curve.h"\r
-#include "libnr/n-art-bpath.h"\r
-#include "extension/system.h"\r
-\r
-\r
-\r
-#include "io/sys.h"\r
-\r
-namespace Inkscape\r
-{\r
-namespace Extension\r
-{\r
-namespace Internal\r
-{\r
-\r
-\r
-//########################################################################\r
-//# O U T P U T\r
-//########################################################################\r
-\r
-\r
-/**\r
- * Make sure that we are in the database\r
- */\r
-bool\r
-OdfOutput::check (Inkscape::Extension::Extension *module)\r
-{\r
- /* We don't need a Key\r
- if (NULL == Inkscape::Extension::db.get(SP_MODULE_KEY_OUTPUT_POV))\r
- return FALSE;\r
- */\r
-\r
- return TRUE;\r
-}\r
-\r
-\r
-\r
-\r
-/**\r
- * This function searches the Repr tree recursively from the given node,\r
- * and adds refs to all nodes with the given name, to the result vector\r
- */\r
-static void\r
-findElementsByTagName(std::vector<Inkscape::XML::Node *> &results,\r
- Inkscape::XML::Node *node,\r
- char const *name)\r
-{\r
- if ( !name || strcmp(node->name(), name) == 0 )\r
- {\r
- results.push_back(node);\r
- }\r
-\r
- for (Inkscape::XML::Node *child = node->firstChild() ; child ; child = child->next())\r
- findElementsByTagName( results, child, name );\r
-\r
-}\r
-\r
-\r
-/**\r
- * Descends into the SVG tree, mapping things to ODF when appropriate\r
- */\r
-void\r
-OdfOutput::save(Inkscape::Extension::Output *mod, SPDocument *doc, gchar const *uri)\r
-{\r
- FILE *f = fopen(uri, "rb");\r
- fclose(f);\r
-}\r
-\r
-\r
-/**\r
- * This is the definition of PovRay output. This function just\r
- * calls the extension system with the memory allocated XML that\r
- * describes the data.\r
-*/\r
-void\r
-OdfOutput::init()\r
-{\r
- Inkscape::Extension::build_from_mem(\r
- "<inkscape-extension>\n"\r
- "<name>" N_("OpenDocument Drawing Output") "</name>\n"\r
- "<id>org.inkscape.output.odf</id>\n"\r
- "<output>\n"\r
- "<extension>.odg</extension>\n"\r
- "<mimetype>text/x-povray-script</mimetype>\n"\r
- "<filetypename>" N_("OpenDocument drawing (*.odg)(placeholder)") "</filetypename>\n"\r
- "<filetypetooltip>" N_("OpenDocument drawing file") "</filetypetooltip>\n"\r
- "</output>\n"\r
- "</inkscape-extension>",\r
- new OdfOutput());\r
-}\r
-\r
-//########################################################################\r
-//# I N P U T\r
-//########################################################################\r
-\r
-\r
-\r
-\r
-} //namespace Internal\r
-} //namespace Extension\r
-} //namespace Inkscape\r
-\r
-\r
-/*\r
- Local Variables:\r
- mode:c++\r
- c-file-style:"stroustrup"\r
- c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))\r
- indent-tabs-mode:nil\r
- fill-column:99\r
- End:\r
-*/\r
-// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :\r
+/**
+ * OpenDocument <drawing> input and output
+ *
+ * This is an an entry in the extensions mechanism to begin to enable
+ * the inputting and outputting of OpenDocument Format (ODF) files from
+ * within Inkscape. Although the initial implementations will be very lossy
+ * do to the differences in the models of SVG and ODF, they will hopefully
+ * improve greatly with time.
+ *
+ * http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/idl-definitions.html
+ *
+ * Authors:
+ * Bob Jamison
+ *
+ * Copyright (C) 2006 Bob Jamison
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+#include "odf.h"
+#include "clear-n_.h"
+#include "inkscape.h"
+#include "sp-path.h"
+#include <style.h>
+#include "display/curve.h"
+#include "libnr/n-art-bpath.h"
+#include "extension/system.h"
+
+
+
+#include "io/sys.h"
+
+namespace Inkscape
+{
+namespace Extension
+{
+namespace Internal
+{
+
+
+//########################################################################
+//# O U T P U T
+//########################################################################
+
+
+/**
+ * Make sure that we are in the database
+ */
+bool
+OdfOutput::check (Inkscape::Extension::Extension *module)
+{
+ /* We don't need a Key
+ if (NULL == Inkscape::Extension::db.get(SP_MODULE_KEY_OUTPUT_POV))
+ return FALSE;
+ */
+
+ return TRUE;
+}
+
+
+
+
+/**
+ * This function searches the Repr tree recursively from the given node,
+ * and adds refs to all nodes with the given name, to the result vector
+ */
+static void
+findElementsByTagName(std::vector<Inkscape::XML::Node *> &results,
+ Inkscape::XML::Node *node,
+ char const *name)
+{
+ if ( !name || strcmp(node->name(), name) == 0 )
+ {
+ results.push_back(node);
+ }
+
+ for (Inkscape::XML::Node *child = node->firstChild() ; child ; child = child->next())
+ findElementsByTagName( results, child, name );
+
+}
+
+
+/**
+ * Descends into the SVG tree, mapping things to ODF when appropriate
+ */
+void
+OdfOutput::save(Inkscape::Extension::Output *mod, SPDocument *doc, gchar const *uri)
+{
+ FILE *f = fopen(uri, "rb");
+ fclose(f);
+}
+
+
+/**
+ * This is the definition of PovRay output. This function just
+ * calls the extension system with the memory allocated XML that
+ * describes the data.
+*/
+void
+OdfOutput::init()
+{
+ Inkscape::Extension::build_from_mem(
+ "<inkscape-extension>\n"
+ "<name>" N_("OpenDocument Drawing Output") "</name>\n"
+ "<id>org.inkscape.output.odf</id>\n"
+ "<output>\n"
+ "<extension>.odg</extension>\n"
+ "<mimetype>text/x-povray-script</mimetype>\n"
+ "<filetypename>" N_("OpenDocument drawing (*.odg)(placeholder)") "</filetypename>\n"
+ "<filetypetooltip>" N_("OpenDocument drawing file") "</filetypetooltip>\n"
+ "</output>\n"
+ "</inkscape-extension>",
+ new OdfOutput());
+}
+
+//########################################################################
+//# I N P U T
+//########################################################################
+
+
+
+
+} //namespace Internal
+} //namespace Extension
+} //namespace Inkscape
+
+
+/*
+ Local Variables:
+ mode:c++
+ c-file-style:"stroustrup"
+ c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
+ indent-tabs-mode:nil
+ fill-column:99
+ End:
+*/
+// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :
index 1e81e9986b69b3cc782d75e34d10a733b8641331..8865789cca70cf8d54afa7424a53a6e727018c37 100644 (file)
-/**\r
- * OpenDocument <drawing> input and output\r
- *\r
- * This is an an entry in the extensions mechanism to begin to enable\r
- * the inputting and outputting of OpenDocument Format (ODF) files from\r
- * within Inkscape. Although the initial implementations will be very lossy\r
- * do to the differences in the models of SVG and ODF, they will hopefully\r
- * improve greatly with time.\r
- *\r
- * http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/idl-definitions.html\r
- *\r
- * Authors:\r
- * Bob Jamison\r
- *\r
- * Copyright (C) 2006 Bob Jamison\r
- *\r
- * This library is free software; you can redistribute it and/or\r
- * modify it under the terms of the GNU Lesser General Public\r
- * License as published by the Free Software Foundation; either\r
- * version 2.1 of the License, or (at your option) any later version.\r
- *\r
- * This library is distributed in the hope that it will be useful,\r
- * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\r
- * Lesser General Public License for more details.\r
- *\r
- * You should have received a copy of the GNU Lesser General Public\r
- * License along with this library; if not, write to the Free Software\r
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA\r
- */\r
-\r
-#ifndef EXTENSION_INTERNAL_ODG_OUT_H\r
-#define EXTENSION_INTERNAL_ODG_OUT_H\r
-\r
-#include <glib.h>\r
-#include "extension/implementation/implementation.h"\r
-\r
-namespace Inkscape\r
-{\r
-namespace Extension\r
-{\r
-namespace Internal\r
-{\r
-\r
-\r
-class OdfOutput : public Inkscape::Extension::Implementation::Implementation\r
-{\r
-\r
- public:\r
-\r
- bool check (Inkscape::Extension::Extension * module);\r
-\r
- void save (Inkscape::Extension::Output *mod,\r
- SPDocument *doc,\r
- const gchar *uri);\r
-\r
- static void init (void);\r
-\r
-\r
-};\r
-\r
-\r
-\r
-\r
-} //namespace Internal\r
-} //namespace Extension\r
-} //namespace Inkscape\r
-\r
-\r
-\r
-#endif /* EXTENSION_INTERNAL_ODG_OUT_H */\r
-\r
+/**
+ * OpenDocument <drawing> input and output
+ *
+ * This is an an entry in the extensions mechanism to begin to enable
+ * the inputting and outputting of OpenDocument Format (ODF) files from
+ * within Inkscape. Although the initial implementations will be very lossy
+ * do to the differences in the models of SVG and ODF, they will hopefully
+ * improve greatly with time.
+ *
+ * http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/idl-definitions.html
+ *
+ * Authors:
+ * Bob Jamison
+ *
+ * Copyright (C) 2006 Bob Jamison
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#ifndef EXTENSION_INTERNAL_ODG_OUT_H
+#define EXTENSION_INTERNAL_ODG_OUT_H
+
+#include <glib.h>
+#include "extension/implementation/implementation.h"
+
+namespace Inkscape
+{
+namespace Extension
+{
+namespace Internal
+{
+
+
+class OdfOutput : public Inkscape::Extension::Implementation::Implementation
+{
+
+ public:
+
+ bool check (Inkscape::Extension::Extension * module);
+
+ void save (Inkscape::Extension::Output *mod,
+ SPDocument *doc,
+ const gchar *uri);
+
+ static void init (void);
+
+
+};
+
+
+
+
+} //namespace Internal
+} //namespace Extension
+} //namespace Inkscape
+
+
+
+#endif /* EXTENSION_INTERNAL_ODG_OUT_H */
+