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: docshell.hxx,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 #ifndef _SD_DOCSHELL_HXX
32 #define _SD_DOCSHELL_HXX
34 #ifndef _SFX_OBJFAC_HXX //autogen
35 #include <bf_sfx2/docfac.hxx>
37 #ifndef _SFX_INTERNO_HXX //autogen
38 #include <bf_sfx2/interno.hxx>
40 #ifndef _SFX_OBJSH_HXX //autogen
41 #include <bf_sfx2/objsh.hxx>
43 #include <sot/factory.hxx>
44 #include <bf_so3/factory.hxx>
52 #ifndef _PRESENTATION_HXX
59 class SfxStyleSheetBasePool
;
61 #ifndef SO2_DECL_SVSTORAGESTREAM_DEFINED
62 #define SO2_DECL_SVSTORAGESTREAM_DEFINED
63 SO2_DECL_REF(SvStorageStream
)
66 class SfxStatusBarManager
;
67 class SdStyleSheetPool
;
74 struct SdrDocumentStreamInfo
;
75 struct SpellCallbackInfo
;
82 class SdDrawDocShell
: public SfxObjectShell
, public SfxInPlaceObject
86 SfxProgress
* pProgress
;
89 DocumentType eDocType
;
91 const USHORT
* pFilterSIDs
;
103 void UpdateRefDevice();
104 virtual void Deactivate( BOOL bMDI
);
105 virtual BOOL
InitNew( SvStorage
* );
106 virtual BOOL
Load( SvStorage
* );
107 virtual void HandsOff();
109 virtual BOOL
SaveAs( SvStorage
* pNewStor
);
110 virtual BOOL
SaveAsOwnFormat( SfxMedium
& rMedium
);
111 virtual BOOL
SaveCompleted( SvStorage
* pNewStor
);
112 virtual void SetVisArea(const Rectangle
& rRect
);
113 virtual Rectangle
GetVisArea(USHORT nAspect
) const;
114 virtual Printer
* GetDocumentPrinter();
115 virtual SfxStyleSheetBasePool
* GetStyleSheetPool();
116 virtual void FillClass(SvGlobalName
* pClassName
, ULONG
* pFormat
, String
* pAppName
, String
* pFullTypeName
, String
* pShortTypeName
, long nFileFormat
= SOFFICE_FILEFORMAT_CURRENT
) const;
117 virtual void SetModified( BOOL
= TRUE
);
119 static SfxPrinter
* CreatePrinter( SvStream
& rIn
, SdDrawDocument
& rDoc
);
123 SFX_DECL_OBJECTFACTORY_DLL(SdDrawDocShell
, SD_MOD());
125 SdDrawDocShell(SfxObjectCreateMode eMode
= SFX_CREATE_MODE_EMBEDDED
, BOOL bSdDataObj
=FALSE
, DocumentType
=DOCUMENT_TYPE_IMPRESS
);
126 SdDrawDocShell(SdDrawDocument
* pDoc
, SfxObjectCreateMode eMode
= SFX_CREATE_MODE_EMBEDDED
, BOOL bSdDataObj
=FALSE
, DocumentType
=DOCUMENT_TYPE_IMPRESS
);
129 SdDrawDocument
* GetDoc();
130 DocumentType
GetDocumentType() const { return eDocType
; }
132 SfxPrinter
* GetPrinter(BOOL bCreate
);
133 void SetPrinter(SfxPrinter
*pNewPrinter
);
135 BOOL
IsUIActive() { return bUIActive
; }
136 BOOL
IsInDestruction() const { return bInDestruction
; }
139 void UpdateTablePointers();
141 void SetSlotFilter(BOOL bEnable
= FALSE
, USHORT nCount
= 0, const USHORT
* pSIDs
= NULL
) { bFilterEnable
= bEnable
; nFilterCount
= nCount
; pFilterSIDs
= pSIDs
; }
143 UINT16
GetStyleFamily() const { return nStyleFamily
; }
144 void SetStyleFamily( UINT16 nSF
) { nStyleFamily
= nSF
; }
146 bool IsNewPageNameValid( String
& rInOutPageName
, bool bResetStringIfStandardName
= false );
148 virtual OutputDevice
* GetDocumentRefDev (void);
150 DECL_LINK( RenameSlideHdl
, SvxNameDialog
* );
154 #ifndef SV_DECL_SDDRAWDOCSHELL_DEFINED
155 #define SV_DECL_SDDRAWDOCSHELL_DEFINED
156 SV_DECL_REF(SdDrawDocShell
)
159 SV_IMPL_REF (SdDrawDocShell
)
161 } //namespace binfilter
162 #endif // _SD_DOCSHELL_HXX