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 /include/avmedia | |
parent | 1416056789c9352b9a96452cb947d1d46d096fc2 (diff) |
avmedia::getMediaFloater clean-up
Change-Id: I76dcf42267cbb1f028d0501471b569fa6b7b91d5
Diffstat (limited to 'include/avmedia')
-rw-r--r-- | include/avmedia/mediaplayer.hxx | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/include/avmedia/mediaplayer.hxx b/include/avmedia/mediaplayer.hxx index ce10455b7e43..bd7706c64d8b 100644 --- a/include/avmedia/mediaplayer.hxx +++ b/include/avmedia/mediaplayer.hxx @@ -22,14 +22,9 @@ #include <sfx2/ctrlitem.hxx> #include <sfx2/dockwin.hxx> +#include <sfx2/viewfrm.hxx> #include <avmedia/avmediadllapi.h> -#define AVMEDIA_MEDIAWINDOW() \ -(static_cast< ::avmedia::MediaFloater* >( ( \ -SfxViewFrame::Current() && SfxViewFrame::Current()->GetChildWindow(::avmedia::MediaPlayer::GetChildWindowId())) ? \ -SfxViewFrame::Current()->GetChildWindow(::avmedia::MediaPlayer::GetChildWindowId())->GetWindow() : \ -NULL)) - namespace avmedia { @@ -52,23 +47,30 @@ public: ~MediaFloater(); void setURL( const OUString& rURL, bool bPlayImmediately ); - const OUString& getURL() const; void dispatchCurrentURL(); -protected: +private: virtual void Resize(); virtual void ToggleFloatingMode(); -private: - MediaWindow* mpMediaWindow; Size maLastSize; - - AVMEDIA_DLLPRIVATE void implInit(); }; +inline MediaFloater * getMediaFloater() { + SfxViewFrame * cur = SfxViewFrame::Current(); + if (cur != 0) { + SfxChildWindow * win = cur->GetChildWindow( + MediaPlayer::GetChildWindowId()); + if (win != 0) { + return static_cast<MediaFloater *>(win->GetWindow()); + } + } + return 0; +} + } #endif |