Kaydet (Commit) f73201e5 authored tarafından José Guilherme Vanz's avatar José Guilherme Vanz Kaydeden (comit) Olivier Hallot

Removal ::rtl:: prefixes and macros in IO

This commit removes some ::rtl:: prefixes and RTL_CONSTASCII_STRINGPARAM,
 RTL_CONSTASCII_USTRINGPARAM macros in IO.

Change-Id: I410016990579e4a05843cfe396832a5fc8435e70
Signed-off-by: 's avatarJosé Guilherme Vanz <guilherme.sft@gmail.com>
Reviewed-on: https://gerrit.libreoffice.org/1210Reviewed-by: 's avatarOlivier Hallot <olivier.hallot@alta.org.br>
Tested-by: 's avatarOlivier Hallot <olivier.hallot@alta.org.br>
üst 8967f80a
......@@ -180,7 +180,7 @@ OUString OTextInputStream::implReadString( const Sequence< sal_Unicode >& Delimi
OUString aRetStr;
if( !mbEncodingInitialized )
{
OUString aUtf8Str( RTL_CONSTASCII_USTRINGPARAM("utf8") );
OUString aUtf8Str("utf8");
setEncoding( aUtf8Str );
}
if( !mbEncodingInitialized )
......@@ -439,13 +439,13 @@ Reference< XInterface > SAL_CALL TextInputStream_CreateInstance(
OUString TextInputStream_getImplementationName()
{
return OUString( RTL_CONSTASCII_USTRINGPARAM( IMPLEMENTATION_NAME ) );
return OUString ( IMPLEMENTATION_NAME );
}
Sequence< OUString > TextInputStream_getSupportedServiceNames()
{
Sequence< OUString > seqNames(1);
seqNames.getArray()[0] = OUString( RTL_CONSTASCII_USTRINGPARAM( SERVICE_NAME ) );
seqNames.getArray()[0] = SERVICE_NAME;
return seqNames;
}
......
......@@ -167,7 +167,7 @@ void OTextOutputStream::writeString( const OUString& aString )
{
if( !mbEncodingInitialized )
{
OUString aUtf8Str( RTL_CONSTASCII_USTRINGPARAM("utf8") );
OUString aUtf8Str("utf8");
setEncoding( aUtf8Str );
}
if( !mbEncodingInitialized )
......@@ -236,14 +236,14 @@ Reference< XInterface > SAL_CALL TextOutputStream_CreateInstance(
OUString TextOutputStream_getImplementationName() SAL_THROW( () )
{
return OUString( RTL_CONSTASCII_USTRINGPARAM( IMPLEMENTATION_NAME ) );
return OUString( IMPLEMENTATION_NAME );
}
Sequence< OUString > TextOutputStream_getSupportedServiceNames()
{
Sequence< OUString > seqNames(1);
seqNames.getArray()[0] = OUString( RTL_CONSTASCII_USTRINGPARAM( SERVICE_NAME ) );
seqNames.getArray()[0] = SERVICE_NAME;
return seqNames;
}
......
......@@ -496,13 +496,13 @@ Reference< XInterface > SAL_CALL ODataInputStream_CreateInstance(
OUString ODataInputStream_getImplementationName()
{
return OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.io.stm.DataInputStream" ) );
return OUString("com.sun.star.comp.io.stm.DataInputStream");
}
Sequence<OUString> ODataInputStream_getSupportedServiceNames(void)
{
Sequence<OUString> aRet(1);
aRet.getArray()[0] = OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.io.DataInputStream" ) );
aRet.getArray()[0] = "com.sun.star.io.DataInputStream";
return aRet;
}
......@@ -904,13 +904,13 @@ Reference< XInterface > SAL_CALL ODataOutputStream_CreateInstance(
OUString ODataOutputStream_getImplementationName()
{
return OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.io.stm.DataOutputStream" ) );
return OUString("com.sun.star.comp.io.stm.DataOutputStream");
}
Sequence<OUString> ODataOutputStream_getSupportedServiceNames(void)
{
Sequence<OUString> aRet(1);
aRet.getArray()[0] = OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.io.DataOutputStream" ) );
aRet.getArray()[0] = "com.sun.star.io.DataOutputStream";
return aRet;
}
......@@ -1182,13 +1182,13 @@ Reference< XInterface > SAL_CALL OObjectOutputStream_CreateInstance(
OUString OObjectOutputStream_getImplementationName()
{
return OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.io.stm.ObjectOutputStream" ) );
return OUString("com.sun.star.comp.io.stm.ObjectOutputStream");
}
Sequence<OUString> OObjectOutputStream_getSupportedServiceNames(void)
{
Sequence<OUString> aRet(1);
aRet.getArray()[0] = OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.io.ObjectOutputStream" ) );
aRet.getArray()[0] = "com.sun.star.io.ObjectOutputStream";
return aRet;
}
......@@ -1505,13 +1505,13 @@ Reference< XInterface > SAL_CALL OObjectInputStream_CreateInstance( const Refere
OUString OObjectInputStream_getImplementationName()
{
return OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.io.stm.ObjectInputStream" ) );
return OUString("com.sun.star.comp.io.stm.ObjectInputStream");
}
Sequence<OUString> OObjectInputStream_getSupportedServiceNames(void)
{
Sequence<OUString> aRet(1);
aRet.getArray()[0] = OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.io.ObjectInputStream" ) );
aRet.getArray()[0] = "com.sun.star.io.ObjectInputStream";
return aRet;
}
......
......@@ -466,13 +466,13 @@ Reference< XInterface > SAL_CALL OMarkableOutputStream_CreateInstance(
OUString OMarkableOutputStream_getImplementationName()
{
return OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.io.stm.MarkableOutputStream" ));
return OUString("com.sun.star.comp.io.stm.MarkableOutputStream");
}
Sequence<OUString> OMarkableOutputStream_getSupportedServiceNames(void)
{
Sequence<OUString> aRet(1);
aRet.getArray()[0] = OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.io.MarkableOutputStream" ) );
aRet.getArray()[0] = "com.sun.star.io.MarkableOutputStream";
return aRet;
}
......@@ -643,7 +643,7 @@ sal_Int32 OMarkableInputStream::readBytes(Sequence< sal_Int8 >& aData, sal_Int32
}
else {
throw NotConnectedException(
OUString( RTL_CONSTASCII_USTRINGPARAM("MarkableInputStream::readBytes NotConnectedException")) ,
OUString("MarkableInputStream::readBytes NotConnectedException") ,
*this );
}
return nBytesRead;
......@@ -705,7 +705,7 @@ sal_Int32 OMarkableInputStream::readSomeBytes(Sequence< sal_Int8 >& aData, sal_I
else
{
throw NotConnectedException(
OUString( RTL_CONSTASCII_USTRINGPARAM("MarkableInputStream::readSomeBytes NotConnectedException")) ,
OUString("MarkableInputStream::readSomeBytes NotConnectedException") ,
*this );
}
return nBytesRead;
......@@ -721,7 +721,7 @@ void OMarkableInputStream::skipBytes(sal_Int32 nBytesToSkip)
{
if ( nBytesToSkip < 0 )
throw BufferSizeExceededException(
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("precondition not met: XInputStream::skipBytes: non-negative integer required!")),
OUString("precondition not met: XInputStream::skipBytes: non-negative integer required!"),
*this
);
......@@ -740,7 +740,7 @@ sal_Int32 OMarkableInputStream::available(void) throw (NotConnectedException, Ru
else
{
throw NotConnectedException(
OUString( RTL_CONSTASCII_USTRINGPARAM( "MarkableInputStream::available NotConnectedException" ) ) ,
OUString("MarkableInputStream::available NotConnectedException") ,
*this );
}
......@@ -766,7 +766,7 @@ void OMarkableInputStream::closeInput(void) throw (NotConnectedException, Runtim
}
else {
throw NotConnectedException(
OUString( RTL_CONSTASCII_USTRINGPARAM( "MarkableInputStream::closeInput NotConnectedException" ) ) ,
OUString("MarkableInputStream::closeInput NotConnectedException") ,
*this );
}
}
......@@ -993,13 +993,13 @@ Reference < XInterface > SAL_CALL OMarkableInputStream_CreateInstance(
OUString OMarkableInputStream_getImplementationName()
{
return OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.io.stm.MarkableInputStream" ));
return OUString("com.sun.star.comp.io.stm.MarkableInputStream");
}
Sequence<OUString> OMarkableInputStream_getSupportedServiceNames(void)
{
Sequence<OUString> aRet(1);
aRet.getArray()[0] = OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.io.MarkableInputStream" ));
aRet.getArray()[0] = "com.sun.star.io.MarkableInputStream";
return aRet;
}
......
......@@ -155,7 +155,7 @@ sal_Int32 OPipeImpl::readBytes(Sequence< sal_Int8 >& aData, sal_Int32 nBytesToRe
if( m_bInputStreamClosed )
{
throw NotConnectedException(
OUString( RTL_CONSTASCII_USTRINGPARAM( "Pipe::readBytes NotConnectedException" )),
OUString("Pipe::readBytes NotConnectedException"),
*this );
}
sal_Int32 nOccupiedBufferLen = m_pFIFO->getSize();
......@@ -194,7 +194,7 @@ sal_Int32 OPipeImpl::readSomeBytes(Sequence< sal_Int8 >& aData, sal_Int32 nMaxBy
if( m_bInputStreamClosed )
{
throw NotConnectedException(
OUString( RTL_CONSTASCII_USTRINGPARAM( "Pipe::readSomeBytes NotConnectedException" )),
OUString("Pipe::readSomeBytes NotConnectedException"),
*this );
}
if( m_pFIFO->getSize() )
......@@ -226,7 +226,7 @@ void OPipeImpl::skipBytes(sal_Int32 nBytesToSkip)
if( m_bInputStreamClosed )
{
throw NotConnectedException(
OUString( RTL_CONSTASCII_USTRINGPARAM( "Pipe::skipBytes NotConnectedException" ) ),
OUString("Pipe::skipBytes NotConnectedException"),
*this );
}
......@@ -235,7 +235,7 @@ void OPipeImpl::skipBytes(sal_Int32 nBytesToSkip)
> std::numeric_limits< sal_Int32 >::max() - m_nBytesToSkip) )
{
throw BufferSizeExceededException(
OUString( RTL_CONSTASCII_USTRINGPARAM( "Pipe::skipBytes BufferSizeExceededException" )),
OUString("Pipe::skipBytes BufferSizeExceededException"),
*this );
}
m_nBytesToSkip += nBytesToSkip;
......@@ -254,7 +254,7 @@ sal_Int32 OPipeImpl::available(void)
if( m_bInputStreamClosed )
{
throw NotConnectedException(
OUString( RTL_CONSTASCII_USTRINGPARAM( "Pipe::available NotConnectedException" ) ),
OUString("Pipe::available NotConnectedException"),
*this );
}
return m_pFIFO->getSize();
......@@ -289,14 +289,14 @@ void OPipeImpl::writeBytes(const Sequence< sal_Int8 >& aData)
if( m_bOutputStreamClosed )
{
throw NotConnectedException(
OUString( RTL_CONSTASCII_USTRINGPARAM( "Pipe::writeBytes NotConnectedException (outputstream)" )),
OUString("Pipe::writeBytes NotConnectedException (outputstream)"),
*this );
}
if( m_bInputStreamClosed )
{
throw NotConnectedException(
OUString( RTL_CONSTASCII_USTRINGPARAM( "Pipe::writeBytes NotConnectedException (inputstream)" )),
OUString("Pipe::writeBytes NotConnectedException (inputstream)"),
*this );
}
......@@ -327,13 +327,13 @@ void OPipeImpl::writeBytes(const Sequence< sal_Int8 >& aData)
catch ( I_FIFO_OutOfBoundsException & )
{
throw BufferSizeExceededException(
OUString( RTL_CONSTASCII_USTRINGPARAM( "Pipe::writeBytes BufferSizeExceededException" )),
OUString("Pipe::writeBytes BufferSizeExceededException"),
*this );
}
catch ( I_FIFO_OutOfMemoryException & )
{
throw BufferSizeExceededException(
OUString( RTL_CONSTASCII_USTRINGPARAM( "Pipe::writeBytes BufferSizeExceededException" )),
OUString("Pipe::writeBytes BufferSizeExceededException"),
*this );
}
......
......@@ -272,7 +272,7 @@ void Pump::run()
if( ! rInput.is() )
{
NotConnectedException exception(
OUString(RTL_CONSTASCII_USTRINGPARAM("no input stream set")) , Reference<XInterface>((OWeakObject*)this) );
OUString("no input stream set") , Reference<XInterface>((OWeakObject*)this) );
throw exception;
}
Sequence< sal_Int8 > aData;
......@@ -281,7 +281,7 @@ void Pump::run()
if( ! rOutput.is() )
{
NotConnectedException exception(
OUString(RTL_CONSTASCII_USTRINGPARAM("no output stream set")) , Reference<XInterface>( (OWeakObject*)this) );
OUString("no output stream set") , Reference<XInterface>( (OWeakObject*)this) );
throw exception;
}
rOutput->writeBytes( aData );
......@@ -382,7 +382,7 @@ void Pump::start() throw( RuntimeException )
else
{
throw RuntimeException(
OUString( RTL_CONSTASCII_USTRINGPARAM( "Pump::start Couldn't create worker thread" )),
OUString("Pump::start Couldn't create worker thread"),
*this);
}
}
......@@ -485,12 +485,12 @@ Reference< XInterface > SAL_CALL OPumpImpl_CreateInstance(
OUString OPumpImpl_getImplementationName()
{
return OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.io.Pump") );
return OUString("com.sun.star.comp.io.Pump");
}
Sequence<OUString> OPumpImpl_getSupportedServiceNames(void)
{
OUString s( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.io.Pump" ) );
OUString s("com.sun.star.io.Pump");
Sequence< OUString > seq( &s , 1 );
return seq;
}
......
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