summaryrefslogtreecommitdiff
path: root/toolkit
diff options
context:
space:
mode:
authorThomas Arnhold <thomas@arnhold.org>2011-03-19 14:11:09 +0100
committerThomas Arnhold <thomas@arnhold.org>2011-03-19 14:11:09 +0100
commit3d874bdf409ca4a099853b30aeb9932e45c56f60 (patch)
tree3b88c39fa7cf3aa598a286534afc7de6f4ec98ab /toolkit
parent4edacef4f14f1992f8e0cbded5a86730c8353b4d (diff)
Move OSL_ENSURE(sal_False,...) to OSL_FAIL(...)
Diffstat (limited to 'toolkit')
-rw-r--r--toolkit/inc/toolkit/helper/macros.hxx2
-rw-r--r--toolkit/source/controls/accessiblecontrolcontext.cxx8
-rw-r--r--toolkit/source/controls/unocontrols.cxx6
-rw-r--r--toolkit/source/helper/formpdfexport.cxx10
-rw-r--r--toolkit/source/helper/imagealign.cxx8
-rw-r--r--toolkit/source/helper/vclunohelper.cxx4
6 files changed, 19 insertions, 19 deletions
diff --git a/toolkit/inc/toolkit/helper/macros.hxx b/toolkit/inc/toolkit/helper/macros.hxx
index f3f96824e079..76e60a86f70b 100644
--- a/toolkit/inc/toolkit/helper/macros.hxx
+++ b/toolkit/inc/toolkit/helper/macros.hxx
@@ -185,7 +185,7 @@ void ClassName::disposing( const ::com::sun::star::lang::EventObject& ) throw(::
#define DISPLAY_EXCEPTION( ClassName, MethodName, e ) \
::rtl::OString sMessage( #ClassName "::" #MethodName ": caught an exception!\n" ); \
sMessage += ::rtl::OString( e.Message.getStr(), e.Message.getLength(), RTL_TEXTENCODING_ASCII_US ); \
- OSL_ENSURE( sal_False, sMessage.getStr() );
+ OSL_FAIL( sMessage.getStr() );
#else
#define DISPLAY_EXCEPTION( ClassName, MethodName, e )
#endif
diff --git a/toolkit/source/controls/accessiblecontrolcontext.cxx b/toolkit/source/controls/accessiblecontrolcontext.cxx
index 4cd86d028205..d56deb87c72c 100644
--- a/toolkit/source/controls/accessiblecontrolcontext.cxx
+++ b/toolkit/source/controls/accessiblecontrolcontext.cxx
@@ -104,7 +104,7 @@ namespace toolkit
}
catch( const Exception& )
{
- OSL_ENSURE( sal_False, "OAccessibleControlContext::create: caught an exception from the late ctor!" );
+ OSL_FAIL( "OAccessibleControlContext::create: caught an exception from the late ctor!" );
}
return pNew;
}
@@ -229,7 +229,7 @@ namespace toolkit
}
catch( const Exception& )
{
- OSL_ENSURE( sal_False, "OAccessibleControlContext::getModelStringProperty: caught an exception!" );
+ OSL_FAIL( "OAccessibleControlContext::getModelStringProperty: caught an exception!" );
}
return sReturn;
}
@@ -256,7 +256,7 @@ namespace toolkit
// want to do some VCL stuff here ...
OContextEntryGuard aGuard( this );
- OSL_ENSURE( sal_False, "OAccessibleControlContext::implGetBounds: performance issue: forced to calc the size myself!" );
+ OSL_FAIL( "OAccessibleControlContext::implGetBounds: performance issue: forced to calc the size myself!" );
// In design mode (and this is what this class is for), the surrounding shape (if any) should handle this call
// The problem is that in design mode, our size may not be correct (in the drawing layer, controls are
// positioned/sized for painting only), and that calculation of our position is expensive
@@ -319,7 +319,7 @@ namespace toolkit
//--------------------------------------------------------------------
void SAL_CALL OAccessibleControlContext::grabFocus( ) throw (RuntimeException)
{
- OSL_ENSURE( sal_False, "OAccessibleControlContext::grabFocus: !isFocusTraversable, but grabFocus!" );
+ OSL_FAIL( "OAccessibleControlContext::grabFocus: !isFocusTraversable, but grabFocus!" );
}
//--------------------------------------------------------------------
diff --git a/toolkit/source/controls/unocontrols.cxx b/toolkit/source/controls/unocontrols.cxx
index 480399241f48..730ff6d11b21 100644
--- a/toolkit/source/controls/unocontrols.cxx
+++ b/toolkit/source/controls/unocontrols.cxx
@@ -631,7 +631,7 @@ void SAL_CALL GraphicControlModel::setFastPropertyValue_NoBroadcast( sal_Int32 n
}
catch( const ::com::sun::star::uno::Exception& )
{
- OSL_ENSURE( sal_False, "GraphicControlModel::setFastPropertyValue_NoBroadcast: caught an exception while aligning the ImagePosition/ImageAlign properties!" );
+ OSL_FAIL( "GraphicControlModel::setFastPropertyValue_NoBroadcast: caught an exception while aligning the ImagePosition/ImageAlign properties!" );
mbAdjustingImagePosition = sal_False;
}
}
@@ -2625,7 +2625,7 @@ void UnoListBoxControl::itemStateChanged( const awt::ItemEvent& rEvent ) throw(u
#else
::rtl::OString sMessage( "UnoListBoxControl::itemStateChanged: caught an exception:\n" );
sMessage += ::rtl::OString( e.Message.getStr(), e.Message.getLength(), RTL_TEXTENCODING_ASCII_US );
- OSL_ENSURE( sal_False, sMessage.getStr() );
+ OSL_FAIL( sMessage.getStr() );
#endif
}
}
@@ -2934,7 +2934,7 @@ void UnoComboBoxControl::itemStateChanged( const awt::ItemEvent& rEvent ) throw(
#else
::rtl::OString sMessage( "UnoComboBoxControl::itemStateChanged: caught an exception:\n" );
sMessage += ::rtl::OString( e.Message.getStr(), e.Message.getLength(), RTL_TEXTENCODING_ASCII_US );
- OSL_ENSURE( sal_False, sMessage.getStr() );
+ OSL_FAIL( sMessage.getStr() );
#endif
}
}
diff --git a/toolkit/source/helper/formpdfexport.cxx b/toolkit/source/helper/formpdfexport.cxx
index dc35a4742029..ae2af72ab09b 100644
--- a/toolkit/source/helper/formpdfexport.cxx
+++ b/toolkit/source/helper/formpdfexport.cxx
@@ -197,7 +197,7 @@ namespace toolkitform
Reference< XInterface > xElement( xCurrentContainer->getByIndex( i ), UNO_QUERY );
if ( !xElement.is() )
{
- OSL_ENSURE( sal_False, "determineRadioGroupId: very suspicious!" );
+ OSL_FAIL( "determineRadioGroupId: very suspicious!" );
continue;
}
@@ -232,7 +232,7 @@ namespace toolkitform
}
++pElementNames;
}
- OSL_ENSURE( sal_False, "determineRadioGroupId: did not find the radios element name!" );
+ OSL_FAIL( "determineRadioGroupId: did not find the radios element name!" );
}
}
@@ -386,7 +386,7 @@ namespace toolkitform
case awt::TextAlign::CENTER: _rpDescriptor->TextStyle |= TEXT_DRAW_CENTER; break;
case awt::TextAlign::RIGHT: _rpDescriptor->TextStyle |= TEXT_DRAW_RIGHT; break;
default:
- OSL_ENSURE( sal_False, "describePDFControl: invalid text align!" );
+ OSL_FAIL( "describePDFControl: invalid text align!" );
}
}
// ............................
@@ -403,7 +403,7 @@ namespace toolkitform
case VerticalAlignment_MIDDLE: _rpDescriptor->TextStyle |= TEXT_DRAW_VCENTER; break;
case VerticalAlignment_BOTTOM: _rpDescriptor->TextStyle |= TEXT_DRAW_BOTTOM; break;
default:
- OSL_ENSURE( sal_False, "describePDFControl: invalid vertical text align!" );
+ OSL_FAIL( "describePDFControl: invalid vertical text align!" );
}
}
}
@@ -598,7 +598,7 @@ namespace toolkitform
}
catch( const Exception& )
{
- OSL_ENSURE( sal_False, "describePDFControl: caught an exception!" );
+ OSL_FAIL( "describePDFControl: caught an exception!" );
}
}
diff --git a/toolkit/source/helper/imagealign.cxx b/toolkit/source/helper/imagealign.cxx
index 4c782c99c37e..883aac322568 100644
--- a/toolkit/source/helper/imagealign.cxx
+++ b/toolkit/source/helper/imagealign.cxx
@@ -59,7 +59,7 @@ namespace toolkit
case IMAGEALIGN_BOTTOM_RIGHT: nReturn = BelowRight; break;
case IMAGEALIGN_CENTER: nReturn = Centered; break;
default:
- OSL_ENSURE( sal_False, "translateImagePosition: unknown IMAGEALIGN value!" );
+ OSL_FAIL( "translateImagePosition: unknown IMAGEALIGN value!" );
}
return nReturn;
}
@@ -83,7 +83,7 @@ namespace toolkit
case BelowRight: nReturn = IMAGEALIGN_BOTTOM_RIGHT; break;
case Centered: nReturn = IMAGEALIGN_CENTER; break;
default:
- OSL_ENSURE( sal_False, "translateImagePosition: unknown css.awt.ImagePosition value!" );
+ OSL_FAIL( "translateImagePosition: unknown css.awt.ImagePosition value!" );
}
return nReturn;
}
@@ -111,7 +111,7 @@ namespace toolkit
case IMAGEALIGN_CENTER: nReturn = TOP; break;
default:
- OSL_ENSURE( sal_False, "getCompatibleImageAlign: unknown IMAGEALIGN value!" );
+ OSL_FAIL( "getCompatibleImageAlign: unknown IMAGEALIGN value!" );
}
return nReturn;
}
@@ -126,7 +126,7 @@ namespace toolkit
case RIGHT: nReturn = RightCenter; break;
case BOTTOM: nReturn = BelowCenter; break;
default:
- OSL_ENSURE( sal_False, "getExtendedImagePosition: unknown ImageAlign value!" );
+ OSL_FAIL( "getExtendedImagePosition: unknown ImageAlign value!" );
}
return nReturn;
}
diff --git a/toolkit/source/helper/vclunohelper.cxx b/toolkit/source/helper/vclunohelper.cxx
index e2755f8a8112..7f8de3e25e59 100644
--- a/toolkit/source/helper/vclunohelper.cxx
+++ b/toolkit/source/helper/vclunohelper.cxx
@@ -444,7 +444,7 @@ MapUnit VCLUnoHelper::UnoEmbed2VCLMapUnit( sal_Int32 nUnoEmbedMapUnit )
return MAP_PIXEL;
}
- OSL_ENSURE( sal_False, "Unexpected UNO map mode is provided!\n" );
+ OSL_FAIL( "Unexpected UNO map mode is provided!\n" );
return MAP_LASTENUMDUMMY;
}
@@ -477,7 +477,7 @@ sal_Int32 VCLUnoHelper::VCL2UnoEmbedMapUnit( MapUnit nVCLMapUnit )
default: ; // avoid compiler warning
}
- OSL_ENSURE( sal_False, "Unexpected VCL map mode is provided!\n" );
+ OSL_FAIL( "Unexpected VCL map mode is provided!\n" );
return -1;
}