Kaydet (Commit) 363c1ede authored tarafından Miklos Vajna's avatar Miklos Vajna

package: kill RTL_CONSTASCII_USTRINGPARAM in zipapi

Change-Id: Ic53f613cfaa5bd4affd0c27b5ed4ed20536ee055
üst 38d446da
...@@ -64,14 +64,14 @@ sal_Int64 SAL_CALL ByteGrabber::seek( sal_Int64 location ) ...@@ -64,14 +64,14 @@ sal_Int64 SAL_CALL ByteGrabber::seek( sal_Int64 location )
{ {
sal_Int64 nLen = xSeek->getLength(); sal_Int64 nLen = xSeek->getLength();
if ( location < 0 || location > nLen ) if ( location < 0 || location > nLen )
throw lang::IllegalArgumentException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ), uno::Reference< uno::XInterface >(), 1 ); throw lang::IllegalArgumentException(OSL_LOG_PREFIX, uno::Reference< uno::XInterface >(), 1 );
if (location > nLen ) if (location > nLen )
location = nLen; location = nLen;
xSeek->seek( location ); xSeek->seek( location );
return location; return location;
} }
else else
throw io::IOException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ), uno::Reference< uno::XInterface >() ); throw io::IOException(OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() );
} }
sal_Int64 SAL_CALL ByteGrabber::getPosition( ) sal_Int64 SAL_CALL ByteGrabber::getPosition( )
...@@ -81,7 +81,7 @@ sal_Int64 SAL_CALL ByteGrabber::getPosition( ) ...@@ -81,7 +81,7 @@ sal_Int64 SAL_CALL ByteGrabber::getPosition( )
if (xSeek.is() ) if (xSeek.is() )
return xSeek->getPosition(); return xSeek->getPosition();
else else
throw io::IOException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ), uno::Reference< uno::XInterface >() ); throw io::IOException(OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() );
} }
sal_Int64 SAL_CALL ByteGrabber::getLength( ) sal_Int64 SAL_CALL ByteGrabber::getLength( )
...@@ -91,7 +91,7 @@ sal_Int64 SAL_CALL ByteGrabber::getLength( ) ...@@ -91,7 +91,7 @@ sal_Int64 SAL_CALL ByteGrabber::getLength( )
if (xSeek.is() ) if (xSeek.is() )
return xSeek->getLength(); return xSeek->getLength();
else else
throw io::IOException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ), uno::Reference< uno::XInterface >() ); throw io::IOException(OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() );
} }
ByteGrabber& ByteGrabber::operator >> (sal_Int8& rInt8) ByteGrabber& ByteGrabber::operator >> (sal_Int8& rInt8)
......
...@@ -230,15 +230,15 @@ sal_Int32 SAL_CALL XUnbufferedStream::readBytes( Sequence< sal_Int8 >& aData, sa ...@@ -230,15 +230,15 @@ sal_Int32 SAL_CALL XUnbufferedStream::readBytes( Sequence< sal_Int8 >& aData, sa
if ( nRead > nRequestedBytes ) if ( nRead > nRequestedBytes )
throw RuntimeException( throw RuntimeException(
OUString( RTL_CONSTASCII_USTRINGPARAM( "Should not be possible to read more then requested!" ) ), "Should not be possible to read more then requested!",
Reference< XInterface >() ); Reference< XInterface >() );
if ( maInflater.finished() || maInflater.getLastInflateError() ) if ( maInflater.finished() || maInflater.getLastInflateError() )
throw ZipIOException( OUString( RTL_CONSTASCII_USTRINGPARAM( "The stream seems to be broken!" ) ), throw ZipIOException("The stream seems to be broken!",
Reference< XInterface >() ); Reference< XInterface >() );
if ( maInflater.needsDictionary() ) if ( maInflater.needsDictionary() )
throw ZipIOException( OUString( RTL_CONSTASCII_USTRINGPARAM( "Dictionaries are not supported!" ) ), throw ZipIOException("Dictionaries are not supported!",
Reference< XInterface >() ); Reference< XInterface >() );
sal_Int32 nDiff = static_cast< sal_Int32 >( mnZipEnd - mnZipCurrent ); sal_Int32 nDiff = static_cast< sal_Int32 >( mnZipEnd - mnZipCurrent );
...@@ -253,7 +253,7 @@ sal_Int32 SAL_CALL XUnbufferedStream::readBytes( Sequence< sal_Int8 >& aData, sa ...@@ -253,7 +253,7 @@ sal_Int32 SAL_CALL XUnbufferedStream::readBytes( Sequence< sal_Int8 >& aData, sa
sal_Int32 nZipRead = mxZipStream->readBytes( maCompBuffer, nToRead ); sal_Int32 nZipRead = mxZipStream->readBytes( maCompBuffer, nToRead );
if ( nZipRead < nToRead ) if ( nZipRead < nToRead )
throw ZipIOException( OUString( RTL_CONSTASCII_USTRINGPARAM( "No expected data!" ) ), throw ZipIOException("No expected data!",
Reference< XInterface >() ); Reference< XInterface >() );
mnZipCurrent += nZipRead; mnZipCurrent += nZipRead;
...@@ -280,7 +280,7 @@ sal_Int32 SAL_CALL XUnbufferedStream::readBytes( Sequence< sal_Int8 >& aData, sa ...@@ -280,7 +280,7 @@ sal_Int32 SAL_CALL XUnbufferedStream::readBytes( Sequence< sal_Int8 >& aData, sa
} }
else else
{ {
throw ZipIOException( OUString( RTL_CONSTASCII_USTRINGPARAM( "The stream seems to be broken!" ) ), throw ZipIOException("The stream seems to be broken!",
Reference< XInterface >() ); Reference< XInterface >() );
} }
} }
...@@ -297,7 +297,7 @@ sal_Int32 SAL_CALL XUnbufferedStream::readBytes( Sequence< sal_Int8 >& aData, sa ...@@ -297,7 +297,7 @@ sal_Int32 SAL_CALL XUnbufferedStream::readBytes( Sequence< sal_Int8 >& aData, sa
maCRC.update( aData ); maCRC.update( aData );
if ( mnZipSize + maHeader.getLength() == mnMyCurrent && maCRC.getValue() != maEntry.nCrc ) if ( mnZipSize + maHeader.getLength() == mnMyCurrent && maCRC.getValue() != maEntry.nCrc )
throw ZipIOException( OUString( RTL_CONSTASCII_USTRINGPARAM( "The stream seems to be broken!" ) ), throw ZipIOException("The stream seems to be broken!",
Reference< XInterface >() ); Reference< XInterface >() );
} }
} }
......
...@@ -304,7 +304,7 @@ void ZipOutputStream::writeCEN( const ZipEntry &rEntry ) ...@@ -304,7 +304,7 @@ void ZipOutputStream::writeCEN( const ZipEntry &rEntry )
throw(IOException, RuntimeException) throw(IOException, RuntimeException)
{ {
if ( !::comphelper::OStorageHelper::IsValidZipEntryFileName( rEntry.sPath, sal_True ) ) if ( !::comphelper::OStorageHelper::IsValidZipEntryFileName( rEntry.sPath, sal_True ) )
throw IOException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Unexpected character is used in file name." ) ), uno::Reference< XInterface >() ); throw IOException("Unexpected character is used in file name.", uno::Reference< XInterface >() );
::rtl::OString sUTF8Name = ::rtl::OUStringToOString( rEntry.sPath, RTL_TEXTENCODING_UTF8 ); ::rtl::OString sUTF8Name = ::rtl::OUStringToOString( rEntry.sPath, RTL_TEXTENCODING_UTF8 );
sal_Int16 nNameLength = static_cast < sal_Int16 > ( sUTF8Name.getLength() ); sal_Int16 nNameLength = static_cast < sal_Int16 > ( sUTF8Name.getLength() );
...@@ -353,7 +353,7 @@ sal_Int32 ZipOutputStream::writeLOC( const ZipEntry &rEntry ) ...@@ -353,7 +353,7 @@ sal_Int32 ZipOutputStream::writeLOC( const ZipEntry &rEntry )
throw(IOException, RuntimeException) throw(IOException, RuntimeException)
{ {
if ( !::comphelper::OStorageHelper::IsValidZipEntryFileName( rEntry.sPath, sal_True ) ) if ( !::comphelper::OStorageHelper::IsValidZipEntryFileName( rEntry.sPath, sal_True ) )
throw IOException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Unexpected character is used in file name." ) ), uno::Reference< XInterface >() ); throw IOException("Unexpected character is used in file name.", uno::Reference< XInterface >() );
::rtl::OString sUTF8Name = ::rtl::OUStringToOString( rEntry.sPath, RTL_TEXTENCODING_UTF8 ); ::rtl::OString sUTF8Name = ::rtl::OUStringToOString( rEntry.sPath, RTL_TEXTENCODING_UTF8 );
sal_Int16 nNameLength = static_cast < sal_Int16 > ( sUTF8Name.getLength() ); sal_Int16 nNameLength = static_cast < sal_Int16 > ( sUTF8Name.getLength() );
......
...@@ -31,7 +31,7 @@ uno::Reference< xml::crypto::XCipherContext > BlowfishCFB8CipherContext::Create( ...@@ -31,7 +31,7 @@ uno::Reference< xml::crypto::XCipherContext > BlowfishCFB8CipherContext::Create(
::rtl::Reference< BlowfishCFB8CipherContext > xResult = new BlowfishCFB8CipherContext(); ::rtl::Reference< BlowfishCFB8CipherContext > xResult = new BlowfishCFB8CipherContext();
xResult->m_pCipher = rtl_cipher_create( rtl_Cipher_AlgorithmBF, rtl_Cipher_ModeStream ); xResult->m_pCipher = rtl_cipher_create( rtl_Cipher_AlgorithmBF, rtl_Cipher_ModeStream );
if ( !xResult->m_pCipher ) if ( !xResult->m_pCipher )
throw uno::RuntimeException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Can not create cipher!")), throw uno::RuntimeException("Can not create cipher!",
uno::Reference< XInterface >() ); uno::Reference< XInterface >() );
if ( rtl_Cipher_E_None != rtl_cipher_init( if ( rtl_Cipher_E_None != rtl_cipher_init(
...@@ -42,7 +42,7 @@ uno::Reference< xml::crypto::XCipherContext > BlowfishCFB8CipherContext::Create( ...@@ -42,7 +42,7 @@ uno::Reference< xml::crypto::XCipherContext > BlowfishCFB8CipherContext::Create(
reinterpret_cast< const sal_uInt8* >( aInitVector.getConstArray() ), reinterpret_cast< const sal_uInt8* >( aInitVector.getConstArray() ),
aInitVector.getLength() ) ) aInitVector.getLength() ) )
{ {
throw uno::RuntimeException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Can not initialize cipher!") ), throw uno::RuntimeException("Can not initialize cipher!",
uno::Reference< XInterface >() ); uno::Reference< XInterface >() );
} }
...@@ -89,7 +89,7 @@ uno::Sequence< sal_Int8 > SAL_CALL BlowfishCFB8CipherContext::convertWithCipherC ...@@ -89,7 +89,7 @@ uno::Sequence< sal_Int8 > SAL_CALL BlowfishCFB8CipherContext::convertWithCipherC
if ( rtl_Cipher_E_None != nError ) if ( rtl_Cipher_E_None != nError )
{ {
throw uno::RuntimeException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Can not decrypt/encrypt with cipher!") ), throw uno::RuntimeException("Can not decrypt/encrypt with cipher!",
uno::Reference< uno::XInterface >() ); uno::Reference< uno::XInterface >() );
} }
......
...@@ -31,7 +31,7 @@ uno::Reference< xml::crypto::XDigestContext > SHA1DigestContext::Create() ...@@ -31,7 +31,7 @@ uno::Reference< xml::crypto::XDigestContext > SHA1DigestContext::Create()
::rtl::Reference< SHA1DigestContext > xResult = new SHA1DigestContext(); ::rtl::Reference< SHA1DigestContext > xResult = new SHA1DigestContext();
xResult->m_pDigest = rtl_digest_createSHA1(); xResult->m_pDigest = rtl_digest_createSHA1();
if ( !xResult->m_pDigest ) if ( !xResult->m_pDigest )
throw uno::RuntimeException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Can not create cipher!") ), throw uno::RuntimeException("Can not create cipher!",
uno::Reference< XInterface >() ); uno::Reference< XInterface >() );
return uno::Reference< xml::crypto::XDigestContext >( xResult.get() ); return uno::Reference< xml::crypto::XDigestContext >( xResult.get() );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment