summaryrefslogtreecommitdiff
path: root/package/source/xstor/xstorage.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'package/source/xstor/xstorage.cxx')
-rw-r--r--package/source/xstor/xstorage.cxx452
1 files changed, 225 insertions, 227 deletions
diff --git a/package/source/xstor/xstorage.cxx b/package/source/xstor/xstorage.cxx
index 1858d76c3dcf..0a6adcd0e08b 100644
--- a/package/source/xstor/xstorage.cxx
+++ b/package/source/xstor/xstorage.cxx
@@ -102,15 +102,15 @@ void OStorage_Impl::completeStorageStreamCopy_Impl(
uno::Reference< beans::XPropertySet > xSourceProps( xSource, uno::UNO_QUERY );
uno::Reference< beans::XPropertySet > xDestProps( xDest, uno::UNO_QUERY );
if ( !xSourceProps.is() || !xDestProps.is() )
- throw uno::RuntimeException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( THROW_WHERE );
uno::Reference< io::XOutputStream > xDestOutStream = xDest->getOutputStream();
if ( !xDestOutStream.is() )
- throw io::IOException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw io::IOException( THROW_WHERE );
uno::Reference< io::XInputStream > xSourceInStream = xSource->getInputStream();
if ( !xSourceInStream.is() )
- throw io::IOException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw io::IOException( THROW_WHERE );
// TODO: headers of encripted streams should be copied also
::comphelper::OStorageHelper::CopyInputToOutput( xSourceInStream, xDestOutStream );
@@ -147,7 +147,7 @@ uno::Reference< io::XInputStream > GetSeekableTempCopy( uno::Reference< io::XInp
uno::Reference < io::XInputStream > xTempIn = xTempFile->getInputStream();
if ( !xTempOut.is() || !xTempIn.is() )
- throw io::IOException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw io::IOException( THROW_WHERE );
::comphelper::OStorageHelper::CopyInputToOutput( xInStream, xTempOut );
xTempOut->closeOutput();
@@ -523,7 +523,7 @@ void OStorage_Impl::OpenOwnPackage()
SAL_WARN_IF( !m_xPackageFolder.is(), "package.xstor", "The package root folder can not be opened!" );
if ( !m_xPackageFolder.is() )
- throw embed::InvalidStorageException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw embed::InvalidStorageException( THROW_WHERE );
}
uno::Reference< uno::XComponentContext > OStorage_Impl::GetComponentContext()
@@ -622,11 +622,11 @@ void OStorage_Impl::ReadContents()
uno::Reference< container::XEnumerationAccess > xEnumAccess( m_xPackageFolder, uno::UNO_QUERY );
if ( !xEnumAccess.is() )
- throw uno::RuntimeException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( THROW_WHERE );
uno::Reference< container::XEnumeration > xEnum = xEnumAccess->createEnumeration();
if ( !xEnum.is() )
- throw uno::RuntimeException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( THROW_WHERE );
m_bListCreated = true;
@@ -639,7 +639,7 @@ void OStorage_Impl::ReadContents()
if ( !xNamed.is() )
{
SAL_WARN( "package.xstor", "XNamed is not supported!" );
- throw uno::RuntimeException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( THROW_WHERE );
}
OUString aName = xNamed->getName();
@@ -651,7 +651,7 @@ void OStorage_Impl::ReadContents()
if ( m_nStorageType == embed::StorageFormats::OFOPXML && aName == "_rels" )
{
if ( !pNewElement->m_bIsStorage )
- throw io::IOException( THROW_WHERE, uno::Reference< uno::XInterface >() ); // TODO: Unexpected format
+ throw io::IOException( THROW_WHERE ); // TODO: Unexpected format
m_pRelStorElement = pNewElement;
CreateRelStorage();
@@ -700,12 +700,12 @@ void OStorage_Impl::CopyToStorage( const uno::Reference< embed::XStorage >& xDes
xPropSet->getPropertyValue( "OpenMode" ) >>= nDestMode;
if ( !( nDestMode & embed::ElementModes::WRITE ) )
- throw io::IOException( THROW_WHERE, uno::Reference< uno::XInterface >() ); // TODO: access_denied
+ throw io::IOException( THROW_WHERE ); // TODO: access_denied
ReadContents();
if ( !m_xPackageFolder.is() )
- throw embed::InvalidStorageException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw embed::InvalidStorageException( THROW_WHERE );
for ( SotElementList_Impl::iterator pElementIter = m_aChildrenList.begin();
pElementIter != m_aChildrenList.end(); ++pElementIter )
@@ -790,7 +790,7 @@ void OStorage_Impl::CopyStorageElement( SotElement_Impl* pElement,
uno::Reference< container::XNameAccess > xDestAccess( xDest, uno::UNO_QUERY );
if ( !xDestAccess.is() )
- throw uno::RuntimeException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( THROW_WHERE );
if ( xDestAccess->hasByName( aName )
&& !( pElement->m_bIsStorage && xDest->isStorageElement( aName ) ) )
@@ -808,7 +808,7 @@ void OStorage_Impl::CopyStorageElement( SotElement_Impl* pElement,
{
OpenSubStorage( pElement, embed::ElementModes::READ );
if ( !pElement->m_pStorage )
- throw io::IOException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw io::IOException( THROW_WHERE );
}
pElement->m_pStorage->CopyToStorage( xSubDest, bDirect );
@@ -819,7 +819,7 @@ void OStorage_Impl::CopyStorageElement( SotElement_Impl* pElement,
{
OpenSubStream( pElement );
if ( !pElement->m_pStream )
- throw io::IOException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw io::IOException( THROW_WHERE );
}
if ( !pElement->m_pStream->IsEncrypted() )
@@ -883,7 +883,7 @@ void OStorage_Impl::CopyStorageElement( SotElement_Impl* pElement,
}
if ( !xInputToInsert.is() )
- throw io::IOException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw io::IOException( THROW_WHERE );
xOptDest->insertStreamElementDirect( aName, xInputToInsert, aStrProps );
}
@@ -900,7 +900,7 @@ void OStorage_Impl::CopyStorageElement( SotElement_Impl* pElement,
else if ( m_nStorageType != embed::StorageFormats::PACKAGE )
{
SAL_WARN( "package.xstor", "Encryption is only supported in package storage!" );
- throw io::IOException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw io::IOException( THROW_WHERE );
}
else if ( pElement->m_pStream->HasCachedEncryptionData()
&& ( pElement->m_pStream->IsModified() || pElement->m_pStream->HasWriteOwner_Impl() ) )
@@ -995,8 +995,7 @@ uno::Sequence< uno::Sequence< beans::StringPair > > OStorage_Impl::GetAllRelatio
|| m_nRelInfoStatus == RELINFO_CHANGED_STREAM_READ || m_nRelInfoStatus == RELINFO_CHANGED )
return m_aRelInfo;
else // m_nRelInfoStatus == RELINFO_CHANGED_BROKEN || m_nRelInfoStatus == RELINFO_BROKEN
- throw io::IOException( THROW_WHERE "Wrong relinfo stream!",
- uno::Reference< uno::XInterface >() );
+ throw io::IOException( THROW_WHERE "Wrong relinfo stream!" );
}
void OStorage_Impl::CopyLastCommitTo( const uno::Reference< embed::XStorage >& xNewStor )
@@ -1005,7 +1004,7 @@ void OStorage_Impl::CopyLastCommitTo( const uno::Reference< embed::XStorage >& x
SAL_WARN_IF( !m_xPackageFolder.is(), "package.xstor", "A commited storage is incomplete!" );
if ( !m_xPackageFolder.is() )
- throw uno::RuntimeException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( THROW_WHERE );
OStorage_Impl aTempRepresent( NULL,
embed::ElementModes::READ,
@@ -1026,7 +1025,7 @@ void OStorage_Impl::InsertIntoPackageFolder( const OUString& aName,
SAL_WARN_IF( !m_xPackageFolder.is(), "package.xstor", "An inserted storage is incomplete!" );
uno::Reference< lang::XUnoTunnel > xTunnel( m_xPackageFolder, uno::UNO_QUERY );
if ( !xTunnel.is() )
- throw uno::RuntimeException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( THROW_WHERE );
xParentPackageFolder->insertByName( aName, uno::makeAny( xTunnel ) );
@@ -1048,7 +1047,7 @@ void OStorage_Impl::Commit()
// if storage is commited it should have a valid Package representation
SAL_WARN_IF( !m_xPackageFolder.is(), "package.xstor", "The package representation should exist!" );
if ( !m_xPackageFolder.is() )
- throw embed::InvalidStorageException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw embed::InvalidStorageException( THROW_WHERE );
OSL_ENSURE( m_nStorageMode & embed::ElementModes::WRITE,
"Commit of readonly storage, should be detected before!\n" );
@@ -1179,7 +1178,7 @@ void OStorage_Impl::Commit()
{
OpenSubStream( *pElementIter );
if ( !(*pElementIter)->m_pStream )
- throw uno::RuntimeException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( THROW_WHERE );
}
CommitStreamRelInfo( *pElementIter );
@@ -1204,7 +1203,7 @@ void OStorage_Impl::Commit()
{
OSL_ENSURE( (*pElementIter)->m_pStorage, "An inserted storage is incomplete!\n" );
if ( !(*pElementIter)->m_pStorage )
- throw uno::RuntimeException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( THROW_WHERE );
(*pElementIter)->m_pStorage->InsertIntoPackageFolder( (*pElementIter)->m_aName, xNewPackageFolder );
@@ -1215,7 +1214,7 @@ void OStorage_Impl::Commit()
{
OSL_ENSURE( (*pElementIter)->m_pStream, "An inserted stream is incomplete!\n" );
if ( !(*pElementIter)->m_pStream )
- throw uno::RuntimeException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( THROW_WHERE );
if ( !(*pElementIter)->m_pStream->IsTransacted() )
(*pElementIter)->m_pStream->Commit();
@@ -1238,7 +1237,7 @@ void OStorage_Impl::Commit()
// move properties to the destination package folder
uno::Reference< beans::XPropertySet > xProps( xNewPackageFolder, uno::UNO_QUERY );
if ( !xProps.is() )
- throw uno::RuntimeException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( THROW_WHERE );
xProps->setPropertyValue( "MediaType", uno::makeAny( m_aMediaType ) );
xProps->setPropertyValue( "Version", uno::makeAny( m_aVersion ) );
@@ -1253,7 +1252,7 @@ void OStorage_Impl::Commit()
SAL_WARN_IF( !xChangesBatch.is(), "package.xstor", "Impossible to commit package!" );
if ( !xChangesBatch.is() )
- throw uno::RuntimeException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( THROW_WHERE );
try
{
@@ -1352,19 +1351,19 @@ void OStorage_Impl::Revert()
::osl::MutexGuard aGuard( m_rMutexRef->GetMutex() ) ;
if ( m_nStorageType != embed::StorageFormats::PACKAGE )
- throw packages::NoEncryptionException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw packages::NoEncryptionException( THROW_WHERE );
if ( m_bIsRoot )
{
if ( !m_bHasCommonEncryptionData )
- throw packages::NoEncryptionException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw packages::NoEncryptionException( THROW_WHERE );
return m_aCommonEncryptionData;
}
else
{
if ( !m_pParent )
- throw packages::NoEncryptionException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw packages::NoEncryptionException( THROW_WHERE );
return m_pParent->GetCommonRootEncryptionData();
}
@@ -1392,7 +1391,7 @@ SotElement_Impl* OStorage_Impl::InsertStream( const OUString& aName, bool bEncr
{
SAL_WARN_IF( !m_xPackage.is(), "package.xstor", "Not possible to refer to package as to factory!" );
if ( !m_xPackage.is() )
- throw embed::InvalidStorageException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw embed::InvalidStorageException( THROW_WHERE);
uno::Sequence< uno::Any > aSeq( 1 );
aSeq[0] <<= sal_False;
@@ -1401,15 +1400,15 @@ SotElement_Impl* OStorage_Impl::InsertStream( const OUString& aName, bool bEncr
SAL_WARN_IF( !xNewElement.is(), "package.xstor", "Not possible to create a new stream!" );
if ( !xNewElement.is() )
- throw io::IOException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw io::IOException( THROW_WHERE );
uno::Reference< packages::XDataSinkEncrSupport > xPackageSubStream( xNewElement, uno::UNO_QUERY );
if ( !xPackageSubStream.is() )
- throw uno::RuntimeException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( THROW_WHERE );
OSL_ENSURE( m_nStorageType == embed::StorageFormats::PACKAGE || !bEncr, "Only package storage supports encryption!\n" );
if ( m_nStorageType != embed::StorageFormats::PACKAGE && bEncr )
- throw packages::NoEncryptionException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw packages::NoEncryptionException( THROW_WHERE );
// the mode is not needed for storage stream internal implementation
SotElement_Impl* pNewElement = InsertElement( aName, false );
@@ -1427,10 +1426,10 @@ SotElement_Impl* OStorage_Impl::InsertRawStream( const OUString& aName, const un
// insert of raw stream means insert and commit
SAL_WARN_IF( !m_xPackage.is(), "package.xstor", "Not possible to refer to package as to factory!" );
if ( !m_xPackage.is() )
- throw embed::InvalidStorageException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw embed::InvalidStorageException( THROW_WHERE );
if ( m_nStorageType != embed::StorageFormats::PACKAGE )
- throw packages::NoEncryptionException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw packages::NoEncryptionException( THROW_WHERE );
uno::Reference< io::XSeekable > xSeek( xInStream, uno::UNO_QUERY );
uno::Reference< io::XInputStream > xInStrToInsert = xSeek.is() ? xInStream :
@@ -1443,11 +1442,11 @@ SotElement_Impl* OStorage_Impl::InsertRawStream( const OUString& aName, const un
SAL_WARN_IF( !xNewElement.is(), "package.xstor", "Not possible to create a new stream!" );
if ( !xNewElement.is() )
- throw io::IOException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw io::IOException( THROW_WHERE );
uno::Reference< packages::XDataSinkEncrSupport > xPackageSubStream( xNewElement, uno::UNO_QUERY );
if ( !xPackageSubStream.is() )
- throw uno::RuntimeException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( THROW_WHERE );
xPackageSubStream->setRawStream( xInStrToInsert );
@@ -1468,7 +1467,7 @@ OStorage_Impl* OStorage_Impl::CreateNewStorageImpl( sal_Int32 nStorageMode )
{
SAL_WARN_IF( !m_xPackage.is(), "package.xstor", "Not possible to refer to package as to factory!" );
if ( !m_xPackage.is() )
- throw embed::InvalidStorageException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw embed::InvalidStorageException( THROW_WHERE );
uno::Sequence< uno::Any > aSeq( 1 );
aSeq[0] <<= sal_True;
@@ -1477,11 +1476,11 @@ OStorage_Impl* OStorage_Impl::CreateNewStorageImpl( sal_Int32 nStorageMode )
SAL_WARN_IF( !xNewElement.is(), "package.xstor", "Not possible to create a new storage!" );
if ( !xNewElement.is() )
- throw io::IOException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw io::IOException( THROW_WHERE );
uno::Reference< container::XNameContainer > xPackageSubFolder( xNewElement, uno::UNO_QUERY );
if ( !xPackageSubFolder.is() )
- throw uno::RuntimeException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( THROW_WHERE );
OStorage_Impl* pResult =
new OStorage_Impl( this, nStorageMode, xPackageSubFolder, m_xPackage, m_xContext, m_nStorageType );
@@ -1553,14 +1552,14 @@ void OStorage_Impl::OpenSubStorage( SotElement_Impl* pElement, sal_Int32 nStorag
uno::Reference< lang::XUnoTunnel > xTunnel;
m_xPackageFolder->getByName( pElement->m_aOriginalName ) >>= xTunnel;
if ( !xTunnel.is() )
- throw container::NoSuchElementException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw container::NoSuchElementException( THROW_WHERE );
uno::Reference< container::XNameContainer > xPackageSubFolder( xTunnel, uno::UNO_QUERY );
SAL_WARN_IF( !xPackageSubFolder.is(), "package.xstor", "Can not get XNameContainer interface from folder!" );
if ( !xPackageSubFolder.is() )
- throw uno::RuntimeException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( THROW_WHERE );
pElement->m_pStorage = new OStorage_Impl( this, nStorageMode, xPackageSubFolder, m_xPackage, m_xContext, m_nStorageType );
}
@@ -1580,11 +1579,11 @@ void OStorage_Impl::OpenSubStream( SotElement_Impl* pElement )
uno::Reference< lang::XUnoTunnel > xTunnel;
m_xPackageFolder->getByName( pElement->m_aOriginalName ) >>= xTunnel;
if ( !xTunnel.is() )
- throw container::NoSuchElementException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw container::NoSuchElementException( THROW_WHERE );
uno::Reference< packages::XDataSinkEncrSupport > xPackageSubStream( xTunnel, uno::UNO_QUERY );
if ( !xPackageSubStream.is() )
- throw uno::RuntimeException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( THROW_WHERE );
// the stream can never be inserted here, because inserted stream element holds the stream till commit or destruction
pElement->m_pStream = new OWriteStream_Impl( this, xPackageSubStream, m_xPackage, m_xContext, false, m_nStorageType, false, GetRelInfoStreamForName( pElement->m_aOriginalName ) );
@@ -1621,7 +1620,7 @@ void OStorage_Impl::RemoveElement( SotElement_Impl* pElement )
if ( (pElement->m_pStorage && ( pElement->m_pStorage->m_pAntiImpl || !pElement->m_pStorage->m_aReadOnlyWrapList.empty() ))
|| (pElement->m_pStream && ( pElement->m_pStream->m_pAntiImpl || !pElement->m_pStream->m_aInputStreamsList.empty() )) )
- throw io::IOException( THROW_WHERE, uno::Reference< uno::XInterface >() ); // TODO: Access denied
+ throw io::IOException( THROW_WHERE ); // TODO: Access denied
if ( pElement->m_bIsInserted )
{
@@ -1667,10 +1666,10 @@ void OStorage_Impl::CloneStreamElement( const OUString& aStreamName,
if ( !pElement )
{
// element does not exist, throw exception
- throw io::IOException( THROW_WHERE, uno::Reference< uno::XInterface >() ); // TODO: access_denied
+ throw io::IOException( THROW_WHERE ); // TODO: access_denied
}
else if ( pElement->m_bIsStorage )
- throw io::IOException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw io::IOException( THROW_WHERE );
if ( !pElement->m_pStream )
OpenSubStream( pElement );
@@ -1692,7 +1691,7 @@ void OStorage_Impl::CloneStreamElement( const OUString& aStreamName,
pElement->m_pStream->GetCopyOfLastCommit( xTargetStream );
}
else
- throw io::IOException( THROW_WHERE, uno::Reference< uno::XInterface >() ); // TODO: general_error
+ throw io::IOException( THROW_WHERE ); // TODO: general_error
}
void OStorage_Impl::RemoveStreamRelInfo( const OUString& aOriginalName )
@@ -1729,7 +1728,7 @@ void OStorage_Impl::CreateRelStorage()
OpenSubStorage( m_pRelStorElement, embed::ElementModes::WRITE );
if ( !m_pRelStorElement->m_pStorage )
- throw uno::RuntimeException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( THROW_WHERE );
OStorage* pResultStorage = new OStorage( m_pRelStorElement->m_pStorage, false );
m_xRelStorage = uno::Reference< embed::XStorage >( (embed::XStorage*) pResultStorage );
@@ -1742,7 +1741,7 @@ void OStorage_Impl::CommitStreamRelInfo( SotElement_Impl* pStreamElement )
// the stream element must be provided
if ( !pStreamElement )
- throw uno::RuntimeException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( THROW_WHERE );
if ( m_nStorageType == embed::StorageFormats::OFOPXML && pStreamElement->m_pStream )
{
@@ -1785,12 +1784,12 @@ void OStorage_Impl::CommitRelInfo( const uno::Reference< container::XNameContain
OUString aRelsStorName("_rels");
if ( !xNewPackageFolder.is() )
- throw uno::RuntimeException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( THROW_WHERE );
if ( m_nStorageType == embed::StorageFormats::OFOPXML )
{
if ( m_nRelInfoStatus == RELINFO_BROKEN || m_nRelInfoStatus == RELINFO_CHANGED_BROKEN )
- throw io::IOException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw io::IOException( THROW_WHERE );
if ( m_nRelInfoStatus == RELINFO_CHANGED
|| m_nRelInfoStatus == RELINFO_CHANGED_STREAM_READ
@@ -1808,7 +1807,7 @@ void OStorage_Impl::CommitRelInfo( const uno::Reference< container::XNameContain
uno::Reference< io::XOutputStream > xOutStream = xRelsStream->getOutputStream();
if ( !xOutStream.is() )
- throw uno::RuntimeException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( THROW_WHERE );
::comphelper::OFOPXMLHelper::WriteRelationsInfoSequence( xOutStream, m_aRelInfo, m_xContext );
@@ -1834,7 +1833,7 @@ void OStorage_Impl::CommitRelInfo( const uno::Reference< container::XNameContain
uno::Reference< io::XOutputStream > xOutputStream = xRelsStream->getOutputStream();
if ( !xOutputStream.is() )
- throw uno::RuntimeException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( THROW_WHERE );
uno::Reference< io::XSeekable > xSeek( m_xNewRelInfoStream, uno::UNO_QUERY_THROW );
xSeek->seek( 0 );
@@ -1963,7 +1962,7 @@ void SAL_CALL OStorage::InternalDispose( bool bNotifyImpl )
if ( !m_pImpl )
{
SAL_INFO("package.xstor", THROW_WHERE "Disposed!");
- throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw lang::DisposedException( THROW_WHERE );
}
// the source object is also a kind of locker for the current object
@@ -2061,7 +2060,7 @@ void OStorage::BroadcastModifiedIfNecessary()
if ( !m_pImpl )
{
SAL_INFO("package.xstor", THROW_WHERE "Disposed!");
- throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw lang::DisposedException( THROW_WHERE );
}
if ( !m_pImpl->m_bBroadcastModified )
@@ -2098,7 +2097,7 @@ void OStorage::BroadcastTransaction( sal_Int8 nMessage )
if ( !m_pImpl )
{
SAL_INFO("package.xstor", THROW_WHERE "Disposed!");
- throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw lang::DisposedException( THROW_WHERE );
}
SAL_WARN_IF( m_pData->m_bReadOnlyWrap, "package.xstor", "The storage can not be modified at all!" );
@@ -2150,8 +2149,7 @@ SotElement_Impl* OStorage::OpenStreamElement_Impl( const OUString& aStreamName,
|| ( nOpenMode & embed::ElementModes::NOCREATE ) == embed::ElementModes::NOCREATE )
{
throw io::IOException("Element does not exist and cannot be "
- "created: \"" + aStreamName + "\"",
- uno::Reference< uno::XInterface >()); // TODO: access_denied
+ "created: \"" + aStreamName + "\""); // TODO: access_denied
}
// create a new StreamElement and insert it into the list
@@ -2159,7 +2157,7 @@ SotElement_Impl* OStorage::OpenStreamElement_Impl( const OUString& aStreamName,
}
else if ( pElement->m_bIsStorage )
{
- throw io::IOException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw io::IOException( THROW_WHERE );
}
SAL_WARN_IF( !pElement, "package.xstor", "In case element can not be created an exception must be thrown!" );
@@ -2168,7 +2166,7 @@ SotElement_Impl* OStorage::OpenStreamElement_Impl( const OUString& aStreamName,
m_pImpl->OpenSubStream( pElement );
if ( !pElement->m_pStream )
- throw io::IOException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw io::IOException( THROW_WHERE );
return pElement;
}
@@ -2176,7 +2174,7 @@ SotElement_Impl* OStorage::OpenStreamElement_Impl( const OUString& aStreamName,
void OStorage::MakeLinkToSubComponent_Impl( const uno::Reference< lang::XComponent >& xComponent )
{
if ( !xComponent.is() )
- throw uno::RuntimeException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( THROW_WHERE );
if ( !m_pData->m_pSubElDispListener )
{
@@ -2352,7 +2350,7 @@ void SAL_CALL OStorage::copyToStorage( const uno::Reference< embed::XStorage >&
if ( !m_pImpl )
{
SAL_INFO("package.xstor", THROW_WHERE "Disposed!");
- throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw lang::DisposedException( THROW_WHERE );
}
if ( !xDest.is() || xDest == uno::Reference< uno::XInterface >( static_cast< OWeakObject*> ( this ), uno::UNO_QUERY ) )
@@ -2417,7 +2415,7 @@ uno::Reference< io::XStream > SAL_CALL OStorage::openStreamElement(
if ( !m_pImpl )
{
SAL_INFO("package.xstor", THROW_WHERE "Disposed!");
- throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw lang::DisposedException( THROW_WHERE );
}
if ( aStreamName.isEmpty() || !::comphelper::OStorageHelper::IsValidZipEntryFileName( aStreamName, false ) )
@@ -2427,7 +2425,7 @@ uno::Reference< io::XStream > SAL_CALL OStorage::openStreamElement(
throw lang::IllegalArgumentException( THROW_WHERE, uno::Reference< uno::XInterface >(), 1 ); // unacceptable element name
if ( ( nOpenMode & embed::ElementModes::WRITE ) && m_pData->m_bReadOnlyWrap )
- throw io::IOException( THROW_WHERE, uno::Reference< uno::XInterface >() ); // TODO: access denied
+ throw io::IOException( THROW_WHERE ); // TODO: access denied
uno::Reference< io::XStream > xResult;
try
@@ -2443,7 +2441,7 @@ uno::Reference< io::XStream > SAL_CALL OStorage::openStreamElement(
// before the storage disposes the stream it must deregister itself as listener
uno::Reference< lang::XComponent > xStreamComponent( xResult, uno::UNO_QUERY );
if ( !xStreamComponent.is() )
- throw uno::RuntimeException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( THROW_WHERE );
MakeLinkToSubComponent_Impl( xStreamComponent );
}
@@ -2528,7 +2526,7 @@ uno::Reference< embed::XStorage > SAL_CALL OStorage::openStorageElement(
if ( !m_pImpl )
{
SAL_INFO("package.xstor", THROW_WHERE "Disposed!");
- throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw lang::DisposedException( THROW_WHERE );
}
if ( aStorName.isEmpty() || !::comphelper::OStorageHelper::IsValidZipEntryFileName( aStorName, false ) )
@@ -2538,11 +2536,11 @@ uno::Reference< embed::XStorage > SAL_CALL OStorage::openStorageElement(
throw lang::IllegalArgumentException( THROW_WHERE, uno::Reference< uno::XInterface >(), 1 ); // unacceptable storage name
if ( ( nStorageMode & embed::ElementModes::WRITE ) && m_pData->m_bReadOnlyWrap )
- throw io::IOException( THROW_WHERE, uno::Reference< uno::XInterface >() ); // TODO: access denied
+ throw io::IOException( THROW_WHERE ); // TODO: access denied
if ( ( nStorageMode & embed::ElementModes::TRUNCATE )
&& !( nStorageMode & embed::ElementModes::WRITE ) )
- throw io::IOException( THROW_WHERE, uno::Reference< uno::XInterface >() ); // TODO: access denied
+ throw io::IOException( THROW_WHERE ); // TODO: access denied
// it's always possible to read written storage in this implementation
nStorageMode |= embed::ElementModes::READ;
@@ -2557,26 +2555,26 @@ uno::Reference< embed::XStorage > SAL_CALL OStorage::openStorageElement(
if ( !( m_pImpl->m_nStorageMode & embed::ElementModes::WRITE )
|| (( nStorageMode & embed::ElementModes::WRITE ) != embed::ElementModes::WRITE )
|| ( nStorageMode & embed::ElementModes::NOCREATE ) == embed::ElementModes::NOCREATE )
- throw io::IOException( THROW_WHERE, uno::Reference< uno::XInterface >() ); // TODO: access_denied
+ throw io::IOException( THROW_WHERE ); // TODO: access_denied
// create a new StorageElement and insert it into the list
pElement = m_pImpl->InsertStorage( aStorName, nStorageMode );
}
else if ( !pElement->m_bIsStorage )
{
- throw io::IOException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw io::IOException( THROW_WHERE );
}
else if ( pElement->m_pStorage )
{
// storage has already been opened; it may be opened another time, if it the mode allows to do so
if ( pElement->m_pStorage->m_pAntiImpl )
{
- throw io::IOException( THROW_WHERE, uno::Reference< uno::XInterface >() ); // TODO: access_denied
+ throw io::IOException( THROW_WHERE ); // TODO: access_denied
}
else if ( !pElement->m_pStorage->m_aReadOnlyWrapList.empty()
&& ( nStorageMode & embed::ElementModes::WRITE ) )
{
- throw io::IOException( THROW_WHERE, uno::Reference< uno::XInterface >() ); // TODO: access_denied
+ throw io::IOException( THROW_WHERE ); // TODO: access_denied
}
else
{
@@ -2603,7 +2601,7 @@ uno::Reference< embed::XStorage > SAL_CALL OStorage::openStorageElement(
m_pImpl->OpenSubStorage( pElement, nStorageMode );
if ( !pElement->m_pStorage )
- throw io::IOException( THROW_WHERE, uno::Reference< uno::XInterface >() ); // TODO: general_error
+ throw io::IOException( THROW_WHERE ); // TODO: general_error
bool bReadOnlyWrap = ( ( nStorageMode & embed::ElementModes::WRITE ) != embed::ElementModes::WRITE );
OStorage* pResultStorage = new OStorage( pElement->m_pStorage, bReadOnlyWrap );
@@ -2617,7 +2615,7 @@ uno::Reference< embed::XStorage > SAL_CALL OStorage::openStorageElement(
// before the storage disposes the stream it must deregister itself as listener
uno::Reference< lang::XComponent > xStorageComponent( xResult, uno::UNO_QUERY );
if ( !xStorageComponent.is() )
- throw uno::RuntimeException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( THROW_WHERE );
MakeLinkToSubComponent_Impl( xStorageComponent );
}
@@ -2679,7 +2677,7 @@ uno::Reference< io::XStream > SAL_CALL OStorage::cloneStreamElement( const OUStr
if ( !m_pImpl )
{
SAL_INFO("package.xstor", THROW_WHERE "Disposed!");
- throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw lang::DisposedException( THROW_WHERE );
}
if ( aStreamName.isEmpty() || !::comphelper::OStorageHelper::IsValidZipEntryFileName( aStreamName, false ) )
@@ -2693,7 +2691,7 @@ uno::Reference< io::XStream > SAL_CALL OStorage::cloneStreamElement( const OUStr
uno::Reference< io::XStream > xResult;
m_pImpl->CloneStreamElement( aStreamName, false, ::comphelper::SequenceAsHashMap(), xResult );
if ( !xResult.is() )
- throw uno::RuntimeException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( THROW_WHERE );
return xResult;
}
catch( const embed::InvalidStorageException& rInvalidStorageException )
@@ -2771,7 +2769,7 @@ void SAL_CALL OStorage::copyLastCommitTo(
if ( !m_pImpl )
{
SAL_INFO("package.xstor", THROW_WHERE "Disposed!");
- throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw lang::DisposedException( THROW_WHERE );
}
try
@@ -2835,7 +2833,7 @@ void SAL_CALL OStorage::copyStorageElementLastCommitTo(
if ( !m_pImpl )
{
SAL_INFO("package.xstor", THROW_WHERE "Disposed!");
- throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw lang::DisposedException( THROW_WHERE );
}
if ( aStorName.isEmpty() || !::comphelper::OStorageHelper::IsValidZipEntryFileName( aStorName, false ) )
@@ -2853,11 +2851,11 @@ void SAL_CALL OStorage::copyStorageElementLastCommitTo(
if ( !pElement )
{
// element does not exist, throw exception
- throw io::IOException( THROW_WHERE, uno::Reference< uno::XInterface >() ); // TODO: access_denied
+ throw io::IOException( THROW_WHERE ); // TODO: access_denied
}
else if ( !pElement->m_bIsStorage )
{
- throw io::IOException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw io::IOException( THROW_WHERE );
}
if ( !pElement->m_pStorage )
@@ -2872,7 +2870,7 @@ void SAL_CALL OStorage::copyStorageElementLastCommitTo(
pElement->m_pStorage->CopyLastCommitTo( xTargetStorage );
}
else
- throw io::IOException( THROW_WHERE, uno::Reference< uno::XInterface >() ); // TODO: general_error
+ throw io::IOException( THROW_WHERE ); // TODO: general_error
}
catch( const embed::InvalidStorageException& rInvalidStorageException )
{
@@ -2927,7 +2925,7 @@ sal_Bool SAL_CALL OStorage::isStreamElement( const OUString& aElementName )
if ( !m_pImpl )
{
SAL_INFO("package.xstor", THROW_WHERE "Disposed!");
- throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw lang::DisposedException( THROW_WHERE );
}
if ( aElementName.isEmpty() || !::comphelper::OStorageHelper::IsValidZipEntryFileName( aElementName, false ) )
@@ -2978,7 +2976,7 @@ sal_Bool SAL_CALL OStorage::isStreamElement( const OUString& aElementName )
}
if ( !pElement )
- throw container::NoSuchElementException( THROW_WHERE, uno::Reference< uno::XInterface >() ); //???
+ throw container::NoSuchElementException( THROW_WHERE ); //???
return !pElement->m_bIsStorage;
}
@@ -2994,7 +2992,7 @@ sal_Bool SAL_CALL OStorage::isStorageElement( const OUString& aElementName )
if ( !m_pImpl )
{
SAL_INFO("package.xstor", THROW_WHERE "Disposed!");
- throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw lang::DisposedException( THROW_WHERE );
}
if ( aElementName.isEmpty() || !::comphelper::OStorageHelper::IsValidZipEntryFileName( aElementName, false ) )
@@ -3045,7 +3043,7 @@ sal_Bool SAL_CALL OStorage::isStorageElement( const OUString& aElementName )
}
if ( !pElement )
- throw container::NoSuchElementException( THROW_WHERE, uno::Reference< uno::XInterface >() ); //???
+ throw container::NoSuchElementException( THROW_WHERE ); //???
return pElement->m_bIsStorage;
}
@@ -3063,7 +3061,7 @@ void SAL_CALL OStorage::removeElement( const OUString& aElementName )
if ( !m_pImpl )
{
SAL_INFO("package.xstor", THROW_WHERE "Disposed!");
- throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw lang::DisposedException( THROW_WHERE );
}
if ( aElementName.isEmpty() || !::comphelper::OStorageHelper::IsValidZipEntryFileName( aElementName, false ) )
@@ -3073,14 +3071,14 @@ void SAL_CALL OStorage::removeElement( const OUString& aElementName )
throw lang::IllegalArgumentException( THROW_WHERE, uno::Reference< uno::XInterface >(), 1 ); // TODO: unacceptable name
if ( !( m_pImpl->m_nStorageMode & embed::ElementModes::WRITE ) )
- throw io::IOException( THROW_WHERE, uno::Reference< uno::XInterface >() ); // TODO: access denied
+ throw io::IOException( THROW_WHERE ); // TODO: access denied
try
{
SotElement_Impl* pElement = m_pImpl->FindElement( aElementName );
if ( !pElement )
- throw container::NoSuchElementException( THROW_WHERE, uno::Reference< uno::XInterface >() ); //???
+ throw container::NoSuchElementException( THROW_WHERE ); //???
m_pImpl->RemoveElement( pElement );
@@ -3153,7 +3151,7 @@ void SAL_CALL OStorage::renameElement( const OUString& aElementName, const OUStr
if ( !m_pImpl )
{
SAL_INFO("package.xstor", THROW_WHERE "Disposed!");
- throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw lang::DisposedException( THROW_WHERE );
}
if ( aElementName.isEmpty() || !::comphelper::OStorageHelper::IsValidZipEntryFileName( aElementName, false )
@@ -3164,17 +3162,17 @@ void SAL_CALL OStorage::renameElement( const OUString& aElementName, const OUStr
throw lang::IllegalArgumentException( THROW_WHERE, uno::Reference< uno::XInterface >(), 0 ); // TODO: unacceptable element name
if ( !( m_pImpl->m_nStorageMode & embed::ElementModes::WRITE ) )
- throw io::IOException( THROW_WHERE, uno::Reference< uno::XInterface >() ); // TODO: access denied
+ throw io::IOException( THROW_WHERE ); // TODO: access denied
try
{
SotElement_Impl* pRefElement = m_pImpl->FindElement( aNewName );
if ( pRefElement )
- throw container::ElementExistException( THROW_WHERE, uno::Reference< uno::XInterface >() ); //???
+ throw container::ElementExistException( THROW_WHERE ); //???
SotElement_Impl* pElement = m_pImpl->FindElement( aElementName );
if ( !pElement )
- throw container::NoSuchElementException( THROW_WHERE, uno::Reference< uno::XInterface >() ); //???
+ throw container::NoSuchElementException( THROW_WHERE ); //???
pElement->m_aName = aNewName;
@@ -3255,7 +3253,7 @@ void SAL_CALL OStorage::copyElementTo( const OUString& aElementName,
if ( !m_pImpl )
{
SAL_INFO("package.xstor", THROW_WHERE "Disposed!");
- throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw lang::DisposedException( THROW_WHERE );
}
if ( aElementName.isEmpty() || !::comphelper::OStorageHelper::IsValidZipEntryFileName( aElementName, false )
@@ -3273,14 +3271,14 @@ void SAL_CALL OStorage::copyElementTo( const OUString& aElementName,
{
SotElement_Impl* pElement = m_pImpl->FindElement( aElementName );
if ( !pElement )
- throw container::NoSuchElementException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw container::NoSuchElementException( THROW_WHERE );
uno::Reference< XNameAccess > xNameAccess( xDest, uno::UNO_QUERY );
if ( !xNameAccess.is() )
- throw uno::RuntimeException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( THROW_WHERE );
if ( xNameAccess->hasByName( aNewName ) )
- throw container::ElementExistException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw container::ElementExistException( THROW_WHERE );
m_pImpl->CopyStorageElement( pElement, xDest, aNewName, false );
}
@@ -3354,7 +3352,7 @@ void SAL_CALL OStorage::moveElementTo( const OUString& aElementName,
if ( !m_pImpl )
{
SAL_INFO("package.xstor", THROW_WHERE "Disposed!");
- throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw lang::DisposedException( THROW_WHERE );
}
if ( aElementName.isEmpty() || !::comphelper::OStorageHelper::IsValidZipEntryFileName( aElementName, false )
@@ -3368,20 +3366,20 @@ void SAL_CALL OStorage::moveElementTo( const OUString& aElementName,
throw lang::IllegalArgumentException( THROW_WHERE, uno::Reference< uno::XInterface >(), 0 ); // unacceptable element name
if ( !( m_pImpl->m_nStorageMode & embed::ElementModes::WRITE ) )
- throw io::IOException( THROW_WHERE, uno::Reference< uno::XInterface >() ); // TODO: access denied
+ throw io::IOException( THROW_WHERE ); // TODO: access denied
try
{
SotElement_Impl* pElement = m_pImpl->FindElement( aElementName );
if ( !pElement )
- throw container::NoSuchElementException( THROW_WHERE, uno::Reference< uno::XInterface >() ); //???
+ throw container::NoSuchElementException( THROW_WHERE ); //???
uno::Reference< XNameAccess > xNameAccess( xDest, uno::UNO_QUERY );
if ( !xNameAccess.is() )
- throw uno::RuntimeException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( THROW_WHERE );
if ( xNameAccess->hasByName( aNewName ) )
- throw container::ElementExistException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw container::ElementExistException( THROW_WHERE );
m_pImpl->CopyStorageElement( pElement, xDest, aNewName, false );
@@ -3464,14 +3462,14 @@ uno::Reference< io::XStream > SAL_CALL OStorage::openEncryptedStream(
if ( !m_pImpl )
{
SAL_INFO("package.xstor", THROW_WHERE "Disposed!");
- throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw lang::DisposedException( THROW_WHERE );
}
if ( m_pData->m_nStorageType != embed::StorageFormats::PACKAGE )
packages::NoEncryptionException();
if ( ( nOpenMode & embed::ElementModes::WRITE ) && m_pData->m_bReadOnlyWrap )
- throw io::IOException( THROW_WHERE, uno::Reference< uno::XInterface >() ); // TODO: access denied
+ throw io::IOException( THROW_WHERE ); // TODO: access denied
if ( !aEncryptionData.getLength() )
throw lang::IllegalArgumentException( THROW_WHERE, uno::Reference< uno::XInterface >(), 3 );
@@ -3490,7 +3488,7 @@ uno::Reference< io::XStream > SAL_CALL OStorage::openEncryptedStream(
// before the storage disposes the stream it must deregister itself as listener
uno::Reference< lang::XComponent > xStreamComponent( xResult, uno::UNO_QUERY );
if ( !xStreamComponent.is() )
- throw uno::RuntimeException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( THROW_WHERE );
MakeLinkToSubComponent_Impl( xStreamComponent );
}
@@ -3571,7 +3569,7 @@ uno::Reference< io::XStream > SAL_CALL OStorage::cloneEncryptedStream(
if ( !m_pImpl )
{
SAL_INFO("package.xstor", THROW_WHERE "Disposed!");
- throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw lang::DisposedException( THROW_WHERE );
}
if ( m_pData->m_nStorageType != embed::StorageFormats::PACKAGE )
@@ -3585,7 +3583,7 @@ uno::Reference< io::XStream > SAL_CALL OStorage::cloneEncryptedStream(
uno::Reference< io::XStream > xResult;
m_pImpl->CloneStreamElement( aStreamName, true, aEncryptionData, xResult );
if ( !xResult.is() )
- throw uno::RuntimeException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( THROW_WHERE );
return xResult;
}
catch( const embed::InvalidStorageException& rInvalidStorageException )
@@ -3657,11 +3655,11 @@ uno::Reference< io::XInputStream > SAL_CALL OStorage::getPlainRawStreamElement(
if ( !m_pImpl )
{
SAL_INFO("package.xstor", THROW_WHERE "Disposed!");
- throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw lang::DisposedException( THROW_WHERE );
}
if ( m_pData->m_nStorageType == embed::StorageFormats::OFOPXML )
- throw uno::RuntimeException( THROW_WHERE, uno::Reference< uno::XInterface >() ); // the interface is not supported and must not be accessible
+ throw uno::RuntimeException( THROW_WHERE ); // the interface is not supported and must not be accessible
if ( sStreamName.isEmpty() || !::comphelper::OStorageHelper::IsValidZipEntryFileName( sStreamName, false ) )
throw lang::IllegalArgumentException( THROW_WHERE "Unexpected entry name syntax.", uno::Reference< uno::XInterface >(), 1 );
@@ -3671,18 +3669,18 @@ uno::Reference< io::XInputStream > SAL_CALL OStorage::getPlainRawStreamElement(
{
SotElement_Impl* pElement = m_pImpl->FindElement( sStreamName );
if ( !pElement )
- throw container::NoSuchElementException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw container::NoSuchElementException( THROW_WHERE );
if ( !pElement->m_pStream )
{
m_pImpl->OpenSubStream( pElement );
if ( !pElement->m_pStream )
- throw io::IOException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw io::IOException( THROW_WHERE );
}
uno::Reference< io::XInputStream > xRawInStream = pElement->m_pStream->GetPlainRawInStream();
if ( !xRawInStream.is() )
- throw io::IOException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw io::IOException( THROW_WHERE );
uno::Reference < io::XTempFile > xTempFile = io::TempFile::create( m_pImpl->GetComponentContext() );
uno::Reference < io::XOutputStream > xTempOut = xTempFile->getOutputStream();
@@ -3690,7 +3688,7 @@ uno::Reference< io::XInputStream > SAL_CALL OStorage::getPlainRawStreamElement(
uno::Reference < io::XSeekable > xSeek( xTempOut, uno::UNO_QUERY );
if ( !xTempOut.is() || !xTempIn.is() || !xSeek.is() )
- throw io::IOException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw io::IOException( THROW_WHERE );
// Copy temporary file to a new one
::comphelper::OStorageHelper::CopyInputToOutput( xRawInStream, xTempOut );
@@ -3762,11 +3760,11 @@ uno::Reference< io::XInputStream > SAL_CALL OStorage::getRawEncrStreamElement(
if ( !m_pImpl )
{
SAL_INFO("package.xstor", THROW_WHERE "Disposed!");
- throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw lang::DisposedException( THROW_WHERE );
}
if ( m_pData->m_nStorageType != embed::StorageFormats::PACKAGE )
- throw packages::NoEncryptionException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw packages::NoEncryptionException( THROW_WHERE );
if ( sStreamName.isEmpty() || !::comphelper::OStorageHelper::IsValidZipEntryFileName( sStreamName, false ) )
throw lang::IllegalArgumentException( THROW_WHERE "Unexpected entry name syntax.", uno::Reference< uno::XInterface >(), 1 );
@@ -3776,21 +3774,21 @@ uno::Reference< io::XInputStream > SAL_CALL OStorage::getRawEncrStreamElement(
{
SotElement_Impl* pElement = m_pImpl->FindElement( sStreamName );
if ( !pElement )
- throw container::NoSuchElementException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw container::NoSuchElementException( THROW_WHERE );
if ( !pElement->m_pStream )
{
m_pImpl->OpenSubStream( pElement );
if ( !pElement->m_pStream )
- throw io::IOException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw io::IOException( THROW_WHERE );
}
if ( !pElement->m_pStream->IsEncrypted() )
- throw packages::NoEncryptionException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw packages::NoEncryptionException( THROW_WHERE );
uno::Reference< io::XInputStream > xRawInStream = pElement->m_pStream->GetRawInStream();
if ( !xRawInStream.is() )
- throw io::IOException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw io::IOException( THROW_WHERE );
uno::Reference < io::XTempFile > xTempFile = io::TempFile::create(m_pImpl->GetComponentContext());
uno::Reference < io::XOutputStream > xTempOut = xTempFile->getOutputStream();
@@ -3798,7 +3796,7 @@ uno::Reference< io::XInputStream > SAL_CALL OStorage::getRawEncrStreamElement(
uno::Reference < io::XSeekable > xSeek( xTempOut, uno::UNO_QUERY );
if ( !xTempOut.is() || !xTempIn.is() || !xSeek.is() )
- throw io::IOException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw io::IOException( THROW_WHERE );
// Copy temporary file to a new one
::comphelper::OStorageHelper::CopyInputToOutput( xRawInStream, xTempOut );
@@ -3877,11 +3875,11 @@ void SAL_CALL OStorage::insertRawEncrStreamElement( const OUString& aStreamName,
if ( !m_pImpl )
{
SAL_INFO("package.xstor", THROW_WHERE "Disposed!");
- throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw lang::DisposedException( THROW_WHERE );
}
if ( m_pData->m_nStorageType != embed::StorageFormats::PACKAGE )
- throw packages::NoEncryptionException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw packages::NoEncryptionException( THROW_WHERE );
if ( aStreamName.isEmpty() || !::comphelper::OStorageHelper::IsValidZipEntryFileName( aStreamName, false ) )
throw lang::IllegalArgumentException( THROW_WHERE "Unexpected entry name syntax.", uno::Reference< uno::XInterface >(), 1 );
@@ -3890,13 +3888,13 @@ void SAL_CALL OStorage::insertRawEncrStreamElement( const OUString& aStreamName,
throw lang::IllegalArgumentException( THROW_WHERE, uno::Reference< uno::XInterface >(), 2 );
if ( !( m_pImpl->m_nStorageMode & embed::ElementModes::WRITE ) )
- throw io::IOException( THROW_WHERE, uno::Reference< uno::XInterface >() ); // TODO: access denied
+ throw io::IOException( THROW_WHERE ); // TODO: access denied
try
{
SotElement_Impl* pElement = m_pImpl->FindElement( aStreamName );
if ( pElement )
- throw container::ElementExistException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw container::ElementExistException( THROW_WHERE );
m_pImpl->InsertRawStream( aStreamName, xInStream );
}
@@ -3970,11 +3968,11 @@ void SAL_CALL OStorage::commit()
if ( !m_pImpl )
{
SAL_INFO("package.xstor", THROW_WHERE "Disposed!");
- throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw lang::DisposedException( THROW_WHERE );
}
if ( m_pData->m_bReadOnlyWrap )
- throw io::IOException( THROW_WHERE, uno::Reference< uno::XInterface >() ); // TODO: access_denied
+ throw io::IOException( THROW_WHERE ); // TODO: access_denied
m_pImpl->Commit(); // the root storage initiates the storing to source
@@ -4032,7 +4030,7 @@ void SAL_CALL OStorage::revert()
if ( !m_pImpl )
{
SAL_INFO("package.xstor", THROW_WHERE "Disposed!");
- throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw lang::DisposedException( THROW_WHERE );
}
for ( SotElementList_Impl::iterator pElementIter = m_pImpl->m_aChildrenList.begin();
@@ -4042,7 +4040,7 @@ void SAL_CALL OStorage::revert()
&& ( (*pElementIter)->m_pStorage->m_pAntiImpl || !(*pElementIter)->m_pStorage->m_aReadOnlyWrapList.empty() ))
|| ((*pElementIter)->m_pStream
&& ( (*pElementIter)->m_pStream->m_pAntiImpl || !(*pElementIter)->m_pStream->m_aInputStreamsList.empty()) ) )
- throw io::IOException( THROW_WHERE, uno::Reference< uno::XInterface >() ); // TODO: access denied
+ throw io::IOException( THROW_WHERE ); // TODO: access denied
}
if ( m_pData->m_bReadOnlyWrap || !m_pImpl->m_bListCreated )
@@ -4097,7 +4095,7 @@ void SAL_CALL OStorage::addTransactionListener( const uno::Reference< embed::XTr
if ( !m_pImpl )
{
SAL_INFO("package.xstor", THROW_WHERE "Disposed!");
- throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw lang::DisposedException( THROW_WHERE );
}
m_pData->m_aListenersContainer.addInterface( ::getCppuType((const uno::Reference< embed::XTransactionListener >*)0),
@@ -4112,7 +4110,7 @@ void SAL_CALL OStorage::removeTransactionListener( const uno::Reference< embed::
if ( !m_pImpl )
{
SAL_INFO("package.xstor", THROW_WHERE "Disposed!");
- throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw lang::DisposedException( THROW_WHERE );
}
m_pData->m_aListenersContainer.removeInterface( ::getCppuType((const uno::Reference< embed::XTransactionListener >*)0),
@@ -4132,7 +4130,7 @@ sal_Bool SAL_CALL OStorage::isModified()
if ( !m_pImpl )
{
SAL_INFO("package.xstor", THROW_WHERE "Disposed!");
- throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw lang::DisposedException( THROW_WHERE );
}
return m_pImpl->m_bIsModified;
@@ -4147,11 +4145,11 @@ void SAL_CALL OStorage::setModified( sal_Bool bModified )
if ( !m_pImpl )
{
SAL_INFO("package.xstor", THROW_WHERE "Disposed!");
- throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw lang::DisposedException( THROW_WHERE );
}
if ( m_pData->m_bReadOnlyWrap )
- throw beans::PropertyVetoException( THROW_WHERE, uno::Reference< uno::XInterface >() ); // TODO: access denied
+ throw beans::PropertyVetoException( THROW_WHERE ); // TODO: access denied
if ( (m_pImpl->m_bIsModified ? 1 : 0) != bModified )
m_pImpl->m_bIsModified = bModified;
@@ -4173,7 +4171,7 @@ void SAL_CALL OStorage::addModifyListener(
if ( !m_pImpl )
{
SAL_INFO("package.xstor", THROW_WHERE "Disposed!");
- throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw lang::DisposedException( THROW_WHERE );
}
osl_atomic_increment( &m_pImpl->m_nModifiedListenerCount );
@@ -4190,7 +4188,7 @@ void SAL_CALL OStorage::removeModifyListener(
if ( !m_pImpl )
{
SAL_INFO("package.xstor", THROW_WHERE "Disposed!");
- throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw lang::DisposedException( THROW_WHERE );
}
osl_atomic_decrement( &m_pImpl->m_nModifiedListenerCount );
@@ -4210,7 +4208,7 @@ uno::Any SAL_CALL OStorage::getByName( const OUString& aName )
if ( !m_pImpl )
{
SAL_INFO("package.xstor", THROW_WHERE "Disposed!");
- throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw lang::DisposedException( THROW_WHERE );
}
if ( aName.isEmpty() || !::comphelper::OStorageHelper::IsValidZipEntryFileName( aName, false ) )
@@ -4224,7 +4222,7 @@ uno::Any SAL_CALL OStorage::getByName( const OUString& aName )
{
SotElement_Impl* pElement = m_pImpl->FindElement( aName );
if ( !pElement )
- throw container::NoSuchElementException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw container::NoSuchElementException( THROW_WHERE );
if ( pElement->m_bIsStorage )
aResult <<= openStorageElement( aName, embed::ElementModes::READ );
@@ -4272,7 +4270,7 @@ uno::Sequence< OUString > SAL_CALL OStorage::getElementNames()
if ( !m_pImpl )
{
SAL_INFO("package.xstor", THROW_WHERE "Disposed!");
- throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw lang::DisposedException( THROW_WHERE );
}
try
@@ -4306,7 +4304,7 @@ sal_Bool SAL_CALL OStorage::hasByName( const OUString& aName )
if ( !m_pImpl )
{
SAL_INFO("package.xstor", THROW_WHERE "Disposed!");
- throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw lang::DisposedException( THROW_WHERE );
}
if ( aName.isEmpty() )
@@ -4349,7 +4347,7 @@ uno::Type SAL_CALL OStorage::getElementType()
if ( !m_pImpl )
{
SAL_INFO("package.xstor", THROW_WHERE "Disposed!");
- throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw lang::DisposedException( THROW_WHERE );
}
// it is a multitype container
@@ -4364,7 +4362,7 @@ sal_Bool SAL_CALL OStorage::hasElements()
if ( !m_pImpl )
{
SAL_INFO("package.xstor", THROW_WHERE "Disposed!");
- throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw lang::DisposedException( THROW_WHERE );
}
try
@@ -4399,7 +4397,7 @@ void SAL_CALL OStorage::dispose()
if ( !m_pImpl )
{
SAL_INFO("package.xstor", THROW_WHERE "Disposed!");
- throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw lang::DisposedException( THROW_WHERE );
}
try
@@ -4434,7 +4432,7 @@ void SAL_CALL OStorage::addEventListener(
if ( !m_pImpl )
{
SAL_INFO("package.xstor", THROW_WHERE "Disposed!");
- throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw lang::DisposedException( THROW_WHERE );
}
m_pData->m_aListenersContainer.addInterface(
@@ -4450,7 +4448,7 @@ void SAL_CALL OStorage::removeEventListener(
if ( !m_pImpl )
{
SAL_INFO("package.xstor", THROW_WHERE "Disposed!");
- throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw lang::DisposedException( THROW_WHERE );
}
m_pData->m_aListenersContainer.removeInterface(
@@ -4475,11 +4473,11 @@ void SAL_CALL OStorage::removeEncryption()
if ( !m_pImpl )
{
SAL_INFO("package.xstor", THROW_WHERE "Disposed!");
- throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw lang::DisposedException( THROW_WHERE );
}
if ( m_pData->m_nStorageType != embed::StorageFormats::PACKAGE )
- throw uno::RuntimeException( THROW_WHERE, uno::Reference< uno::XInterface >() ); // the interface must be visible only for package storage
+ throw uno::RuntimeException( THROW_WHERE ); // the interface must be visible only for package storage
SAL_WARN_IF( !m_pData->m_bIsRoot, "package.xstor", "removeEncryption() method is not available for nonroot storages!" );
if ( m_pData->m_bIsRoot )
@@ -4531,7 +4529,7 @@ void SAL_CALL OStorage::removeEncryption()
m_pImpl->AddLog( THROW_WHERE "Rethrow" );
SAL_WARN( "package.xstor", "The call must not fail, it is pretty simple!" );
- throw io::IOException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw io::IOException( THROW_WHERE );
}
}
}
@@ -4547,14 +4545,14 @@ void SAL_CALL OStorage::setEncryptionData( const uno::Sequence< beans::NamedValu
if ( !m_pImpl )
{
SAL_INFO("package.xstor", THROW_WHERE "Disposed!");
- throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw lang::DisposedException( THROW_WHERE );
}
if ( m_pData->m_nStorageType != embed::StorageFormats::PACKAGE )
- throw uno::RuntimeException( THROW_WHERE, uno::Reference< uno::XInterface >() ); // the interface must be visible only for package storage
+ throw uno::RuntimeException( THROW_WHERE ); // the interface must be visible only for package storage
if ( !aEncryptionData.getLength() )
- throw uno::RuntimeException( THROW_WHERE "Unexpected empty encryption data!", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( THROW_WHERE "Unexpected empty encryption data!" );
SAL_WARN_IF( !m_pData->m_bIsRoot, "package.xstor", "setEncryptionData() method is not available for nonroot storages!" );
if ( m_pData->m_bIsRoot )
@@ -4594,7 +4592,7 @@ void SAL_CALL OStorage::setEncryptionData( const uno::Sequence< beans::NamedValu
m_pImpl->AddLog( rException.Message );
m_pImpl->AddLog( THROW_WHERE "Rethrow" );
- throw io::IOException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw io::IOException( THROW_WHERE );
}
}
}
@@ -4617,14 +4615,14 @@ void SAL_CALL OStorage::setEncryptionAlgorithms( const uno::Sequence< beans::Nam
if ( !m_pImpl )
{
SAL_INFO("package.xstor", THROW_WHERE "Disposed!");
- throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw lang::DisposedException( THROW_WHERE );
}
if ( m_pData->m_nStorageType != embed::StorageFormats::PACKAGE )
- throw uno::RuntimeException( THROW_WHERE, uno::Reference< uno::XInterface >() ); // the interface must be visible only for package storage
+ throw uno::RuntimeException( THROW_WHERE ); // the interface must be visible only for package storage
if ( !aAlgorithms.getLength() )
- throw uno::RuntimeException( THROW_WHERE "Unexpected empty encryption algorithms list!", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( THROW_WHERE "Unexpected empty encryption algorithms list!" );
SAL_WARN_IF( !m_pData->m_bIsRoot, "package.xstor", "setEncryptionAlgorithms() method is not available for nonroot storages!" );
if ( m_pData->m_bIsRoot )
@@ -4667,7 +4665,7 @@ void SAL_CALL OStorage::setEncryptionAlgorithms( const uno::Sequence< beans::Nam
m_pImpl->AddLog( aException.Message );
m_pImpl->AddLog( THROW_WHERE "Rethrow" );
- throw io::IOException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw io::IOException( THROW_WHERE );
}
}
}
@@ -4680,11 +4678,11 @@ uno::Sequence< beans::NamedValue > SAL_CALL OStorage::getEncryptionAlgorithms()
if ( !m_pImpl )
{
SAL_INFO("package.xstor", THROW_WHERE "Disposed!");
- throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw lang::DisposedException( THROW_WHERE );
}
if ( m_pData->m_nStorageType != embed::StorageFormats::PACKAGE )
- throw uno::RuntimeException( THROW_WHERE, uno::Reference< uno::XInterface >() ); // the interface must be visible only for package storage
+ throw uno::RuntimeException( THROW_WHERE ); // the interface must be visible only for package storage
uno::Sequence< beans::NamedValue > aResult;
SAL_WARN_IF( !m_pData->m_bIsRoot, "package.xstor", "getEncryptionAlgorithms() method is not available for nonroot storages!" );
@@ -4727,7 +4725,7 @@ uno::Sequence< beans::NamedValue > SAL_CALL OStorage::getEncryptionAlgorithms()
m_pImpl->AddLog( aException.Message );
m_pImpl->AddLog( THROW_WHERE "Rethrow" );
- throw io::IOException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw io::IOException( THROW_WHERE );
}
}
@@ -4744,7 +4742,7 @@ uno::Reference< beans::XPropertySetInfo > SAL_CALL OStorage::getPropertySetInfo(
if ( !m_pImpl )
{
SAL_INFO("package.xstor", THROW_WHERE "Disposed!");
- throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw lang::DisposedException( THROW_WHERE );
}
//TODO:
@@ -4763,7 +4761,7 @@ void SAL_CALL OStorage::setPropertyValue( const OUString& aPropertyName, const u
if ( !m_pImpl )
{
SAL_INFO("package.xstor", THROW_WHERE "Disposed!");
- throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw lang::DisposedException( THROW_WHERE );
}
//TODO: think about interaction handler
@@ -4772,10 +4770,10 @@ void SAL_CALL OStorage::setPropertyValue( const OUString& aPropertyName, const u
// The old document might have no version in the manifest.xml, so we have to allow to set the version
// even for readonly storages, so that the version from content.xml can be used.
if ( m_pData->m_bReadOnlyWrap && aPropertyName != "Version" )
- throw io::IOException( THROW_WHERE, uno::Reference< uno::XInterface >() ); // TODO: Access denied
+ throw io::IOException( THROW_WHERE ); // TODO: Access denied
if ( m_pData->m_nStorageType == embed::StorageFormats::ZIP )
- throw beans::UnknownPropertyException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw beans::UnknownPropertyException( THROW_WHERE );
else if ( m_pData->m_nStorageType == embed::StorageFormats::PACKAGE )
{
if ( aPropertyName == "MediaType" )
@@ -4805,9 +4803,9 @@ void SAL_CALL OStorage::setPropertyValue( const OUString& aPropertyName, const u
|| aPropertyName == "RepairPackage" ) )
|| aPropertyName == "IsRoot"
|| aPropertyName == MEDIATYPE_FALLBACK_USED_PROPERTY )
- throw beans::PropertyVetoException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw beans::PropertyVetoException( THROW_WHERE );
else
- throw beans::UnknownPropertyException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw beans::UnknownPropertyException( THROW_WHERE );
}
else if ( m_pData->m_nStorageType == embed::StorageFormats::OFOPXML )
{
@@ -4848,12 +4846,12 @@ void SAL_CALL OStorage::setPropertyValue( const OUString& aPropertyName, const u
}
else if ( ( m_pData->m_bIsRoot && ( aPropertyName == "URL" || aPropertyName == "RepairPackage") )
|| aPropertyName == "IsRoot" )
- throw beans::PropertyVetoException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw beans::PropertyVetoException( THROW_WHERE );
else
- throw beans::UnknownPropertyException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw beans::UnknownPropertyException( THROW_WHERE );
}
else
- throw beans::UnknownPropertyException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw beans::UnknownPropertyException( THROW_WHERE );
BroadcastModifiedIfNecessary();
}
@@ -4868,7 +4866,7 @@ uno::Any SAL_CALL OStorage::getPropertyValue( const OUString& aPropertyName )
if ( !m_pImpl )
{
SAL_INFO("package.xstor", THROW_WHERE "Disposed!");
- throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw lang::DisposedException( THROW_WHERE );
}
if ( m_pData->m_nStorageType == embed::StorageFormats::PACKAGE
@@ -4936,7 +4934,7 @@ uno::Any SAL_CALL OStorage::getPropertyValue( const OUString& aPropertyName )
m_pImpl->ReadContents();
uno::Reference< beans::XPropertySet > xPackPropSet( m_pImpl->m_xPackage, uno::UNO_QUERY );
if ( !xPackPropSet.is() )
- throw uno::RuntimeException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( THROW_WHERE );
return xPackPropSet->getPropertyValue( aPropertyName );
}
@@ -4960,7 +4958,7 @@ uno::Any SAL_CALL OStorage::getPropertyValue( const OUString& aPropertyName )
}
}
- throw beans::UnknownPropertyException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw beans::UnknownPropertyException( THROW_WHERE );
}
void SAL_CALL OStorage::addPropertyChangeListener(
@@ -4975,7 +4973,7 @@ void SAL_CALL OStorage::addPropertyChangeListener(
if ( !m_pImpl )
{
SAL_INFO("package.xstor", THROW_WHERE "Disposed!");
- throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw lang::DisposedException( THROW_WHERE );
}
//TODO:
@@ -4993,7 +4991,7 @@ void SAL_CALL OStorage::removePropertyChangeListener(
if ( !m_pImpl )
{
SAL_INFO("package.xstor", THROW_WHERE "Disposed!");
- throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw lang::DisposedException( THROW_WHERE );
}
//TODO:
@@ -5011,7 +5009,7 @@ void SAL_CALL OStorage::addVetoableChangeListener(
if ( !m_pImpl )
{
SAL_INFO("package.xstor", THROW_WHERE "Disposed!");
- throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw lang::DisposedException( THROW_WHERE );
}
//TODO:
@@ -5029,7 +5027,7 @@ void SAL_CALL OStorage::removeVetoableChangeListener(
if ( !m_pImpl )
{
SAL_INFO("package.xstor", THROW_WHERE "Disposed!");
- throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw lang::DisposedException( THROW_WHERE );
}
//TODO:
@@ -5048,11 +5046,11 @@ sal_Bool SAL_CALL OStorage::hasByID( const OUString& sID )
if ( !m_pImpl )
{
SAL_INFO("package.xstor", THROW_WHERE "Disposed!");
- throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw lang::DisposedException( THROW_WHERE );
}
if ( m_pData->m_nStorageType != embed::StorageFormats::OFOPXML )
- throw uno::RuntimeException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( THROW_WHERE );
try
{
@@ -5078,11 +5076,11 @@ OUString SAL_CALL OStorage::getTargetByID( const OUString& sID )
if ( !m_pImpl )
{
SAL_INFO("package.xstor", THROW_WHERE "Disposed!");
- throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw lang::DisposedException( THROW_WHERE );
}
if ( m_pData->m_nStorageType != embed::StorageFormats::OFOPXML )
- throw uno::RuntimeException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( THROW_WHERE );
uno::Sequence< beans::StringPair > aSeq = getRelationshipByID( sID );
for ( sal_Int32 nInd = 0; nInd < aSeq.getLength(); nInd++ )
@@ -5102,11 +5100,11 @@ OUString SAL_CALL OStorage::getTypeByID( const OUString& sID )
if ( !m_pImpl )
{
SAL_INFO("package.xstor", THROW_WHERE "Disposed!");
- throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw lang::DisposedException( THROW_WHERE );
}
if ( m_pData->m_nStorageType != embed::StorageFormats::OFOPXML )
- throw uno::RuntimeException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( THROW_WHERE );
uno::Sequence< beans::StringPair > aSeq = getRelationshipByID( sID );
for ( sal_Int32 nInd = 0; nInd < aSeq.getLength(); nInd++ )
@@ -5126,11 +5124,11 @@ uno::Sequence< beans::StringPair > SAL_CALL OStorage::getRelationshipByID( cons
if ( !m_pImpl )
{
SAL_INFO("package.xstor", THROW_WHERE "Disposed!");
- throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw lang::DisposedException( THROW_WHERE );
}
if ( m_pData->m_nStorageType != embed::StorageFormats::OFOPXML )
- throw uno::RuntimeException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( THROW_WHERE );
// TODO/LATER: in future the unification of the ID could be checked
uno::Sequence< uno::Sequence< beans::StringPair > > aSeq = getAllRelationships();
@@ -5143,7 +5141,7 @@ uno::Sequence< beans::StringPair > SAL_CALL OStorage::getRelationshipByID( cons
break;
}
- throw container::NoSuchElementException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw container::NoSuchElementException( THROW_WHERE );
}
uno::Sequence< uno::Sequence< beans::StringPair > > SAL_CALL OStorage::getRelationshipsByType( const OUString& sType )
@@ -5155,11 +5153,11 @@ uno::Sequence< uno::Sequence< beans::StringPair > > SAL_CALL OStorage::getRelati
if ( !m_pImpl )
{
SAL_INFO("package.xstor", THROW_WHERE "Disposed!");
- throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw lang::DisposedException( THROW_WHERE );
}
if ( m_pData->m_nStorageType != embed::StorageFormats::OFOPXML )
- throw uno::RuntimeException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( THROW_WHERE );
uno::Sequence< uno::Sequence< beans::StringPair > > aResult;
sal_Int32 nEntriesNum = 0;
@@ -5190,11 +5188,11 @@ uno::Sequence< uno::Sequence< beans::StringPair > > SAL_CALL OStorage::getAllRel
if ( !m_pImpl )
{
SAL_INFO("package.xstor", THROW_WHERE "Disposed!");
- throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw lang::DisposedException( THROW_WHERE );
}
if ( m_pData->m_nStorageType != embed::StorageFormats::OFOPXML )
- throw uno::RuntimeException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( THROW_WHERE );
return m_pImpl->GetAllRelationshipsIfAny();
}
@@ -5209,11 +5207,11 @@ void SAL_CALL OStorage::insertRelationshipByID( const OUString& sID, const uno:
if ( !m_pImpl )
{
SAL_INFO("package.xstor", THROW_WHERE "Disposed!");
- throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw lang::DisposedException( THROW_WHERE );
}
if ( m_pData->m_nStorageType != embed::StorageFormats::OFOPXML )
- throw uno::RuntimeException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( THROW_WHERE );
OUString aIDTag( "Id" );
@@ -5255,7 +5253,7 @@ void SAL_CALL OStorage::insertRelationshipByID( const OUString& sID, const uno:
aSeq[nIDInd].realloc( nIndTarget );
}
else
- throw container::ElementExistException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw container::ElementExistException( THROW_WHERE );
m_pImpl->m_aRelInfo = aSeq;
m_pImpl->m_xNewRelInfoStream = uno::Reference< io::XInputStream >();
@@ -5272,11 +5270,11 @@ void SAL_CALL OStorage::removeRelationshipByID( const OUString& sID )
if ( !m_pImpl )
{
SAL_INFO("package.xstor", THROW_WHERE "Disposed!");
- throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw lang::DisposedException( THROW_WHERE );
}
if ( m_pData->m_nStorageType != embed::StorageFormats::OFOPXML )
- throw uno::RuntimeException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( THROW_WHERE );
uno::Sequence< uno::Sequence< beans::StringPair > > aSeq = getAllRelationships();
for ( sal_Int32 nInd1 = 0; nInd1 < aSeq.getLength(); nInd1++ )
@@ -5300,7 +5298,7 @@ void SAL_CALL OStorage::removeRelationshipByID( const OUString& sID )
break;
}
- throw container::NoSuchElementException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw container::NoSuchElementException( THROW_WHERE );
}
void SAL_CALL OStorage::insertRelationships( const uno::Sequence< uno::Sequence< beans::StringPair > >& aEntries, sal_Bool bReplace )
@@ -5313,11 +5311,11 @@ void SAL_CALL OStorage::insertRelationships( const uno::Sequence< uno::Sequence
if ( !m_pImpl )
{
SAL_INFO("package.xstor", THROW_WHERE "Disposed!");
- throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw lang::DisposedException( THROW_WHERE );
}
if ( m_pData->m_nStorageType != embed::StorageFormats::OFOPXML )
- throw uno::RuntimeException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( THROW_WHERE );
OUString aIDTag( "Id" );
uno::Sequence< uno::Sequence< beans::StringPair > > aSeq = getAllRelationships();
@@ -5338,7 +5336,7 @@ void SAL_CALL OStorage::insertRelationships( const uno::Sequence< uno::Sequence
if ( aEntries[nIndSource1][nIndSource2].Second.equals( aSeq[nIndTarget1][nIndTarget2].Second ) )
{
if ( !bReplace )
- throw container::ElementExistException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw container::ElementExistException( THROW_WHERE );
nIndSourceSame = nIndSource1;
}
@@ -5371,10 +5369,10 @@ void SAL_CALL OStorage::insertRelationships( const uno::Sequence< uno::Sequence
else if ( nResInd2 < aResultSeq[nResultInd].getLength() )
aResultSeq[nResultInd][nResInd2++] = aEntries[nIndSource1][nIndSource2];
else
- throw io::IOException( THROW_WHERE, uno::Reference< uno::XInterface >() ); // TODO: illegal relation ( no ID )
+ throw io::IOException( THROW_WHERE ); // TODO: illegal relation ( no ID )
if ( !bHasID )
- throw io::IOException( THROW_WHERE, uno::Reference< uno::XInterface >() ); // TODO: illegal relations
+ throw io::IOException( THROW_WHERE ); // TODO: illegal relations
nResultInd++;
}
@@ -5394,11 +5392,11 @@ void SAL_CALL OStorage::clearRelationships()
if ( !m_pImpl )
{
SAL_INFO("package.xstor", THROW_WHERE "Disposed!");
- throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw lang::DisposedException( THROW_WHERE );
}
if ( m_pData->m_nStorageType != embed::StorageFormats::OFOPXML )
- throw uno::RuntimeException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( THROW_WHERE );
m_pImpl->m_aRelInfo.realloc( 0 );
m_pImpl->m_xNewRelInfoStream = uno::Reference< io::XInputStream >();
@@ -5419,7 +5417,7 @@ void SAL_CALL OStorage::insertRawNonEncrStreamElementDirect(
{
// not implemented currently because there is still no demand
// might need to be implemented if direct copying of compressed streams is used
- throw io::IOException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw io::IOException( THROW_WHERE );
}
void SAL_CALL OStorage::insertStreamElementDirect(
@@ -5438,7 +5436,7 @@ void SAL_CALL OStorage::insertStreamElementDirect(
if ( !m_pImpl )
{
SAL_INFO("package.xstor", THROW_WHERE "Disposed!");
- throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw lang::DisposedException( THROW_WHERE );
}
if ( aStreamName.isEmpty() || !::comphelper::OStorageHelper::IsValidZipEntryFileName( aStreamName, false ) )
@@ -5448,14 +5446,14 @@ void SAL_CALL OStorage::insertStreamElementDirect(
throw lang::IllegalArgumentException( THROW_WHERE, uno::Reference< uno::XInterface >(), 1 ); // unacceptable storage name
if ( m_pData->m_bReadOnlyWrap )
- throw io::IOException( THROW_WHERE, uno::Reference< uno::XInterface >() ); // TODO: access denied
+ throw io::IOException( THROW_WHERE ); // TODO: access denied
try
{
SotElement_Impl* pElement = m_pImpl->FindElement( aStreamName );
if ( pElement )
- throw container::ElementExistException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw container::ElementExistException( THROW_WHERE );
pElement = OpenStreamElement_Impl( aStreamName, embed::ElementModes::READWRITE, false );
OSL_ENSURE( pElement && pElement->m_pStream, "In case element can not be created an exception must be thrown!" );
@@ -5527,7 +5525,7 @@ void SAL_CALL OStorage::copyElementDirectlyTo(
if ( !m_pImpl )
{
SAL_INFO("package.xstor", THROW_WHERE "Disposed!");
- throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw lang::DisposedException( THROW_WHERE );
}
if ( aElementName.isEmpty() || !::comphelper::OStorageHelper::IsValidZipEntryFileName( aElementName, false )
@@ -5544,14 +5542,14 @@ void SAL_CALL OStorage::copyElementDirectlyTo(
{
SotElement_Impl* pElement = m_pImpl->FindElement( aElementName );
if ( !pElement )
- throw container::NoSuchElementException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw container::NoSuchElementException( THROW_WHERE );
uno::Reference< XNameAccess > xNameAccess( xDest, uno::UNO_QUERY );
if ( !xNameAccess.is() )
- throw uno::RuntimeException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( THROW_WHERE );
if ( xNameAccess->hasByName( aNewName ) )
- throw container::ElementExistException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw container::ElementExistException( THROW_WHERE );
// let the element be copied directly
uno::Reference< embed::XStorage > xStorDest( xDest, uno::UNO_QUERY_THROW );
@@ -5623,14 +5621,14 @@ void SAL_CALL OStorage::writeAndAttachToStream( const uno::Reference< io::XStrea
if ( !m_pImpl )
{
SAL_INFO("package.xstor", THROW_WHERE "Disposed!");
- throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw lang::DisposedException( THROW_WHERE );
}
if ( !m_pData->m_bIsRoot )
throw lang::IllegalArgumentException( THROW_WHERE, uno::Reference< uno::XInterface >(), 0 );
if ( !m_pImpl->m_pSwitchStream )
- throw uno::RuntimeException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( THROW_WHERE );
try
{
@@ -5692,14 +5690,14 @@ void SAL_CALL OStorage::attachToURL( const OUString& sURL,
if ( !m_pImpl )
{
SAL_INFO("package.xstor", THROW_WHERE "Disposed!");
- throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw lang::DisposedException( THROW_WHERE );
}
if ( !m_pData->m_bIsRoot )
throw lang::IllegalArgumentException( THROW_WHERE, uno::Reference< uno::XInterface >(), 0 );
if ( !m_pImpl->m_pSwitchStream )
- throw uno::RuntimeException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( THROW_WHERE );
uno::Reference < ucb::XSimpleFileAccess3 > xAccess(
ucb::SimpleFileAccess::create( m_pImpl->m_xContext ) );
@@ -5774,7 +5772,7 @@ uno::Any SAL_CALL OStorage::getElementPropertyValue( const OUString& aElementNam
if ( !m_pImpl )
{
SAL_INFO("package.xstor", THROW_WHERE "Disposed!");
- throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw lang::DisposedException( THROW_WHERE );
}
if ( aElementName.isEmpty() || !::comphelper::OStorageHelper::IsValidZipEntryFileName( aElementName, false ) )
@@ -5787,17 +5785,17 @@ uno::Any SAL_CALL OStorage::getElementPropertyValue( const OUString& aElementNam
{
SotElement_Impl *pElement = m_pImpl->FindElement( aElementName );
if ( !pElement )
- throw container::NoSuchElementException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw container::NoSuchElementException( THROW_WHERE );
// TODO/LATER: Currently it is only implemented for MediaType property of substorages, might be changed in future
if ( !pElement->m_bIsStorage || m_pData->m_nStorageType != embed::StorageFormats::PACKAGE || aPropertyName != "MediaType" )
- throw beans::PropertyVetoException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw beans::PropertyVetoException( THROW_WHERE );
if ( !pElement->m_pStorage )
m_pImpl->OpenSubStorage( pElement, embed::ElementModes::READ );
if ( !pElement->m_pStorage )
- throw io::IOException( THROW_WHERE, uno::Reference< uno::XInterface >() ); // TODO: general_error
+ throw io::IOException( THROW_WHERE ); // TODO: general_error
pElement->m_pStorage->ReadContents();
return uno::makeAny( pElement->m_pStorage->m_aMediaType );
@@ -5875,7 +5873,7 @@ void SAL_CALL OStorage::copyStreamElementData( const OUString& aStreamName, cons
if ( !m_pImpl )
{
SAL_INFO("package.xstor", THROW_WHERE "Disposed!");
- throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw lang::DisposedException( THROW_WHERE );
}
if ( aStreamName.isEmpty() || !::comphelper::OStorageHelper::IsValidZipEntryFileName( aStreamName, false ) )
@@ -5894,7 +5892,7 @@ void SAL_CALL OStorage::copyStreamElementData( const OUString& aStreamName, cons
SAL_WARN_IF( xNonconstRef != xTargetStream, "package.xstor", "The provided stream reference seems not be filled in correctly!" );
if ( xNonconstRef != xTargetStream )
- throw uno::RuntimeException( THROW_WHERE, uno::Reference< uno::XInterface >() ); // if the stream reference is set it must not be changed!
+ throw uno::RuntimeException( THROW_WHERE ); // if the stream reference is set it must not be changed!
}
catch( const embed::InvalidStorageException& rInvalidStorageException )
{
@@ -5959,7 +5957,7 @@ uno::Reference< embed::XExtendedStorageStream > SAL_CALL OStorage::openStreamEle
if ( !m_pImpl )
{
SAL_INFO("package.xstor", THROW_WHERE "Disposed!");
- throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw lang::DisposedException( THROW_WHERE );
}
if ( aStreamPath.isEmpty() || !::comphelper::OStorageHelper::IsValidZipEntryFileName( aStreamPath, true ) )
@@ -5967,7 +5965,7 @@ uno::Reference< embed::XExtendedStorageStream > SAL_CALL OStorage::openStreamEle
if ( !( m_pImpl->m_nStorageMode & embed::ElementModes::WRITE )
&& ( nOpenMode & embed::ElementModes::WRITE ) )
- throw io::IOException( THROW_WHERE, uno::Reference< uno::XInterface >() ); // Access denied
+ throw io::IOException( THROW_WHERE ); // Access denied
OStringList_Impl aListPath = OHierarchyHolder_Impl::GetListPathFromString( aStreamPath );
OSL_ENSURE( aListPath.size(), "The result list must not be empty!" );
@@ -5999,7 +5997,7 @@ uno::Reference< embed::XExtendedStorageStream > SAL_CALL OStorage::openStreamEle
}
if ( !xResult.is() )
- throw uno::RuntimeException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( THROW_WHERE );
return xResult;
}
@@ -6029,14 +6027,14 @@ void SAL_CALL OStorage::removeStreamElementByHierarchicalName( const OUString& a
if ( !m_pImpl )
{
SAL_INFO("package.xstor", THROW_WHERE "Disposed!");
- throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw lang::DisposedException( THROW_WHERE );
}
if ( aStreamPath.isEmpty() || !::comphelper::OStorageHelper::IsValidZipEntryFileName( aStreamPath, true ) )
throw lang::IllegalArgumentException( THROW_WHERE "Unexpected entry name syntax.", uno::Reference< uno::XInterface >(), 1 );
if ( !( m_pImpl->m_nStorageMode & embed::ElementModes::WRITE ) )
- throw io::IOException( THROW_WHERE, uno::Reference< uno::XInterface >() ); // Access denied
+ throw io::IOException( THROW_WHERE ); // Access denied
OStringList_Impl aListPath = OHierarchyHolder_Impl::GetListPathFromString( aStreamPath );
OSL_ENSURE( aListPath.size(), "The result list must not be empty!" );
@@ -6063,11 +6061,11 @@ uno::Reference< embed::XExtendedStorageStream > SAL_CALL OStorage::openEncrypted
if ( !m_pImpl )
{
SAL_INFO("package.xstor", THROW_WHERE "Disposed!");
- throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw lang::DisposedException( THROW_WHERE );
}
if ( m_pData->m_nStorageType != embed::StorageFormats::PACKAGE )
- throw packages::NoEncryptionException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw packages::NoEncryptionException( THROW_WHERE );
if ( aStreamPath.isEmpty() || !::comphelper::OStorageHelper::IsValidZipEntryFileName( aStreamPath, true ) )
throw lang::IllegalArgumentException( THROW_WHERE "Unexpected entry name syntax.", uno::Reference< uno::XInterface >(), 1 );
@@ -6077,7 +6075,7 @@ uno::Reference< embed::XExtendedStorageStream > SAL_CALL OStorage::openEncrypted
if ( !( m_pImpl->m_nStorageMode & embed::ElementModes::WRITE )
&& ( nOpenMode & embed::ElementModes::WRITE ) )
- throw io::IOException( THROW_WHERE, uno::Reference< uno::XInterface >() ); // Access denied
+ throw io::IOException( THROW_WHERE ); // Access denied
OStringList_Impl aListPath = OHierarchyHolder_Impl::GetListPathFromString( aStreamPath );
OSL_ENSURE( aListPath.size(), "The result list must not be empty!" );
@@ -6110,7 +6108,7 @@ uno::Reference< embed::XExtendedStorageStream > SAL_CALL OStorage::openEncrypted
}
if ( !xResult.is() )
- throw uno::RuntimeException( THROW_WHERE, uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( THROW_WHERE );
return xResult;
}