From 84e18e91f3464f504fb68e0fc7eae7a59272a7da Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Sat, 3 Jun 2017 07:54:21 +0200 Subject: Improved loplugin:redundantcast, const/static_cast combinations: unotools Change-Id: I5a4956f6c707216f11ab9cde2fcd961a662ad70d --- unotools/source/ucbhelper/xtempfile.cxx | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'unotools') diff --git a/unotools/source/ucbhelper/xtempfile.cxx b/unotools/source/ucbhelper/xtempfile.cxx index 7a7d8bc6b8c5..9482a75598d6 100644 --- a/unotools/source/ucbhelper/xtempfile.cxx +++ b/unotools/source/ucbhelper/xtempfile.cxx @@ -147,7 +147,7 @@ sal_Int32 SAL_CALL OTempFileService::readBytes( css::uno::Sequence< sal_Int8 >& { ::osl::MutexGuard aGuard( maMutex ); if ( mbInClosed ) - throw css::io::NotConnectedException ( OUString(), const_cast < css::uno::XWeak * > ( static_cast < const css::uno::XWeak * > (this ) ) ); + throw css::io::NotConnectedException ( OUString(), static_cast < css::uno::XWeak * > (this ) ); checkConnected(); if (nBytesToRead < 0) @@ -180,7 +180,7 @@ sal_Int32 SAL_CALL OTempFileService::readSomeBytes( css::uno::Sequence< sal_Int8 { ::osl::MutexGuard aGuard( maMutex ); if ( mbInClosed ) - throw css::io::NotConnectedException ( OUString(), const_cast < css::uno::XWeak * > ( static_cast < const css::uno::XWeak * > (this ) ) ); + throw css::io::NotConnectedException ( OUString(), static_cast < css::uno::XWeak * > (this ) ); checkConnected(); checkError(); @@ -200,7 +200,7 @@ void SAL_CALL OTempFileService::skipBytes( sal_Int32 nBytesToSkip ) { ::osl::MutexGuard aGuard( maMutex ); if ( mbInClosed ) - throw css::io::NotConnectedException ( OUString(), const_cast < css::uno::XWeak * > ( static_cast < const css::uno::XWeak * > (this ) ) ); + throw css::io::NotConnectedException ( OUString(), static_cast < css::uno::XWeak * > (this ) ); checkConnected(); checkError(); @@ -211,7 +211,7 @@ sal_Int32 SAL_CALL OTempFileService::available( ) { ::osl::MutexGuard aGuard( maMutex ); if ( mbInClosed ) - throw css::io::NotConnectedException ( OUString(), const_cast < css::uno::XWeak * > ( static_cast < const css::uno::XWeak * > (this ) ) ); + throw css::io::NotConnectedException ( OUString(), static_cast < css::uno::XWeak * > (this ) ); checkConnected(); @@ -225,7 +225,7 @@ void SAL_CALL OTempFileService::closeInput( ) { ::osl::MutexGuard aGuard( maMutex ); if ( mbInClosed ) - throw css::io::NotConnectedException ( OUString(), const_cast < css::uno::XWeak * > ( static_cast < const css::uno::XWeak * > (this ) ) ); + throw css::io::NotConnectedException ( OUString(), static_cast < css::uno::XWeak * > (this ) ); mbInClosed = true; @@ -245,7 +245,7 @@ void SAL_CALL OTempFileService::writeBytes( const css::uno::Sequence< sal_Int8 > { ::osl::MutexGuard aGuard( maMutex ); if ( mbOutClosed ) - throw css::io::NotConnectedException ( OUString(), const_cast < css::uno::XWeak * > ( static_cast < const css::uno::XWeak * > (this ) ) ); + throw css::io::NotConnectedException ( OUString(), static_cast < css::uno::XWeak * > (this ) ); checkConnected(); sal_uInt32 nWritten = mpStream->WriteBytes(aData.getConstArray(), aData.getLength()); @@ -257,7 +257,7 @@ void SAL_CALL OTempFileService::flush( ) { ::osl::MutexGuard aGuard( maMutex ); if ( mbOutClosed ) - throw css::io::NotConnectedException ( OUString(), const_cast < css::uno::XWeak * > ( static_cast < const css::uno::XWeak * > (this ) ) ); + throw css::io::NotConnectedException ( OUString(), static_cast < css::uno::XWeak * > (this ) ); checkConnected(); mpStream->Flush(); @@ -267,7 +267,7 @@ void SAL_CALL OTempFileService::closeOutput( ) { ::osl::MutexGuard aGuard( maMutex ); if ( mbOutClosed ) - throw css::io::NotConnectedException ( OUString(), const_cast < css::uno::XWeak * > ( static_cast < const css::uno::XWeak * > (this ) ) ); + throw css::io::NotConnectedException ( OUString(), static_cast < css::uno::XWeak * > (this ) ); mbOutClosed = true; @@ -319,7 +319,7 @@ void OTempFileService::checkConnected () } if (!mpStream) - throw css::io::NotConnectedException ( OUString(), const_cast < css::uno::XWeak * > ( static_cast < const css::uno::XWeak * > (this ) ) ); + throw css::io::NotConnectedException ( OUString(), static_cast < css::uno::XWeak * > (this ) ); } // XSeekable -- cgit