Code

sodipodi:docbase finally goes packing, along with a lauris comment
[inkscape.git] / src / libnrtype / font-lister.h
index 05511198c09da57969ce1b9f35c094bed72e0c92..fb0810254e4617cd08bc5c25ebd297971620257a 100644 (file)
@@ -16,6 +16,8 @@
 
 #include <glibmm.h>
 #include <gtkmm.h>
+#include "nrtype-forward.h"
+#include "nr-type-primitives.h"
 
 namespace Inkscape
 {
@@ -26,6 +28,13 @@ namespace Inkscape
                 class FontLister
                 {
                     public:
+
+                        enum Exceptions
+                        {
+                            FAMILY_NOT_FOUND
+                        };
+
+
                         ~FontLister ();
 
                         /** GtkTreeModelColumnRecord for the font list Gtk::ListStore
@@ -73,6 +82,7 @@ namespace Inkscape
                         get_row_for_font (std::string family)
                         {
                             IterMapType::iterator iter = font_list_store_iter_map.find (family);
+                            if (iter == font_list_store_iter_map.end ()) throw FAMILY_NOT_FOUND; 
                             return (*iter).second;
                         }