diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2013-11-18 17:57:39 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2013-11-18 17:57:39 +0100 |
commit | a063da487e6956eff19efd2619633caf333c39eb (patch) | |
tree | fac6fc2d5faf43620ccc255bf99475c7bfb2108a | |
parent | df4adcc47a5cfad9e6562162ae6eb28a2271f344 (diff) |
Simplify avmedia::MediaItem::setURL
Change-Id: I9835b96813c6bf3d8690cdaa5de66ca07afdc801
-rw-r--r-- | avmedia/source/framework/mediacontrol.cxx | 2 | ||||
-rw-r--r-- | avmedia/source/framework/mediaitem.cxx | 9 | ||||
-rw-r--r-- | avmedia/source/viewer/mediawindow_impl.cxx | 2 | ||||
-rw-r--r-- | include/avmedia/mediaitem.hxx | 2 | ||||
-rw-r--r-- | svx/source/svdraw/svdomedia.cxx | 10 | ||||
-rw-r--r-- | svx/source/unodraw/unoshap4.cxx | 2 |
6 files changed, 13 insertions, 14 deletions
diff --git a/avmedia/source/framework/mediacontrol.cxx b/avmedia/source/framework/mediacontrol.cxx index 5d6497c5e98e..fc67309f62b5 100644 --- a/avmedia/source/framework/mediacontrol.cxx +++ b/avmedia/source/framework/mediacontrol.cxx @@ -498,7 +498,7 @@ IMPL_LINK( MediaControl, implSelectHdl, ToolBox*, p ) ::avmedia::MediaWindow::executeFormatErrorBox( this ); else { - aExecItem.setURL( aURL, 0 ); + aExecItem.setURL( aURL, "" ); aExecItem.setState( MEDIASTATE_PLAY ); } } diff --git a/avmedia/source/framework/mediaitem.cxx b/avmedia/source/framework/mediaitem.cxx index 4ef8b4ed0d91..98359b1b0411 100644 --- a/avmedia/source/framework/mediaitem.cxx +++ b/avmedia/source/framework/mediaitem.cxx @@ -202,7 +202,7 @@ void MediaItem::merge( const MediaItem& rMediaItem ) const sal_uInt32 nMaskSet = rMediaItem.getMaskSet(); if( AVMEDIA_SETMASK_URL & nMaskSet ) - setURL( rMediaItem.getURL(), &rMediaItem.getTempURL() ); + setURL( rMediaItem.getURL(), rMediaItem.getTempURL() ); if( AVMEDIA_SETMASK_STATE & nMaskSet ) setState( rMediaItem.getState() ); @@ -235,12 +235,11 @@ sal_uInt32 MediaItem::getMaskSet() const //------------------------------------------------------------------------ -void MediaItem::setURL( const OUString& rURL, - OUString const*const pTempURL) +void MediaItem::setURL( const OUString& rURL, const OUString& rTempURL ) { - m_pImpl->m_URL = rURL; m_pImpl->m_nMaskSet |= AVMEDIA_SETMASK_URL; - m_pImpl->m_TempFileURL = (pTempURL) ? *pTempURL : OUString(); + m_pImpl->m_URL = rURL; + m_pImpl->m_TempFileURL = rTempURL; } //------------------------------------------------------------------------ diff --git a/avmedia/source/viewer/mediawindow_impl.cxx b/avmedia/source/viewer/mediawindow_impl.cxx index 711eb48ddb50..ede40a31a109 100644 --- a/avmedia/source/viewer/mediawindow_impl.cxx +++ b/avmedia/source/viewer/mediawindow_impl.cxx @@ -328,7 +328,7 @@ void MediaWindowImpl::updateMediaItem( MediaItem& rItem ) const rItem.setMute( isMute() ); rItem.setVolumeDB( getVolumeDB() ); rItem.setZoom( getZoom() ); - rItem.setURL( getURL(), &mTempFileURL ); + rItem.setURL( getURL(), mTempFileURL ); } void MediaWindowImpl::executeMediaItem( const MediaItem& rItem ) diff --git a/include/avmedia/mediaitem.hxx b/include/avmedia/mediaitem.hxx index 2baf0ba1b789..0e39e31870d5 100644 --- a/include/avmedia/mediaitem.hxx +++ b/include/avmedia/mediaitem.hxx @@ -106,7 +106,7 @@ public: ::com::sun::star::media::ZoomLevel getZoom() const; void setURL( const OUString& rURL, - OUString const*const pTempURL); + const OUString& rTempURL); const OUString& getURL() const; const OUString& getTempURL() const; diff --git a/svx/source/svdraw/svdomedia.cxx b/svx/source/svdraw/svdomedia.cxx index 94b4aa988b6e..f9d838b5cca2 100644 --- a/svx/source/svdraw/svdomedia.cxx +++ b/svx/source/svdraw/svdomedia.cxx @@ -246,7 +246,7 @@ void SdrMediaObj::setURL( const OUString& rURL) { ::avmedia::MediaItem aURLItem; - aURLItem.setURL( rURL, 0 ); + aURLItem.setURL( rURL, "" ); setMediaProperties( aURLItem ); } @@ -378,24 +378,24 @@ void SdrMediaObj::mediaPropertiesChanged( const ::avmedia::MediaItem& rNewProper if (bSuccess) { m_pImpl->m_pTempFile.reset(new MediaTempFile(tempFileURL)); - m_pImpl->m_MediaProperties.setURL(url, & tempFileURL); + m_pImpl->m_MediaProperties.setURL(url, tempFileURL); } else // this case is for Clone via operator= { m_pImpl->m_pTempFile.reset(); - m_pImpl->m_MediaProperties.setURL(OUString(), 0); + m_pImpl->m_MediaProperties.setURL("", ""); } } else { m_pImpl->m_MediaProperties.setURL(url, - &rNewProperties.getTempURL()); + rNewProperties.getTempURL()); } } else { m_pImpl->m_pTempFile.reset(); - m_pImpl->m_MediaProperties.setURL(url, 0); + m_pImpl->m_MediaProperties.setURL(url, ""); } bBroadcastChanged = true; } diff --git a/svx/source/unodraw/unoshap4.cxx b/svx/source/unodraw/unoshap4.cxx index 46981b5dda3c..53b02048f409 100644 --- a/svx/source/unodraw/unoshap4.cxx +++ b/svx/source/unodraw/unoshap4.cxx @@ -818,7 +818,7 @@ bool SvxMediaShape::setPropertyValueImpl( const OUString& rName, const SfxItemPr if( rValue >>= aURL ) { bOk = true; - aItem.setURL( aURL, 0 ); + aItem.setURL( aURL, "" ); } } break; |