From 7c66790faa8491c0d28c6cde38ea08c054ec59b5 Mon Sep 17 00:00:00 2001 From: Thomas Arnhold Date: Sat, 19 Mar 2011 14:09:49 +0100 Subject: Move OSL_ENSURE(sal_False,...) to OSL_FAIL(...) --- xmloff/source/forms/attriblistmerge.cxx | 4 ++-- xmloff/source/forms/elementexport.cxx | 16 +++++++-------- xmloff/source/forms/elementimport.cxx | 24 +++++++++++------------ xmloff/source/forms/elementimport_impl.hxx | 4 ++-- xmloff/source/forms/eventimport.cxx | 2 +- xmloff/source/forms/formattributes.cxx | 12 ++++++------ xmloff/source/forms/formcellbinding.cxx | 10 +++++----- xmloff/source/forms/formlayerexport.cxx | 2 +- xmloff/source/forms/gridcolumnproptranslator.cxx | 18 ++++++++--------- xmloff/source/forms/layerexport.cxx | 4 ++-- xmloff/source/forms/layerimport.cxx | 12 ++++++------ xmloff/source/forms/officeforms.cxx | 4 ++-- xmloff/source/forms/propertyexport.cxx | 11 +++++------ xmloff/source/forms/propertyimport.cxx | 20 ++++++++----------- xmloff/source/meta/MetaExportComponent.cxx | 2 +- xmloff/source/style/xmlexppr.cxx | 2 +- xmloff/source/transform/XMLFilterRegistration.cxx | 2 +- 17 files changed, 71 insertions(+), 78 deletions(-) (limited to 'xmloff') diff --git a/xmloff/source/forms/attriblistmerge.cxx b/xmloff/source/forms/attriblistmerge.cxx index 1b2926b277..378c343ac5 100755 --- a/xmloff/source/forms/attriblistmerge.cxx +++ b/xmloff/source/forms/attriblistmerge.cxx @@ -62,7 +62,7 @@ namespace xmloff if (aLookupSublist == m_aLists.end()) { - OSL_ENSURE(sal_False, "OAttribListMerger::seekToIndex: invalid index!"); + OSL_FAIL("OAttribListMerger::seekToIndex: invalid index!"); return sal_False; } _rSubList = *aLookupSublist; @@ -85,7 +85,7 @@ namespace xmloff return sal_True; } - OSL_ENSURE(sal_False, "OAttribListMerger::seekToName: did not find the name!"); + OSL_FAIL("OAttribListMerger::seekToName: did not find the name!"); return sal_False; } diff --git a/xmloff/source/forms/elementexport.cxx b/xmloff/source/forms/elementexport.cxx index 9e7167232d..93242e7fd6 100755 --- a/xmloff/source/forms/elementexport.cxx +++ b/xmloff/source/forms/elementexport.cxx @@ -181,7 +181,7 @@ namespace xmloff Reference< XPersistObject > xPersistence(m_xProps, UNO_QUERY); if (!xPersistence.is()) { - OSL_ENSURE(sal_False, "OElementExport::exportServiceNameAttribute: no XPersistObject!"); + OSL_FAIL("OElementExport::exportServiceNameAttribute: no XPersistObject!"); return; } @@ -1089,7 +1089,7 @@ namespace xmloff else if ( m_xPropertyInfo->hasPropertyByName( PROPERTY_SPIN_INCREMENT ) ) sPropertyName = PROPERTY_SPIN_INCREMENT; else - OSL_ENSURE( sal_False, "OControlExport::exportSpecialAttributes: not property which can be mapped to step-size attribute!" ); + OSL_FAIL( "OControlExport::exportSpecialAttributes: not property which can be mapped to step-size attribute!" ); if ( sPropertyName.getLength() ) exportInt32PropertyAttribute( @@ -1757,7 +1757,7 @@ namespace xmloff break; default: - OSL_ENSURE(sal_False, "OControlExport::examineControl: unknown control type (class id)!"); + OSL_FAIL("OControlExport::examineControl: unknown control type (class id)!"); // NO break! case FormComponentType::NAVIGATIONBAR: @@ -1858,7 +1858,7 @@ namespace xmloff } catch( const Exception& ) { - OSL_ENSURE( sal_False, "OControlExport::exportCellBindingAttributes: caught an exception!" ); + OSL_FAIL( "OControlExport::exportCellBindingAttributes: caught an exception!" ); } } @@ -1903,7 +1903,7 @@ namespace xmloff } catch( const Exception& ) { - OSL_ENSURE( sal_False, "OControlExport::exportCellListSourceRange: caught an exception!" ); + OSL_FAIL( "OControlExport::exportCellListSourceRange: caught an exception!" ); } } @@ -1977,7 +1977,7 @@ namespace xmloff } catch( const Exception& ) { - OSL_ENSURE( sal_False, "OColumnExport::controlHasActiveDataBinding: caught an exception!" ); + OSL_FAIL( "OColumnExport::controlHasActiveDataBinding: caught an exception!" ); } return false; @@ -2008,10 +2008,10 @@ namespace xmloff } catch( const Exception& ) { - OSL_ENSURE( sal_False, "OControlExport::controlHasUserSuppliedListEntries: caught an exception!" ); + OSL_FAIL( "OControlExport::controlHasUserSuppliedListEntries: caught an exception!" ); } - OSL_ENSURE( sal_False, "OControlExport::controlHasUserSuppliedListEntries: unreachable code!" ); + OSL_FAIL( "OControlExport::controlHasUserSuppliedListEntries: unreachable code!" ); // this method should be called for list and combo boxes only return true; } diff --git a/xmloff/source/forms/elementimport.cxx b/xmloff/source/forms/elementimport.cxx index 710abf6e1d..6247264730 100755 --- a/xmloff/source/forms/elementimport.cxx +++ b/xmloff/source/forms/elementimport.cxx @@ -248,7 +248,7 @@ namespace xmloff // insert the element into the parent container if (!m_sName.getLength()) { - OSL_ENSURE(sal_False, "OElementImport::EndElement: did not find a name attribute!"); + OSL_FAIL("OElementImport::EndElement: did not find a name attribute!"); m_sName = implGetDefaultName(); } @@ -317,7 +317,7 @@ namespace xmloff } catch(Exception&) { - OSL_ENSURE(sal_False, "OElementImport::implApplySpecificProperties: could not set the properties (using the XMultiPropertySet)!"); + OSL_FAIL("OElementImport::implApplySpecificProperties: could not set the properties (using the XMultiPropertySet)!"); } } @@ -337,8 +337,7 @@ namespace xmloff } catch(Exception&) { - OSL_ENSURE(sal_False, - ::rtl::OString("OElementImport::implApplySpecificProperties: could not set the property \"") + OSL_FAIL(::rtl::OString("OElementImport::implApplySpecificProperties: could not set the property \"") += ::rtl::OString(aPropValues->Name.getStr(), aPropValues->Name.getLength(), RTL_TEXTENCODING_ASCII_US) += ::rtl::OString("\"!")); } @@ -480,8 +479,7 @@ namespace xmloff } catch(Exception&) { - OSL_ENSURE(sal_False, - ::rtl::OString("OElementImport::EndElement: could not set the property \"") + OSL_FAIL(::rtl::OString("OElementImport::EndElement: could not set the property \"") += ::rtl::OString(aPropValues->Name.getStr(), aPropValues->Name.getLength(), RTL_TEXTENCODING_ASCII_US) += ::rtl::OString("\"!")); } @@ -517,7 +515,7 @@ namespace xmloff continue; return sReturn; } - OSL_ENSURE(sal_False, "OElementImport::implGetDefaultName: did not find a free name!"); + OSL_FAIL("OElementImport::implGetDefaultName: did not find a free name!"); return sUnnamedName; } @@ -649,7 +647,7 @@ namespace xmloff xReturn = Reference< XPropertySet >(xPure, UNO_QUERY); } else - OSL_ENSURE(sal_False, "OElementImport::createElement: no service name to create an element!"); + OSL_FAIL("OElementImport::createElement: no service name to create an element!"); return xReturn; } @@ -858,7 +856,7 @@ namespace xmloff // get the property set info if (!m_xInfo.is()) { - OSL_ENSURE(sal_False, "OControlImport::StartElement: no PropertySetInfo!"); + OSL_FAIL("OControlImport::StartElement: no PropertySetInfo!"); return; } @@ -1011,7 +1009,7 @@ namespace xmloff } catch( const Exception& ) { - OSL_ENSURE( sal_False, "OControlImport::EndElement: caught an exception while retrieving the class id!" ); + OSL_FAIL( "OControlImport::EndElement: caught an exception while retrieving the class id!" ); } const sal_Char* pValueProperty = NULL; @@ -1048,7 +1046,7 @@ namespace xmloff } catch( const Exception& ) { - OSL_ENSURE( sal_False, "OControlImport::EndElement: caught an exception while retrieving the current value property!" ); + OSL_FAIL( "OControlImport::EndElement: caught an exception while retrieving the current value property!" ); } } } @@ -1065,7 +1063,7 @@ namespace xmloff } catch( const Exception& ) { - OSL_ENSURE( sal_False, "OControlImport::EndElement: caught an exception while restoring the value property!" ); + OSL_FAIL( "OControlImport::EndElement: caught an exception while restoring the value property!" ); } } @@ -2136,7 +2134,7 @@ namespace xmloff } else { - OSL_ENSURE(sal_False, "OFormImport::implTranslateStringListProperty: invalid value (empty)!"); + OSL_FAIL("OFormImport::implTranslateStringListProperty: invalid value (empty)!"); } aProp.Value <<= aList; diff --git a/xmloff/source/forms/elementimport_impl.hxx b/xmloff/source/forms/elementimport_impl.hxx index 5b92da41d3..7f79019aa1 100755 --- a/xmloff/source/forms/elementimport_impl.hxx +++ b/xmloff/source/forms/elementimport_impl.hxx @@ -51,7 +51,7 @@ inline SvXMLImportContext* OContainerImport< BASE >::CreateChildContext( return implCreateControlWrapper(_nPrefix, _rLocalName); else { - OSL_ENSURE(sal_False, "OContainerImport::CreateChildContext: don't have an element!"); + OSL_FAIL("OContainerImport::CreateChildContext: don't have an element!"); return NULL; } } @@ -73,7 +73,7 @@ inline ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > m_xMeAsContainer = ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >(xReturn, ::com::sun::star::uno::UNO_QUERY); if (!m_xMeAsContainer.is()) { - OSL_ENSURE(sal_False, "OContainerImport::createElement: invalid element (no XNameContainer) created!"); + OSL_FAIL("OContainerImport::createElement: invalid element (no XNameContainer) created!"); xReturn.clear(); } diff --git a/xmloff/source/forms/eventimport.cxx b/xmloff/source/forms/eventimport.cxx index cc3f7833ef..4c245df355 100755 --- a/xmloff/source/forms/eventimport.cxx +++ b/xmloff/source/forms/eventimport.cxx @@ -137,7 +137,7 @@ namespace xmloff Reference< XEventAttacherManager > xEventManager(_rxContainer, UNO_QUERY); if (!xEventManager.is()) { - OSL_ENSURE(sal_False, "ODefaultEventAttacherManager::setEvents: invalid argument!"); + OSL_FAIL("ODefaultEventAttacherManager::setEvents: invalid argument!"); return; } diff --git a/xmloff/source/forms/formattributes.cxx b/xmloff/source/forms/formattributes.cxx index a91695640f..70c311cd06 100755 --- a/xmloff/source/forms/formattributes.cxx +++ b/xmloff/source/forms/formattributes.cxx @@ -77,7 +77,7 @@ namespace xmloff case CCA_ORIENTATION: return "orientation"; case CCA_VISUAL_EFFECT: return "visual-effect"; default: - OSL_ENSURE(sal_False, "OAttributeMetaData::getCommonControlAttributeName: invalid id (maybe you or-ed two flags?)!"); + OSL_FAIL("OAttributeMetaData::getCommonControlAttributeName: invalid id (maybe you or-ed two flags?)!"); } return ""; } @@ -122,7 +122,7 @@ namespace xmloff case faOrder: return "order"; case faTabbingCycle: return "tab-cycle"; default: - OSL_ENSURE(sal_False, "OAttributeMetaData::getFormAttributeName: invalid id!"); + OSL_FAIL("OAttributeMetaData::getFormAttributeName: invalid id!"); } return ""; } @@ -151,7 +151,7 @@ namespace xmloff case DA_LIST_SOURCE_TYPE: return "list-source-type"; case DA_INPUT_REQUIRED: return "input-required"; default: - OSL_ENSURE(sal_False, "OAttributeMetaData::getDatabaseAttributeName: invalid id (maybe you or-ed two flags?)!"); + OSL_FAIL("OAttributeMetaData::getDatabaseAttributeName: invalid id (maybe you or-ed two flags?)!"); } return ""; } @@ -172,7 +172,7 @@ namespace xmloff case BA_LIST_LINKING_TYPE: return "list-linkage-type"; case BA_LIST_CELL_RANGE: return "source-cell-range"; default: - OSL_ENSURE(sal_False, "OAttributeMetaData::getBindingAttributeName: invalid id (maybe you or-ed two flags?)!"); + OSL_FAIL("OAttributeMetaData::getBindingAttributeName: invalid id (maybe you or-ed two flags?)!"); } return ""; } @@ -208,7 +208,7 @@ namespace xmloff case SCA_TOGGLE: return "toggle"; case SCA_FOCUS_ON_CLICK: return "focus-on-click"; default: - OSL_ENSURE(sal_False, "OAttributeMetaData::getSpecialAttributeName: invalid id (maybe you or-ed two flags?)!"); + OSL_FAIL("OAttributeMetaData::getSpecialAttributeName: invalid id (maybe you or-ed two flags?)!"); } return ""; } @@ -231,7 +231,7 @@ namespace xmloff case ofaAutomaticFocus: return "automatic-focus"; case ofaApplyDesignMode: return "apply-design-mode"; default: - OSL_ENSURE(sal_False, "OAttributeMetaData::getOfficeFormsAttributeName: invalid id!"); + OSL_FAIL("OAttributeMetaData::getOfficeFormsAttributeName: invalid id!"); } return ""; } diff --git a/xmloff/source/forms/formcellbinding.cxx b/xmloff/source/forms/formcellbinding.cxx index 58d3b252f6..5dd1338522 100755 --- a/xmloff/source/forms/formcellbinding.cxx +++ b/xmloff/source/forms/formcellbinding.cxx @@ -228,7 +228,7 @@ Reference< XListEntrySource > FormCellBindingHelper::createCellListSourceFromStr } catch( const Exception& ) { - OSL_ENSURE( sal_False, "FormCellBindingHelper::getStringAddressFromCellBinding: caught an exception!" ); + OSL_FAIL( "FormCellBindingHelper::getStringAddressFromCellBinding: caught an exception!" ); } return sAddress; @@ -257,7 +257,7 @@ Reference< XListEntrySource > FormCellBindingHelper::createCellListSourceFromStr } catch( const Exception& ) { - OSL_ENSURE( sal_False, "FormCellBindingHelper::getStringAddressFromCellListSource: caught an exception!" ); + OSL_FAIL( "FormCellBindingHelper::getStringAddressFromCellListSource: caught an exception!" ); } return sAddress; @@ -293,7 +293,7 @@ bool FormCellBindingHelper::isSpreadsheetDocumentWhichSupplies( const Reference< } catch( const Exception& ) { - OSL_ENSURE( sal_False, "FormCellBindingHelper::isSpreadsheetDocumentWhichSupplies: caught an exception!" ); + OSL_FAIL( "FormCellBindingHelper::isSpreadsheetDocumentWhichSupplies: caught an exception!" ); } return bYesItIs; @@ -448,7 +448,7 @@ Reference< XInterface > FormCellBindingHelper::createDocumentDependentInstance( } catch ( const Exception& ) { - OSL_ENSURE( sal_False, "FormCellBindingHelper::createDocumentDependentInstance: could not create the binding at the document!" ); + OSL_FAIL( "FormCellBindingHelper::createDocumentDependentInstance: could not create the binding at the document!" ); } } return xReturn; @@ -479,7 +479,7 @@ bool FormCellBindingHelper::doConvertAddressRepresentations( const ::rtl::OUStri } catch( const Exception& ) { - OSL_ENSURE( sal_False, "FormCellBindingHelper::doConvertAddressRepresentations: caught an exception!" ); + OSL_FAIL( "FormCellBindingHelper::doConvertAddressRepresentations: caught an exception!" ); } } diff --git a/xmloff/source/forms/formlayerexport.cxx b/xmloff/source/forms/formlayerexport.cxx index c2edb3f19d..6904069028 100755 --- a/xmloff/source/forms/formlayerexport.cxx +++ b/xmloff/source/forms/formlayerexport.cxx @@ -108,7 +108,7 @@ namespace xmloff } catch(Exception&) { - OSL_ENSURE(sal_False, "OFormLayerXMLExport::examine: could not examine the draw page!"); + OSL_FAIL("OFormLayerXMLExport::examine: could not examine the draw page!"); } } diff --git a/xmloff/source/forms/gridcolumnproptranslator.cxx b/xmloff/source/forms/gridcolumnproptranslator.cxx index 86b317d7a7..2224200c1e 100755 --- a/xmloff/source/forms/gridcolumnproptranslator.cxx +++ b/xmloff/source/forms/gridcolumnproptranslator.cxx @@ -111,7 +111,7 @@ namespace xmloff } ++pTranslation; } - OSL_ENSURE( sal_False, "valueAlignToParaAdjust: unreachable!" ); + OSL_FAIL( "valueAlignToParaAdjust: unreachable!" ); } //---------------------------------------------------------------- @@ -129,7 +129,7 @@ namespace xmloff } ++pTranslation; } - OSL_ENSURE( sal_False, "valueParaAdjustToAlign: unreachable!" ); + OSL_FAIL( "valueParaAdjustToAlign: unreachable!" ); } //==================================================================== @@ -260,25 +260,25 @@ namespace xmloff //-------------------------------------------------------------------- void SAL_CALL OGridColumnPropertyTranslator::addPropertyChangeListener( const ::rtl::OUString&, const Reference< XPropertyChangeListener >& ) throw (UnknownPropertyException, WrappedTargetException, RuntimeException) { - OSL_ENSURE( sal_False, "OGridColumnPropertyTranslator::addPropertyChangeListener: not implemented - this should not be needed!" ); + OSL_FAIL( "OGridColumnPropertyTranslator::addPropertyChangeListener: not implemented - this should not be needed!" ); } //-------------------------------------------------------------------- void SAL_CALL OGridColumnPropertyTranslator::removePropertyChangeListener( const ::rtl::OUString&, const Reference< XPropertyChangeListener >& ) throw (UnknownPropertyException, WrappedTargetException, RuntimeException) { - OSL_ENSURE( sal_False, "OGridColumnPropertyTranslator::removePropertyChangeListener: not implemented - this should not be needed!" ); + OSL_FAIL( "OGridColumnPropertyTranslator::removePropertyChangeListener: not implemented - this should not be needed!" ); } //-------------------------------------------------------------------- void SAL_CALL OGridColumnPropertyTranslator::addVetoableChangeListener( const ::rtl::OUString&, const Reference< XVetoableChangeListener >& ) throw (UnknownPropertyException, WrappedTargetException, RuntimeException) { - OSL_ENSURE( sal_False, "OGridColumnPropertyTranslator::addVetoableChangeListener: not implemented - this should not be needed!" ); + OSL_FAIL( "OGridColumnPropertyTranslator::addVetoableChangeListener: not implemented - this should not be needed!" ); } //-------------------------------------------------------------------- void SAL_CALL OGridColumnPropertyTranslator::removeVetoableChangeListener( const ::rtl::OUString&, const Reference< XVetoableChangeListener >& ) throw (UnknownPropertyException, WrappedTargetException, RuntimeException) { - OSL_ENSURE( sal_False, "OGridColumnPropertyTranslator::removeVetoableChangeListener: not implemented - this should not be needed!" ); + OSL_FAIL( "OGridColumnPropertyTranslator::removeVetoableChangeListener: not implemented - this should not be needed!" ); } //-------------------------------------------------------------------- @@ -325,19 +325,19 @@ namespace xmloff //-------------------------------------------------------------------- void SAL_CALL OGridColumnPropertyTranslator::addPropertiesChangeListener( const Sequence< ::rtl::OUString >&, const Reference< XPropertiesChangeListener >& ) throw (RuntimeException) { - OSL_ENSURE( sal_False, "OGridColumnPropertyTranslator::addPropertiesChangeListener: not implemented - this should not be needed!" ); + OSL_FAIL( "OGridColumnPropertyTranslator::addPropertiesChangeListener: not implemented - this should not be needed!" ); } //-------------------------------------------------------------------- void SAL_CALL OGridColumnPropertyTranslator::removePropertiesChangeListener( const Reference< XPropertiesChangeListener >& ) throw (RuntimeException) { - OSL_ENSURE( sal_False, "OGridColumnPropertyTranslator::removePropertiesChangeListener: not implemented - this should not be needed!" ); + OSL_FAIL( "OGridColumnPropertyTranslator::removePropertiesChangeListener: not implemented - this should not be needed!" ); } //-------------------------------------------------------------------- void SAL_CALL OGridColumnPropertyTranslator::firePropertiesChangeEvent( const Sequence< ::rtl::OUString >&, const Reference< XPropertiesChangeListener >& ) throw (RuntimeException) { - OSL_ENSURE( sal_False, "OGridColumnPropertyTranslator::firePropertiesChangeEvent: not implemented - this should not be needed!" ); + OSL_FAIL( "OGridColumnPropertyTranslator::firePropertiesChangeEvent: not implemented - this should not be needed!" ); } //........................................................................ diff --git a/xmloff/source/forms/layerexport.cxx b/xmloff/source/forms/layerexport.cxx index b2dc4b830c..2c2d5f4b1f 100755 --- a/xmloff/source/forms/layerexport.cxx +++ b/xmloff/source/forms/layerexport.cxx @@ -140,7 +140,7 @@ namespace xmloff if (!xSI->supportsService(SERVICE_FORMSCOLLECTION)) { - OSL_ENSURE(sal_False, "OFormLayerXMLExport_Impl::impl_isFormPageContainingForms: invalid collection (is no com.sun.star.form.Forms)!"); + OSL_FAIL("OFormLayerXMLExport_Impl::impl_isFormPageContainingForms: invalid collection (is no com.sun.star.form.Forms)!"); // nothing to do return sal_False; } @@ -245,7 +245,7 @@ namespace xmloff } catch(Exception&) { - OSL_ENSURE(sal_False, "OFormLayerXMLExport_Impl::exportCollectionElements: caught an exception ... skipping the current element!"); + OSL_FAIL("OFormLayerXMLExport_Impl::exportCollectionElements: caught an exception ... skipping the current element!"); continue; } } diff --git a/xmloff/source/forms/layerimport.cxx b/xmloff/source/forms/layerimport.cxx index dca1d1fe11..7dfb223584 100755 --- a/xmloff/source/forms/layerimport.cxx +++ b/xmloff/source/forms/layerimport.cxx @@ -306,11 +306,11 @@ void OFormLayerXMLImport_Impl::applyControlNumberStyle(const Reference< XPropert } catch(const Exception&) { - OSL_ENSURE(sal_False, "OFormLayerXMLImport_Impl::applyControlNumberStyle: couldn't set the format!"); + OSL_FAIL("OFormLayerXMLImport_Impl::applyControlNumberStyle: couldn't set the format!"); } } else - OSL_ENSURE(sal_False, "OFormLayerXMLImport_Impl::applyControlNumberStyle: did not find the style with the given name!"); + OSL_FAIL("OFormLayerXMLImport_Impl::applyControlNumberStyle: did not find the style with the given name!"); } } @@ -474,7 +474,7 @@ void OFormLayerXMLImport_Impl::endPage() } catch(Exception&) { - OSL_ENSURE(sal_False, "OFormLayerXMLImport_Impl::endPage: unable to knit the control references (caught an exception)!"); + OSL_FAIL("OFormLayerXMLImport_Impl::endPage: unable to knit the control references (caught an exception)!"); } // now that we have all children of the forms collection, attach the events @@ -502,7 +502,7 @@ Reference< XPropertySet > OFormLayerXMLImport_Impl::lookupControlId(const ::rtl: if (m_aCurrentPageIds->second.end() != aPos) xReturn = aPos->second; else - OSL_ENSURE(sal_False, "OFormLayerXMLImport_Impl::lookupControlId: invalid control id (did not find it)!"); + OSL_FAIL("OFormLayerXMLImport_Impl::lookupControlId: invalid control id (did not find it)!"); } return xReturn; } @@ -593,7 +593,7 @@ void OFormLayerXMLImport_Impl::documentDone( ) } catch( const Exception& ) { - OSL_ENSURE( sal_False, "OFormLayerXMLImport_Impl::documentDone: caught an exception while binding to a cell!" ); + OSL_FAIL( "OFormLayerXMLImport_Impl::documentDone: caught an exception while binding to a cell!" ); } } m_aCellValueBindings.clear(); @@ -620,7 +620,7 @@ void OFormLayerXMLImport_Impl::documentDone( ) } catch( const Exception& ) { - OSL_ENSURE( sal_False, "OFormLayerXMLImport_Impl::documentDone: caught an exception while binding to a cell range!" ); + OSL_FAIL( "OFormLayerXMLImport_Impl::documentDone: caught an exception while binding to a cell range!" ); } } m_aCellRangeListSources.clear(); diff --git a/xmloff/source/forms/officeforms.cxx b/xmloff/source/forms/officeforms.cxx index 2e96afe6a6..a286c1cf14 100755 --- a/xmloff/source/forms/officeforms.cxx +++ b/xmloff/source/forms/officeforms.cxx @@ -114,7 +114,7 @@ namespace xmloff } catch(Exception&) { - OSL_ENSURE(sal_False, "OFormsRootImport::StartElement: caught an exception while setting the document properties!"); + OSL_FAIL("OFormsRootImport::StartElement: caught an exception while setting the document properties!"); } } @@ -183,7 +183,7 @@ namespace xmloff } catch(Exception&) { - OSL_ENSURE(sal_False, "OFormsRootExport::addModelAttributes: caught an exception while retrieving the document properties!"); + OSL_FAIL("OFormsRootExport::addModelAttributes: caught an exception while retrieving the document properties!"); } } diff --git a/xmloff/source/forms/propertyexport.cxx b/xmloff/source/forms/propertyexport.cxx index 292ef71114..da1027a671 100755 --- a/xmloff/source/forms/propertyexport.cxx +++ b/xmloff/source/forms/propertyexport.cxx @@ -214,7 +214,7 @@ namespace xmloff pSequenceIterator = new OSequenceIterator< sal_Int64 >(aValue); break; default: - OSL_ENSURE(sal_False, "OPropertyExport::exportRemainingProperties: unsupported sequence tyoe !"); + OSL_FAIL("OPropertyExport::exportRemainingProperties: unsupported sequence tyoe !"); break; } if (pSequenceIterator) @@ -573,7 +573,7 @@ namespace xmloff break; case TypeClass_HYPER: // TODO - OSL_ENSURE(sal_False, "OPropertyExport::implConvertAny: missing implementation for sal_Int64!"); + OSL_FAIL("OPropertyExport::implConvertAny: missing implementation for sal_Int64!"); break; case TypeClass_ENUM: { @@ -615,7 +615,7 @@ namespace xmloff // if any other types are added here, please remember to adjust implGetPropertyXMLType accordingly // no more options ... - OSL_ENSURE(sal_False, "OPropertyExport::implConvertAny: unsupported value type!"); + OSL_FAIL("OPropertyExport::implConvertAny: unsupported value type!"); break; } // let the unit converter format is as string @@ -705,8 +705,7 @@ namespace xmloff // the property must exist if (!m_xPropertyInfo->hasPropertyByName(_rPropertyName)) { - OSL_ENSURE(sal_False, - ::rtl::OString("OPropertyExport::dbg_implCheckProperty: no property with the name ") += + OSL_FAIL(::rtl::OString("OPropertyExport::dbg_implCheckProperty: no property with the name ") += ::rtl::OString(_rPropertyName.getStr(), _rPropertyName.getLength(), RTL_TEXTENCODING_ASCII_US) += ::rtl::OString("!")); return; @@ -721,7 +720,7 @@ namespace xmloff } catch(Exception&) { - OSL_ENSURE(sal_False, "OPropertyExport::dbg_implCheckProperty: caught an exception, could not check the property!"); + OSL_FAIL("OPropertyExport::dbg_implCheckProperty: caught an exception, could not check the property!"); } } #endif // DBG_UTIL - dbg_implCheckProperty diff --git a/xmloff/source/forms/propertyimport.cxx b/xmloff/source/forms/propertyimport.cxx index e5391c92c1..da7366c1f8 100755 --- a/xmloff/source/forms/propertyimport.cxx +++ b/xmloff/source/forms/propertyimport.cxx @@ -162,7 +162,7 @@ Any PropertyConversion::convertString( SvXMLImport& _rImporter, const ::com::sun break; case TypeClass_HYPER: { - OSL_ENSURE(sal_False, "PropertyConversion::convertString: 64-bit integers not implemented yet!"); + OSL_FAIL("PropertyConversion::convertString: 64-bit integers not implemented yet!"); } break; case TypeClass_DOUBLE: @@ -241,11 +241,11 @@ Any PropertyConversion::convertString( SvXMLImport& _rImporter, const ::com::sun } } else - OSL_ENSURE(sal_False, "PropertyConversion::convertString: unsupported property type!"); + OSL_FAIL("PropertyConversion::convertString: unsupported property type!"); } break; default: - OSL_ENSURE(sal_False, "PropertyConversion::convertString: invalid type class!"); + OSL_FAIL("PropertyConversion::convertString: invalid type class!"); } return aReturn; @@ -296,8 +296,7 @@ SvXMLImportContext* OPropertyImport::CreateChildContext(sal_uInt16 _nPrefix, con } else { - OSL_ENSURE(sal_False, - ::rtl::OString("OPropertyImport::CreateChildContext: unknown sub element (only \"properties\" is recognized, but it is ") + OSL_FAIL(::rtl::OString("OPropertyImport::CreateChildContext: unknown sub element (only \"properties\" is recognized, but it is ") += ::rtl::OString(_rLocalName.getStr(), _rLocalName.getLength(), RTL_TEXTENCODING_ASCII_US) += ::rtl::OString(")!")); return SvXMLImportContext::CreateChildContext(_nPrefix, _rLocalName, _rxAttrList); @@ -372,7 +371,7 @@ bool OPropertyImport::handleAttribute(sal_uInt16 /*_nNamespaceKey*/, const ::rtl sMessage += ::rtl::OString( _rLocalName.getStr(), _rLocalName.getLength(), osl_getThreadTextEncoding() ); sMessage += ::rtl::OString( "\n value: " ); sMessage += ::rtl::OString( _rValue.getStr(), _rValue.getLength(), osl_getThreadTextEncoding() ); - OSL_ENSURE( sal_False, sMessage.getStr() ); + OSL_FAIL( sMessage.getStr() ); #endif return false; } @@ -404,8 +403,7 @@ SvXMLImportContext* OPropertyElementsContext::CreateChildContext(sal_uInt16 _nPr } else { - OSL_ENSURE(sal_False, - ::rtl::OString("OPropertyElementsContext::CreateChildContext: unknown child element (\"") + OSL_FAIL(::rtl::OString("OPropertyElementsContext::CreateChildContext: unknown child element (\"") += ::rtl::OString(_rLocalName.getStr(), _rLocalName.getLength(), RTL_TEXTENCODING_ASCII_US) += ::rtl::OString("\")!")); return new SvXMLImportContext(GetImport(), _nPrefix, _rLocalName); @@ -444,8 +442,7 @@ OSinglePropertyContext::OSinglePropertyContext(SvXMLImport& _rImport, sal_uInt16 SvXMLImportContext* OSinglePropertyContext::CreateChildContext(sal_uInt16 _nPrefix, const ::rtl::OUString& _rLocalName, const Reference< sax::XAttributeList >&) { - OSL_ENSURE(sal_False, - ::rtl::OString("OSinglePropertyContext::CreateChildContext: unknown child element (\"") + OSL_FAIL(::rtl::OString("OSinglePropertyContext::CreateChildContext: unknown child element (\"") += ::rtl::OString(_rLocalName.getStr(), _rLocalName.getLength(), RTL_TEXTENCODING_ASCII_US) += ::rtl::OString("\")!")); return new SvXMLImportContext(GetImport(), _nPrefix, _rLocalName); @@ -589,8 +586,7 @@ SvXMLImportContext* OListPropertyContext::CreateChildContext( sal_uInt16 _nPrefi } else { - OSL_ENSURE( sal_False, - ::rtl::OString("OListPropertyContext::CreateChildContext: unknown child element (\"") + OSL_FAIL( ::rtl::OString("OListPropertyContext::CreateChildContext: unknown child element (\"") += ::rtl::OString(_rLocalName.getStr(), _rLocalName.getLength(), RTL_TEXTENCODING_ASCII_US) += ::rtl::OString("\")!")); return new SvXMLImportContext( GetImport(), _nPrefix, _rLocalName ); diff --git a/xmloff/source/meta/MetaExportComponent.cxx b/xmloff/source/meta/MetaExportComponent.cxx index ce5c26b2da..d9a7d0795e 100755 --- a/xmloff/source/meta/MetaExportComponent.cxx +++ b/xmloff/source/meta/MetaExportComponent.cxx @@ -128,7 +128,7 @@ sal_uInt32 XMLMetaExportComponent::exportDoc( enum XMLTokenEnum ) } catch( com::sun::star::uno::Exception& ) { - OSL_ENSURE( sal_False, "Cannot instantiate com.sun.star.comp.Oasis2OOoTransformer!\n"); + OSL_FAIL( "Cannot instantiate com.sun.star.comp.Oasis2OOoTransformer!\n"); } } } diff --git a/xmloff/source/style/xmlexppr.cxx b/xmloff/source/style/xmlexppr.cxx index 564984549d..0cf1377524 100755 --- a/xmloff/source/style/xmlexppr.cxx +++ b/xmloff/source/style/xmlexppr.cxx @@ -702,7 +702,7 @@ vector< XMLPropertyState > SvXMLExportPropertyMapper::_Filter( } else { - OSL_ENSURE(sal_False, "here is no TypeProvider or the ImplId is wrong"); + OSL_FAIL("here is no TypeProvider or the ImplId is wrong"); bDelInfo = sal_True; } } diff --git a/xmloff/source/transform/XMLFilterRegistration.cxx b/xmloff/source/transform/XMLFilterRegistration.cxx index a1098cb9cf..c3e8ad5f62 100755 --- a/xmloff/source/transform/XMLFilterRegistration.cxx +++ b/xmloff/source/transform/XMLFilterRegistration.cxx @@ -183,7 +183,7 @@ SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory( const sal_Char * pImpl } catch( uno::Exception& ) { - OSL_ENSURE( sal_False, "xof::component_getFactory: Exception!" ); + OSL_FAIL( "xof::component_getFactory: Exception!" ); } } -- cgit v1.2.3