sync master with lastest vba changes
[ooovba.git] / binfilter / inc / bf_sch / docshell.hxx
blob688183ed560b81dee52d7bd9faaf3fca372556a4
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.8 $
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 _SCH_DOCSHELL_HXX
32 #define _SCH_DOCSHELL_HXX
34 #ifndef _SCHDLL0_HXX //autogen
35 #include "schdll0.hxx"
36 #endif
38 #ifndef _SFX_OBJFAC_HXX //autogen
39 #include <bf_sfx2/docfac.hxx>
40 #endif
42 #ifndef _SFX_SHELL_HXX //autogen
43 #include <bf_sfx2/shell.hxx>
44 #endif
46 #ifndef _SVX_FLSTITEM_HXX //autogen
47 #include <bf_svx/flstitem.hxx>
48 #endif
50 #ifndef _SFX_OBJSH_HXX //autogen
51 #include <bf_sfx2/objsh.hxx>
52 #endif
53 #ifndef _SFX_INTERNO_HXX //autogen
54 #include <bf_sfx2/interno.hxx>
55 #endif
56 #ifndef _SCHDLL0_HXX //autogen
57 #include <schdll0.hxx>
58 #endif
59 #ifndef _SFXREQUEST_HXX //autogen
60 #include <bf_sfx2/request.hxx>
61 #endif
63 #ifndef _SVSTOR_HXX //autogen
64 #include <bf_so3/svstor.hxx>
65 #endif
67 #ifndef _CHTMODEL_HXX
68 #include "chtmodel.hxx"
69 #endif
71 #ifndef _SFXDOCFILE_HXX //autogen
72 #include <bf_sfx2/docfile.hxx>
73 #endif
75 #include "glob.hxx"
77 #ifndef _COM_SUN_STAR_CHART_CHARTDATACHANGEEVENT_HPP_
78 #include <com/sun/star/chart/ChartDataChangeEvent.hpp>
79 #endif
80 namespace binfilter {
82 #ifndef SO2_DECL_SVSTORAGESTREAM_DEFINED
83 #define SO2_DECL_SVSTORAGESTREAM_DEFINED
84 SO2_DECL_REF(SvStorageStream)
85 #endif
87 class FontList;
88 class SfxUndoManager;
89 class SfxStyleSheetBasePool;
90 class SdStyleSheetPool;
91 class SfxProgress;
92 class SfxPrinter;
93 class SfxMenuBarManager;
95 /*************************************************************************
97 |* Document-Shell fuer Draw-Dokumente
99 \************************************************************************/
101 class SchChartDocShell: public SfxObjectShell, public SfxInPlaceObject
103 private:
104 ChartModel* pChDoc;
105 SfxUndoManager* pUndoManager;
106 SfxPrinter* pPrinter;
107 FontList* pFontList;
108 SfxProgress* pProgress;
109 BOOL bInitNewNoNewDoc;
110 BOOL bOwnPrinter;
111 BOOL mbClipboardExport;
113 void Construct() throw();
115 // #61907# bei deaktivierung des InPlaceEdit evtl. gebufferte neue Daten
116 // übernehmen
117 protected:
119 public:
120 TYPEINFO();
122 SFX_DECL_OBJECTFACTORY_DLL(SchChartDocShell,SCH_MOD());
124 SchChartDocShell(SfxObjectCreateMode eMode = SFX_CREATE_MODE_EMBEDDED) throw();
125 ~SchChartDocShell() throw();
128 virtual BOOL InitNew(SvStorage*) throw();
129 virtual BOOL Load(SvStorage*) throw();
130 virtual BOOL Save() throw();
131 virtual BOOL SaveAs(SvStorage* pNewStor) throw();
132 virtual BOOL SaveCompleted(SvStorage* pNewStor) throw();
134 virtual Rectangle GetVisArea(USHORT nAspect) const throw();
135 virtual void SetVisArea(const Rectangle& rRect) throw();
138 virtual SfxUndoManager* GetUndoManager() throw();
140 SfxPrinter* GetPrinter() throw();
141 void SetPrinter( SfxPrinter *pNewPrinter, BOOL bIsDeletedHere = FALSE ) throw();
143 virtual void OnDocumentPrinterChanged(Printer* pNewPrinter) throw();
145 /** @return if the chart is embedded in a document, this may be a virtual
146 device for layout, or a printer, according to what is set in the
147 container. Otherwise GetPrinter() is called.
149 OutputDevice * GetRefDevice();
151 ChartModel& GetDoc() { return *pChDoc; }
152 ChartModel* GetModelPtr() { return pChDoc; }
153 void SetModelPtr( ChartModel* pModel ) { pChDoc = pModel; }
155 virtual SfxStyleSheetBasePool* GetStyleSheetPool() throw();
157 void UpdateTablePointers() throw();
159 virtual void FillClass(SvGlobalName* pClassName,
160 ULONG* pFormat,
161 String* pAppName,
162 String* pFullTypeName,
163 String* pShortTypeName,
164 long nFileFormat = SOFFICE_FILEFORMAT_CURRENT ) const throw();
166 virtual ULONG GetMiscStatus() const throw();
168 virtual void SetModified( BOOL = TRUE ) throw();
170 void DataModified( ::com::sun::star::chart::ChartDataChangeEvent& ) throw();
172 /// if this flag is set the XML export always exports the table
173 void SetClipboardExport( BOOL bSet = sal_False )
174 { mbClipboardExport = bSet; }
175 BOOL GetClipboardExport() const
176 { return mbClipboardExport; }
180 SO2_DECL_IMPL_REF(SchChartDocShell)
182 } //namespace binfilter
183 #endif // _SCH_DOCSHELL_HXX