Kaydet (Commit) 985f2b8b authored tarafından Noel Grandin's avatar Noel Grandin

remove unnecessary use of OUString constructor

Change-Id: I7769625289d8bf47fe5905dfb91d3bce9e0f5c85
üst c03efa7c
......@@ -79,7 +79,7 @@ void SAL_CALL java_io_InputStream::closeInput( ) throw(::com::sun::star::io::No
sal_Int32 SAL_CALL java_io_InputStream::readBytes( ::com::sun::star::uno::Sequence< sal_Int8 >& aData, sal_Int32 nBytesToRead ) throw(::com::sun::star::io::NotConnectedException, ::com::sun::star::io::BufferSizeExceededException, ::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException, std::exception)
{
if (nBytesToRead < 0)
throw ::com::sun::star::io::BufferSizeExceededException( OUString(THROW_WHERE), *this );
throw ::com::sun::star::io::BufferSizeExceededException( THROW_WHERE, *this );
jint out(0);
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
......
......@@ -582,7 +582,7 @@ BaseContent::addProperty(
{
if( ( m_nState & JustInserted ) || ( m_nState & Deleted ) || Name.isEmpty() )
{
throw lang::IllegalArgumentException( OUString(THROW_WHERE), uno::Reference< uno::XInterface >(), 0 );
throw lang::IllegalArgumentException( THROW_WHERE, uno::Reference< uno::XInterface >(), 0 );
}
m_pMyShell->associate( m_aUncPath,Name,DefaultValue,Attributes );
......@@ -598,7 +598,7 @@ BaseContent::removeProperty(
{
if( m_nState & Deleted )
throw beans::UnknownPropertyException( OUString(THROW_WHERE), uno::Reference< uno::XInterface >() );
throw beans::UnknownPropertyException( THROW_WHERE, uno::Reference< uno::XInterface >() );
m_pMyShell->deassociate( m_aUncPath, Name );
}
......@@ -744,7 +744,7 @@ BaseContent::setParent(
throw( lang::NoSupportException,
RuntimeException, std::exception)
{
throw lang::NoSupportException( OUString(THROW_WHERE), uno::Reference< uno::XInterface >() );
throw lang::NoSupportException( THROW_WHERE, uno::Reference< uno::XInterface >() );
}
......@@ -925,12 +925,12 @@ BaseContent::setPropertyValues(
OUString NewTitle;
if( !( Values[i].Value >>= NewTitle ) )
{
ret[i] <<= beans::IllegalTypeException( OUString(THROW_WHERE), uno::Reference< uno::XInterface >() );
ret[i] <<= beans::IllegalTypeException( THROW_WHERE, uno::Reference< uno::XInterface >() );
break;
}
else if( NewTitle.isEmpty() )
{
ret[i] <<= lang::IllegalArgumentException( OUString(THROW_WHERE), uno::Reference< uno::XInterface >(), 0 );
ret[i] <<= lang::IllegalArgumentException( THROW_WHERE, uno::Reference< uno::XInterface >(), 0 );
break;
}
......
......@@ -91,7 +91,7 @@ XCommandInfo_impl::getCommandInfoByName(
if( m_pMyShell->m_sCommandInfo[i].Name == aName )
return m_pMyShell->m_sCommandInfo[i];
throw UnsupportedCommandException( OUString(THROW_WHERE), uno::Reference< uno::XInterface >() );
throw UnsupportedCommandException( THROW_WHERE, uno::Reference< uno::XInterface >() );
}
......@@ -105,7 +105,7 @@ XCommandInfo_impl::getCommandInfoByHandle(
if( m_pMyShell->m_sCommandInfo[i].Handle == Handle )
return m_pMyShell->m_sCommandInfo[i];
throw UnsupportedCommandException( OUString(THROW_WHERE), uno::Reference< uno::XInterface >() );
throw UnsupportedCommandException( THROW_WHERE, uno::Reference< uno::XInterface >() );
}
......
......@@ -139,7 +139,7 @@ XInputStream_impl::readBytes(
io::IOException,
uno::RuntimeException, std::exception)
{
if( ! m_nIsOpen ) throw io::IOException( OUString(THROW_WHERE), uno::Reference< uno::XInterface >() );
if( ! m_nIsOpen ) throw io::IOException( THROW_WHERE, uno::Reference< uno::XInterface >() );
aData.realloc(nBytesToRead);
//TODO! translate memory exhaustion (if it were detectable...) into
......@@ -148,7 +148,7 @@ XInputStream_impl::readBytes(
sal_uInt64 nrc(0);
if(m_aFile.read( aData.getArray(),sal_uInt64(nBytesToRead),nrc )
!= osl::FileBase::E_None)
throw io::IOException( OUString(THROW_WHERE), uno::Reference< uno::XInterface >() );
throw io::IOException( THROW_WHERE, uno::Reference< uno::XInterface >() );
// Shrink aData in case we read less than nBytesToRead (XInputStream
// documentation does not tell whether this is required, and I do not know
......@@ -205,7 +205,7 @@ XInputStream_impl::closeInput(
{
osl::FileBase::RC err = m_aFile.close();
if( err != osl::FileBase::E_None )
throw io::IOException( OUString(THROW_WHERE), uno::Reference< uno::XInterface >() );
throw io::IOException( THROW_WHERE, uno::Reference< uno::XInterface >() );
m_nIsOpen = false;
}
}
......@@ -219,9 +219,9 @@ XInputStream_impl::seek(
uno::RuntimeException, std::exception )
{
if( location < 0 )
throw lang::IllegalArgumentException( OUString(THROW_WHERE), uno::Reference< uno::XInterface >(), 0 );
throw lang::IllegalArgumentException( THROW_WHERE, uno::Reference< uno::XInterface >(), 0 );
if( osl::FileBase::E_None != m_aFile.setPos( osl_Pos_Absolut, sal_uInt64( location ) ) )
throw io::IOException( OUString(THROW_WHERE), uno::Reference< uno::XInterface >() );
throw io::IOException( THROW_WHERE, uno::Reference< uno::XInterface >() );
}
......@@ -233,7 +233,7 @@ XInputStream_impl::getPosition(
{
sal_uInt64 uPos;
if( osl::FileBase::E_None != m_aFile.getPos( uPos ) )
throw io::IOException( OUString(THROW_WHERE), uno::Reference< uno::XInterface >() );
throw io::IOException( THROW_WHERE, uno::Reference< uno::XInterface >() );
return sal_Int64( uPos );
}
......@@ -245,7 +245,7 @@ XInputStream_impl::getLength(
{
sal_uInt64 uEndPos;
if ( m_aFile.getSize(uEndPos) != osl::FileBase::E_None )
throw io::IOException( OUString(THROW_WHERE), uno::Reference< uno::XInterface >() );
throw io::IOException( THROW_WHERE, uno::Reference< uno::XInterface >() );
else
return sal_Int64( uEndPos );
}
......
......@@ -84,7 +84,7 @@ XPropertySetInfo_impl::getPropertyByName(
for( sal_Int32 i = 0; i < m_seq.getLength(); ++i )
if( m_seq[i].Name == aName ) return m_seq[i];
throw beans::UnknownPropertyException( OUString(THROW_WHERE), uno::Reference< uno::XInterface >() );
throw beans::UnknownPropertyException( THROW_WHERE, uno::Reference< uno::XInterface >() );
}
......
This diff is collapsed.
......@@ -293,7 +293,7 @@ XResultSet_impl::OneMore(
}
else // error fetching anything
{
throw sdbc::SQLException( OUString(THROW_WHERE), uno::Reference< uno::XInterface >(), OUString(), 0, uno::Any() );
throw sdbc::SQLException( THROW_WHERE, uno::Reference< uno::XInterface >(), OUString(), 0, uno::Any() );
}
}
}
......@@ -451,7 +451,7 @@ XResultSet_impl::relative(
uno::RuntimeException, std::exception)
{
if( isAfterLast() || isBeforeFirst() )
throw sdbc::SQLException( OUString(THROW_WHERE), uno::Reference< uno::XInterface >(), OUString(), 0, uno::Any() );
throw sdbc::SQLException( THROW_WHERE, uno::Reference< uno::XInterface >(), OUString(), 0, uno::Any() );
if( row > 0 )
while( row-- ) next();
else if( row < 0 )
......@@ -603,7 +603,7 @@ XResultSet_impl::getStaticResultSet()
osl::MutexGuard aGuard( m_aMutex );
if ( m_xListener.is() )
throw ucb::ListenerAlreadySetException( OUString(THROW_WHERE), uno::Reference< uno::XInterface >() );
throw ucb::ListenerAlreadySetException( THROW_WHERE, uno::Reference< uno::XInterface >() );
return uno::Reference< sdbc::XResultSet >( this );
}
......@@ -619,7 +619,7 @@ XResultSet_impl::setListener(
osl::ClearableMutexGuard aGuard( m_aMutex );
if ( m_xListener.is() )
throw ucb::ListenerAlreadySetException( OUString(THROW_WHERE), uno::Reference< uno::XInterface >() );
throw ucb::ListenerAlreadySetException( THROW_WHERE, uno::Reference< uno::XInterface >() );
m_xListener = Listener;
......@@ -659,9 +659,9 @@ XResultSet_impl::connectToCache(
uno::RuntimeException, std::exception )
{
if( m_xListener.is() )
throw ucb::ListenerAlreadySetException( OUString(THROW_WHERE), uno::Reference< uno::XInterface >() );
throw ucb::ListenerAlreadySetException( THROW_WHERE, uno::Reference< uno::XInterface >() );
if( m_bStatic )
throw ucb::ListenerAlreadySetException( OUString(THROW_WHERE), uno::Reference< uno::XInterface >() );
throw ucb::ListenerAlreadySetException( THROW_WHERE, uno::Reference< uno::XInterface >() );
uno::Reference< ucb::XSourceInitialization > xTarget(
xCache, uno::UNO_QUERY );
......@@ -685,7 +685,7 @@ XResultSet_impl::connectToCache(
return;
}
}
throw ucb::ServiceNotFoundException( OUString(THROW_WHERE), uno::Reference< uno::XInterface >() );
throw ucb::ServiceNotFoundException( THROW_WHERE, uno::Reference< uno::XInterface >() );
}
......@@ -769,7 +769,7 @@ void SAL_CALL XResultSet_impl::setPropertyValue(
if( aPropertyName == "IsRowCountFinal" ||
aPropertyName == "RowCount" )
return;
throw beans::UnknownPropertyException( OUString(THROW_WHERE), uno::Reference< uno::XInterface >() );
throw beans::UnknownPropertyException( THROW_WHERE, uno::Reference< uno::XInterface >() );
}
......@@ -793,7 +793,7 @@ uno::Any SAL_CALL XResultSet_impl::getPropertyValue(
return aAny;
}
else
throw beans::UnknownPropertyException( OUString(THROW_WHERE), uno::Reference< uno::XInterface >() );
throw beans::UnknownPropertyException( THROW_WHERE, uno::Reference< uno::XInterface >() );
}
......@@ -822,7 +822,7 @@ void SAL_CALL XResultSet_impl::addPropertyChangeListener(
m_pRowCountListeners->addInterface( xListener );
}
else
throw beans::UnknownPropertyException( OUString(THROW_WHERE), uno::Reference< uno::XInterface >() );
throw beans::UnknownPropertyException( THROW_WHERE, uno::Reference< uno::XInterface >() );
}
......@@ -847,7 +847,7 @@ void SAL_CALL XResultSet_impl::removePropertyChangeListener(
m_pRowCountListeners->removeInterface( aListener );
}
else
throw beans::UnknownPropertyException( OUString(THROW_WHERE), uno::Reference< uno::XInterface >() );
throw beans::UnknownPropertyException( THROW_WHERE, uno::Reference< uno::XInterface >() );
}
void SAL_CALL XResultSet_impl::addVetoableChangeListener(
......
......@@ -126,10 +126,10 @@ void SAL_CALL XStream_impl::truncate(void)
throw( io::IOException, uno::RuntimeException, std::exception )
{
if (osl::FileBase::E_None != m_aFile.setSize(0))
throw io::IOException( OUString(THROW_WHERE), uno::Reference< uno::XInterface >() );
throw io::IOException( THROW_WHERE, uno::Reference< uno::XInterface >() );
if (osl::FileBase::E_None != m_aFile.setPos(osl_Pos_Absolut,sal_uInt64(0)))
throw io::IOException( OUString(THROW_WHERE), uno::Reference< uno::XInterface >() );
throw io::IOException( THROW_WHERE, uno::Reference< uno::XInterface >() );
}
......@@ -148,7 +148,7 @@ XStream_impl::readBytes(
uno::RuntimeException, std::exception)
{
if( ! m_nIsOpen )
throw io::IOException( OUString(THROW_WHERE), uno::Reference< uno::XInterface >() );
throw io::IOException( THROW_WHERE, uno::Reference< uno::XInterface >() );
sal_Int8 * buffer;
try
......@@ -158,7 +158,7 @@ XStream_impl::readBytes(
catch (const std::bad_alloc&)
{
if( m_nIsOpen ) m_aFile.close();
throw io::BufferSizeExceededException( OUString(THROW_WHERE), uno::Reference< uno::XInterface >() );
throw io::BufferSizeExceededException( THROW_WHERE, uno::Reference< uno::XInterface >() );
}
sal_uInt64 nrc(0);
......@@ -166,7 +166,7 @@ XStream_impl::readBytes(
!= osl::FileBase::E_None)
{
delete[] buffer;
throw io::IOException( OUString(THROW_WHERE), uno::Reference< uno::XInterface >() );
throw io::IOException( THROW_WHERE, uno::Reference< uno::XInterface >() );
}
aData = uno::Sequence< sal_Int8 > ( buffer, (sal_uInt32)nrc );
delete[] buffer;
......@@ -224,7 +224,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( OUString(THROW_WHERE), uno::Reference< uno::XInterface >() );
throw io::IOException( THROW_WHERE, uno::Reference< uno::XInterface >() );
}
}
......@@ -288,9 +288,9 @@ XStream_impl::seek(
uno::RuntimeException, std::exception )
{
if( location < 0 )
throw lang::IllegalArgumentException( OUString(THROW_WHERE), uno::Reference< uno::XInterface >(), 0 );
throw lang::IllegalArgumentException( THROW_WHERE, uno::Reference< uno::XInterface >(), 0 );
if( osl::FileBase::E_None != m_aFile.setPos( osl_Pos_Absolut, sal_uInt64( location ) ) )
throw io::IOException( OUString(THROW_WHERE), uno::Reference< uno::XInterface >() );
throw io::IOException( THROW_WHERE, uno::Reference< uno::XInterface >() );
}
......@@ -302,7 +302,7 @@ XStream_impl::getPosition(
{
sal_uInt64 uPos;
if( osl::FileBase::E_None != m_aFile.getPos( uPos ) )
throw io::IOException( OUString(THROW_WHERE), uno::Reference< uno::XInterface >() );
throw io::IOException( THROW_WHERE, uno::Reference< uno::XInterface >() );
return sal_Int64( uPos );
}
......@@ -314,7 +314,7 @@ XStream_impl::getLength(
{
sal_uInt64 uEndPos;
if ( m_aFile.getSize(uEndPos) != osl::FileBase::E_None )
throw io::IOException( OUString(THROW_WHERE), uno::Reference< uno::XInterface >() );
throw io::IOException( THROW_WHERE, uno::Reference< uno::XInterface >() );
else
return sal_Int64( uEndPos );
}
......
......@@ -205,7 +205,7 @@ FileProvider::queryContent(
aUnc );
if( err )
throw IllegalIdentifierException( OUString(THROW_WHERE), uno::Reference< uno::XInterface >() );
throw IllegalIdentifierException( THROW_WHERE, uno::Reference< uno::XInterface >() );
return Reference< XContent >( new BaseContent( m_pMyShell,xIdentifier,aUnc ) );
}
......@@ -396,7 +396,7 @@ XPropertySetInfoImpl2::getPropertyByName(
if( m_seq[i].Name == aName )
return m_seq[i];
throw UnknownPropertyException( OUString(THROW_WHERE), uno::Reference< uno::XInterface >() );
throw UnknownPropertyException( THROW_WHERE, uno::Reference< uno::XInterface >() );
}
......@@ -478,7 +478,7 @@ FileProvider::setPropertyValue( const OUString& aPropertyName,
aPropertyName.equalsAscii( "HostName" ) )
return;
else
throw UnknownPropertyException( OUString(THROW_WHERE), uno::Reference< uno::XInterface >() );
throw UnknownPropertyException( THROW_WHERE, uno::Reference< uno::XInterface >() );
}
......@@ -510,7 +510,7 @@ FileProvider::getPropertyValue(
return aAny;
}
else
throw UnknownPropertyException( OUString(THROW_WHERE), uno::Reference< uno::XInterface >() );
throw UnknownPropertyException( THROW_WHERE, uno::Reference< uno::XInterface >() );
}
......
......@@ -482,7 +482,7 @@ shell::associate( const OUString& aUnqPath,
shell::PropertySet::iterator it1 = m_aDefaultProperties.find( newProperty );
if( it1 != m_aDefaultProperties.end() )
throw beans::PropertyExistException( OUString(THROW_WHERE), uno::Reference< uno::XInterface >() );
throw beans::PropertyExistException( THROW_WHERE, uno::Reference< uno::XInterface >() );
{
osl::MutexGuard aGuard( m_aMutex );
......@@ -495,7 +495,7 @@ shell::associate( const OUString& aUnqPath,
PropertySet& properties = *(it->second.properties);
it1 = properties.find( newProperty );
if( it1 != properties.end() )
throw beans::PropertyExistException( OUString(THROW_WHERE), uno::Reference< uno::XInterface >() );
throw beans::PropertyExistException(THROW_WHERE, uno::Reference< uno::XInterface >() );
// Property does not exist
properties.insert( newProperty );
......@@ -518,7 +518,7 @@ shell::deassociate( const OUString& aUnqPath,
shell::PropertySet::iterator it1 = m_aDefaultProperties.find( oldProperty );
if( it1 != m_aDefaultProperties.end() )
throw beans::NotRemoveableException( OUString(THROW_WHERE), uno::Reference< uno::XInterface >() );
throw beans::NotRemoveableException( THROW_WHERE, uno::Reference< uno::XInterface >() );
osl::MutexGuard aGuard( m_aMutex );
......@@ -530,7 +530,7 @@ shell::deassociate( const OUString& aUnqPath,
it1 = properties.find( oldProperty );
if( it1 == properties.end() )
throw beans::UnknownPropertyException( OUString(THROW_WHERE), uno::Reference< uno::XInterface >() );
throw beans::UnknownPropertyException( THROW_WHERE, uno::Reference< uno::XInterface >() );
properties.erase( it1 );
......@@ -826,7 +826,7 @@ shell::setv( const OUString& aUnqPath,
it1 = properties.find( toset );
if( it1 == properties.end() )
{
ret[i] <<= beans::UnknownPropertyException( OUString(THROW_WHERE), uno::Reference< uno::XInterface >() );
ret[i] <<= beans::UnknownPropertyException( THROW_WHERE, uno::Reference< uno::XInterface >() );
continue;
}
......@@ -836,7 +836,7 @@ shell::setv( const OUString& aUnqPath,
if( it1->getAttributes() & beans::PropertyAttribute::READONLY )
{
ret[i] <<= lang::IllegalAccessException( OUString(THROW_WHERE), uno::Reference< uno::XInterface >() );
ret[i] <<= lang::IllegalAccessException( THROW_WHERE, uno::Reference< uno::XInterface >() );
continue;
}
......@@ -907,7 +907,7 @@ shell::setv( const OUString& aUnqPath,
}
}
else
ret[i] <<= beans::IllegalTypeException( OUString(THROW_WHERE), uno::Reference< uno::XInterface >() );
ret[i] <<= beans::IllegalTypeException( THROW_WHERE, uno::Reference< uno::XInterface >() );
}
else if(values[i].Name == IsReadOnly ||
values[i].Name == IsHidden)
......@@ -1015,7 +1015,7 @@ shell::setv( const OUString& aUnqPath,
}
}
else
ret[i] <<= beans::IllegalTypeException( OUString(THROW_WHERE), uno::Reference< uno::XInterface >() );
ret[i] <<= beans::IllegalTypeException( THROW_WHERE, uno::Reference< uno::XInterface >() );
}
}
} // end for
......
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