return TRUE;
}
}
+
+gboolean
+solipa_ooo_salva_documento (SolipaOOO *ooo,
+ const gchar *filename)
+{
+ PyObject *obj;
+
+ gchar *_filename;
+
+ SolipaOOOPrivate *priv = SOLIPA_OOO_GET_PRIVATE (ooo);
+
+ _filename = NULL;
+ if (filename != NULL)
+ {
+ _filename = g_strdup (filename);
+ g_strstrip (_filename);
+ }
+
+ if (_filename == NULL
+ || g_strcmp0 (_filename, "") == 0)
+ {
+ PyRun_SimpleString ("document.store()\n");
+ }
+ else
+ {
+ PyRun_SimpleString (g_strdup_printf ("document.storeAsURL(\"file://%s\", ())\n", _filename));
+ }
+
+ /* TODO capire se il documento รจ stato salvato o meno */
+
+ return TRUE;
+}
+
gboolean solipa_ooo_apri_documento (SolipaOOO *ooo,
const gchar *filename);
+
void solipa_ooo_string_replace (SolipaOOO *ooo,
const gchar *search,
const gchar *replace);
+gboolean solipa_ooo_salva_documento (SolipaOOO *ooo,
+ const gchar *filename);
+
G_END_DECLS
solipa_ooo_string_replace (ooo, "{prg::replace}", "\"blah blah blah\"");
+ if (argc == 3)
+ {
+ solipa_ooo_salva_documento (ooo, argv[2]);
+ }
+
gtk_main ();
return 0;