1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: viewfac.cxx,v $
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_sfx2.hxx"
33 // INCLUDE ---------------------------------------------------------------
38 #include <sfx2/app.hxx>
39 #include "viewfac.hxx"
41 // STATIC DATA -----------------------------------------------------------
43 DBG_NAME(SfxViewFactory
)
45 SfxViewShell
*SfxViewFactory::CreateInstance(SfxViewFrame
*pFrame
, SfxViewShell
*pOldSh
)
47 DBG_CHKTHIS(SfxViewFactory
, 0);
48 return (*fnCreate
)(pFrame
, pOldSh
);
51 void SfxViewFactory::InitFactory()
53 DBG_CHKTHIS(SfxViewFactory
, 0);
57 // CTOR / DTOR -----------------------------------------------------------
59 SfxViewFactory::SfxViewFactory( SfxViewCtor fnC
, SfxViewInit fnI
,
60 USHORT nOrdinal
, const ResId
& aDescrResId
):
64 aDescription(aDescrResId
.GetId(), *aDescrResId
.GetResMgr())
66 aDescription
.SetRT(aDescrResId
.GetRT());
67 DBG_CTOR(SfxViewFactory
, 0);
68 // SFX_APP()->RegisterViewFactory_Impl(*this);
71 SfxViewFactory::~SfxViewFactory()
73 DBG_DTOR(SfxViewFactory
, 0);