Update ooo320-m1
[ooovba.git] / binfilter / inc / bf_sd / docshell.hxx
blobca71ef179fc977a7c9a939e2fadbf305961e6f8f
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: docshell.hxx,v $
10 * $Revision: 1.3 $
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>
36 #endif
37 #ifndef _SFX_INTERNO_HXX //autogen
38 #include <bf_sfx2/interno.hxx>
39 #endif
40 #ifndef _SFX_OBJSH_HXX //autogen
41 #include <bf_sfx2/objsh.hxx>
42 #endif
43 #include <sot/factory.hxx>
44 #include <bf_so3/factory.hxx>
46 #ifndef _SD_GLOB_HXX
47 #include "glob.hxx"
48 #endif
49 #ifndef _SDMOD_HXX
50 #include "sdmod.hxx"
51 #endif
52 #ifndef _PRESENTATION_HXX
53 #include "pres.hxx"
54 #endif
55 class SvStream;
57 namespace binfilter {
58 class FontList;
59 class SfxStyleSheetBasePool;
61 #ifndef SO2_DECL_SVSTORAGESTREAM_DEFINED
62 #define SO2_DECL_SVSTORAGESTREAM_DEFINED
63 SO2_DECL_REF(SvStorageStream)
64 #endif
66 class SfxStatusBarManager;
67 class SdStyleSheetPool;
68 class FrameView;
69 class SdDrawDocument;
70 class SdView;
71 class FuPoor;
72 class SdPage;
73 class SfxPrinter;
74 struct SdrDocumentStreamInfo;
75 struct SpellCallbackInfo;
76 class SvxNameDialog;
78 // ------------------
79 // - SdDrawDocShell -
80 // ------------------
82 class SdDrawDocShell : public SfxObjectShell, public SfxInPlaceObject
84 protected:
86 SfxProgress* pProgress;
87 SdDrawDocument* pDoc;
88 SfxPrinter* pPrinter;
89 DocumentType eDocType;
90 UINT16 nStyleFamily;
91 const USHORT* pFilterSIDs;
92 USHORT nFilterCount;
93 BOOL bFilterEnable;
94 BOOL bUIActive;
95 BOOL bSdDataObj;
96 BOOL bInDestruction;
97 BOOL bOwnPrinter;
98 BOOL mbNewDocument;
100 void Construct();
102 public:
103 void UpdateRefDevice();
104 virtual void Deactivate( BOOL bMDI );
105 virtual BOOL InitNew( SvStorage * );
106 virtual BOOL Load( SvStorage * );
107 virtual void HandsOff();
108 virtual BOOL Save();
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 );
120 public:
122 TYPEINFO();
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);
127 ~SdDrawDocShell();
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)
157 #endif
159 SV_IMPL_REF (SdDrawDocShell)
161 } //namespace binfilter
162 #endif // _SD_DOCSHELL_HXX