From 38dbf7a845990cc9867b82f092240dcd0221609e Mon Sep 17 00:00:00 2001 From: pjrm Date: Mon, 13 Mar 2006 04:07:37 +0000 Subject: [PATCH] Set svn:eol-style to native on all *.cpp *.h files (i.e. on the few .cpp/.h files created since cvs2svn). --- src/extension/internal/odf.cpp | 308 ++++++++++++++++----------------- src/extension/internal/odf.h | 144 +++++++-------- 2 files changed, 226 insertions(+), 226 deletions(-) diff --git a/src/extension/internal/odf.cpp b/src/extension/internal/odf.cpp index 6918e9ebb..057ddecbb 100644 --- a/src/extension/internal/odf.cpp +++ b/src/extension/internal/odf.cpp @@ -1,154 +1,154 @@ -/** - * OpenDocument 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 -#endif -#include "odf.h" -#include "clear-n_.h" -#include "inkscape.h" -#include "sp-path.h" -#include -#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 &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( - "\n" - "" N_("OpenDocument Drawing Output") "\n" - "org.inkscape.output.odf\n" - "\n" - ".odg\n" - "text/x-povray-script\n" - "" N_("OpenDocument drawing (*.odg)(placeholder)") "\n" - "" N_("OpenDocument drawing file") "\n" - "\n" - "", - 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 : +/** + * OpenDocument 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 +#endif +#include "odf.h" +#include "clear-n_.h" +#include "inkscape.h" +#include "sp-path.h" +#include +#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 &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( + "\n" + "" N_("OpenDocument Drawing Output") "\n" + "org.inkscape.output.odf\n" + "\n" + ".odg\n" + "text/x-povray-script\n" + "" N_("OpenDocument drawing (*.odg)(placeholder)") "\n" + "" N_("OpenDocument drawing file") "\n" + "\n" + "", + 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 : diff --git a/src/extension/internal/odf.h b/src/extension/internal/odf.h index 1e81e9986..8865789cc 100644 --- a/src/extension/internal/odf.h +++ b/src/extension/internal/odf.h @@ -1,72 +1,72 @@ -/** - * OpenDocument 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 -#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 */ - +/** + * OpenDocument 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 +#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 */ + -- 2.30.2