summaryrefslogtreecommitdiff
path: root/xmloff
diff options
context:
space:
mode:
authorThomas Arnhold <thomas@arnhold.org>2011-03-19 14:09:49 +0100
committerThomas Arnhold <thomas@arnhold.org>2011-03-19 14:09:49 +0100
commit970be45287de1a046df1c546abb06ad5f6b9c084 (patch)
tree0a88a771e96b5e9d884e5b087adad9d320bdbe7b /xmloff
parente35cffb37a792b78f8dbcd85b329fa88097b1ea5 (diff)
Move OSL_ENSURE(sal_False,...) to OSL_FAIL(...)
Diffstat (limited to 'xmloff')
-rwxr-xr-xxmloff/source/forms/attriblistmerge.cxx4
-rwxr-xr-xxmloff/source/forms/elementexport.cxx16
-rwxr-xr-xxmloff/source/forms/elementimport.cxx24
-rwxr-xr-xxmloff/source/forms/elementimport_impl.hxx4
-rwxr-xr-xxmloff/source/forms/eventimport.cxx2
-rwxr-xr-xxmloff/source/forms/formattributes.cxx12
-rwxr-xr-xxmloff/source/forms/formcellbinding.cxx10
-rwxr-xr-xxmloff/source/forms/formlayerexport.cxx2
-rwxr-xr-xxmloff/source/forms/gridcolumnproptranslator.cxx18
-rwxr-xr-xxmloff/source/forms/layerexport.cxx4
-rwxr-xr-xxmloff/source/forms/layerimport.cxx12
-rwxr-xr-xxmloff/source/forms/officeforms.cxx4
-rwxr-xr-xxmloff/source/forms/propertyexport.cxx11
-rwxr-xr-xxmloff/source/forms/propertyimport.cxx20
-rwxr-xr-xxmloff/source/meta/MetaExportComponent.cxx2
-rwxr-xr-xxmloff/source/style/xmlexppr.cxx2
-rwxr-xr-xxmloff/source/transform/XMLFilterRegistration.cxx2
17 files changed, 71 insertions, 78 deletions
diff --git a/xmloff/source/forms/attriblistmerge.cxx b/xmloff/source/forms/attriblistmerge.cxx
index 7fe1a17382a9..776e74d9aed3 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 546fa21d4c82..ca97ad0d6d47 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 cddba2e0e02e..4c433c2bae50 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 ba3ef4a9594f..1e34727903f8 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 2ecaa926c4ab..9edc1242ea0f 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 076b85433814..e65f3c0bf488 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 37bacc03999b..3e980611abcd 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 8011a5a994f3..ea5ebc93a1b6 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 9e30b76c3d9a..32dbbf01c727 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 e10920dd4187..05d0a207721a 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 d8eddeabd570..c277969c51ab 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 daa505caf37a..614ca54796bd 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 1b29f6b82802..28e53e133562 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 47d2ab6d7c01..daea3d95fcfd 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 12ba48f9982d..37af37bb498e 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 de60e89e381d..48f383a9a376 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 c6813d3283b4..4db6da9a91b5 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!" );
}
}