[Libreoffice-commits] core.git: connectivity/source package/source ucb/source

Jan Holesovsky kendy at collabora.com
Mon Jan 27 15:08:10 PST 2014


 connectivity/source/drivers/jdbc/InputStream.cxx          |    9 
 package/source/manifest/ManifestExport.cxx                |   14 
 package/source/manifest/ManifestWriter.cxx                |    8 
 package/source/xstor/xfactory.cxx                         |   12 
 package/source/xstor/xstorage.cxx                         | 1186 +++++++-------
 package/source/zipapi/ByteGrabber.cxx                     |   14 
 package/source/zipapi/ZipFile.cxx                         |   14 
 package/source/zippackage/ZipPackage.cxx                  |   84 
 package/source/zippackage/ZipPackageBuffer.cxx            |   12 
 package/source/zippackage/ZipPackageEntry.cxx             |   10 
 package/source/zippackage/ZipPackageFolder.cxx            |   28 
 package/source/zippackage/ZipPackageFolderEnumeration.cxx |    8 
 package/source/zippackage/ZipPackageStream.cxx            |   74 
 package/source/zippackage/wrapstreamforshare.cxx          |   24 
 package/source/zippackage/zipfileaccess.cxx               |   58 
 ucb/source/ucp/file/bc.cxx                                |   17 
 ucb/source/ucp/file/filcmd.cxx                            |   10 
 ucb/source/ucp/file/filinpstr.cxx                         |   21 
 ucb/source/ucp/file/filprp.cxx                            |    8 
 ucb/source/ucp/file/filrow.cxx                            |   45 
 ucb/source/ucp/file/filrset.cxx                           |   28 
 ucb/source/ucp/file/filstr.cxx                            |   27 
 ucb/source/ucp/file/prov.cxx                              |   15 
 ucb/source/ucp/file/shell.cxx                             |   22 
 24 files changed, 939 insertions(+), 809 deletions(-)

New commits:
commit cb64711136fff661f60d679db1e391866cc6fe10
Author: Jan Holesovsky <kendy at collabora.com>
Date:   Mon Jan 27 22:51:45 2014 +0100

    Don't use OSL_LOG_PREFIX when throwing exceptions in non-debug builds.
    
    Using OSL_LOG_PREFIX in the exceptions is not a good idea; it blows the size
    of the string literals tremendously - full build path for every line that uses
    that, including the line.
    
    Let's not remove it for good, but hide it for non-debug builds
    (OSL_DEBUG_LEVEL == 0) so that anybody who would like to use this during
    debugging could still do (but I doubt it has any value for anybody).
    
    Change-Id: Icc8db95ae0862671a206e681f92c60cdf51ffc32

diff --git a/connectivity/source/drivers/jdbc/InputStream.cxx b/connectivity/source/drivers/jdbc/InputStream.cxx
index f72cbb7..810a1ae 100644
--- a/connectivity/source/drivers/jdbc/InputStream.cxx
+++ b/connectivity/source/drivers/jdbc/InputStream.cxx
@@ -23,6 +23,13 @@
 #include <string.h>
 
 using namespace connectivity;
+
+#if OSL_DEBUG_LEVEL > 0
+#define THROW_WHERE SAL_WHERE
+#else
+#define THROW_WHERE ""
+#endif
+
 //**************************************************************
 //************ Class: java.io.InputStream
 //**************************************************************
@@ -72,7 +79,7 @@ void SAL_CALL java_io_InputStream::closeInput(  ) throw(::com::sun::star::io::No
 sal_Int32 SAL_CALL java_io_InputStream::readBytes( ::com::sun::star::uno::Sequence< sal_Int8 >& aData, sal_Int32 nBytesToRead ) throw(::com::sun::star::io::NotConnectedException, ::com::sun::star::io::BufferSizeExceededException, ::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException)
 {
     if (nBytesToRead < 0)
-        throw ::com::sun::star::io::BufferSizeExceededException( OUString( OSL_LOG_PREFIX ), *this );
+        throw ::com::sun::star::io::BufferSizeExceededException( OUString(THROW_WHERE), *this );
 
     jint out(0);
     SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
diff --git a/package/source/manifest/ManifestExport.cxx b/package/source/manifest/ManifestExport.cxx
index 7e55a28..0572cf7 100644
--- a/package/source/manifest/ManifestExport.cxx
+++ b/package/source/manifest/ManifestExport.cxx
@@ -35,6 +35,12 @@
 
 using namespace ::com::sun::star;
 
+#if OSL_DEBUG_LEVEL > 0
+#define THROW_WHERE SAL_WHERE
+#else
+#define THROW_WHERE ""
+#endif
+
 ManifestExport::ManifestExport( uno::Reference< xml::sax::XDocumentHandler > xHandler,  const uno::Sequence< uno::Sequence < beans::PropertyValue > >& rManList )
 {
     const OUString sFileEntryElement     ( ELEMENT_FILE_ENTRY );
@@ -257,7 +263,7 @@ ManifestExport::ManifestExport( uno::Reference< xml::sax::XDocumentHandler > xHa
             else if ( nDigestAlgID == xml::crypto::DigestID::SHA1_1K )
                 sChecksumType = sSHA1_1k_Name;
             else
-                throw uno::RuntimeException( OSL_LOG_PREFIX "Unexpected digest algorithm is provided!", uno::Reference< uno::XInterface >() );
+                throw uno::RuntimeException( THROW_WHERE "Unexpected digest algorithm is provided!", uno::Reference< uno::XInterface >() );
 
             pNewAttrList->AddAttribute ( sChecksumTypeAttribute, sCdataAttribute, sChecksumType );
             *pDigest >>= aSequence;
@@ -280,7 +286,7 @@ ManifestExport::ManifestExport( uno::Reference< xml::sax::XDocumentHandler > xHa
             {
                 OSL_ENSURE( nDerivedKeySize, "Unexpected key size is provided!" );
                 if ( nDerivedKeySize != 32 )
-                    throw uno::RuntimeException( OSL_LOG_PREFIX "Unexpected key size is provided!", uno::Reference< uno::XInterface >() );
+                    throw uno::RuntimeException( THROW_WHERE "Unexpected key size is provided!", uno::Reference< uno::XInterface >() );
 
                 sEncAlgName = sAES256_URL;
             }
@@ -289,7 +295,7 @@ ManifestExport::ManifestExport( uno::Reference< xml::sax::XDocumentHandler > xHa
                 sEncAlgName = sBlowfish_Name;
             }
             else
-                throw uno::RuntimeException( OSL_LOG_PREFIX "Unexpected encryption algorithm is provided!", uno::Reference< uno::XInterface >() );
+                throw uno::RuntimeException( THROW_WHERE "Unexpected encryption algorithm is provided!", uno::Reference< uno::XInterface >() );
 
             pNewAttrList->AddAttribute ( sAlgorithmNameAttribute, sCdataAttribute, sEncAlgName );
 
@@ -353,7 +359,7 @@ ManifestExport::ManifestExport( uno::Reference< xml::sax::XDocumentHandler > xHa
                     sStartKeySize = aBuffer.makeStringAndClear();
                 }
                 else
-                    throw uno::RuntimeException( OSL_LOG_PREFIX "Unexpected start key algorithm is provided!", uno::Reference< uno::XInterface >() );
+                    throw uno::RuntimeException( THROW_WHERE "Unexpected start key algorithm is provided!", uno::Reference< uno::XInterface >() );
 
                 pNewAttrList->AddAttribute ( sStartKeyGenerationNameAttribute, sCdataAttribute, sStartKeyAlg );
                 pNewAttrList->AddAttribute ( sKeySizeAttribute, sCdataAttribute, sStartKeySize );
diff --git a/package/source/manifest/ManifestWriter.cxx b/package/source/manifest/ManifestWriter.cxx
index 7d69b37..2c32bc9 100644
--- a/package/source/manifest/ManifestWriter.cxx
+++ b/package/source/manifest/ManifestWriter.cxx
@@ -41,6 +41,12 @@ using namespace ::com::sun::star::packages;
 using namespace ::com::sun::star::xml::sax;
 using namespace ::com::sun::star::packages::manifest;
 
+#if OSL_DEBUG_LEVEL > 0
+#define THROW_WHERE SAL_WHERE
+#else
+#define THROW_WHERE ""
+#endif
+
 ManifestWriter::ManifestWriter( const Reference < XComponentContext > & xContext )
 : m_xContext ( xContext )
 {
@@ -60,7 +66,7 @@ void SAL_CALL ManifestWriter::writeManifestSequence( const Reference< XOutputStr
     }
     catch( SAXException& )
     {
-        throw RuntimeException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() );
+        throw RuntimeException( THROW_WHERE, uno::Reference< uno::XInterface >() );
     }
 }
 
diff --git a/package/source/xstor/xfactory.cxx b/package/source/xstor/xfactory.cxx
index 0b59785..74c7b7f 100644
--- a/package/source/xstor/xfactory.cxx
+++ b/package/source/xstor/xfactory.cxx
@@ -33,6 +33,12 @@
 
 using namespace ::com::sun::star;
 
+#if OSL_DEBUG_LEVEL > 0
+#define THROW_WHERE SAL_WHERE
+#else
+#define THROW_WHERE ""
+#endif
+
 sal_Bool CheckPackageSignature_Impl( const uno::Reference< io::XInputStream >& xInputStream,
                                      const uno::Reference< io::XSeekable >& xSeekable )
 {
@@ -203,19 +209,19 @@ uno::Reference< uno::XInterface > SAL_CALL OStorageFactory::createInstanceWithAr
                         else if ( aFormatName.equals( OFOPXML_STORAGE_FORMAT_STRING ) )
                             nStorageType = embed::StorageFormats::OFOPXML;
                         else
-                            throw lang::IllegalArgumentException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >(), 1 );
+                            throw lang::IllegalArgumentException( THROW_WHERE, uno::Reference< uno::XInterface >(), 1 );
                     }
                     else if ( aDescr[nInd].Value >>= nFormatID )
                     {
                         if ( nFormatID != embed::StorageFormats::PACKAGE
                           && nFormatID != embed::StorageFormats::ZIP
                           && nFormatID != embed::StorageFormats::OFOPXML )
-                            throw lang::IllegalArgumentException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >(), 1 );
+                            throw lang::IllegalArgumentException( THROW_WHERE, uno::Reference< uno::XInterface >(), 1 );
 
                         nStorageType = nFormatID;
                     }
                     else
-                        throw lang::IllegalArgumentException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >(), 1 );
+                        throw lang::IllegalArgumentException( THROW_WHERE, uno::Reference< uno::XInterface >(), 1 );
                 }
                 else
                     OSL_FAIL( "Unacceptable property, will be ignored!\n" );
diff --git a/package/source/xstor/xstorage.cxx b/package/source/xstor/xstorage.cxx
index 16483d6..9a6d45f 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 >() );

... etc. - the rest is truncated


More information about the Libreoffice-commits mailing list