diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2013-11-18 13:41:36 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2013-11-18 17:02:16 +0100 |
commit | c37d7f0d50efbcf1c4ea25c54e7280b2989c35f7 (patch) | |
tree | ac7e506ed92fb9e37f5510114417f765665d7e6e /avmedia | |
parent | Updated core (diff) | |
download | core-c37d7f0d50efbcf1c4ea25c54e7280b2989c35f7.tar.gz core-c37d7f0d50efbcf1c4ea25c54e7280b2989c35f7.zip |
avmedia::getMediaFloater clean-up
Change-Id: I76dcf42267cbb1f028d0501471b569fa6b7b91d5
Diffstat (limited to 'avmedia')
-rw-r--r-- | avmedia/source/framework/mediacontrol.cxx | 2 | ||||
-rw-r--r-- | avmedia/source/framework/mediaplayer.cxx | 21 |
2 files changed, 6 insertions, 17 deletions
diff --git a/avmedia/source/framework/mediacontrol.cxx b/avmedia/source/framework/mediacontrol.cxx index 09355e12b59e..5d6497c5e98e 100644 --- a/avmedia/source/framework/mediacontrol.cxx +++ b/avmedia/source/framework/mediacontrol.cxx @@ -507,7 +507,7 @@ IMPL_LINK( MediaControl, implSelectHdl, ToolBox*, p ) case( AVMEDIA_TOOLBOXITEM_INSERT ): { - MediaFloater* pFloater = AVMEDIA_MEDIAWINDOW(); + MediaFloater* pFloater = avmedia::getMediaFloater(); if( pFloater ) pFloater->dispatchCurrentURL(); diff --git a/avmedia/source/framework/mediaplayer.cxx b/avmedia/source/framework/mediaplayer.cxx index 77570ea149bd..e5b35d308b51 100644 --- a/avmedia/source/framework/mediaplayer.cxx +++ b/avmedia/source/framework/mediaplayer.cxx @@ -68,7 +68,6 @@ MediaFloater::MediaFloater( SfxBindings* _pBindings, SfxChildWindow* pCW, Window SetPosSizePixel( Point( 0, 0 ), aSize ); SetMinOutputSizePixel( aSize ); SetText( OUString( AVMEDIA_RESID( AVMEDIA_STR_MEDIAPLAYER ) ) ); - implInit(); mpMediaWindow->show(); } @@ -80,12 +79,6 @@ MediaFloater::~MediaFloater() mpMediaWindow = NULL; } -// ----------------------------------------------------------------------------- - -void MediaFloater::implInit() -{ -} - // ------------------------------------------------------------------------- void MediaFloater::Resize() @@ -136,21 +129,17 @@ void MediaFloater::setURL( const OUString& rURL, bool bPlayImmediately ) // ----------------------------------------------------------------------------- -const OUString& MediaFloater::getURL() const -{ - static const OUString aEmptyStr; - return( mpMediaWindow ? mpMediaWindow->getURL() : aEmptyStr ); -} - -// ----------------------------------------------------------------------------- - void MediaFloater::dispatchCurrentURL() { SfxDispatcher* pDispatcher = GetBindings().GetDispatcher(); if( pDispatcher ) { - const SfxStringItem aMediaURLItem( SID_INSERT_AVMEDIA, getURL() ); + OUString url; + if (mpMediaWindow != 0) { + url = mpMediaWindow->getURL(); + } + const SfxStringItem aMediaURLItem( SID_INSERT_AVMEDIA, url ); pDispatcher->Execute( SID_INSERT_AVMEDIA, SFX_CALLMODE_RECORD, &aMediaURLItem, 0L ); } } |