diff options
author | Norbert Thiebaud <nthiebaud@gmail.com> | 2012-05-31 20:45:03 -0500 |
---|---|---|
committer | Norbert Thiebaud <nthiebaud@gmail.com> | 2012-05-31 21:15:00 -0500 |
commit | 827865fee1dba85d4c3f986a23e4bd34b1a641f9 (patch) | |
tree | 70f92b92b8eeb8f0d722b5c4ee24c1e9488d95f4 /ucb/source/ucp/file/filstr.cxx | |
parent | e6ef9f128e85961921b0b319087010fce1d59a74 (diff) |
targeted string re-work
Change-Id: Ic08995a67a407576da475a6716b1218e45b60dfd
Diffstat (limited to 'ucb/source/ucp/file/filstr.cxx')
-rw-r--r-- | ucb/source/ucp/file/filstr.cxx | 27 |
1 files changed, 12 insertions, 15 deletions
diff --git a/ucb/source/ucp/file/filstr.cxx b/ucb/source/ucp/file/filstr.cxx index 2bec4c61bcea..4f0f5b19d928 100644 --- a/ucb/source/ucp/file/filstr.cxx +++ b/ucb/source/ucp/file/filstr.cxx @@ -185,10 +185,10 @@ void SAL_CALL XStream_impl::truncate(void) throw( io::IOException, uno::RuntimeException ) { if (osl::FileBase::E_None != m_aFile.setSize(0)) - throw io::IOException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ), uno::Reference< uno::XInterface >() ); + throw io::IOException( ::rtl::OUString( OSL_LOG_PREFIX ), uno::Reference< uno::XInterface >() ); if (osl::FileBase::E_None != m_aFile.setPos(osl_Pos_Absolut,sal_uInt64(0))) - throw io::IOException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ), uno::Reference< uno::XInterface >() ); + throw io::IOException( ::rtl::OUString( OSL_LOG_PREFIX ), uno::Reference< uno::XInterface >() ); } @@ -207,7 +207,7 @@ XStream_impl::readBytes( uno::RuntimeException) { if( ! m_nIsOpen ) - throw io::IOException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ), uno::Reference< uno::XInterface >() ); + throw io::IOException( ::rtl::OUString( OSL_LOG_PREFIX ), uno::Reference< uno::XInterface >() ); sal_Int8 * buffer; try @@ -217,7 +217,7 @@ XStream_impl::readBytes( catch (const std::bad_alloc&) { if( m_nIsOpen ) m_aFile.close(); - throw io::BufferSizeExceededException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ), uno::Reference< uno::XInterface >() ); + throw io::BufferSizeExceededException( ::rtl::OUString( OSL_LOG_PREFIX ), uno::Reference< uno::XInterface >() ); } sal_uInt64 nrc(0); @@ -225,7 +225,7 @@ XStream_impl::readBytes( != osl::FileBase::E_None) { delete[] buffer; - throw io::IOException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ), uno::Reference< uno::XInterface >() ); + throw io::IOException( ::rtl::OUString( OSL_LOG_PREFIX ), uno::Reference< uno::XInterface >() ); } aData = uno::Sequence< sal_Int8 > ( buffer, (sal_uInt32)nrc ); delete[] buffer; @@ -283,7 +283,7 @@ XStream_impl::writeBytes( const uno::Sequence< sal_Int8 >& aData ) const sal_Int8* p = aData.getConstArray(); if(osl::FileBase::E_None != m_aFile.write(((void*)(p)),sal_uInt64(length),nWrittenBytes) || nWrittenBytes != length ) - throw io::IOException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ), uno::Reference< uno::XInterface >() ); + throw io::IOException( ::rtl::OUString( OSL_LOG_PREFIX ), uno::Reference< uno::XInterface >() ); } } @@ -301,8 +301,7 @@ XStream_impl::closeStream( if( err != osl::FileBase::E_None ) { io::IOException ex; - ex.Message = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "could not close file")); + ex.Message = rtl::OUString( "could not close file"); throw ex; } @@ -348,9 +347,9 @@ XStream_impl::seek( uno::RuntimeException ) { if( location < 0 ) - throw lang::IllegalArgumentException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ), uno::Reference< uno::XInterface >(), 0 ); + throw lang::IllegalArgumentException( ::rtl::OUString( OSL_LOG_PREFIX ), uno::Reference< uno::XInterface >(), 0 ); if( osl::FileBase::E_None != m_aFile.setPos( osl_Pos_Absolut, sal_uInt64( location ) ) ) - throw io::IOException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ), uno::Reference< uno::XInterface >() ); + throw io::IOException( ::rtl::OUString( OSL_LOG_PREFIX ), uno::Reference< uno::XInterface >() ); } @@ -362,7 +361,7 @@ XStream_impl::getPosition( { sal_uInt64 uPos; if( osl::FileBase::E_None != m_aFile.getPos( uPos ) ) - throw io::IOException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ), uno::Reference< uno::XInterface >() ); + throw io::IOException( ::rtl::OUString( OSL_LOG_PREFIX ), uno::Reference< uno::XInterface >() ); return sal_Int64( uPos ); } @@ -374,7 +373,7 @@ XStream_impl::getLength( { sal_uInt64 uEndPos; if ( m_aFile.getSize(uEndPos) != osl::FileBase::E_None ) - throw io::IOException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ), uno::Reference< uno::XInterface >() ); + throw io::IOException( ::rtl::OUString( OSL_LOG_PREFIX ), uno::Reference< uno::XInterface >() ); else return sal_Int64( uEndPos ); } @@ -395,9 +394,7 @@ void XStream_impl::waitForCompletion() // afterwards, there appears to be no cheaper way than to call fsync: if (m_nIsOpen && m_aFile.sync() != osl::FileBase::E_None) { throw io::IOException( - rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM( - "could not synchronize file to disc")), + rtl::OUString( "could not synchronize file to disc"), static_cast< OWeakObject * >(this)); } } |