1 /* AbiSource
2 *
3 * Copyright (C) 2002 Dom Lachowicz <cinamod@hotmail.com>
4 * Copyright (C) 2004 Robert Staudinger <robsta@stereolyzer.net>
5 *
6 * Copyright (C) 2005 INdT
7 * Author: Daniel d'Andrada T. de Carvalho <daniel.carvalho@indt.org.br>
8 *
9 * This program is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU General Public License
11 * as published by the Free Software Foundation; either version 2
12 * of the License, or (at your option) any later version.
13 *
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
22 * 02110-1301 USA.
23 */
24
25 // Class definition include
26 #include "ODe_SettingsWriter.h"
27
28 // Internal includes
29 #include "ODe_Common.h"
30
31 // Abiword includes
32 #include <ut_types.h>
33
34
writeSettings(PD_Document *,GsfOutfile * oo)35 bool ODe_SettingsWriter::writeSettings(PD_Document* /*pDoc*/, GsfOutfile* oo)
36 {
37 GsfOutput* pSettings = gsf_outfile_new_child (oo, "settings.xml", FALSE);
38
39 static const char * const contents [] =
40 {
41 "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n",
42 "<office:document-settings"
43 " xmlns:office=\"urn:oasis:names:tc:opendocument:xmlns:office:1.0\""
44 " xmlns:xlink=\"http://www.w3.org/1999/xlink\""
45 " xmlns:config=\"urn:oasis:names:tc:opendocument:xmlns:config:1.0\""
46 " xmlns:ooo=\"http://openoffice.org/2004/office\" office:version=\"1.1\">\n",
47 "</office:document-settings>"
48 };
49
50 ODe_writeToStream (pSettings, contents, G_N_ELEMENTS(contents));
51
52 ODe_gsf_output_close(pSettings);
53
54 return true;
55 }
56