merge the formfield patch from ooo-build
[ooovba.git] / sw / source / filter / basflt / docfact.cxx
blob3d30752acdfecd8793e72a5f83018269cd2aeca9
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: docfact.cxx,v $
10 * $Revision: 1.9 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 // MARKER(update_precomp.py): autogen include statement, do not remove
32 #include "precompiled_sw.hxx"
33 #include <tools/ref.hxx>
34 #include <shellio.hxx>
35 #include <doc.hxx>
36 #include <node.hxx>
38 #ifndef _CMDID_H
39 #include <cmdid.h>
40 #endif
43 /******************************************************************************
44 * Methode : SwDocFac::SwDocFac( SwDoc *pDoc )
45 * Beschreibung:
46 * Erstellt : OK 01-24-94 11:32am
47 * Aenderung : OK 01-24-94 11:32am
48 ******************************************************************************/
51 SwDocFac::SwDocFac( SwDoc *pDc )
52 : pDoc( pDc )
54 if( pDoc )
55 pDoc->acquire();
58 /******************************************************************************
59 * Methode : SwDocFac::~SwDocFac()
60 * Beschreibung:
61 * Erstellt : OK 01-24-94 11:33am
62 * Aenderung : OK 01-24-94 11:33am
63 ******************************************************************************/
66 SwDocFac::~SwDocFac()
68 if( pDoc && !pDoc->release() )
69 delete pDoc;
72 /******************************************************************************
73 * Methode : SwDoc *SwDocFac::GetDoc()
74 * Beschreibung: Diese Methode legt immer einen Drucker an.
75 * Erstellt : OK 01-24-94 11:34am
76 * Aenderung : OK 01-24-94 11:34am
77 ******************************************************************************/
80 SwDoc *SwDocFac::GetDoc()
82 if( !pDoc )
84 pDoc = new SwDoc;
85 pDoc->acquire();
87 return pDoc;