diff options
Diffstat (limited to 'package/source/zippackage/ZipPackageEntry.cxx')
-rw-r--r-- | package/source/zippackage/ZipPackageEntry.cxx | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/package/source/zippackage/ZipPackageEntry.cxx b/package/source/zippackage/ZipPackageEntry.cxx index c109c196f0b0..8087c3b98452 100644 --- a/package/source/zippackage/ZipPackageEntry.cxx +++ b/package/source/zippackage/ZipPackageEntry.cxx @@ -34,6 +34,12 @@ using namespace com::sun::star::container; using namespace com::sun::star::packages::zip; using namespace com::sun::star::packages::zip::ZipConstants; +#if OSL_DEBUG_LEVEL > 0 +#define THROW_WHERE SAL_WHERE +#else +#define THROW_WHERE "" +#endif + ZipPackageEntry::ZipPackageEntry ( bool bNewFolder ) : mbIsFolder ( bNewFolder ) , mbAllowRemoveOnInsert( sal_True ) @@ -62,7 +68,7 @@ void SAL_CALL ZipPackageEntry::setName( const OUString& aName ) // unfortunately no other exception than RuntimeException can be thrown here // usually the package is used through storage implementation, the problem should be detected there if ( !::comphelper::OStorageHelper::IsValidZipEntryFileName( aName, sal_True ) ) - throw RuntimeException(OSL_LOG_PREFIX "Unexpected character is used in file name.", uno::Reference< XInterface >() ); + throw RuntimeException(THROW_WHERE "Unexpected character is used in file name.", uno::Reference< XInterface >() ); msName = aName; @@ -90,7 +96,7 @@ void SAL_CALL ZipPackageEntry::setParent( const uno::Reference< XInterface >& xN sal_Int64 nTest(0); uno::Reference < XUnoTunnel > xTunnel ( xNewParent, UNO_QUERY ); if ( !xNewParent.is() || ( nTest = xTunnel->getSomething ( ZipPackageFolder::static_getImplementationId () ) ) == 0 ) - throw NoSupportException(OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); + throw NoSupportException(THROW_WHERE, uno::Reference< uno::XInterface >() ); ZipPackageFolder *pNewParent = reinterpret_cast < ZipPackageFolder * > ( nTest ); |