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