From 6864a204fac56a032f9187b482b4de6c64f06cef Mon Sep 17 00:00:00 2001 From: joncruz Date: Thu, 26 Jun 2008 01:40:35 +0000 Subject: [PATCH] Fixed compilation when the new SVG font stuff is not enabled. --- src/display/nr-arena-glyphs.cpp | 2 ++ src/display/nr-svgfonts.h | 11 ++++------- src/sp-font.cpp | 1 - src/sp-font.h | 10 ++++------ src/ui/dialog/dialog-manager.cpp | 2 ++ src/ui/dialog/svg-fonts-dialog.h | 2 +- 6 files changed, 13 insertions(+), 15 deletions(-) diff --git a/src/display/nr-arena-glyphs.cpp b/src/display/nr-arena-glyphs.cpp index 63af4787a..7ca6d9aa1 100644 --- a/src/display/nr-arena-glyphs.cpp +++ b/src/display/nr-arena-glyphs.cpp @@ -37,7 +37,9 @@ void nr_pixblock_render_shape_mask_or(NRPixBlock &m, Shape *theS); #endif +#ifdef ENABLE_SVG_FONTS #include "nr-svgfonts.h" +#endif //#ifdef ENABLE_SVG_FONTS static void nr_arena_glyphs_class_init(NRArenaGlyphsClass *klass); static void nr_arena_glyphs_init(NRArenaGlyphs *glyphs); diff --git a/src/display/nr-svgfonts.h b/src/display/nr-svgfonts.h index fc4a2b94e..58840e414 100644 --- a/src/display/nr-svgfonts.h +++ b/src/display/nr-svgfonts.h @@ -1,7 +1,6 @@ #include "config.h" -#ifdef ENABLE_SVG_FONTS -#ifndef __SVGFONTS_H__ -#define __SVGFONTS_H__ +#ifndef NR_SVGFONTS_H_SEEN +#define NR_SVGFONTS_H_SEEN /* * SVGFonts rendering headear * @@ -14,7 +13,6 @@ * Read the file 'COPYING' for more information. */ -#include "../sp-font.h" #include "cairo.h" #include @@ -29,6 +27,7 @@ #include "../sp-glyph-kerning.h" class SvgFont; +struct SPFont; class UserFont{ public: @@ -53,6 +52,4 @@ SPMissingGlyph* missingglyph; bool drawing_expose_cb (Gtk::Widget *widget, GdkEventExpose *event, gpointer data); }; -#endif //#ifndef __SVGFONTS_H__ -#endif //#ifdef ENABLE_SVG_FONTS - +#endif //#ifndef NR_SVGFONTS_H_SEEN diff --git a/src/sp-font.cpp b/src/sp-font.cpp index 8667af4cb..c99d5a1b6 100644 --- a/src/sp-font.cpp +++ b/src/sp-font.cpp @@ -3,7 +3,6 @@ #endif #ifdef ENABLE_SVG_FONTS -#define __SP_FONT_C__ /* * SVG element implementation diff --git a/src/sp-font.h b/src/sp-font.h index 7f54e21a0..fad7ead42 100644 --- a/src/sp-font.h +++ b/src/sp-font.h @@ -2,9 +2,8 @@ # include #endif -#ifdef ENABLE_SVG_FONTS -#ifndef __SP_FONT_H__ -#define __SP_FONT_H__ +#ifndef SP_FONT_H_SEEN +#define SP_FONT_H_SEEN /* * SVG element implementation @@ -35,10 +34,9 @@ struct SPFont : public SPObject { }; struct SPFontClass { - SPObjectClass parent_class; + SPObjectClass parent_class; }; GType sp_font_get_type (void); -#endif //#ifndef __SP_FONT_H__ -#endif //#ifdef ENABLE_SVG_FONTS +#endif //#ifndef SP_FONT_H_SEEN diff --git a/src/ui/dialog/dialog-manager.cpp b/src/ui/dialog/dialog-manager.cpp index a2b839607..0005de147 100644 --- a/src/ui/dialog/dialog-manager.cpp +++ b/src/ui/dialog/dialog-manager.cpp @@ -33,7 +33,9 @@ #include "ui/dialog/memory.h" #include "ui/dialog/messages.h" #include "ui/dialog/scriptdialog.h" +#ifdef ENABLE_SVG_FONTS #include "ui/dialog/svg-fonts-dialog.h" +#endif // ENABLE_SVG_FONTS #include "ui/dialog/text-properties.h" #include "ui/dialog/tracedialog.h" #include "ui/dialog/transformation.h" diff --git a/src/ui/dialog/svg-fonts-dialog.h b/src/ui/dialog/svg-fonts-dialog.h index 5b5f5c02f..415aa8f7e 100644 --- a/src/ui/dialog/svg-fonts-dialog.h +++ b/src/ui/dialog/svg-fonts-dialog.h @@ -24,7 +24,7 @@ #include #include -using namespace Inkscape::UI::Widget; +struct SPFont; namespace Inkscape { namespace UI { -- 2.30.2