diff options
author | Thomas Arnhold <thomas@arnhold.org> | 2011-03-12 11:28:41 +0100 |
---|---|---|
committer | Thomas Arnhold <thomas@arnhold.org> | 2011-03-13 16:44:11 +0100 |
commit | fd3ae880bc267446dc27adf678801ae99a885fe3 (patch) | |
tree | ec4367afb2fdf43ec6332d0aa4cf1dcec0d30a9b /chart2/source/controller | |
parent | adab3341788f4e51e075c469f925959d865b1769 (diff) |
Move OSL_ENSURE(false,...) to OSL_FAIL(...)
Diffstat (limited to 'chart2/source/controller')
24 files changed, 61 insertions, 61 deletions
diff --git a/chart2/source/controller/accessibility/AccessibleBase.cxx b/chart2/source/controller/accessibility/AccessibleBase.cxx index ab3ebe750ff7..da0ffe71eca7 100644 --- a/chart2/source/controller/accessibility/AccessibleBase.cxx +++ b/chart2/source/controller/accessibility/AccessibleBase.cxx @@ -395,7 +395,7 @@ awt::Point AccessibleBase::GetUpperLeftOnScreen() const aResult = pParent->GetUpperLeftOnScreen(); } else - OSL_ENSURE( false, "Default position used is probably incorrect." ); + OSL_FAIL( "Default position used is probably incorrect." ); } return aResult; diff --git a/chart2/source/controller/accessibility/AccessibleTextHelper.cxx b/chart2/source/controller/accessibility/AccessibleTextHelper.cxx index 9fd7695b301a..818a7b90256c 100644 --- a/chart2/source/controller/accessibility/AccessibleTextHelper.cxx +++ b/chart2/source/controller/accessibility/AccessibleTextHelper.cxx @@ -139,49 +139,49 @@ Reference< XAccessible > SAL_CALL AccessibleTextHelper::getAccessibleChild( ::sa Reference< XAccessible > SAL_CALL AccessibleTextHelper::getAccessibleParent() throw (uno::RuntimeException) { - OSL_ENSURE( false, "Not implemented in this helper" ); + OSL_FAIL( "Not implemented in this helper" ); return Reference< XAccessible >(); } ::sal_Int32 SAL_CALL AccessibleTextHelper::getAccessibleIndexInParent() throw (uno::RuntimeException) { - OSL_ENSURE( false, "Not implemented in this helper" ); + OSL_FAIL( "Not implemented in this helper" ); return -1; } ::sal_Int16 SAL_CALL AccessibleTextHelper::getAccessibleRole() throw (uno::RuntimeException) { - OSL_ENSURE( false, "Not implemented in this helper" ); + OSL_FAIL( "Not implemented in this helper" ); return AccessibleRole::UNKNOWN; } OUString SAL_CALL AccessibleTextHelper::getAccessibleDescription() throw (uno::RuntimeException) { - OSL_ENSURE( false, "Not implemented in this helper" ); + OSL_FAIL( "Not implemented in this helper" ); return OUString(); } OUString SAL_CALL AccessibleTextHelper::getAccessibleName() throw (uno::RuntimeException) { - OSL_ENSURE( false, "Not implemented in this helper" ); + OSL_FAIL( "Not implemented in this helper" ); return OUString(); } Reference< XAccessibleRelationSet > SAL_CALL AccessibleTextHelper::getAccessibleRelationSet() throw (uno::RuntimeException) { - OSL_ENSURE( false, "Not implemented in this helper" ); + OSL_FAIL( "Not implemented in this helper" ); return Reference< XAccessibleRelationSet >(); } Reference< XAccessibleStateSet > SAL_CALL AccessibleTextHelper::getAccessibleStateSet() throw (uno::RuntimeException) { - OSL_ENSURE( false, "Not implemented in this helper" ); + OSL_FAIL( "Not implemented in this helper" ); return Reference< XAccessibleStateSet >(); } @@ -189,7 +189,7 @@ lang::Locale SAL_CALL AccessibleTextHelper::getLocale() throw (IllegalAccessibleComponentStateException, uno::RuntimeException) { - OSL_ENSURE( false, "Not implemented in this helper" ); + OSL_FAIL( "Not implemented in this helper" ); return lang::Locale(); } diff --git a/chart2/source/controller/chartapiwrapper/AreaWrapper.cxx b/chart2/source/controller/chartapiwrapper/AreaWrapper.cxx index 82954b939226..66ca1e60fe43 100644 --- a/chart2/source/controller/chartapiwrapper/AreaWrapper.cxx +++ b/chart2/source/controller/chartapiwrapper/AreaWrapper.cxx @@ -110,7 +110,7 @@ awt::Point SAL_CALL AreaWrapper::getPosition() void SAL_CALL AreaWrapper::setPosition( const awt::Point& /*aPosition*/ ) throw (uno::RuntimeException) { - OSL_ENSURE( false, "trying to set position of chart area" ); + OSL_FAIL( "trying to set position of chart area" ); } awt::Size SAL_CALL AreaWrapper::getSize() @@ -123,7 +123,7 @@ void SAL_CALL AreaWrapper::setSize( const awt::Size& /*aSize*/ ) throw (beans::PropertyVetoException, uno::RuntimeException) { - OSL_ENSURE( false, "trying to set size of chart area" ); + OSL_FAIL( "trying to set size of chart area" ); } // ____ XShapeDescriptor (base of XShape) ____ @@ -166,7 +166,7 @@ Reference< beans::XPropertySet > AreaWrapper::getInnerPropertySet() Reference< chart2::XChartDocument > xChartDoc( m_spChart2ModelContact->getChart2Document() ); if( xChartDoc.is() ) return xChartDoc->getPageBackground(); - OSL_ENSURE(false,"AreaWrapper::getInnerPropertySet() is NULL"); + OSL_FAIL("AreaWrapper::getInnerPropertySet() is NULL"); return 0; } diff --git a/chart2/source/controller/chartapiwrapper/AxisWrapper.cxx b/chart2/source/controller/chartapiwrapper/AxisWrapper.cxx index 5dbefe7cded9..59f0f6f372dd 100644 --- a/chart2/source/controller/chartapiwrapper/AxisWrapper.cxx +++ b/chart2/source/controller/chartapiwrapper/AxisWrapper.cxx @@ -382,7 +382,7 @@ awt::Point SAL_CALL AxisWrapper::getPosition() void SAL_CALL AxisWrapper::setPosition( const awt::Point& /*aPosition*/ ) throw (uno::RuntimeException) { - OSL_ENSURE( false, "trying to set position of Axis" ); + OSL_FAIL( "trying to set position of Axis" ); } awt::Size SAL_CALL AxisWrapper::getSize() @@ -396,7 +396,7 @@ void SAL_CALL AxisWrapper::setSize( const awt::Size& /*aSize*/ ) throw (beans::PropertyVetoException, uno::RuntimeException) { - OSL_ENSURE( false, "trying to set size of Axis" ); + OSL_FAIL( "trying to set size of Axis" ); } // ____ XShapeDescriptor (base of XShape) ____ diff --git a/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx b/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx index 4819f51d1713..d22f5dd6dfeb 100644 --- a/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx +++ b/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx @@ -563,7 +563,7 @@ OUString lcl_getDiagramType( const OUString & rTemplateServiceName ) if( aName.indexOf( C2U("Line") ) != -1 || aName.indexOf( C2U("Symbol") ) != -1 ) return C2U( "com.sun.star.chart.LineDiagram" ); - OSL_ENSURE( false, "unknown template" ); + OSL_FAIL( "unknown template" ); } return OUString(); @@ -1349,7 +1349,7 @@ WrappedStackingProperty::WrappedStackingProperty( StackMode eStackMode, ::boost: m_aOuterName = C2U( "Deep" ); break; default: - OSL_ENSURE( false, "unexpected stack mode" ); + OSL_FAIL( "unexpected stack mode" ); break; } } diff --git a/chart2/source/controller/chartapiwrapper/MinMaxLineWrapper.cxx b/chart2/source/controller/chartapiwrapper/MinMaxLineWrapper.cxx index 29a6576b3697..a3e91a89c919 100644 --- a/chart2/source/controller/chartapiwrapper/MinMaxLineWrapper.cxx +++ b/chart2/source/controller/chartapiwrapper/MinMaxLineWrapper.cxx @@ -235,22 +235,22 @@ uno::Any SAL_CALL MinMaxLineWrapper::getPropertyValue( const ::rtl::OUString& rP void SAL_CALL MinMaxLineWrapper::addPropertyChangeListener( const ::rtl::OUString& /*aPropertyName*/, const uno::Reference< beans::XPropertyChangeListener >& /*xListener*/ ) throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException) { - OSL_ENSURE(false,"not implemented"); + OSL_FAIL("not implemented"); } void SAL_CALL MinMaxLineWrapper::removePropertyChangeListener( const ::rtl::OUString& /*aPropertyName*/, const uno::Reference< beans::XPropertyChangeListener >& /*aListener*/ ) throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException) { - OSL_ENSURE(false,"not implemented"); + OSL_FAIL("not implemented"); } void SAL_CALL MinMaxLineWrapper::addVetoableChangeListener( const ::rtl::OUString& /*PropertyName*/, const uno::Reference< beans::XVetoableChangeListener >& /*aListener*/ ) throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException) { - OSL_ENSURE(false,"not implemented"); + OSL_FAIL("not implemented"); } void SAL_CALL MinMaxLineWrapper::removeVetoableChangeListener( const ::rtl::OUString& /*PropertyName*/, const uno::Reference< beans::XVetoableChangeListener >& /*aListener*/ ) throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException) { - OSL_ENSURE(false,"not implemented"); + OSL_FAIL("not implemented"); } //XMultiPropertySet @@ -293,20 +293,20 @@ void SAL_CALL MinMaxLineWrapper::addPropertiesChangeListener( const uno::Reference< beans::XPropertiesChangeListener >& /* xListener */ ) throw (uno::RuntimeException) { - OSL_ENSURE(false,"not implemented"); + OSL_FAIL("not implemented"); } void SAL_CALL MinMaxLineWrapper::removePropertiesChangeListener( const uno::Reference< beans::XPropertiesChangeListener >& /* xListener */ ) throw (uno::RuntimeException) { - OSL_ENSURE(false,"not implemented"); + OSL_FAIL("not implemented"); } void SAL_CALL MinMaxLineWrapper::firePropertiesChangeEvent( const uno::Sequence< ::rtl::OUString >& /* aPropertyNames */, const uno::Reference< beans::XPropertiesChangeListener >& /* xListener */ ) throw (uno::RuntimeException) { - OSL_ENSURE(false,"not implemented"); + OSL_FAIL("not implemented"); } //XPropertyState diff --git a/chart2/source/controller/chartapiwrapper/TitleWrapper.cxx b/chart2/source/controller/chartapiwrapper/TitleWrapper.cxx index 0f88ab67e23b..eea3a3eadd50 100644 --- a/chart2/source/controller/chartapiwrapper/TitleWrapper.cxx +++ b/chart2/source/controller/chartapiwrapper/TitleWrapper.cxx @@ -263,7 +263,7 @@ void SAL_CALL TitleWrapper::setSize( const awt::Size& /*aSize*/ ) throw (beans::PropertyVetoException, uno::RuntimeException) { - OSL_ENSURE( false, "trying to set size of title" ); + OSL_FAIL( "trying to set size of title" ); } // ____ XShapeDescriptor (base of XShape) ____ diff --git a/chart2/source/controller/chartapiwrapper/UpDownBarWrapper.cxx b/chart2/source/controller/chartapiwrapper/UpDownBarWrapper.cxx index 45fb4495344f..e803e0033d51 100644 --- a/chart2/source/controller/chartapiwrapper/UpDownBarWrapper.cxx +++ b/chart2/source/controller/chartapiwrapper/UpDownBarWrapper.cxx @@ -207,22 +207,22 @@ uno::Any SAL_CALL UpDownBarWrapper::getPropertyValue( const ::rtl::OUString& rPr void SAL_CALL UpDownBarWrapper::addPropertyChangeListener( const ::rtl::OUString& /*aPropertyName*/, const uno::Reference< beans::XPropertyChangeListener >& /*xListener*/ ) throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException) { - OSL_ENSURE(false,"not implemented"); + OSL_FAIL("not implemented"); } void SAL_CALL UpDownBarWrapper::removePropertyChangeListener( const ::rtl::OUString& /*aPropertyName*/, const uno::Reference< beans::XPropertyChangeListener >& /*aListener*/ ) throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException) { - OSL_ENSURE(false,"not implemented"); + OSL_FAIL("not implemented"); } void SAL_CALL UpDownBarWrapper::addVetoableChangeListener( const ::rtl::OUString& /*PropertyName*/, const uno::Reference< beans::XVetoableChangeListener >& /*aListener*/ ) throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException) { - OSL_ENSURE(false,"not implemented"); + OSL_FAIL("not implemented"); } void SAL_CALL UpDownBarWrapper::removeVetoableChangeListener( const ::rtl::OUString& /*PropertyName*/, const uno::Reference< beans::XVetoableChangeListener >& /*aListener*/ ) throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException) { - OSL_ENSURE(false,"not implemented"); + OSL_FAIL("not implemented"); } //XMultiPropertySet @@ -263,17 +263,17 @@ uno::Sequence< uno::Any > SAL_CALL UpDownBarWrapper::getPropertyValues( const un void SAL_CALL UpDownBarWrapper::addPropertiesChangeListener( const uno::Sequence< ::rtl::OUString >& /* aPropertyNames */, const uno::Reference< beans::XPropertiesChangeListener >& /* xListener */ ) throw (uno::RuntimeException) { - OSL_ENSURE(false,"not implemented"); + OSL_FAIL("not implemented"); } void SAL_CALL UpDownBarWrapper::removePropertiesChangeListener( const uno::Reference< beans::XPropertiesChangeListener >& /* xListener */ ) throw (uno::RuntimeException) { - OSL_ENSURE(false,"not implemented"); + OSL_FAIL("not implemented"); } void SAL_CALL UpDownBarWrapper::firePropertiesChangeEvent( const uno::Sequence< ::rtl::OUString >& /* aPropertyNames */, const uno::Reference< beans::XPropertiesChangeListener >& /* xListener */ ) throw (uno::RuntimeException) { - OSL_ENSURE(false,"not implemented"); + OSL_FAIL("not implemented"); } //XPropertyState diff --git a/chart2/source/controller/chartapiwrapper/WrappedScaleProperty.cxx b/chart2/source/controller/chartapiwrapper/WrappedScaleProperty.cxx index 4894d86a0a49..ff5e93c0a497 100644 --- a/chart2/source/controller/chartapiwrapper/WrappedScaleProperty.cxx +++ b/chart2/source/controller/chartapiwrapper/WrappedScaleProperty.cxx @@ -99,7 +99,7 @@ WrappedScaleProperty::WrappedScaleProperty( tScaleProperty eScaleProperty m_aOuterName = C2U("ReverseDirection"); break; default: - OSL_ENSURE(false,"unknown scale property"); + OSL_FAIL("unknown scale property"); break; } } @@ -300,7 +300,7 @@ void WrappedScaleProperty::setPropertyValue( tScaleProperty eScaleProperty, cons } default: { - OSL_ENSURE(false,"unknown scale property"); + OSL_FAIL("unknown scale property"); break; } } @@ -499,7 +499,7 @@ Any WrappedScaleProperty::getPropertyValue( tScaleProperty eScaleProperty, const } default: { - OSL_ENSURE(false,"unknown scale property"); + OSL_FAIL("unknown scale property"); break; } } diff --git a/chart2/source/controller/dialogs/ChartTypeDialogController.cxx b/chart2/source/controller/dialogs/ChartTypeDialogController.cxx index e8984a0e0b4f..1e336a91ab55 100644 --- a/chart2/source/controller/dialogs/ChartTypeDialogController.cxx +++ b/chart2/source/controller/dialogs/ChartTypeDialogController.cxx @@ -269,7 +269,7 @@ rtl::OUString ChartTypeDialogController::getServiceNameForParameter( const Chart return (*aIter).first; } - OSL_ENSURE( false, "ChartType not implemented yet - use fallback to similar type" ); + OSL_FAIL( "ChartType not implemented yet - use fallback to similar type" ); for( sal_Int32 nMatchPrecision=1; nMatchPrecision<8; nMatchPrecision++ ) { for( aIter = rMap.begin(); aIter != aEnd; ++aIter ) diff --git a/chart2/source/controller/dialogs/DataBrowserModel.cxx b/chart2/source/controller/dialogs/DataBrowserModel.cxx index d092d81d7383..f0d08ea42719 100644 --- a/chart2/source/controller/dialogs/DataBrowserModel.cxx +++ b/chart2/source/controller/dialogs/DataBrowserModel.cxx @@ -441,7 +441,7 @@ void DataBrowserModel::insertComplexCategoryLevel( sal_Int32 nAfterColumnIndex ) if(nAfterColumnIndex<0) { - OSL_ENSURE( false, "wrong index for category level insertion" ); + OSL_FAIL( "wrong index for category level insertion" ); return; } diff --git a/chart2/source/controller/dialogs/DialogModel.cxx b/chart2/source/controller/dialogs/DialogModel.cxx index 8a86162061ae..ad2916e74bbe 100644 --- a/chart2/source/controller/dialogs/DialogModel.cxx +++ b/chart2/source/controller/dialogs/DialogModel.cxx @@ -689,7 +689,7 @@ bool DialogModel::setData( if( ! xDataProvider.is() || ! m_xTemplate.is() ) { - OSL_ENSURE( false, "Model objects missing" ); + OSL_FAIL( "Model objects missing" ); return false; } diff --git a/chart2/source/controller/dialogs/dlg_CreationWizard_UNO.cxx b/chart2/source/controller/dialogs/dlg_CreationWizard_UNO.cxx index b7461c404363..ded21367da64 100644 --- a/chart2/source/controller/dialogs/dlg_CreationWizard_UNO.cxx +++ b/chart2/source/controller/dialogs/dlg_CreationWizard_UNO.cxx @@ -320,7 +320,7 @@ void SAL_CALL CreationWizardUnoDlg::disposing() uno::Reference< beans::XPropertySetInfo > SAL_CALL CreationWizardUnoDlg::getPropertySetInfo() throw (uno::RuntimeException) { - OSL_ENSURE(false,"not implemented"); + OSL_FAIL("not implemented"); return 0; } @@ -404,25 +404,25 @@ void SAL_CALL CreationWizardUnoDlg::addPropertyChangeListener( const ::rtl::OUString& /* aPropertyName */, const uno::Reference< beans::XPropertyChangeListener >& /* xListener */ ) throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException) { - OSL_ENSURE(false,"not implemented"); + OSL_FAIL("not implemented"); } void SAL_CALL CreationWizardUnoDlg::removePropertyChangeListener( const ::rtl::OUString& /* aPropertyName */, const uno::Reference< beans::XPropertyChangeListener >& /* aListener */ ) throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException) { - OSL_ENSURE(false,"not implemented"); + OSL_FAIL("not implemented"); } void SAL_CALL CreationWizardUnoDlg::addVetoableChangeListener( const ::rtl::OUString& /* PropertyName */, const uno::Reference< beans::XVetoableChangeListener >& /* aListener */ ) throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException) { - OSL_ENSURE(false,"not implemented"); + OSL_FAIL("not implemented"); } void SAL_CALL CreationWizardUnoDlg::removeVetoableChangeListener( const ::rtl::OUString& /* PropertyName */, const uno::Reference< beans::XVetoableChangeListener >& /* aListener */ ) throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException) { - OSL_ENSURE(false,"not implemented"); + OSL_FAIL("not implemented"); } //............................................................................. diff --git a/chart2/source/controller/dialogs/res_ErrorBar.cxx b/chart2/source/controller/dialogs/res_ErrorBar.cxx index 1cd110439e7f..da60335824c2 100644 --- a/chart2/source/controller/dialogs/res_ErrorBar.cxx +++ b/chart2/source/controller/dialogs/res_ErrorBar.cxx @@ -395,7 +395,7 @@ IMPL_LINK( ErrorBarResources, CategoryChosen, void *, ) } else { - OSL_ENSURE( false, "Unknown category chosen" ); + OSL_FAIL( "Unknown category chosen" ); m_bErrorKindUnique = false; } diff --git a/chart2/source/controller/dialogs/tp_3D_SceneAppearance.cxx b/chart2/source/controller/dialogs/tp_3D_SceneAppearance.cxx index ff26d19ea7f0..74ee184fc892 100644 --- a/chart2/source/controller/dialogs/tp_3D_SceneAppearance.cxx +++ b/chart2/source/controller/dialogs/tp_3D_SceneAppearance.cxx @@ -317,7 +317,7 @@ IMPL_LINK( ThreeD_SceneAppearance_TabPage, SelectSchemeHdl, void*, EMPTYARG ) ThreeDHelper::setScheme( xDiagram, ThreeDLookScheme_Simple ); else { - OSL_ENSURE( false, "Invalid Entry selected" ); + OSL_FAIL( "Invalid Entry selected" ); } } diff --git a/chart2/source/controller/dialogs/tp_3D_SceneIllumination.cxx b/chart2/source/controller/dialogs/tp_3D_SceneIllumination.cxx index dcf70f841db7..47f9e15c1ef6 100644 --- a/chart2/source/controller/dialogs/tp_3D_SceneIllumination.cxx +++ b/chart2/source/controller/dialogs/tp_3D_SceneIllumination.cxx @@ -204,7 +204,7 @@ namespace catch( const uno::Exception & ex ) { (void)(ex); // no warning in non-debug builds - OSL_ENSURE( false, ::rtl::OUStringToOString( + OSL_FAIL( ::rtl::OUStringToOString( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Property Exception caught. Message: " )) + ex.Message, RTL_TEXTENCODING_ASCII_US ).getStr()); } @@ -236,7 +236,7 @@ namespace catch( const uno::Exception & ex ) { (void)(ex); // no warning in non-debug builds - OSL_ENSURE( false, ::rtl::OUStringToOString( + OSL_FAIL( ::rtl::OUStringToOString( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Property Exception caught. Message: " )) + ex.Message, RTL_TEXTENCODING_ASCII_US ).getStr()); } @@ -255,7 +255,7 @@ namespace catch( const uno::Exception & ex ) { (void)(ex); // no warning in non-debug builds - OSL_ENSURE( false, ::rtl::OUStringToOString( + OSL_FAIL( ::rtl::OUStringToOString( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Property Exception caught. Message: " )) + ex.Message, RTL_TEXTENCODING_ASCII_US ).getStr()); } @@ -275,7 +275,7 @@ namespace catch( const uno::Exception & ex ) { (void)(ex); // no warning in non-debug builds - OSL_ENSURE( false, ::rtl::OUStringToOString( + OSL_FAIL( ::rtl::OUStringToOString( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Property Exception caught. Message: " )) + ex.Message, RTL_TEXTENCODING_ASCII_US ).getStr()); } diff --git a/chart2/source/controller/dialogs/tp_RangeChooser.cxx b/chart2/source/controller/dialogs/tp_RangeChooser.cxx index 083dd668a1ff..ee2ff7047285 100644 --- a/chart2/source/controller/dialogs/tp_RangeChooser.cxx +++ b/chart2/source/controller/dialogs/tp_RangeChooser.cxx @@ -246,7 +246,7 @@ void RangeChooserTabPage::changeDialogModelAccordingToControls() m_xCurrentChartTypeTemplate.set( m_pTemplateProvider->getCurrentTemplate()); if( !m_xCurrentChartTypeTemplate.is()) { - OSL_ENSURE( false, "Need a template to change data source" ); + OSL_FAIL( "Need a template to change data source" ); return; } } diff --git a/chart2/source/controller/dialogs/tp_Scale.cxx b/chart2/source/controller/dialogs/tp_Scale.cxx index 195be46fedf6..a71a512e4a27 100644 --- a/chart2/source/controller/dialogs/tp_Scale.cxx +++ b/chart2/source/controller/dialogs/tp_Scale.cxx @@ -352,7 +352,7 @@ int ScaleTabPage::DeactivatePage(SfxItemSet* pItemSet) nIndex = static_cast< sal_uInt32 >( static_cast< const SfxInt32Item* >(pPoolItem)->GetValue()); else { - OSL_ENSURE( false, "Using Standard Language" ); + OSL_FAIL( "Using Standard Language" ); } Edit* pEdit = NULL; diff --git a/chart2/source/controller/itemsetwrapper/ErrorBarItemConverter.cxx b/chart2/source/controller/itemsetwrapper/ErrorBarItemConverter.cxx index 072768c13658..5330cfa66d02 100644 --- a/chart2/source/controller/itemsetwrapper/ErrorBarItemConverter.cxx +++ b/chart2/source/controller/itemsetwrapper/ErrorBarItemConverter.cxx @@ -205,7 +205,7 @@ bool ErrorBarItemConverter::ApplySpecialItem( case SCHATTR_STAT_PERCENT: case SCHATTR_STAT_BIGERROR: { - OSL_ENSURE( false, "Deprectaed item" ); + OSL_FAIL( "Deprectaed item" ); uno::Reference< beans::XPropertySet > xErrorBarProp( GetPropertySet()); double fValue = diff --git a/chart2/source/controller/itemsetwrapper/GraphicPropertyItemConverter.cxx b/chart2/source/controller/itemsetwrapper/GraphicPropertyItemConverter.cxx index dd41bb4af525..91761b8a9337 100644 --- a/chart2/source/controller/itemsetwrapper/GraphicPropertyItemConverter.cxx +++ b/chart2/source/controller/itemsetwrapper/GraphicPropertyItemConverter.cxx @@ -733,7 +733,7 @@ bool GraphicPropertyItemConverter::ApplySpecialItem( } else { - OSL_ENSURE( false, "Wrong type in Transparency Any" ); + OSL_FAIL( "Wrong type in Transparency Any" ); } } } @@ -778,7 +778,7 @@ bool GraphicPropertyItemConverter::ApplySpecialItem( } else { - OSL_ENSURE( false, "Wrong type in Transparency Any" ); + OSL_FAIL( "Wrong type in Transparency Any" ); } } } diff --git a/chart2/source/controller/itemsetwrapper/ItemConverter.cxx b/chart2/source/controller/itemsetwrapper/ItemConverter.cxx index 322061b61b06..7e5b9ec9839d 100644 --- a/chart2/source/controller/itemsetwrapper/ItemConverter.cxx +++ b/chart2/source/controller/itemsetwrapper/ItemConverter.cxx @@ -143,7 +143,7 @@ void ItemConverter::FillItemSet( SfxItemSet & rOutItemSet ) const catch( beans::UnknownPropertyException &ex ) { delete pItem; - OSL_ENSURE( false, + OSL_FAIL( ::rtl::OUStringToOString( ex.Message + ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( @@ -175,14 +175,14 @@ void ItemConverter::FillSpecialItem( USHORT /*nWhichId*/, SfxItemSet & /*rOutItemSet*/ ) const throw( uno::Exception ) { - OSL_ENSURE( false, "ItemConverter: Unhandled special item found!" ); + OSL_FAIL( "ItemConverter: Unhandled special item found!" ); } bool ItemConverter::ApplySpecialItem( USHORT /*nWhichId*/, const SfxItemSet & /*rItemSet*/ ) throw( uno::Exception ) { - OSL_ENSURE( false, "ItemConverter: Unhandled special item found!" ); + OSL_FAIL( "ItemConverter: Unhandled special item found!" ); return false; } @@ -214,7 +214,7 @@ bool ItemConverter::ApplyItemSet( const SfxItemSet & rItemSet ) } catch( beans::UnknownPropertyException &ex ) { - OSL_ENSURE( false, + OSL_FAIL( ::rtl::OUStringToOString( ex.Message + ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( @@ -223,7 +223,7 @@ bool ItemConverter::ApplyItemSet( const SfxItemSet & rItemSet ) } catch( uno::Exception &ex ) { - OSL_ENSURE( false, ::rtl::OUStringToOString( + OSL_FAIL( ::rtl::OUStringToOString( ex.Message, RTL_TEXTENCODING_ASCII_US ).getStr()); } } diff --git a/chart2/source/controller/itemsetwrapper/StatisticsItemConverter.cxx b/chart2/source/controller/itemsetwrapper/StatisticsItemConverter.cxx index 409b675e41b9..7efa65b92ea7 100644 --- a/chart2/source/controller/itemsetwrapper/StatisticsItemConverter.cxx +++ b/chart2/source/controller/itemsetwrapper/StatisticsItemConverter.cxx @@ -304,7 +304,7 @@ bool StatisticsItemConverter::ApplySpecialItem( case SCHATTR_STAT_PERCENT: case SCHATTR_STAT_BIGERROR: { - OSL_ENSURE( false, "Deprectaed item" ); + OSL_FAIL( "Deprectaed item" ); uno::Reference< beans::XPropertySet > xErrorBarProp( lcl_GetYErrorBar( GetPropertySet())); bool bOldHasErrorBar = xErrorBarProp.is(); diff --git a/chart2/source/controller/main/ControllerCommandDispatch.cxx b/chart2/source/controller/main/ControllerCommandDispatch.cxx index c2134bef3ff1..eaf4b77a8746 100644 --- a/chart2/source/controller/main/ControllerCommandDispatch.cxx +++ b/chart2/source/controller/main/ControllerCommandDispatch.cxx @@ -690,7 +690,7 @@ bool ControllerCommandDispatch::commandAvailable( const OUString & rCommand ) ::std::map< OUString, bool >::const_iterator aIt( m_aCommandAvailability.find( rCommand )); if( aIt != m_aCommandAvailability.end()) return aIt->second; - OSL_ENSURE( false, "commandAvailable: command not in availability map" ); + OSL_FAIL( "commandAvailable: command not in availability map" ); return false; } diff --git a/chart2/source/controller/main/UndoManager.cxx b/chart2/source/controller/main/UndoManager.cxx index 2f9efb674eaf..d282201ad63d 100644 --- a/chart2/source/controller/main/UndoManager.cxx +++ b/chart2/source/controller/main/UndoManager.cxx @@ -204,7 +204,7 @@ void UndoManager::impl_undoRedo( } else { - OSL_ENSURE( false, "Can't Undo/Redo" ); + OSL_FAIL( "Can't Undo/Redo" ); } } |