diff options
Diffstat (limited to 'sw/source/filter/basflt/docfact.cxx')
-rw-r--r-- | sw/source/filter/basflt/docfact.cxx | 88 |
1 files changed, 88 insertions, 0 deletions
diff --git a/sw/source/filter/basflt/docfact.cxx b/sw/source/filter/basflt/docfact.cxx new file mode 100644 index 000000000000..8bb0470612d6 --- /dev/null +++ b/sw/source/filter/basflt/docfact.cxx @@ -0,0 +1,88 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: docfact.cxx,v $ + * $Revision: 1.9 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +// MARKER(update_precomp.py): autogen include statement, do not remove +#include "precompiled_sw.hxx" +#include <tools/ref.hxx> +#include <shellio.hxx> +#include <doc.hxx> +#include <node.hxx> + +#ifndef _CMDID_H +#include <cmdid.h> +#endif + + +/****************************************************************************** + * Methode : SwDocFac::SwDocFac( SwDoc *pDoc ) + * Beschreibung: + * Erstellt : OK 01-24-94 11:32am + * Aenderung : OK 01-24-94 11:32am + ******************************************************************************/ + + +SwDocFac::SwDocFac( SwDoc *pDc ) + : pDoc( pDc ) +{ + if( pDoc ) + pDoc->acquire(); +} + +/****************************************************************************** + * Methode : SwDocFac::~SwDocFac() + * Beschreibung: + * Erstellt : OK 01-24-94 11:33am + * Aenderung : OK 01-24-94 11:33am + ******************************************************************************/ + + +SwDocFac::~SwDocFac() +{ + if( pDoc && !pDoc->release() ) + delete pDoc; +} + +/****************************************************************************** + * Methode : SwDoc *SwDocFac::GetDoc() + * Beschreibung: Diese Methode legt immer einen Drucker an. + * Erstellt : OK 01-24-94 11:34am + * Aenderung : OK 01-24-94 11:34am + ******************************************************************************/ + + +SwDoc *SwDocFac::GetDoc() +{ + if( !pDoc ) + { + pDoc = new SwDoc; + pDoc->acquire(); + } + return pDoc; +} |