/************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: slideshowimpl.hxx,v $ * $Revision: 1.29 $ * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License version 3 * only, as published by the Free Software Foundation. * * OpenOffice.org is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License version 3 for more details * (a copy is included in the LICENSE file that accompanied this code). * * You should have received a copy of the GNU Lesser General Public License * version 3 along with OpenOffice.org. If not, see * * for a copy of the LGPLv3 License. * ************************************************************************/ #ifndef _SD_SlideShowImpl_HXX_ #define _SD_SlideShowImpl_HXX_ #include "sal/config.h" #include "com/sun/star/uno/XComponentContext.hpp" #include "cppuhelper/compbase1.hxx" #include "cppuhelper/compbase2.hxx" #include "cppuhelper/basemutex.hxx" #include "cppuhelper/propertysetmixin.hxx" #include #include #include #include #include #include "com/sun/star/presentation/XShapeEventListener.hpp" #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #ifndef _SVX_SVXIDS_HRC #include #endif #include "sdmod.hxx" #include "cusshow.hxx" #include "ViewShellBase.hxx" #include "PresentationViewShell.hxx" #include "ViewShell.hxx" #include "drawview.hxx" #include "drawdoc.hxx" #include "showwindow.hxx" #include "optsitem.hxx" #include "FrameView.hxx" #include "DrawDocShell.hxx" #ifndef _SD_APP_HRC_ #include "app.hrc" #endif #include "slideshow.hxx" class SfxViewFrame; class SfxRequest; namespace css = ::com::sun::star; namespace sd { class SlideShowView; class AnimationSlideController; class PaneHider; // -------------------------------------------------------------------- struct PresentationSettingsEx : public PresentationSettings { sal_Bool mbRehearseTimings; sal_Bool mbPreview; ::Window* mpParentWindow; css::uno::Reference< css::drawing::XDrawPage > mxStartPage; css::uno::Reference< css::animations::XAnimationNode > mxAnimationNode; PresentationSettingsEx(); PresentationSettingsEx( PresentationSettingsEx& ); PresentationSettingsEx( PresentationSettings& ); void SetArguments( const css::uno::Sequence< css::beans::PropertyValue >& rArguments ) throw (css::lang::IllegalArgumentException); void SetPropertyValue( const ::rtl::OUString& rProperty, const css::uno::Any& rValue ) throw (css::lang::IllegalArgumentException); }; // -------------------------------------------------------------------- struct WrappedShapeEventImpl { css::presentation::ClickAction meClickAction; sal_Int32 mnVerb; ::rtl::OUString maStrBookmark; WrappedShapeEventImpl() : meClickAction( css::presentation::ClickAction_NONE ), mnVerb( 0 ) {}; }; typedef boost::shared_ptr< WrappedShapeEventImpl > WrappedShapeEventImplPtr; typedef std::map< css::uno::Reference< css::drawing::XShape >, WrappedShapeEventImplPtr > WrappedShapeEventImplMap; // -------------------------------------------------------------------- class SlideShowListenerProxy : private ::cppu::BaseMutex, public ::cppu::WeakImplHelper2< css::presentation::XSlideShowListener, css::presentation::XShapeEventListener > { public: SlideShowListenerProxy( const rtl::Reference< SlideshowImpl >& xController, const css::uno::Reference< css::presentation::XSlideShow >& xSlideShow ); virtual ~SlideShowListenerProxy(); void addAsSlideShowListener(); void removeAsSlideShowListener(); void addSlideShowListener( const css::uno::Reference< css::presentation::XSlideShowListener >& Listener ); void removeSlideShowListener( const css::uno::Reference< css::presentation::XSlideShowListener >& Listener ); void addShapeEventListener( const css::uno::Reference< css::drawing::XShape >& xShape ); void removeShapeEventListener( const css::uno::Reference< css::drawing::XShape >& xShape ); // css::animations::XAnimationListener virtual void SAL_CALL beginEvent( const css::uno::Reference< css::animations::XAnimationNode >& Node ) throw (css::uno::RuntimeException); virtual void SAL_CALL endEvent( const css::uno::Reference< css::animations::XAnimationNode >& Node ) throw (css::uno::RuntimeException); virtual void SAL_CALL repeat( const css::uno::Reference< css::animations::XAnimationNode >& Node, ::sal_Int32 Repeat ) throw (css::uno::RuntimeException); // css::presentation::XSlideShowListener: virtual void SAL_CALL paused() throw (css::uno::RuntimeException); virtual void SAL_CALL resumed() throw (css::uno::RuntimeException); virtual void SAL_CALL slideTransitionStarted() throw (css::uno::RuntimeException); virtual void SAL_CALL slideTransitionEnded() throw (css::uno::RuntimeException); virtual void SAL_CALL slideAnimationsEnded() throw (css::uno::RuntimeException); virtual void SAL_CALL slideEnded() throw (css::uno::RuntimeException); virtual void SAL_CALL hyperLinkClicked(const ::rtl::OUString & hyperLink) throw (css::uno::RuntimeException); // css::lang::XEventListener: virtual void SAL_CALL disposing(const css::lang::EventObject & Source) throw (css::uno::RuntimeException); // css::presentation::XShapeEventListener: virtual void SAL_CALL click(const css::uno::Reference< css::drawing::XShape > & xShape, const css::awt::MouseEvent & aOriginalEvent) throw (css::uno::RuntimeException); ::cppu::OInterfaceContainerHelper maListeners; rtl::Reference< SlideshowImpl > mxController; css::uno::Reference< css::presentation::XSlideShow > mxSlideShow; }; // -------------------------------------------------------------------- typedef ::cppu::WeakComponentImplHelper2< css::presentation::XSlideShowController, css::container::XIndexAccess > SlideshowImplBase; class SlideshowImpl : private ::cppu::BaseMutex, public SlideshowImplBase { friend class SlideShow; friend class SlideShowView; public: explicit SlideshowImpl( const css::uno::Reference< css::presentation::XPresentation2 >& xPresentation, ViewShell* pViewSh, ::sd::View* pView, SdDrawDocument* pDoc, ::Window* pParentWindow); // css::presentation::XSlideShowController: virtual ::sal_Bool SAL_CALL getAlwaysOnTop() throw (css::uno::RuntimeException); virtual void SAL_CALL setAlwaysOnTop( ::sal_Bool _alwaysontop ) throw (css::uno::RuntimeException); virtual ::sal_Bool SAL_CALL getMouseVisible() throw (css::uno::RuntimeException); virtual void SAL_CALL setMouseVisible( ::sal_Bool _mousevisible ) throw (css::uno::RuntimeException); virtual ::sal_Bool SAL_CALL getUsePen() throw (css::uno::RuntimeException); virtual void SAL_CALL setUsePen( ::sal_Bool _usepen ) throw (css::uno::RuntimeException); virtual ::sal_Int32 SAL_CALL getPenColor() throw (css::uno::RuntimeException); virtual void SAL_CALL setPenColor( ::sal_Int32 _pencolor ) throw (css::uno::RuntimeException); virtual ::sal_Bool SAL_CALL isRunning( ) throw (css::uno::RuntimeException); virtual ::sal_Int32 SAL_CALL getSlideCount( ) throw (css::uno::RuntimeException); virtual css::uno::Reference< css::drawing::XDrawPage > SAL_CALL getSlideByIndex( ::sal_Int32 Index ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException); virtual void SAL_CALL addSlideShowListener( const css::uno::Reference< css::presentation::XSlideShowListener >& Listener ) throw (css::uno::RuntimeException); virtual void SAL_CALL removeSlideShowListener( const css::uno::Reference< css::presentation::XSlideShowListener >& Listener ) throw (css::uno::RuntimeException); virtual void SAL_CALL gotoNextEffect( ) throw (css::uno::RuntimeException); virtual void SAL_CALL gotoFirstSlide( ) throw (css::uno::RuntimeException); virtual void SAL_CALL gotoNextSlide( ) throw (css::uno::RuntimeException); virtual void SAL_CALL gotoPreviousSlide( ) throw (css::uno::RuntimeException); virtual void SAL_CALL gotoLastSlide( ) throw (css::uno::RuntimeException); virtual void SAL_CALL gotoBookmark( const ::rtl::OUString& Bookmark ) throw (css::uno::RuntimeException); virtual void SAL_CALL gotoSlide( const css::uno::Reference< css::drawing::XDrawPage >& Page ) throw (css::lang::IllegalArgumentException, css::uno::RuntimeException); virtual void SAL_CALL gotoSlideIndex( ::sal_Int32 Index ) throw (css::uno::RuntimeException); virtual void SAL_CALL stopSound( ) throw (css::uno::RuntimeException); virtual void SAL_CALL pause( ) throw (css::uno::RuntimeException); virtual void SAL_CALL resume( ) throw (css::uno::RuntimeException); virtual ::sal_Bool SAL_CALL isPaused( ) throw (css::uno::RuntimeException); virtual void SAL_CALL blankScreen( ::sal_Int32 Color ) throw (css::uno::RuntimeException); virtual void SAL_CALL activate( ) throw (css::uno::RuntimeException); virtual void SAL_CALL deactivate( ) throw (css::uno::RuntimeException); virtual ::sal_Bool SAL_CALL isActive( ) throw (css::uno::RuntimeException); virtual css::uno::Reference< css::drawing::XDrawPage > SAL_CALL getCurrentSlide( ) throw (css::uno::RuntimeException); virtual ::sal_Int32 SAL_CALL getCurrentSlideIndex( ) throw (css::uno::RuntimeException); virtual ::sal_Int32 SAL_CALL getNextSlideIndex( ) throw (css::uno::RuntimeException); virtual ::sal_Bool SAL_CALL isEndless( ) throw (css::uno::RuntimeException); virtual ::sal_Bool SAL_CALL isFullScreen( ) throw (css::uno::RuntimeException); virtual css::uno::Reference< css::presentation::XSlideShow > SAL_CALL getSlideShow( ) throw (css::uno::RuntimeException); // XIndexAccess virtual ::sal_Int32 SAL_CALL getCount( ) throw (::com::sun::star::uno::RuntimeException); 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); virtual ::com::sun::star::uno::Type SAL_CALL getElementType( ) throw (::com::sun::star::uno::RuntimeException); virtual ::sal_Bool SAL_CALL hasElements( ) throw (::com::sun::star::uno::RuntimeException); // will be called from the SlideShowListenerProxy when this event is fired from the XSlideShow void slideEnded(); void hyperLinkClicked(const ::rtl::OUString & hyperLink) throw (css::uno::RuntimeException); void click(const css::uno::Reference< css::drawing::XShape > & xShape, const css::awt::MouseEvent & aOriginalEvent); /// ends the presentation async void endPresentation(); ViewShell* getViewShell() const { return mpViewShell; } void paint( const Rectangle& rRect ); bool keyInput(const KeyEvent& rKEvt); void mouseButtonUp(const MouseEvent& rMEvt); private: SlideshowImpl(SlideshowImpl &); // not defined void operator =(SlideshowImpl &); // not defined virtual ~SlideshowImpl(); // overload WeakComponentImplHelperBase::disposing() // This function is called upon disposing the component, // if your component needs special work when it becomes // disposed, do it here. virtual void SAL_CALL disposing(); // internal bool startShow( PresentationSettingsEx* pPresSettings ); bool startPreview( const css::uno::Reference< css::drawing::XDrawPage >& xDrawPage, const css::uno::Reference< css::animations::XAnimationNode >& xAnimationNode, ::Window* pParent ); ShowWindow* getShowWindow() const { return mpShowWindow; } /** forces an async call to update in the main thread */ void startUpdateTimer(); double update(); void createSlideList( bool bAll, bool bStartWithActualSlide, const String& rPresSlide ); void displayCurrentSlide(); void displaySlideNumber( sal_Int32 nSlide ); void displaySlideIndex( sal_Int32 nIndex ); sal_Int32 getCurrentSlideNumber(); sal_Int32 getFirstSlideNumber(); sal_Int32 getLastSlideNumber(); inline bool isInputFreezed() const { return mbInputFreeze; } void jumpToBookmark( const String& sBookmark ); void hideChildWindows(); void showChildWindows(); void resize( const Size& rSize ); void setActiveXToolbarsVisible( sal_Bool bVisible ); DECL_LINK( updateHdl, Timer* ); DECL_LINK( ReadyForNextInputHdl, Timer* ); DECL_LINK( endPresentationHdl, void* ); DECL_LINK( ContextMenuSelectHdl, Menu * ); DECL_LINK( ContextMenuHdl, void* ); DECL_LINK( deactivateHdl, Timer* ); DECL_LINK( EventListenerHdl, VclSimpleEvent* ); // helper void receiveRequest(SfxRequest& rReq); /** called only by the slideshow view when the first paint event occurs. This actually starts the slideshow. */ void onFirstPaint(); long getRestoreSlide() const { return mnRestoreSlide; } private: bool startShowImpl( const css::uno::Sequence< css::beans::PropertyValue >& aProperties ); SfxViewFrame* getViewFrame() const; SfxDispatcher* getDispatcher() const; SfxBindings* getBindings() const; sal_Int32 getSlideNumberForBookmark( const rtl::OUString& rStrBookmark ); void removeShapeEvents(); void registerShapeEvents( sal_Int32 nSlideNumber ); void registerShapeEvents( css::uno::Reference< css::drawing::XShapes >& xShapes ) throw (css::uno::Exception); css::uno::Reference< css::presentation::XSlideShow > createSlideShow() const; void setAutoSaveState( bool bOn ); css::uno::Reference< css::presentation::XSlideShow > mxShow; comphelper::ImplementationReference< ::sd::SlideShowView, css::presentation::XSlideShowView > mxView; css::uno::Reference< css::frame::XModel > mxModel; Timer maUpdateTimer; Timer maInputFreezeTimer; Timer maDeactivateTimer; ::sd::View* mpView; ViewShell* mpViewShell; DrawDocShell* mpDocSh; SdDrawDocument* mpDoc; SfxItemSet* mpNewAttr; ::Window* mpParentWindow; ShowWindow* mpShowWindow; PushButton* mpTimeButton; boost::shared_ptr< AnimationSlideController > mpSlideController; long mnRestoreSlide; Point maSlideOrigin; Point maPopupMousePos; Size maSlideSize; Size maPresSize; AnimationMode meAnimationMode; String maCharBuffer; Pointer maOldPointer; Pointer maPencil; std::vector< ::sd::Window* > maDrawModeWindows; ::sd::Window* mpOldActiveWindow; Link maStarBASICGlobalErrorHdl; unsigned long mnChildMask; bool mbGridVisible; bool mbBordVisible; bool mbSlideBorderVisible; bool mbSetOnlineSpelling; bool mbDisposed; bool mbMouseIsDrawing; bool mbAutoSaveWasOn; bool mbRehearseTimings; bool mbDesignMode; bool mbIsPaused; bool mbWasPaused; // used to cache pause state during context menu bool mbInputFreeze; sal_Bool mbActive; PresentationSettings maPresSettings; sal_Int32 mnUserPaintColor; /// used in updateHdl to prevent recursive calls sal_Int32 mnEntryCounter; sal_Int32 mnLastSlideNumber; WrappedShapeEventImplMap maShapeEventMap; ::rtl::OUString msOnClick; ::rtl::OUString msBookmark; ::rtl::OUString msVerb; css::uno::Reference< css::drawing::XDrawPage > mxPreviewDrawPage; css::uno::Reference< css::animations::XAnimationNode > mxPreviewAnimationNode; css::uno::Reference< css::media::XPlayer > mxPlayer; ::std::auto_ptr mpPaneHider; ULONG mnEndShowEvent; ULONG mnContextMenuEvent; sal_Int32 mnUpdateEvent; css::uno::Reference< css::presentation::XPresentation2 > mxPresentation; ::rtl::Reference< SlideShowListenerProxy > mxListenerProxy; }; } // namespace ::sd #endif ebird-sdbc2'>feature/firebird-sdbc2 LibreOffice 核心代码仓库文档基金会
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2016-06-20tdf#89657 sign Mac languagepack installer and force-start-close LOChristian Lohmaier
starting LO once satisfies Gatekeeper's verification, even when the langaugepack's content are added afterwards Change-Id: Ie548df39a7ec07cc485c40148e4ca75101346798
2015-02-10Attempt at fixing Mac OS X code signingStephan Bergmann
...so that LibreOffice.app dmgs built with --enable-macosx-code-signing with an appstore-enabled identity will hopefully no longer be rejected on Mac OS X >= 10.9.5 as "'soffice' can't be opened because the identity of the developer cannot be confirmed." (Which I cannot verify for lack of an appstore-enabled certificate, though.) First of all, do not ignore errors from calls to codesign utitlity. Really. That reveals that soffice cannot be signed as soon as it is linked, as it requires all the other stuff in the app to be already signed. So just don't sign it after linking, it will be signed last step in macosx-codesign-app-bundle anyway. Second, --resource-rules exemptions are no longer allowed per <https://developer.apple.com/library/mac/technotes/tn2206/_index.html> "OS X Code Signing In Depth." Third, the handful of remaining shell scripts in MacOS/ need to be signed too. (Signing them adds extended attributes to the files.) Unfortunately, as discussed at <http://porkrind.org/missives/mac-os-x-codesigning-woes/> "Mac OS X codesigning woes," "hdiutil makehybrid" drops extended attributes from the generated dmg (so the dmg's LibreOffice.app would no longer be considered properly signed, as the shell scripts would no longer be signed). So switch from "hdiutil makehybrid" to "hdiutil create." Change-Id: I4b587f87d504666f7a1d0e3a24a8be76f22014c5
2014-09-09Make the "Mac-like" or "canonical" app bundle structure always used on OS XTor Lillqvist
In other words, only executable files go in the MacOS folder. Dynamic libraries and bundled frameworks (i.e., LibreOfficePython), and nothing else, go in the Frameworks folder, and all other files go in the Resources folder. Especially, note that Java class files and rc (.ini) files also go in Resources. Such an app bundle structure is what Apple strongly suggests one should use, and it has been hinted that future versions of code signing and/or Gatekeeper will require such a structure. There is still some ugliness thanks to traces of the historical separation of URE from "the office". Like there are two separate "unorc" files, one for URE, one for the LibreOffice application. IMHO, this should be cleaned up, but is probably controversial. (Eek! I now see there are actually *three* unorc files in the app bundle. Not intentional. Need to fix that later.) Change-Id: Idcf235038deb5b8e1d061734993e9f31869b7606