X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Foutput%2Fodt.c;h=686e7149c3b68b34002308e1147c3ebbd08eb756;hb=cac613dc3a5562bc92b2b6679a5d646e3e5f2e3e;hp=721e7c87d9766dec20761e7100aba0ca6b24ea5b;hpb=a258e53c63a08b0ec48aea8f03808eb651729424;p=pspp diff --git a/src/output/odt.c b/src/output/odt.c index 721e7c87d9..686e7149c3 100644 --- a/src/output/odt.c +++ b/src/output/odt.c @@ -1,5 +1,5 @@ /* PSPP - a program for statistical analysis. - Copyright (C) 2009, 2010 Free Software Foundation, Inc. + Copyright (C) 2009, 2010, 2011 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 @@ -380,6 +380,7 @@ odt_destroy (struct output_driver *driver) zip_writer_close (odt->zip); } + free (odt->file_name); free (odt->command_name); free (odt); } @@ -501,8 +502,10 @@ odt_submit (struct output_driver *driver, odt_submit_table (odt, to_table_item (output_item)); else if (is_text_item (output_item)) { - /* XXX apply different styles based on text_item's type. */ - odt_output_text (odt, text_item_get_text (to_text_item (output_item))); + struct text_item *text_item = to_text_item (output_item); + + if (text_item_get_type (text_item) != TEXT_ITEM_COMMAND_CLOSE) + odt_output_text (odt, text_item_get_text (text_item)); } else if (is_message_item (output_item)) {