1*31598a22SAndrew Rist /**************************************************************
2cdf0e10cSrcweir *
3*31598a22SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one
4*31598a22SAndrew Rist * or more contributor license agreements. See the NOTICE file
5*31598a22SAndrew Rist * distributed with this work for additional information
6*31598a22SAndrew Rist * regarding copyright ownership. The ASF licenses this file
7*31598a22SAndrew Rist * to you under the Apache License, Version 2.0 (the
8*31598a22SAndrew Rist * "License"); you may not use this file except in compliance
9*31598a22SAndrew Rist * with the License. You may obtain a copy of the License at
10*31598a22SAndrew Rist *
11*31598a22SAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0
12*31598a22SAndrew Rist *
13*31598a22SAndrew Rist * Unless required by applicable law or agreed to in writing,
14*31598a22SAndrew Rist * software distributed under the License is distributed on an
15*31598a22SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*31598a22SAndrew Rist * KIND, either express or implied. See the License for the
17*31598a22SAndrew Rist * specific language governing permissions and limitations
18*31598a22SAndrew Rist * under the License.
19*31598a22SAndrew Rist *
20*31598a22SAndrew Rist *************************************************************/
21*31598a22SAndrew Rist
22*31598a22SAndrew Rist
23cdf0e10cSrcweir
24cdf0e10cSrcweir // MARKER(update_precomp.py): autogen include statement, do not remove
25cdf0e10cSrcweir #include "precompiled_basctl.hxx"
26cdf0e10cSrcweir
27cdf0e10cSrcweir
28cdf0e10cSrcweir #include <ide_pch.hxx>
29cdf0e10cSrcweir #include <svx/svxids.hrc>
30cdf0e10cSrcweir
31cdf0e10cSrcweir #define GLOBALOVERFLOW2
32cdf0e10cSrcweir
33cdf0e10cSrcweir #include <sfx2/docfac.hxx>
34cdf0e10cSrcweir #include <sfx2/sfxmodelfactory.hxx>
35cdf0e10cSrcweir #include <vcl/status.hxx>
36cdf0e10cSrcweir
37cdf0e10cSrcweir #include <svx/xmlsecctrl.hxx>
38cdf0e10cSrcweir
39cdf0e10cSrcweir #include <basdoc.hxx>
40cdf0e10cSrcweir
41cdf0e10cSrcweir #define BasicDocShell
42cdf0e10cSrcweir #include <basslots.hxx>
43cdf0e10cSrcweir
44cdf0e10cSrcweir #include "basicmod.hxx"
45cdf0e10cSrcweir #include "unomodel.hxx"
46cdf0e10cSrcweir
47cdf0e10cSrcweir TYPEINIT1(BasicDocShell, SfxObjectShell);
48cdf0e10cSrcweir DBG_NAME(BasicDocShell);
49cdf0e10cSrcweir
50cdf0e10cSrcweir SFX_IMPL_OBJECTFACTORY( BasicDocShell, SvGlobalName(), SFXOBJECTSHELL_STD_NORMAL, "sbasic" )
51cdf0e10cSrcweir
52cdf0e10cSrcweir SFX_IMPL_INTERFACE( BasicDocShell, SfxObjectShell, IDEResId( 0 ) )
53cdf0e10cSrcweir {
54cdf0e10cSrcweir SFX_STATUSBAR_REGISTRATION( IDEResId( SID_BASICIDE_STATUSBAR ) );
55cdf0e10cSrcweir }
56cdf0e10cSrcweir
BasicDocShell()57cdf0e10cSrcweir BasicDocShell::BasicDocShell()
58cdf0e10cSrcweir :SfxObjectShell( SFXMODEL_DISABLE_EMBEDDED_SCRIPTS | SFXMODEL_DISABLE_DOCUMENT_RECOVERY )
59cdf0e10cSrcweir {
60cdf0e10cSrcweir pPrinter = 0;
61cdf0e10cSrcweir SetPool( &SFX_APP()->GetPool() );
62cdf0e10cSrcweir SetBaseModel( new SIDEModel(this) );
63cdf0e10cSrcweir }
64cdf0e10cSrcweir
~BasicDocShell()65cdf0e10cSrcweir __EXPORT BasicDocShell::~BasicDocShell()
66cdf0e10cSrcweir {
67cdf0e10cSrcweir delete pPrinter;
68cdf0e10cSrcweir }
69cdf0e10cSrcweir
GetPrinter(sal_Bool bCreate)70cdf0e10cSrcweir SfxPrinter* BasicDocShell::GetPrinter( sal_Bool bCreate )
71cdf0e10cSrcweir {
72cdf0e10cSrcweir if ( !pPrinter && bCreate )
73cdf0e10cSrcweir pPrinter = new SfxPrinter( new SfxItemSet( GetPool(), SID_PRINTER_NOTFOUND_WARN , SID_PRINTER_NOTFOUND_WARN ) );
74cdf0e10cSrcweir
75cdf0e10cSrcweir return pPrinter;
76cdf0e10cSrcweir }
77cdf0e10cSrcweir
SetPrinter(SfxPrinter * pPr)78cdf0e10cSrcweir void BasicDocShell::SetPrinter( SfxPrinter* pPr )
79cdf0e10cSrcweir {
80cdf0e10cSrcweir if ( pPr != pPrinter )
81cdf0e10cSrcweir {
82cdf0e10cSrcweir delete pPrinter;
83cdf0e10cSrcweir pPrinter = pPr;
84cdf0e10cSrcweir }
85cdf0e10cSrcweir }
86cdf0e10cSrcweir
FillClass(SvGlobalName *,sal_uInt32 *,String *,String *,String *,sal_Int32,sal_Bool bTemplate) const87cdf0e10cSrcweir void BasicDocShell::FillClass( SvGlobalName*, sal_uInt32*, String*, String*, String*, sal_Int32, sal_Bool bTemplate) const
88cdf0e10cSrcweir {
89cdf0e10cSrcweir (void)bTemplate;
90cdf0e10cSrcweir DBG_ASSERT( bTemplate == sal_False, "No template for Basic" );
91cdf0e10cSrcweir }
92cdf0e10cSrcweir
Draw(OutputDevice *,const JobSetup &,sal_uInt16)93cdf0e10cSrcweir void BasicDocShell::Draw( OutputDevice *, const JobSetup &, sal_uInt16 )
94cdf0e10cSrcweir {}
95cdf0e10cSrcweir
96