sync master with lastest vba changes
[ooovba.git] / binfilter / inc / bf_svx / fmpage.hxx
blobe83c55fd8ca398562c46eee1559b9ac4f9a7bea0
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: fmpage.hxx,v $
10 * $Revision: 1.7 $
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 _SVX_FMPAGE_HXX
32 #define _SVX_FMPAGE_HXX
34 #ifndef _SVDPAGE_HXX //autogen
35 #include <bf_svx/svdpage.hxx>
36 #endif
38 #ifndef _COMPHELPER_UNO3_HXX_
39 #include <comphelper/uno3.hxx>
40 #endif
41 FORWARD_DECLARE_INTERFACE(container,XNameContainer)
42 namespace binfilter {
44 class StarBASIC;
45 class FmFormModel;
46 class FmFormPageImpl; // haelt die Liste aller Forms
48 //FORWARD_DECLARE_INTERFACE(uno,Reference)
49 //STRIP008 FORWARD_DECLARE_INTERFACE(container,XNameContainer)
51 class SfxJSArray;
52 class HelpEvent;
54 class FmFormPage : public SdrPage
56 friend class FmFormObj;
57 FmFormPageImpl* pImpl;
59 public:
60 TYPEINFO();
62 FmFormPage(FmFormModel& rModel,StarBASIC*, FASTBOOL bMasterPage=sal_False);
63 ~FmFormPage();
65 using SdrPage::NbcInsertObject;
66 using SdrPage::ReplaceObject;
68 virtual void WriteData(SvStream& rOut) const;
69 virtual void ReadData(const SdrIOHeader& rHead, SvStream& rIn);
70 virtual void SetModel(SdrModel* pNewModel);
72 virtual SdrPage* Clone() const;
74 virtual void InsertObject(SdrObject* pObj, ULONG nPos = CONTAINER_APPEND,
75 const SdrInsertReason* pReason=NULL);
77 virtual SdrObject* RemoveObject(ULONG nObjNum);
79 #ifndef SVX_LIGHT
80 /** Insert _pClone into the page.
81 If _pClone is no form object, InsertObject will be called.
82 If _pClone is a form object, the page will create forms as needed to properly place the control model of the new object
83 (so it is located within the forms hierarchy in an position analogous to the source objects model with it's hierarchy).
84 If _pClone is NULL, it will be created via _pSourceObject->Clone(SdrPage*, SdrModel*).
85 If bTryPreserveName is sal_True, the property value for "Name" will be restored after calling the InsertObject (which otherwise
86 may alter the name to ensure uniqueness).
89 /** Create an environment (within the forms hierarchy of the page) for inserting a form object which is a clone
90 of the given form object (which has to belong to a foreign page).
91 "environment" means that the UnoControlModel of the given object may be inserted into our forms hierarchy
92 without (to much) structure loss.
93 If _pObj isn't a form object, nothing happens.
95 #endif
97 // Zugriff auf alle Formulare
98 const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer>& GetForms() const;
100 FmFormPageImpl* GetImpl() const {return pImpl;}
102 public:
103 String aPageName;
104 StarBASIC* pBasic;
106 const String& GetName() const { return aPageName; }
107 void SetName( const String& rName ) { aPageName = rName; }
108 StarBASIC* GetBasic() const { return pBasic; }
111 }//end of namespace binfilter
112 #endif // _SVX_FMPAGE_HXX