From cae4370bce63e161fc5ecceb70f74ca50d64ed93 Mon Sep 17 00:00:00 2001 From: Zolnai Tamás Date: Wed, 16 Apr 2014 09:28:51 +0200 Subject: Rename ExternalMediaShape to IExternalMediaShapeBase "I" because of interface. "Base" because it's an interface of a base class and because it's easy to mix it up with the inherited MediaShape. (MediaShape also an externally rendered thing so the name ExternalMediaShape doesn't make any difference between the two classes) Change-Id: I4a03dd090034092942eea39d35894ce6cfc9947b --- .../engine/animationnodes/animationcommandnode.cxx | 2 +- .../engine/animationnodes/animationcommandnode.hxx | 4 +- .../source/engine/shapes/externalshapebase.hxx | 4 +- slideshow/source/inc/externalmediashape.hxx | 85 --------------------- slideshow/source/inc/iexternalmediashapebase.hxx | 86 ++++++++++++++++++++++ 5 files changed, 91 insertions(+), 90 deletions(-) delete mode 100644 slideshow/source/inc/externalmediashape.hxx create mode 100644 slideshow/source/inc/iexternalmediashapebase.hxx (limited to 'slideshow') diff --git a/slideshow/source/engine/animationnodes/animationcommandnode.cxx b/slideshow/source/engine/animationnodes/animationcommandnode.cxx index c7cbf0969268..be7b2b767972 100644 --- a/slideshow/source/engine/animationnodes/animationcommandnode.cxx +++ b/slideshow/source/engine/animationnodes/animationcommandnode.cxx @@ -49,7 +49,7 @@ AnimationCommandNode::AnimationCommandNode( uno::Reference xShape( mxCommandNode->getTarget(), uno::UNO_QUERY ); ShapeSharedPtr pShape( getContext().mpSubsettableShapeManager->lookupShape( xShape ) ); - mpShape = ::boost::dynamic_pointer_cast< ExternalMediaShape >( pShape ); + mpShape = ::boost::dynamic_pointer_cast< IExternalMediaShapeBase >( pShape ); } void AnimationCommandNode::dispose() diff --git a/slideshow/source/engine/animationnodes/animationcommandnode.hxx b/slideshow/source/engine/animationnodes/animationcommandnode.hxx index 3ce5f23f5374..f9e61fd5c59d 100644 --- a/slideshow/source/engine/animationnodes/animationcommandnode.hxx +++ b/slideshow/source/engine/animationnodes/animationcommandnode.hxx @@ -20,7 +20,7 @@ #define INCLUDED_SLIDESHOW_ANIMATIONCOMMANDNODE_HXX #include "basecontainernode.hxx" -#include "externalmediashape.hxx" +#include "iexternalmediashapebase.hxx" #include "soundplayer.hxx" #include "com/sun/star/animations/XCommand.hpp" @@ -49,7 +49,7 @@ private: virtual bool hasPendingAnimation() const SAL_OVERRIDE; private: - ExternalMediaShapeSharedPtr mpShape; + IExternalMediaShapeBaseSharedPtr mpShape; ::com::sun::star::uno::Reference< ::com::sun::star::animations::XCommand > mxCommandNode; }; diff --git a/slideshow/source/engine/shapes/externalshapebase.hxx b/slideshow/source/engine/shapes/externalshapebase.hxx index 4de13609c8d0..1f240aa564bc 100644 --- a/slideshow/source/engine/shapes/externalshapebase.hxx +++ b/slideshow/source/engine/shapes/externalshapebase.hxx @@ -22,7 +22,7 @@ #include -#include "externalmediashape.hxx" +#include "iexternalmediashapebase.hxx" #include "unoview.hxx" #include "subsettableshapemanager.hxx" #include "slideshowexceptions.hxx" @@ -44,7 +44,7 @@ namespace slideshow (including mutual overdraw). It therefore reports yes for the isBackgroundDetached() question. */ - class ExternalShapeBase : public ExternalMediaShape + class ExternalShapeBase : public IExternalMediaShapeBase { public: /** Create a shape for the given XShape for an external shape diff --git a/slideshow/source/inc/externalmediashape.hxx b/slideshow/source/inc/externalmediashape.hxx deleted file mode 100644 index c55d0ba1f570..000000000000 --- a/slideshow/source/inc/externalmediashape.hxx +++ /dev/null @@ -1,85 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -#ifndef INCLUDED_SLIDESHOW_EXTERNALMEDIASHAPE_HXX -#define INCLUDED_SLIDESHOW_EXTERNALMEDIASHAPE_HXX - -#include - -#include "shape.hxx" - - -namespace slideshow -{ - namespace internal - { - /** Represents a shape containing media (video, sound). - - This interface adds media handling methods to a shape. It - allows starting/stopping and pausing playback. - */ - class ExternalMediaShape : public Shape - { - public: - // Animation methods - - - /** Notify the Shape that it should start with playback - - This method enters playback mode on all registered - views. It makes the media initially visible (for videos). - */ - virtual void play() = 0; - - /** Notify the Shape that it should stop playback - - This method leaves playback mode on all registered - views. The media is then rewound to the start, and - removed from screen (for videos) - */ - virtual void stop() = 0; - - /** Notify the Shape that it should pause playback - - This method stops playback on all registered - views. The media stays visible (for videos) - */ - virtual void pause() = 0; - - /** Query whether the media is currently playing. - */ - virtual bool isPlaying() const = 0; - - /** Set media time in seconds. - - @param fTime - Time in seconds of the media time line, that should now be - presented - */ - virtual void setMediaTime(double fTime) = 0; - }; - - typedef ::boost::shared_ptr< ExternalMediaShape > ExternalMediaShapeSharedPtr; - - } -} - -#endif /* INCLUDED_SLIDESHOW_EXTERNALMEDIASHAPE_HXX */ - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/slideshow/source/inc/iexternalmediashapebase.hxx b/slideshow/source/inc/iexternalmediashapebase.hxx new file mode 100644 index 000000000000..134a4dfc396f --- /dev/null +++ b/slideshow/source/inc/iexternalmediashapebase.hxx @@ -0,0 +1,86 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef INCLUDED_SLIDESHOW_EXTERNALMEDIASHAPE_HXX +#define INCLUDED_SLIDESHOW_EXTERNALMEDIASHAPE_HXX + +#include + +#include "shape.hxx" + + +namespace slideshow +{ + namespace internal + { + /** Represents a shape containing playable content rendered by + external engine (e.g. media or applet). + + This interface adds media handling methods to a shape. It + allows starting/stopping and pausing playback. + */ + class IExternalMediaShapeBase : public Shape + { + public: + // Animation methods + + + /** Notify the Shape that it should start with playback + + This method enters playback mode on all registered + views. It makes the media initially visible (for videos). + */ + virtual void play() = 0; + + /** Notify the Shape that it should stop playback + + This method leaves playback mode on all registered + views. The media is then rewound to the start, and + removed from screen (for videos) + */ + virtual void stop() = 0; + + /** Notify the Shape that it should pause playback + + This method stops playback on all registered + views. The media stays visible (for videos) + */ + virtual void pause() = 0; + + /** Query whether the media is currently playing. + */ + virtual bool isPlaying() const = 0; + + /** Set media time in seconds. + + @param fTime + Time in seconds of the media time line, that should now be + presented + */ + virtual void setMediaTime(double fTime) = 0; + }; + + typedef ::boost::shared_ptr< IExternalMediaShapeBase > IExternalMediaShapeBaseSharedPtr; + + } +} + +#endif /* INCLUDED_SLIDESHOW_EXTERNALMEDIASHAPE_HXX */ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ -- cgit v1.2.3