summaryrefslogtreecommitdiff
path: root/svx/source
diff options
context:
space:
mode:
authorOliver Bolte <obo@openoffice.org>2004-08-12 08:02:37 +0000
committerOliver Bolte <obo@openoffice.org>2004-08-12 08:02:37 +0000
commit772066b2290f2d4bc6699f037e6ac4b08426a746 (patch)
treed2c16e842075f33449139ff0d30b1de3e38a48a8 /svx/source
parent78c6b5440ca038b20c7ef33f1e9fbafac7c16648 (diff)
INTEGRATION: CWS jmf2 (1.19.582); FILE MERGED
2004/08/02 10:47:36 ka 1.19.582.2: #i32298#: use all media filters 2004/07/26 14:44:24 ka 1.19.582.1: #i3316#: media support for Gallery
Diffstat (limited to 'svx/source')
-rw-r--r--svx/source/gallery2/galctrl.cxx27
1 files changed, 19 insertions, 8 deletions
diff --git a/svx/source/gallery2/galctrl.cxx b/svx/source/gallery2/galctrl.cxx
index 44978a53494b..83b00522e8cb 100644
--- a/svx/source/gallery2/galctrl.cxx
+++ b/svx/source/gallery2/galctrl.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: galctrl.cxx,v $
*
- * $Revision: 1.19 $
+ * $Revision: 1.20 $
*
- * last change: $Author: vg $ $Date: 2003-05-19 12:51:44 $
+ * last change: $Author: obo $ $Date: 2004-08-12 09:02:37 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -60,6 +60,9 @@
************************************************************************/
#include <vcl/svapp.hxx>
+#include <sfx2/viewfrm.hxx>
+#include <sfx2/dispatch.hxx>
+#include <avmedia/mediaplayer.hxx>
#include "helpid.hrc"
#include "galbrws2.hxx"
#include "galtheme.hxx"
@@ -282,13 +285,21 @@ void GalleryPreview::StartDrag( sal_Int8 nAction, const Point& rPosPixel )
// ------------------------------------------------------------------------
-void GalleryPreview::PreviewSound( const INetURLObject& rURL )
+void GalleryPreview::PreviewMedia( const INetURLObject& rURL )
{
- aSound.Stop();
- aSound.SetSoundName( rURL.GetMainURL( INetURLObject::NO_DECODE ) );
-
if( rURL.GetProtocol() != INET_PROT_NOT_VALID )
- aSound.Play();
+ {
+ ::avmedia::MediaFloater* pFloater = AVMEDIA_MEDIAWINDOW();
+
+ if( !pFloater )
+ {
+ SfxViewFrame::Current()->GetBindings().GetDispatcher()->Execute( SID_AVMEDIA_PLAYER, SFX_CALLMODE_SYNCHRON );
+ pFloater = AVMEDIA_MEDIAWINDOW();
+ }
+
+ if( pFloater )
+ pFloater->setURL( rURL.GetMainURL( INetURLObject::DECODE_UNAMBIGUOUS ), true );
+ }
}
// ------------------------------------------------------------------------
@@ -596,7 +607,7 @@ void GalleryListView::PaintField( OutputDevice& rDev, const Rectangle& rRect, US
GraphicObject aGrfObj;
if( pObj->GetObjKind() == SGA_OBJ_SOUND )
- aGrfObj = Graphic( Bitmap( GAL_RESID( RID_SVXBMP_GALLERY_SOUND ) ) );
+ aGrfObj = Graphic( BitmapEx( GAL_RESID( RID_SVXBMP_GALLERY_MEDIA ) ) );
else if( pObj->IsThumbBitmap() )
aGrfObj = Graphic( pObj->GetThumbBmp() );
else