From 57eb32794c2df43d60ee8f0a9aa8576567358ce6 Mon Sep 17 00:00:00 2001 From: ishmal Date: Mon, 10 Mar 2008 02:40:46 +0000 Subject: [PATCH] clean up tabs and DOS-ishness --- src/extension/script/InkscapeScript.cpp | 59 ++++++++++++++----------- src/extension/script/InkscapeScript.h | 15 +++++-- 2 files changed, 44 insertions(+), 30 deletions(-) diff --git a/src/extension/script/InkscapeScript.cpp b/src/extension/script/InkscapeScript.cpp index 806eb7b31..3007df39f 100644 --- a/src/extension/script/InkscapeScript.cpp +++ b/src/extension/script/InkscapeScript.cpp @@ -4,22 +4,29 @@ * Authors: * Bob Jamison * - * Copyright (C) 2004 Authors + * Copyright (C) 2004-2008 Authors * * Released under GNU GPL, read the file 'COPYING' for more information */ + #include "InkscapeScript.h" #include -namespace Inkscape { -namespace Extension { -namespace Script { + + +namespace Inkscape +{ +namespace Extension +{ +namespace Script +{ typedef Inkscape::Bind::Value Value; + /** * */ @@ -78,16 +85,16 @@ bool InkscapeScript::interpretScript(const Glib::ustring &script, { g_warning("interpretScript: unable to start JVM\n"); return false; - } - std::vector parms; - Value retval; - Value parm; - parm.setString(langname); - parms.push_back(parm); - parm.setString(script); - parms.push_back(parm); + } + std::vector parms; + Value retval; + Value parm; + parm.setString(langname); + parms.push_back(parm); + parm.setString(script); + parms.push_back(parm); bool ret = binder->callStatic(Value::BIND_BOOLEAN, - "org/inkscape/cmn/ScriptRunner", + "org/inkscape/cmn/ScriptRunner", "run", "(Ljava/lang/String;Ljava/lang/String;)Z", parms, @@ -95,8 +102,8 @@ bool InkscapeScript::interpretScript(const Glib::ustring &script, if (!ret) { g_warning("interpretScript: failed\n"); - return false; - } + return false; + } return true; } @@ -140,16 +147,16 @@ bool InkscapeScript::interpretFile(const Glib::ustring &fname, { g_warning("interpretFile: unable to start JVM\n"); return false; - } - std::vector parms; - Value retval; - Value parm; - parm.setString(langname); - parms.push_back(parm); - parm.setString(fname); - parms.push_back(parm); + } + std::vector parms; + Value retval; + Value parm; + parm.setString(langname); + parms.push_back(parm); + parm.setString(fname); + parms.push_back(parm); bool ret = binder->callStatic(Value::BIND_BOOLEAN, - "org/inkscape/cmn/ScriptRunner", + "org/inkscape/cmn/ScriptRunner", "runFile", "(Ljava/lang/String;Ljava/lang/String;)Z", parms, @@ -157,8 +164,8 @@ bool InkscapeScript::interpretFile(const Glib::ustring &fname, if (!ret) { g_warning("interpretFile: failed\n"); - return false; - } + return false; + } return true; } diff --git a/src/extension/script/InkscapeScript.h b/src/extension/script/InkscapeScript.h index b6334fde1..98508e4e6 100644 --- a/src/extension/script/InkscapeScript.h +++ b/src/extension/script/InkscapeScript.h @@ -7,7 +7,7 @@ * Authors: * Bob Jamison * - * Copyright (C) 2004-2006 Bob Jamison + * Copyright (C) 2004-2008 Bob Jamison * * Released under GNU GPL, read the file 'COPYING' for more information */ @@ -16,11 +16,18 @@ #include -namespace Inkscape { -namespace Extension { -namespace Script { +namespace Inkscape +{ +namespace Extension +{ +namespace Script +{ + +/** + * This class is used to run scripts, either from a file or buffer + */ class InkscapeScript { public: -- 2.30.2