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