summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Arnhold <thomas@arnhold.org>2011-03-12 11:47:36 +0100
committerThomas Arnhold <thomas@arnhold.org>2011-03-12 14:19:17 +0100
commitd86e9a3906b5c2c51a7a04dac0a63c9f74196991 (patch)
tree6edeb296b93516795e8159f8c2ee04c544cc1874
parente6216e1ce6b399a10019b5d11b6fef6961fc0f74 (diff)
Move OSL_ENSURE(false,...) to OSL_FAIL(...)
-rw-r--r--basegfx/inc/basegfx/raster/bpixelraster.hxx4
-rw-r--r--basegfx/inc/basegfx/raster/bzpixelraster.hxx4
-rw-r--r--basegfx/source/matrix/b2dhommatrixtools.cxx2
-rw-r--r--basegfx/source/polygon/b2dpolypolygonrasterconverter.cxx3
-rw-r--r--basegfx/source/polygon/b2dsvgpolypolygon.cxx2
-rw-r--r--basegfx/source/polygon/b2dtrapezoid.cxx4
-rw-r--r--basegfx/source/tools/keystoplerp.cxx3
-rw-r--r--canvas/inc/canvas/canvastools.hxx7
-rw-r--r--canvas/source/cairo/cairo_quartz_cairo.cxx2
-rw-r--r--canvas/source/cairo/cairo_spritedevicehelper.cxx4
-rw-r--r--canvas/source/cairo/cairo_win32_cairo.cxx2
-rw-r--r--canvas/source/directx/dx_5rm.cxx3
-rw-r--r--canvas/source/directx/dx_9rm.cxx3
-rw-r--r--canvas/source/directx/dx_canvashelper.cxx3
-rw-r--r--canvas/source/directx/dx_config.cxx6
-rw-r--r--canvas/source/directx/dx_spritedevicehelper.cxx4
-rw-r--r--canvas/source/tools/prioritybooster.cxx3
-rw-r--r--canvas/source/vcl/spritedevicehelper.cxx4
-rw-r--r--canvas/source/vcl/spritehelper.cxx3
-rw-r--r--comphelper/source/container/enumerablemap.cxx2
-rw-r--r--comphelper/source/misc/accessiblewrapper.cxx3
-rw-r--r--comphelper/source/misc/documentinfo.cxx2
-rw-r--r--comphelper/source/misc/logging.cxx18
-rw-r--r--comphelper/source/misc/mediadescriptor.cxx2
-rw-r--r--comphelper/source/misc/namedvaluecollection.cxx2
-rw-r--r--comphelper/source/misc/officeresourcebundle.cxx8
-rw-r--r--comphelper/source/misc/scopeguard.cxx6
-rw-r--r--comphelper/source/misc/servicedecl.cxx2
-rw-r--r--comphelper/source/property/propagg.cxx2
-rw-r--r--comphelper/source/property/propertycontainerhelper.cxx8
-rw-r--r--cppcanvas/source/mtfrenderer/implrenderer.cxx9
-rw-r--r--cppcanvas/source/mtfrenderer/textaction.cxx15
-rw-r--r--cppcanvas/source/mtfrenderer/transparencygroupaction.cxx6
-rw-r--r--dtrans/source/os2/clipb/Os2Clipboard.cxx4
-rw-r--r--dtrans/source/win32/clipb/WinClipboard.cxx4
-rw-r--r--dtrans/source/win32/dnd/source.cxx2
-rw-r--r--dtrans/source/win32/dtobj/FmtFilter.cxx2
-rw-r--r--sax/source/expatwrap/saxwriter.cxx2
-rw-r--r--sax/source/tools/converter.cxx4
-rw-r--r--sot/source/base/filelist.cxx2
-rw-r--r--svtools/source/dialogs/roadmapwizard.cxx2
-rw-r--r--svtools/source/productregistration/productregistration.cxx4
-rw-r--r--svtools/source/toolpanel/paneltabbar.cxx4
-rw-r--r--svtools/source/toolpanel/tablayouter.cxx2
-rw-r--r--svtools/source/uno/wizard/unowizard.cxx2
-rw-r--r--svtools/source/uno/wizard/wizardshell.cxx2
-rw-r--r--toolkit/source/awt/vclxwindow.cxx6
-rw-r--r--toolkit/source/awt/vclxwindows.cxx4
-rw-r--r--tools/source/fsys/urlobj.cxx4
-rw-r--r--tools/source/string/tstring.cxx4
-rw-r--r--ucbhelper/source/provider/configureucb.cxx7
-rw-r--r--ucbhelper/source/provider/provconf.cxx33
-rw-r--r--unotools/source/config/bootstrap.cxx4
-rw-r--r--unotools/source/config/configitem.cxx2
-rw-r--r--unotools/source/config/configmgr.cxx12
-rw-r--r--unotools/source/config/configpathes.cxx2
-rw-r--r--unotools/source/config/inetoptions.cxx6
-rw-r--r--vcl/source/control/imgctrl.cxx4
-rw-r--r--vcl/source/gdi/image.cxx2
59 files changed, 119 insertions, 158 deletions
diff --git a/basegfx/inc/basegfx/raster/bpixelraster.hxx b/basegfx/inc/basegfx/raster/bpixelraster.hxx
index b479384bb806..e5615325cf0d 100644
--- a/basegfx/inc/basegfx/raster/bpixelraster.hxx
+++ b/basegfx/inc/basegfx/raster/bpixelraster.hxx
@@ -92,7 +92,7 @@ namespace basegfx
#ifdef DBG_UTIL
if(nIndex >= mnCount)
{
- OSL_ENSURE(false, "getBPixel: Access out of range (!)");
+ OSL_FAIL("getBPixel: Access out of range (!)");
return BPixel::getEmptyBPixel();
}
#endif
@@ -105,7 +105,7 @@ namespace basegfx
#ifdef DBG_UTIL
if(nIndex >= mnCount)
{
- OSL_ENSURE(false, "getBPixel: Access out of range (!)");
+ OSL_FAIL("getBPixel: Access out of range (!)");
return mpContent[0L];
}
#endif
diff --git a/basegfx/inc/basegfx/raster/bzpixelraster.hxx b/basegfx/inc/basegfx/raster/bzpixelraster.hxx
index 9e3cd6db36f1..b849f2491289 100644
--- a/basegfx/inc/basegfx/raster/bzpixelraster.hxx
+++ b/basegfx/inc/basegfx/raster/bzpixelraster.hxx
@@ -72,7 +72,7 @@ namespace basegfx
#ifdef DBG_UTIL
if(nIndex >= mnCount)
{
- OSL_ENSURE(false, "getZ: Access out of range (!)");
+ OSL_FAIL("getZ: Access out of range (!)");
return mpZBuffer[0L];
}
#endif
@@ -85,7 +85,7 @@ namespace basegfx
#ifdef DBG_UTIL
if(nIndex >= mnCount)
{
- OSL_ENSURE(false, "getZ: Access out of range (!)");
+ OSL_FAIL("getZ: Access out of range (!)");
return mpZBuffer[0L];
}
#endif
diff --git a/basegfx/source/matrix/b2dhommatrixtools.cxx b/basegfx/source/matrix/b2dhommatrixtools.cxx
index 8c4b2d68a79b..5c24aaec973d 100644
--- a/basegfx/source/matrix/b2dhommatrixtools.cxx
+++ b/basegfx/source/matrix/b2dhommatrixtools.cxx
@@ -95,7 +95,7 @@ namespace basegfx
break;
default:
- OSL_ENSURE( false, "createSinCos: Impossible case reached" );
+ OSL_FAIL( "createSinCos: Impossible case reached" );
}
}
else
diff --git a/basegfx/source/polygon/b2dpolypolygonrasterconverter.cxx b/basegfx/source/polygon/b2dpolypolygonrasterconverter.cxx
index d6e1dee3fe6c..95c310b7dcc9 100644
--- a/basegfx/source/polygon/b2dpolypolygonrasterconverter.cxx
+++ b/basegfx/source/polygon/b2dpolypolygonrasterconverter.cxx
@@ -591,8 +591,7 @@ namespace basegfx
switch( eFillRule )
{
default:
- OSL_ENSURE(false,
- "B2DPolyPolygonRasterConverter::rasterConvert(): Unexpected fill rule");
+ OSL_FAIL("B2DPolyPolygonRasterConverter::rasterConvert(): Unexpected fill rule");
return;
case FillRule_EVEN_ODD:
diff --git a/basegfx/source/polygon/b2dsvgpolypolygon.cxx b/basegfx/source/polygon/b2dsvgpolypolygon.cxx
index c42ea4d8b65b..50a04dbaa075 100644
--- a/basegfx/source/polygon/b2dsvgpolypolygon.cxx
+++ b/basegfx/source/polygon/b2dsvgpolypolygon.cxx
@@ -826,7 +826,7 @@ namespace basegfx
default:
{
- OSL_ENSURE(false, "importFromSvgD(): skipping tags in svg:d element (unknown)!");
+ OSL_FAIL("importFromSvgD(): skipping tags in svg:d element (unknown)!");
OSL_TRACE("importFromSvgD(): skipping tags in svg:d element (unknown: \"%c\")!", aCurrChar);
++nPos;
break;
diff --git a/basegfx/source/polygon/b2dtrapezoid.cxx b/basegfx/source/polygon/b2dtrapezoid.cxx
index 60f45f98d020..ad9c2dbecce4 100644
--- a/basegfx/source/polygon/b2dtrapezoid.cxx
+++ b/basegfx/source/polygon/b2dtrapezoid.cxx
@@ -622,7 +622,7 @@ namespace basegfx
// to not have an endless loop and start next. During development
// i constantly had breakpoints here, so i am sure enough to add an
// assertion here
- OSL_ENSURE(false, "Trapeziod decomposer in illegal state (!)");
+ OSL_FAIL("Trapeziod decomposer in illegal state (!)");
maTrDeEdgeEntries.pop_front();
continue;
}
@@ -636,7 +636,7 @@ namespace basegfx
// line; consume the single edge to not have an endless loop and start
// next. During development i constantly had breakpoints here, so i am
// sure enough to add an assertion here
- OSL_ENSURE(false, "Trapeziod decomposer in illegal state (!)");
+ OSL_FAIL("Trapeziod decomposer in illegal state (!)");
maTrDeEdgeEntries.pop_front();
continue;
}
diff --git a/basegfx/source/tools/keystoplerp.cxx b/basegfx/source/tools/keystoplerp.cxx
index 8dc22c4e79e9..ef2ae11b4b0a 100644
--- a/basegfx/source/tools/keystoplerp.cxx
+++ b/basegfx/source/tools/keystoplerp.cxx
@@ -45,8 +45,7 @@ static void validateInput(const std::vector<double>& rKeyStops)
for( ::std::size_t i=1, len=rKeyStops.size(); i<len; ++i )
{
if( rKeyStops[i-1] > rKeyStops[i] )
- OSL_ENSURE( false,
- "KeyStopLerp::KeyStopLerp(): time vector is not sorted in ascending order!" );
+ OSL_FAIL( "KeyStopLerp::KeyStopLerp(): time vector is not sorted in ascending order!" );
}
#endif
}
diff --git a/canvas/inc/canvas/canvastools.hxx b/canvas/inc/canvas/canvastools.hxx
index 215209f4b0da..30cb614e1a62 100644
--- a/canvas/inc/canvas/canvastools.hxx
+++ b/canvas/inc/canvas/canvastools.hxx
@@ -565,7 +565,7 @@ namespace canvas
{
OSL_TRACE("ValueMap::ValueMap(): Key %s is not lowercase",
pMap->maKey);
- OSL_ENSURE( false, "ValueMap::ValueMap(): Key is not lowercase" );
+ OSL_FAIL( "ValueMap::ValueMap(): Key is not lowercase" );
}
if( mnEntries > 1 )
@@ -578,8 +578,7 @@ namespace canvas
OSL_TRACE("ValueMap::ValueMap(): Map is not sorted, keys %s and %s are wrong",
pMap[0].maKey,
pMap[1].maKey);
- OSL_ENSURE( false,
- "ValueMap::ValueMap(): Map is not sorted" );
+ OSL_FAIL( "ValueMap::ValueMap(): Map is not sorted" );
}
const ::rtl::OString aStr2( pMap[1].maKey );
@@ -588,7 +587,7 @@ namespace canvas
{
OSL_TRACE("ValueMap::ValueMap(): Key %s is not lowercase",
pMap[1].maKey);
- OSL_ENSURE( false, "ValueMap::ValueMap(): Key is not lowercase" );
+ OSL_FAIL( "ValueMap::ValueMap(): Key is not lowercase" );
}
}
}
diff --git a/canvas/source/cairo/cairo_quartz_cairo.cxx b/canvas/source/cairo/cairo_quartz_cairo.cxx
index ea71db57a3d2..e24ba9c3ab80 100644
--- a/canvas/source/cairo/cairo_quartz_cairo.cxx
+++ b/canvas/source/cairo/cairo_quartz_cairo.cxx
@@ -188,7 +188,7 @@ namespace cairo
**/
void QuartzSurface::Resize( int width, int height )
{
- OSL_ENSURE(false,"not supposed to be called!");
+ OSL_FAIL("not supposed to be called!");
}
diff --git a/canvas/source/cairo/cairo_spritedevicehelper.cxx b/canvas/source/cairo/cairo_spritedevicehelper.cxx
index 8167775977c2..91cceeeea4d3 100644
--- a/canvas/source/cairo/cairo_spritedevicehelper.cxx
+++ b/canvas/source/cairo/cairo_spritedevicehelper.cxx
@@ -99,13 +99,13 @@ namespace cairocanvas
::sal_Bool SpriteDeviceHelper::showBuffer( bool, ::sal_Bool )
{
- OSL_ENSURE(false,"Not supposed to be called, handled by SpriteCanvas");
+ OSL_FAIL("Not supposed to be called, handled by SpriteCanvas");
return sal_False;
}
::sal_Bool SpriteDeviceHelper::switchBuffer( bool, ::sal_Bool )
{
- OSL_ENSURE(false,"Not supposed to be called, handled by SpriteCanvas");
+ OSL_FAIL("Not supposed to be called, handled by SpriteCanvas");
return sal_False;
}
diff --git a/canvas/source/cairo/cairo_win32_cairo.cxx b/canvas/source/cairo/cairo_win32_cairo.cxx
index 47959c47afeb..752e7c74a3f8 100644
--- a/canvas/source/cairo/cairo_win32_cairo.cxx
+++ b/canvas/source/cairo/cairo_win32_cairo.cxx
@@ -172,7 +172,7 @@ namespace cairo
**/
void Win32Surface::Resize( int /*width*/, int /*height*/ )
{
- OSL_ENSURE(false,"not supposed to be called!");
+ OSL_FAIL("not supposed to be called!");
}
void Win32Surface::flush() const
diff --git a/canvas/source/directx/dx_5rm.cxx b/canvas/source/directx/dx_5rm.cxx
index 000cc41e90ce..152c15ccdf3a 100644
--- a/canvas/source/directx/dx_5rm.cxx
+++ b/canvas/source/directx/dx_5rm.cxx
@@ -2176,8 +2176,7 @@ namespace dxcanvas
}
default:
- OSL_ENSURE( false,
- "DXRenderModule::pushVertex(): unexpected primitive types" );
+ OSL_FAIL( "DXRenderModule::pushVertex(): unexpected primitive types" );
break;
}
}
diff --git a/canvas/source/directx/dx_9rm.cxx b/canvas/source/directx/dx_9rm.cxx
index fde5f3bfd394..aaae34e64198 100644
--- a/canvas/source/directx/dx_9rm.cxx
+++ b/canvas/source/directx/dx_9rm.cxx
@@ -1183,8 +1183,7 @@ namespace dxcanvas
}
default:
- OSL_ENSURE(false,
- "DXRenderModule::pushVertex(): unexpected primitive type");
+ OSL_FAIL("DXRenderModule::pushVertex(): unexpected primitive type");
break;
}
}
diff --git a/canvas/source/directx/dx_canvashelper.cxx b/canvas/source/directx/dx_canvashelper.cxx
index a762053c33e1..5cb18200991d 100644
--- a/canvas/source/directx/dx_canvashelper.cxx
+++ b/canvas/source/directx/dx_canvashelper.cxx
@@ -91,8 +91,7 @@ namespace dxcanvas
switch( nJoinType )
{
case rendering::PathJoinType::NONE:
- OSL_ENSURE( false,
- "gdiJoinFromJoin(): Join NONE not possible, mapping to MITER" );
+ OSL_FAIL( "gdiJoinFromJoin(): Join NONE not possible, mapping to MITER" );
// FALLTHROUGH intended
case rendering::PathJoinType::MITER:
return Gdiplus::LineJoinMiter;
diff --git a/canvas/source/directx/dx_config.cxx b/canvas/source/directx/dx_config.cxx
index 313cd2b186df..13cda074ec1a 100644
--- a/canvas/source/directx/dx_config.cxx
+++ b/canvas/source/directx/dx_config.cxx
@@ -93,8 +93,7 @@ namespace dxcanvas
}
catch( uno::Exception& )
{
- OSL_ENSURE( false,
- rtl::OUStringToOString(
+ OSL_FAIL( rtl::OUStringToOString(
comphelper::anyToString( cppu::getCaughtException() ),
RTL_TEXTENCODING_UTF8 ).getStr() );
}
@@ -135,8 +134,7 @@ namespace dxcanvas
}
catch( uno::Exception& )
{
- OSL_ENSURE( false,
- rtl::OUStringToOString(
+ OSL_FAIL( rtl::OUStringToOString(
comphelper::anyToString( cppu::getCaughtException() ),
RTL_TEXTENCODING_UTF8 ).getStr() );
}
diff --git a/canvas/source/directx/dx_spritedevicehelper.cxx b/canvas/source/directx/dx_spritedevicehelper.cxx
index 4791c32377b6..4680cd3428df 100644
--- a/canvas/source/directx/dx_spritedevicehelper.cxx
+++ b/canvas/source/directx/dx_spritedevicehelper.cxx
@@ -205,13 +205,13 @@ namespace dxcanvas
::sal_Bool SpriteDeviceHelper::showBuffer( bool, ::sal_Bool )
{
- OSL_ENSURE(false,"Not supposed to be called, handled by SpriteCanvas");
+ OSL_FAIL("Not supposed to be called, handled by SpriteCanvas");
return sal_False;
}
::sal_Bool SpriteDeviceHelper::switchBuffer( bool, ::sal_Bool )
{
- OSL_ENSURE(false,"Not supposed to be called, handled by SpriteCanvas");
+ OSL_FAIL("Not supposed to be called, handled by SpriteCanvas");
return sal_False;
}
diff --git a/canvas/source/tools/prioritybooster.cxx b/canvas/source/tools/prioritybooster.cxx
index e5291359d099..d9a7e5593e95 100644
--- a/canvas/source/tools/prioritybooster.cxx
+++ b/canvas/source/tools/prioritybooster.cxx
@@ -64,8 +64,7 @@ namespace canvas
if ( 0 == SetThreadPriority( aCurrThread, mpImpl->mnOldPriority + nDelta ) )
{
- OSL_ENSURE( false,
- "PriorityBooster::PriorityBooster(): Was not able to modify thread priority" );
+ OSL_FAIL( "PriorityBooster::PriorityBooster(): Was not able to modify thread priority" );
}
#else
(void)nDelta;
diff --git a/canvas/source/vcl/spritedevicehelper.cxx b/canvas/source/vcl/spritedevicehelper.cxx
index c11adbd7abc0..5a3509612ba1 100644
--- a/canvas/source/vcl/spritedevicehelper.cxx
+++ b/canvas/source/vcl/spritedevicehelper.cxx
@@ -89,13 +89,13 @@ namespace vclcanvas
::sal_Bool SpriteDeviceHelper::showBuffer( bool, ::sal_Bool )
{
- OSL_ENSURE(false,"Not supposed to be called, handled by SpriteCanvas");
+ OSL_FAIL("Not supposed to be called, handled by SpriteCanvas");
return sal_False;
}
::sal_Bool SpriteDeviceHelper::switchBuffer( bool, ::sal_Bool )
{
- OSL_ENSURE(false,"Not supposed to be called, handled by SpriteCanvas");
+ OSL_FAIL("Not supposed to be called, handled by SpriteCanvas");
return sal_False;
}
diff --git a/canvas/source/vcl/spritehelper.cxx b/canvas/source/vcl/spritehelper.cxx
index 2fa8a6d441c4..6dcf6868f165 100644
--- a/canvas/source/vcl/spritehelper.cxx
+++ b/canvas/source/vcl/spritehelper.cxx
@@ -167,8 +167,7 @@ namespace vclcanvas
#ifndef QUARTZ
if( aMask.GetBitCount() != 1 )
{
- OSL_ENSURE(false,
- "CanvasCustomSprite::redraw(): Mask bitmap is not "
+ OSL_FAIL("CanvasCustomSprite::redraw(): Mask bitmap is not "
"monochrome (performance!)");
aMask.MakeMono(255);
}
diff --git a/comphelper/source/container/enumerablemap.cxx b/comphelper/source/container/enumerablemap.cxx
index b3864d9b8c06..ab0af3e53e8f 100644
--- a/comphelper/source/container/enumerablemap.cxx
+++ b/comphelper/source/container/enumerablemap.cxx
@@ -319,7 +319,7 @@ namespace comphelper
return;
}
}
- OSL_ENSURE( false, "lcl_revokeMapModificationListener: the listener is not registered!" );
+ OSL_FAIL( "lcl_revokeMapModificationListener: the listener is not registered!" );
}
//--------------------------------------------------------------------
diff --git a/comphelper/source/misc/accessiblewrapper.cxx b/comphelper/source/misc/accessiblewrapper.cxx
index 2220e15563b9..693d2bbe3218 100644
--- a/comphelper/source/misc/accessiblewrapper.cxx
+++ b/comphelper/source/misc/accessiblewrapper.cxx
@@ -161,8 +161,7 @@ namespace comphelper
if (!m_aChildrenMap.insert(
AccessibleMap::value_type( _rxKey, xValue ) ).second)
{
- OSL_ENSURE(
- false,
+ OSL_FAIL(
"OWrappedAccessibleChildrenManager::"
"getAccessibleWrapperFor: element was already"
" inserted!" );
diff --git a/comphelper/source/misc/documentinfo.cxx b/comphelper/source/misc/documentinfo.cxx
index c1884ba513c2..a9b9a85f7f69 100644
--- a/comphelper/source/misc/documentinfo.cxx
+++ b/comphelper/source/misc/documentinfo.cxx
@@ -187,7 +187,7 @@ namespace comphelper {
sMessage += "\nin function:\n";
sMessage += BOOST_CURRENT_FUNCTION;
sMessage += "\n";
- OSL_ENSURE( false, sMessage );
+ OSL_FAIL( sMessage );
}
return sTitle;
diff --git a/comphelper/source/misc/logging.cxx b/comphelper/source/misc/logging.cxx
index 48b99a6ff94d..6d87b0fb528a 100644
--- a/comphelper/source/misc/logging.cxx
+++ b/comphelper/source/misc/logging.cxx
@@ -104,7 +104,7 @@ namespace comphelper
catch( const Exception& e )
{
(void)e;
- OSL_ENSURE( false, "EventLogger_Impl::impl_createLogger_nothrow: caught an exception!" );
+ OSL_FAIL( "EventLogger_Impl::impl_createLogger_nothrow: caught an exception!" );
}
}
@@ -145,7 +145,7 @@ namespace comphelper
catch( const Exception& e )
{
(void)e;
- OSL_ENSURE( false, "EventLogger::getLogLevel: caught an exception!" );
+ OSL_FAIL( "EventLogger::getLogLevel: caught an exception!" );
}
return LogLevel::OFF;
@@ -162,7 +162,7 @@ namespace comphelper
catch( const Exception& e )
{
(void)e;
- OSL_ENSURE( false, "EventLogger::setLogLevel: caught an exception!" );
+ OSL_FAIL( "EventLogger::setLogLevel: caught an exception!" );
}
}
@@ -179,7 +179,7 @@ namespace comphelper
catch( const Exception& e )
{
(void)e;
- OSL_ENSURE( false, "EventLogger::isLoggable: caught an exception!" );
+ OSL_FAIL( "EventLogger::isLoggable: caught an exception!" );
}
return false;
@@ -199,7 +199,7 @@ namespace comphelper
catch( const Exception& e )
{
(void)e;
- OSL_ENSURE( false, "EventLogger::addLogHandler: caught an exception!" );
+ OSL_FAIL( "EventLogger::addLogHandler: caught an exception!" );
}
return false;
}
@@ -218,7 +218,7 @@ namespace comphelper
catch( const Exception& e )
{
(void)e;
- OSL_ENSURE( false, "EventLogger::removeLogHandler: caught an exception!" );
+ OSL_FAIL( "EventLogger::removeLogHandler: caught an exception!" );
}
return false;
}
@@ -292,7 +292,7 @@ namespace comphelper
catch( const Exception& e )
{
(void)e;
- OSL_ENSURE( false, "EventLogger::impl_log: caught an exception!" );
+ OSL_FAIL( "EventLogger::impl_log: caught an exception!" );
}
return false;
@@ -335,7 +335,7 @@ namespace comphelper
catch( const Exception& e )
{
(void)e;
- OSL_ENSURE( false, "lcl_loadBundle_nothrow: caught an exception!" );
+ OSL_FAIL( "lcl_loadBundle_nothrow: caught an exception!" );
}
return _rLoggerData.xBundle.is();
@@ -356,7 +356,7 @@ namespace comphelper
catch( const Exception& e )
{
(void)e;
- OSL_ENSURE( false, "lcl_loadString_nothrow: caught an exception!" );
+ OSL_FAIL( "lcl_loadString_nothrow: caught an exception!" );
}
return sMessage;
}
diff --git a/comphelper/source/misc/mediadescriptor.cxx b/comphelper/source/misc/mediadescriptor.cxx
index 8dbe084cd3f5..f8b8ba7fde35 100644
--- a/comphelper/source/misc/mediadescriptor.cxx
+++ b/comphelper/source/misc/mediadescriptor.cxx
@@ -658,7 +658,7 @@ sal_Bool MediaDescriptor::impl_openStreamWithPostData( const css::uno::Reference
// success?
if ( !xResultStream.is() )
{
- OSL_ENSURE( false, "no valid reply to the HTTP-Post" );
+ OSL_FAIL( "no valid reply to the HTTP-Post" );
return sal_False;
}
diff --git a/comphelper/source/misc/namedvaluecollection.cxx b/comphelper/source/misc/namedvaluecollection.cxx
index 3effa876c4c2..d758cee5f371 100644
--- a/comphelper/source/misc/namedvaluecollection.cxx
+++ b/comphelper/source/misc/namedvaluecollection.cxx
@@ -195,7 +195,7 @@ namespace comphelper
::rtl::OStringBuffer message;
message.append( "NamedValueCollection::impl_assign: encountered a value type which I cannot handle:\n" );
message.append( ::rtl::OUStringToOString( pArgument->getValueTypeName(), RTL_TEXTENCODING_ASCII_US ) );
- OSL_ENSURE( false, message.makeStringAndClear() );
+ OSL_FAIL( message.makeStringAndClear() );
}
#endif
}
diff --git a/comphelper/source/misc/officeresourcebundle.cxx b/comphelper/source/misc/officeresourcebundle.cxx
index 942a8e618261..2e2119cb2ee3 100644
--- a/comphelper/source/misc/officeresourcebundle.cxx
+++ b/comphelper/source/misc/officeresourcebundle.cxx
@@ -137,7 +137,7 @@ namespace comphelper
}
catch( const Exception& )
{
- OSL_ENSURE( false, "ResourceBundle_Impl::loadString: caught an exception!" );
+ OSL_FAIL( "ResourceBundle_Impl::loadString: caught an exception!" );
}
}
return sString;
@@ -158,7 +158,7 @@ namespace comphelper
}
catch( const Exception& )
{
- OSL_ENSURE( false, "ResourceBundle_Impl::hasString: caught an exception!" );
+ OSL_FAIL( "ResourceBundle_Impl::hasString: caught an exception!" );
}
}
return has;
@@ -182,7 +182,7 @@ namespace comphelper
}
catch( const Exception& )
{
- OSL_ENSURE( false, "ResourceBundle_Impl::impl_loadBundle_nopthrow: could not create the resource loader!" );
+ OSL_FAIL( "ResourceBundle_Impl::impl_loadBundle_nopthrow: could not create the resource loader!" );
}
if ( !xLoader.is() )
@@ -194,7 +194,7 @@ namespace comphelper
}
catch( const MissingResourceException& )
{
- OSL_ENSURE( false, "ResourceBundle_Impl::impl_loadBundle_nopthrow: missing the given resource bundle!" );
+ OSL_FAIL( "ResourceBundle_Impl::impl_loadBundle_nopthrow: missing the given resource bundle!" );
}
return m_xBundle.is();
diff --git a/comphelper/source/misc/scopeguard.cxx b/comphelper/source/misc/scopeguard.cxx
index 66cfd231293d..a8df29a7ac81 100644
--- a/comphelper/source/misc/scopeguard.cxx
+++ b/comphelper/source/misc/scopeguard.cxx
@@ -46,14 +46,14 @@ ScopeGuard::~ScopeGuard()
}
catch (com::sun::star::uno::Exception & exc) {
(void) exc; // avoid warning about unused variable
- OSL_ENSURE(
- false, rtl::OUStringToOString(
+ OSL_FAIL(
+ rtl::OUStringToOString(
rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(
"UNO exception occurred: ") ) +
exc.Message, RTL_TEXTENCODING_UTF8 ).getStr() );
}
catch (...) {
- OSL_ENSURE( false, "unknown exception occurred!" );
+ OSL_FAIL( "unknown exception occurred!" );
}
}
else
diff --git a/comphelper/source/misc/servicedecl.cxx b/comphelper/source/misc/servicedecl.cxx
index 92e3b3ef7e44..c842f6298c08 100644
--- a/comphelper/source/misc/servicedecl.cxx
+++ b/comphelper/source/misc/servicedecl.cxx
@@ -142,7 +142,7 @@ bool ServiceDecl::writeInfo( registry::XRegistryKey * xKey ) const
bRet = true;
}
catch (registry::InvalidRegistryException const&) {
- OSL_ENSURE( false, "### InvalidRegistryException!" );
+ OSL_FAIL( "### InvalidRegistryException!" );
}
}
return bRet;
diff --git a/comphelper/source/property/propagg.cxx b/comphelper/source/property/propagg.cxx
index 48270b8e6f94..a0ae86c9a735 100644
--- a/comphelper/source/property/propagg.cxx
+++ b/comphelper/source/property/propagg.cxx
@@ -727,7 +727,7 @@ void SAL_CALL OPropertySetAggregationHelper::setPropertyValues(
aMessage.append( "\n(implementation " );
aMessage.append( typeid( *this ).name() );
aMessage.append( ")" );
- OSL_ENSURE( false, aMessage.getStr() );
+ OSL_FAIL( aMessage.getStr() );
#endif
}
}
diff --git a/comphelper/source/property/propertycontainerhelper.cxx b/comphelper/source/property/propertycontainerhelper.cxx
index b11dea0f1c9b..6233efbc011f 100644
--- a/comphelper/source/property/propertycontainerhelper.cxx
+++ b/comphelper/source/property/propertycontainerhelper.cxx
@@ -256,7 +256,7 @@ sal_Bool OPropertyContainerHelper::convertFastPropertyValue(
PropertiesIterator aPos = searchHandle(_nHandle);
if (aPos == m_aProperties.end())
{
- OSL_ENSURE( false, "OPropertyContainerHelper::convertFastPropertyValue: unknown handle!" );
+ OSL_FAIL( "OPropertyContainerHelper::convertFastPropertyValue: unknown handle!" );
// should not happen if the derived class has built a correct property set info helper to be used by
// our base class OPropertySetHelper
return bModified;
@@ -399,7 +399,7 @@ void OPropertyContainerHelper::setFastPropertyValue(sal_Int32 _nHandle, const An
PropertiesIterator aPos = searchHandle(_nHandle);
if (aPos == m_aProperties.end())
{
- OSL_ENSURE( false, "OPropertyContainerHelper::setFastPropertyValue: unknown handle!" );
+ OSL_FAIL( "OPropertyContainerHelper::setFastPropertyValue: unknown handle!" );
// should not happen if the derived class has built a correct property set info helper to be used by
// our base class OPropertySetHelper
return;
@@ -441,7 +441,7 @@ void OPropertyContainerHelper::getFastPropertyValue(Any& _rValue, sal_Int32 _nHa
PropertiesIterator aPos = const_cast<OPropertyContainerHelper*>(this)->searchHandle(_nHandle);
if (aPos == m_aProperties.end())
{
- OSL_ENSURE( false, "OPropertyContainerHelper::getFastPropertyValue: unknown handle!" );
+ OSL_FAIL( "OPropertyContainerHelper::getFastPropertyValue: unknown handle!" );
// should not happen if the derived class has built a correct property set info helper to be used by
// our base class OPropertySetHelper
return;
@@ -501,7 +501,7 @@ void OPropertyContainerHelper::modifyAttributes(sal_Int32 _nHandle, sal_Int32 _n
PropertiesIterator aPos = searchHandle(_nHandle);
if (aPos == m_aProperties.end())
{
- OSL_ENSURE( false, "OPropertyContainerHelper::modifyAttributes: unknown handle!" );
+ OSL_FAIL( "OPropertyContainerHelper::modifyAttributes: unknown handle!" );
// should not happen if the derived class has built a correct property set info helper to be used by
// our base class OPropertySetHelper
return;
diff --git a/cppcanvas/source/mtfrenderer/implrenderer.cxx b/cppcanvas/source/mtfrenderer/implrenderer.cxx
index d95bfeb24c9f..914a94e5822b 100644
--- a/cppcanvas/source/mtfrenderer/implrenderer.cxx
+++ b/cppcanvas/source/mtfrenderer/implrenderer.cxx
@@ -2684,8 +2684,7 @@ namespace cppcanvas
break;
default:
- OSL_ENSURE( false,
- "Unknown meta action type encountered" );
+ OSL_FAIL( "Unknown meta action type encountered" );
break;
}
@@ -3136,8 +3135,7 @@ namespace cppcanvas
}
catch( uno::Exception& )
{
- OSL_ENSURE( false,
- rtl::OUStringToOString(
+ OSL_FAIL( rtl::OUStringToOString(
comphelper::anyToString( cppu::getCaughtException() ),
RTL_TEXTENCODING_UTF8 ).getStr() );
@@ -3198,8 +3196,7 @@ namespace cppcanvas
}
catch( uno::Exception& )
{
- OSL_ENSURE( false,
- rtl::OUStringToOString(
+ OSL_FAIL( rtl::OUStringToOString(
comphelper::anyToString( cppu::getCaughtException() ),
RTL_TEXTENCODING_UTF8 ).getStr() );
diff --git a/cppcanvas/source/mtfrenderer/textaction.cxx b/cppcanvas/source/mtfrenderer/textaction.cxx
index de03dc3c90bf..eefa2674b867 100644
--- a/cppcanvas/source/mtfrenderer/textaction.cxx
+++ b/cppcanvas/source/mtfrenderer/textaction.cxx
@@ -728,8 +728,7 @@ namespace cppcanvas
bool TextAction::render( const ::basegfx::B2DHomMatrix& rTransformation,
const Subset& /*rSubset*/ ) const
{
- OSL_ENSURE( false,
- "TextAction::render(): Subset not supported by this object" );
+ OSL_FAIL( "TextAction::render(): Subset not supported by this object" );
// TODO(P1): Retrieve necessary font metric info for
// TextAction from XCanvas. Currently, the
@@ -760,8 +759,7 @@ namespace cppcanvas
::basegfx::B2DRange TextAction::getBounds( const ::basegfx::B2DHomMatrix& rTransformation,
const Subset& /*rSubset*/ ) const
{
- OSL_ENSURE( false,
- "TextAction::getBounds(): Subset not supported by this object" );
+ OSL_FAIL( "TextAction::getBounds(): Subset not supported by this object" );
// TODO(P1): Retrieve necessary font metric info for
// TextAction from XCanvas. Currently, the
@@ -966,8 +964,7 @@ namespace cppcanvas
bool EffectTextAction::render( const ::basegfx::B2DHomMatrix& rTransformation,
const Subset& /*rSubset*/ ) const
{
- OSL_ENSURE( false,
- "EffectTextAction::render(): Subset not supported by this object" );
+ OSL_FAIL( "EffectTextAction::render(): Subset not supported by this object" );
// TODO(P1): Retrieve necessary font metric info for
// TextAction from XCanvas. Currently, the
@@ -1003,8 +1000,7 @@ namespace cppcanvas
::basegfx::B2DRange EffectTextAction::getBounds( const ::basegfx::B2DHomMatrix& rTransformation,
const Subset& /*rSubset*/ ) const
{
- OSL_ENSURE( false,
- "EffectTextAction::getBounds(): Subset not supported by this object" );
+ OSL_FAIL( "EffectTextAction::getBounds(): Subset not supported by this object" );
// TODO(P1): Retrieve necessary font metric info for
// TextAction from XCanvas. Currently, the
@@ -1923,8 +1919,7 @@ namespace cppcanvas
::basegfx::B2DRange OutlineAction::getBounds( const ::basegfx::B2DHomMatrix& rTransformation,
const Subset& /*rSubset*/ ) const
{
- OSL_ENSURE( false,
- "OutlineAction::getBounds(): Subset not yet supported by this object" );
+ OSL_FAIL( "OutlineAction::getBounds(): Subset not yet supported by this object" );
return getBounds( rTransformation );
}
diff --git a/cppcanvas/source/mtfrenderer/transparencygroupaction.cxx b/cppcanvas/source/mtfrenderer/transparencygroupaction.cxx
index 6b5899f96017..8c671889280d 100644
--- a/cppcanvas/source/mtfrenderer/transparencygroupaction.cxx
+++ b/cppcanvas/source/mtfrenderer/transparencygroupaction.cxx
@@ -299,8 +299,7 @@ namespace cppcanvas
nRotate,
nShearX ) )
{
- OSL_ENSURE( false,
- "TransparencyGroupAction::render(): non-decomposable transformation" );
+ OSL_FAIL( "TransparencyGroupAction::render(): non-decomposable transformation" );
return false;
}
@@ -403,8 +402,7 @@ namespace cppcanvas
break;
default:
- OSL_ENSURE( false,
- "Unknown meta action type encountered" );
+ OSL_FAIL( "Unknown meta action type encountered" );
break;
}
}
diff --git a/dtrans/source/os2/clipb/Os2Clipboard.cxx b/dtrans/source/os2/clipb/Os2Clipboard.cxx
index 260c58f0d46f..76df3e4945c4 100644
--- a/dtrans/source/os2/clipb/Os2Clipboard.cxx
+++ b/dtrans/source/os2/clipb/Os2Clipboard.cxx
@@ -390,14 +390,14 @@ void SAL_CALL Os2Clipboard::notifyAllClipboardListener( )
}
catch(RuntimeException&)
{
- OSL_ENSURE( false, "RuntimeException caught" );
+ OSL_FAIL( "RuntimeException caught" );
debug_printf( "RuntimeException caught" );
}
}
}
catch(const ::com::sun::star::lang::DisposedException&)
{
- OSL_ENSURE(false, "Service Manager disposed");
+ OSL_FAIL("Service Manager disposed");
debug_printf( "Service Manager disposed");
// no further clipboard changed notifications
diff --git a/dtrans/source/win32/clipb/WinClipboard.cxx b/dtrans/source/win32/clipb/WinClipboard.cxx
index 76cf9bc2711b..5afd70cd44a9 100644
--- a/dtrans/source/win32/clipb/WinClipboard.cxx
+++ b/dtrans/source/win32/clipb/WinClipboard.cxx
@@ -256,13 +256,13 @@ void SAL_CALL CWinClipboard::notifyAllClipboardListener( )
}
catch(RuntimeException&)
{
- OSL_ENSURE( false, "RuntimeException caught" );
+ OSL_FAIL( "RuntimeException caught" );
}
}
}
catch(const ::com::sun::star::lang::DisposedException&)
{
- OSL_ENSURE(false, "Service Manager disposed");
+ OSL_FAIL("Service Manager disposed");
// no further clipboard changed notifications
m_pImpl->unregisterClipboardViewer();
diff --git a/dtrans/source/win32/dnd/source.cxx b/dtrans/source/win32/dnd/source.cxx
index 6e1f9f5b1bb5..a8f04a868e93 100644
--- a/dtrans/source/win32/dnd/source.cxx
+++ b/dtrans/source/win32/dnd/source.cxx
@@ -229,7 +229,7 @@ void SAL_CALL DragSource::startDrag(
}
catch(RuntimeException&)
{
- OSL_ENSURE(false, "Runtime exception during event dispatching");
+ OSL_FAIL("Runtime exception during event dispatching");
}
}
}
diff --git a/dtrans/source/win32/dtobj/FmtFilter.cxx b/dtrans/source/win32/dtobj/FmtFilter.cxx
index 235c63e298f9..7fd23567d16b 100644
--- a/dtrans/source/win32/dtobj/FmtFilter.cxx
+++ b/dtrans/source/win32/dtobj/FmtFilter.cxx
@@ -470,7 +470,7 @@ std::wstring getShellLinkTarget(const std::wstring& aLnkFile)
}
catch(sal::systools::ComError& ex)
{
- OSL_ENSURE(false, ex.what());
+ OSL_FAIL(ex.what());
ex = ex;
}
return target;
diff --git a/sax/source/expatwrap/saxwriter.cxx b/sax/source/expatwrap/saxwriter.cxx
index 122928f1d934..1417fb644679 100644
--- a/sax/source/expatwrap/saxwriter.cxx
+++ b/sax/source/expatwrap/saxwriter.cxx
@@ -457,7 +457,7 @@ inline sal_Bool SaxWriterHelper::convertToXML( const sal_Unicode * pStr,
}
else
{
- OSL_ENSURE( false, "illegal Unicode character" );
+ OSL_FAIL( "illegal Unicode character" );
bRet = sal_False;
}
diff --git a/sax/source/tools/converter.cxx b/sax/source/tools/converter.cxx
index fd93521261de..fd4c1de5a509 100644
--- a/sax/source/tools/converter.cxx
+++ b/sax/source/tools/converter.cxx
@@ -270,7 +270,7 @@ void Converter::convertMeasure( OUStringBuffer& rBuffer,
sal_Int16 nSourceUnit /* = MeasureUnit::MM_100TH */,
sal_Int16 nTargetUnit /* = MeasureUnit::INCH */ )
{
- OSL_ENSURE( false, "Converter::convertMeasure - not implemented, tools/BigInt needs replacement" );
+ OSL_FAIL( "Converter::convertMeasure - not implemented, tools/BigInt needs replacement" );
(void)rBuffer;
(void)nMeasure;
(void)nSourceUnit;
@@ -661,7 +661,7 @@ bool Converter::convertDuration(double& rfTime,
{
//! how many days is a year or month?
- OSL_ENSURE( false, "years or months in duration: not implemented");
+ OSL_FAIL( "years or months in duration: not implemented");
bSuccess = false;
}
else
diff --git a/sot/source/base/filelist.cxx b/sot/source/base/filelist.cxx
index c6d75b36f0ef..771f88b3980e 100644
--- a/sot/source/base/filelist.cxx
+++ b/sot/source/base/filelist.cxx
@@ -114,7 +114,7 @@ void FileList::Assign( const SvDataCopyStream& rCopyStream )
SvStream& operator<<( SvStream& rOStm, const FileList& /*rFileList*/ )
{
- OSL_ENSURE(false, "Not implemented!");
+ OSL_FAIL("Not implemented!");
return rOStm;
}
diff --git a/svtools/source/dialogs/roadmapwizard.cxx b/svtools/source/dialogs/roadmapwizard.cxx
index c700e896dce8..056e16d07e7b 100644
--- a/svtools/source/dialogs/roadmapwizard.cxx
+++ b/svtools/source/dialogs/roadmapwizard.cxx
@@ -349,7 +349,7 @@ namespace svt
{
if ( m_pImpl->getFirstDifferentIndex( aActivePathPos->second, aNewPathPos->second ) <= nCurrentStatePathIndex )
{
- OSL_ENSURE( false, "RoadmapWizard::activate: you cannot activate a path which conflicts with the current one *before* the current state!" );
+ OSL_FAIL( "RoadmapWizard::activate: you cannot activate a path which conflicts with the current one *before* the current state!" );
return;
}
}
diff --git a/svtools/source/productregistration/productregistration.cxx b/svtools/source/productregistration/productregistration.cxx
index 2bb1371572cf..683d06e54985 100644
--- a/svtools/source/productregistration/productregistration.cxx
+++ b/svtools/source/productregistration/productregistration.cxx
@@ -216,7 +216,7 @@ namespace svt
}
catch( const Exception& )
{
- OSL_ENSURE( false, "lcl_isEvalVersion: caught an exception!" );
+ OSL_FAIL( "lcl_isEvalVersion: caught an exception!" );
}
return bIsEvaluationVersion;
@@ -266,7 +266,7 @@ namespace svt
}
catch( const Exception& )
{
- OSL_ENSURE( false, "lcl_getOnlineRegistrationDispatch: caught an exception!" );
+ OSL_FAIL( "lcl_getOnlineRegistrationDispatch: caught an exception!" );
return false;
}
}
diff --git a/svtools/source/toolpanel/paneltabbar.cxx b/svtools/source/toolpanel/paneltabbar.cxx
index 168655c0fef7..21d110a13105 100644
--- a/svtools/source/toolpanel/paneltabbar.cxx
+++ b/svtools/source/toolpanel/paneltabbar.cxx
@@ -444,14 +444,14 @@ namespace svt
{
if ( i_rImpl.m_rPanelDeck.GetPanelCount() != i_rImpl.m_aItems.size() )
{
- OSL_ENSURE( false, "lcl_checkConsistency: inconsistent array sizes!" );
+ OSL_FAIL( "lcl_checkConsistency: inconsistent array sizes!" );
return;
}
for ( size_t i = 0; i < i_rImpl.m_rPanelDeck.GetPanelCount(); ++i )
{
if ( i_rImpl.m_rPanelDeck.GetPanel( i ).get() != i_rImpl.m_aItems[i].pPanel.get() )
{
- OSL_ENSURE( false, "lcl_checkConsistency: array elements are inconsistent!" );
+ OSL_FAIL( "lcl_checkConsistency: array elements are inconsistent!" );
return;
}
}
diff --git a/svtools/source/toolpanel/tablayouter.cxx b/svtools/source/toolpanel/tablayouter.cxx
index 6d79d64043e0..3c209ab0503d 100644
--- a/svtools/source/toolpanel/tablayouter.cxx
+++ b/svtools/source/toolpanel/tablayouter.cxx
@@ -78,7 +78,7 @@ namespace svt
{
if ( !i_rData.pTabBar.get() )
{
- OSL_ENSURE( false, "lcl_checkDisposed: already disposed!" );
+ OSL_FAIL( "lcl_checkDisposed: already disposed!" );
return true;
}
return false;
diff --git a/svtools/source/uno/wizard/unowizard.cxx b/svtools/source/uno/wizard/unowizard.cxx
index fdca8b1919a6..e9300e2e12eb 100644
--- a/svtools/source/uno/wizard/unowizard.cxx
+++ b/svtools/source/uno/wizard/unowizard.cxx
@@ -91,7 +91,7 @@ namespace svt { namespace uno
case WizardButton::CANCEL: return WZB_CANCEL;
case WizardButton::HELP: return WZB_HELP;
}
- OSL_ENSURE( false, "lcl_convertWizardButtonToWZB: invalid WizardButton constant!" );
+ OSL_FAIL( "lcl_convertWizardButtonToWZB: invalid WizardButton constant!" );
return WZB_NONE;
}
}
diff --git a/svtools/source/uno/wizard/wizardshell.cxx b/svtools/source/uno/wizard/wizardshell.cxx
index 66b4dfce164d..7220091d7648 100644
--- a/svtools/source/uno/wizard/wizardshell.cxx
+++ b/svtools/source/uno/wizard/wizardshell.cxx
@@ -134,7 +134,7 @@ namespace svt { namespace uno
default:
break;
}
- OSL_ENSURE( false, "WizardShell::convertCommitReasonToTravelType: unsupported CommitPageReason!" );
+ OSL_FAIL( "WizardShell::convertCommitReasonToTravelType: unsupported CommitPageReason!" );
return WizardTravelType::FINISH;
}
diff --git a/toolkit/source/awt/vclxwindow.cxx b/toolkit/source/awt/vclxwindow.cxx
index 243f682f1097..f43e020b2f74 100644
--- a/toolkit/source/awt/vclxwindow.cxx
+++ b/toolkit/source/awt/vclxwindow.cxx
@@ -1449,7 +1449,7 @@ namespace
}
break;
default:
- OSL_ENSURE( false, "lcl_updateWritingMode: unsupported WritingMode!" );
+ OSL_FAIL( "lcl_updateWritingMode: unsupported WritingMode!" );
} // switch ( nWritingMode )
_rWindow.EnableRTL( bEnableRTL );
@@ -1514,7 +1514,7 @@ void VCLXWindow::setProperty( const ::rtl::OUString& PropertyName, const ::com::
case MouseWheelBehavior::SCROLL_FOCUS_ONLY: nVclBehavior = MOUSE_WHEEL_FOCUS_ONLY; break;
case MouseWheelBehavior::SCROLL_ALWAYS: nVclBehavior = MOUSE_WHEEL_ALWAYS; break;
default:
- OSL_ENSURE( false, "VCLXWindow::setProperty( 'MouseWheelBehavior' ): illegal property value!" );
+ OSL_FAIL( "VCLXWindow::setProperty( 'MouseWheelBehavior' ): illegal property value!" );
}
aMouseSettings.SetWheelBehavior( nVclBehavior );
@@ -2031,7 +2031,7 @@ void VCLXWindow::setProperty( const ::rtl::OUString& PropertyName, const ::com::
case MOUSE_WHEEL_FOCUS_ONLY: nBehavior = MouseWheelBehavior::SCROLL_FOCUS_ONLY; break;
case MOUSE_WHEEL_ALWAYS: nBehavior = MouseWheelBehavior::SCROLL_ALWAYS; break;
default:
- OSL_ENSURE( false, "VCLXWindow::getProperty( 'MouseWheelBehavior' ): illegal VCL value!" );
+ OSL_FAIL( "VCLXWindow::getProperty( 'MouseWheelBehavior' ): illegal VCL value!" );
}
aProp <<= nBehavior;
}
diff --git a/toolkit/source/awt/vclxwindows.cxx b/toolkit/source/awt/vclxwindows.cxx
index 3031cb70b6cc..fbd635483b2b 100644
--- a/toolkit/source/awt/vclxwindows.cxx
+++ b/toolkit/source/awt/vclxwindows.cxx
@@ -1575,7 +1575,7 @@ void VCLXListBox::addItems( const ::com::sun::star::uno::Sequence< ::rtl::OUStri
{
if ( (sal_uInt16)nP == 0xFFFF )
{
- OSL_ENSURE( false, "VCLXListBox::addItems: too many entries!" );
+ OSL_FAIL( "VCLXListBox::addItems: too many entries!" );
// skip remaining entries, list cannot hold them, anyway
break;
}
@@ -4310,7 +4310,7 @@ void VCLXComboBox::addItems( const ::com::sun::star::uno::Sequence< ::rtl::OUStr
pBox->InsertEntry( aItems.getConstArray()[n], nP );
if ( nP == 0xFFFF )
{
- OSL_ENSURE( false, "VCLXComboBox::addItems: too many entries!" );
+ OSL_FAIL( "VCLXComboBox::addItems: too many entries!" );
// skip remaining entries, list cannot hold them, anyway
break;
}
diff --git a/tools/source/fsys/urlobj.cxx b/tools/source/fsys/urlobj.cxx
index 57eabeadbcb2..91e4e6936bf5 100644
--- a/tools/source/fsys/urlobj.cxx
+++ b/tools/source/fsys/urlobj.cxx
@@ -3475,8 +3475,8 @@ bool INetURLObject::setPath(rtl::OUString const & rThePath, bool bOctets,
//============================================================================
bool INetURLObject::checkHierarchical() const {
if (m_eScheme == INET_PROT_VND_SUN_STAR_EXPAND) {
- OSL_ENSURE(
- false, "INetURLObject::checkHierarchical vnd.sun.star.expand");
+ OSL_FAIL(
+ "INetURLObject::checkHierarchical vnd.sun.star.expand");
return true;
} else {
return getSchemeInfo().m_bHierarchical;
diff --git a/tools/source/string/tstring.cxx b/tools/source/string/tstring.cxx
index 8a0ecb8a8529..10b9cef09965 100644
--- a/tools/source/string/tstring.cxx
+++ b/tools/source/string/tstring.cxx
@@ -165,7 +165,7 @@ float ByteString::ToFloat() const
{
DBG_CHKTHIS( ByteString, DbgCheckByteString );
- OSL_ENSURE(false, "ByteString::ToFloat unusable");
+ OSL_FAIL("ByteString::ToFloat unusable");
return 0;
}
@@ -175,7 +175,7 @@ double ByteString::ToDouble() const
{
DBG_CHKTHIS( ByteString, DbgCheckByteString );
- OSL_ENSURE(false, "ByteString::ToDouble unusable");
+ OSL_FAIL("ByteString::ToDouble unusable");
return 0;
}
diff --git a/ucbhelper/source/provider/configureucb.cxx b/ucbhelper/source/provider/configureucb.cxx
index 2b858d614c78..ae30c6b5b350 100644
--- a/ucbhelper/source/provider/configureucb.cxx
+++ b/ucbhelper/source/provider/configureucb.cxx
@@ -174,14 +174,14 @@ configureUcb(
if (rArguments.getLength() < 2
|| !(rArguments[0] >>= aKey1) || !(rArguments[1] >>= aKey2))
{
- OSL_ENSURE(false, "ucb::configureUcb(): Bad arguments");
+ OSL_FAIL("ucb::configureUcb(): Bad arguments");
return false;
}
ContentProviderDataList aData;
if (!getContentProviderData(rServiceFactory, aKey1, aKey2, aData))
{
- OSL_ENSURE(false, "ucb::configureUcb(): No configuration");
+ OSL_FAIL("ucb::configureUcb(): No configuration");
return false;
}
@@ -207,8 +207,7 @@ configureUcb(
pInfos->push_back(aInfo);
}
else
- OSL_ENSURE(false,
- "ucb::configureUcb(): Bad argument placeholders");
+ OSL_FAIL("ucb::configureUcb(): Bad argument placeholders");
}
return true;
diff --git a/ucbhelper/source/provider/provconf.cxx b/ucbhelper/source/provider/provconf.cxx
index 542ddf9351ae..3e89f9f70b4b 100644
--- a/ucbhelper/source/provider/provconf.cxx
+++ b/ucbhelper/source/provider/provconf.cxx
@@ -99,8 +99,7 @@ bool getContentProviderData(
{
if ( !rServiceMgr.is() || !rKey1.getLength() || !rKey2.getLength() )
{
- OSL_ENSURE( false,
- "getContentProviderData - Invalid argument!" );
+ OSL_FAIL( "getContentProviderData - Invalid argument!" );
return false;
}
@@ -114,8 +113,7 @@ bool getContentProviderData(
if ( !xConfigProv.is() )
{
- OSL_ENSURE( false,
- "getContentProviderData - No config provider!" );
+ OSL_FAIL( "getContentProviderData - No config provider!" );
return false;
}
@@ -141,8 +139,7 @@ bool getContentProviderData(
if ( !xInterface.is() )
{
- OSL_ENSURE( false,
- "getContentProviderData - No config access!" );
+ OSL_FAIL( "getContentProviderData - No config access!" );
return false;
}
@@ -151,8 +148,7 @@ bool getContentProviderData(
if ( !xNameAccess.is() )
{
- OSL_ENSURE( false,
- "getContentProviderData - No XNameAccess!" );
+ OSL_FAIL( "getContentProviderData - No XNameAccess!" );
return false;
}
@@ -167,8 +163,7 @@ bool getContentProviderData(
if ( !xHierNameAccess.is() )
{
- OSL_ENSURE( false,
- "getContentProviderData - "
+ OSL_FAIL( "getContentProviderData - "
"No XHierarchicalNameAccess!" );
return false;
}
@@ -192,8 +187,7 @@ bool getContentProviderData(
if ( !( xHierNameAccess->getByHierarchicalName(
aKeyBuffer.makeStringAndClear() ) >>= aValue ) )
{
- OSL_ENSURE( false,
- "getContentProviderData - "
+ OSL_FAIL( "getContentProviderData - "
"Error getting item value!" );
continue;
}
@@ -207,8 +201,7 @@ bool getContentProviderData(
if ( !( xHierNameAccess->getByHierarchicalName(
aKeyBuffer.makeStringAndClear() ) >>= aValue ) )
{
- OSL_ENSURE( false,
- "getContentProviderData - "
+ OSL_FAIL( "getContentProviderData - "
"Error getting item value!" );
continue;
}
@@ -222,8 +215,7 @@ bool getContentProviderData(
if ( !( xHierNameAccess->getByHierarchicalName(
aKeyBuffer.makeStringAndClear() ) >>= aValue ) )
{
- OSL_ENSURE( false,
- "getContentProviderData - "
+ OSL_FAIL( "getContentProviderData - "
"Error getting item value!" );
continue;
}
@@ -237,8 +229,7 @@ bool getContentProviderData(
{
// getByHierarchicalName
- OSL_ENSURE( false,
- "getContentProviderData - "
+ OSL_FAIL( "getContentProviderData - "
"caught NoSuchElementException!" );
}
}
@@ -246,16 +237,14 @@ bool getContentProviderData(
}
catch ( uno::RuntimeException& )
{
- OSL_ENSURE( false,
- "getContentProviderData - caught RuntimeException!" );
+ OSL_FAIL( "getContentProviderData - caught RuntimeException!" );
return false;
}
catch ( uno::Exception& )
{
// createInstance, createInstanceWithArguments
- OSL_ENSURE( false,
- "getContentProviderData - caught Exception!" );
+ OSL_FAIL( "getContentProviderData - caught Exception!" );
return false;
}
diff --git a/unotools/source/config/bootstrap.cxx b/unotools/source/config/bootstrap.cxx
index 63af204f8ddc..b19ee6a3683f 100644
--- a/unotools/source/config/bootstrap.cxx
+++ b/unotools/source/config/bootstrap.cxx
@@ -271,7 +271,7 @@ bool implEnsureAbsolute(OUString & _rsURL) // also strips embedded dots !!
}
else
{
- OSL_ENSURE(false, "Could not get absolute file URL for URL");
+ OSL_FAIL("Could not get absolute file URL for URL");
return false;
}
}
@@ -359,7 +359,7 @@ PathStatus checkStatusAndNormalizeURL(OUString & _sURL)
if (eStatus == Bootstrap::PATH_EXISTS)
{
if (!implNormalizeURL(_sURL,aDirItem))
- OSL_ENSURE(false,"Unexpected failure getting actual URL for existing object");
+ OSL_FAIL("Unexpected failure getting actual URL for existing object");
}
}
return eStatus;
diff --git a/unotools/source/config/configitem.cxx b/unotools/source/config/configitem.cxx
index 9d13d10223b0..b7dac4dcfab9 100644
--- a/unotools/source/config/configitem.cxx
+++ b/unotools/source/config/configitem.cxx
@@ -756,7 +756,7 @@ void lcl_normalizeLocalNames(Sequence< OUString >& _rNames, ConfigNameFormat _eF
break;
}
}
- OSL_ENSURE(false, "Cannot create absolute pathes: missing interface");
+ OSL_FAIL("Cannot create absolute pathes: missing interface");
// make local pathes instaed
case CONFIG_NAME_LOCAL_PATH:
diff --git a/unotools/source/config/configmgr.cxx b/unotools/source/config/configmgr.cxx
index 24f7977bcc4e..144d53dd4401 100644
--- a/unotools/source/config/configmgr.cxx
+++ b/unotools/source/config/configmgr.cxx
@@ -356,23 +356,19 @@ Any ConfigManager::GetDirectConfigProperty(ConfigProperty eProp)
switch(eProp)
{
case INSTALLPATH:
- OSL_ENSURE( false,
- "ConfigManager::GetDirectConfigProperty: "
+ OSL_FAIL( "ConfigManager::GetDirectConfigProperty: "
"INSTALLPATH no longer supported." );
return Any();
case USERINSTALLURL:
- OSL_ENSURE( false,
- "ConfigManager::GetDirectConfigProperty: "
+ OSL_FAIL( "ConfigManager::GetDirectConfigProperty: "
"USERINSTALLURL no longer supported." );
return Any();
case OFFICEINSTALL:
- OSL_ENSURE( false,
- "ConfigManager::GetDirectConfigProperty: "
+ OSL_FAIL( "ConfigManager::GetDirectConfigProperty: "
"OFFICEINSTALL no longer supported." );
return Any();
case OFFICEINSTALLURL:
- OSL_ENSURE( false,
- "ConfigManager::GetDirectConfigProperty: "
+ OSL_FAIL( "ConfigManager::GetDirectConfigProperty: "
"OFFICEINSTALLURL no longer supported." );
return Any();
default:
diff --git a/unotools/source/config/configpathes.cxx b/unotools/source/config/configpathes.cxx
index fd813d4c7a9a..5c35e112bad0 100644
--- a/unotools/source/config/configpathes.cxx
+++ b/unotools/source/config/configpathes.cxx
@@ -98,7 +98,7 @@ sal_Bool splitLastFromConfigurationPath(OUString const& _sInPath,
// strip trailing slash
if (nPos > 0 && _sInPath[ nPos ] == sal_Unicode('/'))
{
- OSL_ENSURE(false, "Invalid config path: trailing '/' is not allowed");
+ OSL_FAIL("Invalid config path: trailing '/' is not allowed");
--nPos;
}
diff --git a/unotools/source/config/inetoptions.cxx b/unotools/source/config/inetoptions.cxx
index bc6f3c493aff..d851102d2d23 100644
--- a/unotools/source/config/inetoptions.cxx
+++ b/unotools/source/config/inetoptions.cxx
@@ -280,8 +280,7 @@ SvtInetOptions::Impl::Impl():
for (sal_Int32 i = 0; i < ENTRY_COUNT; ++i)
aKeys[i] = m_aEntries[i].m_aName;
if (!EnableNotification(aKeys))
- OSL_ENSURE(false,
- "SvtInetOptions::Impl::Impl(): Bad EnableNotifications()");
+ OSL_FAIL("SvtInetOptions::Impl::Impl(): Bad EnableNotifications()");
}
//============================================================================
@@ -330,8 +329,7 @@ star::uno::Any SvtInetOptions::Impl::getProperty(Index nPropIndex)
}
}
}
- OSL_ENSURE(false,
- "SvtInetOptions::Impl::getProperty(): Possible life lock");
+ OSL_FAIL("SvtInetOptions::Impl::getProperty(): Possible life lock");
{
osl::MutexGuard aGuard(m_aMutex);
return m_aEntries[nPropIndex].m_aValue;
diff --git a/vcl/source/control/imgctrl.cxx b/vcl/source/control/imgctrl.cxx
index c5ae529f9b26..b59766228e43 100644
--- a/vcl/source/control/imgctrl.cxx
+++ b/vcl/source/control/imgctrl.cxx
@@ -144,7 +144,7 @@ void ImageControl::UserDraw( const UserDrawEvent& rUDEvt )
break;
default:
- OSL_ENSURE( false, "ImageControl::UserDraw: unhandled scale mode!" );
+ OSL_FAIL( "ImageControl::UserDraw: unhandled scale mode!" );
break;
} // switch ( mnScaleMode )
@@ -178,7 +178,7 @@ void ImageControl::UserDraw( const UserDrawEvent& rUDEvt )
break;
default:
- OSL_ENSURE( false, "ImageControl::UserDraw: unhandled scale mode!" );
+ OSL_FAIL( "ImageControl::UserDraw: unhandled scale mode!" );
break;
} // switch ( mnScaleMode )
diff --git a/vcl/source/gdi/image.cxx b/vcl/source/gdi/image.cxx
index d22f24575a06..f5e686a71c38 100644
--- a/vcl/source/gdi/image.cxx
+++ b/vcl/source/gdi/image.cxx
@@ -504,7 +504,7 @@ void ImageAryData::Load(const rtl::OUString &rPrefix)
aMessage.append( "ImageAryData::Load: failed to load image '" );
aMessage.append( ::rtl::OUStringToOString( aFileName, RTL_TEXTENCODING_UTF8 ).getStr() );
aMessage.append( "'" );
- OSL_ENSURE( false, aMessage.makeStringAndClear().getStr() );
+ OSL_FAIL( aMessage.makeStringAndClear().getStr() );
}
#endif
}