Debian Codegraph @

src/af/xap/xp/xap_Dlg_PrintPreview.cpp

raw
1 /* AbiSource Application Framework
2 * Copyright (C) 1998 AbiSource, Inc.
3 *
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License
6 * as published by the Free Software Foundation; either version 2
7 * of the License, or (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
17 * 02110-1301 USA.
18 */
19
20 #include <stdlib.h>
21 #include <stdio.h>
22 #include <string.h>
23 #include "ut_assert.h"
24 #include "ut_string.h"
25 #include "ut_debugmsg.h"
26 #include "xap_Dialog_Id.h"
27 #include "xap_Dlg_PrintPreview.h"
28 #include "xap_Frame.h"
29 #include "xap_DialogFactory.h"
30
31 XAP_Dialog_PrintPreview::XAP_Dialog_PrintPreview(XAP_DialogFactory * pDlgFactory, XAP_Dialog_Id id)
32 : XAP_Dialog_NonPersistent(pDlgFactory,id), m_szDocumentTitle(0), m_szDocumentPathname(0), m_szPaperSize(0)
33 {
34 }
35
36 XAP_Dialog_PrintPreview::~XAP_Dialog_PrintPreview(void)
37 {
38 FREEP(m_szDocumentTitle);
39 FREEP(m_szDocumentPathname);
40 FREEP(m_szPaperSize);
41 }
42
43 void XAP_Dialog_PrintPreview::setDocumentTitle(const char * szDocTitle)
44 {
45 FREEP(m_szDocumentTitle);
46 if (szDocTitle && *szDocTitle)
47 m_szDocumentTitle = g_strdup(szDocTitle);
48 }
49
50 void XAP_Dialog_PrintPreview::setDocumentPathname(const char * szDocPath)
51 {
52 FREEP(m_szDocumentPathname);
53 if (szDocPath && *szDocPath)
54 m_szDocumentPathname = g_strdup(szDocPath);
55 }
56
57 void XAP_Dialog_PrintPreview::setPaperSize(const char * szPaperSize)
58 {
59 FREEP(m_szPaperSize);
60 if (szPaperSize && *szPaperSize)
61 m_szPaperSize = g_strdup(szPaperSize);
62 }