xref: /aoo41x/main/svx/inc/svx/fmmodel.hxx (revision c7be74b1)
13334a7e6SAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
33334a7e6SAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
43334a7e6SAndrew Rist  * or more contributor license agreements.  See the NOTICE file
53334a7e6SAndrew Rist  * distributed with this work for additional information
63334a7e6SAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
73334a7e6SAndrew Rist  * to you under the Apache License, Version 2.0 (the
83334a7e6SAndrew Rist  * "License"); you may not use this file except in compliance
93334a7e6SAndrew Rist  * with the License.  You may obtain a copy of the License at
103334a7e6SAndrew Rist  *
113334a7e6SAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
123334a7e6SAndrew Rist  *
133334a7e6SAndrew Rist  * Unless required by applicable law or agreed to in writing,
143334a7e6SAndrew Rist  * software distributed under the License is distributed on an
153334a7e6SAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
163334a7e6SAndrew Rist  * KIND, either express or implied.  See the License for the
173334a7e6SAndrew Rist  * specific language governing permissions and limitations
183334a7e6SAndrew Rist  * under the License.
193334a7e6SAndrew Rist  *
203334a7e6SAndrew Rist  *************************************************************/
213334a7e6SAndrew Rist 
223334a7e6SAndrew Rist 
23cdf0e10cSrcweir 
24cdf0e10cSrcweir #ifndef _SVX_FMMODEL_HXX
25cdf0e10cSrcweir #define _SVX_FMMODEL_HXX
26cdf0e10cSrcweir 
27cdf0e10cSrcweir #include <svx/svdmodel.hxx>
28cdf0e10cSrcweir #include "svx/svxdllapi.h"
29cdf0e10cSrcweir 
30cdf0e10cSrcweir class SfxObjectShell;
31cdf0e10cSrcweir class SfxItemPool;
32cdf0e10cSrcweir class VCItemPool;
33cdf0e10cSrcweir class FmXUndoEnvironment;
34cdf0e10cSrcweir class SfxObjectShell;
35cdf0e10cSrcweir class SbxObject;
36cdf0e10cSrcweir class SbxArray;
37cdf0e10cSrcweir class SbxValue;
38cdf0e10cSrcweir 
39cdf0e10cSrcweir struct FmFormModelImplData;
40cdf0e10cSrcweir class SVX_DLLPUBLIC FmFormModel :
41cdf0e10cSrcweir 	public SdrModel
42cdf0e10cSrcweir {
43cdf0e10cSrcweir private:
44cdf0e10cSrcweir 	FmFormModelImplData*	m_pImpl;
45cdf0e10cSrcweir 	SfxObjectShell*			m_pObjShell;
46cdf0e10cSrcweir 
47cdf0e10cSrcweir 	sal_Bool			m_bOpenInDesignMode : 1;
48cdf0e10cSrcweir 	sal_Bool			m_bAutoControlFocus : 1;
49cdf0e10cSrcweir 
50cdf0e10cSrcweir 	SVX_DLLPRIVATE FmFormModel( const FmFormModel& );   // never implemented
51cdf0e10cSrcweir 	SVX_DLLPRIVATE void operator=(const FmFormModel& rSrcModel);   // never implemented
52cdf0e10cSrcweir 
53cdf0e10cSrcweir public:
54cdf0e10cSrcweir 	TYPEINFO();
55cdf0e10cSrcweir 
56cdf0e10cSrcweir     FmFormModel(SfxItemPool* pPool=NULL, SfxObjectShell* pPers=NULL );
57*c7be74b1SArmin Le Grand 	FmFormModel(const XubString& rPath, SfxItemPool* pPool=NULL, SfxObjectShell* pPers=NULL );
58cdf0e10cSrcweir 	virtual ~FmFormModel();
59cdf0e10cSrcweir 
60cdf0e10cSrcweir 	virtual SdrPage* AllocPage(FASTBOOL bMasterPage);
61cdf0e10cSrcweir 	virtual void     InsertPage(SdrPage* pPage, sal_uInt16 nPos=0xFFFF);
62cdf0e10cSrcweir 	virtual SdrPage* RemovePage(sal_uInt16 nPgNum);
63cdf0e10cSrcweir 	virtual void     MovePage(sal_uInt16 nPgNum, sal_uInt16 nNewPos);
64cdf0e10cSrcweir 	virtual void     InsertMasterPage(SdrPage* pPage, sal_uInt16 nPos=0xFFFF);
65cdf0e10cSrcweir 	virtual SdrPage* RemoveMasterPage(sal_uInt16 nPgNum);
66cdf0e10cSrcweir 
67cdf0e10cSrcweir 	virtual SdrLayerID 		GetControlExportLayerId( const SdrObject& rObj ) const;
GetObjectShell() const68cdf0e10cSrcweir 	SfxObjectShell* 		GetObjectShell() const { return m_pObjShell; }
69cdf0e10cSrcweir 	void 					SetObjectShell( SfxObjectShell* pShell );
70cdf0e10cSrcweir 
GetOpenInDesignMode() const71cdf0e10cSrcweir 	sal_Bool GetOpenInDesignMode() const { return m_bOpenInDesignMode; }
72cdf0e10cSrcweir 	void SetOpenInDesignMode( sal_Bool _bOpenDesignMode );
73cdf0e10cSrcweir 
GetAutoControlFocus() const74cdf0e10cSrcweir 	sal_Bool	GetAutoControlFocus() const { return m_bAutoControlFocus; }
75cdf0e10cSrcweir 	void		SetAutoControlFocus( sal_Bool _bAutoControlFocus );
76cdf0e10cSrcweir 
77cdf0e10cSrcweir 	/** check whether the OpenInDesignMode has been set explicitly or been loaded (<FALSE/>)
78cdf0e10cSrcweir 		or if it still has the default value from construction (<TRUE/>)
79cdf0e10cSrcweir 	*/
80cdf0e10cSrcweir 	sal_Bool	OpenInDesignModeIsDefaulted();
81cdf0e10cSrcweir 
82cdf0e10cSrcweir     /** determines whether form controls should use the SdrModel's reference device for text rendering
83cdf0e10cSrcweir     */
84cdf0e10cSrcweir     sal_Bool    ControlsUseRefDevice() const;
85cdf0e10cSrcweir 
86cdf0e10cSrcweir 	FmXUndoEnvironment&	GetUndoEnv();
87cdf0e10cSrcweir 
88cdf0e10cSrcweir private:
89cdf0e10cSrcweir 	void		implSetOpenInDesignMode( sal_Bool _bOpenDesignMode, sal_Bool _bForce );
90cdf0e10cSrcweir };
91cdf0e10cSrcweir 
92cdf0e10cSrcweir #endif          // _FM_FMMODEL_HXX
93cdf0e10cSrcweir 
94