Slideshow: Remove unneded ExternalMediaShape
ExternalShapeBase is the base class of MediaShape and AppletShape so it's nonsense that ExternalMediaShape to be the base of ExternalShapeBase. Actually this class does nothing, anyway. Change-Id: I8a278c9273a1788f0859205b8f1d0905427179b6
This commit is contained in:
@@ -49,7 +49,7 @@ AnimationCommandNode::AnimationCommandNode( uno::Reference<animations::XAnimatio
|
|||||||
uno::Reference< drawing::XShape > xShape( mxCommandNode->getTarget(),
|
uno::Reference< drawing::XShape > xShape( mxCommandNode->getTarget(),
|
||||||
uno::UNO_QUERY );
|
uno::UNO_QUERY );
|
||||||
ShapeSharedPtr pShape( getContext().mpSubsettableShapeManager->lookupShape( xShape ) );
|
ShapeSharedPtr pShape( getContext().mpSubsettableShapeManager->lookupShape( xShape ) );
|
||||||
mpShape = ::boost::dynamic_pointer_cast< ExternalMediaShape >( pShape );
|
mpShape = ::boost::dynamic_pointer_cast< ExternalShapeBase >( pShape );
|
||||||
}
|
}
|
||||||
|
|
||||||
void AnimationCommandNode::dispose()
|
void AnimationCommandNode::dispose()
|
||||||
|
@@ -20,9 +20,10 @@
|
|||||||
#define INCLUDED_SLIDESHOW_ANIMATIONCOMMANDNODE_HXX
|
#define INCLUDED_SLIDESHOW_ANIMATIONCOMMANDNODE_HXX
|
||||||
|
|
||||||
#include "basecontainernode.hxx"
|
#include "basecontainernode.hxx"
|
||||||
#include "externalmediashape.hxx"
|
#include "externalshapebase.hxx"
|
||||||
#include "soundplayer.hxx"
|
#include "soundplayer.hxx"
|
||||||
#include "com/sun/star/animations/XCommand.hpp"
|
#include "com/sun/star/animations/XCommand.hpp"
|
||||||
|
#include <boost/shared_ptr.hpp>
|
||||||
|
|
||||||
namespace slideshow {
|
namespace slideshow {
|
||||||
namespace internal {
|
namespace internal {
|
||||||
@@ -49,7 +50,7 @@ private:
|
|||||||
virtual bool hasPendingAnimation() const SAL_OVERRIDE;
|
virtual bool hasPendingAnimation() const SAL_OVERRIDE;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
ExternalMediaShapeSharedPtr mpShape;
|
boost::shared_ptr< ExternalShapeBase > mpShape;
|
||||||
::com::sun::star::uno::Reference<
|
::com::sun::star::uno::Reference<
|
||||||
::com::sun::star::animations::XCommand > mxCommandNode;
|
::com::sun::star::animations::XCommand > mxCommandNode;
|
||||||
};
|
};
|
||||||
|
@@ -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 <boost/shared_ptr.hpp>
|
|
||||||
|
|
||||||
#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: */
|
|
@@ -22,11 +22,11 @@
|
|||||||
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#include "externalmediashape.hxx"
|
|
||||||
#include "unoview.hxx"
|
#include "unoview.hxx"
|
||||||
#include "subsettableshapemanager.hxx"
|
#include "subsettableshapemanager.hxx"
|
||||||
#include "slideshowexceptions.hxx"
|
#include "slideshowexceptions.hxx"
|
||||||
#include "slideshowcontext.hxx"
|
#include "slideshowcontext.hxx"
|
||||||
|
#include "shape.hxx"
|
||||||
|
|
||||||
|
|
||||||
namespace slideshow
|
namespace slideshow
|
||||||
@@ -44,7 +44,7 @@ namespace slideshow
|
|||||||
(including mutual overdraw). It therefore reports yes for
|
(including mutual overdraw). It therefore reports yes for
|
||||||
the isBackgroundDetached() question.
|
the isBackgroundDetached() question.
|
||||||
*/
|
*/
|
||||||
class ExternalShapeBase : public ExternalMediaShape
|
class ExternalShapeBase : public Shape
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
/** Create a shape for the given XShape for an external shape
|
/** Create a shape for the given XShape for an external shape
|
||||||
@@ -68,11 +68,11 @@ namespace slideshow
|
|||||||
// animation methods
|
// animation methods
|
||||||
|
|
||||||
|
|
||||||
virtual void play() SAL_OVERRIDE;
|
virtual void play();
|
||||||
virtual void stop() SAL_OVERRIDE;
|
virtual void stop();
|
||||||
virtual void pause() SAL_OVERRIDE;
|
virtual void pause();
|
||||||
virtual bool isPlaying() const SAL_OVERRIDE;
|
virtual bool isPlaying() const;
|
||||||
virtual void setMediaTime(double) SAL_OVERRIDE;
|
virtual void setMediaTime(double);
|
||||||
|
|
||||||
// render methods
|
// render methods
|
||||||
|
|
Reference in New Issue
Block a user