diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2024-05-09 11:28:48 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2024-05-09 12:48:17 +0200 |
commit | 36703975a046d9271a919b9fa52be13204742b67 (patch) | |
tree | ea05130fb0e4810d21ef793358bd7260bbe1e749 /io/source/stm | |
parent | 43f4c075740671450766f632f2ddab5dc3563d3d (diff) |
loplugin:ostr in io
Change-Id: I68bb665798edf464020c8c3a6f7d9c9f5e85869e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167379
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
Diffstat (limited to 'io/source/stm')
-rw-r--r-- | io/source/stm/odata.cxx | 16 | ||||
-rw-r--r-- | io/source/stm/omark.cxx | 18 | ||||
-rw-r--r-- | io/source/stm/opipe.cxx | 18 | ||||
-rw-r--r-- | io/source/stm/opump.cxx | 10 | ||||
-rw-r--r-- | io/source/stm/streamhelper.cxx | 8 |
5 files changed, 35 insertions, 35 deletions
diff --git a/io/source/stm/odata.cxx b/io/source/stm/odata.cxx index 881b0cda132a..7391a2062cce 100644 --- a/io/source/stm/odata.cxx +++ b/io/source/stm/odata.cxx @@ -388,7 +388,7 @@ Reference < XConnectable > ODataInputStream::getPredecessor() // XServiceInfo OUString ODataInputStream::getImplementationName() { - return "com.sun.star.comp.io.stm.DataInputStream"; + return u"com.sun.star.comp.io.stm.DataInputStream"_ustr; } // XServiceInfo @@ -400,7 +400,7 @@ sal_Bool ODataInputStream::supportsService(const OUString& ServiceName) // XServiceInfo Sequence< OUString > ODataInputStream::getSupportedServiceNames() { - return { "com.sun.star.io.DataInputStream" }; + return { u"com.sun.star.io.DataInputStream"_ustr }; } extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface* @@ -682,7 +682,7 @@ Reference < XConnectable > ODataOutputStream::getPredecessor() // XServiceInfo OUString ODataOutputStream::getImplementationName() { - return "com.sun.star.comp.io.stm.DataOutputStream"; + return u"com.sun.star.comp.io.stm.DataOutputStream"_ustr; } // XServiceInfo @@ -694,7 +694,7 @@ sal_Bool ODataOutputStream::supportsService(const OUString& ServiceName) // XServiceInfo Sequence< OUString > ODataOutputStream::getSupportedServiceNames() { - return { "com.sun.star.io.DataOutputStream" }; + return { u"com.sun.star.io.DataOutputStream"_ustr }; } extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface* @@ -942,7 +942,7 @@ sal_Int32 OObjectOutputStream::offsetToMark(sal_Int32 nMark) // XServiceInfo OUString OObjectOutputStream::getImplementationName() { - return "com.sun.star.comp.io.stm.ObjectOutputStream"; + return u"com.sun.star.comp.io.stm.ObjectOutputStream"_ustr; } // XServiceInfo @@ -954,7 +954,7 @@ sal_Bool OObjectOutputStream::supportsService(const OUString& ServiceName) // XServiceInfo Sequence< OUString > OObjectOutputStream::getSupportedServiceNames() { - return { "com.sun.star.io.ObjectOutputStream" }; + return { u"com.sun.star.io.ObjectOutputStream"_ustr }; } extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface* @@ -1200,7 +1200,7 @@ sal_Int32 OObjectInputStream::offsetToMark(sal_Int32 nMark) // XServiceInfo OUString OObjectInputStream::getImplementationName() { - return "com.sun.star.comp.io.stm.ObjectInputStream"; + return u"com.sun.star.comp.io.stm.ObjectInputStream"_ustr; } // XServiceInfo @@ -1212,7 +1212,7 @@ sal_Bool OObjectInputStream::supportsService(const OUString& ServiceName) // XServiceInfo Sequence< OUString > OObjectInputStream::getSupportedServiceNames() { - return { "com.sun.star.io.ObjectInputStream" }; + return { u"com.sun.star.io.ObjectInputStream"_ustr }; } extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface* diff --git a/io/source/stm/omark.cxx b/io/source/stm/omark.cxx index 9cc5959f1f13..8cac97e230bd 100644 --- a/io/source/stm/omark.cxx +++ b/io/source/stm/omark.cxx @@ -342,7 +342,7 @@ void OMarkableOutputStream::checkMarksAndFlush() // XServiceInfo OUString OMarkableOutputStream::getImplementationName() { - return "com.sun.star.comp.io.stm.MarkableOutputStream"; + return u"com.sun.star.comp.io.stm.MarkableOutputStream"_ustr; } // XServiceInfo @@ -354,7 +354,7 @@ sal_Bool OMarkableOutputStream::supportsService(const OUString& ServiceName) // XServiceInfo Sequence< OUString > OMarkableOutputStream::getSupportedServiceNames() { - return { "com.sun.star.io.MarkableOutputStream" }; + return { u"com.sun.star.io.MarkableOutputStream"_ustr }; } extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface* @@ -449,7 +449,7 @@ sal_Int32 OMarkableInputStream::readBytes(Sequence< sal_Int8 >& aData, sal_Int32 if( !m_bValidStream ) { throw NotConnectedException( - "MarkableInputStream::readBytes NotConnectedException", + u"MarkableInputStream::readBytes NotConnectedException"_ustr, *this ); } std::unique_lock guard( m_mutex ); @@ -493,7 +493,7 @@ sal_Int32 OMarkableInputStream::readSomeBytes(Sequence< sal_Int8 >& aData, sal_I sal_Int32 nBytesRead; if( !m_bValidStream ) { throw NotConnectedException( - "MarkableInputStream::readSomeBytes NotConnectedException", + u"MarkableInputStream::readSomeBytes NotConnectedException"_ustr, *this ); } @@ -540,7 +540,7 @@ void OMarkableInputStream::skipBytes(sal_Int32 nBytesToSkip) { if ( nBytesToSkip < 0 ) throw BufferSizeExceededException( - "precondition not met: XInputStream::skipBytes: non-negative integer required!", + u"precondition not met: XInputStream::skipBytes: non-negative integer required!"_ustr, *this ); @@ -553,7 +553,7 @@ sal_Int32 OMarkableInputStream::available() { if( !m_bValidStream ) { throw NotConnectedException( - "MarkableInputStream::available NotConnectedException", + u"MarkableInputStream::available NotConnectedException"_ustr, *this ); } @@ -567,7 +567,7 @@ void OMarkableInputStream::closeInput() { if( !m_bValidStream ) { throw NotConnectedException( - "MarkableInputStream::closeInput NotConnectedException", + u"MarkableInputStream::closeInput NotConnectedException"_ustr, *this ); } std::unique_lock guard( m_mutex ); @@ -737,7 +737,7 @@ void OMarkableInputStream::checkMarksAndFlush() // XServiceInfo OUString OMarkableInputStream::getImplementationName() { - return "com.sun.star.comp.io.stm.MarkableInputStream"; + return u"com.sun.star.comp.io.stm.MarkableInputStream"_ustr; } // XServiceInfo @@ -749,7 +749,7 @@ sal_Bool OMarkableInputStream::supportsService(const OUString& ServiceName) // XServiceInfo Sequence< OUString > OMarkableInputStream::getSupportedServiceNames() { - return { "com.sun.star.io.MarkableInputStream" }; + return { u"com.sun.star.io.MarkableInputStream"_ustr }; } extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface* diff --git a/io/source/stm/opipe.cxx b/io/source/stm/opipe.cxx index 22e6218f3ef9..5c0e672dff1e 100644 --- a/io/source/stm/opipe.cxx +++ b/io/source/stm/opipe.cxx @@ -118,7 +118,7 @@ sal_Int32 OPipeImpl::readBytes(Sequence< sal_Int8 >& aData, sal_Int32 nBytesToRe if( m_bInputStreamClosed ) { throw NotConnectedException( - "Pipe::readBytes NotConnectedException", + u"Pipe::readBytes NotConnectedException"_ustr, *this ); } sal_Int32 nOccupiedBufferLen = m_oFIFO->getSize(); @@ -154,7 +154,7 @@ sal_Int32 OPipeImpl::readSomeBytes(Sequence< sal_Int8 >& aData, sal_Int32 nMaxBy if( m_bInputStreamClosed ) { throw NotConnectedException( - "Pipe::readSomeBytes NotConnectedException", + u"Pipe::readSomeBytes NotConnectedException"_ustr, *this ); } if( m_oFIFO->getSize() ) @@ -183,7 +183,7 @@ void OPipeImpl::skipBytes(sal_Int32 nBytesToSkip) if( m_bInputStreamClosed ) { throw NotConnectedException( - "Pipe::skipBytes NotConnectedException", + u"Pipe::skipBytes NotConnectedException"_ustr, *this ); } @@ -192,7 +192,7 @@ void OPipeImpl::skipBytes(sal_Int32 nBytesToSkip) > std::numeric_limits< sal_Int32 >::max() - m_nBytesToSkip) ) { throw BufferSizeExceededException( - "Pipe::skipBytes BufferSizeExceededException", + u"Pipe::skipBytes BufferSizeExceededException"_ustr, *this ); } m_nBytesToSkip += nBytesToSkip; @@ -209,7 +209,7 @@ sal_Int32 OPipeImpl::available() if( m_bInputStreamClosed ) { throw NotConnectedException( - "Pipe::available NotConnectedException", + u"Pipe::available NotConnectedException"_ustr, *this ); } return m_oFIFO->getSize(); @@ -237,14 +237,14 @@ void OPipeImpl::writeBytes(const Sequence< sal_Int8 >& aData) if( m_bOutputStreamClosed ) { throw NotConnectedException( - "Pipe::writeBytes NotConnectedException (outputstream)", + u"Pipe::writeBytes NotConnectedException (outputstream)"_ustr, *this ); } if( m_bInputStreamClosed ) { throw NotConnectedException( - "Pipe::writeBytes NotConnectedException (inputstream)", + u"Pipe::writeBytes NotConnectedException (inputstream)"_ustr, *this ); } @@ -331,7 +331,7 @@ Reference < XConnectable > OPipeImpl::getPredecessor() // XServiceInfo OUString OPipeImpl::getImplementationName() { - return "com.sun.star.comp.io.stm.Pipe"; + return u"com.sun.star.comp.io.stm.Pipe"_ustr; } // XServiceInfo @@ -343,7 +343,7 @@ sal_Bool OPipeImpl::supportsService(const OUString& ServiceName) // XServiceInfo Sequence< OUString > OPipeImpl::getSupportedServiceNames() { - return { "com.sun.star.io.Pipe" }; + return { u"com.sun.star.io.Pipe"_ustr }; } } diff --git a/io/source/stm/opump.cxx b/io/source/stm/opump.cxx index 62f6e85c3b95..febd86b26333 100644 --- a/io/source/stm/opump.cxx +++ b/io/source/stm/opump.cxx @@ -262,14 +262,14 @@ void Pump::run() if( ! rInput.is() ) { - throw NotConnectedException( "no input stream set", getXWeak() ); + throw NotConnectedException( u"no input stream set"_ustr, getXWeak() ); } Sequence< sal_Int8 > aData; while( rInput->readSomeBytes( aData, 65536 ) ) { if( ! rOutput.is() ) { - throw NotConnectedException( "no output stream set", getXWeak() ); + throw NotConnectedException( u"no output stream set"_ustr, getXWeak() ); } rOutput->writeBytes( aData ); osl_yieldThread(); @@ -357,7 +357,7 @@ void Pump::start() if( !m_aThread ) { throw RuntimeException( - "Pump::start Couldn't create worker thread", + u"Pump::start Couldn't create worker thread"_ustr, *this); } @@ -426,7 +426,7 @@ Reference< XOutputStream > Pump::getOutputStream() // XServiceInfo OUString Pump::getImplementationName() { - return "com.sun.star.comp.io.Pump"; + return u"com.sun.star.comp.io.Pump"_ustr; } // XServiceInfo @@ -438,7 +438,7 @@ sal_Bool Pump::supportsService(const OUString& ServiceName) // XServiceInfo Sequence< OUString > Pump::getSupportedServiceNames() { - return { "com.sun.star.io.Pump" }; + return { u"com.sun.star.io.Pump"_ustr }; } } diff --git a/io/source/stm/streamhelper.cxx b/io/source/stm/streamhelper.cxx index 0933ac966f8f..c682ecaad513 100644 --- a/io/source/stm/streamhelper.cxx +++ b/io/source/stm/streamhelper.cxx @@ -74,7 +74,7 @@ void MemRingBuffer::resizeBuffer( sal_Int32 nMinSize ) auto p = static_cast<sal_Int8*>(std::realloc(m_p, nNewLen)); if (!p) throw css::io::BufferSizeExceededException( - "MemRingBuffer::resizeBuffer BufferSizeExceededException"); + u"MemRingBuffer::resizeBuffer BufferSizeExceededException"_ustr); m_p = p; @@ -91,7 +91,7 @@ void MemRingBuffer::readAt( sal_Int32 nPos, Sequence<sal_Int8> &seq , sal_Int32 { if( nPos + nBytesToRead > m_nOccupiedBuffer ) { throw css::io::BufferSizeExceededException( - "MemRingBuffer::readAt BufferSizeExceededException"); + u"MemRingBuffer::readAt BufferSizeExceededException"_ustr); } sal_Int32 nStartReadingPos = nPos + m_nStart; @@ -120,7 +120,7 @@ void MemRingBuffer::writeAt( sal_Int32 nPos, const Sequence<sal_Int8> &seq ) if( nPos < 0 || nPos > std::numeric_limits< sal_Int32 >::max() - nLen ) { throw css::io::BufferSizeExceededException( - "MemRingBuffer::writeAt BufferSizeExceededException"); + u"MemRingBuffer::writeAt BufferSizeExceededException"_ustr); } if( nPos + nLen - m_nOccupiedBuffer > 0 ) { @@ -157,7 +157,7 @@ void MemRingBuffer::forgetFromStart( sal_Int32 nBytesToForget ) checkInvariants(); if( nBytesToForget > m_nOccupiedBuffer ) { throw css::io::BufferSizeExceededException( - "MemRingBuffer::forgetFromStart BufferSizeExceededException"); + u"MemRingBuffer::forgetFromStart BufferSizeExceededException"_ustr); } m_nStart += nBytesToForget; if( m_nStart >= m_nBufferLen ) { |