Code

C++fied SPDocument added
[inkscape.git] / src / extension / internal / cairo-ps-out.cpp
index 6f22dbdc71d00b0569ff508b9e2faa4168593296..76b68bf2c0ffb92a9e5d1c2ee4738cd23b0a29a9 100644 (file)
@@ -65,7 +65,7 @@ static bool
 ps_print_document_to_file(SPDocument *doc, gchar const *filename, unsigned int level, bool texttopath, bool omittext,
                           bool filtertobitmap, int resolution, const gchar * const exportId, bool exportDrawing, bool exportCanvas, bool eps = false)
 {
-    sp_document_ensure_up_to_date(doc);
+    doc->ensure_up_to_date();
 
     SPItem *base = NULL;
 
@@ -86,8 +86,8 @@ ps_print_document_to_file(SPDocument *doc, gchar const *filename, unsigned int l
 
     /* Create new arena */
     NRArena *arena = NRArena::create();
-    unsigned dkey = sp_item_display_key_new(1);
-    sp_item_invoke_show(base, arena, dkey, SP_ITEM_SHOW_DISPLAY);
+    unsigned dkey = SPItem::display_key_new(1);
+    base->invoke_show(arena, dkey, SP_ITEM_SHOW_DISPLAY);
 
     /* Create renderer and context */
     CairoRenderer *renderer = new CairoRenderer();
@@ -110,7 +110,7 @@ ps_print_document_to_file(SPDocument *doc, gchar const *filename, unsigned int l
     }
 
     /* Release arena */
-    sp_item_invoke_hide(base, dkey);
+    base->invoke_hide(dkey);
     nr_object_unref((NRObject *) arena);
 
     renderer->destroyContext(ctx);
@@ -199,7 +199,7 @@ CairoPsOutput::save(Inkscape::Extension::Output *mod, SPDocument *doc, gchar con
         //strip filename of ".ps", do not add ".tex" here.
         gsize n = g_str_has_suffix(filename, ".ps") ? strlen(filename)-3 : strlen(filename);
         tex_filename = g_strndup(filename, n);
-        ret = latex_render_document_text_to_file(doc, tex_filename, new_exportId, new_areaDrawing, new_areaPage);
+        ret = latex_render_document_text_to_file(doc, tex_filename, new_exportId, new_areaDrawing, new_areaPage, false);
         g_free(tex_filename);
 
         if (!ret)
@@ -287,7 +287,7 @@ CairoEpsOutput::save(Inkscape::Extension::Output *mod, SPDocument *doc, gchar co
         //strip filename of ".eps", do not add ".tex" here.
         gsize n = g_str_has_suffix(filename, ".eps") ? strlen(filename)-4 : strlen(filename);
         tex_filename = g_strndup(filename, n);
-        ret = latex_render_document_text_to_file(doc, tex_filename, new_exportId, new_areaDrawing, new_areaPage);
+        ret = latex_render_document_text_to_file(doc, tex_filename, new_exportId, new_areaDrawing, new_areaPage, false);
         g_free(tex_filename);
 
         if (!ret)