diff options
author | Noel Grandin <noel@peralex.com> | 2014-05-26 15:26:03 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2014-05-27 08:20:11 +0200 |
commit | 9af0abebfd61641c9d028505caa864cdf898e35b (patch) | |
tree | aff469b96f89daf093271d95f790250147ea9c0d /embeddedobj/source/commonembedding/visobj.cxx | |
parent | 9b791f9c31165b82ec0fa3760a8af18c5af21294 (diff) |
remove unnecessary use of Reference constructor in throw
Convert code like this:
throw IOException("xx",
Reference< XInterface >(static_cast<OWeakObject*>(this)) );
to this:
throw IOException("xx",
static_cast<OWeakObject*>(this) );
Change-Id: Ife9f645f0f1810a8e80219126193015502c43dbb
Diffstat (limited to 'embeddedobj/source/commonembedding/visobj.cxx')
-rw-r--r-- | embeddedobj/source/commonembedding/visobj.cxx | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/embeddedobj/source/commonembedding/visobj.cxx b/embeddedobj/source/commonembedding/visobj.cxx index 62438972075f..9f2af1e890ac 100644 --- a/embeddedobj/source/commonembedding/visobj.cxx +++ b/embeddedobj/source/commonembedding/visobj.cxx @@ -43,11 +43,11 @@ void SAL_CALL OCommonEmbeddedObject::setVisualAreaSize( sal_Int64 nAspect, const if ( nAspect == embed::Aspects::MSOLE_ICON ) // no representation can be retrieved throw embed::WrongStateException( "Illegal call!", - uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); + static_cast< ::cppu::OWeakObject* >(this) ); if ( m_nObjectState == -1 ) throw embed::WrongStateException( "The own object has no persistence!", - uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); + static_cast< ::cppu::OWeakObject* >(this) ); m_bHasClonedSize = false; @@ -81,7 +81,7 @@ awt::Size SAL_CALL OCommonEmbeddedObject::getVisualAreaSize( sal_Int64 nAspect ) if ( m_nObjectState == -1 ) throw embed::WrongStateException( "The own object has no persistence!", - uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); + static_cast< ::cppu::OWeakObject* >(this) ); SAL_WARN_IF( nAspect == embed::Aspects::MSOLE_ICON, "embeddedobj.common", "For iconified objects no graphical replacement is required!" ); @@ -121,11 +121,11 @@ sal_Int32 SAL_CALL OCommonEmbeddedObject::getMapUnit( sal_Int64 nAspect ) if ( nAspect == embed::Aspects::MSOLE_ICON ) // no representation can be retrieved throw embed::WrongStateException( "Illegal call!", - uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); + static_cast< ::cppu::OWeakObject* >(this) ); if ( m_nObjectState == -1 ) throw embed::WrongStateException( "The own object has no persistence!", - uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); + static_cast< ::cppu::OWeakObject* >(this) ); if ( m_bHasClonedSize ) return m_nClonedMapUnit; @@ -162,14 +162,14 @@ embed::VisualRepresentation SAL_CALL OCommonEmbeddedObject::getPreferredVisualRe if ( m_nObjectState == -1 ) throw embed::WrongStateException( "The own object has no persistence!", - uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); + static_cast< ::cppu::OWeakObject* >(this) ); SAL_WARN_IF( nAspect == embed::Aspects::MSOLE_ICON, "embeddedobj.common", "For iconified objects no graphical replacement is required!" ); if ( nAspect == embed::Aspects::MSOLE_ICON ) // no representation can be retrieved throw embed::WrongStateException( "Illegal call!", - uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); + static_cast< ::cppu::OWeakObject* >(this) ); bool bBackToLoaded = false; if ( m_nObjectState == embed::EmbedStates::LOADED ) |