Code

Added code to initialize DBus (if enabled.)
[inkscape.git] / src / extension / internal / emf-win32-inout.cpp
index 8dd793f9238063e93af01d04183c3ffb41362f11..f400a36497008c5da1080c66f3c81cd6f5e13b21 100644 (file)
@@ -1,15 +1,13 @@
-/** \file
- * Enhanced Metafile Input and Output.
+/** @file
+ * @brief Windows-only Enhanced Metafile input and output.
  */
-/*
- * Authors:
+/* Authors:
  *   Ulf Erikson <ulferikson@users.sf.net>
  *
  * Copyright (C) 2006-2008 Authors
  *
  * Released under GNU GPL, read the file 'COPYING' for more information
- */
-/*
+ *
  * References:
  *  - How to Create & Play Enhanced Metafiles in Win32
  *      http://support.microsoft.com/kb/q145999/
@@ -116,7 +114,7 @@ emf_print_document_to_file(SPDocument *doc, gchar const *filename)
     mod = Inkscape::Extension::get_print(PRINT_EMF_WIN32);
     oldconst = mod->get_param_string("destination");
     oldoutput = g_strdup(oldconst);
-    mod->set_param_string("destination", (gchar *)filename);
+    mod->set_param_string("destination", filename);
 
 /* Start */
     context.module = mod;
@@ -149,7 +147,7 @@ emf_print_document_to_file(SPDocument *doc, gchar const *filename)
 
 
 void
-EmfWin32::save (Inkscape::Extension::Output *mod, SPDocument *doc, const gchar *uri)
+EmfWin32::save(Inkscape::Extension::Output *mod, SPDocument *doc, gchar const *filename)
 {
     Inkscape::Extension::Extension * ext;
 
@@ -161,10 +159,7 @@ EmfWin32::save (Inkscape::Extension::Output *mod, SPDocument *doc, const gchar *
     bool new_val         = mod->get_param_bool("textToPath");
     ext->set_param_bool("textToPath", new_val);
 
-    gchar * final_name;
-    final_name = g_strdup_printf("%s", uri);
-    emf_print_document_to_file(doc, final_name);
-    g_free(final_name);
+    emf_print_document_to_file(doc, filename);
 
     ext->set_param_bool("textToPath", old_textToPath);
 
@@ -2447,17 +2442,14 @@ EmfWin32::init (void)
 
 } } }  /* namespace Inkscape, Extension, Implementation */
 
-
 #endif /* WIN32 */
-
-
 /*
   Local Variables:
-  mode:cpp
+  mode:c++
   c-file-style:"stroustrup"
-  c-file-offsets:((innamespace . 0)(inline-open . 0))
+  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 :
+// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :