xref: /aoo41x/main/sd/inc/sdpage.hxx (revision 67e470da)
1*c45d927aSAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
3*c45d927aSAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4*c45d927aSAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5*c45d927aSAndrew Rist  * distributed with this work for additional information
6*c45d927aSAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7*c45d927aSAndrew Rist  * to you under the Apache License, Version 2.0 (the
8*c45d927aSAndrew Rist  * "License"); you may not use this file except in compliance
9*c45d927aSAndrew Rist  * with the License.  You may obtain a copy of the License at
10*c45d927aSAndrew Rist  *
11*c45d927aSAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12*c45d927aSAndrew Rist  *
13*c45d927aSAndrew Rist  * Unless required by applicable law or agreed to in writing,
14*c45d927aSAndrew Rist  * software distributed under the License is distributed on an
15*c45d927aSAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*c45d927aSAndrew Rist  * KIND, either express or implied.  See the License for the
17*c45d927aSAndrew Rist  * specific language governing permissions and limitations
18*c45d927aSAndrew Rist  * under the License.
19*c45d927aSAndrew Rist  *
20*c45d927aSAndrew Rist  *************************************************************/
21*c45d927aSAndrew Rist 
22*c45d927aSAndrew Rist 
23cdf0e10cSrcweir 
24cdf0e10cSrcweir #ifndef _SDPAGE_HXX
25cdf0e10cSrcweir #define _SDPAGE_HXX
26cdf0e10cSrcweir 
27cdf0e10cSrcweir #ifndef BOOST_SHARED_PTR_HPP_INCLUDED
28cdf0e10cSrcweir #include <boost/shared_ptr.hpp>
29cdf0e10cSrcweir #endif
30cdf0e10cSrcweir 
31cdf0e10cSrcweir #ifndef INCLUDED_FUNCTIONAL
32cdf0e10cSrcweir #include <functional>
33cdf0e10cSrcweir #define INCLUDED_FUNCTIONAL
34cdf0e10cSrcweir #endif
35cdf0e10cSrcweir #include <com/sun/star/drawing/XDrawPage.hpp>
36cdf0e10cSrcweir #include <com/sun/star/presentation/FadeEffect.hpp>
37cdf0e10cSrcweir #include <com/sun/star/office/XAnnotation.hpp>
38cdf0e10cSrcweir 
39cdf0e10cSrcweir #include <list>
40cdf0e10cSrcweir #include <functional>
41cdf0e10cSrcweir #include <vector>
42cdf0e10cSrcweir #include <svx/svdobj.hxx>
43cdf0e10cSrcweir #ifndef _FM_FMPAGE_HXX //autogen
44cdf0e10cSrcweir #include <svx/fmpage.hxx>
45cdf0e10cSrcweir #endif
46cdf0e10cSrcweir #include "fadedef.h"
47cdf0e10cSrcweir #include "diadef.h"
48cdf0e10cSrcweir #ifndef _PRESENTATION
49cdf0e10cSrcweir #include "pres.hxx"
50cdf0e10cSrcweir #endif
51cdf0e10cSrcweir #include "shapelist.hxx"
52cdf0e10cSrcweir #include "misc/scopelock.hxx"
53cdf0e10cSrcweir #include "sddllapi.h"
54cdf0e10cSrcweir 
55cdf0e10cSrcweir namespace com { namespace sun { namespace star { namespace animations {
56cdf0e10cSrcweir 	class XAnimationNode;
57cdf0e10cSrcweir } } } }
58cdf0e10cSrcweir 
59cdf0e10cSrcweir class SfxStyleSheet;
60cdf0e10cSrcweir class SdDrawDocument;
61cdf0e10cSrcweir class SdrTextObj;
62cdf0e10cSrcweir class SdPageLink;
63cdf0e10cSrcweir class StarBASIC;
64cdf0e10cSrcweir class SfxItemSet;
65cdf0e10cSrcweir struct StyleRequestData;
66cdf0e10cSrcweir class SdPage;
67cdf0e10cSrcweir class Paragraph;
68cdf0e10cSrcweir class Outliner;
69cdf0e10cSrcweir class SdStyleSheet;
70cdf0e10cSrcweir 
71cdf0e10cSrcweir namespace sd
72cdf0e10cSrcweir {
73cdf0e10cSrcweir 	class MainSequence;
74cdf0e10cSrcweir }
75cdf0e10cSrcweir 
76cdf0e10cSrcweir namespace boost
77cdf0e10cSrcweir {
78cdf0e10cSrcweir 	template<class X> class shared_ptr;
79cdf0e10cSrcweir }
80cdf0e10cSrcweir 
81cdf0e10cSrcweir namespace sd {
82cdf0e10cSrcweir 
83cdf0e10cSrcweir 	struct SD_DLLPUBLIC HeaderFooterSettings
84cdf0e10cSrcweir 	{
85cdf0e10cSrcweir 		bool mbHeaderVisible;
86cdf0e10cSrcweir 		String maHeaderText;
87cdf0e10cSrcweir 
88cdf0e10cSrcweir 		bool mbFooterVisible;
89cdf0e10cSrcweir 		String maFooterText;
90cdf0e10cSrcweir 
91cdf0e10cSrcweir 		bool mbSlideNumberVisible;
92cdf0e10cSrcweir 
93cdf0e10cSrcweir 		bool mbDateTimeVisible;
94cdf0e10cSrcweir 		bool mbDateTimeIsFixed;
95cdf0e10cSrcweir 		String maDateTimeText;
96cdf0e10cSrcweir 		int	meDateTimeFormat;
97cdf0e10cSrcweir 
98cdf0e10cSrcweir 		HeaderFooterSettings();
99cdf0e10cSrcweir 
100cdf0e10cSrcweir 		bool operator==( const HeaderFooterSettings& rSettings ) const;
101cdf0e10cSrcweir 	};
102cdf0e10cSrcweir 
103cdf0e10cSrcweir 	typedef std::vector< ::com::sun::star::uno::Reference< ::com::sun::star::office::XAnnotation > > AnnotationVector;
104cdf0e10cSrcweir }
105cdf0e10cSrcweir 
106cdf0e10cSrcweir namespace sd {
107cdf0e10cSrcweir 	class UndoAnimation;
108cdf0e10cSrcweir 	class UndoTransition;
109cdf0e10cSrcweir 	class UndoGeoObject;
110cdf0e10cSrcweir 	class UndoAttrObject;
111cdf0e10cSrcweir }
112cdf0e10cSrcweir 
113cdf0e10cSrcweir class SD_DLLPUBLIC SdPage : public FmFormPage, public SdrObjUserCall
114cdf0e10cSrcweir {
115cdf0e10cSrcweir friend class SdGenericDrawPage;
116cdf0e10cSrcweir friend class SdDrawPage;
117cdf0e10cSrcweir friend class sd::UndoAnimation;
118cdf0e10cSrcweir friend class sd::UndoTransition;
119cdf0e10cSrcweir friend class ModifyPageUndoAction;
120cdf0e10cSrcweir friend class sd::UndoGeoObject;
121cdf0e10cSrcweir friend class sd::UndoAttrObject;
122cdf0e10cSrcweir 
123cdf0e10cSrcweir protected:
124cdf0e10cSrcweir 	PageKind	mePageKind;				  // Seitentyp
125cdf0e10cSrcweir 	AutoLayout	meAutoLayout;			  // AutoLayout
126cdf0e10cSrcweir 	sd::ShapeList maPresentationShapeList;			  // Praesentationsobjekte
127cdf0e10cSrcweir 	sd::ScopeLock maLockAutoLayoutArrangement;
128cdf0e10cSrcweir 	sal_Bool		mbSelected;				  // Selektionskennung
129cdf0e10cSrcweir 	PresChange	mePresChange;			  // manuell/automatisch/halbautomatisch
130cdf0e10cSrcweir 	sal_uInt32		mnTime;					  // Anzeigedauer in Sekunden
131cdf0e10cSrcweir 	sal_Bool		mbSoundOn;				  // mit/ohne Sound (sal_True/sal_False)
132cdf0e10cSrcweir 	sal_Bool		mbExcluded;				  // wird in der Show nicht/doch
133cdf0e10cSrcweir 										  // angezeigt (sal_True/sal_False)
134cdf0e10cSrcweir 	String		maLayoutName;			  // Name des Layouts
135cdf0e10cSrcweir 	String      maSoundFile;               // Pfad zum Soundfile (MSDOS-Notation)
136cdf0e10cSrcweir 	bool		mbLoopSound;
137cdf0e10cSrcweir 	bool		mbStopSound;
138cdf0e10cSrcweir 	String      maCreatedPageName;         // von GetPageName erzeugter Seitenname
139cdf0e10cSrcweir 	String      maFileName;                // Filename
140cdf0e10cSrcweir 	String		maBookmarkName;			  // Bookmarkname
141cdf0e10cSrcweir 	sal_Bool		mbScaleObjects;			  // Objekte sollen skaliert werden
142cdf0e10cSrcweir 	sal_Bool		mbBackgroundFullSize;	  // Hintergrundobjekt auf ganze Seite darstellen
143cdf0e10cSrcweir 	rtl_TextEncoding meCharSet;            // Text-Encoding
144cdf0e10cSrcweir 	sal_uInt16      mnPaperBin;                // PaperBin
145cdf0e10cSrcweir 	Orientation meOrientation;             // Print-Orientation
146cdf0e10cSrcweir 	SdPageLink* mpPageLink;				  // PageLink (nur bei gelinkten Seiten)
147cdf0e10cSrcweir 
148cdf0e10cSrcweir 	sd::AnnotationVector	maAnnotations;
149cdf0e10cSrcweir 
150cdf0e10cSrcweir 	/** holds the smil animation sequences for this page */
151cdf0e10cSrcweir 	::com::sun::star::uno::Reference< ::com::sun::star::animations::XAnimationNode > mxAnimationNode;
152cdf0e10cSrcweir 
153cdf0e10cSrcweir 	/** a helper class to manipulate effects inside the main sequence */
154cdf0e10cSrcweir 	boost::shared_ptr< sd::MainSequence > mpMainSequence;
155cdf0e10cSrcweir 
156cdf0e10cSrcweir 	virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > createUnoPage();
157cdf0e10cSrcweir 
158cdf0e10cSrcweir 	SfxItemSet*	mpItems;
159cdf0e10cSrcweir 
160cdf0e10cSrcweir 	SfxItemSet* getOrCreateItems();
161cdf0e10cSrcweir 
162cdf0e10cSrcweir 	sd::HeaderFooterSettings	maHeaderFooterSettings;
163cdf0e10cSrcweir 
164cdf0e10cSrcweir 	// new transition settings
165cdf0e10cSrcweir 	sal_Int16 mnTransitionType;
166cdf0e10cSrcweir 	sal_Int16 mnTransitionSubtype;
167cdf0e10cSrcweir 	sal_Bool mbTransitionDirection;
168cdf0e10cSrcweir 	sal_Int32 mnTransitionFadeColor;
169cdf0e10cSrcweir 	double mfTransitionDuration;
170cdf0e10cSrcweir 
171cdf0e10cSrcweir public:
172cdf0e10cSrcweir 	TYPEINFO();
173cdf0e10cSrcweir 
174cdf0e10cSrcweir 	SdPage(SdDrawDocument& rNewDoc, StarBASIC* pBasic, sal_Bool bMasterPage=sal_False);
175cdf0e10cSrcweir 	SdPage(const SdPage& rSrcPage);
176cdf0e10cSrcweir 	~SdPage();
177cdf0e10cSrcweir 	virtual SdrPage* Clone() const;
178cdf0e10cSrcweir 	virtual SdrPage* Clone(SdrModel* pNewModel) const;
179cdf0e10cSrcweir 
180cdf0e10cSrcweir 	virtual void	SetSize(const Size& aSize);
181cdf0e10cSrcweir 	virtual void	SetBorder(sal_Int32 nLft, sal_Int32 nUpp, sal_Int32 nRgt, sal_Int32 Lwr);
182cdf0e10cSrcweir 	virtual void	SetLftBorder(sal_Int32 nBorder);
183cdf0e10cSrcweir 	virtual void	SetRgtBorder(sal_Int32 nBorder);
184cdf0e10cSrcweir 	virtual void	SetUppBorder(sal_Int32 nBorder);
185cdf0e10cSrcweir 	virtual void	SetLwrBorder(sal_Int32 nBorder);
186cdf0e10cSrcweir 	virtual void	SetModel(SdrModel* pNewModel);
187cdf0e10cSrcweir 	virtual FASTBOOL IsReadOnly() const;
188cdf0e10cSrcweir 
GetPresentationShapeList()189cdf0e10cSrcweir 	sd::ShapeList&	GetPresentationShapeList() { return maPresentationShapeList; }
190cdf0e10cSrcweir 
191cdf0e10cSrcweir     void EnsureMasterPageDefaultBackground();
192cdf0e10cSrcweir 	SdrObject*      CreatePresObj(PresObjKind eObjKind, sal_Bool bVertical, const Rectangle& rRect, sal_Bool bInsert=sal_False);
193cdf0e10cSrcweir 	SdrObject*		CreateDefaultPresObj(PresObjKind eObjKind, bool bInsert);
194cdf0e10cSrcweir 	SdrObject*		GetPresObj(PresObjKind eObjKind, int nIndex = 1, bool bFuzzySearch = false );
195cdf0e10cSrcweir 	PresObjKind     GetPresObjKind(SdrObject* pObj) const;
196cdf0e10cSrcweir 	String          GetPresObjText(PresObjKind eObjKind) const;
197cdf0e10cSrcweir     SfxStyleSheet* GetStyleSheetForMasterPageBackground() const;
198cdf0e10cSrcweir 	SfxStyleSheet*	GetStyleSheetForPresObj(PresObjKind eObjKind) const;
199cdf0e10cSrcweir 	bool			RestoreDefaultText( SdrObject* pObj );
200cdf0e10cSrcweir 
201cdf0e10cSrcweir 	/** returns true if the given SdrObject is inside the presentation object list */
202cdf0e10cSrcweir 	bool			IsPresObj(const SdrObject* pObj);
203cdf0e10cSrcweir 
204cdf0e10cSrcweir 	/** removes the given SdrObject from the presentation object list */
205cdf0e10cSrcweir 	void			RemovePresObj(const SdrObject* pObj);
206cdf0e10cSrcweir 
207cdf0e10cSrcweir 	/** inserts the given SdrObject into the presentation object list */
208cdf0e10cSrcweir 	void			InsertPresObj(SdrObject* pObj, PresObjKind eKind );
209cdf0e10cSrcweir 
210cdf0e10cSrcweir 	void			SetAutoLayout(AutoLayout eLayout, sal_Bool bInit=sal_False, sal_Bool bCreate=sal_False);
GetAutoLayout() const211cdf0e10cSrcweir 	AutoLayout		GetAutoLayout() const { return meAutoLayout; }
212cdf0e10cSrcweir 	void            CreateTitleAndLayout(sal_Bool bInit=sal_False, sal_Bool bCreate=sal_False);
213cdf0e10cSrcweir 	SdrObject*		InsertAutoLayoutShape(SdrObject* pObj, PresObjKind eObjKind, bool bVertical, Rectangle aRect, bool bInit );
214cdf0e10cSrcweir 
215cdf0e10cSrcweir 	virtual void       NbcInsertObject(SdrObject* pObj, sal_uLong nPos=CONTAINER_APPEND,
216cdf0e10cSrcweir 									   const SdrInsertReason* pReason=NULL);
217cdf0e10cSrcweir 	virtual SdrObject* NbcRemoveObject(sal_uLong nObjNum);
218cdf0e10cSrcweir 	virtual SdrObject* RemoveObject(sal_uLong nObjNum);
219cdf0e10cSrcweir 
220cdf0e10cSrcweir 	// #95876# Also overload ReplaceObject methods to realize when
221cdf0e10cSrcweir 	// objects are removed with this mechanism instead of RemoveObject
222cdf0e10cSrcweir 	virtual SdrObject* NbcReplaceObject(SdrObject* pNewObj, sal_uLong nObjNum);
223cdf0e10cSrcweir 	virtual SdrObject* ReplaceObject(SdrObject* pNewObj, sal_uLong nObjNum);
224cdf0e10cSrcweir 
225cdf0e10cSrcweir 	virtual void SetLinkData(const String& rLinkName, const String& rLinkData);
226cdf0e10cSrcweir 
227cdf0e10cSrcweir 	void		SetObjText(SdrTextObj* pObj, SdrOutliner* pOutliner, PresObjKind eObjKind, const String& rStr );
228cdf0e10cSrcweir 
SetPageKind(PageKind ePgType)229cdf0e10cSrcweir 	void		SetPageKind(PageKind ePgType)		 { mePageKind = ePgType; }
GetPageKind() const230cdf0e10cSrcweir 	PageKind	GetPageKind() const 				 { return mePageKind; }
231cdf0e10cSrcweir 
SetSelected(sal_Bool bSel)232cdf0e10cSrcweir 	void		SetSelected(sal_Bool bSel)				 { mbSelected = bSel; }
IsSelected() const233cdf0e10cSrcweir 	sal_Bool		IsSelected() const					 { return mbSelected; }
234cdf0e10cSrcweir 
235cdf0e10cSrcweir 	void		SetFadeEffect(::com::sun::star::presentation::FadeEffect eNewEffect);
236cdf0e10cSrcweir 	::com::sun::star::presentation::FadeEffect	GetFadeEffect() const;
237cdf0e10cSrcweir 
SetPresChange(PresChange eChange)238cdf0e10cSrcweir 	void		SetPresChange(PresChange eChange)	 { mePresChange = eChange; }
GetPresChange() const239cdf0e10cSrcweir 	PresChange	GetPresChange() const				 { return mePresChange; }
240cdf0e10cSrcweir 
SetTime(sal_uInt32 nNewTime)241cdf0e10cSrcweir 	void		SetTime(sal_uInt32 nNewTime)			 { mnTime = nNewTime; }
GetTime() const242cdf0e10cSrcweir 	sal_uInt32		GetTime() const 					 { return mnTime; }
243cdf0e10cSrcweir 
SetSound(sal_Bool bNewSoundOn)244cdf0e10cSrcweir 	void		SetSound(sal_Bool bNewSoundOn)			 { mbSoundOn = bNewSoundOn; }
IsSoundOn() const245cdf0e10cSrcweir 	sal_Bool		IsSoundOn() const					 { return mbSoundOn; }
246cdf0e10cSrcweir 
SetExcluded(sal_Bool bNewExcluded)247cdf0e10cSrcweir 	void		SetExcluded(sal_Bool bNewExcluded)		{ mbExcluded = bNewExcluded; }
IsExcluded() const248cdf0e10cSrcweir 	sal_Bool		IsExcluded() const					{ return mbExcluded; }
249cdf0e10cSrcweir 
SetScaleObjects(sal_Bool bScale)250cdf0e10cSrcweir 	void		SetScaleObjects(sal_Bool bScale)		{ mbScaleObjects = bScale; }
IsScaleObjects() const251cdf0e10cSrcweir 	sal_Bool		IsScaleObjects() const				{ return mbScaleObjects; }
252cdf0e10cSrcweir 
SetSoundFile(const String & rStr)253cdf0e10cSrcweir 	void		SetSoundFile(const String& rStr)	{ maSoundFile = rStr; }
GetSoundFile() const254cdf0e10cSrcweir 	String		GetSoundFile() const				{ return maSoundFile; }
255cdf0e10cSrcweir 
SetLoopSound(bool bLoopSound)256cdf0e10cSrcweir 	void		SetLoopSound( bool bLoopSound )	{ mbLoopSound = bLoopSound; }
IsLoopSound() const257cdf0e10cSrcweir 	bool		IsLoopSound() const					{ return mbLoopSound; }
258cdf0e10cSrcweir 
SetStopSound(bool bStopSound)259cdf0e10cSrcweir 	void		SetStopSound( bool bStopSound ) { mbStopSound = bStopSound; }
IsStopSound() const260cdf0e10cSrcweir 	bool		IsStopSound() const				{ return mbStopSound; }
261cdf0e10cSrcweir 
262cdf0e10cSrcweir 	sal_Int16	getTransitionType() const;
263cdf0e10cSrcweir 	void		setTransitionType( sal_Int16 nTransitionType );
264cdf0e10cSrcweir 
265cdf0e10cSrcweir 	sal_Int16	getTransitionSubtype() const;
266cdf0e10cSrcweir 	void		setTransitionSubtype( sal_Int16 nTransitionSubtype );
267cdf0e10cSrcweir 
268cdf0e10cSrcweir 	sal_Bool	getTransitionDirection() const;
269cdf0e10cSrcweir 	void		setTransitionDirection( sal_Bool bTransitionbDirection );
270cdf0e10cSrcweir 
271cdf0e10cSrcweir 	sal_Int32	getTransitionFadeColor() const;
272cdf0e10cSrcweir 	void		setTransitionFadeColor( sal_Int32 nTransitionFadeColor );
273cdf0e10cSrcweir 
274cdf0e10cSrcweir 	double		getTransitionDuration() const;
275cdf0e10cSrcweir 	void		setTransitionDuration( double fTranstionDuration );
276cdf0e10cSrcweir 
277cdf0e10cSrcweir 	// Virtuelle Methoden von SdrObjUserCall
278cdf0e10cSrcweir 	virtual void Changed(const SdrObject& rObj, SdrUserCallType eType,
279cdf0e10cSrcweir 						 const Rectangle& rOldBoundRect);
280cdf0e10cSrcweir 
281cdf0e10cSrcweir 	void			SetLayoutName(String aName);
GetLayoutName() const282cdf0e10cSrcweir 	virtual String	GetLayoutName() const		{ return maLayoutName; }
283cdf0e10cSrcweir 
SetFileName(const String & aName)284cdf0e10cSrcweir 	void			SetFileName(const String& aName) { maFileName = aName; }
GetFileName() const285cdf0e10cSrcweir 	virtual String	GetFileName() const 	  { return maFileName; }
SetBookmarkName(const String & aName)286cdf0e10cSrcweir 	void			SetBookmarkName(const String& aName) { maBookmarkName = aName; }
GetBookmarkName() const287cdf0e10cSrcweir 	virtual String	GetBookmarkName() const 	  { return maBookmarkName; }
GetLink()288cdf0e10cSrcweir 	SdPageLink* 	GetLink() { return mpPageLink; }
289cdf0e10cSrcweir 
290cdf0e10cSrcweir 	void			ConnectLink();
291cdf0e10cSrcweir 	void			DisconnectLink();
292cdf0e10cSrcweir 
293cdf0e10cSrcweir 	void    ScaleObjects(const Size& rNewPageSize, const Rectangle& rNewBorderRect,
294cdf0e10cSrcweir 						 sal_Bool bScaleAllObj);
295cdf0e10cSrcweir 
296cdf0e10cSrcweir 	const String&   GetName() const;
GetRealName() const297cdf0e10cSrcweir 	String			GetRealName() const { return FmFormPage::GetName(); };
298cdf0e10cSrcweir 
299cdf0e10cSrcweir 	void    SetPresentationLayout(const String& rLayoutName,
300cdf0e10cSrcweir 								  sal_Bool bReplaceStyleSheets = sal_True,
301cdf0e10cSrcweir 								  sal_Bool bSetMasterPage = sal_True,
302cdf0e10cSrcweir 								  sal_Bool bReverseOrder = sal_False);
303cdf0e10cSrcweir 	void	EndListenOutlineText();
304cdf0e10cSrcweir 
305cdf0e10cSrcweir 	void	SetBackgroundFullSize( sal_Bool bIn );
IsBackgroundFullSize() const306cdf0e10cSrcweir 	sal_Bool	IsBackgroundFullSize() const { return mbBackgroundFullSize; }
307cdf0e10cSrcweir 
GetCharSet()308cdf0e10cSrcweir 	rtl_TextEncoding GetCharSet() { return(meCharSet); }
309cdf0e10cSrcweir 
SetPaperBin(sal_uInt16 nBin)310cdf0e10cSrcweir 	void    SetPaperBin(sal_uInt16 nBin) { mnPaperBin = nBin; }
GetPaperBin() const311cdf0e10cSrcweir 	sal_uInt16  GetPaperBin() const { return mnPaperBin; }
312cdf0e10cSrcweir 	virtual void        SetOrientation(Orientation eOrient);
313cdf0e10cSrcweir 	virtual Orientation GetOrientation() const;
314cdf0e10cSrcweir 
315cdf0e10cSrcweir 	virtual SfxStyleSheet* GetTextStyleSheetForObject( SdrObject* pObj ) const;
316cdf0e10cSrcweir 
317cdf0e10cSrcweir 	sal_Bool setAlienAttributes( const com::sun::star::uno::Any& rAttributes );
318cdf0e10cSrcweir 	void getAlienAttributes( com::sun::star::uno::Any& rAttributes );
319cdf0e10cSrcweir 
320cdf0e10cSrcweir 	/** returns the main animation node */
321cdf0e10cSrcweir 	::com::sun::star::uno::Reference< ::com::sun::star::animations::XAnimationNode > getAnimationNode() throw (::com::sun::star::uno::RuntimeException);
322cdf0e10cSrcweir 
323cdf0e10cSrcweir 	/** sets the main animation node */
324cdf0e10cSrcweir 	void setAnimationNode( ::com::sun::star::uno::Reference< ::com::sun::star::animations::XAnimationNode >& xNode ) throw (::com::sun::star::uno::RuntimeException);
325cdf0e10cSrcweir 
326cdf0e10cSrcweir 	/** returns a helper class to manipulate effects inside the main sequence */
327cdf0e10cSrcweir 	boost::shared_ptr< sd::MainSequence > getMainSequence();
328cdf0e10cSrcweir 
329cdf0e10cSrcweir 	/** quick check if this slide has an animation node.
330cdf0e10cSrcweir 		This can be used to have a cost free check if there are no animations ad this slide.
331cdf0e10cSrcweir 		If it returns true this does not mean that there are animations available.
332cdf0e10cSrcweir 	*/
333cdf0e10cSrcweir 	bool hasAnimationNode() const;
334cdf0e10cSrcweir 
335cdf0e10cSrcweir 	/** returns the SdPage implementation for the given XDrawPage or 0 if not available */
336cdf0e10cSrcweir 	static SdPage* getImplementation( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XDrawPage >& xPage );
337cdf0e10cSrcweir 
338cdf0e10cSrcweir 	/** removes all custom animations for the given shape */
339cdf0e10cSrcweir 	void removeAnimations( const SdrObject* pObj );
340cdf0e10cSrcweir 
341cdf0e10cSrcweir     /** Set the name of the page and broadcast a model change.
342cdf0e10cSrcweir     */
343cdf0e10cSrcweir 	virtual void SetName (const String& rName);
344cdf0e10cSrcweir 
345cdf0e10cSrcweir 	const sd::HeaderFooterSettings& getHeaderFooterSettings() const;
346cdf0e10cSrcweir 	void setHeaderFooterSettings( const sd::HeaderFooterSettings& rNewSettings );
347cdf0e10cSrcweir 
348cdf0e10cSrcweir 	/** this method returns true if the object from the ViewObjectContact should
349cdf0e10cSrcweir 		be visible on this page while rendering.
350cdf0e10cSrcweir 		bEdit selects if visibility test is for an editing view or a final render,
351cdf0e10cSrcweir 		like printing.
352cdf0e10cSrcweir 	*/
353cdf0e10cSrcweir 	virtual bool checkVisibility(
354cdf0e10cSrcweir 		const sdr::contact::ViewObjectContact& rOriginal,
355cdf0e10cSrcweir 		const sdr::contact::DisplayInfo& rDisplayInfo,
356cdf0e10cSrcweir 		bool bEdit );
357cdf0e10cSrcweir 
358cdf0e10cSrcweir 	/** callback from the sd::View when a new paragraph for one object on this page is created */
359cdf0e10cSrcweir 	void onParagraphInserted( ::Outliner* pOutliner, Paragraph* pPara, SdrObject* pObj );
360cdf0e10cSrcweir 
361cdf0e10cSrcweir 	/** callback from the sd::View when a paragraph from one object on this page is removed */
362cdf0e10cSrcweir 	void onParagraphRemoving( ::Outliner* pOutliner, Paragraph* pPara, SdrObject* pObj );
363cdf0e10cSrcweir 
364cdf0e10cSrcweir 	/** callback from the sd::View when an object just left text edit mode */
365cdf0e10cSrcweir 	void onEndTextEdit( SdrObject* pObj );
366cdf0e10cSrcweir 
367cdf0e10cSrcweir 	/** returns the presentation style with the given helpid from this masterpage or this
368cdf0e10cSrcweir 		slides masterpage */
369cdf0e10cSrcweir 	SdStyleSheet* getPresentationStyle( sal_uInt32 nHelpId ) const;
370cdf0e10cSrcweir 
371cdf0e10cSrcweir 	/** removes all empty presentation objects from this slide */
372cdf0e10cSrcweir 	void RemoveEmptyPresentationObjects();
373cdf0e10cSrcweir 
374cdf0e10cSrcweir 	Rectangle   GetTitleRect() const;
375cdf0e10cSrcweir 	Rectangle   GetLayoutRect() const;
376cdf0e10cSrcweir 
377cdf0e10cSrcweir 	static void CalculateHandoutAreas( SdDrawDocument& rModel, AutoLayout eLayout, bool bHorizontal, std::vector< Rectangle >& rAreas );
378cdf0e10cSrcweir 
379cdf0e10cSrcweir     /** Set the "precious" flag to the given value.
380cdf0e10cSrcweir     */
381cdf0e10cSrcweir     void SetPrecious (const bool bIsPrecious);
382cdf0e10cSrcweir 
383cdf0e10cSrcweir     /** The "precious" flag is used for master pages to prevent some unused
384cdf0e10cSrcweir         master pages from being deleted automatically.  For pages
385cdf0e10cSrcweir         other than master pages this flag can be ignored.
386cdf0e10cSrcweir         @return
387cdf0e10cSrcweir             When this method returns <TRUE/> for a master page then this
388cdf0e10cSrcweir             master page should not be deleted automatically.
389cdf0e10cSrcweir     */
390cdf0e10cSrcweir     bool IsPrecious (void) const;
391cdf0e10cSrcweir 
392cdf0e10cSrcweir     void createAnnotation( ::com::sun::star::uno::Reference< ::com::sun::star::office::XAnnotation >& xAnnotation );
393cdf0e10cSrcweir 	void addAnnotation( const ::com::sun::star::uno::Reference< ::com::sun::star::office::XAnnotation >& xAnnotation, int nIndex = -1 );
394cdf0e10cSrcweir 	void removeAnnotation( const ::com::sun::star::uno::Reference< ::com::sun::star::office::XAnnotation >& xAnnotation );
getAnnotations() const395cdf0e10cSrcweir 	const sd::AnnotationVector& getAnnotations() const { return maAnnotations; }
hasAnnotations() const396cdf0e10cSrcweir 	bool hasAnnotations() const { return !maAnnotations.empty(); }
397cdf0e10cSrcweir 
398cdf0e10cSrcweir private:
399cdf0e10cSrcweir     bool mbIsPrecious;
400cdf0e10cSrcweir 
401cdf0e10cSrcweir 	/** clone the animations from this and set them to rTargetPage
402cdf0e10cSrcweir 	*/
403cdf0e10cSrcweir 	void cloneAnimations( SdPage& rTargetPage ) const;
404cdf0e10cSrcweir 
405cdf0e10cSrcweir 	/** called before a shape is removed or replaced from this slide */
406cdf0e10cSrcweir 	void onRemoveObject( SdrObject* pObject );
407cdf0e10cSrcweir };
408cdf0e10cSrcweir 
409cdf0e10cSrcweir #endif	   // _SDPAGE_HXX
410