summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sd/inc/CustomAnimationPreset.hxx4
-rw-r--r--sd/inc/helpids.h49
-rw-r--r--sd/source/core/CustomAnimationEffect.cxx11
-rw-r--r--sd/source/core/CustomAnimationPreset.cxx5
-rw-r--r--sd/source/ui/animations/CustomAnimation.hrc11
-rw-r--r--sd/source/ui/animations/CustomAnimationCreateDialog.cxx8
-rw-r--r--sd/source/ui/animations/CustomAnimationCreateDialog.hxx4
-rw-r--r--sd/source/ui/animations/CustomAnimationCreateDialog.src8
-rw-r--r--sd/source/ui/func/fupoor.cxx7
-rw-r--r--sd/source/ui/func/fusel.cxx43
-rw-r--r--sd/xml/effects.xml21
-rw-r--r--slideshow/source/engine/animationnodes/animationcommandnode.cxx63
-rw-r--r--slideshow/source/engine/animationnodes/animationcommandnode.hxx16
-rw-r--r--slideshow/source/engine/shapes/appletshape.cxx35
-rw-r--r--slideshow/source/engine/shapes/externalshapebase.cxx27
-rw-r--r--slideshow/source/engine/shapes/externalshapebase.hxx20
-rw-r--r--slideshow/source/engine/shapes/mediashape.cxx45
-rw-r--r--slideshow/source/engine/shapes/viewmediashape.cxx18
-rw-r--r--slideshow/source/engine/shapes/viewmediashape.hxx16
-rw-r--r--slideshow/source/inc/animationnode.hxx7
-rw-r--r--slideshow/source/inc/externalmediashape.hxx99
21 files changed, 425 insertions, 92 deletions
diff --git a/sd/inc/CustomAnimationPreset.hxx b/sd/inc/CustomAnimationPreset.hxx
index eba302409098..77b7352056b0 100644
--- a/sd/inc/CustomAnimationPreset.hxx
+++ b/sd/inc/CustomAnimationPreset.hxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: CustomAnimationPreset.hxx,v $
- * $Revision: 1.6 $
+ * $Revision: 1.6.72.1 $
*
* This file is part of OpenOffice.org.
*
@@ -123,6 +123,7 @@ public:
const PresetCategoryList& getEmphasisPresets() const { return maEmphasisPresets; }
const PresetCategoryList& getExitPresets() const { return maExitPresets; }
const PresetCategoryList& getMotionPathsPresets() const { return maMotionPathsPresets; }
+ const PresetCategoryList& getMiscPresets() const { return maMiscPresets; }
void changePresetSubType( CustomAnimationEffectPtr pEffect, const rtl::OUString& rPresetSubType ) const;
@@ -144,6 +145,7 @@ private:
PresetCategoryList maEmphasisPresets;
PresetCategoryList maExitPresets;
PresetCategoryList maMotionPathsPresets;
+ PresetCategoryList maMiscPresets;
static CustomAnimationPresets* mpCustomAnimationPresets;
};
diff --git a/sd/inc/helpids.h b/sd/inc/helpids.h
index c0a3e1e4b2f1..69a3c6fe901d 100644
--- a/sd/inc/helpids.h
+++ b/sd/inc/helpids.h
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: helpids.h,v $
- * $Revision: 1.20 $
+ * $Revision: 1.20.74.1 $
*
* This file is part of OpenOffice.org.
*
@@ -256,26 +256,27 @@
#define HID_SD_CUSTOMANIMATIONDIALOG_EMPHASIS (HID_SD_START + 179)
#define HID_SD_CUSTOMANIMATIONDIALOG_EXIT (HID_SD_START + 180)
#define HID_SD_CUSTOMANIMATIONDIALOG_MOTIONPATH (HID_SD_START + 181)
-
-#define HID_SD_CUSTOMANIMATIONPANE_PRESETPROPERTYBOX (HID_SD_START + 182)
-#define HID_SD_CUSTOMANIMATIONPANE_COLORPROPERTYBOX (HID_SD_START + 183)
-#define HID_SD_CUSTOMANIMATIONPANE_FONTPROPERTYBOX (HID_SD_START + 184)
-#define HID_SD_CUSTOMANIMATIONPANE_CHARHEIGHTPROPERTYBOX (HID_SD_START + 185)
-#define HID_SD_CUSTOMANIMATIONPANE_ROTATIONPROPERTYBOX (HID_SD_START + 186)
-#define HID_SD_CUSTOMANIMATIONPANE_TRANSPARENCYPROPERTYBOX (HID_SD_START + 187)
-#define HID_SD_CUSTOMANIMATIONPANE_SCALEPROPERTYBOX (HID_SD_START + 188)
-#define HID_SD_CUSTOMANIMATIONPANE_FONTSTYLEPROPERTYBOX (HID_SD_START + 189)
-
-#define HID_SD_SLIDESHOW_DISPLAY (HID_SD_START + 190)
-
-#define HID_SD_RULER_HORIZONTAL (HID_SD_START + 191)
-#define HID_SD_RULER_VERTICAL (HID_SD_START + 192)
-
-#define HID_SD_CELL_STYLE_DEFAULT (HID_SD_START + 193)
-#define HID_SD_CELL_STYLE_BANDED (HID_SD_START + 194)
-#define HID_SD_CELL_STYLE_HEADER (HID_SD_START + 195)
-#define HID_SD_CELL_STYLE_TOTAL (HID_SD_START + 196)
-#define HID_SD_CELL_STYLE_FIRST_COLUMN (HID_SD_START + 197)
-#define HID_SD_CELL_STYLE_LAST_COLUMN (HID_SD_START + 198)
-
-#define HID_SD_TABLE_DESIGN (HID_SD_START + 199)
+#define HID_SD_CUSTOMANIMATIONDIALOG_MISCEFFECTS (HID_SD_START + 182)
+
+#define HID_SD_CUSTOMANIMATIONPANE_PRESETPROPERTYBOX (HID_SD_START + 183)
+#define HID_SD_CUSTOMANIMATIONPANE_COLORPROPERTYBOX (HID_SD_START + 184)
+#define HID_SD_CUSTOMANIMATIONPANE_FONTPROPERTYBOX (HID_SD_START + 185)
+#define HID_SD_CUSTOMANIMATIONPANE_CHARHEIGHTPROPERTYBOX (HID_SD_START + 186)
+#define HID_SD_CUSTOMANIMATIONPANE_ROTATIONPROPERTYBOX (HID_SD_START + 187)
+#define HID_SD_CUSTOMANIMATIONPANE_TRANSPARENCYPROPERTYBOX (HID_SD_START + 188)
+#define HID_SD_CUSTOMANIMATIONPANE_SCALEPROPERTYBOX (HID_SD_START + 189)
+#define HID_SD_CUSTOMANIMATIONPANE_FONTSTYLEPROPERTYBOX (HID_SD_START + 190)
+
+#define HID_SD_SLIDESHOW_DISPLAY (HID_SD_START + 191)
+
+#define HID_SD_RULER_HORIZONTAL (HID_SD_START + 192)
+#define HID_SD_RULER_VERTICAL (HID_SD_START + 193)
+
+#define HID_SD_CELL_STYLE_DEFAULT (HID_SD_START + 194)
+#define HID_SD_CELL_STYLE_BANDED (HID_SD_START + 195)
+#define HID_SD_CELL_STYLE_HEADER (HID_SD_START + 196)
+#define HID_SD_CELL_STYLE_TOTAL (HID_SD_START + 197)
+#define HID_SD_CELL_STYLE_FIRST_COLUMN (HID_SD_START + 198)
+#define HID_SD_CELL_STYLE_LAST_COLUMN (HID_SD_START + 199)
+
+#define HID_SD_TABLE_DESIGN (HID_SD_START + 200)
diff --git a/sd/source/core/CustomAnimationEffect.cxx b/sd/source/core/CustomAnimationEffect.cxx
index 0b09b346aaeb..23a04bf9d5ee 100644
--- a/sd/source/core/CustomAnimationEffect.cxx
+++ b/sd/source/core/CustomAnimationEffect.cxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: CustomAnimationEffect.cxx,v $
- * $Revision: 1.17 $
+ * $Revision: 1.17.74.1 $
*
* This file is part of OpenOffice.org.
*
@@ -691,9 +691,16 @@ void CustomAnimationEffect::setTarget( const ::com::sun::star::uno::Any& rTarget
{
while( xEnumeration->hasMoreElements() )
{
- Reference< XAnimate > xAnimate( xEnumeration->nextElement(), UNO_QUERY );
+ const Any aElem( xEnumeration->nextElement() );
+ Reference< XAnimate > xAnimate( aElem, UNO_QUERY );
if( xAnimate.is() )
xAnimate->setTarget( rTarget );
+ else
+ {
+ Reference< XCommand > xCommand( aElem, UNO_QUERY );
+ if( xCommand.is() )
+ xCommand->setTarget( rTarget );
+ }
}
}
}
diff --git a/sd/source/core/CustomAnimationPreset.cxx b/sd/source/core/CustomAnimationPreset.cxx
index 10f6e981165a..cf5d94c420ce 100644
--- a/sd/source/core/CustomAnimationPreset.cxx
+++ b/sd/source/core/CustomAnimationPreset.cxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: CustomAnimationPreset.cxx,v $
- * $Revision: 1.7 $
+ * $Revision: 1.7.74.1 $
*
* This file is part of OpenOffice.org.
*
@@ -469,6 +469,9 @@ void CustomAnimationPresets::importResources()
const OUString aMotionPathsPath( RTL_CONSTASCII_USTRINGPARAM( "/org.openoffice.Office.UI.Effects/Presets/MotionPaths" ) );
importPresets( xConfigProvider, aMotionPathsPath, maMotionPathsPresets );
+
+ const OUString aMiscPath( RTL_CONSTASCII_USTRINGPARAM( "/org.openoffice.Office.UI.Effects/Presets/Misc" ) );
+ importPresets( xConfigProvider, aMiscPath, maMiscPresets );
}
catch( lang::WrappedTargetException& e )
{
diff --git a/sd/source/ui/animations/CustomAnimation.hrc b/sd/source/ui/animations/CustomAnimation.hrc
index 3e3381ac1c30..f2858501aea1 100644
--- a/sd/source/ui/animations/CustomAnimation.hrc
+++ b/sd/source/ui/animations/CustomAnimation.hrc
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: CustomAnimation.hrc,v $
- * $Revision: 1.5 $
+ * $Revision: 1.5.74.1 $
*
* This file is part of OpenOffice.org.
*
@@ -52,10 +52,11 @@
#define RID_TP_CUSTOMANIMATION_EMPHASIS RID_CUSTOMANIMATION_START+5
#define RID_TP_CUSTOMANIMATION_EXIT RID_CUSTOMANIMATION_START+6
#define RID_TP_CUSTOMANIMATION_MOTIONPATH RID_CUSTOMANIMATION_START+7
-#define RID_CUSTOMANIMATION_ROTATION_POPUP RID_CUSTOMANIMATION_START+8
-#define RID_CUSTOMANIMATION_FONTSIZE_POPUP RID_CUSTOMANIMATION_START+9
-#define RID_CUSTOMANIMATION_SCALE_POPUP RID_CUSTOMANIMATION_START+10
-#define RID_CUSTOMANIMATION_FONTSTYLE_POPUP RID_CUSTOMANIMATION_START+11
+#define RID_TP_CUSTOMANIMATION_MISCEFFECTS RID_CUSTOMANIMATION_START+8
+#define RID_CUSTOMANIMATION_ROTATION_POPUP RID_CUSTOMANIMATION_START+9
+#define RID_CUSTOMANIMATION_FONTSIZE_POPUP RID_CUSTOMANIMATION_START+10
+#define RID_CUSTOMANIMATION_SCALE_POPUP RID_CUSTOMANIMATION_START+11
+#define RID_CUSTOMANIMATION_FONTSTYLE_POPUP RID_CUSTOMANIMATION_START+12
#define IMG_CUSTOMANIMATION_ON_CLICK RID_CUSTOMANIMATION_START+0
#define IMG_CUSTOMANIMATION_ON_CLICK_H RID_CUSTOMANIMATION_START+1
diff --git a/sd/source/ui/animations/CustomAnimationCreateDialog.cxx b/sd/source/ui/animations/CustomAnimationCreateDialog.cxx
index 24b0bf7d2fcb..cdb894984edd 100644
--- a/sd/source/ui/animations/CustomAnimationCreateDialog.cxx
+++ b/sd/source/ui/animations/CustomAnimationCreateDialog.cxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: CustomAnimationCreateDialog.cxx,v $
- * $Revision: 1.14 $
+ * $Revision: 1.14.74.1 $
*
* This file is part of OpenOffice.org.
*
@@ -86,6 +86,7 @@ const int ENTRANCE = 0;
const int EMPHASIS = 1;
const int EXIT = 2;
const int MOTIONPATH = 3;
+const int MISCEFFECTS = 4;
extern void fillDurationComboBox( ComboBox* pBox );
@@ -555,6 +556,9 @@ CustomAnimationCreateDialog::CustomAnimationCreateDialog( Window* pParent, Custo
mpTabPages[MOTIONPATH] = new CustomAnimationCreateTabPage( mpTabControl, this, MOTIONPATH, rPresets.getMotionPathsPresets(), bHasText );
mpTabPages[MOTIONPATH]->SetHelpId( HID_SD_CUSTOMANIMATIONDIALOG_MOTIONPATH );
mpTabControl->SetTabPage( RID_TP_CUSTOMANIMATION_MOTIONPATH, mpTabPages[MOTIONPATH] );
+ mpTabPages[MISCEFFECTS] = new CustomAnimationCreateTabPage( mpTabControl, this, MISCEFFECTS, rPresets.getMiscPresets(), bHasText );
+ mpTabPages[MISCEFFECTS]->SetHelpId( HID_SD_CUSTOMANIMATIONDIALOG_MISCEFFECTS );
+ mpTabControl->SetTabPage( RID_TP_CUSTOMANIMATION_MISCEFFECTS, mpTabPages[MISCEFFECTS] );
getCurrentPage()->setDuration( mfDuration );
getCurrentPage()->setIsPreview( mbIsPreview );
@@ -589,6 +593,7 @@ CustomAnimationCreateDialog::~CustomAnimationCreateDialog()
delete mpTabPages[EMPHASIS];
delete mpTabPages[EXIT];
delete mpTabPages[MOTIONPATH];
+ delete mpTabPages[MISCEFFECTS];
delete mpTabControl;
delete mpOKButton;
@@ -603,6 +608,7 @@ CustomAnimationCreateTabPage* CustomAnimationCreateDialog::getCurrentPage() cons
case RID_TP_CUSTOMANIMATION_ENTRANCE: return mpTabPages[ENTRANCE];
case RID_TP_CUSTOMANIMATION_EMPHASIS: return mpTabPages[EMPHASIS];
case RID_TP_CUSTOMANIMATION_EXIT: return mpTabPages[EXIT];
+ case RID_TP_CUSTOMANIMATION_MISCEFFECTS:return mpTabPages[MISCEFFECTS];
//case RID_TP_CUSTOMANIMATION_MOTIONPATH:
default:
return mpTabPages[MOTIONPATH];
diff --git a/sd/source/ui/animations/CustomAnimationCreateDialog.hxx b/sd/source/ui/animations/CustomAnimationCreateDialog.hxx
index 0cd7dd8b380b..9fcb4107a0fe 100644
--- a/sd/source/ui/animations/CustomAnimationCreateDialog.hxx
+++ b/sd/source/ui/animations/CustomAnimationCreateDialog.hxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: CustomAnimationCreateDialog.hxx,v $
- * $Revision: 1.9 $
+ * $Revision: 1.9.74.1 $
*
* This file is part of OpenOffice.org.
*
@@ -80,7 +80,7 @@ private:
CancelButton* mpCancelButton;
HelpButton* mpHelpButton;
- CustomAnimationCreateTabPage* mpTabPages[4];
+ CustomAnimationCreateTabPage* mpTabPages[5];
};
}
diff --git a/sd/source/ui/animations/CustomAnimationCreateDialog.src b/sd/source/ui/animations/CustomAnimationCreateDialog.src
index 48347ffff36c..294466189fc7 100644
--- a/sd/source/ui/animations/CustomAnimationCreateDialog.src
+++ b/sd/source/ui/animations/CustomAnimationCreateDialog.src
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: CustomAnimationCreateDialog.src,v $
- * $Revision: 1.8 $
+ * $Revision: 1.8.74.1 $
*
* This file is part of OpenOffice.org.
*
@@ -71,6 +71,12 @@ TabDialog DLG_CUSTOMANIMATION_CREATE
Identifier = RID_TP_CUSTOMANIMATION_MOTIONPATH;
Text [ en-US ] = "Motion Paths";
};
+
+ PageItem
+ {
+ Identifier = RID_TP_CUSTOMANIMATION_MISCEFFECTS;
+ Text [ en-US ] = "Misc Effects";
+ };
};
};
OKButton 1
diff --git a/sd/source/ui/func/fupoor.cxx b/sd/source/ui/func/fupoor.cxx
index cfbcfd628eb3..3a9cb6c0714e 100644
--- a/sd/source/ui/func/fupoor.cxx
+++ b/sd/source/ui/func/fupoor.cxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: fupoor.cxx,v $
- * $Revision: 1.50 $
+ * $Revision: 1.50.74.1 $
*
* This file is part of OpenOffice.org.
*
@@ -753,6 +753,11 @@ BOOL FuPoor::KeyInput(const KeyEvent& rKEvt)
nX *= aLogicSizeOnePixel.Width();
nY *= aLogicSizeOnePixel.Height();
}
+ else if(rKEvt.GetKeyCode().IsShift())
+ {
+ nX *= 1000;
+ nY *= 1000;
+ }
else
{
// old, fixed move distance
diff --git a/sd/source/ui/func/fusel.cxx b/sd/source/ui/func/fusel.cxx
index 3f3817567ec4..cab26dee337e 100644
--- a/sd/source/ui/func/fusel.cxx
+++ b/sd/source/ui/func/fusel.cxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: fusel.cxx,v $
- * $Revision: 1.55 $
+ * $Revision: 1.55.74.1 $
*
* This file is part of OpenOffice.org.
*
@@ -413,26 +413,29 @@ BOOL FuSelection::MouseButtonDown(const MouseEvent& rMEvt)
}
}
- if ( !bReadOnly &&
- bMarked &&
- (!rMEvt.IsShift() || mpView->IsMarkedHit(aMDPos, nHitLog)))
+ if( !bDeactivateOLE )
{
- /**********************************************************
- * Objekt verschieben
- **********************************************************/
- aDragTimer.Start();
-
- pHdl=mpView->PickHandle(aMDPos);
- if ( ! rMEvt.IsRight())
- mpView->BegDragObj(aMDPos, (OutputDevice*) NULL, pHdl, nDrgLog);
- }
- else
- {
- /**********************************************************
- * Objekt selektieren
- **********************************************************/
- if ( ! rMEvt.IsRight())
- mpView->BegMarkObj(aMDPos);
+ if ( !bReadOnly &&
+ bMarked &&
+ (!rMEvt.IsShift() || mpView->IsMarkedHit(aMDPos, nHitLog)))
+ {
+ /**********************************************************
+ * Objekt verschieben
+ **********************************************************/
+ aDragTimer.Start();
+
+ pHdl=mpView->PickHandle(aMDPos);
+ if ( ! rMEvt.IsRight())
+ mpView->BegDragObj(aMDPos, (OutputDevice*) NULL, pHdl, nDrgLog);
+ }
+ else
+ {
+ /**********************************************************
+ * Objekt selektieren
+ **********************************************************/
+ if ( ! rMEvt.IsRight())
+ mpView->BegMarkObj(aMDPos);
+ }
}
}
}
diff --git a/sd/xml/effects.xml b/sd/xml/effects.xml
index c6e5e9a83174..be341ef5e229 100644
--- a/sd/xml/effects.xml
+++ b/sd/xml/effects.xml
@@ -2606,4 +2606,25 @@
</anim:par>
</anim:par>
</anim:par>
+ <anim:par smil:begin="indefinite" smil:fill="hold">
+ <anim:par smil:begin="0" smil:fill="hold">
+ <anim:par smil:begin="0" smil:fill="hold" pres:node-type="on-click" pres:preset-class="entrance" pres:preset-id="ooo-media-start">
+ <anim:command smil:begin="0" smil:dur="0.001" smil:fill="hold" anim:command="play"/>
+ </anim:par>
+ </anim:par>
+ </anim:par>
+ <anim:par smil:begin="indefinite" smil:fill="hold">
+ <anim:par smil:begin="0" smil:fill="hold">
+ <anim:par smil:begin="0" smil:fill="hold" pres:node-type="on-click" pres:preset-class="entrance" pres:preset-id="ooo-media-stop">
+ <anim:command smil:begin="0" smil:dur="0.001" smil:fill="hold" anim:command="stop"/>
+ </anim:par>
+ </anim:par>
+ </anim:par>
+ <anim:par smil:begin="indefinite" smil:fill="hold">
+ <anim:par smil:begin="0" smil:fill="hold">
+ <anim:par smil:begin="0" smil:fill="hold" pres:node-type="on-click" pres:preset-class="entrance" pres:preset-id="ooo-media-toggle-pause">
+ <anim:command smil:begin="0" smil:dur="0.001" smil:fill="hold" anim:command="toggle-pause"/>
+ </anim:par>
+ </anim:par>
+ </anim:par>
</anim:seq>
diff --git a/slideshow/source/engine/animationnodes/animationcommandnode.cxx b/slideshow/source/engine/animationnodes/animationcommandnode.cxx
index 181b42b72206..366e74c783ba 100644
--- a/slideshow/source/engine/animationnodes/animationcommandnode.cxx
+++ b/slideshow/source/engine/animationnodes/animationcommandnode.cxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: animationcommandnode.cxx,v $
- * $Revision: 1.9 $
+ * $Revision: 1.9.18.1 $
*
* This file is part of OpenOffice.org.
*
@@ -35,6 +35,8 @@
#include <canvas/debug.hxx>
#include <canvas/verbosetrace.hxx>
#include <com/sun/star/presentation/EffectCommands.hpp>
+#include <com/sun/star/animations/XAnimate.hpp>
+#include <com/sun/star/beans/PropertyValue.hpp>
#include "animationcommandnode.hxx"
#include "delayevent.hxx"
@@ -43,30 +45,75 @@
#include <boost/bind.hpp>
+using namespace com::sun::star;
+
namespace slideshow {
namespace internal {
+namespace EffectCommands = com::sun::star::presentation::EffectCommands;
+
+AnimationCommandNode::AnimationCommandNode( uno::Reference<animations::XAnimationNode> const& xNode,
+ ::boost::shared_ptr<BaseContainerNode> const& pParent,
+ NodeContext const& rContext ) :
+ BaseNode( xNode, pParent, rContext ),
+ mpShape(),
+ mxCommandNode( xNode, ::com::sun::star::uno::UNO_QUERY_THROW )
+{
+ uno::Reference< drawing::XShape > xShape( mxCommandNode->getTarget(),
+ uno::UNO_QUERY );
+ ShapeSharedPtr pShape( getContext().mpSubsettableShapeManager->lookupShape( xShape ) );
+ mpShape = ::boost::dynamic_pointer_cast< ExternalMediaShape >( pShape );
+}
+
void AnimationCommandNode::dispose()
{
mxCommandNode.clear();
+ mpShape.reset();
BaseNode::dispose();
}
-void AnimationCommandNode::activate_()
+void AnimationCommandNode::activate_st()
{
- namespace EffectCommands = com::sun::star::presentation::EffectCommands;
-
switch( mxCommandNode->getCommand() ) {
// the command is user defined
case EffectCommands::CUSTOM: break;
// the command is an ole verb.
case EffectCommands::VERB: break;
// the command starts playing on a media object
- case EffectCommands::PLAY: break;
+ case EffectCommands::PLAY:
+ {
+ double fMediaTime=0.0;
+ beans::PropertyValue aMediaTime;
+ if( (mxCommandNode->getParameter() >>= aMediaTime) &&
+ aMediaTime.Name.equalsAsciiL(
+ RTL_CONSTASCII_STRINGPARAM("MediaTime") ))
+ {
+ aMediaTime.Value >>= fMediaTime;
+ }
+ if( mpShape )
+ {
+ mpShape->setMediaTime(fMediaTime/1000.0);
+ mpShape->play();
+ }
+ break;
+ }
// the command toggles the pause status on a media object
- case EffectCommands::TOGGLEPAUSE: break;
+ case EffectCommands::TOGGLEPAUSE:
+ {
+ if( mpShape )
+ if( mpShape->isPlaying() )
+ mpShape->pause();
+ else
+ mpShape->play();
+ break;
+ }
// the command stops the animation on a media object
- case EffectCommands::STOP: break;
+ case EffectCommands::STOP:
+ {
+ if( mpShape )
+ mpShape->stop();
+ break;
+ }
// the command stops all currently running sound effects
case EffectCommands::STOPAUDIO:
getContext().mrEventMultiplexer.notifyCommandStopAudio( getSelf() );
@@ -80,7 +127,7 @@ void AnimationCommandNode::activate_()
bool AnimationCommandNode::hasPendingAnimation() const
{
- return false;
+ return mxCommandNode->getCommand() == EffectCommands::STOPAUDIO || mpShape;
}
} // namespace internal
diff --git a/slideshow/source/engine/animationnodes/animationcommandnode.hxx b/slideshow/source/engine/animationnodes/animationcommandnode.hxx
index f923afa52a55..0c72412ce4d7 100644
--- a/slideshow/source/engine/animationnodes/animationcommandnode.hxx
+++ b/slideshow/source/engine/animationnodes/animationcommandnode.hxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: animationcommandnode.hxx,v $
- * $Revision: 1.6 $
+ * $Revision: 1.6.18.1 $
*
* This file is part of OpenOffice.org.
*
@@ -31,6 +31,7 @@
#define INCLUDED_SLIDESHOW_ANIMATIONCOMMANDNODE_HXX
#include "basecontainernode.hxx"
+#include "externalmediashape.hxx"
#include "soundplayer.hxx"
#include "com/sun/star/animations/XCommand.hpp"
@@ -39,9 +40,8 @@ namespace internal {
/** Command node.
- TODO
- This animation node contains a command. Currently the only implemented
- command, is STOPAUDIO.
+ This animation node encapsulates a command. Not yet implemented:
+ verb & custom.
*/
class AnimationCommandNode : public BaseNode
{
@@ -50,20 +50,20 @@ public:
::com::sun::star::uno::Reference<
::com::sun::star::animations::XAnimationNode> const& xNode,
::boost::shared_ptr<BaseContainerNode> const& pParent,
- NodeContext const& rContext )
- : BaseNode( xNode, pParent, rContext ),
- mxCommandNode( xNode, ::com::sun::star::uno::UNO_QUERY_THROW ) {}
+ NodeContext const& rContext );
protected:
virtual void dispose();
private:
- virtual void activate_();
+ virtual void activate_st();
virtual bool hasPendingAnimation() const;
private:
+ ExternalMediaShapeSharedPtr mpShape;
::com::sun::star::uno::Reference<
::com::sun::star::animations::XCommand > mxCommandNode;
+ bool mbIsPaused;
};
} // namespace internal
diff --git a/slideshow/source/engine/shapes/appletshape.cxx b/slideshow/source/engine/shapes/appletshape.cxx
index 49f856478216..94b7db2a0ef2 100644
--- a/slideshow/source/engine/shapes/appletshape.cxx
+++ b/slideshow/source/engine/shapes/appletshape.cxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: appletshape.cxx,v $
- * $Revision: 1.3 $
+ * $Revision: 1.3.18.1 $
*
* This file is part of OpenOffice.org.
*
@@ -111,6 +111,9 @@ namespace slideshow
virtual void implViewsChanged();
virtual bool implStartIntrinsicAnimation();
virtual bool implEndIntrinsicAnimation();
+ virtual bool implPauseIntrinsicAnimation();
+ virtual bool implIsIntrinsicAnimationPlaying() const;
+ virtual void implSetIntrinsicAnimationTime(double);
const ::rtl::OUString maServiceName;
const char** mpPropCopyTable;
@@ -119,6 +122,7 @@ namespace slideshow
/// the list of active view shapes (one for each registered view layer)
typedef ::std::vector< ViewAppletShapeSharedPtr > ViewAppletShapeVector;
ViewAppletShapeVector maViewAppletShapes;
+ bool mbIsPlaying;
};
AppletShape::AppletShape( const uno::Reference< drawing::XShape >& xShape,
@@ -131,7 +135,8 @@ namespace slideshow
maServiceName( rServiceName ),
mpPropCopyTable( pPropCopyTable ),
mnNumPropEntries( nNumPropEntries ),
- maViewAppletShapes()
+ maViewAppletShapes(),
+ mbIsPlaying(false)
{
}
@@ -265,6 +270,7 @@ namespace slideshow
::boost::bind( &ViewAppletShape::startApplet,
_1,
::boost::cref( getBounds() )));
+ mbIsPlaying = true;
return true;
}
@@ -277,9 +283,34 @@ namespace slideshow
maViewAppletShapes.end(),
::boost::mem_fn( &ViewAppletShape::endApplet ) );
+ mbIsPlaying = false;
+
return true;
}
+ // ---------------------------------------------------------------------
+
+ bool AppletShape::implPauseIntrinsicAnimation()
+ {
+ // TODO(F1): any way of temporarily disabling/deactivating
+ // applets?
+ return true;
+ }
+
+ // ---------------------------------------------------------------------
+
+ bool AppletShape::implIsIntrinsicAnimationPlaying() const
+ {
+ return mbIsPlaying;
+ }
+
+ // ---------------------------------------------------------------------
+
+ void AppletShape::implSetIntrinsicAnimationTime(double)
+ {
+ // No way of doing this, or?
+ }
+
boost::shared_ptr<Shape> createAppletShape(
const uno::Reference< drawing::XShape >& xShape,
double nPrio,
diff --git a/slideshow/source/engine/shapes/externalshapebase.cxx b/slideshow/source/engine/shapes/externalshapebase.cxx
index 7c7925d3396e..a2f4e1d96b1a 100644
--- a/slideshow/source/engine/shapes/externalshapebase.cxx
+++ b/slideshow/source/engine/shapes/externalshapebase.cxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: externalshapebase.cxx,v $
- * $Revision: 1.4 $
+ * $Revision: 1.4.2.1 $
*
* This file is part of OpenOffice.org.
*
@@ -141,20 +141,41 @@ namespace slideshow
// ---------------------------------------------------------------------
- void ExternalShapeBase::enterAnimationMode()
+ void ExternalShapeBase::play()
{
implStartIntrinsicAnimation();
}
// ---------------------------------------------------------------------
- void ExternalShapeBase::leaveAnimationMode()
+ void ExternalShapeBase::stop()
{
implEndIntrinsicAnimation();
}
// ---------------------------------------------------------------------
+ void ExternalShapeBase::pause()
+ {
+ implPauseIntrinsicAnimation();
+ }
+
+ // ---------------------------------------------------------------------
+
+ bool ExternalShapeBase::isPlaying() const
+ {
+ return implIsIntrinsicAnimationPlaying();
+ }
+
+ // ---------------------------------------------------------------------
+
+ void ExternalShapeBase::setMediaTime(double fTime)
+ {
+ implSetIntrinsicAnimationTime(fTime);
+ }
+
+ // ---------------------------------------------------------------------
+
bool ExternalShapeBase::update() const
{
return render();
diff --git a/slideshow/source/engine/shapes/externalshapebase.hxx b/slideshow/source/engine/shapes/externalshapebase.hxx
index cdedfcab8ca5..9af0b01bc59a 100644
--- a/slideshow/source/engine/shapes/externalshapebase.hxx
+++ b/slideshow/source/engine/shapes/externalshapebase.hxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: externalshapebase.hxx,v $
- * $Revision: 1.3 $
+ * $Revision: 1.3.18.1 $
*
* This file is part of OpenOffice.org.
*
@@ -33,7 +33,7 @@
#include <vector>
-#include "animatableshape.hxx"
+#include "externalmediashape.hxx"
#include "unoview.hxx"
#include "subsettableshapemanager.hxx"
#include "slideshowexceptions.hxx"
@@ -55,7 +55,7 @@ namespace slideshow
(including mutual overdraw). It therefore reports yes for
the isBackgroundDetached() question.
*/
- class ExternalShapeBase : public AnimatableShape
+ class ExternalShapeBase : public ExternalMediaShape
{
public:
/** Create a shape for the given XShape for an external shape
@@ -79,9 +79,11 @@ namespace slideshow
// animation methods
//------------------------------------------------------------------
- virtual void enterAnimationMode();
- virtual void leaveAnimationMode();
-
+ virtual void play();
+ virtual void stop();
+ virtual void pause();
+ virtual bool isPlaying() const;
+ virtual void setMediaTime(double);
// render methods
//------------------------------------------------------------------
@@ -120,6 +122,12 @@ namespace slideshow
virtual bool implStartIntrinsicAnimation() = 0;
/// override in derived class to stop external viewer
virtual bool implEndIntrinsicAnimation() = 0;
+ /// override in derived class to pause external viewer
+ virtual bool implPauseIntrinsicAnimation() = 0;
+ /// override in derived class to return status of animation
+ virtual bool implIsIntrinsicAnimationPlaying() const = 0;
+ /// override in derived class to set media time
+ virtual void implSetIntrinsicAnimationTime(double) = 0;
/// The associated XShape
diff --git a/slideshow/source/engine/shapes/mediashape.cxx b/slideshow/source/engine/shapes/mediashape.cxx
index 796c9c3af567..326fda9bb69c 100644
--- a/slideshow/source/engine/shapes/mediashape.cxx
+++ b/slideshow/source/engine/shapes/mediashape.cxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: mediashape.cxx,v $
- * $Revision: 1.3 $
+ * $Revision: 1.3.18.1 $
*
* This file is part of OpenOffice.org.
*
@@ -97,10 +97,14 @@ namespace slideshow
virtual void implViewsChanged();
virtual bool implStartIntrinsicAnimation();
virtual bool implEndIntrinsicAnimation();
+ virtual bool implPauseIntrinsicAnimation();
+ virtual bool implIsIntrinsicAnimationPlaying() const;
+ virtual void implSetIntrinsicAnimationTime(double);
/// the list of active view shapes (one for each registered view layer)
typedef ::std::vector< ViewMediaShapeSharedPtr > ViewMediaShapeVector;
ViewMediaShapeVector maViewMediaShapes;
+ bool mbIsPlaying;
};
@@ -108,7 +112,8 @@ namespace slideshow
double nPrio,
const SlideShowContext& rContext ) :
ExternalShapeBase( xShape, nPrio, rContext ),
- maViewMediaShapes()
+ maViewMediaShapes(),
+ mbIsPlaying(false)
{
}
@@ -230,6 +235,8 @@ namespace slideshow
maViewMediaShapes.end(),
::boost::mem_fn( &ViewMediaShape::startMedia ) );
+ mbIsPlaying = true;
+
return true;
}
@@ -241,9 +248,43 @@ namespace slideshow
maViewMediaShapes.end(),
::boost::mem_fn( &ViewMediaShape::endMedia ) );
+ mbIsPlaying = false;
+
return true;
}
+ // ---------------------------------------------------------------------
+
+ bool MediaShape::implPauseIntrinsicAnimation()
+ {
+ ::std::for_each( maViewMediaShapes.begin(),
+ maViewMediaShapes.end(),
+ ::boost::mem_fn( &ViewMediaShape::pauseMedia ) );
+
+ mbIsPlaying = false;
+
+ return true;
+ }
+
+ // ---------------------------------------------------------------------
+
+ bool MediaShape::implIsIntrinsicAnimationPlaying() const
+ {
+ return mbIsPlaying;
+ }
+
+ // ---------------------------------------------------------------------
+
+ void MediaShape::implSetIntrinsicAnimationTime(double fTime)
+ {
+ ::std::for_each( maViewMediaShapes.begin(),
+ maViewMediaShapes.end(),
+ ::boost::bind( &ViewMediaShape::setMediaTime,
+ _1, boost::cref(fTime)) );
+ }
+
+ // ---------------------------------------------------------------------
+
ShapeSharedPtr createMediaShape(
const uno::Reference< drawing::XShape >& xShape,
double nPrio,
diff --git a/slideshow/source/engine/shapes/viewmediashape.cxx b/slideshow/source/engine/shapes/viewmediashape.cxx
index 98afed06b4ca..a02c795d4943 100644
--- a/slideshow/source/engine/shapes/viewmediashape.cxx
+++ b/slideshow/source/engine/shapes/viewmediashape.cxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: viewmediashape.cxx,v $
- * $Revision: 1.6 $
+ * $Revision: 1.6.2.1 $
*
* This file is part of OpenOffice.org.
*
@@ -166,6 +166,22 @@ namespace slideshow
// ---------------------------------------------------------------------
+ void ViewMediaShape::pauseMedia()
+ {
+ if( mxPlayer.is() && ( mxPlayer->getDuration() > 0.0 ) )
+ mxPlayer->stop();
+ }
+
+ // ---------------------------------------------------------------------
+
+ void ViewMediaShape::setMediaTime(double fTime)
+ {
+ if( mxPlayer.is() && ( mxPlayer->getDuration() > 0.0 ) )
+ mxPlayer->setMediaTime(fTime);
+ }
+
+ // ---------------------------------------------------------------------
+
bool ViewMediaShape::render( const ::basegfx::B2DRectangle& rBounds ) const
{
::cppcanvas::CanvasSharedPtr pCanvas = mpViewLayer->getCanvas();;
diff --git a/slideshow/source/engine/shapes/viewmediashape.hxx b/slideshow/source/engine/shapes/viewmediashape.hxx
index 6fbf482c633b..09f4d4fa53ef 100644
--- a/slideshow/source/engine/shapes/viewmediashape.hxx
+++ b/slideshow/source/engine/shapes/viewmediashape.hxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: viewmediashape.hxx,v $
- * $Revision: 1.3 $
+ * $Revision: 1.3.18.1 $
*
* This file is part of OpenOffice.org.
*
@@ -107,6 +107,20 @@ namespace slideshow
*/
void endMedia();
+ /** Notify the ViewShape that it should pause playback
+
+ This methods pauses animation on the associate
+ target view. The content stays visible (for video)
+ */
+ void pauseMedia();
+
+ /** Set current time of media.
+
+ @param fTime
+ Local media time that should now be presented, in seconds.
+ */
+ void setMediaTime(double fTime);
+
// render methods
//------------------------------------------------------------------
diff --git a/slideshow/source/inc/animationnode.hxx b/slideshow/source/inc/animationnode.hxx
index ff6f71a02a49..d3ddc6dad171 100644
--- a/slideshow/source/inc/animationnode.hxx
+++ b/slideshow/source/inc/animationnode.hxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: animationnode.hxx,v $
- * $Revision: 1.6 $
+ * $Revision: 1.6.18.1 $
*
* This file is part of OpenOffice.org.
*
@@ -150,8 +150,9 @@ public:
/** Query node whether it has an animation pending.
- @return true, if this node (or at least one of its
- children) has an animation pending.
+ @return true, if this node (or at least one of its children)
+ has an animation pending. Used to determine if the main
+ sequence is actually empty, or contains effects
*/
virtual bool hasPendingAnimation() const = 0;
};
diff --git a/slideshow/source/inc/externalmediashape.hxx b/slideshow/source/inc/externalmediashape.hxx
new file mode 100644
index 000000000000..9cdeac6010a4
--- /dev/null
+++ b/slideshow/source/inc/externalmediashape.hxx
@@ -0,0 +1,99 @@
+/*************************************************************************
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: externalmediashape.hxx,v $
+ *
+ * $Revision: 1.1.2.1 $
+ *
+ * last change: $Author: thb $ $Date: 2008/07/02 19:51:17 $
+ *
+ * The Contents of this file are made available subject to
+ * the terms of GNU Lesser General Public License Version 2.1.
+ *
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2005 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ ************************************************************************/
+
+#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 */