From aa611d78df11fcc1e35ead5fa093143bf17e4cf6 Mon Sep 17 00:00:00 2001 From: Mathias Bauer Date: Fri, 10 Jul 2009 14:03:42 +0200 Subject: #i103452#: replace PRODUCT by !DBG_UTIL; replace assert by OSL_ASSERT where possible --- unotools/source/i18n/calendarwrapper.cxx | 52 ++++++++++++------------- unotools/source/i18n/charclass.cxx | 4 +- unotools/source/i18n/localedatawrapper.cxx | 2 +- unotools/source/i18n/transliterationwrapper.cxx | 10 ++--- unotools/source/property/propertysetinfo.cxx | 2 +- 5 files changed, 35 insertions(+), 35 deletions(-) (limited to 'unotools') diff --git a/unotools/source/i18n/calendarwrapper.cxx b/unotools/source/i18n/calendarwrapper.cxx index 1d83761b5cea..b56175af7e41 100644 --- a/unotools/source/i18n/calendarwrapper.cxx +++ b/unotools/source/i18n/calendarwrapper.cxx @@ -71,7 +71,7 @@ CalendarWrapper::CalendarWrapper( } catch ( Exception& e ) { -#ifndef PRODUCT +#ifdef DBG_UTIL ByteString aMsg( "CalendarWrapper ctor: Exception caught\n" ); aMsg += ByteString( String( e.Message ), RTL_TEXTENCODING_UTF8 ); DBG_ERRORFILE( aMsg.GetBuffer() ); @@ -96,7 +96,7 @@ CalendarWrapper::CalendarWrapper( } catch ( Exception& e ) { -#ifndef PRODUCT +#ifdef DBG_UTIL ByteString aMsg( "getComponentInstance: Exception caught\n" ); aMsg += ByteString( String( e.Message ), RTL_TEXTENCODING_UTF8 ); DBG_ERRORFILE( aMsg.GetBuffer() ); @@ -122,7 +122,7 @@ void CalendarWrapper::loadDefaultCalendar( const ::com::sun::star::lang::Locale& } catch ( Exception& e ) { -#ifndef PRODUCT +#ifdef DBG_UTIL ByteString aMsg( "loadDefaultCalendar: Exception caught\n" ); aMsg += ByteString( String( e.Message ), RTL_TEXTENCODING_UTF8 ); DBG_ERRORFILE( aMsg.GetBuffer() ); @@ -142,7 +142,7 @@ void CalendarWrapper::loadCalendar( const ::rtl::OUString& rUniqueID, const ::co } catch ( Exception& e ) { -#ifndef PRODUCT +#ifdef DBG_UTIL ByteString aMsg( "loadCalendar: Exception caught\nrequested: " ); aMsg += ByteString( String( rUniqueID ), RTL_TEXTENCODING_UTF8 ); aMsg += " Locale: "; @@ -167,7 +167,7 @@ void CalendarWrapper::loadCalendar( const ::rtl::OUString& rUniqueID, const ::co } catch ( Exception& e ) { -#ifndef PRODUCT +#ifdef DBG_UTIL ByteString aMsg( "getLoadedCalendar: Exception caught\n" ); aMsg += ByteString( String( e.Message ), RTL_TEXTENCODING_UTF8 ); DBG_ERRORFILE( aMsg.GetBuffer() ); @@ -188,7 +188,7 @@ void CalendarWrapper::loadCalendar( const ::rtl::OUString& rUniqueID, const ::co } catch ( Exception& e ) { -#ifndef PRODUCT +#ifdef DBG_UTIL ByteString aMsg( "getAllCalendars: Exception caught\n" ); aMsg += ByteString( String( e.Message ), RTL_TEXTENCODING_UTF8 ); DBG_ERRORFILE( aMsg.GetBuffer() ); @@ -209,7 +209,7 @@ void CalendarWrapper::loadCalendar( const ::rtl::OUString& rUniqueID, const ::co } catch ( Exception& e ) { -#ifndef PRODUCT +#ifdef DBG_UTIL ByteString aMsg( "getUniqueID: Exception caught\n" ); aMsg += ByteString( String( e.Message ), RTL_TEXTENCODING_UTF8 ); DBG_ERRORFILE( aMsg.GetBuffer() ); @@ -230,7 +230,7 @@ void CalendarWrapper::setDateTime( double nTimeInDays ) } catch ( Exception& e ) { -#ifndef PRODUCT +#ifdef DBG_UTIL ByteString aMsg( "setDateTime: Exception caught\n" ); aMsg += ByteString( String( e.Message ), RTL_TEXTENCODING_UTF8 ); DBG_ERRORFILE( aMsg.GetBuffer() ); @@ -250,7 +250,7 @@ double CalendarWrapper::getDateTime() const } catch ( Exception& e ) { -#ifndef PRODUCT +#ifdef DBG_UTIL ByteString aMsg( "getDateTime: Exception caught\n" ); aMsg += ByteString( String( e.Message ), RTL_TEXTENCODING_UTF8 ); DBG_ERRORFILE( aMsg.GetBuffer() ); @@ -280,7 +280,7 @@ sal_Int32 CalendarWrapper::getCombinedOffsetInMillis( } catch ( Exception& e ) { -#ifndef PRODUCT +#ifdef DBG_UTIL ByteString aMsg( "setLocalDateTime: Exception caught\n" ); aMsg += ByteString( String( e.Message ), RTL_TEXTENCODING_UTF8 ); DBG_ERRORFILE( aMsg.GetBuffer() ); @@ -352,7 +352,7 @@ void CalendarWrapper::setLocalDateTime( double nTimeInDays ) } catch ( Exception& e ) { -#ifndef PRODUCT +#ifdef DBG_UTIL ByteString aMsg( "setLocalDateTime: Exception caught\n" ); aMsg += ByteString( String( e.Message ), RTL_TEXTENCODING_UTF8 ); DBG_ERRORFILE( aMsg.GetBuffer() ); @@ -378,7 +378,7 @@ double CalendarWrapper::getLocalDateTime() const } catch ( Exception& e ) { -#ifndef PRODUCT +#ifdef DBG_UTIL ByteString aMsg( "getLocalDateTime: Exception caught\n" ); aMsg += ByteString( String( e.Message ), RTL_TEXTENCODING_UTF8 ); DBG_ERRORFILE( aMsg.GetBuffer() ); @@ -399,7 +399,7 @@ void CalendarWrapper::setValue( sal_Int16 nFieldIndex, sal_Int16 nValue ) } catch ( Exception& e ) { -#ifndef PRODUCT +#ifdef DBG_UTIL ByteString aMsg( "setValue: Exception caught\n" ); aMsg += ByteString( String( e.Message ), RTL_TEXTENCODING_UTF8 ); DBG_ERRORFILE( aMsg.GetBuffer() ); @@ -419,7 +419,7 @@ sal_Bool CalendarWrapper::isValid() const } catch ( Exception& e ) { -#ifndef PRODUCT +#ifdef DBG_UTIL ByteString aMsg( "isValid: Exception caught\n" ); aMsg += ByteString( String( e.Message ), RTL_TEXTENCODING_UTF8 ); DBG_ERRORFILE( aMsg.GetBuffer() ); @@ -440,7 +440,7 @@ sal_Int16 CalendarWrapper::getValue( sal_Int16 nFieldIndex ) const } catch ( Exception& e ) { -#ifndef PRODUCT +#ifdef DBG_UTIL ByteString aMsg( "getValue: Exception caught\n" ); aMsg += ByteString( String( e.Message ), RTL_TEXTENCODING_UTF8 ); DBG_ERRORFILE( aMsg.GetBuffer() ); @@ -461,7 +461,7 @@ void CalendarWrapper::addValue( sal_Int16 nFieldIndex, sal_Int32 nAmount ) } catch ( Exception& e ) { -#ifndef PRODUCT +#ifdef DBG_UTIL ByteString aMsg( "addValue: Exception caught\n" ); aMsg += ByteString( String( e.Message ), RTL_TEXTENCODING_UTF8 ); DBG_ERRORFILE( aMsg.GetBuffer() ); @@ -481,7 +481,7 @@ sal_Int16 CalendarWrapper::getFirstDayOfWeek() const } catch ( Exception& e ) { -#ifndef PRODUCT +#ifdef DBG_UTIL ByteString aMsg( "getFirstDayOfWeek: Exception caught\n" ); aMsg += ByteString( String( e.Message ), RTL_TEXTENCODING_UTF8 ); DBG_ERRORFILE( aMsg.GetBuffer() ); @@ -502,7 +502,7 @@ void CalendarWrapper::setFirstDayOfWeek( sal_Int16 nDay ) } catch ( Exception& e ) { -#ifndef PRODUCT +#ifdef DBG_UTIL ByteString aMsg( "setFirstDayOfWeek: Exception caught\n" ); aMsg += ByteString( String( e.Message ), RTL_TEXTENCODING_UTF8 ); DBG_ERRORFILE( aMsg.GetBuffer() ); @@ -522,7 +522,7 @@ void CalendarWrapper::setMinimumNumberOfDaysForFirstWeek( sal_Int16 nDays ) } catch ( Exception& e ) { -#ifndef PRODUCT +#ifdef DBG_UTIL ByteString aMsg( "setMinimumNumberOfDaysForFirstWeek: Exception caught\n" ); aMsg += ByteString( String( e.Message ), RTL_TEXTENCODING_UTF8 ); DBG_ERRORFILE( aMsg.GetBuffer() ); @@ -542,7 +542,7 @@ sal_Int16 CalendarWrapper::getMinimumNumberOfDaysForFirstWeek() const } catch ( Exception& e ) { -#ifndef PRODUCT +#ifdef DBG_UTIL ByteString aMsg( "getMinimumNumberOfDaysForFirstWeek: Exception caught\n" ); aMsg += ByteString( String( e.Message ), RTL_TEXTENCODING_UTF8 ); DBG_ERRORFILE( aMsg.GetBuffer() ); @@ -563,7 +563,7 @@ sal_Int16 CalendarWrapper::getNumberOfMonthsInYear() const } catch ( Exception& e ) { -#ifndef PRODUCT +#ifdef DBG_UTIL ByteString aMsg( "getNumberOfMonthsInYear: Exception caught\n" ); aMsg += ByteString( String( e.Message ), RTL_TEXTENCODING_UTF8 ); DBG_ERRORFILE( aMsg.GetBuffer() ); @@ -584,7 +584,7 @@ sal_Int16 CalendarWrapper::getNumberOfDaysInWeek() const } catch ( Exception& e ) { -#ifndef PRODUCT +#ifdef DBG_UTIL ByteString aMsg( "getNumberOfDaysInWeek: Exception caught\n" ); aMsg += ByteString( String( e.Message ), RTL_TEXTENCODING_UTF8 ); DBG_ERRORFILE( aMsg.GetBuffer() ); @@ -605,7 +605,7 @@ sal_Int16 CalendarWrapper::getNumberOfDaysInWeek() const } catch ( Exception& e ) { -#ifndef PRODUCT +#ifdef DBG_UTIL ByteString aMsg( "getMonths: Exception caught\n" ); aMsg += ByteString( String( e.Message ), RTL_TEXTENCODING_UTF8 ); DBG_ERRORFILE( aMsg.GetBuffer() ); @@ -626,7 +626,7 @@ sal_Int16 CalendarWrapper::getNumberOfDaysInWeek() const } catch ( Exception& e ) { -#ifndef PRODUCT +#ifdef DBG_UTIL ByteString aMsg( "getDays: Exception caught\n" ); aMsg += ByteString( String( e.Message ), RTL_TEXTENCODING_UTF8 ); DBG_ERRORFILE( aMsg.GetBuffer() ); @@ -647,7 +647,7 @@ String CalendarWrapper::getDisplayName( sal_Int16 nCalendarDisplayIndex, sal_Int } catch ( Exception& e ) { -#ifndef PRODUCT +#ifdef DBG_UTIL ByteString aMsg( "getDisplayName: Exception caught\n" ); aMsg += ByteString( String( e.Message ), RTL_TEXTENCODING_UTF8 ); DBG_ERRORFILE( aMsg.GetBuffer() ); @@ -670,7 +670,7 @@ String CalendarWrapper::getDisplayString( sal_Int32 nCalendarDisplayCode, sal_In } catch ( Exception& e ) { -#ifndef PRODUCT +#ifdef DBG_UTIL ByteString aMsg( "getDisplayString: Exception caught\n" ); aMsg += ByteString( String( e.Message ), RTL_TEXTENCODING_UTF8 ); DBG_ERRORFILE( aMsg.GetBuffer() ); diff --git a/unotools/source/i18n/charclass.cxx b/unotools/source/i18n/charclass.cxx index c1b6b4bc155c..5b411d1bb519 100644 --- a/unotools/source/i18n/charclass.cxx +++ b/unotools/source/i18n/charclass.cxx @@ -538,7 +538,7 @@ sal_Int32 CharClass::getStringType( const String& rStr, xub_StrLen nPos, xub_Str } catch ( Exception& e ) { -#ifndef PRODUCT +#ifdef DBG_UTIL ByteString aMsg( "parseAnyToken: Exception caught\n" ); aMsg += ByteString( String( e.Message ), RTL_TEXTENCODING_UTF8 ); DBG_ERRORFILE( aMsg.GetBuffer() ); @@ -570,7 +570,7 @@ sal_Int32 CharClass::getStringType( const String& rStr, xub_StrLen nPos, xub_Str } catch ( Exception& e ) { -#ifndef PRODUCT +#ifdef DBG_UTIL ByteString aMsg( "parsePredefinedToken: Exception caught\n" ); aMsg += ByteString( String( e.Message ), RTL_TEXTENCODING_UTF8 ); DBG_ERRORFILE( aMsg.GetBuffer() ); diff --git a/unotools/source/i18n/localedatawrapper.cxx b/unotools/source/i18n/localedatawrapper.cxx index 074ff7af716a..fa70cc3dda81 100644 --- a/unotools/source/i18n/localedatawrapper.cxx +++ b/unotools/source/i18n/localedatawrapper.cxx @@ -1991,7 +1991,7 @@ void LocaleDataWrapper::evaluateLocaleDataChecking() nCheck = nLocaleDataChecking; if (!nCheck) { -#ifndef PRODUCT +#ifdef DBG_UTIL nCheck = 1; #else const char* pEnv = getenv( "OOO_ENABLE_LOCALE_DATA_CHECKS"); diff --git a/unotools/source/i18n/transliterationwrapper.cxx b/unotools/source/i18n/transliterationwrapper.cxx index bd33e447471f..7647a6abc345 100644 --- a/unotools/source/i18n/transliterationwrapper.cxx +++ b/unotools/source/i18n/transliterationwrapper.cxx @@ -191,7 +191,7 @@ void TransliterationWrapper::loadModuleImpl() const } catch ( Exception& e ) { -#ifndef PRODUCT +#ifdef DBG_UTIL ByteString aMsg( "loadModuleImpl: Exception caught\n" ); aMsg += ByteString( String( e.Message ), RTL_TEXTENCODING_UTF8 ); DBG_ERRORFILE( aMsg.GetBuffer() ); @@ -218,7 +218,7 @@ void TransliterationWrapper::loadModuleByImplName( } catch ( Exception& e ) { -#ifndef PRODUCT +#ifdef DBG_UTIL ByteString aMsg( "loadModuleByImplName: Exception caught\n" ); aMsg += ByteString( String( e.Message ), RTL_TEXTENCODING_UTF8 ); DBG_ERRORFILE( aMsg.GetBuffer() ); @@ -244,7 +244,7 @@ sal_Bool TransliterationWrapper::equals( } catch ( Exception& e ) { -#ifndef PRODUCT +#ifdef DBG_UTIL ByteString aMsg( "equals: Exception caught\n" ); aMsg += ByteString( String( e.Message ), RTL_TEXTENCODING_UTF8 ); DBG_ERRORFILE( aMsg.GetBuffer() ); @@ -269,7 +269,7 @@ sal_Int32 TransliterationWrapper::compareSubstring( } catch ( Exception& e ) { -#ifndef PRODUCT +#ifdef DBG_UTIL ByteString aMsg( "compareSubstring: Exception caught\n" ); aMsg += ByteString( String( e.Message ), RTL_TEXTENCODING_UTF8 ); DBG_ERRORFILE( aMsg.GetBuffer() ); @@ -292,7 +292,7 @@ sal_Int32 TransliterationWrapper::compareString( const String& rStr1, const Stri } catch ( Exception& e ) { -#ifndef PRODUCT +#ifdef DBG_UTIL ByteString aMsg( "compareString: Exception caught\n" ); aMsg += ByteString( String( e.Message ), RTL_TEXTENCODING_UTF8 ); DBG_ERRORFILE( aMsg.GetBuffer() ); diff --git a/unotools/source/property/propertysetinfo.cxx b/unotools/source/property/propertysetinfo.cxx index b8b5f8bb5125..ced5ae10a9d7 100644 --- a/unotools/source/property/propertysetinfo.cxx +++ b/unotools/source/property/propertysetinfo.cxx @@ -79,7 +79,7 @@ void PropertyMapImpl::add( PropertyMapEntry* pMap ) throw() { OUString aName( pMap->mpName, pMap->mnNameLen, RTL_TEXTENCODING_ASCII_US ); -#ifndef PRODUCT +#ifdef DBG_UTIL PropertyMap::iterator aIter = maPropertyMap.find( aName ); if( aIter != maPropertyMap.end() ) { -- cgit