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 /framework | |
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 'framework')
-rw-r--r-- | framework/source/services/autorecovery.cxx | 2 | ||||
-rw-r--r-- | framework/source/services/frame.cxx | 4 | ||||
-rw-r--r-- | framework/source/services/tabwindowservice.cxx | 8 |
3 files changed, 7 insertions, 7 deletions
diff --git a/framework/source/services/autorecovery.cxx b/framework/source/services/autorecovery.cxx index eac5b1ed3e9a..76d76d40b11d 100644 --- a/framework/source/services/autorecovery.cxx +++ b/framework/source/services/autorecovery.cxx @@ -1939,7 +1939,7 @@ void AutoRecovery::implts_specifyDefaultFilterAndExtension(AutoRecovery::TDocume if (rInfo.AppModule.isEmpty()) { throw css::uno::RuntimeException( - OUString("Cant find out the default filter and its extension, if no application module is known!"), + "Cant find out the default filter and its extension, if no application module is known!", static_cast< css::frame::XDispatch* >(this)); } diff --git a/framework/source/services/frame.cxx b/framework/source/services/frame.cxx index 2386f1807d17..a091e6d2e947 100644 --- a/framework/source/services/frame.cxx +++ b/framework/source/services/frame.cxx @@ -798,7 +798,7 @@ void SAL_CALL Frame::initialize( const css::uno::Reference< css::awt::XWindow >& /* UNSAFE AREA --------------------------------------------------------------------------------------------- */ if (!xWindow.is()) throw css::uno::RuntimeException( - OUString("Frame::initialize() called without a valid container window reference."), + "Frame::initialize() called without a valid container window reference.", static_cast< css::frame::XFrame* >(this)); /* SAFE AREA ----------------------------------------------------------------------------------------------- */ @@ -806,7 +806,7 @@ void SAL_CALL Frame::initialize( const css::uno::Reference< css::awt::XWindow >& if ( m_xContainerWindow.is() ) throw css::uno::RuntimeException( - OUString("Frame::initialized() is called more then once, which isnt useful nor allowed."), + "Frame::initialized() is called more then once, which isnt useful nor allowed.", static_cast< css::frame::XFrame* >(this)); // Look for rejected calls first! diff --git a/framework/source/services/tabwindowservice.cxx b/framework/source/services/tabwindowservice.cxx index 2fefbdb1cba9..9646de95ca84 100644 --- a/framework/source/services/tabwindowservice.cxx +++ b/framework/source/services/tabwindowservice.cxx @@ -499,8 +499,8 @@ void TabWindowService::impl_checkTabIndex (::sal_Int32 nID) ) { throw css::lang::IndexOutOfBoundsException( - OUString("Tab index out of bounds."), - css::uno::Reference< css::uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this), css::uno::UNO_QUERY )); + "Tab index out of bounds.", + static_cast< ::cppu::OWeakObject* >(this) ); } } @@ -512,8 +512,8 @@ TTabPageInfoHash::iterator TabWindowService::impl_getTabPageInfo(::sal_Int32 nID TTabPageInfoHash::iterator pIt = m_lTabPageInfos.find(nID); if (pIt == m_lTabPageInfos.end ()) throw css::lang::IndexOutOfBoundsException( - OUString("Tab index out of bounds."), - css::uno::Reference< css::uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this), css::uno::UNO_QUERY )); + "Tab index out of bounds.", + static_cast< ::cppu::OWeakObject* >(this) ); return pIt; } |