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 _SD_SlideShowImpl_HXX_ 29*cdf0e10cSrcweir #define _SD_SlideShowImpl_HXX_ 30*cdf0e10cSrcweir 31*cdf0e10cSrcweir #include "sal/config.h" 32*cdf0e10cSrcweir #include "com/sun/star/uno/XComponentContext.hpp" 33*cdf0e10cSrcweir #include "cppuhelper/compbase1.hxx" 34*cdf0e10cSrcweir #include "cppuhelper/compbase2.hxx" 35*cdf0e10cSrcweir #include "cppuhelper/basemutex.hxx" 36*cdf0e10cSrcweir #include "cppuhelper/propertysetmixin.hxx" 37*cdf0e10cSrcweir #include <com/sun/star/awt/XActivateListener.hpp> 38*cdf0e10cSrcweir #include <com/sun/star/presentation/XSlideShow.hpp> 39*cdf0e10cSrcweir #include <com/sun/star/presentation/XSlideShowView.hpp> 40*cdf0e10cSrcweir #include <com/sun/star/presentation/XSlideShowListener.hpp> 41*cdf0e10cSrcweir #include <com/sun/star/presentation/XSlideShowController.hpp> 42*cdf0e10cSrcweir #include "com/sun/star/presentation/XShapeEventListener.hpp" 43*cdf0e10cSrcweir #include <com/sun/star/awt/WindowEvent.hpp> 44*cdf0e10cSrcweir #include <com/sun/star/awt/XWindowListener.hpp> 45*cdf0e10cSrcweir #include <com/sun/star/awt/XWindow.hpp> 46*cdf0e10cSrcweir #include <com/sun/star/awt/XWindowPeer.hpp> 47*cdf0e10cSrcweir #include <com/sun/star/util/XModifyListener.hpp> 48*cdf0e10cSrcweir #include <com/sun/star/awt/XPaintListener.hpp> 49*cdf0e10cSrcweir #include <com/sun/star/awt/XPointer.hpp> 50*cdf0e10cSrcweir #include <com/sun/star/drawing/XDrawPagesSupplier.hpp> 51*cdf0e10cSrcweir #include <com/sun/star/animations/XAnimationNodeSupplier.hpp> 52*cdf0e10cSrcweir #include <com/sun/star/presentation/ClickAction.hpp> 53*cdf0e10cSrcweir #include <com/sun/star/media/XManager.hpp> 54*cdf0e10cSrcweir #include <com/sun/star/media/XPlayer.hpp> 55*cdf0e10cSrcweir 56*cdf0e10cSrcweir #include <toolkit/helper/vclunohelper.hxx> 57*cdf0e10cSrcweir 58*cdf0e10cSrcweir #include <basegfx/matrix/b2dhommatrix.hxx> 59*cdf0e10cSrcweir #include <basegfx/tools/canvastools.hxx> 60*cdf0e10cSrcweir #include <vcl/help.hxx> 61*cdf0e10cSrcweir #include <tools/urlobj.hxx> 62*cdf0e10cSrcweir #include <unotools/pathoptions.hxx> 63*cdf0e10cSrcweir #include <unotools/saveopt.hxx> 64*cdf0e10cSrcweir #include <sfx2/bindings.hxx> 65*cdf0e10cSrcweir #include <sfx2/dispatch.hxx> 66*cdf0e10cSrcweir #include <sfx2/viewfrm.hxx> 67*cdf0e10cSrcweir #include <basic/sbstar.hxx> 68*cdf0e10cSrcweir #include <svx/svdpagv.hxx> 69*cdf0e10cSrcweir #include <svx/fmshell.hxx> 70*cdf0e10cSrcweir 71*cdf0e10cSrcweir #ifndef _SVX_SVXIDS_HRC 72*cdf0e10cSrcweir #include <svx/svxids.hrc> 73*cdf0e10cSrcweir #endif 74*cdf0e10cSrcweir #include "sdmod.hxx" 75*cdf0e10cSrcweir #include "cusshow.hxx" 76*cdf0e10cSrcweir #include "ViewShellBase.hxx" 77*cdf0e10cSrcweir #include "PresentationViewShell.hxx" 78*cdf0e10cSrcweir #include "ViewShell.hxx" 79*cdf0e10cSrcweir #include "drawview.hxx" 80*cdf0e10cSrcweir #include "drawdoc.hxx" 81*cdf0e10cSrcweir 82*cdf0e10cSrcweir #include "showwindow.hxx" 83*cdf0e10cSrcweir 84*cdf0e10cSrcweir #include "optsitem.hxx" 85*cdf0e10cSrcweir #include "FrameView.hxx" 86*cdf0e10cSrcweir #include "DrawDocShell.hxx" 87*cdf0e10cSrcweir 88*cdf0e10cSrcweir #ifndef _SD_APP_HRC_ 89*cdf0e10cSrcweir #include "app.hrc" 90*cdf0e10cSrcweir #endif 91*cdf0e10cSrcweir 92*cdf0e10cSrcweir #include "slideshow.hxx" 93*cdf0e10cSrcweir 94*cdf0e10cSrcweir class SfxViewFrame; 95*cdf0e10cSrcweir class SfxRequest; 96*cdf0e10cSrcweir 97*cdf0e10cSrcweir namespace css = ::com::sun::star; 98*cdf0e10cSrcweir 99*cdf0e10cSrcweir namespace sd 100*cdf0e10cSrcweir { 101*cdf0e10cSrcweir class SlideShowView; 102*cdf0e10cSrcweir class AnimationSlideController; 103*cdf0e10cSrcweir class PaneHider; 104*cdf0e10cSrcweir 105*cdf0e10cSrcweir // -------------------------------------------------------------------- 106*cdf0e10cSrcweir 107*cdf0e10cSrcweir struct PresentationSettingsEx : public PresentationSettings 108*cdf0e10cSrcweir { 109*cdf0e10cSrcweir sal_Bool mbRehearseTimings; 110*cdf0e10cSrcweir sal_Bool mbPreview; 111*cdf0e10cSrcweir ::Window* mpParentWindow; 112*cdf0e10cSrcweir css::uno::Reference< css::drawing::XDrawPage > mxStartPage; 113*cdf0e10cSrcweir css::uno::Reference< css::animations::XAnimationNode > mxAnimationNode; 114*cdf0e10cSrcweir 115*cdf0e10cSrcweir PresentationSettingsEx( const PresentationSettingsEx& ); 116*cdf0e10cSrcweir PresentationSettingsEx( PresentationSettings& ); 117*cdf0e10cSrcweir 118*cdf0e10cSrcweir void SetArguments( const css::uno::Sequence< css::beans::PropertyValue >& rArguments ) throw (css::lang::IllegalArgumentException); 119*cdf0e10cSrcweir 120*cdf0e10cSrcweir void SetPropertyValue( const ::rtl::OUString& rProperty, const css::uno::Any& rValue ) throw (css::lang::IllegalArgumentException); 121*cdf0e10cSrcweir }; 122*cdf0e10cSrcweir 123*cdf0e10cSrcweir // -------------------------------------------------------------------- 124*cdf0e10cSrcweir 125*cdf0e10cSrcweir struct WrappedShapeEventImpl 126*cdf0e10cSrcweir { 127*cdf0e10cSrcweir css::presentation::ClickAction meClickAction; 128*cdf0e10cSrcweir sal_Int32 mnVerb; 129*cdf0e10cSrcweir ::rtl::OUString maStrBookmark; 130*cdf0e10cSrcweir WrappedShapeEventImpl() : meClickAction( css::presentation::ClickAction_NONE ), mnVerb( 0 ) {}; 131*cdf0e10cSrcweir }; 132*cdf0e10cSrcweir 133*cdf0e10cSrcweir typedef boost::shared_ptr< WrappedShapeEventImpl > WrappedShapeEventImplPtr; 134*cdf0e10cSrcweir typedef std::map< css::uno::Reference< css::drawing::XShape >, WrappedShapeEventImplPtr > WrappedShapeEventImplMap; 135*cdf0e10cSrcweir 136*cdf0e10cSrcweir // -------------------------------------------------------------------- 137*cdf0e10cSrcweir 138*cdf0e10cSrcweir class SlideShowListenerProxy : private ::cppu::BaseMutex, 139*cdf0e10cSrcweir public ::cppu::WeakImplHelper2< css::presentation::XSlideShowListener, css::presentation::XShapeEventListener > 140*cdf0e10cSrcweir { 141*cdf0e10cSrcweir public: 142*cdf0e10cSrcweir SlideShowListenerProxy( const rtl::Reference< SlideshowImpl >& xController, const css::uno::Reference< css::presentation::XSlideShow >& xSlideShow ); 143*cdf0e10cSrcweir virtual ~SlideShowListenerProxy(); 144*cdf0e10cSrcweir 145*cdf0e10cSrcweir void addAsSlideShowListener(); 146*cdf0e10cSrcweir void removeAsSlideShowListener(); 147*cdf0e10cSrcweir 148*cdf0e10cSrcweir void addSlideShowListener( const css::uno::Reference< css::presentation::XSlideShowListener >& Listener ); 149*cdf0e10cSrcweir void removeSlideShowListener( const css::uno::Reference< css::presentation::XSlideShowListener >& Listener ); 150*cdf0e10cSrcweir 151*cdf0e10cSrcweir void addShapeEventListener( const css::uno::Reference< css::drawing::XShape >& xShape ); 152*cdf0e10cSrcweir void removeShapeEventListener( const css::uno::Reference< css::drawing::XShape >& xShape ); 153*cdf0e10cSrcweir 154*cdf0e10cSrcweir // css::animations::XAnimationListener 155*cdf0e10cSrcweir virtual void SAL_CALL beginEvent( const css::uno::Reference< css::animations::XAnimationNode >& Node ) throw (css::uno::RuntimeException); 156*cdf0e10cSrcweir virtual void SAL_CALL endEvent( const css::uno::Reference< css::animations::XAnimationNode >& Node ) throw (css::uno::RuntimeException); 157*cdf0e10cSrcweir virtual void SAL_CALL repeat( const css::uno::Reference< css::animations::XAnimationNode >& Node, ::sal_Int32 Repeat ) throw (css::uno::RuntimeException); 158*cdf0e10cSrcweir 159*cdf0e10cSrcweir // css::presentation::XSlideShowListener: 160*cdf0e10cSrcweir virtual void SAL_CALL paused() throw (css::uno::RuntimeException); 161*cdf0e10cSrcweir virtual void SAL_CALL resumed() throw (css::uno::RuntimeException); 162*cdf0e10cSrcweir virtual void SAL_CALL slideTransitionStarted() throw (css::uno::RuntimeException); 163*cdf0e10cSrcweir virtual void SAL_CALL slideTransitionEnded() throw (css::uno::RuntimeException); 164*cdf0e10cSrcweir virtual void SAL_CALL slideAnimationsEnded() throw (css::uno::RuntimeException); 165*cdf0e10cSrcweir virtual void SAL_CALL slideEnded(sal_Bool bReverse) throw (css::uno::RuntimeException); 166*cdf0e10cSrcweir virtual void SAL_CALL hyperLinkClicked(const ::rtl::OUString & hyperLink) throw (css::uno::RuntimeException); 167*cdf0e10cSrcweir 168*cdf0e10cSrcweir // css::lang::XEventListener: 169*cdf0e10cSrcweir virtual void SAL_CALL disposing(const css::lang::EventObject & Source) throw (css::uno::RuntimeException); 170*cdf0e10cSrcweir 171*cdf0e10cSrcweir // css::presentation::XShapeEventListener: 172*cdf0e10cSrcweir virtual void SAL_CALL click(const css::uno::Reference< css::drawing::XShape > & xShape, const css::awt::MouseEvent & aOriginalEvent) throw (css::uno::RuntimeException); 173*cdf0e10cSrcweir 174*cdf0e10cSrcweir ::cppu::OInterfaceContainerHelper maListeners; 175*cdf0e10cSrcweir 176*cdf0e10cSrcweir rtl::Reference< SlideshowImpl > mxController; 177*cdf0e10cSrcweir css::uno::Reference< css::presentation::XSlideShow > mxSlideShow; 178*cdf0e10cSrcweir }; 179*cdf0e10cSrcweir 180*cdf0e10cSrcweir // -------------------------------------------------------------------- 181*cdf0e10cSrcweir 182*cdf0e10cSrcweir typedef ::cppu::WeakComponentImplHelper2< css::presentation::XSlideShowController, css::container::XIndexAccess > SlideshowImplBase; 183*cdf0e10cSrcweir 184*cdf0e10cSrcweir class SlideshowImpl : private ::cppu::BaseMutex, public SlideshowImplBase 185*cdf0e10cSrcweir { 186*cdf0e10cSrcweir friend class SlideShow; 187*cdf0e10cSrcweir friend class SlideShowView; 188*cdf0e10cSrcweir 189*cdf0e10cSrcweir public: 190*cdf0e10cSrcweir explicit SlideshowImpl( const css::uno::Reference< css::presentation::XPresentation2 >& xPresentation, ViewShell* pViewSh, ::sd::View* pView, SdDrawDocument* pDoc, ::Window* pParentWindow); 191*cdf0e10cSrcweir 192*cdf0e10cSrcweir // css::presentation::XSlideShowController: 193*cdf0e10cSrcweir virtual ::sal_Bool SAL_CALL getAlwaysOnTop() throw (css::uno::RuntimeException); 194*cdf0e10cSrcweir virtual void SAL_CALL setAlwaysOnTop( ::sal_Bool _alwaysontop ) throw (css::uno::RuntimeException); 195*cdf0e10cSrcweir virtual ::sal_Bool SAL_CALL getMouseVisible() throw (css::uno::RuntimeException); 196*cdf0e10cSrcweir virtual void SAL_CALL setMouseVisible( ::sal_Bool _mousevisible ) throw (css::uno::RuntimeException); 197*cdf0e10cSrcweir virtual ::sal_Bool SAL_CALL getUsePen() throw (css::uno::RuntimeException); 198*cdf0e10cSrcweir virtual void SAL_CALL setUsePen( ::sal_Bool _usepen ) throw (css::uno::RuntimeException); 199*cdf0e10cSrcweir virtual ::sal_Int32 SAL_CALL getPenColor() throw (css::uno::RuntimeException); 200*cdf0e10cSrcweir virtual void SAL_CALL setPenColor( ::sal_Int32 _pencolor ) throw (css::uno::RuntimeException); 201*cdf0e10cSrcweir virtual void SAL_CALL setUseEraser( ::sal_Bool _usepen ) throw (css::uno::RuntimeException); 202*cdf0e10cSrcweir virtual double SAL_CALL getPenWidth() throw (css::uno::RuntimeException); 203*cdf0e10cSrcweir virtual void SAL_CALL setPenWidth( double dStrokeWidth ) throw (css::uno::RuntimeException); 204*cdf0e10cSrcweir virtual void SAL_CALL setEraseAllInk( bool bEraseAllInk ) throw (css::uno::RuntimeException); 205*cdf0e10cSrcweir virtual void SAL_CALL setEraseInk( sal_Int32 nEraseInkSize ) throw (css::uno::RuntimeException); 206*cdf0e10cSrcweir virtual void SAL_CALL setPenMode( bool bSwitchPenMode) throw (css::uno::RuntimeException); 207*cdf0e10cSrcweir virtual void SAL_CALL setEraserMode( bool bSwitchEraserMode ) throw (css::uno::RuntimeException); 208*cdf0e10cSrcweir virtual ::sal_Bool SAL_CALL isRunning( ) throw (css::uno::RuntimeException); 209*cdf0e10cSrcweir virtual ::sal_Int32 SAL_CALL getSlideCount( ) throw (css::uno::RuntimeException); 210*cdf0e10cSrcweir virtual css::uno::Reference< css::drawing::XDrawPage > SAL_CALL getSlideByIndex( ::sal_Int32 Index ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException); 211*cdf0e10cSrcweir virtual void SAL_CALL addSlideShowListener( const css::uno::Reference< css::presentation::XSlideShowListener >& Listener ) throw (css::uno::RuntimeException); 212*cdf0e10cSrcweir virtual void SAL_CALL removeSlideShowListener( const css::uno::Reference< css::presentation::XSlideShowListener >& Listener ) throw (css::uno::RuntimeException); 213*cdf0e10cSrcweir virtual void SAL_CALL gotoNextEffect( ) throw (css::uno::RuntimeException); 214*cdf0e10cSrcweir virtual void SAL_CALL gotoPreviousEffect( ) throw (css::uno::RuntimeException); 215*cdf0e10cSrcweir virtual void SAL_CALL gotoFirstSlide( ) throw (css::uno::RuntimeException); 216*cdf0e10cSrcweir virtual void SAL_CALL gotoNextSlide( ) throw (css::uno::RuntimeException); 217*cdf0e10cSrcweir virtual void SAL_CALL gotoPreviousSlide( ) throw (css::uno::RuntimeException); 218*cdf0e10cSrcweir virtual void SAL_CALL gotoLastSlide( ) throw (css::uno::RuntimeException); 219*cdf0e10cSrcweir virtual void SAL_CALL gotoBookmark( const ::rtl::OUString& Bookmark ) throw (css::uno::RuntimeException); 220*cdf0e10cSrcweir virtual void SAL_CALL gotoSlide( const css::uno::Reference< css::drawing::XDrawPage >& Page ) throw (css::lang::IllegalArgumentException, css::uno::RuntimeException); 221*cdf0e10cSrcweir virtual void SAL_CALL gotoSlideIndex( ::sal_Int32 Index ) throw (css::uno::RuntimeException); 222*cdf0e10cSrcweir virtual void SAL_CALL stopSound( ) throw (css::uno::RuntimeException); 223*cdf0e10cSrcweir virtual void SAL_CALL pause( ) throw (css::uno::RuntimeException); 224*cdf0e10cSrcweir virtual void SAL_CALL resume( ) throw (css::uno::RuntimeException); 225*cdf0e10cSrcweir virtual ::sal_Bool SAL_CALL isPaused( ) throw (css::uno::RuntimeException); 226*cdf0e10cSrcweir virtual void SAL_CALL blankScreen( ::sal_Int32 Color ) throw (css::uno::RuntimeException); 227*cdf0e10cSrcweir virtual void SAL_CALL activate( ) throw (css::uno::RuntimeException); 228*cdf0e10cSrcweir virtual void SAL_CALL deactivate( ) throw (css::uno::RuntimeException); 229*cdf0e10cSrcweir virtual ::sal_Bool SAL_CALL isActive( ) throw (css::uno::RuntimeException); 230*cdf0e10cSrcweir virtual css::uno::Reference< css::drawing::XDrawPage > SAL_CALL getCurrentSlide( ) throw (css::uno::RuntimeException); 231*cdf0e10cSrcweir virtual ::sal_Int32 SAL_CALL getCurrentSlideIndex( ) throw (css::uno::RuntimeException); 232*cdf0e10cSrcweir virtual ::sal_Int32 SAL_CALL getNextSlideIndex( ) throw (css::uno::RuntimeException); 233*cdf0e10cSrcweir virtual ::sal_Bool SAL_CALL isEndless( ) throw (css::uno::RuntimeException); 234*cdf0e10cSrcweir virtual ::sal_Bool SAL_CALL isFullScreen( ) throw (css::uno::RuntimeException); 235*cdf0e10cSrcweir virtual css::uno::Reference< css::presentation::XSlideShow > SAL_CALL getSlideShow( ) throw (css::uno::RuntimeException); 236*cdf0e10cSrcweir 237*cdf0e10cSrcweir // XIndexAccess 238*cdf0e10cSrcweir virtual ::sal_Int32 SAL_CALL getCount( ) throw (::com::sun::star::uno::RuntimeException); 239*cdf0e10cSrcweir virtual ::com::sun::star::uno::Any SAL_CALL getByIndex( ::sal_Int32 Index ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); 240*cdf0e10cSrcweir virtual ::com::sun::star::uno::Type SAL_CALL getElementType( ) throw (::com::sun::star::uno::RuntimeException); 241*cdf0e10cSrcweir virtual ::sal_Bool SAL_CALL hasElements( ) throw (::com::sun::star::uno::RuntimeException); 242*cdf0e10cSrcweir 243*cdf0e10cSrcweir // will be called from the SlideShowListenerProxy when this event is fired from the XSlideShow 244*cdf0e10cSrcweir void slideEnded(const bool bReverse); 245*cdf0e10cSrcweir void hyperLinkClicked(const ::rtl::OUString & hyperLink) throw (css::uno::RuntimeException); 246*cdf0e10cSrcweir void click(const css::uno::Reference< css::drawing::XShape > & xShape, const css::awt::MouseEvent & aOriginalEvent); 247*cdf0e10cSrcweir 248*cdf0e10cSrcweir /// ends the presentation async 249*cdf0e10cSrcweir void endPresentation(); 250*cdf0e10cSrcweir 251*cdf0e10cSrcweir ViewShell* getViewShell() const { return mpViewShell; } 252*cdf0e10cSrcweir 253*cdf0e10cSrcweir void paint( const Rectangle& rRect ); 254*cdf0e10cSrcweir bool keyInput(const KeyEvent& rKEvt); 255*cdf0e10cSrcweir void mouseButtonUp(const MouseEvent& rMEvt); 256*cdf0e10cSrcweir 257*cdf0e10cSrcweir private: 258*cdf0e10cSrcweir SlideshowImpl(SlideshowImpl &); // not defined 259*cdf0e10cSrcweir void operator =(SlideshowImpl &); // not defined 260*cdf0e10cSrcweir 261*cdf0e10cSrcweir virtual ~SlideshowImpl(); 262*cdf0e10cSrcweir 263*cdf0e10cSrcweir // overload WeakComponentImplHelperBase::disposing() 264*cdf0e10cSrcweir // This function is called upon disposing the component, 265*cdf0e10cSrcweir // if your component needs special work when it becomes 266*cdf0e10cSrcweir // disposed, do it here. 267*cdf0e10cSrcweir virtual void SAL_CALL disposing(); 268*cdf0e10cSrcweir 269*cdf0e10cSrcweir // internal 270*cdf0e10cSrcweir bool startShow( PresentationSettingsEx* pPresSettings ); 271*cdf0e10cSrcweir bool startPreview( 272*cdf0e10cSrcweir const css::uno::Reference< css::drawing::XDrawPage >& xDrawPage, 273*cdf0e10cSrcweir const css::uno::Reference< css::animations::XAnimationNode >& xAnimationNode, 274*cdf0e10cSrcweir ::Window* pParent ); 275*cdf0e10cSrcweir 276*cdf0e10cSrcweir ShowWindow* getShowWindow() const { return mpShowWindow; } 277*cdf0e10cSrcweir 278*cdf0e10cSrcweir /** forces an async call to update in the main thread */ 279*cdf0e10cSrcweir void startUpdateTimer(); 280*cdf0e10cSrcweir 281*cdf0e10cSrcweir double update(); 282*cdf0e10cSrcweir 283*cdf0e10cSrcweir void createSlideList( bool bAll, bool bStartWithActualSlide, const String& rPresSlide ); 284*cdf0e10cSrcweir 285*cdf0e10cSrcweir void displayCurrentSlide (const bool bSkipAllMainSequenceEffects = false); 286*cdf0e10cSrcweir 287*cdf0e10cSrcweir void displaySlideNumber( sal_Int32 nSlide ); 288*cdf0e10cSrcweir void displaySlideIndex( sal_Int32 nIndex ); 289*cdf0e10cSrcweir sal_Int32 getCurrentSlideNumber(); 290*cdf0e10cSrcweir sal_Int32 getFirstSlideNumber(); 291*cdf0e10cSrcweir sal_Int32 getLastSlideNumber(); 292*cdf0e10cSrcweir inline bool isInputFreezed() const { return mbInputFreeze; } 293*cdf0e10cSrcweir 294*cdf0e10cSrcweir void jumpToBookmark( const String& sBookmark ); 295*cdf0e10cSrcweir 296*cdf0e10cSrcweir void hideChildWindows(); 297*cdf0e10cSrcweir void showChildWindows(); 298*cdf0e10cSrcweir 299*cdf0e10cSrcweir void resize( const Size& rSize ); 300*cdf0e10cSrcweir 301*cdf0e10cSrcweir void setActiveXToolbarsVisible( sal_Bool bVisible ); 302*cdf0e10cSrcweir 303*cdf0e10cSrcweir DECL_LINK( updateHdl, Timer* ); 304*cdf0e10cSrcweir DECL_LINK( PostYieldListener, void* ); 305*cdf0e10cSrcweir DECL_LINK( ReadyForNextInputHdl, Timer* ); 306*cdf0e10cSrcweir DECL_LINK( endPresentationHdl, void* ); 307*cdf0e10cSrcweir DECL_LINK( ContextMenuSelectHdl, Menu * ); 308*cdf0e10cSrcweir DECL_LINK( ContextMenuHdl, void* ); 309*cdf0e10cSrcweir DECL_LINK( deactivateHdl, Timer* ); 310*cdf0e10cSrcweir DECL_LINK( EventListenerHdl, VclSimpleEvent* ); 311*cdf0e10cSrcweir 312*cdf0e10cSrcweir // helper 313*cdf0e10cSrcweir void receiveRequest(SfxRequest& rReq); 314*cdf0e10cSrcweir 315*cdf0e10cSrcweir /** called only by the slideshow view when the first paint event occurs. 316*cdf0e10cSrcweir This actually starts the slideshow. */ 317*cdf0e10cSrcweir void onFirstPaint(); 318*cdf0e10cSrcweir 319*cdf0e10cSrcweir long getRestoreSlide() const { return mnRestoreSlide; } 320*cdf0e10cSrcweir 321*cdf0e10cSrcweir private: 322*cdf0e10cSrcweir bool startShowImpl( 323*cdf0e10cSrcweir const css::uno::Sequence< css::beans::PropertyValue >& aProperties ); 324*cdf0e10cSrcweir 325*cdf0e10cSrcweir SfxViewFrame* getViewFrame() const; 326*cdf0e10cSrcweir SfxDispatcher* getDispatcher() const; 327*cdf0e10cSrcweir SfxBindings* getBindings() const; 328*cdf0e10cSrcweir 329*cdf0e10cSrcweir sal_Int32 getSlideNumberForBookmark( const rtl::OUString& rStrBookmark ); 330*cdf0e10cSrcweir 331*cdf0e10cSrcweir void removeShapeEvents(); 332*cdf0e10cSrcweir void registerShapeEvents( sal_Int32 nSlideNumber ); 333*cdf0e10cSrcweir void registerShapeEvents( css::uno::Reference< css::drawing::XShapes >& xShapes ) throw (css::uno::Exception); 334*cdf0e10cSrcweir 335*cdf0e10cSrcweir css::uno::Reference< css::presentation::XSlideShow > createSlideShow() const; 336*cdf0e10cSrcweir 337*cdf0e10cSrcweir void setAutoSaveState( bool bOn ); 338*cdf0e10cSrcweir void gotoPreviousSlide (const bool bSkipAllMainSequenceEffects); 339*cdf0e10cSrcweir 340*cdf0e10cSrcweir /** Called by PostYieldListener and updateHdl handlers this method is 341*cdf0e10cSrcweir responsible to call the slideshow update() method and, depending on 342*cdf0e10cSrcweir its return value, wait for a certain amount of time before another 343*cdf0e10cSrcweir call to update() is scheduled. 344*cdf0e10cSrcweir */ 345*cdf0e10cSrcweir sal_Int32 updateSlideShow (void); 346*cdf0e10cSrcweir 347*cdf0e10cSrcweir css::uno::Reference< css::presentation::XSlideShow > mxShow; 348*cdf0e10cSrcweir comphelper::ImplementationReference< ::sd::SlideShowView, css::presentation::XSlideShowView > mxView; 349*cdf0e10cSrcweir css::uno::Reference< css::frame::XModel > mxModel; 350*cdf0e10cSrcweir 351*cdf0e10cSrcweir Timer maUpdateTimer; 352*cdf0e10cSrcweir Timer maInputFreezeTimer; 353*cdf0e10cSrcweir Timer maDeactivateTimer; 354*cdf0e10cSrcweir 355*cdf0e10cSrcweir ::sd::View* mpView; 356*cdf0e10cSrcweir ViewShell* mpViewShell; 357*cdf0e10cSrcweir DrawDocShell* mpDocSh; 358*cdf0e10cSrcweir SdDrawDocument* mpDoc; 359*cdf0e10cSrcweir 360*cdf0e10cSrcweir SfxItemSet* mpNewAttr; 361*cdf0e10cSrcweir ::Window* mpParentWindow; 362*cdf0e10cSrcweir ShowWindow* mpShowWindow; 363*cdf0e10cSrcweir PushButton* mpTimeButton; 364*cdf0e10cSrcweir 365*cdf0e10cSrcweir boost::shared_ptr< AnimationSlideController > mpSlideController; 366*cdf0e10cSrcweir 367*cdf0e10cSrcweir long mnRestoreSlide; 368*cdf0e10cSrcweir Point maSlideOrigin; 369*cdf0e10cSrcweir Point maPopupMousePos; 370*cdf0e10cSrcweir Size maSlideSize; 371*cdf0e10cSrcweir Size maPresSize; 372*cdf0e10cSrcweir AnimationMode meAnimationMode; 373*cdf0e10cSrcweir String maCharBuffer; 374*cdf0e10cSrcweir Pointer maOldPointer; 375*cdf0e10cSrcweir Pointer maPencil; 376*cdf0e10cSrcweir std::vector< ::sd::Window* > maDrawModeWindows; 377*cdf0e10cSrcweir ::sd::Window* mpOldActiveWindow; 378*cdf0e10cSrcweir Link maStarBASICGlobalErrorHdl; 379*cdf0e10cSrcweir unsigned long mnChildMask; 380*cdf0e10cSrcweir bool mbGridVisible; 381*cdf0e10cSrcweir bool mbBordVisible; 382*cdf0e10cSrcweir bool mbSlideBorderVisible; 383*cdf0e10cSrcweir bool mbSetOnlineSpelling; 384*cdf0e10cSrcweir bool mbDisposed; 385*cdf0e10cSrcweir bool mbMouseIsDrawing; 386*cdf0e10cSrcweir bool mbAutoSaveWasOn; 387*cdf0e10cSrcweir bool mbRehearseTimings; 388*cdf0e10cSrcweir bool mbDesignMode; 389*cdf0e10cSrcweir bool mbIsPaused; 390*cdf0e10cSrcweir bool mbWasPaused; // used to cache pause state during context menu 391*cdf0e10cSrcweir bool mbInputFreeze; 392*cdf0e10cSrcweir sal_Bool mbActive; 393*cdf0e10cSrcweir 394*cdf0e10cSrcweir PresentationSettings maPresSettings; 395*cdf0e10cSrcweir sal_Int32 mnUserPaintColor; 396*cdf0e10cSrcweir 397*cdf0e10cSrcweir bool mbUsePen; 398*cdf0e10cSrcweir double mdUserPaintStrokeWidth; 399*cdf0e10cSrcweir 400*cdf0e10cSrcweir /// used in updateHdl to prevent recursive calls 401*cdf0e10cSrcweir sal_Int32 mnEntryCounter; 402*cdf0e10cSrcweir 403*cdf0e10cSrcweir sal_Int32 mnLastSlideNumber; 404*cdf0e10cSrcweir WrappedShapeEventImplMap maShapeEventMap; 405*cdf0e10cSrcweir 406*cdf0e10cSrcweir ::rtl::OUString msOnClick; 407*cdf0e10cSrcweir ::rtl::OUString msBookmark; 408*cdf0e10cSrcweir ::rtl::OUString msVerb; 409*cdf0e10cSrcweir 410*cdf0e10cSrcweir css::uno::Reference< css::drawing::XDrawPage > mxPreviewDrawPage; 411*cdf0e10cSrcweir css::uno::Reference< css::animations::XAnimationNode > mxPreviewAnimationNode; 412*cdf0e10cSrcweir 413*cdf0e10cSrcweir css::uno::Reference< css::media::XPlayer > mxPlayer; 414*cdf0e10cSrcweir 415*cdf0e10cSrcweir ::std::auto_ptr<PaneHider> mpPaneHider; 416*cdf0e10cSrcweir 417*cdf0e10cSrcweir sal_uLong mnEndShowEvent; 418*cdf0e10cSrcweir sal_uLong mnContextMenuEvent; 419*cdf0e10cSrcweir sal_Int32 mnUpdateEvent; 420*cdf0e10cSrcweir 421*cdf0e10cSrcweir css::uno::Reference< css::presentation::XPresentation2 > mxPresentation; 422*cdf0e10cSrcweir ::rtl::Reference< SlideShowListenerProxy > mxListenerProxy; 423*cdf0e10cSrcweir }; 424*cdf0e10cSrcweir 425*cdf0e10cSrcweir } // namespace ::sd 426*cdf0e10cSrcweir 427*cdf0e10cSrcweir #endif 428