cairo: Support scaling tables to fit page width and page length.
[pspp] / src / output / message-item.c
index feb1d32c02eed54e13cb66eba6c869c429447f2b..c60d166779969f8428b1a568a58a0224699b5e7a 100644 (file)
@@ -1,5 +1,5 @@
 /* PSPP - a program for statistical analysis.
-   Copyright (C) 2010 Free Sonftware Foundation, Inc.
+   Copyright (C) 2010 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -23,6 +23,7 @@
 #include "libpspp/message.h"
 #include "output/driver.h"
 #include "output/output-item-provider.h"
+#include "output/text-item.h"
 
 #include "gl/xalloc.h"
 
@@ -44,6 +45,13 @@ message_item_get_msg (const struct message_item *item)
   return item->msg;
 }
 
+struct text_item *
+message_item_to_text_item (struct message_item *message_item)
+{
+  return text_item_create_nocopy (
+    TEXT_ITEM_LOG, msg_to_string (message_item_get_msg (message_item)));
+}
+
 static void
 message_item_destroy (struct output_item *output_item)
 {
@@ -62,5 +70,6 @@ message_item_submit (struct message_item *item)
 
 const struct output_item_class message_item_class =
   {
+    "message",
     message_item_destroy,
   };