summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorThomas Arnhold <thomas@arnhold.org>2011-03-12 12:08:50 +0100
committerThomas Arnhold <thomas@arnhold.org>2011-03-12 14:19:18 +0100
commit0c35d637f776a16ca66eaa675cb8bcb35b217e05 (patch)
treed4bc00bc7b1dcb0676eb463f212aca70a0e474fe /vcl
parent65e002dbe7552b34936e736ac8bc6b07da3e5574 (diff)
Move OSL_ENSURE(0,...) to OSL_FAIL(...)
Diffstat (limited to 'vcl')
-rw-r--r--vcl/os2/source/app/salinst.cxx2
-rw-r--r--vcl/source/gdi/outdevnative.cxx2
-rw-r--r--vcl/source/gdi/print3.cxx4
-rw-r--r--vcl/unx/gtk/a11y/atkwrapper.cxx4
-rw-r--r--vcl/unx/source/dtrans/X11_selection.cxx6
-rw-r--r--vcl/unx/source/printergfx/printerjob.cxx4
-rw-r--r--vcl/win/source/app/salinst.cxx2
7 files changed, 12 insertions, 12 deletions
diff --git a/vcl/os2/source/app/salinst.cxx b/vcl/os2/source/app/salinst.cxx
index 97271b6ecd5f..44b87dc2a57b 100644
--- a/vcl/os2/source/app/salinst.cxx
+++ b/vcl/os2/source/app/salinst.cxx
@@ -664,7 +664,7 @@ MRESULT EXPENTRY SalComWndProc( HWND hWnd, ULONG nMsg,
//in the structure (GetWindowPtr()).
if (WinDestroyWindow((HWND)nMP2) == 0)
{
- OSL_ENSURE(0, "DestroyWindow failed!");
+ OSL_FAIL("DestroyWindow failed!");
//Failure: We remove the SalFrame from the window structure. So we avoid that
// the window structure may contain an invalid pointer, once the SalFrame is deleted.
SetWindowPtr((HWND)nMP2, 0);
diff --git a/vcl/source/gdi/outdevnative.cxx b/vcl/source/gdi/outdevnative.cxx
index 1cf138e351e3..b5766c86db7d 100644
--- a/vcl/source/gdi/outdevnative.cxx
+++ b/vcl/source/gdi/outdevnative.cxx
@@ -202,7 +202,7 @@ static boost::shared_ptr< ImplControlValue > lcl_transformControlValue( const Im
aResult.reset( new ImplControlValue( rVal ) );
break;
default:
- OSL_ENSURE( 0, "unknown ImplControlValue type !" );
+ OSL_FAIL( "unknown ImplControlValue type !" );
break;
}
return aResult;
diff --git a/vcl/source/gdi/print3.cxx b/vcl/source/gdi/print3.cxx
index 1b820057092c..a96804f5448f 100644
--- a/vcl/source/gdi/print3.cxx
+++ b/vcl/source/gdi/print3.cxx
@@ -1437,7 +1437,7 @@ bool PrinterController::isUIOptionEnabled( const rtl::OUString& i_rProperty ) co
else
{
// if the type does not match something is awry
- OSL_ENSURE( 0, "strange type in control dependency" );
+ OSL_FAIL( "strange type in control dependency" );
bEnabled = false;
}
}
@@ -1491,7 +1491,7 @@ rtl::OUString PrinterController::makeEnabled( const rtl::OUString& i_rProperty )
else
{
// if the type does not match something is awry
- OSL_ENSURE( 0, "strange type in control dependency" );
+ OSL_FAIL( "strange type in control dependency" );
}
}
}
diff --git a/vcl/unx/gtk/a11y/atkwrapper.cxx b/vcl/unx/gtk/a11y/atkwrapper.cxx
index 1066917810c8..f4e0badab1f4 100644
--- a/vcl/unx/gtk/a11y/atkwrapper.cxx
+++ b/vcl/unx/gtk/a11y/atkwrapper.cxx
@@ -397,7 +397,7 @@ wrapper_get_n_children( AtkObject *atk_obj )
n = obj->mpContext->getAccessibleChildCount();
}
catch(const uno::Exception& e) {
- OSL_ENSURE(0, "Exception in getAccessibleChildCount()" );
+ OSL_FAIL("Exception in getAccessibleChildCount()" );
}
}
@@ -429,7 +429,7 @@ wrapper_ref_child( AtkObject *atk_obj,
child = atk_object_wrapper_ref( xAccessible );
}
catch(const uno::Exception& e) {
- OSL_ENSURE(0, "Exception in getAccessibleChild");
+ OSL_FAIL("Exception in getAccessibleChild");
}
}
diff --git a/vcl/unx/source/dtrans/X11_selection.cxx b/vcl/unx/source/dtrans/X11_selection.cxx
index ff5adda33ae8..06dbcc62282e 100644
--- a/vcl/unx/source/dtrans/X11_selection.cxx
+++ b/vcl/unx/source/dtrans/X11_selection.cxx
@@ -2191,7 +2191,7 @@ bool SelectionManager::handleDropEvent( XClientMessageEvent& rMessage )
m_bDropWaitingForCompletion && m_aDropEnterEvent.data.l[0] )
{
bHandled = true;
- OSL_ENSURE( 0, "someone forgot to call dropComplete ?" );
+ OSL_FAIL( "someone forgot to call dropComplete ?" );
// some listener forgot to call dropComplete in the last operation
// let us end it now and accept the new enter event
aGuard.clear();
@@ -3373,7 +3373,7 @@ void SelectionManager::startDrag(
GetX11SalData()->GetDisplay()->CaptureMouse( pCaptureFrame );
#if OSL_DEBUG_LEVEL > 0
else
- OSL_ENSURE( 0, "failed to acquire SolarMutex to reset capture frame" );
+ OSL_FAIL( "failed to acquire SolarMutex to reset capture frame" );
#endif
}
return;
@@ -3462,7 +3462,7 @@ void SelectionManager::startDrag(
GetX11SalData()->GetDisplay()->CaptureMouse( pCaptureFrame );
#if OSL_DEBUG_LEVEL > 0
else
- OSL_ENSURE( 0, "failed to acquire SolarMutex to reset capture frame" );
+ OSL_FAIL( "failed to acquire SolarMutex to reset capture frame" );
#endif
}
diff --git a/vcl/unx/source/printergfx/printerjob.cxx b/vcl/unx/source/printergfx/printerjob.cxx
index d4e488eeb1ab..4ca5965e5b34 100644
--- a/vcl/unx/source/printergfx/printerjob.cxx
+++ b/vcl/unx/source/printergfx/printerjob.cxx
@@ -279,7 +279,7 @@ removeSpoolDir (const rtl::OUString& rSpoolDir)
{
// Conversion did not work, as this is quite a dangerous action,
// we should abort here ....
- OSL_ENSURE( 0, "psprint: couldn't remove spool directory" );
+ OSL_FAIL( "psprint: couldn't remove spool directory" );
return;
}
rtl::OString aSysPathByte =
@@ -291,7 +291,7 @@ removeSpoolDir (const rtl::OUString& rSpoolDir)
nChar += psp::appendStr (aSysPathByte.getStr(), pSystem + nChar);
if (system (pSystem) == -1)
- OSL_ENSURE( 0, "psprint: couldn't remove spool directory" );
+ OSL_FAIL( "psprint: couldn't remove spool directory" );
}
/* creates a spool directory with a "pidgin random" value based on
diff --git a/vcl/win/source/app/salinst.cxx b/vcl/win/source/app/salinst.cxx
index 0ecda3dc2427..5e3999e83d7b 100644
--- a/vcl/win/source/app/salinst.cxx
+++ b/vcl/win/source/app/salinst.cxx
@@ -799,7 +799,7 @@ LRESULT CALLBACK SalComWndProc( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lPar
//in the structure (GetWindowPtr()).
if (DestroyWindow((HWND)lParam) == 0)
{
- OSL_ENSURE(0, "DestroyWindow failed!");
+ OSL_FAIL("DestroyWindow failed!");
//Failure: We remove the SalFrame from the window structure. So we avoid that
// the window structure may contain an invalid pointer, once the SalFrame is deleted.
SetWindowPtr((HWND)lParam, 0);