diff options
Diffstat (limited to 'package/source/xstor/xstorage.cxx')
-rw-r--r-- | package/source/xstor/xstorage.cxx | 1186 |
1 files changed, 596 insertions, 590 deletions
diff --git a/package/source/xstor/xstorage.cxx b/package/source/xstor/xstorage.cxx index 16483d6f3944..9a6d45f05708 100644 --- a/package/source/xstor/xstorage.cxx +++ b/package/source/xstor/xstorage.cxx @@ -55,6 +55,12 @@ using namespace ::com::sun::star; +#if OSL_DEBUG_LEVEL > 0 +#define THROW_WHERE SAL_WHERE +#else +#define THROW_WHERE "" +#endif + typedef ::std::list< uno::WeakReference< lang::XComponent > > WeakComponentList; struct StorInternalData_Impl @@ -98,15 +104,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( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException( THROW_WHERE, uno::Reference< uno::XInterface >() ); uno::Reference< io::XOutputStream > xDestOutStream = xDest->getOutputStream(); if ( !xDestOutStream.is() ) - throw io::IOException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); + throw io::IOException( THROW_WHERE, uno::Reference< uno::XInterface >() ); uno::Reference< io::XInputStream > xSourceInStream = xSource->getInputStream(); if ( !xSourceInStream.is() ) - throw io::IOException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); + throw io::IOException( THROW_WHERE, uno::Reference< uno::XInterface >() ); // TODO: headers of encripted streams should be copied also ::comphelper::OStorageHelper::CopyInputToOutput( xSourceInStream, xDestOutStream ); @@ -143,7 +149,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( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); + throw io::IOException( THROW_WHERE, uno::Reference< uno::XInterface >() ); ::comphelper::OStorageHelper::CopyInputToOutput( xInStream, xTempOut ); xTempOut->closeOutput(); @@ -305,7 +311,7 @@ OStorage_Impl::~OStorage_Impl() catch ( const uno::Exception& rException ) { AddLog( rException.Message ); - AddLog( OSL_LOG_PREFIX "Quiet exception" ); + AddLog( THROW_WHERE "Quiet exception" ); } m_pAntiImpl = NULL; } @@ -321,7 +327,7 @@ OStorage_Impl::~OStorage_Impl() } catch( const uno::Exception& rException ) { AddLog( rException.Message ); - AddLog( OSL_LOG_PREFIX "Quiet exception" ); + AddLog( THROW_WHERE "Quiet exception" ); } } @@ -381,7 +387,7 @@ OStorage_Impl::~OStorage_Impl() } catch( const uno::Exception& rException ) { - AddLog( OSL_LOG_PREFIX "Quiet exception" ); + AddLog( THROW_WHERE "Quiet exception" ); AddLog( rException.Message ); } } @@ -426,7 +432,7 @@ void OStorage_Impl::RemoveReadOnlyWrap( OStorage& aStorage ) pStorageIter->m_pPointer->InternalDispose( sal_False ); } catch( const uno::Exception& rException ) { - AddLog( OSL_LOG_PREFIX "Quiet exception" ); + AddLog( THROW_WHERE "Quiet exception" ); AddLog( rException.Message ); } @@ -519,7 +525,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( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); + throw embed::InvalidStorageException( THROW_WHERE, uno::Reference< uno::XInterface >() ); } uno::Reference< uno::XComponentContext > OStorage_Impl::GetComponentContext() @@ -612,11 +618,11 @@ void OStorage_Impl::ReadContents() uno::Reference< container::XEnumerationAccess > xEnumAccess( m_xPackageFolder, uno::UNO_QUERY ); if ( !xEnumAccess.is() ) - throw uno::RuntimeException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException( THROW_WHERE, uno::Reference< uno::XInterface >() ); uno::Reference< container::XEnumeration > xEnum = xEnumAccess->createEnumeration(); if ( !xEnum.is() ) - throw uno::RuntimeException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException( THROW_WHERE, uno::Reference< uno::XInterface >() ); m_bListCreated = sal_True; @@ -629,7 +635,7 @@ void OStorage_Impl::ReadContents() if ( !xNamed.is() ) { SAL_WARN( "package.xstor", "XNamed is not supported!" ); - throw uno::RuntimeException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException( THROW_WHERE, uno::Reference< uno::XInterface >() ); } OUString aName = xNamed->getName(); @@ -641,7 +647,7 @@ void OStorage_Impl::ReadContents() if ( m_nStorageType == embed::StorageFormats::OFOPXML && aName == "_rels" ) { if ( !pNewElement->m_bIsStorage ) - throw io::IOException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); // TODO: Unexpected format + throw io::IOException( THROW_WHERE, uno::Reference< uno::XInterface >() ); // TODO: Unexpected format m_pRelStorElement = pNewElement; CreateRelStorage(); @@ -660,7 +666,7 @@ void OStorage_Impl::ReadContents() catch( const container::NoSuchElementException& rNoSuchElementException ) { AddLog( rNoSuchElementException.Message ); - AddLog( OSL_LOG_PREFIX "NoSuchElement" ); + AddLog( THROW_WHERE "NoSuchElement" ); SAL_WARN( "package.xstor", "hasMoreElements() implementation has problems!" ); break; @@ -684,18 +690,18 @@ void OStorage_Impl::CopyToStorage( const uno::Reference< embed::XStorage >& xDes uno::Reference< beans::XPropertySet > xPropSet( xDest, uno::UNO_QUERY ); if ( !xPropSet.is() ) - throw lang::IllegalArgumentException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >(), 1 ); + throw lang::IllegalArgumentException( THROW_WHERE, uno::Reference< uno::XInterface >(), 1 ); sal_Int32 nDestMode = embed::ElementModes::READ; xPropSet->getPropertyValue( "OpenMode" ) >>= nDestMode; if ( !( nDestMode & embed::ElementModes::WRITE ) ) - throw io::IOException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); // TODO: access_denied + throw io::IOException( THROW_WHERE, uno::Reference< uno::XInterface >() ); // TODO: access_denied ReadContents(); if ( !m_xPackageFolder.is() ) - throw embed::InvalidStorageException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); + throw embed::InvalidStorageException( THROW_WHERE, uno::Reference< uno::XInterface >() ); for ( SotElementList_Impl::iterator pElementIter = m_aChildrenList.begin(); pElementIter != m_aChildrenList.end(); ++pElementIter ) @@ -737,7 +743,7 @@ void OStorage_Impl::CopyToStorage( const uno::Reference< embed::XStorage >& xDes catch( const packages::NoEncryptionException& rNoEncryptionException ) { AddLog( rNoEncryptionException.Message ); - AddLog( OSL_LOG_PREFIX "No Encryption" ); + AddLog( THROW_WHERE "No Encryption" ); } } } @@ -757,7 +763,7 @@ void OStorage_Impl::CopyToStorage( const uno::Reference< embed::XStorage >& xDes uno::Reference< embed::XRelationshipAccess > xRels( xDest, uno::UNO_QUERY ); if ( !xRels.is() ) - throw lang::IllegalArgumentException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >(), 1 ); + throw lang::IllegalArgumentException( THROW_WHERE, uno::Reference< uno::XInterface >(), 1 ); xRels->insertRelationships( GetAllRelationshipsIfAny(), sal_False ); } @@ -780,7 +786,7 @@ void OStorage_Impl::CopyStorageElement( SotElement_Impl* pElement, uno::Reference< container::XNameAccess > xDestAccess( xDest, uno::UNO_QUERY ); if ( !xDestAccess.is() ) - throw uno::RuntimeException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException( THROW_WHERE, uno::Reference< uno::XInterface >() ); if ( xDestAccess->hasByName( aName ) && !( pElement->m_bIsStorage && xDest->isStorageElement( aName ) ) ) @@ -798,7 +804,7 @@ void OStorage_Impl::CopyStorageElement( SotElement_Impl* pElement, { OpenSubStorage( pElement, embed::ElementModes::READ ); if ( !pElement->m_pStorage ) - throw io::IOException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); + throw io::IOException( THROW_WHERE, uno::Reference< uno::XInterface >() ); } pElement->m_pStorage->CopyToStorage( xSubDest, bDirect ); @@ -809,7 +815,7 @@ void OStorage_Impl::CopyStorageElement( SotElement_Impl* pElement, { OpenSubStream( pElement ); if ( !pElement->m_pStream ) - throw io::IOException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); + throw io::IOException( THROW_WHERE, uno::Reference< uno::XInterface >() ); } if ( !pElement->m_pStream->IsEncrypted() ) @@ -849,7 +855,7 @@ void OStorage_Impl::CopyStorageElement( SotElement_Impl* pElement, uno::Reference< embed::XRelationshipAccess > xRels( xDest, uno::UNO_QUERY ); if ( !xRels.is() ) - throw lang::IllegalArgumentException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >(), 0 ); + throw lang::IllegalArgumentException( THROW_WHERE, uno::Reference< uno::XInterface >(), 0 ); xRels->insertRelationships( GetAllRelationshipsIfAny(), sal_False ); } @@ -873,7 +879,7 @@ void OStorage_Impl::CopyStorageElement( SotElement_Impl* pElement, } if ( !xInputToInsert.is() ) - throw io::IOException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); + throw io::IOException( THROW_WHERE, uno::Reference< uno::XInterface >() ); xOptDest->insertStreamElementDirect( aName, xInputToInsert, aStrProps ); } @@ -890,7 +896,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( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); + throw io::IOException( THROW_WHERE, uno::Reference< uno::XInterface >() ); } else if ( pElement->m_pStream->HasCachedEncryptionData() && ( pElement->m_pStream->IsModified() || pElement->m_pStream->HasWriteOwner_Impl() ) ) @@ -905,7 +911,7 @@ void OStorage_Impl::CopyStorageElement( SotElement_Impl* pElement, catch( const packages::NoEncryptionException& rNoEncryptionException ) { AddLog( rNoEncryptionException.Message ); - AddLog( OSL_LOG_PREFIX "No Encryption" ); + AddLog( THROW_WHERE "No Encryption" ); } if ( bHasCommonEncryptionData && ::package::PackageEncryptionDatasEqual( pElement->m_pStream->GetCachedEncryptionData(), aCommonEncryptionData ) ) @@ -960,7 +966,7 @@ void OStorage_Impl::CopyStorageElement( SotElement_Impl* pElement, catch( const packages::WrongPasswordException& rWrongPasswordException ) { AddLog( rWrongPasswordException.Message ); - AddLog( OSL_LOG_PREFIX "Handled exception" ); + AddLog( THROW_WHERE "Handled exception" ); // If the common storage password does not allow to open the stream // it could be copyed in raw way, the problem is that the StartKey should be the same @@ -985,7 +991,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( OSL_LOG_PREFIX "Wrong relinfo stream!", + throw io::IOException( THROW_WHERE "Wrong relinfo stream!", uno::Reference< uno::XInterface >() ); } @@ -995,7 +1001,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( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException( THROW_WHERE, uno::Reference< uno::XInterface >() ); OStorage_Impl aTempRepresent( NULL, embed::ElementModes::READ, @@ -1016,7 +1022,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( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException( THROW_WHERE, uno::Reference< uno::XInterface >() ); xParentPackageFolder->insertByName( aName, uno::makeAny( xTunnel ) ); @@ -1038,7 +1044,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( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); + throw embed::InvalidStorageException( THROW_WHERE, uno::Reference< uno::XInterface >() ); OSL_ENSURE( m_nStorageMode & embed::ElementModes::WRITE, "Commit of readonly storage, should be detected before!\n" ); @@ -1169,7 +1175,7 @@ void OStorage_Impl::Commit() { OpenSubStream( *pElementIter ); if ( !(*pElementIter)->m_pStream ) - throw uno::RuntimeException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException( THROW_WHERE, uno::Reference< uno::XInterface >() ); } CommitStreamRelInfo( *pElementIter ); @@ -1194,7 +1200,7 @@ void OStorage_Impl::Commit() { OSL_ENSURE( (*pElementIter)->m_pStorage, "An inserted storage is incomplete!\n" ); if ( !(*pElementIter)->m_pStorage ) - throw uno::RuntimeException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException( THROW_WHERE, uno::Reference< uno::XInterface >() ); (*pElementIter)->m_pStorage->InsertIntoPackageFolder( (*pElementIter)->m_aName, xNewPackageFolder ); @@ -1205,7 +1211,7 @@ void OStorage_Impl::Commit() { OSL_ENSURE( (*pElementIter)->m_pStream, "An inserted stream is incomplete!\n" ); if ( !(*pElementIter)->m_pStream ) - throw uno::RuntimeException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException( THROW_WHERE, uno::Reference< uno::XInterface >() ); if ( !(*pElementIter)->m_pStream->IsTransacted() ) (*pElementIter)->m_pStream->Commit(); @@ -1228,7 +1234,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( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException( THROW_WHERE, uno::Reference< uno::XInterface >() ); xProps->setPropertyValue( "MediaType", uno::makeAny( m_aMediaType ) ); xProps->setPropertyValue( "Version", uno::makeAny( m_aVersion ) ); @@ -1243,7 +1249,7 @@ void OStorage_Impl::Commit() SAL_WARN_IF( !xChangesBatch.is(), "package.xstor", "Impossible to commit package!" ); if ( !xChangesBatch.is() ) - throw uno::RuntimeException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException( THROW_WHERE, uno::Reference< uno::XInterface >() ); try { @@ -1261,7 +1267,7 @@ void OStorage_Impl::Commit() } AddLog( aException.Message ); - AddLog( OSL_LOG_PREFIX "Rethrow" ); + AddLog( THROW_WHERE "Rethrow" ); throw; } } @@ -1342,19 +1348,19 @@ void OStorage_Impl::Revert() ::osl::MutexGuard aGuard( m_rMutexRef->GetMutex() ) ; if ( m_nStorageType != embed::StorageFormats::PACKAGE ) - throw packages::NoEncryptionException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); + throw packages::NoEncryptionException( THROW_WHERE, uno::Reference< uno::XInterface >() ); if ( m_bIsRoot ) { if ( !m_bHasCommonEncryptionData ) - throw packages::NoEncryptionException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); + throw packages::NoEncryptionException( THROW_WHERE, uno::Reference< uno::XInterface >() ); return m_aCommonEncryptionData; } else { if ( !m_pParent ) - throw packages::NoEncryptionException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); + throw packages::NoEncryptionException( THROW_WHERE, uno::Reference< uno::XInterface >() ); return m_pParent->GetCommonRootEncryptionData(); } @@ -1382,7 +1388,7 @@ SotElement_Impl* OStorage_Impl::InsertStream( OUString aName, sal_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( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); + throw embed::InvalidStorageException( THROW_WHERE, uno::Reference< uno::XInterface >() ); uno::Sequence< uno::Any > aSeq( 1 ); aSeq[0] <<= sal_False; @@ -1391,15 +1397,15 @@ SotElement_Impl* OStorage_Impl::InsertStream( OUString aName, sal_Bool bEncr ) SAL_WARN_IF( !xNewElement.is(), "package.xstor", "Not possible to create a new stream!" ); if ( !xNewElement.is() ) - throw io::IOException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); + throw io::IOException( THROW_WHERE, uno::Reference< uno::XInterface >() ); uno::Reference< packages::XDataSinkEncrSupport > xPackageSubStream( xNewElement, uno::UNO_QUERY ); if ( !xPackageSubStream.is() ) - throw uno::RuntimeException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException( THROW_WHERE, uno::Reference< uno::XInterface >() ); OSL_ENSURE( m_nStorageType == embed::StorageFormats::PACKAGE || !bEncr, "Only package storage supports encryption!\n" ); if ( m_nStorageType != embed::StorageFormats::PACKAGE && bEncr ) - throw packages::NoEncryptionException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); + throw packages::NoEncryptionException( THROW_WHERE, uno::Reference< uno::XInterface >() ); // the mode is not needed for storage stream internal implementation SotElement_Impl* pNewElement = InsertElement( aName, sal_False ); @@ -1417,10 +1423,10 @@ SotElement_Impl* OStorage_Impl::InsertRawStream( OUString aName, const uno::Refe // 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( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); + throw embed::InvalidStorageException( THROW_WHERE, uno::Reference< uno::XInterface >() ); if ( m_nStorageType != embed::StorageFormats::PACKAGE ) - throw packages::NoEncryptionException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); + throw packages::NoEncryptionException( THROW_WHERE, uno::Reference< uno::XInterface >() ); uno::Reference< io::XSeekable > xSeek( xInStream, uno::UNO_QUERY ); uno::Reference< io::XInputStream > xInStrToInsert = xSeek.is() ? xInStream : @@ -1433,11 +1439,11 @@ SotElement_Impl* OStorage_Impl::InsertRawStream( OUString aName, const uno::Refe SAL_WARN_IF( !xNewElement.is(), "package.xstor", "Not possible to create a new stream!" ); if ( !xNewElement.is() ) - throw io::IOException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); + throw io::IOException( THROW_WHERE, uno::Reference< uno::XInterface >() ); uno::Reference< packages::XDataSinkEncrSupport > xPackageSubStream( xNewElement, uno::UNO_QUERY ); if ( !xPackageSubStream.is() ) - throw uno::RuntimeException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException( THROW_WHERE, uno::Reference< uno::XInterface >() ); xPackageSubStream->setRawStream( xInStrToInsert ); @@ -1458,7 +1464,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( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); + throw embed::InvalidStorageException( THROW_WHERE, uno::Reference< uno::XInterface >() ); uno::Sequence< uno::Any > aSeq( 1 ); aSeq[0] <<= sal_True; @@ -1467,11 +1473,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( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); + throw io::IOException( THROW_WHERE, uno::Reference< uno::XInterface >() ); uno::Reference< container::XNameContainer > xPackageSubFolder( xNewElement, uno::UNO_QUERY ); if ( !xPackageSubFolder.is() ) - throw uno::RuntimeException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException( THROW_WHERE, uno::Reference< uno::XInterface >() ); OStorage_Impl* pResult = new OStorage_Impl( this, nStorageMode, xPackageSubFolder, m_xPackage, m_xContext, m_nStorageType ); @@ -1543,14 +1549,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( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); + throw container::NoSuchElementException( THROW_WHERE, uno::Reference< uno::XInterface >() ); 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( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException( THROW_WHERE, uno::Reference< uno::XInterface >() ); pElement->m_pStorage = new OStorage_Impl( this, nStorageMode, xPackageSubFolder, m_xPackage, m_xContext, m_nStorageType ); } @@ -1570,11 +1576,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( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); + throw container::NoSuchElementException( THROW_WHERE, uno::Reference< uno::XInterface >() ); uno::Reference< packages::XDataSinkEncrSupport > xPackageSubStream( xTunnel, uno::UNO_QUERY ); if ( !xPackageSubStream.is() ) - throw uno::RuntimeException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException( THROW_WHERE, uno::Reference< uno::XInterface >() ); // 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, sal_False, m_nStorageType, sal_False, GetRelInfoStreamForName( pElement->m_aOriginalName ) ); @@ -1611,7 +1617,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( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); // TODO: Access denied + throw io::IOException( THROW_WHERE, uno::Reference< uno::XInterface >() ); // TODO: Access denied if ( pElement->m_bIsInserted ) { @@ -1657,10 +1663,10 @@ void OStorage_Impl::CloneStreamElement( const OUString& aStreamName, if ( !pElement ) { // element does not exist, throw exception - throw io::IOException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); // TODO: access_denied + throw io::IOException( THROW_WHERE, uno::Reference< uno::XInterface >() ); // TODO: access_denied } else if ( pElement->m_bIsStorage ) - throw io::IOException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); + throw io::IOException( THROW_WHERE, uno::Reference< uno::XInterface >() ); if ( !pElement->m_pStream ) OpenSubStream( pElement ); @@ -1682,7 +1688,7 @@ void OStorage_Impl::CloneStreamElement( const OUString& aStreamName, pElement->m_pStream->GetCopyOfLastCommit( xTargetStream ); } else - throw io::IOException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); // TODO: general_error + throw io::IOException( THROW_WHERE, uno::Reference< uno::XInterface >() ); // TODO: general_error } void OStorage_Impl::RemoveStreamRelInfo( const OUString& aOriginalName ) @@ -1719,7 +1725,7 @@ void OStorage_Impl::CreateRelStorage() OpenSubStorage( m_pRelStorElement, embed::ElementModes::WRITE ); if ( !m_pRelStorElement->m_pStorage ) - throw uno::RuntimeException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException( THROW_WHERE, uno::Reference< uno::XInterface >() ); OStorage* pResultStorage = new OStorage( m_pRelStorElement->m_pStorage, sal_False ); m_xRelStorage = uno::Reference< embed::XStorage >( (embed::XStorage*) pResultStorage ); @@ -1732,7 +1738,7 @@ void OStorage_Impl::CommitStreamRelInfo( SotElement_Impl* pStreamElement ) // the stream element must be provided if ( !pStreamElement ) - throw uno::RuntimeException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException( THROW_WHERE, uno::Reference< uno::XInterface >() ); if ( m_nStorageType == embed::StorageFormats::OFOPXML && pStreamElement->m_pStream ) { @@ -1775,12 +1781,12 @@ void OStorage_Impl::CommitRelInfo( const uno::Reference< container::XNameContain OUString aRelsStorName("_rels"); if ( !xNewPackageFolder.is() ) - throw uno::RuntimeException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException( THROW_WHERE, uno::Reference< uno::XInterface >() ); if ( m_nStorageType == embed::StorageFormats::OFOPXML ) { if ( m_nRelInfoStatus == RELINFO_BROKEN || m_nRelInfoStatus == RELINFO_CHANGED_BROKEN ) - throw io::IOException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); + throw io::IOException( THROW_WHERE, uno::Reference< uno::XInterface >() ); if ( m_nRelInfoStatus == RELINFO_CHANGED || m_nRelInfoStatus == RELINFO_CHANGED_STREAM_READ @@ -1798,7 +1804,7 @@ void OStorage_Impl::CommitRelInfo( const uno::Reference< container::XNameContain uno::Reference< io::XOutputStream > xOutStream = xRelsStream->getOutputStream(); if ( !xOutStream.is() ) - throw uno::RuntimeException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException( THROW_WHERE, uno::Reference< uno::XInterface >() ); ::comphelper::OFOPXMLHelper::WriteRelationsInfoSequence( xOutStream, m_aRelInfo, m_xContext ); @@ -1824,7 +1830,7 @@ void OStorage_Impl::CommitRelInfo( const uno::Reference< container::XNameContain uno::Reference< io::XOutputStream > xOutputStream = xRelsStream->getOutputStream(); if ( !xOutputStream.is() ) - throw uno::RuntimeException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException( THROW_WHERE, uno::Reference< uno::XInterface >() ); uno::Reference< io::XSeekable > xSeek( m_xNewRelInfoStream, uno::UNO_QUERY_THROW ); xSeek->seek( 0 ); @@ -1925,7 +1931,7 @@ OStorage::~OStorage() catch( const uno::RuntimeException& rRuntimeException ) { m_pImpl->AddLog( rRuntimeException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Handled exception" ); + m_pImpl->AddLog( THROW_WHERE "Handled exception" ); } } } @@ -1954,8 +1960,8 @@ void SAL_CALL OStorage::InternalDispose( sal_Bool bNotifyImpl ) if ( !m_pImpl ) { - ::package::StaticAddLog( OSL_LOG_PREFIX "Disposed!" ); - throw lang::DisposedException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); + ::package::StaticAddLog( THROW_WHERE "Disposed!" ); + throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() ); } // the source object is also a kind of locker for the current object @@ -1991,7 +1997,7 @@ void SAL_CALL OStorage::InternalDispose( sal_Bool bNotifyImpl ) } catch( const uno::Exception& rException ) { m_pImpl->AddLog( rException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Quiet exception" ); + m_pImpl->AddLog( THROW_WHERE "Quiet exception" ); } } } @@ -2052,8 +2058,8 @@ void OStorage::BroadcastModifiedIfNecessary() // no need to lock mutex here for the checking of m_pImpl, and m_pData is alive until the object is destructed if ( !m_pImpl ) { - ::package::StaticAddLog( OSL_LOG_PREFIX "Disposed!" ); - throw lang::DisposedException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); + ::package::StaticAddLog( THROW_WHERE "Disposed!" ); + throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() ); } if ( !m_pImpl->m_bBroadcastModified ) @@ -2089,8 +2095,8 @@ void OStorage::BroadcastTransaction( sal_Int8 nMessage ) // no need to lock mutex here for the checking of m_pImpl, and m_pData is alive until the object is destructed if ( !m_pImpl ) { - ::package::StaticAddLog( OSL_LOG_PREFIX "Disposed!" ); - throw lang::DisposedException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); + ::package::StaticAddLog( THROW_WHERE "Disposed!" ); + throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() ); } SAL_WARN_IF( m_pData->m_bReadOnlyWrap, "package.xstor", "The storage can not be modified at all!" ); @@ -2151,7 +2157,7 @@ SotElement_Impl* OStorage::OpenStreamElement_Impl( const OUString& aStreamName, } else if ( pElement->m_bIsStorage ) { - throw io::IOException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); + throw io::IOException( THROW_WHERE, uno::Reference< uno::XInterface >() ); } SAL_WARN_IF( !pElement, "package.xstor", "In case element can not be created an exception must be thrown!" ); @@ -2160,7 +2166,7 @@ SotElement_Impl* OStorage::OpenStreamElement_Impl( const OUString& aStreamName, m_pImpl->OpenSubStream( pElement ); if ( !pElement->m_pStream ) - throw io::IOException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); + throw io::IOException( THROW_WHERE, uno::Reference< uno::XInterface >() ); return pElement; } @@ -2168,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( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException( THROW_WHERE, uno::Reference< uno::XInterface >() ); if ( !m_pData->m_pSubElDispListener ) { @@ -2346,12 +2352,12 @@ void SAL_CALL OStorage::copyToStorage( const uno::Reference< embed::XStorage >& if ( !m_pImpl ) { - ::package::StaticAddLog( OSL_LOG_PREFIX "Disposed!" ); - throw lang::DisposedException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); + ::package::StaticAddLog( THROW_WHERE "Disposed!" ); + throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() ); } if ( !xDest.is() || xDest == uno::Reference< uno::XInterface >( static_cast< OWeakObject*> ( this ), uno::UNO_QUERY ) ) - throw lang::IllegalArgumentException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >(), 1 ); + throw lang::IllegalArgumentException( THROW_WHERE, uno::Reference< uno::XInterface >(), 1 ); try { m_pImpl->CopyToStorage( xDest, sal_False ); @@ -2359,40 +2365,40 @@ void SAL_CALL OStorage::copyToStorage( const uno::Reference< embed::XStorage >& catch( const embed::InvalidStorageException& rInvalidStorageException ) { m_pImpl->AddLog( rInvalidStorageException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); throw; } catch( const lang::IllegalArgumentException& rIllegalArgumentException ) { m_pImpl->AddLog( rIllegalArgumentException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); throw; } catch( const embed::StorageWrappedTargetException& rStorageWrappedTargetException ) { m_pImpl->AddLog( rStorageWrappedTargetException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); throw; } catch( const io::IOException& rIOException ) { m_pImpl->AddLog( rIOException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); throw; } catch( const uno::RuntimeException& rRuntimeException ) { m_pImpl->AddLog( rRuntimeException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); throw; } catch( const uno::Exception& rException ) { m_pImpl->AddLog( rException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); uno::Any aCaught( ::cppu::getCaughtException() ); - throw embed::StorageWrappedTargetException( OSL_LOG_PREFIX "Can't copy storage!", + throw embed::StorageWrappedTargetException( THROW_WHERE "Can't copy storage!", uno::Reference< io::XInputStream >(), aCaught ); } @@ -2413,18 +2419,18 @@ uno::Reference< io::XStream > SAL_CALL OStorage::openStreamElement( if ( !m_pImpl ) { - ::package::StaticAddLog( OSL_LOG_PREFIX "Disposed!" ); - throw lang::DisposedException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); + ::package::StaticAddLog( THROW_WHERE "Disposed!" ); + throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() ); } if ( aStreamName.isEmpty() || !::comphelper::OStorageHelper::IsValidZipEntryFileName( aStreamName, sal_False ) ) - throw lang::IllegalArgumentException( OSL_LOG_PREFIX "Unexpected entry name syntax.", uno::Reference< uno::XInterface >(), 1 ); + throw lang::IllegalArgumentException( THROW_WHERE "Unexpected entry name syntax.", uno::Reference< uno::XInterface >(), 1 ); if ( m_pData->m_nStorageType == embed::StorageFormats::OFOPXML && aStreamName == "_rels" ) - throw lang::IllegalArgumentException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >(), 1 ); // unacceptable element name + 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( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); // TODO: access denied + throw io::IOException( THROW_WHERE, uno::Reference< uno::XInterface >() ); // TODO: access denied uno::Reference< io::XStream > xResult; try @@ -2440,7 +2446,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( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException( THROW_WHERE, uno::Reference< uno::XInterface >() ); MakeLinkToSubComponent_Impl( xStreamComponent ); } @@ -2448,46 +2454,46 @@ uno::Reference< io::XStream > SAL_CALL OStorage::openStreamElement( catch( const embed::InvalidStorageException& rInvalidStorageException ) { m_pImpl->AddLog( rInvalidStorageException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); throw; } catch( const lang::IllegalArgumentException& rIllegalArgumentException ) { m_pImpl->AddLog( rIllegalArgumentException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); throw; } catch( const packages::WrongPasswordException& rWrongPasswordException ) { m_pImpl->AddLog( rWrongPasswordException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); throw; } catch( const embed::StorageWrappedTargetException& rStorageWrappedTargetException ) { m_pImpl->AddLog( rStorageWrappedTargetException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); throw; } catch( const io::IOException& rIOException ) { m_pImpl->AddLog( rIOException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); throw; } catch( const uno::RuntimeException& rRuntimeException ) { m_pImpl->AddLog( rRuntimeException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); throw; } catch( const uno::Exception& rException ) { m_pImpl->AddLog( rException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); uno::Any aCaught( ::cppu::getCaughtException() ); - throw embed::StorageWrappedTargetException(OSL_LOG_PREFIX "Can't open stream element!", + throw embed::StorageWrappedTargetException(THROW_WHERE "Can't open stream element!", uno::Reference< io::XInputStream >(), aCaught ); } @@ -2528,22 +2534,22 @@ uno::Reference< embed::XStorage > SAL_CALL OStorage::openStorageElement( if ( !m_pImpl ) { - ::package::StaticAddLog( OSL_LOG_PREFIX "Disposed!" ); - throw lang::DisposedException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); + ::package::StaticAddLog( THROW_WHERE "Disposed!" ); + throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() ); } if ( aStorName.isEmpty() || !::comphelper::OStorageHelper::IsValidZipEntryFileName( aStorName, sal_False ) ) - throw lang::IllegalArgumentException( OSL_LOG_PREFIX "Unexpected entry name syntax.", uno::Reference< uno::XInterface >(), 1 ); + throw lang::IllegalArgumentException( THROW_WHERE "Unexpected entry name syntax.", uno::Reference< uno::XInterface >(), 1 ); if ( m_pData->m_nStorageType == embed::StorageFormats::OFOPXML && aStorName == "_rels" ) - throw lang::IllegalArgumentException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >(), 1 ); // unacceptable storage name + 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( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); // TODO: access denied + throw io::IOException( THROW_WHERE, uno::Reference< uno::XInterface >() ); // TODO: access denied if ( ( nStorageMode & embed::ElementModes::TRUNCATE ) && !( nStorageMode & embed::ElementModes::WRITE ) ) - throw io::IOException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); // TODO: access denied + throw io::IOException( THROW_WHERE, uno::Reference< uno::XInterface >() ); // TODO: access denied // it's always possible to read written storage in this implementation nStorageMode |= embed::ElementModes::READ; @@ -2558,26 +2564,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( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); // TODO: access_denied + throw io::IOException( THROW_WHERE, uno::Reference< uno::XInterface >() ); // 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( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); + throw io::IOException( THROW_WHERE, uno::Reference< uno::XInterface >() ); } 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( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); // TODO: access_denied + throw io::IOException( THROW_WHERE, uno::Reference< uno::XInterface >() ); // TODO: access_denied } else if ( !pElement->m_pStorage->m_aReadOnlyWrapList.empty() && ( nStorageMode & embed::ElementModes::WRITE ) ) { - throw io::IOException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); // TODO: access_denied + throw io::IOException( THROW_WHERE, uno::Reference< uno::XInterface >() ); // TODO: access_denied } else { @@ -2604,7 +2610,7 @@ uno::Reference< embed::XStorage > SAL_CALL OStorage::openStorageElement( m_pImpl->OpenSubStorage( pElement, nStorageMode ); if ( !pElement->m_pStorage ) - throw io::IOException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); // TODO: general_error + throw io::IOException( THROW_WHERE, uno::Reference< uno::XInterface >() ); // TODO: general_error sal_Bool bReadOnlyWrap = ( ( nStorageMode & embed::ElementModes::WRITE ) != embed::ElementModes::WRITE ); OStorage* pResultStorage = new OStorage( pElement->m_pStorage, bReadOnlyWrap ); @@ -2618,7 +2624,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( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException( THROW_WHERE, uno::Reference< uno::XInterface >() ); MakeLinkToSubComponent_Impl( xStorageComponent ); } @@ -2626,40 +2632,40 @@ uno::Reference< embed::XStorage > SAL_CALL OStorage::openStorageElement( catch( const embed::InvalidStorageException& rInvalidStorageException ) { m_pImpl->AddLog( rInvalidStorageException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); throw; } catch( const lang::IllegalArgumentException& rIllegalArgumentException ) { m_pImpl->AddLog( rIllegalArgumentException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); throw; } catch( const embed::StorageWrappedTargetException& rStorageWrappedTargetException ) { m_pImpl->AddLog( rStorageWrappedTargetException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); throw; } catch( const io::IOException& rIOException ) { m_pImpl->AddLog( rIOException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); throw; } catch( const uno::RuntimeException& rRuntimeException ) { m_pImpl->AddLog( rRuntimeException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); throw; } catch( const uno::Exception& rException ) { m_pImpl->AddLog( rException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); uno::Any aCaught( ::cppu::getCaughtException() ); - throw embed::StorageWrappedTargetException( OSL_LOG_PREFIX "Can't open storage!", + throw embed::StorageWrappedTargetException( THROW_WHERE "Can't open storage!", uno::Reference< io::XInputStream >(), aCaught ); } @@ -2681,67 +2687,67 @@ uno::Reference< io::XStream > SAL_CALL OStorage::cloneStreamElement( const OUStr if ( !m_pImpl ) { - ::package::StaticAddLog( OSL_LOG_PREFIX "Disposed!" ); - throw lang::DisposedException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); + ::package::StaticAddLog( THROW_WHERE "Disposed!" ); + throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() ); } if ( aStreamName.isEmpty() || !::comphelper::OStorageHelper::IsValidZipEntryFileName( aStreamName, sal_False ) ) - throw lang::IllegalArgumentException( OSL_LOG_PREFIX "Unexpected entry name syntax.", uno::Reference< uno::XInterface >(), 1 ); + throw lang::IllegalArgumentException( THROW_WHERE "Unexpected entry name syntax.", uno::Reference< uno::XInterface >(), 1 ); if ( m_pData->m_nStorageType == embed::StorageFormats::OFOPXML && aStreamName == "_rels" ) - throw lang::IllegalArgumentException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >(), 1 ); // unacceptable storage name + throw lang::IllegalArgumentException( THROW_WHERE, uno::Reference< uno::XInterface >(), 1 ); // unacceptable storage name try { uno::Reference< io::XStream > xResult; m_pImpl->CloneStreamElement( aStreamName, sal_False, ::comphelper::SequenceAsHashMap(), xResult ); if ( !xResult.is() ) - throw uno::RuntimeException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException( THROW_WHERE, uno::Reference< uno::XInterface >() ); return xResult; } catch( const embed::InvalidStorageException& rInvalidStorageException ) { m_pImpl->AddLog( rInvalidStorageException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); throw; } catch( const lang::IllegalArgumentException& rIllegalArgumentException ) { m_pImpl->AddLog( rIllegalArgumentException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); throw; } catch( const packages::WrongPasswordException& rWrongPasswordException ) { m_pImpl->AddLog( rWrongPasswordException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); throw; } catch( const io::IOException& rIOException ) { m_pImpl->AddLog( rIOException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); throw; } catch( const embed::StorageWrappedTargetException& rStorageWrappedTargetException ) { m_pImpl->AddLog( rStorageWrappedTargetException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); throw; } catch( const uno::RuntimeException& rRuntimeException ) { m_pImpl->AddLog( rRuntimeException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); throw; } catch( const uno::Exception& rException ) { m_pImpl->AddLog( rException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); uno::Any aCaught( ::cppu::getCaughtException() ); - throw embed::StorageWrappedTargetException( OSL_LOG_PREFIX "Can't clone stream!", + throw embed::StorageWrappedTargetException( THROW_WHERE "Can't clone stream!", uno::Reference< io::XInputStream >(), aCaught ); } @@ -2777,8 +2783,8 @@ void SAL_CALL OStorage::copyLastCommitTo( if ( !m_pImpl ) { - ::package::StaticAddLog( OSL_LOG_PREFIX "Disposed!" ); - throw lang::DisposedException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); + ::package::StaticAddLog( THROW_WHERE "Disposed!" ); + throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() ); } try @@ -2788,40 +2794,40 @@ void SAL_CALL OStorage::copyLastCommitTo( catch( const embed::InvalidStorageException& rInvalidStorageException ) { m_pImpl->AddLog( rInvalidStorageException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); throw; } catch( const lang::IllegalArgumentException& rIllegalArgumentException ) { m_pImpl->AddLog( rIllegalArgumentException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); throw; } catch( const embed::StorageWrappedTargetException& rStorageWrappedTargetException ) { m_pImpl->AddLog( rStorageWrappedTargetException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); throw; } catch( const io::IOException& rIOException ) { m_pImpl->AddLog( rIOException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); throw; } catch( const uno::RuntimeException& rRuntimeException ) { m_pImpl->AddLog( rRuntimeException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); throw; } catch( const uno::Exception& rException ) { m_pImpl->AddLog( rException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); uno::Any aCaught( ::cppu::getCaughtException() ); - throw embed::StorageWrappedTargetException( OSL_LOG_PREFIX "Can't copy last commit version!", + throw embed::StorageWrappedTargetException( THROW_WHERE "Can't copy last commit version!", uno::Reference< io::XInputStream >(), aCaught ); } @@ -2843,15 +2849,15 @@ void SAL_CALL OStorage::copyStorageElementLastCommitTo( if ( !m_pImpl ) { - ::package::StaticAddLog( OSL_LOG_PREFIX "Disposed!"); - throw lang::DisposedException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); + ::package::StaticAddLog( THROW_WHERE "Disposed!"); + throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() ); } if ( aStorName.isEmpty() || !::comphelper::OStorageHelper::IsValidZipEntryFileName( aStorName, sal_False ) ) - throw lang::IllegalArgumentException( OSL_LOG_PREFIX "Unexpected entry name syntax.", uno::Reference< uno::XInterface >(), 1 ); + throw lang::IllegalArgumentException( THROW_WHERE "Unexpected entry name syntax.", uno::Reference< uno::XInterface >(), 1 ); if ( m_pData->m_nStorageType == embed::StorageFormats::OFOPXML && aStorName == "_rels" ) - throw lang::IllegalArgumentException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >(), 1 ); // unacceptable storage name + throw lang::IllegalArgumentException( THROW_WHERE, uno::Reference< uno::XInterface >(), 1 ); // unacceptable storage name // it's always possible to read written storage in this implementation sal_Int32 nStorageMode = embed::ElementModes::READ; @@ -2862,11 +2868,11 @@ void SAL_CALL OStorage::copyStorageElementLastCommitTo( if ( !pElement ) { // element does not exist, throw exception - throw io::IOException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); // TODO: access_denied + throw io::IOException( THROW_WHERE, uno::Reference< uno::XInterface >() ); // TODO: access_denied } else if ( !pElement->m_bIsStorage ) { - throw io::IOException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); + throw io::IOException( THROW_WHERE, uno::Reference< uno::XInterface >() ); } if ( !pElement->m_pStorage ) @@ -2881,45 +2887,45 @@ void SAL_CALL OStorage::copyStorageElementLastCommitTo( pElement->m_pStorage->CopyLastCommitTo( xTargetStorage ); } else - throw io::IOException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); // TODO: general_error + throw io::IOException( THROW_WHERE, uno::Reference< uno::XInterface >() ); // TODO: general_error } catch( const embed::InvalidStorageException& rInvalidStorageException ) { m_pImpl->AddLog( rInvalidStorageException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); throw; } catch( const lang::IllegalArgumentException& rIllegalArgumentException ) { m_pImpl->AddLog( rIllegalArgumentException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); throw; } catch( const io::IOException& rIOException ) { m_pImpl->AddLog( rIOException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); throw; } catch( const embed::StorageWrappedTargetException& rStorageWrappedTargetException ) { m_pImpl->AddLog( rStorageWrappedTargetException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); throw; } catch( const uno::RuntimeException& rRuntimeException ) { m_pImpl->AddLog( rRuntimeException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); throw; } catch( const uno::Exception& rException ) { m_pImpl->AddLog( rException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); uno::Any aCaught( ::cppu::getCaughtException() ); - throw embed::StorageWrappedTargetException( OSL_LOG_PREFIX "Can't copy last commit element version!", + throw embed::StorageWrappedTargetException( THROW_WHERE "Can't copy last commit element version!", uno::Reference< io::XInputStream >(), aCaught ); } @@ -2935,15 +2941,15 @@ sal_Bool SAL_CALL OStorage::isStreamElement( const OUString& aElementName ) if ( !m_pImpl ) { - ::package::StaticAddLog( OSL_LOG_PREFIX "Disposed!" ); - throw lang::DisposedException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); + ::package::StaticAddLog( THROW_WHERE "Disposed!" ); + throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() ); } if ( aElementName.isEmpty() || !::comphelper::OStorageHelper::IsValidZipEntryFileName( aElementName, sal_False ) ) - throw lang::IllegalArgumentException( OSL_LOG_PREFIX "Unexpected entry name syntax.", uno::Reference< uno::XInterface >(), 1 ); + throw lang::IllegalArgumentException( THROW_WHERE "Unexpected entry name syntax.", uno::Reference< uno::XInterface >(), 1 ); if ( m_pData->m_nStorageType == embed::StorageFormats::OFOPXML && aElementName == "_rels" ) - throw lang::IllegalArgumentException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >(), 1 ); // unacceptable name + throw lang::IllegalArgumentException( THROW_WHERE, uno::Reference< uno::XInterface >(), 1 ); // unacceptable name SotElement_Impl* pElement = NULL; @@ -2954,40 +2960,40 @@ sal_Bool SAL_CALL OStorage::isStreamElement( const OUString& aElementName ) catch( const embed::InvalidStorageException& rInvalidStorageException ) { m_pImpl->AddLog( rInvalidStorageException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); throw; } catch( const lang::IllegalArgumentException& rIllegalArgumentException ) { m_pImpl->AddLog( rIllegalArgumentException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); throw; } catch( const container::NoSuchElementException& rNoSuchElementException ) { m_pImpl->AddLog( rNoSuchElementException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); throw; } catch( const uno::RuntimeException& rRuntimeException ) { m_pImpl->AddLog( rRuntimeException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); throw; } catch( const uno::Exception& rException ) { m_pImpl->AddLog( rException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); uno::Any aCaught( ::cppu::getCaughtException() ); - throw lang::WrappedTargetRuntimeException( OSL_LOG_PREFIX "Can't detect whether it is a stream!", + throw lang::WrappedTargetRuntimeException( THROW_WHERE "Can't detect whether it is a stream!", uno::Reference< io::XInputStream >(), aCaught ); } if ( !pElement ) - throw container::NoSuchElementException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); //??? + throw container::NoSuchElementException( THROW_WHERE, uno::Reference< uno::XInterface >() ); //??? return !pElement->m_bIsStorage; } @@ -3002,15 +3008,15 @@ sal_Bool SAL_CALL OStorage::isStorageElement( const OUString& aElementName ) if ( !m_pImpl ) { - ::package::StaticAddLog( OSL_LOG_PREFIX "Disposed!" ); - throw lang::DisposedException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); + ::package::StaticAddLog( THROW_WHERE "Disposed!" ); + throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() ); } if ( aElementName.isEmpty() || !::comphelper::OStorageHelper::IsValidZipEntryFileName( aElementName, sal_False ) ) - throw lang::IllegalArgumentException( OSL_LOG_PREFIX "Unexpected entry name syntax.", uno::Reference< uno::XInterface >(), 1 ); + throw lang::IllegalArgumentException( THROW_WHERE "Unexpected entry name syntax.", uno::Reference< uno::XInterface >(), 1 ); if ( m_pData->m_nStorageType == embed::StorageFormats::OFOPXML && aElementName == "_rels" ) - throw lang::IllegalArgumentException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >(), 1 ); + throw lang::IllegalArgumentException( THROW_WHERE, uno::Reference< uno::XInterface >(), 1 ); SotElement_Impl* pElement = NULL; @@ -3021,40 +3027,40 @@ sal_Bool SAL_CALL OStorage::isStorageElement( const OUString& aElementName ) catch( const embed::InvalidStorageException& rInvalidStorageException ) { m_pImpl->AddLog( rInvalidStorageException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); throw; } catch( const lang::IllegalArgumentException& rIllegalArgumentException ) { m_pImpl->AddLog( rIllegalArgumentException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); throw; } catch( const container::NoSuchElementException& rNoSuchElementException ) { m_pImpl->AddLog( rNoSuchElementException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); throw; } catch( const uno::RuntimeException& rRuntimeException ) { m_pImpl->AddLog( rRuntimeException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); throw; } catch( const uno::Exception& rException ) { m_pImpl->AddLog( rException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); uno::Any aCaught( ::cppu::getCaughtException() ); - throw lang::WrappedTargetRuntimeException( OSL_LOG_PREFIX "can't detect whether it is a storage", + throw lang::WrappedTargetRuntimeException( THROW_WHERE "can't detect whether it is a storage", uno::Reference< io::XInputStream >(), aCaught ); } if ( !pElement ) - throw container::NoSuchElementException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); //??? + throw container::NoSuchElementException( THROW_WHERE, uno::Reference< uno::XInterface >() ); //??? return pElement->m_bIsStorage; } @@ -3073,25 +3079,25 @@ void SAL_CALL OStorage::removeElement( const OUString& aElementName ) if ( !m_pImpl ) { - ::package::StaticAddLog( OSL_LOG_PREFIX "Disposed!" ); - throw lang::DisposedException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); + ::package::StaticAddLog( THROW_WHERE "Disposed!" ); + throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() ); } if ( aElementName.isEmpty() || !::comphelper::OStorageHelper::IsValidZipEntryFileName( aElementName, sal_False ) ) - throw lang::IllegalArgumentException( OSL_LOG_PREFIX "Unexpected entry name syntax.", uno::Reference< uno::XInterface >(), 1 ); + throw lang::IllegalArgumentException( THROW_WHERE "Unexpected entry name syntax.", uno::Reference< uno::XInterface >(), 1 ); if ( m_pData->m_nStorageType == embed::StorageFormats::OFOPXML && aElementName == "_rels" ) - throw lang::IllegalArgumentException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >(), 1 ); // TODO: unacceptable name + throw lang::IllegalArgumentException( THROW_WHERE, uno::Reference< uno::XInterface >(), 1 ); // TODO: unacceptable name if ( !( m_pImpl->m_nStorageMode & embed::ElementModes::WRITE ) ) - throw io::IOException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); // TODO: access denied + throw io::IOException( THROW_WHERE, uno::Reference< uno::XInterface >() ); // TODO: access denied try { SotElement_Impl* pElement = m_pImpl->FindElement( aElementName ); if ( !pElement ) - throw container::NoSuchElementException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); //??? + throw container::NoSuchElementException( THROW_WHERE, uno::Reference< uno::XInterface >() ); //??? m_pImpl->RemoveElement( pElement ); @@ -3101,46 +3107,46 @@ void SAL_CALL OStorage::removeElement( const OUString& aElementName ) catch( const embed::InvalidStorageException& rInvalidStorageException ) { m_pImpl->AddLog( rInvalidStorageException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); throw; } catch( const lang::IllegalArgumentException& rIllegalArgumentException ) { m_pImpl->AddLog( rIllegalArgumentException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); throw; } catch( const container::NoSuchElementException& rNoSuchElementException ) { m_pImpl->AddLog( rNoSuchElementException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); throw; } catch( const io::IOException& rIOException ) { m_pImpl->AddLog( rIOException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); throw; } catch( const embed::StorageWrappedTargetException& rStorageWrappedTargetException ) { m_pImpl->AddLog( rStorageWrappedTargetException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); throw; } catch( const uno::RuntimeException& rRuntimeException ) { m_pImpl->AddLog( rRuntimeException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); throw; } catch( const uno::Exception& rException ) { m_pImpl->AddLog( rException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); uno::Any aCaught( ::cppu::getCaughtException() ); - throw embed::StorageWrappedTargetException( OSL_LOG_PREFIX "Can't remove element!", + throw embed::StorageWrappedTargetException( THROW_WHERE "Can't remove element!", uno::Reference< io::XInputStream >(), aCaught ); } @@ -3165,29 +3171,29 @@ void SAL_CALL OStorage::renameElement( const OUString& aElementName, const OUStr if ( !m_pImpl ) { - ::package::StaticAddLog( OSL_LOG_PREFIX "Disposed!" ); - throw lang::DisposedException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); + ::package::StaticAddLog( THROW_WHERE "Disposed!" ); + throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() ); } if ( aElementName.isEmpty() || !::comphelper::OStorageHelper::IsValidZipEntryFileName( aElementName, sal_False ) || aNewName.isEmpty() || !::comphelper::OStorageHelper::IsValidZipEntryFileName( aNewName, sal_False ) ) - throw lang::IllegalArgumentException( OSL_LOG_PREFIX "Unexpected entry name syntax.", uno::Reference< uno::XInterface >(), 1 ); + throw lang::IllegalArgumentException( THROW_WHERE "Unexpected entry name syntax.", uno::Reference< uno::XInterface >(), 1 ); if ( m_pData->m_nStorageType == embed::StorageFormats::OFOPXML && ( aElementName == "_rels" || aNewName == "_rels" ) ) - throw lang::IllegalArgumentException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >(), 0 ); // TODO: unacceptable element name + 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( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); // TODO: access denied + throw io::IOException( THROW_WHERE, uno::Reference< uno::XInterface >() ); // TODO: access denied try { SotElement_Impl* pRefElement = m_pImpl->FindElement( aNewName ); if ( pRefElement ) - throw container::ElementExistException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); //??? + throw container::ElementExistException( THROW_WHERE, uno::Reference< uno::XInterface >() ); //??? SotElement_Impl* pElement = m_pImpl->FindElement( aElementName ); if ( !pElement ) - throw container::NoSuchElementException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); //??? + throw container::NoSuchElementException( THROW_WHERE, uno::Reference< uno::XInterface >() ); //??? pElement->m_aName = aNewName; @@ -3197,52 +3203,52 @@ void SAL_CALL OStorage::renameElement( const OUString& aElementName, const OUStr catch( const embed::InvalidStorageException& rInvalidStorageException ) { m_pImpl->AddLog( rInvalidStorageException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); throw; } catch( const lang::IllegalArgumentException& rIllegalArgumentException ) { m_pImpl->AddLog( rIllegalArgumentException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); throw; } catch( const container::NoSuchElementException& rNoSuchElementException ) { m_pImpl->AddLog( rNoSuchElementException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); throw; } catch( const container::ElementExistException& rElementExistException ) { m_pImpl->AddLog( rElementExistException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); throw; } catch( const io::IOException& rIOException ) { m_pImpl->AddLog( rIOException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); throw; } catch( const embed::StorageWrappedTargetException& rStorageWrappedTargetException ) { m_pImpl->AddLog( rStorageWrappedTargetException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); throw; } catch( const uno::RuntimeException& rRuntimeException ) { m_pImpl->AddLog( rRuntimeException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); throw; } catch( const uno::Exception& rException ) { m_pImpl->AddLog( rException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); uno::Any aCaught( ::cppu::getCaughtException() ); - throw embed::StorageWrappedTargetException( OSL_LOG_PREFIX "Can't rename element!", + throw embed::StorageWrappedTargetException( THROW_WHERE "Can't rename element!", uno::Reference< io::XInputStream >(), aCaught ); } @@ -3269,85 +3275,85 @@ void SAL_CALL OStorage::copyElementTo( const OUString& aElementName, if ( !m_pImpl ) { - ::package::StaticAddLog( OSL_LOG_PREFIX "Disposed!" ); - throw lang::DisposedException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); + ::package::StaticAddLog( THROW_WHERE "Disposed!" ); + throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() ); } if ( aElementName.isEmpty() || !::comphelper::OStorageHelper::IsValidZipEntryFileName( aElementName, sal_False ) || aNewName.isEmpty() || !::comphelper::OStorageHelper::IsValidZipEntryFileName( aNewName, sal_False ) ) - throw lang::IllegalArgumentException( OSL_LOG_PREFIX "Unexpected entry name syntax.", uno::Reference< uno::XInterface >(), 1 ); + throw lang::IllegalArgumentException( THROW_WHERE "Unexpected entry name syntax.", uno::Reference< uno::XInterface >(), 1 ); if ( !xDest.is() ) // || xDest == uno::Reference< uno::XInterface >( static_cast< OWeakObject* >( this ), uno::UNO_QUERY ) ) - throw lang::IllegalArgumentException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >(), 2 ); + throw lang::IllegalArgumentException( THROW_WHERE, uno::Reference< uno::XInterface >(), 2 ); if ( m_pData->m_nStorageType == embed::StorageFormats::OFOPXML && ( aElementName == "_rels" || aNewName == "_rels" ) ) - throw lang::IllegalArgumentException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >(), 0 ); // unacceptable element name + throw lang::IllegalArgumentException( THROW_WHERE, uno::Reference< uno::XInterface >(), 0 ); // unacceptable element name try { SotElement_Impl* pElement = m_pImpl->FindElement( aElementName ); if ( !pElement ) - throw container::NoSuchElementException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); + throw container::NoSuchElementException( THROW_WHERE, uno::Reference< uno::XInterface >() ); uno::Reference< XNameAccess > xNameAccess( xDest, uno::UNO_QUERY ); if ( !xNameAccess.is() ) - throw uno::RuntimeException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException( THROW_WHERE, uno::Reference< uno::XInterface >() ); if ( xNameAccess->hasByName( aNewName ) ) - throw container::ElementExistException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); + throw container::ElementExistException( THROW_WHERE, uno::Reference< uno::XInterface >() ); m_pImpl->CopyStorageElement( pElement, xDest, aNewName, sal_False ); } catch( const embed::InvalidStorageException& rInvalidStorageException ) { m_pImpl->AddLog( rInvalidStorageException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); throw; } catch( const lang::IllegalArgumentException& rIllegalArgumentException ) { m_pImpl->AddLog( rIllegalArgumentException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); throw; } catch( const container::NoSuchElementException& rNoSuchElementException ) { m_pImpl->AddLog( rNoSuchElementException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); throw; } catch( const container::ElementExistException& rElementExistException ) { m_pImpl->AddLog( rElementExistException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); throw; } catch( const embed::StorageWrappedTargetException& rStorageWrappedTargetException ) { m_pImpl->AddLog( rStorageWrappedTargetException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); throw; } catch( const io::IOException& rIOException ) { m_pImpl->AddLog( rIOException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); throw; } catch( const uno::RuntimeException& rRuntimeException ) { m_pImpl->AddLog( rRuntimeException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); throw; } catch( const uno::Exception& rException ) { m_pImpl->AddLog( rException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); uno::Any aCaught( ::cppu::getCaughtException() ); - throw embed::StorageWrappedTargetException( OSL_LOG_PREFIX "Can't copy element!", + throw embed::StorageWrappedTargetException( THROW_WHERE "Can't copy element!", uno::Reference< io::XInputStream >(), aCaught ); } @@ -3370,35 +3376,35 @@ void SAL_CALL OStorage::moveElementTo( const OUString& aElementName, if ( !m_pImpl ) { - ::package::StaticAddLog( OSL_LOG_PREFIX "Disposed!" ); - throw lang::DisposedException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); + ::package::StaticAddLog( THROW_WHERE "Disposed!" ); + throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() ); } if ( aElementName.isEmpty() || !::comphelper::OStorageHelper::IsValidZipEntryFileName( aElementName, sal_False ) || aNewName.isEmpty() || !::comphelper::OStorageHelper::IsValidZipEntryFileName( aNewName, sal_False ) ) - throw lang::IllegalArgumentException( OSL_LOG_PREFIX "Unexpected entry name syntax.", uno::Reference< uno::XInterface >(), 1 ); + throw lang::IllegalArgumentException( THROW_WHERE "Unexpected entry name syntax.", uno::Reference< uno::XInterface >(), 1 ); if ( !xDest.is() || xDest == uno::Reference< uno::XInterface >( static_cast< OWeakObject* >( this ), uno::UNO_QUERY ) ) - throw lang::IllegalArgumentException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >(), 2 ); + throw lang::IllegalArgumentException( THROW_WHERE, uno::Reference< uno::XInterface >(), 2 ); if ( m_pData->m_nStorageType == embed::StorageFormats::OFOPXML && ( aElementName == "_rels" || aNewName == "_rels" ) ) - throw lang::IllegalArgumentException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >(), 0 ); // unacceptable element name + throw lang::IllegalArgumentException( THROW_WHERE, uno::Reference< uno::XInterface >(), 0 ); // unacceptable element name if ( !( m_pImpl->m_nStorageMode & embed::ElementModes::WRITE ) ) - throw io::IOException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); // TODO: access denied + throw io::IOException( THROW_WHERE, uno::Reference< uno::XInterface >() ); // TODO: access denied try { SotElement_Impl* pElement = m_pImpl->FindElement( aElementName ); if ( !pElement ) - throw container::NoSuchElementException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); //??? + throw container::NoSuchElementException( THROW_WHERE, uno::Reference< uno::XInterface >() ); //??? uno::Reference< XNameAccess > xNameAccess( xDest, uno::UNO_QUERY ); if ( !xNameAccess.is() ) - throw uno::RuntimeException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException( THROW_WHERE, uno::Reference< uno::XInterface >() ); if ( xNameAccess->hasByName( aNewName ) ) - throw container::ElementExistException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); + throw container::ElementExistException( THROW_WHERE, uno::Reference< uno::XInterface >() ); m_pImpl->CopyStorageElement( pElement, xDest, aNewName, sal_False ); @@ -3410,52 +3416,52 @@ void SAL_CALL OStorage::moveElementTo( const OUString& aElementName, catch( const embed::InvalidStorageException& rInvalidStorageException ) { m_pImpl->AddLog( rInvalidStorageException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); throw; } catch( const lang::IllegalArgumentException& rIllegalArgumentException ) { m_pImpl->AddLog( rIllegalArgumentException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); throw; } catch( const container::NoSuchElementException& rNoSuchElementException ) { m_pImpl->AddLog( rNoSuchElementException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); throw; } catch( const container::ElementExistException& rElementExistException ) { m_pImpl->AddLog( rElementExistException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); throw; } catch( const embed::StorageWrappedTargetException& rStorageWrappedTargetException ) { m_pImpl->AddLog( rStorageWrappedTargetException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); throw; } catch( const io::IOException& rIOException ) { m_pImpl->AddLog( rIOException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); throw; } catch( const uno::RuntimeException& rRuntimeException ) { m_pImpl->AddLog( rRuntimeException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); throw; } catch( const uno::Exception& rException ) { m_pImpl->AddLog( rException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); uno::Any aCaught( ::cppu::getCaughtException() ); - throw embed::StorageWrappedTargetException( OSL_LOG_PREFIX "Can't move element!", + throw embed::StorageWrappedTargetException( THROW_WHERE "Can't move element!", uno::Reference< io::XInputStream >(), aCaught ); } @@ -3482,18 +3488,18 @@ uno::Reference< io::XStream > SAL_CALL OStorage::openEncryptedStream( if ( !m_pImpl ) { - ::package::StaticAddLog( OSL_LOG_PREFIX "Disposed!" ); - throw lang::DisposedException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); + ::package::StaticAddLog( THROW_WHERE "Disposed!" ); + throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() ); } if ( m_pData->m_nStorageType != embed::StorageFormats::PACKAGE ) packages::NoEncryptionException(); if ( ( nOpenMode & embed::ElementModes::WRITE ) && m_pData->m_bReadOnlyWrap ) - throw io::IOException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); // TODO: access denied + throw io::IOException( THROW_WHERE, uno::Reference< uno::XInterface >() ); // TODO: access denied if ( !aEncryptionData.getLength() ) - throw lang::IllegalArgumentException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >(), 3 ); + throw lang::IllegalArgumentException( THROW_WHERE, uno::Reference< uno::XInterface >(), 3 ); uno::Reference< io::XStream > xResult; try @@ -3509,7 +3515,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( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException( THROW_WHERE, uno::Reference< uno::XInterface >() ); MakeLinkToSubComponent_Impl( xStreamComponent ); } @@ -3517,52 +3523,52 @@ uno::Reference< io::XStream > SAL_CALL OStorage::openEncryptedStream( catch( const embed::InvalidStorageException& rInvalidStorageException ) { m_pImpl->AddLog( rInvalidStorageException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); throw; } catch( const lang::IllegalArgumentException& rIllegalArgumentException ) { m_pImpl->AddLog( rIllegalArgumentException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); throw; } catch( const packages::NoEncryptionException& rNoEncryptionException ) { m_pImpl->AddLog( rNoEncryptionException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); throw; } catch( const packages::WrongPasswordException& rWrongPasswordException ) { m_pImpl->AddLog( rWrongPasswordException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); throw; } catch( const embed::StorageWrappedTargetException& rStorageWrappedTargetException ) { m_pImpl->AddLog( rStorageWrappedTargetException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); throw; } catch( const io::IOException& rIOException ) { m_pImpl->AddLog( rIOException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); throw; } catch( const uno::RuntimeException& rRuntimeException ) { m_pImpl->AddLog( rRuntimeException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); throw; } catch( const uno::Exception& rException ) { m_pImpl->AddLog( rException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); uno::Any aCaught( ::cppu::getCaughtException() ); - throw embed::StorageWrappedTargetException( OSL_LOG_PREFIX "Can't open encrypted stream stream!", + throw embed::StorageWrappedTargetException( THROW_WHERE "Can't open encrypted stream stream!", uno::Reference< io::XInputStream >(), aCaught ); } @@ -3591,73 +3597,73 @@ uno::Reference< io::XStream > SAL_CALL OStorage::cloneEncryptedStream( if ( !m_pImpl ) { - ::package::StaticAddLog( OSL_LOG_PREFIX "Disposed!" ); - throw lang::DisposedException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); + ::package::StaticAddLog( THROW_WHERE "Disposed!" ); + throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() ); } if ( m_pData->m_nStorageType != embed::StorageFormats::PACKAGE ) packages::NoEncryptionException(); if ( !aEncryptionData.getLength() ) - throw lang::IllegalArgumentException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >(), 2 ); + throw lang::IllegalArgumentException( THROW_WHERE, uno::Reference< uno::XInterface >(), 2 ); try { uno::Reference< io::XStream > xResult; m_pImpl->CloneStreamElement( aStreamName, sal_True, aEncryptionData, xResult ); if ( !xResult.is() ) - throw uno::RuntimeException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException( THROW_WHERE, uno::Reference< uno::XInterface >() ); return xResult; } catch( const embed::InvalidStorageException& rInvalidStorageException ) { m_pImpl->AddLog( rInvalidStorageException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); throw; } catch( const lang::IllegalArgumentException& rIllegalArgumentException ) { m_pImpl->AddLog( rIllegalArgumentException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); throw; } catch( const packages::NoEncryptionException& rNoEncryptionException ) { m_pImpl->AddLog( rNoEncryptionException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); throw; } catch( const packages::WrongPasswordException& rWrongPasswordException ) { m_pImpl->AddLog( rWrongPasswordException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); throw; } catch( const io::IOException& rIOException ) { m_pImpl->AddLog( rIOException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); throw; } catch( const embed::StorageWrappedTargetException& rStorageWrappedTargetException ) { m_pImpl->AddLog( rStorageWrappedTargetException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); throw; } catch( const uno::RuntimeException& rRuntimeException ) { m_pImpl->AddLog( rRuntimeException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); throw; } catch( const uno::Exception& rException ) { m_pImpl->AddLog( rException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); uno::Any aCaught( ::cppu::getCaughtException() ); - throw embed::StorageWrappedTargetException( OSL_LOG_PREFIX "Can't clone encrypted stream!", + throw embed::StorageWrappedTargetException( THROW_WHERE "Can't clone encrypted stream!", uno::Reference< io::XInputStream >(), aCaught ); } @@ -3679,33 +3685,33 @@ uno::Reference< io::XInputStream > SAL_CALL OStorage::getPlainRawStreamElement( if ( !m_pImpl ) { - ::package::StaticAddLog( OSL_LOG_PREFIX "Disposed!" ); - throw lang::DisposedException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); + ::package::StaticAddLog( THROW_WHERE "Disposed!" ); + throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() ); } if ( m_pData->m_nStorageType == embed::StorageFormats::OFOPXML ) - throw uno::RuntimeException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); // the interface is not supported and must not be accessible + throw uno::RuntimeException( THROW_WHERE, uno::Reference< uno::XInterface >() ); // the interface is not supported and must not be accessible if ( sStreamName.isEmpty() || !::comphelper::OStorageHelper::IsValidZipEntryFileName( sStreamName, sal_False ) ) - throw lang::IllegalArgumentException( OSL_LOG_PREFIX "Unexpected entry name syntax.", uno::Reference< uno::XInterface >(), 1 ); + throw lang::IllegalArgumentException( THROW_WHERE "Unexpected entry name syntax.", uno::Reference< uno::XInterface >(), 1 ); uno::Reference < io::XInputStream > xTempIn; try { SotElement_Impl* pElement = m_pImpl->FindElement( sStreamName ); if ( !pElement ) - throw container::NoSuchElementException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); + throw container::NoSuchElementException( THROW_WHERE, uno::Reference< uno::XInterface >() ); if ( !pElement->m_pStream ) { m_pImpl->OpenSubStream( pElement ); if ( !pElement->m_pStream ) - throw io::IOException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); + throw io::IOException( THROW_WHERE, uno::Reference< uno::XInterface >() ); } uno::Reference< io::XInputStream > xRawInStream = pElement->m_pStream->GetPlainRawInStream(); if ( !xRawInStream.is() ) - throw io::IOException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); + throw io::IOException( THROW_WHERE, uno::Reference< uno::XInterface >() ); uno::Reference < io::XTempFile > xTempFile = io::TempFile::create( m_pImpl->GetComponentContext() ); uno::Reference < io::XOutputStream > xTempOut = xTempFile->getOutputStream(); @@ -3713,7 +3719,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( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); + throw io::IOException( THROW_WHERE, uno::Reference< uno::XInterface >() ); // Copy temporary file to a new one ::comphelper::OStorageHelper::CopyInputToOutput( xRawInStream, xTempOut ); @@ -3723,46 +3729,46 @@ uno::Reference< io::XInputStream > SAL_CALL OStorage::getPlainRawStreamElement( catch( const embed::InvalidStorageException& rInvalidStorageException ) { m_pImpl->AddLog( rInvalidStorageException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); throw; } catch( const lang::IllegalArgumentException& rIllegalArgumentException ) { m_pImpl->AddLog( rIllegalArgumentException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); throw; } catch( const container::NoSuchElementException& rNoSuchElementException ) { m_pImpl->AddLog( rNoSuchElementException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); throw; } catch( const embed::StorageWrappedTargetException& rStorageWrappedTargetException ) { m_pImpl->AddLog( rStorageWrappedTargetException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); throw; } catch( const io::IOException& rIOException ) { m_pImpl->AddLog( rIOException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); throw; } catch( const uno::RuntimeException& rRuntimeException ) { m_pImpl->AddLog( rRuntimeException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); throw; } catch( const uno::Exception& rException ) { m_pImpl->AddLog( rException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); uno::Any aCaught( ::cppu::getCaughtException() ); - throw embed::StorageWrappedTargetException( OSL_LOG_PREFIX "Can't get plain raw stream!", + throw embed::StorageWrappedTargetException( THROW_WHERE "Can't get plain raw stream!", uno::Reference< io::XInputStream >(), aCaught ); } @@ -3786,36 +3792,36 @@ uno::Reference< io::XInputStream > SAL_CALL OStorage::getRawEncrStreamElement( if ( !m_pImpl ) { - ::package::StaticAddLog( OSL_LOG_PREFIX "Disposed!" ); - throw lang::DisposedException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); + ::package::StaticAddLog( THROW_WHERE "Disposed!" ); + throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() ); } if ( m_pData->m_nStorageType != embed::StorageFormats::PACKAGE ) - throw packages::NoEncryptionException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); + throw packages::NoEncryptionException( THROW_WHERE, uno::Reference< uno::XInterface >() ); if ( sStreamName.isEmpty() || !::comphelper::OStorageHelper::IsValidZipEntryFileName( sStreamName, sal_False ) ) - throw lang::IllegalArgumentException( OSL_LOG_PREFIX "Unexpected entry name syntax.", uno::Reference< uno::XInterface >(), 1 ); + throw lang::IllegalArgumentException( THROW_WHERE "Unexpected entry name syntax.", uno::Reference< uno::XInterface >(), 1 ); uno::Reference < io::XInputStream > xTempIn; try { SotElement_Impl* pElement = m_pImpl->FindElement( sStreamName ); if ( !pElement ) - throw container::NoSuchElementException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); + throw container::NoSuchElementException( THROW_WHERE, uno::Reference< uno::XInterface >() ); if ( !pElement->m_pStream ) { m_pImpl->OpenSubStream( pElement ); if ( !pElement->m_pStream ) - throw io::IOException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); + throw io::IOException( THROW_WHERE, uno::Reference< uno::XInterface >() ); } if ( !pElement->m_pStream->IsEncrypted() ) - throw packages::NoEncryptionException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); + throw packages::NoEncryptionException( THROW_WHERE, uno::Reference< uno::XInterface >() ); uno::Reference< io::XInputStream > xRawInStream = pElement->m_pStream->GetRawInStream(); if ( !xRawInStream.is() ) - throw io::IOException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); + throw io::IOException( THROW_WHERE, uno::Reference< uno::XInterface >() ); uno::Reference < io::XTempFile > xTempFile = io::TempFile::create(m_pImpl->GetComponentContext()); uno::Reference < io::XOutputStream > xTempOut = xTempFile->getOutputStream(); @@ -3823,7 +3829,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( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); + throw io::IOException( THROW_WHERE, uno::Reference< uno::XInterface >() ); // Copy temporary file to a new one ::comphelper::OStorageHelper::CopyInputToOutput( xRawInStream, xTempOut ); @@ -3834,52 +3840,52 @@ uno::Reference< io::XInputStream > SAL_CALL OStorage::getRawEncrStreamElement( catch( const embed::InvalidStorageException& rInvalidStorageException ) { m_pImpl->AddLog( rInvalidStorageException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); throw; } catch( const lang::IllegalArgumentException& rIllegalArgumentException ) { m_pImpl->AddLog( rIllegalArgumentException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); throw; } catch( const packages::NoEncryptionException& rNoEncryptionException ) { m_pImpl->AddLog( rNoEncryptionException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); throw; } catch( const container::NoSuchElementException& rNoSuchElementException ) { m_pImpl->AddLog( rNoSuchElementException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); throw; } catch( const embed::StorageWrappedTargetException& rStorageWrappedTargetException ) { m_pImpl->AddLog( rStorageWrappedTargetException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); throw; } catch( const io::IOException& rIOException ) { m_pImpl->AddLog( rIOException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); throw; } catch( const uno::RuntimeException& rRuntimeException ) { m_pImpl->AddLog( rRuntimeException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); throw; } catch( const uno::Exception& rException ) { m_pImpl->AddLog( rException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); uno::Any aCaught( ::cppu::getCaughtException() ); - throw embed::StorageWrappedTargetException( OSL_LOG_PREFIX "Can't get raw stream!", + throw embed::StorageWrappedTargetException( THROW_WHERE "Can't get raw stream!", uno::Reference< io::XInputStream >(), aCaught ); } @@ -3903,79 +3909,79 @@ void SAL_CALL OStorage::insertRawEncrStreamElement( const OUString& aStreamName, if ( !m_pImpl ) { - ::package::StaticAddLog( OSL_LOG_PREFIX "Disposed!" ); - throw lang::DisposedException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); + ::package::StaticAddLog( THROW_WHERE "Disposed!" ); + throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() ); } if ( m_pData->m_nStorageType != embed::StorageFormats::PACKAGE ) - throw packages::NoEncryptionException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); + throw packages::NoEncryptionException( THROW_WHERE, uno::Reference< uno::XInterface >() ); if ( aStreamName.isEmpty() || !::comphelper::OStorageHelper::IsValidZipEntryFileName( aStreamName, sal_False ) ) - throw lang::IllegalArgumentException( OSL_LOG_PREFIX "Unexpected entry name syntax.", uno::Reference< uno::XInterface >(), 1 ); + throw lang::IllegalArgumentException( THROW_WHERE "Unexpected entry name syntax.", uno::Reference< uno::XInterface >(), 1 ); if ( !xInStream.is() ) - throw lang::IllegalArgumentException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >(), 2 ); + throw lang::IllegalArgumentException( THROW_WHERE, uno::Reference< uno::XInterface >(), 2 ); if ( !( m_pImpl->m_nStorageMode & embed::ElementModes::WRITE ) ) - throw io::IOException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); // TODO: access denied + throw io::IOException( THROW_WHERE, uno::Reference< uno::XInterface >() ); // TODO: access denied try { SotElement_Impl* pElement = m_pImpl->FindElement( aStreamName ); if ( pElement ) - throw container::ElementExistException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); + throw container::ElementExistException( THROW_WHERE, uno::Reference< uno::XInterface >() ); m_pImpl->InsertRawStream( aStreamName, xInStream ); } catch( const embed::InvalidStorageException& rInvalidStorageException ) { m_pImpl->AddLog( rInvalidStorageException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); throw; } catch( const lang::IllegalArgumentException& rIllegalArgumentException ) { m_pImpl->AddLog( rIllegalArgumentException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); throw; } catch( const packages::NoRawFormatException& rNoRawFormatException ) { m_pImpl->AddLog( rNoRawFormatException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); throw; } catch( const container::ElementExistException& rElementExistException ) { m_pImpl->AddLog( rElementExistException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); throw; } catch( const embed::StorageWrappedTargetException& rStorageWrappedTargetException ) { m_pImpl->AddLog( rStorageWrappedTargetException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); throw; } catch( const io::IOException& rIOException ) { m_pImpl->AddLog( rIOException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); throw; } catch( const uno::RuntimeException& rRuntimeException ) { m_pImpl->AddLog( rRuntimeException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); throw; } catch( const uno::Exception& rException ) { m_pImpl->AddLog( rException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); uno::Any aCaught( ::cppu::getCaughtException() ); - throw embed::StorageWrappedTargetException( OSL_LOG_PREFIX "Can't insert raw stream!", + throw embed::StorageWrappedTargetException( THROW_WHERE "Can't insert raw stream!", uno::Reference< io::XInputStream >(), aCaught ); } @@ -3998,12 +4004,12 @@ void SAL_CALL OStorage::commit() if ( !m_pImpl ) { - ::package::StaticAddLog( OSL_LOG_PREFIX "Disposed!" ); - throw lang::DisposedException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); + ::package::StaticAddLog( THROW_WHERE "Disposed!" ); + throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() ); } if ( m_pData->m_bReadOnlyWrap ) - throw io::IOException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); // TODO: access_denied + throw io::IOException( THROW_WHERE, uno::Reference< uno::XInterface >() ); // TODO: access_denied m_pImpl->Commit(); // the root storage initiates the storing to source @@ -4014,28 +4020,28 @@ void SAL_CALL OStorage::commit() catch( const io::IOException& rIOException ) { m_pImpl->AddLog( rIOException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); throw; } catch( const embed::StorageWrappedTargetException& rStorageWrappedTargetException ) { m_pImpl->AddLog( rStorageWrappedTargetException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); throw; } catch( const uno::RuntimeException& rRuntimeException ) { m_pImpl->AddLog( rRuntimeException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); throw; } catch( const uno::Exception& rException ) { m_pImpl->AddLog( rException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); uno::Any aCaught( ::cppu::getCaughtException() ); - throw embed::StorageWrappedTargetException( OSL_LOG_PREFIX "Problems on commit!", + throw embed::StorageWrappedTargetException( THROW_WHERE "Problems on commit!", uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >( this ) ), aCaught ); } @@ -4062,8 +4068,8 @@ void SAL_CALL OStorage::revert() if ( !m_pImpl ) { - ::package::StaticAddLog( OSL_LOG_PREFIX "Disposed!" ); - throw lang::DisposedException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); + ::package::StaticAddLog( THROW_WHERE "Disposed!" ); + throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() ); } for ( SotElementList_Impl::iterator pElementIter = m_pImpl->m_aChildrenList.begin(); @@ -4073,7 +4079,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( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); // TODO: access denied + throw io::IOException( THROW_WHERE, uno::Reference< uno::XInterface >() ); // TODO: access denied } if ( m_pData->m_bReadOnlyWrap || !m_pImpl->m_bListCreated ) @@ -4087,28 +4093,28 @@ void SAL_CALL OStorage::revert() catch( const io::IOException& rIOException ) { m_pImpl->AddLog( rIOException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); throw; } catch( const embed::StorageWrappedTargetException& rStorageWrappedTargetException ) { m_pImpl->AddLog( rStorageWrappedTargetException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); throw; } catch( const uno::RuntimeException& rRuntimeException ) { m_pImpl->AddLog( rRuntimeException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); throw; } catch( const uno::Exception& rException ) { m_pImpl->AddLog( rException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); uno::Any aCaught( ::cppu::getCaughtException() ); - throw embed::StorageWrappedTargetException( OSL_LOG_PREFIX "Problems on revert!", + throw embed::StorageWrappedTargetException( THROW_WHERE "Problems on revert!", uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >( this ) ), aCaught ); } @@ -4127,8 +4133,8 @@ void SAL_CALL OStorage::addTransactionListener( const uno::Reference< embed::XTr if ( !m_pImpl ) { - ::package::StaticAddLog( OSL_LOG_PREFIX "Disposed!" ); - throw lang::DisposedException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); + ::package::StaticAddLog( THROW_WHERE "Disposed!" ); + throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() ); } m_pData->m_aListenersContainer.addInterface( ::getCppuType((const uno::Reference< embed::XTransactionListener >*)0), @@ -4142,8 +4148,8 @@ void SAL_CALL OStorage::removeTransactionListener( const uno::Reference< embed:: if ( !m_pImpl ) { - ::package::StaticAddLog( OSL_LOG_PREFIX "Disposed!" ); - throw lang::DisposedException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); + ::package::StaticAddLog( THROW_WHERE "Disposed!" ); + throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() ); } m_pData->m_aListenersContainer.removeInterface( ::getCppuType((const uno::Reference< embed::XTransactionListener >*)0), @@ -4162,8 +4168,8 @@ sal_Bool SAL_CALL OStorage::isModified() if ( !m_pImpl ) { - ::package::StaticAddLog( OSL_LOG_PREFIX "Disposed!" ); - throw lang::DisposedException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); + ::package::StaticAddLog( THROW_WHERE "Disposed!" ); + throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() ); } return m_pImpl->m_bIsModified; @@ -4177,12 +4183,12 @@ void SAL_CALL OStorage::setModified( sal_Bool bModified ) if ( !m_pImpl ) { - ::package::StaticAddLog( OSL_LOG_PREFIX "Disposed!" ); - throw lang::DisposedException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); + ::package::StaticAddLog( THROW_WHERE "Disposed!" ); + throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() ); } if ( m_pData->m_bReadOnlyWrap ) - throw beans::PropertyVetoException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); // TODO: access denied + throw beans::PropertyVetoException( THROW_WHERE, uno::Reference< uno::XInterface >() ); // TODO: access denied if ( m_pImpl->m_bIsModified != bModified ) m_pImpl->m_bIsModified = bModified; @@ -4203,8 +4209,8 @@ void SAL_CALL OStorage::addModifyListener( if ( !m_pImpl ) { - ::package::StaticAddLog( OSL_LOG_PREFIX "Disposed!" ); - throw lang::DisposedException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); + ::package::StaticAddLog( THROW_WHERE "Disposed!" ); + throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() ); } osl_atomic_increment( &m_pImpl->m_nModifiedListenerCount ); @@ -4220,8 +4226,8 @@ void SAL_CALL OStorage::removeModifyListener( if ( !m_pImpl ) { - ::package::StaticAddLog( OSL_LOG_PREFIX "Disposed!" ); - throw lang::DisposedException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); + ::package::StaticAddLog( THROW_WHERE "Disposed!" ); + throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() ); } osl_atomic_decrement( &m_pImpl->m_nModifiedListenerCount ); @@ -4242,22 +4248,22 @@ uno::Any SAL_CALL OStorage::getByName( const OUString& aName ) if ( !m_pImpl ) { - ::package::StaticAddLog( OSL_LOG_PREFIX "Disposed!" ); - throw lang::DisposedException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); + ::package::StaticAddLog( THROW_WHERE "Disposed!" ); + throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() ); } if ( aName.isEmpty() || !::comphelper::OStorageHelper::IsValidZipEntryFileName( aName, sal_False ) ) - throw lang::IllegalArgumentException( OSL_LOG_PREFIX "Unexpected entry name syntax.", uno::Reference< uno::XInterface >(), 1 ); + throw lang::IllegalArgumentException( THROW_WHERE "Unexpected entry name syntax.", uno::Reference< uno::XInterface >(), 1 ); if ( m_pData->m_nStorageType == embed::StorageFormats::OFOPXML && aName == "_rels" ) - throw lang::IllegalArgumentException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >(), 1 ); // unacceptable element name + throw lang::IllegalArgumentException( THROW_WHERE, uno::Reference< uno::XInterface >(), 1 ); // unacceptable element name uno::Any aResult; try { SotElement_Impl* pElement = m_pImpl->FindElement( aName ); if ( !pElement ) - throw container::NoSuchElementException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); + throw container::NoSuchElementException( THROW_WHERE, uno::Reference< uno::XInterface >() ); if ( pElement->m_bIsStorage ) aResult <<= openStorageElement( aName, embed::ElementModes::READ ); @@ -4267,28 +4273,28 @@ uno::Any SAL_CALL OStorage::getByName( const OUString& aName ) catch( const container::NoSuchElementException& rNoSuchElementException ) { m_pImpl->AddLog( rNoSuchElementException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); throw; } catch( const lang::WrappedTargetException& rWrappedTargetException ) { m_pImpl->AddLog( rWrappedTargetException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); throw; } catch( const uno::RuntimeException& rRuntimeException ) { m_pImpl->AddLog( rRuntimeException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); throw; } catch( const uno::Exception& rException ) { m_pImpl->AddLog( rException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); uno::Any aCaught( ::cppu::getCaughtException() ); - throw lang::WrappedTargetException( OSL_LOG_PREFIX "Can not open storage!\n", + throw lang::WrappedTargetException( THROW_WHERE "Can not open storage!\n", uno::Reference< uno::XInterface >( static_cast< OWeakObject* >( this ), uno::UNO_QUERY ), aCaught ); @@ -4306,8 +4312,8 @@ uno::Sequence< OUString > SAL_CALL OStorage::getElementNames() if ( !m_pImpl ) { - ::package::StaticAddLog( OSL_LOG_PREFIX "Disposed!" ); - throw lang::DisposedException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); + ::package::StaticAddLog( THROW_WHERE "Disposed!" ); + throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() ); } try @@ -4317,16 +4323,16 @@ uno::Sequence< OUString > SAL_CALL OStorage::getElementNames() catch( const uno::RuntimeException& rRuntimeException ) { m_pImpl->AddLog( rRuntimeException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); throw; } catch ( const uno::Exception& rException ) { m_pImpl->AddLog( rException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); uno::Any aCaught( ::cppu::getCaughtException() ); - throw lang::WrappedTargetRuntimeException( OSL_LOG_PREFIX "Can not open storage!\n", + throw lang::WrappedTargetRuntimeException( THROW_WHERE "Can not open storage!\n", uno::Reference< uno::XInterface >( static_cast< OWeakObject* >( this ), uno::UNO_QUERY ), aCaught ); @@ -4342,8 +4348,8 @@ sal_Bool SAL_CALL OStorage::hasByName( const OUString& aName ) if ( !m_pImpl ) { - ::package::StaticAddLog( OSL_LOG_PREFIX "Disposed!" ); - throw lang::DisposedException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); + ::package::StaticAddLog( THROW_WHERE "Disposed!" ); + throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() ); } if ( aName.isEmpty() ) @@ -4360,16 +4366,16 @@ sal_Bool SAL_CALL OStorage::hasByName( const OUString& aName ) catch( const uno::RuntimeException& rRuntimeException ) { m_pImpl->AddLog( rRuntimeException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); throw; } catch ( const uno::Exception& rException ) { m_pImpl->AddLog( rException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); uno::Any aCaught( ::cppu::getCaughtException() ); - throw lang::WrappedTargetRuntimeException( OSL_LOG_PREFIX "Can not open storage!\n", + throw lang::WrappedTargetRuntimeException( THROW_WHERE "Can not open storage!\n", uno::Reference< uno::XInterface >( static_cast< OWeakObject* >( this ), uno::UNO_QUERY ), aCaught ); @@ -4385,8 +4391,8 @@ uno::Type SAL_CALL OStorage::getElementType() if ( !m_pImpl ) { - ::package::StaticAddLog( OSL_LOG_PREFIX "Disposed!" ); - throw lang::DisposedException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); + ::package::StaticAddLog( THROW_WHERE "Disposed!" ); + throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() ); } // it is a multitype container @@ -4402,8 +4408,8 @@ sal_Bool SAL_CALL OStorage::hasElements() if ( !m_pImpl ) { - ::package::StaticAddLog( OSL_LOG_PREFIX "Disposed!" ); - throw lang::DisposedException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); + ::package::StaticAddLog( THROW_WHERE "Disposed!" ); + throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() ); } try @@ -4413,16 +4419,16 @@ sal_Bool SAL_CALL OStorage::hasElements() catch( const uno::RuntimeException& rRuntimeException ) { m_pImpl->AddLog( rRuntimeException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); throw; } catch( const uno::Exception& rException ) { m_pImpl->AddLog( rException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); uno::Any aCaught( ::cppu::getCaughtException() ); - throw lang::WrappedTargetRuntimeException( OSL_LOG_PREFIX "Can not open storage!\n", + throw lang::WrappedTargetRuntimeException( THROW_WHERE "Can not open storage!\n", uno::Reference< uno::XInterface >( static_cast< OWeakObject* >( this ), uno::UNO_QUERY ), aCaught ); @@ -4437,8 +4443,8 @@ void SAL_CALL OStorage::dispose() if ( !m_pImpl ) { - ::package::StaticAddLog( OSL_LOG_PREFIX "Disposed!" ); - throw lang::DisposedException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); + ::package::StaticAddLog( THROW_WHERE "Disposed!" ); + throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() ); } try @@ -4448,16 +4454,16 @@ void SAL_CALL OStorage::dispose() catch( const uno::RuntimeException& rRuntimeException ) { m_pImpl->AddLog( rRuntimeException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); throw; } catch( const uno::Exception& rException ) { m_pImpl->AddLog( rException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); uno::Any aCaught( ::cppu::getCaughtException() ); - throw lang::WrappedTargetRuntimeException( OSL_LOG_PREFIX "Can not open storage!\n", + throw lang::WrappedTargetRuntimeException( THROW_WHERE "Can not open storage!\n", uno::Reference< uno::XInterface >( static_cast< OWeakObject* >( this ), uno::UNO_QUERY ), aCaught ); @@ -4472,8 +4478,8 @@ void SAL_CALL OStorage::addEventListener( if ( !m_pImpl ) { - ::package::StaticAddLog( OSL_LOG_PREFIX "Disposed!" ); - throw lang::DisposedException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); + ::package::StaticAddLog( THROW_WHERE "Disposed!" ); + throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() ); } m_pData->m_aListenersContainer.addInterface( @@ -4488,8 +4494,8 @@ void SAL_CALL OStorage::removeEventListener( if ( !m_pImpl ) { - ::package::StaticAddLog( OSL_LOG_PREFIX "Disposed!" ); - throw lang::DisposedException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); + ::package::StaticAddLog( THROW_WHERE "Disposed!" ); + throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() ); } m_pData->m_aListenersContainer.removeInterface( @@ -4516,12 +4522,12 @@ void SAL_CALL OStorage::removeEncryption() if ( !m_pImpl ) { - ::package::StaticAddLog( OSL_LOG_PREFIX "Disposed!" ); - throw lang::DisposedException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); + ::package::StaticAddLog( THROW_WHERE "Disposed!" ); + throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() ); } if ( m_pData->m_nStorageType != embed::StorageFormats::PACKAGE ) - throw uno::RuntimeException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); // the interface must be visible only for package storage + throw uno::RuntimeException( THROW_WHERE, uno::Reference< uno::XInterface >() ); // 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 ) @@ -4532,16 +4538,16 @@ void SAL_CALL OStorage::removeEncryption() catch ( const uno::RuntimeException& rRuntimeException ) { m_pImpl->AddLog( rRuntimeException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); throw; } catch ( const uno::Exception& rException ) { m_pImpl->AddLog( rException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); uno::Any aCaught( ::cppu::getCaughtException() ); - throw lang::WrappedTargetRuntimeException( OSL_LOG_PREFIX "Can not open package!\n", + throw lang::WrappedTargetRuntimeException( THROW_WHERE "Can not open package!\n", uno::Reference< uno::XInterface >( static_cast< OWeakObject* >( this ), uno::UNO_QUERY ), aCaught ); @@ -4562,7 +4568,7 @@ void SAL_CALL OStorage::removeEncryption() catch( const uno::RuntimeException& rRException ) { m_pImpl->AddLog( rRException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); SAL_WARN( "package.xstor", "The call must not fail, it is pretty simple!" ); throw; @@ -4570,10 +4576,10 @@ void SAL_CALL OStorage::removeEncryption() catch( const uno::Exception& rException ) { m_pImpl->AddLog( rException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); SAL_WARN( "package.xstor", "The call must not fail, it is pretty simple!" ); - throw io::IOException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); + throw io::IOException( THROW_WHERE, uno::Reference< uno::XInterface >() ); } } } @@ -4590,15 +4596,15 @@ void SAL_CALL OStorage::setEncryptionData( const uno::Sequence< beans::NamedValu if ( !m_pImpl ) { - ::package::StaticAddLog( OSL_LOG_PREFIX "Disposed!" ); - throw lang::DisposedException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); + ::package::StaticAddLog( THROW_WHERE "Disposed!" ); + throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() ); } if ( m_pData->m_nStorageType != embed::StorageFormats::PACKAGE ) - throw uno::RuntimeException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); // the interface must be visible only for package storage + throw uno::RuntimeException( THROW_WHERE, uno::Reference< uno::XInterface >() ); // the interface must be visible only for package storage if ( !aEncryptionData.getLength() ) - throw uno::RuntimeException( OSL_LOG_PREFIX "Unexpected empty encryption data!", uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException( THROW_WHERE "Unexpected empty encryption data!", uno::Reference< uno::XInterface >() ); SAL_WARN_IF( !m_pData->m_bIsRoot, "package.xstor", "setEncryptionData() method is not available for nonroot storages!" ); if ( m_pData->m_bIsRoot ) @@ -4609,16 +4615,16 @@ void SAL_CALL OStorage::setEncryptionData( const uno::Sequence< beans::NamedValu catch ( const uno::RuntimeException& rRuntimeException ) { m_pImpl->AddLog( rRuntimeException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); throw; } catch ( const uno::Exception& rException ) { m_pImpl->AddLog( rException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); uno::Any aCaught( ::cppu::getCaughtException() ); - throw lang::WrappedTargetRuntimeException( OSL_LOG_PREFIX "Can not open package!\n", + throw lang::WrappedTargetRuntimeException( THROW_WHERE "Can not open package!\n", uno::Reference< uno::XInterface >( static_cast< OWeakObject* >( this ), uno::UNO_QUERY ), aCaught ); } @@ -4636,9 +4642,9 @@ void SAL_CALL OStorage::setEncryptionData( const uno::Sequence< beans::NamedValu catch( const uno::Exception& rException ) { m_pImpl->AddLog( rException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); - throw io::IOException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); + throw io::IOException( THROW_WHERE, uno::Reference< uno::XInterface >() ); } } } @@ -4662,15 +4668,15 @@ void SAL_CALL OStorage::setEncryptionAlgorithms( const uno::Sequence< beans::Nam if ( !m_pImpl ) { - ::package::StaticAddLog( OSL_LOG_PREFIX "Disposed!" ); - throw lang::DisposedException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); + ::package::StaticAddLog( THROW_WHERE "Disposed!" ); + throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() ); } if ( m_pData->m_nStorageType != embed::StorageFormats::PACKAGE ) - throw uno::RuntimeException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); // the interface must be visible only for package storage + throw uno::RuntimeException( THROW_WHERE, uno::Reference< uno::XInterface >() ); // the interface must be visible only for package storage if ( !aAlgorithms.getLength() ) - throw uno::RuntimeException( OSL_LOG_PREFIX "Unexpected empty encryption algorithms list!", uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException( THROW_WHERE "Unexpected empty encryption algorithms list!", uno::Reference< uno::XInterface >() ); SAL_WARN_IF( !m_pData->m_bIsRoot, "package.xstor", "setEncryptionAlgorithms() method is not available for nonroot storages!" ); if ( m_pData->m_bIsRoot ) @@ -4681,16 +4687,16 @@ void SAL_CALL OStorage::setEncryptionAlgorithms( const uno::Sequence< beans::Nam catch ( const uno::RuntimeException& aRuntimeException ) { m_pImpl->AddLog( aRuntimeException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); throw; } catch ( const uno::Exception& aException ) { m_pImpl->AddLog( aException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); uno::Any aCaught( ::cppu::getCaughtException() ); - throw lang::WrappedTargetException( OSL_LOG_PREFIX "Can not open package!\n", + throw lang::WrappedTargetException( THROW_WHERE "Can not open package!\n", uno::Reference< uno::XInterface >( static_cast< OWeakObject* >( this ), uno::UNO_QUERY ), aCaught ); @@ -4705,15 +4711,15 @@ void SAL_CALL OStorage::setEncryptionAlgorithms( const uno::Sequence< beans::Nam catch ( const uno::RuntimeException& aRuntimeException ) { m_pImpl->AddLog( aRuntimeException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); throw; } catch( const uno::Exception& aException ) { m_pImpl->AddLog( aException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); - throw io::IOException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); + throw io::IOException( THROW_WHERE, uno::Reference< uno::XInterface >() ); } } } @@ -4727,12 +4733,12 @@ uno::Sequence< beans::NamedValue > SAL_CALL OStorage::getEncryptionAlgorithms() if ( !m_pImpl ) { - ::package::StaticAddLog( OSL_LOG_PREFIX "Disposed!" ); - throw lang::DisposedException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); + ::package::StaticAddLog( THROW_WHERE "Disposed!" ); + throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() ); } if ( m_pData->m_nStorageType != embed::StorageFormats::PACKAGE ) - throw uno::RuntimeException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); // the interface must be visible only for package storage + throw uno::RuntimeException( THROW_WHERE, uno::Reference< uno::XInterface >() ); // 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!" ); @@ -4744,16 +4750,16 @@ uno::Sequence< beans::NamedValue > SAL_CALL OStorage::getEncryptionAlgorithms() catch ( const uno::RuntimeException& aRuntimeException ) { m_pImpl->AddLog( aRuntimeException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); throw; } catch ( const uno::Exception& aException ) { m_pImpl->AddLog( aException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); uno::Any aCaught( ::cppu::getCaughtException() ); - throw lang::WrappedTargetException( OSL_LOG_PREFIX "Can not open package!\n", + throw lang::WrappedTargetException( THROW_WHERE "Can not open package!\n", uno::Reference< uno::XInterface >( static_cast< OWeakObject* >( this ), uno::UNO_QUERY ), aCaught ); @@ -4767,15 +4773,15 @@ uno::Sequence< beans::NamedValue > SAL_CALL OStorage::getEncryptionAlgorithms() catch ( const uno::RuntimeException& aRuntimeException ) { m_pImpl->AddLog( aRuntimeException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); throw; } catch( const uno::Exception& aException ) { m_pImpl->AddLog( aException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); - throw io::IOException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); + throw io::IOException( THROW_WHERE, uno::Reference< uno::XInterface >() ); } } @@ -4791,8 +4797,8 @@ uno::Reference< beans::XPropertySetInfo > SAL_CALL OStorage::getPropertySetInfo( if ( !m_pImpl ) { - ::package::StaticAddLog( OSL_LOG_PREFIX "Disposed!" ); - throw lang::DisposedException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); + ::package::StaticAddLog( THROW_WHERE "Disposed!" ); + throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() ); } //TODO: @@ -4812,8 +4818,8 @@ void SAL_CALL OStorage::setPropertyValue( const OUString& aPropertyName, const u if ( !m_pImpl ) { - ::package::StaticAddLog( OSL_LOG_PREFIX "Disposed!" ); - throw lang::DisposedException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); + ::package::StaticAddLog( THROW_WHERE "Disposed!" ); + throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() ); } //TODO: think about interaction handler @@ -4822,10 +4828,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( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); // TODO: Access denied + throw io::IOException( THROW_WHERE, uno::Reference< uno::XInterface >() ); // TODO: Access denied if ( m_pData->m_nStorageType == embed::StorageFormats::ZIP ) - throw beans::UnknownPropertyException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); + throw beans::UnknownPropertyException( THROW_WHERE, uno::Reference< uno::XInterface >() ); else if ( m_pData->m_nStorageType == embed::StorageFormats::PACKAGE ) { if ( aPropertyName == "MediaType" ) @@ -4855,9 +4861,9 @@ void SAL_CALL OStorage::setPropertyValue( const OUString& aPropertyName, const u || aPropertyName == "RepairPackage" ) ) || aPropertyName == "IsRoot" || aPropertyName == MEDIATYPE_FALLBACK_USED_PROPERTY ) - throw beans::PropertyVetoException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); + throw beans::PropertyVetoException( THROW_WHERE, uno::Reference< uno::XInterface >() ); else - throw beans::UnknownPropertyException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); + throw beans::UnknownPropertyException( THROW_WHERE, uno::Reference< uno::XInterface >() ); } else if ( m_pData->m_nStorageType == embed::StorageFormats::OFOPXML ) { @@ -4872,7 +4878,7 @@ void SAL_CALL OStorage::setPropertyValue( const OUString& aPropertyName, const u // currently this is an internal property that is used for optimization // and the stream must support XSeekable interface // TODO/LATER: in future it can be changed if property is used from outside - throw lang::IllegalArgumentException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >(), 0 ); + throw lang::IllegalArgumentException( THROW_WHERE, uno::Reference< uno::XInterface >(), 0 ); } m_pImpl->m_xNewRelInfoStream = xInRelStream; @@ -4882,7 +4888,7 @@ void SAL_CALL OStorage::setPropertyValue( const OUString& aPropertyName, const u m_pImpl->m_bIsModified = sal_True; } else - throw lang::IllegalArgumentException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >(), 0 ); + throw lang::IllegalArgumentException( THROW_WHERE, uno::Reference< uno::XInterface >(), 0 ); } else if ( aPropertyName == "RelationsInfo" ) { @@ -4894,16 +4900,16 @@ void SAL_CALL OStorage::setPropertyValue( const OUString& aPropertyName, const u m_pImpl->m_bIsModified = sal_True; } else - throw lang::IllegalArgumentException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >(), 0 ); + throw lang::IllegalArgumentException( THROW_WHERE, uno::Reference< uno::XInterface >(), 0 ); } else if ( ( m_pData->m_bIsRoot && ( aPropertyName == "URL" || aPropertyName == "RepairPackage") ) || aPropertyName == "IsRoot" ) - throw beans::PropertyVetoException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); + throw beans::PropertyVetoException( THROW_WHERE, uno::Reference< uno::XInterface >() ); else - throw beans::UnknownPropertyException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); + throw beans::UnknownPropertyException( THROW_WHERE, uno::Reference< uno::XInterface >() ); } else - throw beans::UnknownPropertyException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); + throw beans::UnknownPropertyException( THROW_WHERE, uno::Reference< uno::XInterface >() ); BroadcastModifiedIfNecessary(); } @@ -4919,8 +4925,8 @@ uno::Any SAL_CALL OStorage::getPropertyValue( const OUString& aPropertyName ) if ( !m_pImpl ) { - ::package::StaticAddLog( OSL_LOG_PREFIX "Disposed!" ); - throw lang::DisposedException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); + ::package::StaticAddLog( THROW_WHERE "Disposed!" ); + throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() ); } if ( m_pData->m_nStorageType == embed::StorageFormats::PACKAGE @@ -4933,13 +4939,13 @@ uno::Any SAL_CALL OStorage::getPropertyValue( const OUString& aPropertyName ) catch ( const uno::RuntimeException& rRuntimeException ) { m_pImpl->AddLog( rRuntimeException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); throw; } catch ( const uno::Exception& rException ) { m_pImpl->AddLog( rException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); uno::Any aCaught( ::cppu::getCaughtException() ); throw lang::WrappedTargetException( @@ -4988,23 +4994,23 @@ 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( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException( THROW_WHERE, uno::Reference< uno::XInterface >() ); return xPackPropSet->getPropertyValue( aPropertyName ); } catch ( const uno::RuntimeException& rRuntimeException ) { m_pImpl->AddLog( rRuntimeException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); throw; } catch ( const uno::Exception& rException ) { m_pImpl->AddLog( rException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); uno::Any aCaught( ::cppu::getCaughtException() ); - throw lang::WrappedTargetException( OSL_LOG_PREFIX "Can not open package!\n", + throw lang::WrappedTargetException( THROW_WHERE "Can not open package!\n", uno::Reference< uno::XInterface >( static_cast< OWeakObject* >( this ), uno::UNO_QUERY ), aCaught ); @@ -5012,7 +5018,7 @@ uno::Any SAL_CALL OStorage::getPropertyValue( const OUString& aPropertyName ) } } - throw beans::UnknownPropertyException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); + throw beans::UnknownPropertyException( THROW_WHERE, uno::Reference< uno::XInterface >() ); } void SAL_CALL OStorage::addPropertyChangeListener( @@ -5026,8 +5032,8 @@ void SAL_CALL OStorage::addPropertyChangeListener( if ( !m_pImpl ) { - ::package::StaticAddLog( OSL_LOG_PREFIX "Disposed!" ); - throw lang::DisposedException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); + ::package::StaticAddLog( THROW_WHERE "Disposed!" ); + throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() ); } //TODO: @@ -5044,8 +5050,8 @@ void SAL_CALL OStorage::removePropertyChangeListener( if ( !m_pImpl ) { - ::package::StaticAddLog( OSL_LOG_PREFIX "Disposed!" ); - throw lang::DisposedException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); + ::package::StaticAddLog( THROW_WHERE "Disposed!" ); + throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() ); } //TODO: @@ -5062,8 +5068,8 @@ void SAL_CALL OStorage::addVetoableChangeListener( if ( !m_pImpl ) { - ::package::StaticAddLog( OSL_LOG_PREFIX "Disposed!" ); - throw lang::DisposedException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); + ::package::StaticAddLog( THROW_WHERE "Disposed!" ); + throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() ); } //TODO: @@ -5080,8 +5086,8 @@ void SAL_CALL OStorage::removeVetoableChangeListener( if ( !m_pImpl ) { - ::package::StaticAddLog( OSL_LOG_PREFIX "Disposed!" ); - throw lang::DisposedException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); + ::package::StaticAddLog( THROW_WHERE "Disposed!" ); + throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() ); } //TODO: @@ -5099,12 +5105,12 @@ sal_Bool SAL_CALL OStorage::hasByID( const OUString& sID ) if ( !m_pImpl ) { - ::package::StaticAddLog( OSL_LOG_PREFIX "Disposed!" ); - throw lang::DisposedException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); + ::package::StaticAddLog( THROW_WHERE "Disposed!" ); + throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() ); } if ( m_pData->m_nStorageType != embed::StorageFormats::OFOPXML ) - throw uno::RuntimeException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException( THROW_WHERE, uno::Reference< uno::XInterface >() ); try { @@ -5114,7 +5120,7 @@ sal_Bool SAL_CALL OStorage::hasByID( const OUString& sID ) catch( const container::NoSuchElementException& rNoSuchElementException ) { m_pImpl->AddLog( rNoSuchElementException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Quiet exception" ); + m_pImpl->AddLog( THROW_WHERE "Quiet exception" ); } return sal_False; @@ -5129,12 +5135,12 @@ OUString SAL_CALL OStorage::getTargetByID( const OUString& sID ) if ( !m_pImpl ) { - ::package::StaticAddLog( OSL_LOG_PREFIX "Disposed!" ); - throw lang::DisposedException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); + ::package::StaticAddLog( THROW_WHERE "Disposed!" ); + throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() ); } if ( m_pData->m_nStorageType != embed::StorageFormats::OFOPXML ) - throw uno::RuntimeException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException( THROW_WHERE, uno::Reference< uno::XInterface >() ); uno::Sequence< beans::StringPair > aSeq = getRelationshipByID( sID ); for ( sal_Int32 nInd = 0; nInd < aSeq.getLength(); nInd++ ) @@ -5153,12 +5159,12 @@ OUString SAL_CALL OStorage::getTypeByID( const OUString& sID ) if ( !m_pImpl ) { - ::package::StaticAddLog( OSL_LOG_PREFIX "Disposed!" ); - throw lang::DisposedException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); + ::package::StaticAddLog( THROW_WHERE "Disposed!" ); + throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() ); } if ( m_pData->m_nStorageType != embed::StorageFormats::OFOPXML ) - throw uno::RuntimeException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException( THROW_WHERE, uno::Reference< uno::XInterface >() ); uno::Sequence< beans::StringPair > aSeq = getRelationshipByID( sID ); for ( sal_Int32 nInd = 0; nInd < aSeq.getLength(); nInd++ ) @@ -5177,12 +5183,12 @@ uno::Sequence< beans::StringPair > SAL_CALL OStorage::getRelationshipByID( cons if ( !m_pImpl ) { - ::package::StaticAddLog( OSL_LOG_PREFIX "Disposed!" ); - throw lang::DisposedException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); + ::package::StaticAddLog( THROW_WHERE "Disposed!" ); + throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() ); } if ( m_pData->m_nStorageType != embed::StorageFormats::OFOPXML ) - throw uno::RuntimeException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException( THROW_WHERE, uno::Reference< uno::XInterface >() ); // TODO/LATER: in future the unification of the ID could be checked uno::Sequence< uno::Sequence< beans::StringPair > > aSeq = getAllRelationships(); @@ -5195,7 +5201,7 @@ uno::Sequence< beans::StringPair > SAL_CALL OStorage::getRelationshipByID( cons break; } - throw container::NoSuchElementException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); + throw container::NoSuchElementException( THROW_WHERE, uno::Reference< uno::XInterface >() ); } uno::Sequence< uno::Sequence< beans::StringPair > > SAL_CALL OStorage::getRelationshipsByType( const OUString& sType ) @@ -5206,12 +5212,12 @@ uno::Sequence< uno::Sequence< beans::StringPair > > SAL_CALL OStorage::getRelati if ( !m_pImpl ) { - ::package::StaticAddLog( OSL_LOG_PREFIX "Disposed!" ); - throw lang::DisposedException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); + ::package::StaticAddLog( THROW_WHERE "Disposed!" ); + throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() ); } if ( m_pData->m_nStorageType != embed::StorageFormats::OFOPXML ) - throw uno::RuntimeException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException( THROW_WHERE, uno::Reference< uno::XInterface >() ); uno::Sequence< uno::Sequence< beans::StringPair > > aResult; sal_Int32 nEntriesNum = 0; @@ -5241,12 +5247,12 @@ uno::Sequence< uno::Sequence< beans::StringPair > > SAL_CALL OStorage::getAllRel if ( !m_pImpl ) { - ::package::StaticAddLog( OSL_LOG_PREFIX "Disposed!" ); - throw lang::DisposedException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); + ::package::StaticAddLog( THROW_WHERE "Disposed!" ); + throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() ); } if ( m_pData->m_nStorageType != embed::StorageFormats::OFOPXML ) - throw uno::RuntimeException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException( THROW_WHERE, uno::Reference< uno::XInterface >() ); return m_pImpl->GetAllRelationshipsIfAny(); } @@ -5260,12 +5266,12 @@ void SAL_CALL OStorage::insertRelationshipByID( const OUString& sID, const uno: if ( !m_pImpl ) { - ::package::StaticAddLog( OSL_LOG_PREFIX "Disposed!" ); - throw lang::DisposedException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); + ::package::StaticAddLog( THROW_WHERE "Disposed!" ); + throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() ); } if ( m_pData->m_nStorageType != embed::StorageFormats::OFOPXML ) - throw uno::RuntimeException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException( THROW_WHERE, uno::Reference< uno::XInterface >() ); OUString aIDTag( "Id" ); @@ -5307,7 +5313,7 @@ void SAL_CALL OStorage::insertRelationshipByID( const OUString& sID, const uno: aSeq[nIDInd].realloc( nIndTarget ); } else - throw container::ElementExistException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); + throw container::ElementExistException( THROW_WHERE, uno::Reference< uno::XInterface >() ); m_pImpl->m_aRelInfo = aSeq; m_pImpl->m_xNewRelInfoStream = uno::Reference< io::XInputStream >(); @@ -5323,12 +5329,12 @@ void SAL_CALL OStorage::removeRelationshipByID( const OUString& sID ) if ( !m_pImpl ) { - ::package::StaticAddLog( OSL_LOG_PREFIX "Disposed!" ); - throw lang::DisposedException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); + ::package::StaticAddLog( THROW_WHERE "Disposed!" ); + throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() ); } if ( m_pData->m_nStorageType != embed::StorageFormats::OFOPXML ) - throw uno::RuntimeException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException( THROW_WHERE, uno::Reference< uno::XInterface >() ); uno::Sequence< uno::Sequence< beans::StringPair > > aSeq = getAllRelationships(); for ( sal_Int32 nInd1 = 0; nInd1 < aSeq.getLength(); nInd1++ ) @@ -5352,7 +5358,7 @@ void SAL_CALL OStorage::removeRelationshipByID( const OUString& sID ) break; } - throw container::NoSuchElementException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); + throw container::NoSuchElementException( THROW_WHERE, uno::Reference< uno::XInterface >() ); } void SAL_CALL OStorage::insertRelationships( const uno::Sequence< uno::Sequence< beans::StringPair > >& aEntries, ::sal_Bool bReplace ) @@ -5364,12 +5370,12 @@ void SAL_CALL OStorage::insertRelationships( const uno::Sequence< uno::Sequence if ( !m_pImpl ) { - ::package::StaticAddLog( OSL_LOG_PREFIX "Disposed!" ); - throw lang::DisposedException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); + ::package::StaticAddLog( THROW_WHERE "Disposed!" ); + throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() ); } if ( m_pData->m_nStorageType != embed::StorageFormats::OFOPXML ) - throw uno::RuntimeException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException( THROW_WHERE, uno::Reference< uno::XInterface >() ); OUString aIDTag( "Id" ); uno::Sequence< uno::Sequence< beans::StringPair > > aSeq = getAllRelationships(); @@ -5390,7 +5396,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( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); + throw container::ElementExistException( THROW_WHERE, uno::Reference< uno::XInterface >() ); nIndSourceSame = nIndSource1; } @@ -5423,10 +5429,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( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); // TODO: illegal relation ( no ID ) + throw io::IOException( THROW_WHERE, uno::Reference< uno::XInterface >() ); // TODO: illegal relation ( no ID ) if ( !bHasID ) - throw io::IOException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); // TODO: illegal relations + throw io::IOException( THROW_WHERE, uno::Reference< uno::XInterface >() ); // TODO: illegal relations nResultInd++; } @@ -5445,12 +5451,12 @@ void SAL_CALL OStorage::clearRelationships() if ( !m_pImpl ) { - ::package::StaticAddLog( OSL_LOG_PREFIX "Disposed!" ); - throw lang::DisposedException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); + ::package::StaticAddLog( THROW_WHERE "Disposed!" ); + throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() ); } if ( m_pData->m_nStorageType != embed::StorageFormats::OFOPXML ) - throw uno::RuntimeException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException( THROW_WHERE, uno::Reference< uno::XInterface >() ); m_pImpl->m_aRelInfo.realloc( 0 ); m_pImpl->m_xNewRelInfoStream = uno::Reference< io::XInputStream >(); @@ -5471,7 +5477,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( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); + throw io::IOException( THROW_WHERE, uno::Reference< uno::XInterface >() ); } void SAL_CALL OStorage::insertStreamElementDirect( @@ -5491,25 +5497,25 @@ void SAL_CALL OStorage::insertStreamElementDirect( if ( !m_pImpl ) { - ::package::StaticAddLog( OSL_LOG_PREFIX "Disposed!" ); - throw lang::DisposedException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); + ::package::StaticAddLog( THROW_WHERE "Disposed!" ); + throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() ); } if ( aStreamName.isEmpty() || !::comphelper::OStorageHelper::IsValidZipEntryFileName( aStreamName, sal_False ) ) - throw lang::IllegalArgumentException( OSL_LOG_PREFIX "Unexpected entry name syntax.", uno::Reference< uno::XInterface >(), 1 ); + throw lang::IllegalArgumentException( THROW_WHERE "Unexpected entry name syntax.", uno::Reference< uno::XInterface >(), 1 ); if ( m_pData->m_nStorageType == embed::StorageFormats::OFOPXML && aStreamName == "_rels" ) - throw lang::IllegalArgumentException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >(), 1 ); // unacceptable storage name + throw lang::IllegalArgumentException( THROW_WHERE, uno::Reference< uno::XInterface >(), 1 ); // unacceptable storage name if ( m_pData->m_bReadOnlyWrap ) - throw io::IOException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); // TODO: access denied + throw io::IOException( THROW_WHERE, uno::Reference< uno::XInterface >() ); // TODO: access denied try { SotElement_Impl* pElement = m_pImpl->FindElement( aStreamName ); if ( pElement ) - throw container::ElementExistException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); + throw container::ElementExistException( THROW_WHERE, uno::Reference< uno::XInterface >() ); pElement = OpenStreamElement_Impl( aStreamName, embed::ElementModes::READWRITE, sal_False ); OSL_ENSURE( pElement && pElement->m_pStream, "In case element can not be created an exception must be thrown!" ); @@ -5519,46 +5525,46 @@ void SAL_CALL OStorage::insertStreamElementDirect( catch( const embed::InvalidStorageException& rInvalidStorageException ) { m_pImpl->AddLog( rInvalidStorageException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); throw; } catch( const lang::IllegalArgumentException& rIllegalArgumentException ) { m_pImpl->AddLog( rIllegalArgumentException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); throw; } catch( const container::ElementExistException& rElementExistException ) { m_pImpl->AddLog( rElementExistException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); throw; } catch( const embed::StorageWrappedTargetException& rStorageWrappedTargetException ) { m_pImpl->AddLog( rStorageWrappedTargetException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); throw; } catch( const io::IOException& rIOException ) { m_pImpl->AddLog( rIOException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); throw; } catch( const uno::RuntimeException& rRuntimeException ) { m_pImpl->AddLog( rRuntimeException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); throw; } catch( const uno::Exception& rException ) { m_pImpl->AddLog( rException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); uno::Any aCaught( ::cppu::getCaughtException() ); - throw embed::StorageWrappedTargetException( OSL_LOG_PREFIX "Can't insert stream directly!", + throw embed::StorageWrappedTargetException( THROW_WHERE "Can't insert stream directly!", uno::Reference< io::XInputStream >(), aCaught ); } @@ -5582,32 +5588,32 @@ void SAL_CALL OStorage::copyElementDirectlyTo( if ( !m_pImpl ) { - ::package::StaticAddLog( OSL_LOG_PREFIX "Disposed!" ); - throw lang::DisposedException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); + ::package::StaticAddLog( THROW_WHERE "Disposed!" ); + throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() ); } if ( aElementName.isEmpty() || !::comphelper::OStorageHelper::IsValidZipEntryFileName( aElementName, sal_False ) || aNewName.isEmpty() || !::comphelper::OStorageHelper::IsValidZipEntryFileName( aNewName, sal_False ) ) - throw lang::IllegalArgumentException( OSL_LOG_PREFIX "Unexpected entry name syntax.", uno::Reference< uno::XInterface >(), 1 ); + throw lang::IllegalArgumentException( THROW_WHERE "Unexpected entry name syntax.", uno::Reference< uno::XInterface >(), 1 ); if ( !xDest.is() || xDest == uno::Reference< uno::XInterface >( static_cast< OWeakObject* >( this ), uno::UNO_QUERY ) ) - throw lang::IllegalArgumentException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >(), 2 ); + throw lang::IllegalArgumentException( THROW_WHERE, uno::Reference< uno::XInterface >(), 2 ); if ( m_pData->m_nStorageType == embed::StorageFormats::OFOPXML && ( aElementName == "_rels" || aNewName == "_rels" ) ) - throw lang::IllegalArgumentException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >(), 0 ); // unacceptable name + throw lang::IllegalArgumentException( THROW_WHERE, uno::Reference< uno::XInterface >(), 0 ); // unacceptable name try { SotElement_Impl* pElement = m_pImpl->FindElement( aElementName ); if ( !pElement ) - throw container::NoSuchElementException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); + throw container::NoSuchElementException( THROW_WHERE, uno::Reference< uno::XInterface >() ); uno::Reference< XNameAccess > xNameAccess( xDest, uno::UNO_QUERY ); if ( !xNameAccess.is() ) - throw uno::RuntimeException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException( THROW_WHERE, uno::Reference< uno::XInterface >() ); if ( xNameAccess->hasByName( aNewName ) ) - throw container::ElementExistException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); + throw container::ElementExistException( THROW_WHERE, uno::Reference< uno::XInterface >() ); // let the element be copied directly uno::Reference< embed::XStorage > xStorDest( xDest, uno::UNO_QUERY_THROW ); @@ -5616,52 +5622,52 @@ void SAL_CALL OStorage::copyElementDirectlyTo( catch( const embed::InvalidStorageException& rInvalidStorageException ) { m_pImpl->AddLog( rInvalidStorageException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); throw; } catch( const lang::IllegalArgumentException& rIllegalArgumentException ) { m_pImpl->AddLog( rIllegalArgumentException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); throw; } catch( const container::NoSuchElementException& rNoSuchElementException ) { m_pImpl->AddLog( rNoSuchElementException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); throw; } catch( const container::ElementExistException& rElementExistException ) { m_pImpl->AddLog( rElementExistException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); throw; } catch( const embed::StorageWrappedTargetException& rStorageWrappedTargetException ) { m_pImpl->AddLog( rStorageWrappedTargetException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); throw; } catch( const io::IOException& rIOException ) { m_pImpl->AddLog( rIOException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); throw; } catch( const uno::RuntimeException& rRuntimeException ) { m_pImpl->AddLog( rRuntimeException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); throw; } catch( const uno::Exception& rException ) { m_pImpl->AddLog( rException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); uno::Any aCaught( ::cppu::getCaughtException() ); - throw embed::StorageWrappedTargetException( OSL_LOG_PREFIX "Can't copy element direcly!", + throw embed::StorageWrappedTargetException( THROW_WHERE "Can't copy element direcly!", uno::Reference< io::XInputStream >(), aCaught ); } @@ -5680,15 +5686,15 @@ void SAL_CALL OStorage::writeAndAttachToStream( const uno::Reference< io::XStrea if ( !m_pImpl ) { - ::package::StaticAddLog( OSL_LOG_PREFIX "Disposed!" ); - throw lang::DisposedException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); + ::package::StaticAddLog( THROW_WHERE "Disposed!" ); + throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() ); } if ( !m_pData->m_bIsRoot ) - throw lang::IllegalArgumentException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >(), 0 ); + throw lang::IllegalArgumentException( THROW_WHERE, uno::Reference< uno::XInterface >(), 0 ); if ( !m_pImpl->m_pSwitchStream ) - throw uno::RuntimeException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException( THROW_WHERE, uno::Reference< uno::XInterface >() ); try { @@ -5697,40 +5703,40 @@ void SAL_CALL OStorage::writeAndAttachToStream( const uno::Reference< io::XStrea catch( const embed::InvalidStorageException& rInvalidStorageException ) { m_pImpl->AddLog( rInvalidStorageException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); throw; } catch( const lang::IllegalArgumentException& rIllegalArgumentException ) { m_pImpl->AddLog( rIllegalArgumentException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); throw; } catch( const embed::StorageWrappedTargetException& rStorageWrappedTargetException ) { m_pImpl->AddLog( rStorageWrappedTargetException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); throw; } catch( const io::IOException& rIOException ) { m_pImpl->AddLog( rIOException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); throw; } catch( const uno::RuntimeException& rRuntimeException ) { m_pImpl->AddLog( rRuntimeException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); throw; } catch( const uno::Exception& rException ) { m_pImpl->AddLog( rException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); uno::Any aCaught( ::cppu::getCaughtException() ); - throw embed::StorageWrappedTargetException( OSL_LOG_PREFIX "Can't write and attach to stream!", + throw embed::StorageWrappedTargetException( THROW_WHERE "Can't write and attach to stream!", uno::Reference< io::XInputStream >(), aCaught ); } @@ -5751,15 +5757,15 @@ void SAL_CALL OStorage::attachToURL( const OUString& sURL, if ( !m_pImpl ) { - ::package::StaticAddLog( OSL_LOG_PREFIX "Disposed!" ); - throw lang::DisposedException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); + ::package::StaticAddLog( THROW_WHERE "Disposed!" ); + throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() ); } if ( !m_pData->m_bIsRoot ) - throw lang::IllegalArgumentException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >(), 0 ); + throw lang::IllegalArgumentException( THROW_WHERE, uno::Reference< uno::XInterface >(), 0 ); if ( !m_pImpl->m_pSwitchStream ) - throw uno::RuntimeException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException( THROW_WHERE, uno::Reference< uno::XInterface >() ); uno::Reference < ucb::XSimpleFileAccess3 > xAccess( ucb::SimpleFileAccess::create( m_pImpl->m_xContext ) ); @@ -5780,40 +5786,40 @@ void SAL_CALL OStorage::attachToURL( const OUString& sURL, catch( const embed::InvalidStorageException& rInvalidStorageException ) { m_pImpl->AddLog( rInvalidStorageException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); throw; } catch( const lang::IllegalArgumentException& rIllegalArgumentException ) { m_pImpl->AddLog( rIllegalArgumentException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); throw; } catch( const embed::StorageWrappedTargetException& rStorageWrappedTargetException ) { m_pImpl->AddLog( rStorageWrappedTargetException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); throw; } catch( const io::IOException& rIOException ) { m_pImpl->AddLog( rIOException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); throw; } catch( const uno::RuntimeException& rRuntimeException ) { m_pImpl->AddLog( rRuntimeException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); throw; } catch( const uno::Exception& rException ) { m_pImpl->AddLog( rException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); uno::Any aCaught( ::cppu::getCaughtException() ); - throw embed::StorageWrappedTargetException( OSL_LOG_PREFIX "Can't attach to URL!", + throw embed::StorageWrappedTargetException( THROW_WHERE "Can't attach to URL!", uno::Reference< io::XInputStream >(), aCaught ); } @@ -5835,31 +5841,31 @@ uno::Any SAL_CALL OStorage::getElementPropertyValue( const OUString& aElementNam if ( !m_pImpl ) { - ::package::StaticAddLog( OSL_LOG_PREFIX "Disposed!" ); - throw lang::DisposedException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); + ::package::StaticAddLog( THROW_WHERE "Disposed!" ); + throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() ); } if ( aElementName.isEmpty() || !::comphelper::OStorageHelper::IsValidZipEntryFileName( aElementName, sal_False ) ) - throw lang::IllegalArgumentException( OSL_LOG_PREFIX "Unexpected entry name syntax.", uno::Reference< uno::XInterface >(), 1 ); + throw lang::IllegalArgumentException( THROW_WHERE "Unexpected entry name syntax.", uno::Reference< uno::XInterface >(), 1 ); if ( m_pData->m_nStorageType == embed::StorageFormats::OFOPXML && aElementName == "_rels" ) - throw lang::IllegalArgumentException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >(), 1 ); // TODO: unacceptable name + throw lang::IllegalArgumentException( THROW_WHERE, uno::Reference< uno::XInterface >(), 1 ); // TODO: unacceptable name try { SotElement_Impl *pElement = m_pImpl->FindElement( aElementName ); if ( !pElement ) - throw container::NoSuchElementException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); + throw container::NoSuchElementException( THROW_WHERE, uno::Reference< uno::XInterface >() ); // 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( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); + throw beans::PropertyVetoException( THROW_WHERE, uno::Reference< uno::XInterface >() ); if ( !pElement->m_pStorage ) m_pImpl->OpenSubStorage( pElement, embed::ElementModes::READ ); if ( !pElement->m_pStorage ) - throw io::IOException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); // TODO: general_error + throw io::IOException( THROW_WHERE, uno::Reference< uno::XInterface >() ); // TODO: general_error pElement->m_pStorage->ReadContents(); return uno::makeAny( pElement->m_pStorage->m_aMediaType ); @@ -5867,58 +5873,58 @@ uno::Any SAL_CALL OStorage::getElementPropertyValue( const OUString& aElementNam catch( const embed::InvalidStorageException& rInvalidStorageException ) { m_pImpl->AddLog( rInvalidStorageException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); throw; } catch( const lang::IllegalArgumentException& rIllegalArgumentException ) { m_pImpl->AddLog( rIllegalArgumentException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); throw; } catch( const container::NoSuchElementException& rNoSuchElementException ) { m_pImpl->AddLog( rNoSuchElementException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); throw; } catch( const beans::UnknownPropertyException& rUnknownPropertyException ) { m_pImpl->AddLog( rUnknownPropertyException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); throw; } catch( const beans::PropertyVetoException& rPropertyVetoException ) { m_pImpl->AddLog( rPropertyVetoException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); throw; } catch( const embed::StorageWrappedTargetException& rStorageWrappedTargetException ) { m_pImpl->AddLog( rStorageWrappedTargetException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); throw; } catch( const io::IOException& rIOException ) { m_pImpl->AddLog( rIOException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); throw; } catch( const uno::RuntimeException& rRuntimeException ) { m_pImpl->AddLog( rRuntimeException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); throw; } catch( const uno::Exception& rException ) { m_pImpl->AddLog( rException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); uno::Any aCaught( ::cppu::getCaughtException() ); - throw embed::StorageWrappedTargetException( OSL_LOG_PREFIX "Can't get element property!", + throw embed::StorageWrappedTargetException( THROW_WHERE "Can't get element property!", uno::Reference< io::XInputStream >(), aCaught ); } @@ -5936,18 +5942,18 @@ void SAL_CALL OStorage::copyStreamElementData( const OUString& aStreamName, cons if ( !m_pImpl ) { - ::package::StaticAddLog( OSL_LOG_PREFIX "Disposed!" ); - throw lang::DisposedException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); + ::package::StaticAddLog( THROW_WHERE "Disposed!" ); + throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() ); } if ( aStreamName.isEmpty() || !::comphelper::OStorageHelper::IsValidZipEntryFileName( aStreamName, sal_False ) ) - throw lang::IllegalArgumentException( OSL_LOG_PREFIX "Unexpected entry name syntax.", uno::Reference< uno::XInterface >(), 1 ); + throw lang::IllegalArgumentException( THROW_WHERE "Unexpected entry name syntax.", uno::Reference< uno::XInterface >(), 1 ); if ( m_pData->m_nStorageType == embed::StorageFormats::OFOPXML && aStreamName == "_rels" ) - throw lang::IllegalArgumentException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >(), 1 ); // unacceptable name + throw lang::IllegalArgumentException( THROW_WHERE, uno::Reference< uno::XInterface >(), 1 ); // unacceptable name if ( !xTargetStream.is() ) - throw lang::IllegalArgumentException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >(), 2 ); + throw lang::IllegalArgumentException( THROW_WHERE, uno::Reference< uno::XInterface >(), 2 ); try { @@ -5956,51 +5962,51 @@ 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( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); // if the stream reference is set it must not be changed! + throw uno::RuntimeException( THROW_WHERE, uno::Reference< uno::XInterface >() ); // if the stream reference is set it must not be changed! } catch( const embed::InvalidStorageException& rInvalidStorageException ) { m_pImpl->AddLog( rInvalidStorageException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); throw; } catch( const lang::IllegalArgumentException& rIllegalArgumentException ) { m_pImpl->AddLog( rIllegalArgumentException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); throw; } catch( const packages::WrongPasswordException& rWrongPasswordException ) { m_pImpl->AddLog( rWrongPasswordException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); throw; } catch( const io::IOException& rIOException ) { m_pImpl->AddLog( rIOException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); throw; } catch( const embed::StorageWrappedTargetException& rStorageWrappedTargetException ) { m_pImpl->AddLog( rStorageWrappedTargetException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); throw; } catch( const uno::RuntimeException& rRuntimeException ) { m_pImpl->AddLog( rRuntimeException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); throw; } catch( const uno::Exception& rException ) { m_pImpl->AddLog( rException.Message ); - m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" ); + m_pImpl->AddLog( THROW_WHERE "Rethrow" ); uno::Any aCaught( ::cppu::getCaughtException() ); - throw embed::StorageWrappedTargetException( OSL_LOG_PREFIX "Can't copy stream data!", + throw embed::StorageWrappedTargetException( THROW_WHERE "Can't copy stream data!", uno::Reference< io::XInputStream >(), aCaught ); } @@ -6020,16 +6026,16 @@ uno::Reference< embed::XExtendedStorageStream > SAL_CALL OStorage::openStreamEle if ( !m_pImpl ) { - ::package::StaticAddLog( OSL_LOG_PREFIX "Disposed!" ); - throw lang::DisposedException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); + ::package::StaticAddLog( THROW_WHERE "Disposed!" ); + throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() ); } if ( aStreamPath.isEmpty() || !::comphelper::OStorageHelper::IsValidZipEntryFileName( aStreamPath, sal_True ) ) - throw lang::IllegalArgumentException( OSL_LOG_PREFIX "Unexpected entry name syntax.", uno::Reference< uno::XInterface >(), 1 ); + throw lang::IllegalArgumentException( THROW_WHERE "Unexpected entry name syntax.", uno::Reference< uno::XInterface >(), 1 ); if ( !( m_pImpl->m_nStorageMode & embed::ElementModes::WRITE ) && ( nOpenMode & embed::ElementModes::WRITE ) ) - throw io::IOException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); // Access denied + throw io::IOException( THROW_WHERE, uno::Reference< uno::XInterface >() ); // Access denied OStringList_Impl aListPath = OHierarchyHolder_Impl::GetListPathFromString( aStreamPath ); OSL_ENSURE( aListPath.size(), "The result list must not be empty!" ); @@ -6061,7 +6067,7 @@ uno::Reference< embed::XExtendedStorageStream > SAL_CALL OStorage::openStreamEle } if ( !xResult.is() ) - throw uno::RuntimeException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException( THROW_WHERE, uno::Reference< uno::XInterface >() ); return xResult; } @@ -6090,15 +6096,15 @@ void SAL_CALL OStorage::removeStreamElementByHierarchicalName( const OUString& a if ( !m_pImpl ) { - ::package::StaticAddLog( OSL_LOG_PREFIX "Disposed!" ); - throw lang::DisposedException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); + ::package::StaticAddLog( THROW_WHERE "Disposed!" ); + throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() ); } if ( aStreamPath.isEmpty() || !::comphelper::OStorageHelper::IsValidZipEntryFileName( aStreamPath, sal_True ) ) - throw lang::IllegalArgumentException( OSL_LOG_PREFIX "Unexpected entry name syntax.", uno::Reference< uno::XInterface >(), 1 ); + 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( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); // Access denied + throw io::IOException( THROW_WHERE, uno::Reference< uno::XInterface >() ); // Access denied OStringList_Impl aListPath = OHierarchyHolder_Impl::GetListPathFromString( aStreamPath ); OSL_ENSURE( aListPath.size(), "The result list must not be empty!" ); @@ -6124,22 +6130,22 @@ uno::Reference< embed::XExtendedStorageStream > SAL_CALL OStorage::openEncrypted if ( !m_pImpl ) { - ::package::StaticAddLog( OSL_LOG_PREFIX "Disposed!" ); - throw lang::DisposedException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); + ::package::StaticAddLog( THROW_WHERE "Disposed!" ); + throw lang::DisposedException( THROW_WHERE, uno::Reference< uno::XInterface >() ); } if ( m_pData->m_nStorageType != embed::StorageFormats::PACKAGE ) - throw packages::NoEncryptionException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); + throw packages::NoEncryptionException( THROW_WHERE, uno::Reference< uno::XInterface >() ); if ( aStreamPath.isEmpty() || !::comphelper::OStorageHelper::IsValidZipEntryFileName( aStreamPath, sal_True ) ) - throw lang::IllegalArgumentException( OSL_LOG_PREFIX "Unexpected entry name syntax.", uno::Reference< uno::XInterface >(), 1 ); + throw lang::IllegalArgumentException( THROW_WHERE "Unexpected entry name syntax.", uno::Reference< uno::XInterface >(), 1 ); if ( !aEncryptionData.getLength() ) - throw lang::IllegalArgumentException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >(), 3 ); + throw lang::IllegalArgumentException( THROW_WHERE, uno::Reference< uno::XInterface >(), 3 ); if ( !( m_pImpl->m_nStorageMode & embed::ElementModes::WRITE ) && ( nOpenMode & embed::ElementModes::WRITE ) ) - throw io::IOException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); // Access denied + throw io::IOException( THROW_WHERE, uno::Reference< uno::XInterface >() ); // Access denied OStringList_Impl aListPath = OHierarchyHolder_Impl::GetListPathFromString( aStreamPath ); OSL_ENSURE( aListPath.size(), "The result list must not be empty!" ); @@ -6172,7 +6178,7 @@ uno::Reference< embed::XExtendedStorageStream > SAL_CALL OStorage::openEncrypted } if ( !xResult.is() ) - throw uno::RuntimeException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException( THROW_WHERE, uno::Reference< uno::XInterface >() ); return xResult; } |