From 99d082a6370f28463a8a21995f1cffdf42b13bab Mon Sep 17 00:00:00 2001 From: johanengelen Date: Fri, 16 Nov 2007 19:01:44 +0000 Subject: [PATCH] fix warnings and delete gradient pixmap that will not be used --- src/file.cpp | 7 ++++- src/gc.cpp | 2 +- src/gradient-context.cpp | 1 - src/pixmaps/cursor-gradient-delete.xpm | 38 -------------------------- src/sp-animation.cpp | 12 ++++---- src/sp-flowtext.cpp | 7 ++++- 6 files changed, 19 insertions(+), 48 deletions(-) delete mode 100644 src/pixmaps/cursor-gradient-delete.xpm diff --git a/src/file.cpp b/src/file.cpp index 748a288e5..904ff9323 100644 --- a/src/file.cpp +++ b/src/file.cpp @@ -547,7 +547,12 @@ file_save(Gtk::Window &parentWindow, SPDocument *doc, const Glib::ustring &uri, * Used only for remote saving using VFS and a specific uri. Gets the file at the /tmp. */ bool -file_save_remote(SPDocument */*doc*/, const Glib::ustring &uri, +file_save_remote(SPDocument */*doc*/, + #ifdef WITH_GNOME_VFS + const Glib::ustring &uri, + #else + const Glib::ustring &/*uri*/, + #endif Inkscape::Extension::Extension */*key*/, bool /*saveas*/, bool /*official*/) { #ifdef WITH_GNOME_VFS diff --git a/src/gc.cpp b/src/gc.cpp index 8d89de26a..248a324bd 100644 --- a/src/gc.cpp +++ b/src/gc.cpp @@ -89,7 +89,7 @@ void dummy_register_finalizer(void *, CleanupFunc, void *, int dummy_general_register_disappearing_link(void **, void *) { return false; } -int dummy_unregister_disappearing_link(void **link) { return false; } +int dummy_unregister_disappearing_link(void **/*link*/) { return false; } std::size_t dummy_get_heap_size() { return 0; } diff --git a/src/gradient-context.cpp b/src/gradient-context.cpp index 5424b7a3d..df4726967 100644 --- a/src/gradient-context.cpp +++ b/src/gradient-context.cpp @@ -29,7 +29,6 @@ #include "message-stack.h" #include "pixmaps/cursor-gradient.xpm" #include "pixmaps/cursor-gradient-add.xpm" -#include "pixmaps/cursor-gradient-delete.xpm" #include "gradient-context.h" #include "gradient-chemistry.h" #include diff --git a/src/pixmaps/cursor-gradient-delete.xpm b/src/pixmaps/cursor-gradient-delete.xpm deleted file mode 100644 index 109c2815a..000000000 --- a/src/pixmaps/cursor-gradient-delete.xpm +++ /dev/null @@ -1,38 +0,0 @@ -/* XPM */ -static char const *cursor_gradient_delete_xpm[] = { -"32 32 3 1", -" c None", -". c #FFFFFF", -"+ c #000000", -" ... ", -" .+. ", -" .+. ", -"....+.... ", -".+++ +++. ", -"....+.... ", -" .+. ", -" .+. ..... ", -" ... .+++. ", -" .+.+. ", -" .+++. ", -" .+. ", -" .+. ", -" .+. ", -" .+. ", -" .+++. ", -" .+.+. ", -" .+++. ", -" ..... ", -" ", -" ", -" ", -" ", -" ", -" ", -" ............. ", -" .+++++++++++. ", -" ............. ", -" ", -" ", -" ", -" "}; diff --git a/src/sp-animation.cpp b/src/sp-animation.cpp index 8a2a02bdc..2d9f2e941 100644 --- a/src/sp-animation.cpp +++ b/src/sp-animation.cpp @@ -78,7 +78,7 @@ sp_animation_class_init(SPAnimationClass *klass) } static void -sp_animation_init(SPAnimation *animation) +sp_animation_init(SPAnimation */*animation*/) { } @@ -104,7 +104,7 @@ sp_animation_build(SPObject *object, SPDocument *document, Inkscape::XML::Node * } static void -sp_animation_release(SPObject *object) +sp_animation_release(SPObject */*object*/) { } @@ -165,7 +165,7 @@ sp_ianimation_class_init(SPIAnimationClass *klass) } static void -sp_ianimation_init(SPIAnimation *animation) +sp_ianimation_init(SPIAnimation */*animation*/) { } @@ -188,7 +188,7 @@ sp_ianimation_build(SPObject *object, SPDocument *document, Inkscape::XML::Node } static void -sp_ianimation_release(SPObject *object) +sp_ianimation_release(SPObject */*object*/) { } @@ -249,7 +249,7 @@ sp_animate_class_init(SPAnimateClass *klass) } static void -sp_animate_init(SPAnimate *animate) +sp_animate_init(SPAnimate */*animate*/) { } @@ -262,7 +262,7 @@ sp_animate_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *re } static void -sp_animate_release(SPObject *object) +sp_animate_release(SPObject */*object*/) { } diff --git a/src/sp-flowtext.cpp b/src/sp-flowtext.cpp index 87e3246f9..01df68b99 100644 --- a/src/sp-flowtext.cpp +++ b/src/sp-flowtext.cpp @@ -351,7 +351,12 @@ sp_flowtext_print(SPItem *item, SPPrintContext *ctx) NRRect pbox; sp_item_invoke_bbox(item, &pbox, NR::identity(), TRUE); NRRect bbox; - sp_item_bbox_desktop(item, &bbox); + NR::Maybe bbox_maybe = sp_item_bbox_desktop(item); + if (!bbox_maybe) { + return; + } + bbox = NRRect(*bbox_maybe); + NRRect dbox; dbox.x0 = 0.0; dbox.y0 = 0.0; -- 2.30.2