summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 2b284cd)
raw | patch | inline | side by side (parent: 2b284cd)
author | ishmal <ishmal@users.sourceforge.net> | |
Mon, 10 Mar 2008 04:48:16 +0000 (04:48 +0000) | ||
committer | ishmal <ishmal@users.sourceforge.net> | |
Mon, 10 Mar 2008 04:48:16 +0000 (04:48 +0000) |
src/extension/script/InkscapeScript.cpp | patch | blob | history |
index d5e694f3adbacd56f6896ba7cf4ad8d3cf9853f2..0de10d6b4149bfcef014c850bfa33f633385f43a 100644 (file)
/**
- * Inkscape Scripting container
+ * This is a simple mechanism to bind Inkscape to Java, and thence
+ * to all of the nice things that can be layered upon that.
*
* Authors:
- * Bob Jamison <rjamison@titan.com>
+ * Bob Jamison
*
- * Copyright (C) 2004-2008 Authors
+ * Copyright (C) 2007-2008 Bob Jamison
*
- * Released under GNU GPL, read the file 'COPYING' for more information
+ * 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 3 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
*/
parms.push_back(parm);
parm.setString(script);
parms.push_back(parm);
+
+ binder->stdOutClear();
+ binder->stdErrClear();
bool ret = binder->callStatic(Value::BIND_BOOLEAN,
- "org/inkscape/cmn/ScriptRunner",
+ "org/inkscape/cmn/ScriptRunner",
"run",
"(Ljava/lang/String;Ljava/lang/String;)Z",
parms,
retval);
+ output = binder->stdOutGet();
+ error = binder->stdErrGet();
+
if (!ret)
{
g_warning("interpretScript: failed\n");
parms.push_back(parm);
parm.setString(fname);
parms.push_back(parm);
+
+ binder->stdOutClear();
+ binder->stdErrClear();
bool ret = binder->callStatic(Value::BIND_BOOLEAN,
"org/inkscape/cmn/ScriptRunner",
"runFile",
"(Ljava/lang/String;Ljava/lang/String;)Z",
parms,
retval);
+ output = binder->stdOutGet();
+ error = binder->stdErrGet();
+
if (!ret)
{
g_warning("interpretFile: failed\n");