From d1076b1b7f4049d8820f410d72c7a60bfac95152 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Sat, 8 Oct 2011 18:56:48 +0200 Subject: Second attempt at (cross-platform) OSL_FORMAT. --- sfx2/source/appl/module.cxx | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'sfx2') diff --git a/sfx2/source/appl/module.cxx b/sfx2/source/appl/module.cxx index 8fa50b38077a..6883e90f5ff5 100644 --- a/sfx2/source/appl/module.cxx +++ b/sfx2/source/appl/module.cxx @@ -391,13 +391,11 @@ FieldUnit SfxModule::GetModuleFieldUnit( ::com::sun::star::uno::Reference< ::com SfxPoolItem const * pItem = pModule->GetItem( SID_ATTR_METRIC ); if ( pItem == NULL ) { -#if OSL_DEBUG_LEVEL > 0 - ::rtl::OStringBuffer message; - message.append( "SfxModule::GetFieldUnit: no metric item in the module implemented by '" ); - message.append( typeid( *pModule ).name() ); - message.append( "'!" ); - OSL_ENSURE( false, message.makeStringAndClear().getStr() ); -#endif + OSL_FAIL( + OSL_FORMAT( + ("SfxModule::GetFieldUnit: no metric item in the module" + " implemented by '%s'!"), + typeid(*pModule).name())); return FUNIT_100TH_MM; } return (FieldUnit)( (SfxUInt16Item*)pItem )->GetValue(); -- cgit