summaryrefslogtreecommitdiff
path: root/oox
diff options
context:
space:
mode:
authorThomas Arnhold <thomas@arnhold.org>2011-03-12 11:43:16 +0100
committerThomas Arnhold <thomas@arnhold.org>2011-03-12 14:12:37 +0100
commit7d669e4cdc6ddcb680ffb4f05b18a8925a76a6b0 (patch)
tree60c7573fef5c6868ef98cdea125d6e0ddc76dd57 /oox
parentd4ebec5c7950c2558c8efe873288e078f5d8ad31 (diff)
Move OSL_ENSURE(false,...) to OSL_FAIL(...)
Diffstat (limited to 'oox')
-rw-r--r--oox/source/core/filterbase.cxx2
-rw-r--r--oox/source/core/xmlfilterbase.cxx2
-rw-r--r--oox/source/drawingml/chart/axisconverter.cxx4
-rw-r--r--oox/source/drawingml/chart/chartconverter.cxx2
-rw-r--r--oox/source/drawingml/chart/chartdrawingfragment.cxx4
-rw-r--r--oox/source/drawingml/chart/converterbase.cxx6
-rw-r--r--oox/source/drawingml/chart/objectformatter.cxx3
-rw-r--r--oox/source/drawingml/chart/plotareaconverter.cxx4
-rw-r--r--oox/source/drawingml/chart/seriesconverter.cxx10
-rw-r--r--oox/source/drawingml/chart/typegroupconverter.cxx8
-rw-r--r--oox/source/drawingml/color.cxx6
-rw-r--r--oox/source/drawingml/lineproperties.cxx4
-rw-r--r--oox/source/export/ColorPropertySet.cxx8
-rw-r--r--oox/source/export/SchXMLSeriesHelper.cxx4
-rw-r--r--oox/source/export/chartexport.cxx6
-rw-r--r--oox/source/helper/binaryinputstream.cxx2
-rw-r--r--oox/source/helper/binaryoutputstream.cxx4
-rw-r--r--oox/source/helper/binarystreambase.cxx4
-rw-r--r--oox/source/helper/containerhelper.cxx2
-rw-r--r--oox/source/helper/graphichelper.cxx6
-rw-r--r--oox/source/helper/propertyset.cxx8
-rw-r--r--oox/source/helper/zipstorage.cxx2
-rw-r--r--oox/source/ole/axcontrol.cxx14
-rw-r--r--oox/source/ole/olehelper.cxx4
-rw-r--r--oox/source/ole/olestorage.cxx4
-rw-r--r--oox/source/ole/vbacontrol.cxx4
-rw-r--r--oox/source/ole/vbamodule.cxx6
-rw-r--r--oox/source/ppt/presentationfragmenthandler.cxx3
-rw-r--r--oox/source/ppt/slidefragmenthandler.cxx3
-rw-r--r--oox/source/ppt/slidetransition.cxx4
-rw-r--r--oox/source/vml/vmlformatting.cxx8
-rw-r--r--oox/source/xls/addressconverter.cxx2
-rw-r--r--oox/source/xls/autofiltercontext.cxx8
-rw-r--r--oox/source/xls/biffcodec.cxx4
-rw-r--r--oox/source/xls/biffdetector.cxx3
-rw-r--r--oox/source/xls/biffhelper.cxx4
-rw-r--r--oox/source/xls/condformatbuffer.cxx6
-rw-r--r--oox/source/xls/drawingfragment.cxx12
-rw-r--r--oox/source/xls/excelchartconverter.cxx2
-rw-r--r--oox/source/xls/externallinkbuffer.cxx4
-rw-r--r--oox/source/xls/externallinkfragment.cxx2
-rw-r--r--oox/source/xls/formulabase.cxx10
-rw-r--r--oox/source/xls/formulaparser.cxx10
-rw-r--r--oox/source/xls/numberformatsbuffer.cxx8
-rw-r--r--oox/source/xls/pagesettings.cxx3
-rw-r--r--oox/source/xls/pivotcachebuffer.cxx14
-rw-r--r--oox/source/xls/pivotcachefragment.cxx4
-rw-r--r--oox/source/xls/pivottablebuffer.cxx4
-rw-r--r--oox/source/xls/sheetdatacontext.cxx6
-rw-r--r--oox/source/xls/stylesbuffer.cxx8
-rw-r--r--oox/source/xls/tablebuffer.cxx2
-rw-r--r--oox/source/xls/viewsettings.cxx2
-rw-r--r--oox/source/xls/worksheetbuffer.cxx2
-rw-r--r--oox/source/xls/worksheethelper.cxx6
54 files changed, 134 insertions, 143 deletions
diff --git a/oox/source/core/filterbase.cxx b/oox/source/core/filterbase.cxx
index ce2c75c01faf..13e519c7a76a 100644
--- a/oox/source/core/filterbase.cxx
+++ b/oox/source/core/filterbase.cxx
@@ -551,7 +551,7 @@ void FilterBase::setMediaDescriptor( const Sequence< PropertyValue >& rMediaDesc
switch( mxImpl->meDirection )
{
case FILTERDIRECTION_UNKNOWN:
- OSL_ENSURE( false, "FilterBase::setMediaDescriptor - invalid filter direction" );
+ OSL_FAIL( "FilterBase::setMediaDescriptor - invalid filter direction" );
break;
case FILTERDIRECTION_IMPORT:
mxImpl->maMediaDesc.addInputStream();
diff --git a/oox/source/core/xmlfilterbase.cxx b/oox/source/core/xmlfilterbase.cxx
index aad41b0d5f47..956ac60e472b 100644
--- a/oox/source/core/xmlfilterbase.cxx
+++ b/oox/source/core/xmlfilterbase.cxx
@@ -288,7 +288,7 @@ bool XmlFilterBase::importFragment( const ::rtl::Reference< FragmentHandler >& r
}
catch( Exception& )
{
- OSL_ENSURE( false, OStringBuffer( "XmlFilterBase::importFragment - XML parser failed in fragment '" ).
+ OSL_FAIL( OStringBuffer( "XmlFilterBase::importFragment - XML parser failed in fragment '" ).
append( OUStringToOString( aFragmentPath, RTL_TEXTENCODING_ASCII_US ) ).append( '\'' ).getStr() );
}
}
diff --git a/oox/source/drawingml/chart/axisconverter.cxx b/oox/source/drawingml/chart/axisconverter.cxx
index 921111a8cd7d..5246a495e511 100644
--- a/oox/source/drawingml/chart/axisconverter.cxx
+++ b/oox/source/drawingml/chart/axisconverter.cxx
@@ -259,7 +259,7 @@ void AxisConverter::convertFromModel( const Reference< XCoordinateSystem >& rxCo
}
break;
default:
- OSL_ENSURE( false, "AxisConverter::convertFromModel - unknown axis type" );
+ OSL_FAIL( "AxisConverter::convertFromModel - unknown axis type" );
}
/* Do not set a value to the Origin member anymore (already done via
@@ -322,7 +322,7 @@ void AxisConverter::convertFromModel( const Reference< XCoordinateSystem >& rxCo
}
catch( Exception& )
{
- OSL_ENSURE( false, "AxisConverter::convertFromModel - cannot insert axis into coordinate system" );
+ OSL_FAIL( "AxisConverter::convertFromModel - cannot insert axis into coordinate system" );
}
}
diff --git a/oox/source/drawingml/chart/chartconverter.cxx b/oox/source/drawingml/chart/chartconverter.cxx
index c99ac6d82bbc..b1b73854c586 100644
--- a/oox/source/drawingml/chart/chartconverter.cxx
+++ b/oox/source/drawingml/chart/chartconverter.cxx
@@ -153,7 +153,7 @@ Reference< XDataSequence > ChartConverter::createDataSequence( const Reference<
}
catch( Exception& )
{
- OSL_ENSURE( false, "ExcelChartConverter::createDataSequence - cannot create data sequence" );
+ OSL_FAIL( "ExcelChartConverter::createDataSequence - cannot create data sequence" );
}
}
diff --git a/oox/source/drawingml/chart/chartdrawingfragment.cxx b/oox/source/drawingml/chart/chartdrawingfragment.cxx
index 14bcce4a65fe..e5f3a835be10 100644
--- a/oox/source/drawingml/chart/chartdrawingfragment.cxx
+++ b/oox/source/drawingml/chart/chartdrawingfragment.cxx
@@ -74,13 +74,13 @@ void ShapeAnchor::setPos( sal_Int32 nElement, sal_Int32 nParentContext, const OU
pAnchorPos = &maTo;
break;
default:
- OSL_ENSURE( false, "ShapeAnchor::setPos - unexpected parent element" );
+ OSL_FAIL( "ShapeAnchor::setPos - unexpected parent element" );
}
if( pAnchorPos ) switch( nElement )
{
case CDR_TOKEN( x ): pAnchorPos->mfX = rValue.toDouble(); break;
case CDR_TOKEN( y ): pAnchorPos->mfY = rValue.toDouble(); break;
- default: OSL_ENSURE( false, "ShapeAnchor::setPos - unexpected element" );
+ default: OSL_FAIL( "ShapeAnchor::setPos - unexpected element" );
}
}
diff --git a/oox/source/drawingml/chart/converterbase.cxx b/oox/source/drawingml/chart/converterbase.cxx
index 52bd978cd3b8..9377033979a6 100644
--- a/oox/source/drawingml/chart/converterbase.cxx
+++ b/oox/source/drawingml/chart/converterbase.cxx
@@ -317,11 +317,11 @@ sal_Int32 lclCalcPosition( sal_Int32 nChartSize, double fPos, sal_Int32 nPosMode
case XML_edge: // absolute start position as factor of chart size
return getLimitedValue< sal_Int32, double >( nChartSize * fPos + 0.5, 0, nChartSize );
case XML_factor: // position relative to object default position
- OSL_ENSURE( false, "lclCalcPosition - relative positioning not supported" );
+ OSL_FAIL( "lclCalcPosition - relative positioning not supported" );
return -1;
};
- OSL_ENSURE( false, "lclCalcPosition - unknown positioning mode" );
+ OSL_FAIL( "lclCalcPosition - unknown positioning mode" );
return -1;
}
@@ -337,7 +337,7 @@ sal_Int32 lclCalcSize( sal_Int32 nPos, sal_Int32 nChartSize, double fSize, sal_I
return nValue - nPos + 1;
};
- OSL_ENSURE( false, "lclCalcSize - unknown size mode" );
+ OSL_FAIL( "lclCalcSize - unknown size mode" );
return -1;
}
diff --git a/oox/source/drawingml/chart/objectformatter.cxx b/oox/source/drawingml/chart/objectformatter.cxx
index 0dc5c2b24b40..03924a0c0ee0 100644
--- a/oox/source/drawingml/chart/objectformatter.cxx
+++ b/oox/source/drawingml/chart/objectformatter.cxx
@@ -1178,8 +1178,7 @@ void ObjectFormatter::convertNumberFormat( PropertySet& rPropSet, const NumberFo
}
catch( Exception& )
{
- OSL_ENSURE( false,
- OStringBuffer( "ObjectFormatter::convertNumberFormat - cannot create number format '" ).
+ OSL_FAIL( OStringBuffer( "ObjectFormatter::convertNumberFormat - cannot create number format '" ).
append( OUStringToOString( rNumberFormat.maFormatCode, osl_getThreadTextEncoding() ) ).append( '\'' ).getStr() );
}
}
diff --git a/oox/source/drawingml/chart/plotareaconverter.cxx b/oox/source/drawingml/chart/plotareaconverter.cxx
index 2a866bb2f9fb..967b61771f13 100644
--- a/oox/source/drawingml/chart/plotareaconverter.cxx
+++ b/oox/source/drawingml/chart/plotareaconverter.cxx
@@ -303,7 +303,7 @@ void WallFloorConverter::convertFromModel( const Reference< XDiagram >& rxDiagra
{
case OBJECTTYPE_FLOOR: aPropSet.set( rxDiagram->getFloor() ); break;
case OBJECTTYPE_WALL: aPropSet.set( rxDiagram->getWall() ); break;
- default: OSL_ENSURE( false, "WallFloorConverter::convertFromModel - invalid object type" );
+ default: OSL_FAIL( "WallFloorConverter::convertFromModel - invalid object type" );
}
if( aPropSet.is() )
getFormatter().convertFrameFormatting( aPropSet, mrModel.mxShapeProp, mrModel.mxPicOptions.getOrCreate(), eObjType );
@@ -440,7 +440,7 @@ void PlotAreaConverter::convertPositionFromModel()
xPositioning->setDiagramPositionIncludingAxes( aDiagramRect );
break;
default:
- OSL_ENSURE( false, "PlotAreaConverter::convertPositionFromModel - unknown positioning target" );
+ OSL_FAIL( "PlotAreaConverter::convertPositionFromModel - unknown positioning target" );
}
}
catch( Exception& )
diff --git a/oox/source/drawingml/chart/seriesconverter.cxx b/oox/source/drawingml/chart/seriesconverter.cxx
index d717413e6976..d88ca859a134 100644
--- a/oox/source/drawingml/chart/seriesconverter.cxx
+++ b/oox/source/drawingml/chart/seriesconverter.cxx
@@ -293,7 +293,7 @@ void ErrorBarConverter::convertFromModel( const Reference< XDataSeries >& rxData
aBarProp.setProperty( PROP_ErrorBarStyle, cssc::ErrorBarStyle::STANDARD_ERROR );
break;
default:
- OSL_ENSURE( false, "ErrorBarConverter::convertFromModel - unknown error bar type" );
+ OSL_FAIL( "ErrorBarConverter::convertFromModel - unknown error bar type" );
xErrorBar.clear();
}
@@ -307,13 +307,13 @@ void ErrorBarConverter::convertFromModel( const Reference< XDataSeries >& rxData
{
case XML_x: aSeriesProp.setProperty( PROP_ErrorBarX, xErrorBar ); break;
case XML_y: aSeriesProp.setProperty( PROP_ErrorBarY, xErrorBar ); break;
- default: OSL_ENSURE( false, "ErrorBarConverter::convertFromModel - invalid error bar direction" );
+ default: OSL_FAIL( "ErrorBarConverter::convertFromModel - invalid error bar direction" );
}
}
}
catch( Exception& )
{
- OSL_ENSURE( false, "ErrorBarConverter::convertFromModel - error while creating error bars" );
+ OSL_FAIL( "ErrorBarConverter::convertFromModel - error while creating error bars" );
}
}
@@ -385,7 +385,7 @@ void TrendlineConverter::convertFromModel( const Reference< XDataSeries >& rxDat
case XML_movingAvg: /* #i66819# moving average trendlines not supported */ break;
case XML_poly: /* #i20819# polynomial trendlines not supported */ break;
case XML_power: aServiceName = CREATE_OUSTRING( "com.sun.star.chart2.PotentialRegressionCurve" ); break;
- default: OSL_ENSURE( false, "TrendlineConverter::convertFromModel - unknown trendline type" );
+ default: OSL_FAIL( "TrendlineConverter::convertFromModel - unknown trendline type" );
}
if( aServiceName.getLength() > 0 )
{
@@ -416,7 +416,7 @@ void TrendlineConverter::convertFromModel( const Reference< XDataSeries >& rxDat
}
catch( Exception& )
{
- OSL_ENSURE( false, "TrendlineConverter::convertFromModel - error while creating trendline" );
+ OSL_FAIL( "TrendlineConverter::convertFromModel - error while creating trendline" );
}
}
diff --git a/oox/source/drawingml/chart/typegroupconverter.cxx b/oox/source/drawingml/chart/typegroupconverter.cxx
index 5be7af68ba38..9b9cc0378900 100644
--- a/oox/source/drawingml/chart/typegroupconverter.cxx
+++ b/oox/source/drawingml/chart/typegroupconverter.cxx
@@ -171,7 +171,7 @@ TypeGroupConverter::TypeGroupConverter( const ConverterRoot& rParent, TypeGroupM
case C_TOKEN( stockChart ): ENSURE_AXESCOUNT( 2, 2 ); eTypeId = TYPEID_STOCK; mb3dChart = false; break;
case C_TOKEN( surface3DChart ): ENSURE_AXESCOUNT( 3, 3 ); eTypeId = TYPEID_SURFACE; mb3dChart = true; break;
case C_TOKEN( surfaceChart ): ENSURE_AXESCOUNT( 2, 3 ); eTypeId = TYPEID_SURFACE; mb3dChart = true; break; // 3D bar chart from all surface charts
- default: OSL_ENSURE( false, "TypeGroupConverter::TypeGroupConverter - unknown chart type" );
+ default: OSL_FAIL( "TypeGroupConverter::TypeGroupConverter - unknown chart type" );
#undef ENSURE_AXESCOUNT
}
@@ -444,7 +444,7 @@ void TypeGroupConverter::convertFromModel( const Reference< XDiagram >& rxDiagra
}
catch( Exception& )
{
- OSL_ENSURE( false, "TypeGroupConverter::convertFromModel - cannot add chart type" );
+ OSL_FAIL( "TypeGroupConverter::convertFromModel - cannot add chart type" );
}
}
@@ -506,7 +506,7 @@ void TypeGroupConverter::convertBarGeometry( PropertySet& rPropSet, sal_Int32 nO
case XML_cylinder: nGeom3d = cssc::DataPointGeometry3D::CYLINDER; break;
case XML_pyramid: nGeom3d = cssc::DataPointGeometry3D::PYRAMID; break;
case XML_pyramidToMax: nGeom3d = cssc::DataPointGeometry3D::PYRAMID; break;
- default: OSL_ENSURE( false, "TypeGroupConverter::convertBarGeometry - unknown 3D bar shape type" );
+ default: OSL_FAIL( "TypeGroupConverter::convertBarGeometry - unknown 3D bar shape type" );
}
rPropSet.setProperty( PROP_Geometry3D, nGeom3d );
}
@@ -561,7 +561,7 @@ void TypeGroupConverter::insertDataSeries( const Reference< XChartType >& rxChar
}
catch( Exception& )
{
- OSL_ENSURE( false, "TypeGroupConverter::insertDataSeries - cannot add data series" );
+ OSL_FAIL( "TypeGroupConverter::insertDataSeries - cannot add data series" );
}
}
}
diff --git a/oox/source/drawingml/color.cxx b/oox/source/drawingml/color.cxx
index 70f4d54e99ca..bd14ea1c118b 100644
--- a/oox/source/drawingml/color.cxx
+++ b/oox/source/drawingml/color.cxx
@@ -592,7 +592,7 @@ void Color::toRgb() const
}
break;
default:
- OSL_ENSURE( false, "Color::toRgb - unexpected color mode" );
+ OSL_FAIL( "Color::toRgb - unexpected color mode" );
}
}
@@ -613,7 +613,7 @@ void Color::toCrgb() const
// nothing to do
break;
default:
- OSL_ENSURE( false, "Color::toCrgb - unexpected color mode" );
+ OSL_FAIL( "Color::toCrgb - unexpected color mode" );
}
}
@@ -660,7 +660,7 @@ void Color::toHsl() const
// nothing to do
break;
default:
- OSL_ENSURE( false, "Color::toHsl - unexpected color mode" );
+ OSL_FAIL( "Color::toHsl - unexpected color mode" );
}
}
diff --git a/oox/source/drawingml/lineproperties.cxx b/oox/source/drawingml/lineproperties.cxx
index 7bc60f026665..332ecd773669 100644
--- a/oox/source/drawingml/lineproperties.cxx
+++ b/oox/source/drawingml/lineproperties.cxx
@@ -112,7 +112,7 @@ void lclConvertPresetDash( LineDash& orLineDash, sal_Int32 nPresetDash )
case XML_sysDashDotDot: lclSetDashData( orLineDash, 2, 1, 1, 3, 1 ); break;
default:
- OSL_ENSURE( false, "lclConvertPresetDash - unsupported preset dash" );
+ OSL_FAIL( "lclConvertPresetDash - unsupported preset dash" );
lclSetDashData( orLineDash, 0, 0, 1, 4, 3 );
}
}
@@ -126,7 +126,7 @@ void lclConvertCustomDash( LineDash& orLineDash, const LineProperties::DashStopV
{
if( rCustomDash.empty() )
{
- OSL_ENSURE( false, "lclConvertCustomDash - unexpected empty custom dash" );
+ OSL_FAIL( "lclConvertCustomDash - unexpected empty custom dash" );
lclSetDashData( orLineDash, 0, 0, 1, 4, 3 );
return;
}
diff --git a/oox/source/export/ColorPropertySet.cxx b/oox/source/export/ColorPropertySet.cxx
index c4212492ed29..cd00e5670f53 100644
--- a/oox/source/export/ColorPropertySet.cxx
+++ b/oox/source/export/ColorPropertySet.cxx
@@ -161,7 +161,7 @@ void SAL_CALL ColorPropertySet::addPropertyChangeListener( const OUString& /* aP
lang::WrappedTargetException,
uno::RuntimeException)
{
- OSL_ENSURE( false, "Not Implemented" );
+ OSL_FAIL( "Not Implemented" );
return;
}
@@ -170,7 +170,7 @@ void SAL_CALL ColorPropertySet::removePropertyChangeListener( const OUString& /*
lang::WrappedTargetException,
uno::RuntimeException)
{
- OSL_ENSURE( false, "Not Implemented" );
+ OSL_FAIL( "Not Implemented" );
return;
}
@@ -179,7 +179,7 @@ void SAL_CALL ColorPropertySet::addVetoableChangeListener( const OUString& /* Pr
lang::WrappedTargetException,
uno::RuntimeException)
{
- OSL_ENSURE( false, "Not Implemented" );
+ OSL_FAIL( "Not Implemented" );
return;
}
@@ -188,7 +188,7 @@ void SAL_CALL ColorPropertySet::removeVetoableChangeListener( const OUString& /*
lang::WrappedTargetException,
uno::RuntimeException)
{
- OSL_ENSURE( false, "Not Implemented" );
+ OSL_FAIL( "Not Implemented" );
return;
}
diff --git a/oox/source/export/SchXMLSeriesHelper.cxx b/oox/source/export/SchXMLSeriesHelper.cxx
index f780af38996f..d9a92644dbdb 100644
--- a/oox/source/export/SchXMLSeriesHelper.cxx
+++ b/oox/source/export/SchXMLSeriesHelper.cxx
@@ -81,7 +81,7 @@ using ::rtl::OUString;
{
(void)ex; // avoid warning for pro build
- OSL_ENSURE( false, OUStringToOString( OUString(
+ OSL_FAIL( OUStringToOString( OUString(
OUString( RTL_CONSTASCII_USTRINGPARAM( "Exception caught. Type: " )) +
OUString::createFromAscii( typeid( ex ).name()) +
OUString( RTL_CONSTASCII_USTRINGPARAM( ", Message: " )) +
@@ -218,7 +218,7 @@ Reference< chart2::XDataSeries > SchXMLSeriesHelper::getFirstCandleStickSeries(
}
catch( const uno::Exception & )
{
- OSL_ENSURE( false, "Exception caught" );
+ OSL_FAIL( "Exception caught" );
}
return xResult;
}
diff --git a/oox/source/export/chartexport.cxx b/oox/source/export/chartexport.cxx
index 213fa45116f6..a5ed5a7d625f 100644
--- a/oox/source/export/chartexport.cxx
+++ b/oox/source/export/chartexport.cxx
@@ -219,7 +219,7 @@ Reference< chart2::data::XLabeledDataSequence > lcl_getCategories( const Referen
catch( uno::Exception & ex )
{
(void)ex; // avoid warning for pro build
- OSL_ENSURE( false, rtl::OUStringToOString(
+ OSL_FAIL( rtl::OUStringToOString(
OUString( RTL_CONSTASCII_USTRINGPARAM( "Exception caught. Type: " )) +
OUString::createFromAscii( typeid( ex ).name()) +
OUString( RTL_CONSTASCII_USTRINGPARAM( ", Message: " )) +
@@ -337,7 +337,7 @@ bool lcl_isSeriesAttachedToFirstAxis(
catch( uno::Exception & ex )
{
(void)ex; // avoid warning for pro build
- OSL_ENSURE( false, rtl::OUStringToOString(
+ OSL_FAIL( rtl::OUStringToOString(
OUString( RTL_CONSTASCII_USTRINGPARAM( "Exception caught. Type: " )) +
OUString::createFromAscii( typeid( ex ).name()) +
OUString( RTL_CONSTASCII_USTRINGPARAM( ", Message: " )) +
@@ -814,7 +814,7 @@ void ChartExport::InitRangeSegmentationProperties( const Reference< chart2::XCha
catch( uno::Exception & ex )
{
(void)ex; // avoid warning for pro build
- OSL_ENSURE( false, rtl::OUStringToOString(
+ OSL_FAIL( rtl::OUStringToOString(
OUString( RTL_CONSTASCII_USTRINGPARAM( "Exception caught. Type: " )) +
OUString::createFromAscii( typeid( ex ).name()) +
OUString( RTL_CONSTASCII_USTRINGPARAM( ", Message: " )) +
diff --git a/oox/source/helper/binaryinputstream.cxx b/oox/source/helper/binaryinputstream.cxx
index 80f50d5521e7..7696947561de 100644
--- a/oox/source/helper/binaryinputstream.cxx
+++ b/oox/source/helper/binaryinputstream.cxx
@@ -204,7 +204,7 @@ void BinaryXInputStream::close()
}
catch( Exception& )
{
- OSL_ENSURE( false, "BinaryXInputStream::close - closing input stream failed" );
+ OSL_FAIL( "BinaryXInputStream::close - closing input stream failed" );
}
}
diff --git a/oox/source/helper/binaryoutputstream.cxx b/oox/source/helper/binaryoutputstream.cxx
index c9bf31879907..c788b409ab5e 100644
--- a/oox/source/helper/binaryoutputstream.cxx
+++ b/oox/source/helper/binaryoutputstream.cxx
@@ -73,7 +73,7 @@ void BinaryXOutputStream::writeData( const StreamDataSequence& rData )
}
catch( Exception& )
{
- OSL_ENSURE( false, "BinaryXOutputStream::writeData - stream read error" );
+ OSL_FAIL( "BinaryXOutputStream::writeData - stream read error" );
}
}
@@ -104,7 +104,7 @@ void BinaryXOutputStream::close()
}
catch( Exception& )
{
- OSL_ENSURE( false, "BinaryXOutputStream::close - closing output stream failed" );
+ OSL_FAIL( "BinaryXOutputStream::close - closing output stream failed" );
}
}
diff --git a/oox/source/helper/binarystreambase.cxx b/oox/source/helper/binarystreambase.cxx
index 6f7c77d9de20..1d93b5086467 100644
--- a/oox/source/helper/binarystreambase.cxx
+++ b/oox/source/helper/binarystreambase.cxx
@@ -102,7 +102,7 @@ sal_Int64 BinaryXSeekableStream::getLength() const
}
catch( Exception& )
{
- OSL_ENSURE( false, "BinaryXSeekableStream::getLength - exception caught" );
+ OSL_FAIL( "BinaryXSeekableStream::getLength - exception caught" );
}
return -1;
}
@@ -115,7 +115,7 @@ sal_Int64 BinaryXSeekableStream::tell() const
}
catch( Exception& )
{
- OSL_ENSURE( false, "BinaryXSeekableStream::tell - exception caught" );
+ OSL_FAIL( "BinaryXSeekableStream::tell - exception caught" );
}
return -1;
}
diff --git a/oox/source/helper/containerhelper.cxx b/oox/source/helper/containerhelper.cxx
index efc39f5e9be6..44d4c75cecbe 100644
--- a/oox/source/helper/containerhelper.cxx
+++ b/oox/source/helper/containerhelper.cxx
@@ -152,7 +152,7 @@ OUString ContainerHelper::insertByUnusedName(
}
catch( Exception& )
{
- OSL_ENSURE( false, "ContainerHelper::insertByUnusedName - cannot rename old object" );
+ OSL_FAIL( "ContainerHelper::insertByUnusedName - cannot rename old object" );
}
}
diff --git a/oox/source/helper/graphichelper.cxx b/oox/source/helper/graphichelper.cxx
index 17cee4eabf32..94c217e943fe 100644
--- a/oox/source/helper/graphichelper.cxx
+++ b/oox/source/helper/graphichelper.cxx
@@ -141,7 +141,7 @@ GraphicHelper::GraphicHelper( const Reference< XMultiServiceFactory >& rxGlobalF
}
catch( Exception& )
{
- OSL_ENSURE( false, "GraphicHelper::GraphicHelper - cannot get output device info" );
+ OSL_FAIL( "GraphicHelper::GraphicHelper - cannot get output device info" );
}
mfPixelPerHmmX = maDeviceInfo.PixelPerMeterX / 100000.0;
mfPixelPerHmmY = maDeviceInfo.PixelPerMeterY / 100000.0;
@@ -160,13 +160,13 @@ sal_Int32 GraphicHelper::getSystemColor( sal_Int32 nToken, sal_Int32 nDefaultRgb
sal_Int32 GraphicHelper::getSchemeColor( sal_Int32 /*nToken*/ ) const
{
- OSL_ENSURE( false, "GraphicHelper::getSchemeColor - scheme colors not implemented" );
+ OSL_FAIL( "GraphicHelper::getSchemeColor - scheme colors not implemented" );
return API_RGB_TRANSPARENT;
}
sal_Int32 GraphicHelper::getPaletteColor( sal_Int32 /*nPaletteIdx*/ ) const
{
- OSL_ENSURE( false, "GraphicHelper::getPaletteColor - palette colors not implemented" );
+ OSL_FAIL( "GraphicHelper::getPaletteColor - palette colors not implemented" );
return API_RGB_TRANSPARENT;
}
diff --git a/oox/source/helper/propertyset.cxx b/oox/source/helper/propertyset.cxx
index 25249ffc44ad..2358a20a1f67 100644
--- a/oox/source/helper/propertyset.cxx
+++ b/oox/source/helper/propertyset.cxx
@@ -80,7 +80,7 @@ void PropertySet::getProperties( Sequence< Any >& orValues, const Sequence< OUSt
}
catch( Exception& )
{
- OSL_ENSURE( false, "PropertySet::getProperties - cannot get all property values - fallback to single mode" );
+ OSL_FAIL( "PropertySet::getProperties - cannot get all property values - fallback to single mode" );
}
if( mxPropSet.is() )
@@ -114,7 +114,7 @@ void PropertySet::setProperties( const Sequence< OUString >& rPropNames, const S
}
catch( Exception& )
{
- OSL_ENSURE( false, "PropertySet::setProperties - cannot set all property values, fallback to single mode" );
+ OSL_FAIL( "PropertySet::setProperties - cannot set all property values, fallback to single mode" );
}
if( mxPropSet.is() )
@@ -153,7 +153,7 @@ bool PropertySet::getAnyProperty( Any& orValue, const OUString& rPropName ) cons
}
catch( Exception& )
{
- OSL_ENSURE( false, OStringBuffer( "PropertySet::getAnyProperty - cannot get property \"" ).
+ OSL_FAIL( OStringBuffer( "PropertySet::getAnyProperty - cannot get property \"" ).
append( OUStringToOString( rPropName, RTL_TEXTENCODING_ASCII_US ) ).append( '"' ).getStr() );
}
return bHasValue;
@@ -168,7 +168,7 @@ void PropertySet::setAnyProperty( const OUString& rPropName, const Any& rValue )
}
catch( Exception& )
{
- OSL_ENSURE( false, OStringBuffer( "PropertySet::setAnyProperty - cannot set property \"" ).
+ OSL_FAIL( OStringBuffer( "PropertySet::setAnyProperty - cannot set property \"" ).
append( OUStringToOString( rPropName, RTL_TEXTENCODING_ASCII_US ) ).append( '"' ).getStr() );
}
}
diff --git a/oox/source/helper/zipstorage.cxx b/oox/source/helper/zipstorage.cxx
index 333c3f21c4da..33e57b719c65 100644
--- a/oox/source/helper/zipstorage.cxx
+++ b/oox/source/helper/zipstorage.cxx
@@ -97,7 +97,7 @@ ZipStorage::ZipStorage(
}
catch( Exception& )
{
- OSL_ENSURE( false, "ZipStorage::ZipStorage - cannot open output storage" );
+ OSL_FAIL( "ZipStorage::ZipStorage - cannot open output storage" );
}
}
diff --git a/oox/source/ole/axcontrol.cxx b/oox/source/ole/axcontrol.cxx
index 39bc7272210a..4ba9b1c8c974 100644
--- a/oox/source/ole/axcontrol.cxx
+++ b/oox/source/ole/axcontrol.cxx
@@ -480,7 +480,7 @@ void ControlConverter::convertAxPicture( PropertyMap& rPropMap, const StreamData
case AX_PICPOS_BELOWCENTER: nImagePos = AwtImagePos::BelowCenter; break;
case AX_PICPOS_BELOWRIGHT: nImagePos = AwtImagePos::BelowRight; break;
case AX_PICPOS_CENTER: nImagePos = AwtImagePos::Centered; break;
- default: OSL_ENSURE( false, "ControlConverter::convertAxPicture - unknown picture position" );
+ default: OSL_FAIL( "ControlConverter::convertAxPicture - unknown picture position" );
}
rPropMap.setProperty( PROP_ImagePosition, nImagePos );
}
@@ -499,7 +499,7 @@ void ControlConverter::convertAxPicture( PropertyMap& rPropMap, const StreamData
case AX_PICSIZE_CLIP: nScaleMode = AwtScaleMode::None; break;
case AX_PICSIZE_STRETCH: nScaleMode = AwtScaleMode::Anisotropic; break;
case AX_PICSIZE_ZOOM: nScaleMode = AwtScaleMode::Isotropic; break;
- default: OSL_ENSURE( false, "ControlConverter::convertAxPicture - unknown picture size mode" );
+ default: OSL_FAIL( "ControlConverter::convertAxPicture - unknown picture size mode" );
}
rPropMap.setProperty( PROP_ScaleMode, nScaleMode );
}
@@ -538,7 +538,7 @@ void ControlConverter::convertAxOrientation( PropertyMap& rPropMap,
case AX_ORIENTATION_AUTO: bHorizontal = rSize.first > rSize.second; break;
case AX_ORIENTATION_VERTICAL: bHorizontal = false; break;
case AX_ORIENTATION_HORIZONTAL: bHorizontal = true; break;
- default: OSL_ENSURE( false, "ControlConverter::convertAxOrientation - unknown orientation" );
+ default: OSL_FAIL( "ControlConverter::convertAxOrientation - unknown orientation" );
}
convertOrientation( rPropMap, bHorizontal );
}
@@ -575,7 +575,7 @@ OUString ControlModelBase::getServiceName() const
case API_CONTROL_PAGE: return CREATE_OUSTRING( "com.sun.star.awt.UnoPageModel" );
case API_CONTROL_MULTIPAGE: return CREATE_OUSTRING( "com.sun.star.awt.UnoMultiPageModel" );
case API_CONTROL_DIALOG: return CREATE_OUSTRING( "com.sun.star.awt.UnoControlDialogModel" );
- default: OSL_ENSURE( false, "ControlModelBase::getServiceName - no AWT model service supported" );
+ default: OSL_FAIL( "ControlModelBase::getServiceName - no AWT model service supported" );
}
else switch( eCtrlType )
{
@@ -590,7 +590,7 @@ OUString ControlModelBase::getServiceName() const
case API_CONTROL_SPINBUTTON: return CREATE_OUSTRING( "com.sun.star.form.component.SpinButton" );
case API_CONTROL_SCROLLBAR: return CREATE_OUSTRING( "com.sun.star.form.component.ScrollBar" );
case API_CONTROL_GROUPBOX: return CREATE_OUSTRING( "com.sun.star.form.component.GroupBox" );
- default: OSL_ENSURE( false, "ControlModelBase::getServiceName - no form component service supported" );
+ default: OSL_FAIL( "ControlModelBase::getServiceName - no form component service supported" );
}
return OUString();
}
@@ -668,7 +668,7 @@ sal_uInt32 ComCtlModelBase::getDataPartId() const
case 5: return mnDataPartId5;
case 6: return mnDataPartId6;
}
- OSL_ENSURE( false, "ComCtlObjectBase::getDataPartId - unxpected version" );
+ OSL_FAIL( "ComCtlObjectBase::getDataPartId - unxpected version" );
return SAL_MAX_UINT32;
}
@@ -872,7 +872,7 @@ void AxFontDataModel::convertProperties( PropertyMap& rPropMap, const ControlCon
case AX_FONTDATA_LEFT: nAlign = cssa::TextAlign::LEFT; break;
case AX_FONTDATA_RIGHT: nAlign = cssa::TextAlign::RIGHT; break;
case AX_FONTDATA_CENTER: nAlign = cssa::TextAlign::CENTER; break;
- default: OSL_ENSURE( false, "AxFontDataModel::convertProperties - unknown text alignment" );
+ default: OSL_FAIL( "AxFontDataModel::convertProperties - unknown text alignment" );
}
// form controls expect short value
rPropMap.setProperty( PROP_Align, static_cast< sal_Int16 >( nAlign ) );
diff --git a/oox/source/ole/olehelper.cxx b/oox/source/ole/olehelper.cxx
index 37948dad0f0a..623d383220cd 100644
--- a/oox/source/ole/olehelper.cxx
+++ b/oox/source/ole/olehelper.cxx
@@ -158,7 +158,7 @@ StdFontInfo::StdFontInfo( const ::rtl::OUString& rName, sal_uInt32 nHeight,
case OLE_COLORTYPE_SYSCOLOR:
return rGraphicHelper.getSystemColor( STATIC_ARRAY_SELECT( spnSystemColors, nOleColor & OLE_SYSTEMCOLOR_MASK, XML_TOKEN_INVALID ), API_RGB_WHITE );
}
- OSL_ENSURE( false, "OleHelper::decodeOleColor - unknown color type" );
+ OSL_FAIL( "OleHelper::decodeOleColor - unknown color type" );
return API_RGB_BLACK;
}
@@ -281,7 +281,7 @@ StdFontInfo::StdFontInfo( const ::rtl::OUString& rName, sal_uInt32 nHeight,
}
else
{
- OSL_ENSURE( false, "OleHelper::importStdHlink - unsupported hyperlink moniker" );
+ OSL_FAIL( "OleHelper::importStdHlink - unsupported hyperlink moniker" );
return false;
}
}
diff --git a/oox/source/ole/olestorage.cxx b/oox/source/ole/olestorage.cxx
index ca028f6ab3ba..cff723194908 100644
--- a/oox/source/ole/olestorage.cxx
+++ b/oox/source/ole/olestorage.cxx
@@ -264,7 +264,7 @@ void OleStorage::initStorage( const Reference< XInputStream >& rxInStream )
}
catch( Exception& )
{
- OSL_ENSURE( false, "OleStorage::initStorage - cannot create temporary copy of input stream" );
+ OSL_FAIL( "OleStorage::initStorage - cannot create temporary copy of input stream" );
}
// create base storage object
@@ -317,7 +317,7 @@ bool OleStorage::implIsStorage() const
Reference< XStorage > OleStorage::implGetXStorage() const
{
- OSL_ENSURE( false, "OleStorage::getXStorage - not implemented" );
+ OSL_FAIL( "OleStorage::getXStorage - not implemented" );
return Reference< XStorage >();
}
diff --git a/oox/source/ole/vbacontrol.cxx b/oox/source/ole/vbacontrol.cxx
index 1630b787f3f1..da1ee608a471 100644
--- a/oox/source/ole/vbacontrol.cxx
+++ b/oox/source/ole/vbacontrol.cxx
@@ -279,7 +279,7 @@ ControlModelRef VbaSiteModel::createControlModel( const AxClassTable& rClassTabl
case VBA_SITE_FRAME: xCtrlModel.reset( new AxFrameModel ); break;
case VBA_SITE_MULTIPAGE: xCtrlModel.reset( new AxMultiPageModel ); break;
case VBA_SITE_FORM: xCtrlModel.reset( new AxFormPageModel ); break;
- default: OSL_ENSURE( false, "VbaSiteModel::createControlModel - unknown type index" );
+ default: OSL_FAIL( "VbaSiteModel::createControlModel - unknown type index" );
}
}
else
@@ -481,7 +481,7 @@ bool VbaFormControl::convertProperties( const Reference< XControlModel >& rxCtrl
}
catch( Exception& )
{
- OSL_ENSURE( false, "VbaFormControl::convertProperties - cannot get control container interface" );
+ OSL_FAIL( "VbaFormControl::convertProperties - cannot get control container interface" );
}
return true;
diff --git a/oox/source/ole/vbamodule.cxx b/oox/source/ole/vbamodule.cxx
index 1043b59b65f4..c95ffaef7c9f 100644
--- a/oox/source/ole/vbamodule.cxx
+++ b/oox/source/ole/vbamodule.cxx
@@ -147,7 +147,7 @@ void VbaModule::importDirRecords( BinaryInputStream& rDirStrm )
{
#define OOX_ENSURE_RECORDSIZE( cond ) OSL_ENSURE( cond, "VbaModule::importDirRecords - invalid record size" )
case VBA_ID_MODULENAME:
- OSL_ENSURE( false, "VbaModule::importDirRecords - unexpected MODULENAME record" );
+ OSL_FAIL( "VbaModule::importDirRecords - unexpected MODULENAME record" );
maName = aRecStrm.readCharArrayUC( nRecSize, meTextEnc );
break;
case VBA_ID_MODULENAMEUNICODE:
@@ -191,7 +191,7 @@ void VbaModule::importDirRecords( BinaryInputStream& rDirStrm )
mbPrivate = true;
break;
default:
- OSL_ENSURE( false, "VbaModule::importDirRecords - unknown module record" );
+ OSL_FAIL( "VbaModule::importDirRecords - unknown module record" );
#undef OOX_ENSURE_RECORDSIZE
}
}
@@ -353,7 +353,7 @@ void VbaModule::createModule( const OUString& rVBASourceCode,
}
catch( Exception& )
{
- OSL_ENSURE( false, "VbaModule::createModule - cannot insert module into library" );
+ OSL_FAIL( "VbaModule::createModule - cannot insert module into library" );
}
}
diff --git a/oox/source/ppt/presentationfragmenthandler.cxx b/oox/source/ppt/presentationfragmenthandler.cxx
index 88a004038bfc..a917a1fafdff 100644
--- a/oox/source/ppt/presentationfragmenthandler.cxx
+++ b/oox/source/ppt/presentationfragmenthandler.cxx
@@ -286,8 +286,7 @@ void PresentationFragmentHandler::endDocument() throw (SAXException, RuntimeExce
}
catch( uno::Exception& )
{
- OSL_ENSURE( false,
- (rtl::OString("oox::ppt::PresentationFragmentHandler::EndDocument(), "
+ OSL_FAIL( (rtl::OString("oox::ppt::PresentationFragmentHandler::EndDocument(), "
"exception caught: ") +
rtl::OUStringToOString(
comphelper::anyToString( cppu::getCaughtException() ),
diff --git a/oox/source/ppt/slidefragmenthandler.cxx b/oox/source/ppt/slidefragmenthandler.cxx
index 411be7b28690..033b93d7375a 100644
--- a/oox/source/ppt/slidefragmenthandler.cxx
+++ b/oox/source/ppt/slidefragmenthandler.cxx
@@ -189,8 +189,7 @@ void SAL_CALL SlideFragmentHandler::endDocument( ) throw (::com::sun::star::xml
}
catch( uno::Exception& )
{
- OSL_ENSURE( false,
- (rtl::OString("oox::ppt::SlideFragmentHandler::EndElement(), "
+ OSL_FAIL( (rtl::OString("oox::ppt::SlideFragmentHandler::EndElement(), "
"exception caught: ") +
rtl::OUStringToOString(
comphelper::anyToString( cppu::getCaughtException() ),
diff --git a/oox/source/ppt/slidetransition.cxx b/oox/source/ppt/slidetransition.cxx
index 29f009e6277e..3c63965b54f7 100644
--- a/oox/source/ppt/slidetransition.cxx
+++ b/oox/source/ppt/slidetransition.cxx
@@ -99,7 +99,7 @@ namespace oox { namespace ppt {
catch( Exception& )
{
// should not happen
- OSL_ENSURE( false, "exception raised" );
+ OSL_FAIL( "exception raised" );
}
}
@@ -116,7 +116,7 @@ namespace oox { namespace ppt {
catch( Exception& )
{
// should not happen
- OSL_ENSURE( false, "exception raised" );
+ OSL_FAIL( "exception raised" );
}
}
diff --git a/oox/source/vml/vmlformatting.cxx b/oox/source/vml/vmlformatting.cxx
index 7d57939ff2db..42c395089017 100644
--- a/oox/source/vml/vmlformatting.cxx
+++ b/oox/source/vml/vmlformatting.cxx
@@ -102,7 +102,7 @@ bool lclExtractDouble( double& orfValue, sal_Int32& ornEndPos, const OUString& r
if( (nEndPos + 1 == rValue.getLength()) && (rValue[ nEndPos ] == '%') )
return fValue / 100.0;
- OSL_ENSURE( false, "ConversionHelper::decodePercent - unknown measure unit" );
+ OSL_FAIL( "ConversionHelper::decodePercent - unknown measure unit" );
return fDefValue;
}
@@ -116,7 +116,7 @@ bool lclExtractDouble( double& orfValue, sal_Int32& ornEndPos, const OUString& r
// TODO: according to spec, value may contain "auto"
if( rValue.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "auto" ) ) )
{
- OSL_ENSURE( false, "ConversionHelper::decodeMeasureToEmu - special value 'auto' must be handled by caller" );
+ OSL_FAIL( "ConversionHelper::decodeMeasureToEmu - special value 'auto' must be handled by caller" );
return nRefValue;
}
@@ -160,7 +160,7 @@ bool lclExtractDouble( double& orfValue, sal_Int32& ornEndPos, const OUString& r
}
else if( bDefaultAsPixel || (aUnit.getLength() > 0) ) // default as EMU and no unit -> do nothing
{
- OSL_ENSURE( false, "ConversionHelper::decodeMeasureToEmu - unknown measure unit" );
+ OSL_FAIL( "ConversionHelper::decodeMeasureToEmu - unknown measure unit" );
fValue = nRefValue;
}
return static_cast< sal_Int32 >( fValue + 0.5 );
@@ -281,7 +281,7 @@ void lclGetColor( Color& orDmlColor, const GraphicHelper& rGraphicHelper,
}
}
- OSL_ENSURE( false, OStringBuffer( "lclGetColor - invalid VML color name '" ).
+ OSL_FAIL( OStringBuffer( "lclGetColor - invalid VML color name '" ).
append( OUStringToOString( roVmlColor.get(), RTL_TEXTENCODING_ASCII_US ) ).append( '\'' ).getStr() );
orDmlColor.setSrgbClr( nDefaultRgb );
}
diff --git a/oox/source/xls/addressconverter.cxx b/oox/source/xls/addressconverter.cxx
index 5dd8f99991e9..64cc185a8b31 100644
--- a/oox/source/xls/addressconverter.cxx
+++ b/oox/source/xls/addressconverter.cxx
@@ -774,7 +774,7 @@ void AddressConverter::initializeMaxPos(
}
catch( Exception& )
{
- OSL_ENSURE( false, "AddressConverter::AddressConverter - cannot get sheet limits" );
+ OSL_FAIL( "AddressConverter::AddressConverter - cannot get sheet limits" );
}
}
diff --git a/oox/source/xls/autofiltercontext.cxx b/oox/source/xls/autofiltercontext.cxx
index ccf3f880c7f9..5d93a840dee5 100644
--- a/oox/source/xls/autofiltercontext.cxx
+++ b/oox/source/xls/autofiltercontext.cxx
@@ -377,7 +377,7 @@ void OoxAutoFilterContext::setAutoFilter()
Reference< XDatabaseRanges > xDBRanges = getDatabaseRanges();
if ( !xDBRanges.is() )
{
- OSL_ENSURE( false, "OoxAutoFilterContext::setAutoFilter: DBRange empty" );
+ OSL_FAIL( "OoxAutoFilterContext::setAutoFilter: DBRange empty" );
return;
}
@@ -404,7 +404,7 @@ void OoxAutoFilterContext::setAutoFilter()
}
else
{
- OSL_ENSURE(false, "OoxAutoFilterContext::setAutoFilter: descriptor is empty");
+ OSL_FAIL("OoxAutoFilterContext::setAutoFilter: descriptor is empty");
return;
}
@@ -413,7 +413,7 @@ void OoxAutoFilterContext::setAutoFilter()
Reference< XExtendedSheetFilterDescriptor > xExtDescriptor( xDescriptor, UNO_QUERY );
if ( !xExtDescriptor.is() )
{
- OSL_ENSURE(false, "OoxAutoFilterContext::setAutoFilter: extended descriptor is empty");
+ OSL_FAIL("OoxAutoFilterContext::setAutoFilter: extended descriptor is empty");
return;
}
@@ -742,7 +742,7 @@ void OoxAutoFilterContext::importCustomFilter( const AttributeList& rAttribs )
}
break;
default:
- OSL_ENSURE( false, "OoxAutoFilterContext::importCustomFilter: unhandled case" );
+ OSL_FAIL( "OoxAutoFilterContext::importCustomFilter: unhandled case" );
}
}
diff --git a/oox/source/xls/biffcodec.cxx b/oox/source/xls/biffcodec.cxx
index a5ba02204d2e..a0481b6e0416 100644
--- a/oox/source/xls/biffcodec.cxx
+++ b/oox/source/xls/biffcodec.cxx
@@ -283,13 +283,13 @@ BiffDecoderRef lclReadFilePassBiff8( BiffInputStream& rStrm )
xDecoder = lclReadFilePass_CryptoApi( rStrm );
break;
default:
- OSL_ENSURE( false, "lclReadFilePassBiff8 - unknown BIFF8 encryption sub mode" );
+ OSL_FAIL( "lclReadFilePassBiff8 - unknown BIFF8 encryption sub mode" );
}
}
break;
default:
- OSL_ENSURE( false, "lclReadFilePassBiff8 - unknown encryption mode" );
+ OSL_FAIL( "lclReadFilePassBiff8 - unknown encryption mode" );
}
return xDecoder;
}
diff --git a/oox/source/xls/biffdetector.cxx b/oox/source/xls/biffdetector.cxx
index 8bb708d3b415..9a311026a4d6 100644
--- a/oox/source/xls/biffdetector.cxx
+++ b/oox/source/xls/biffdetector.cxx
@@ -118,8 +118,7 @@ BiffType BiffDetector::detectStreamBiffVersion( BinaryInputStream& rInStream )
case BIFF_BOF_BIFF4: eBiff = BIFF4; break;
case BIFF_BOF_BIFF5: eBiff = BIFF5; break;
case BIFF_BOF_BIFF8: eBiff = BIFF8; break;
- default: OSL_ENSURE( false,
- OStringBuffer( "lclDetectStreamBiffVersion - unknown BIFF version: 0x" ).
+ default: OSL_FAIL( OStringBuffer( "lclDetectStreamBiffVersion - unknown BIFF version: 0x" ).
append( static_cast< sal_Int32 >( nVersion ), 16 ).getStr() );
}
}
diff --git a/oox/source/xls/biffhelper.cxx b/oox/source/xls/biffhelper.cxx
index ad790fc9f2e9..c41e00b2c251 100644
--- a/oox/source/xls/biffhelper.cxx
+++ b/oox/source/xls/biffhelper.cxx
@@ -233,7 +233,7 @@ void lclImportImgDataDib( StreamDataSequence& orDataSeq, BiffInputStream& rStrm,
case BIFF_ERR_NAME: nApiError = 525; break;
case BIFF_ERR_NUM: nApiError = 503; break;
case BIFF_ERR_NA: nApiError = 0x7FFF; break;
- default: OSL_ENSURE( false, "BiffHelper::calcDoubleFromError - unknown error code" );
+ default: OSL_FAIL( "BiffHelper::calcDoubleFromError - unknown error code" );
}
DecodedDouble aDecDbl;
::rtl::math::setNan( &aDecDbl.mfValue );
@@ -276,7 +276,7 @@ void lclImportImgDataDib( StreamDataSequence& orDataSeq, BiffInputStream& rStrm,
// case BIFF_IMGDATA_WMF: /* TODO */ break;
case BIFF_IMGDATA_DIB: lclImportImgDataDib( orDataSeq, rStrm, nBytes, eBiff ); break;
// case BIFF_IMGDATA_NATIVE: /* TODO */ break;
- default: OSL_ENSURE( false, "BiffHelper::importImgData - unknown image format" );
+ default: OSL_FAIL( "BiffHelper::importImgData - unknown image format" );
}
}
}
diff --git a/oox/source/xls/condformatbuffer.cxx b/oox/source/xls/condformatbuffer.cxx
index c7ba215e2e67..dc5478c9b798 100644
--- a/oox/source/xls/condformatbuffer.cxx
+++ b/oox/source/xls/condformatbuffer.cxx
@@ -403,7 +403,7 @@ void CondFormatRule::importCfRule( RecordInputStream& rStrm )
maModel.mnType = XML_iconSet;
break;
default:
- OSL_ENSURE( false, "CondFormatRule::importCfRule - unknown rule type" );
+ OSL_FAIL( "CondFormatRule::importCfRule - unknown rule type" );
}
}
@@ -528,7 +528,7 @@ void CondFormatRule::finalizeImport( const Reference< XSheetConditionalEntries >
aReplaceFormula = CREATE_OUSTRING( "OR(AND(MONTH(#B)=MONTH(TODAY())+1,YEAR(#B)=YEAR(TODAY())),AND(MONTH(#B)=1,MONTH(TODAY())=12,YEAR(#B)=YEAR(TODAY())+1))" );
break;
default:
- OSL_ENSURE( false, "CondFormatRule::finalizeImport - unknown time period type" );
+ OSL_FAIL( "CondFormatRule::finalizeImport - unknown time period type" );
}
break;
case XML_containsBlanks:
@@ -599,7 +599,7 @@ void CondFormatRule::finalizeImport( const Reference< XSheetConditionalEntries >
aReplaceFormula = aReplaceFormula.replaceAt( nStrPos, 2, aComp );
break;
default:
- OSL_ENSURE( false, "CondFormatRule::finalizeImport - unknown placeholder" );
+ OSL_FAIL( "CondFormatRule::finalizeImport - unknown placeholder" );
}
}
diff --git a/oox/source/xls/drawingfragment.cxx b/oox/source/xls/drawingfragment.cxx
index 4a32fe5d42e1..35dbfbe3bb7f 100644
--- a/oox/source/xls/drawingfragment.cxx
+++ b/oox/source/xls/drawingfragment.cxx
@@ -120,7 +120,7 @@ void ShapeAnchor::importAnchor( sal_Int32 nElement, const AttributeList& rAttrib
mnEditAs = rAttribs.getToken( XML_editAs, XML_twoCell );
break;
default:
- OSL_ENSURE( false, "ShapeAnchor::importAnchor - unexpected element" );
+ OSL_FAIL( "ShapeAnchor::importAnchor - unexpected element" );
}
}
@@ -158,7 +158,7 @@ void ShapeAnchor::setCellPos( sal_Int32 nElement, sal_Int32 nParentContext, cons
pAnchorCell = &maTo;
break;
default:
- OSL_ENSURE( false, "ShapeAnchor::setCellPos - unexpected parent element" );
+ OSL_FAIL( "ShapeAnchor::setCellPos - unexpected parent element" );
}
if( pAnchorCell ) switch( nElement )
{
@@ -166,7 +166,7 @@ void ShapeAnchor::setCellPos( sal_Int32 nElement, sal_Int32 nParentContext, cons
case XDR_TOKEN( row ): pAnchorCell->mnRow = rValue.toInt32(); break;
case XDR_TOKEN( colOff ): pAnchorCell->mnColOffset = rValue.toInt64(); break;
case XDR_TOKEN( rowOff ): pAnchorCell->mnRowOffset = rValue.toInt64(); break;
- default: OSL_ENSURE( false, "ShapeAnchor::setCellPos - unexpected element" );
+ default: OSL_FAIL( "ShapeAnchor::setCellPos - unexpected element" );
}
}
@@ -217,7 +217,7 @@ bool ShapeAnchor::isValidAnchor() const
((maFrom.mnRow < maTo.mnRow) || ((maFrom.mnRow == maTo.mnRow) && (maFrom.mnRowOffset < maTo.mnRowOffset)));
break;
case ANCHOR_INVALID:
- OSL_ENSURE( false, "ShapeAnchor::isValidAnchor - invalid anchor" );
+ OSL_FAIL( "ShapeAnchor::isValidAnchor - invalid anchor" );
break;
}
return bValid;
@@ -254,7 +254,7 @@ Rectangle ShapeAnchor::calcApiLocation( const Size& rApiSheetSize, const AnchorS
}
break;
case ANCHOR_INVALID:
- OSL_ENSURE( false, "ShapeAnchor::calcApiLocation - invalid anchor" );
+ OSL_FAIL( "ShapeAnchor::calcApiLocation - invalid anchor" );
break;
}
@@ -346,7 +346,7 @@ Rectangle ShapeAnchor::calcEmuLocation( const AnchorSizeModel& rEmuSheetSize ) c
}
break;
case ANCHOR_INVALID:
- OSL_ENSURE( false, "ShapeAnchor::calcEmuLocation - invalid anchor" );
+ OSL_FAIL( "ShapeAnchor::calcEmuLocation - invalid anchor" );
break;
}
diff --git a/oox/source/xls/excelchartconverter.cxx b/oox/source/xls/excelchartconverter.cxx
index 412239a30732..51d01a618b96 100644
--- a/oox/source/xls/excelchartconverter.cxx
+++ b/oox/source/xls/excelchartconverter.cxx
@@ -113,7 +113,7 @@ Reference< XDataSequence > ExcelChartConverter::createDataSequence(
}
catch( Exception& )
{
- OSL_ENSURE( false, "ExcelChartConverter::createDataSequence - cannot create data sequence" );
+ OSL_FAIL( "ExcelChartConverter::createDataSequence - cannot create data sequence" );
}
}
return xDataSeq;
diff --git a/oox/source/xls/externallinkbuffer.cxx b/oox/source/xls/externallinkbuffer.cxx
index f057f42ca73f..49e8a91c3e23 100644
--- a/oox/source/xls/externallinkbuffer.cxx
+++ b/oox/source/xls/externallinkbuffer.cxx
@@ -385,7 +385,7 @@ bool ExternalName::getDdeLinkData( OUString& orDdeServer, OUString& orDdeTopic,
}
catch( Exception& )
{
- OSL_ENSURE( false, "ExternalName::getDdeLinkData - cannot create DDE link" );
+ OSL_FAIL( "ExternalName::getDdeLinkData - cannot create DDE link" );
}
// get link data from created DDE link
if( mxDdeLink.is() )
@@ -594,7 +594,7 @@ void ExternalLink::importExternalBook( const Relations& rRelations, RecordInputS
}
break;
default:
- OSL_ENSURE( false, "ExternalLink::importExternalBook - unknown link type" );
+ OSL_FAIL( "ExternalLink::importExternalBook - unknown link type" );
}
}
diff --git a/oox/source/xls/externallinkfragment.cxx b/oox/source/xls/externallinkfragment.cxx
index 3a451a2610b6..cf6a2d799682 100644
--- a/oox/source/xls/externallinkfragment.cxx
+++ b/oox/source/xls/externallinkfragment.cxx
@@ -521,7 +521,7 @@ void BiffExternalLinkFragment::importCrn()
mrStrm.skip( 7 );
break;
default:
- OSL_ENSURE( false, "BiffExternalLinkFragment::importCrn - unknown data type" );
+ OSL_FAIL( "BiffExternalLinkFragment::importCrn - unknown data type" );
bLoop = false;
}
}
diff --git a/oox/source/xls/formulabase.cxx b/oox/source/xls/formulabase.cxx
index fbde6fd1721c..36930ae91f3a 100644
--- a/oox/source/xls/formulabase.cxx
+++ b/oox/source/xls/formulabase.cxx
@@ -878,7 +878,7 @@ FunctionProviderImpl::FunctionProviderImpl( FilterType eFilter, BiffType eBiff,
nMaxParam = BIFF_MAX_PARAMCOUNT;
break;
case FILTER_UNKNOWN:
- OSL_ENSURE( false, "FunctionProviderImpl::FunctionProviderImpl - invalid filter type" );
+ OSL_FAIL( "FunctionProviderImpl::FunctionProviderImpl - invalid filter type" );
break;
}
OSL_ENSURE( eBiff != BIFF_UNKNOWN, "FunctionProviderImpl::FunctionProviderImpl - invalid BIFF type" );
@@ -1131,7 +1131,7 @@ OpCodeProviderImpl::OpCodeProviderImpl( const FunctionInfoVector& rFuncInfos,
}
catch( Exception& )
{
- OSL_ENSURE( false, "OpCodeProviderImpl::OpCodeProviderImpl - cannot receive formula opcode mapper" );
+ OSL_FAIL( "OpCodeProviderImpl::OpCodeProviderImpl - cannot receive formula opcode mapper" );
}
}
@@ -1184,8 +1184,7 @@ bool OpCodeProviderImpl::initOpCode( sal_Int32& ornOpCode, const OpCodeEntrySequ
ornOpCode = rEntrySeq[ nSpecialId ].Token.OpCode;
return true;
}
- OSL_ENSURE( false,
- OStringBuffer( "OpCodeProviderImpl::initOpCode - opcode for special offset " ).
+ OSL_FAIL( OStringBuffer( "OpCodeProviderImpl::initOpCode - opcode for special offset " ).
append( nSpecialId ).append( " not found" ).getStr() );
return false;
}
@@ -1205,8 +1204,7 @@ bool OpCodeProviderImpl::initOpCode( sal_Int32& ornOpCode, const ApiTokenMap& rT
}
return true;
}
- OSL_ENSURE( false,
- OStringBuffer( "OpCodeProviderImpl::initOpCode - opcode for \"" ).
+ OSL_FAIL( OStringBuffer( "OpCodeProviderImpl::initOpCode - opcode for \"" ).
append( OUStringToOString( rOdfName, RTL_TEXTENCODING_ASCII_US ) ).
append( "\" not found" ).getStr() );
return false;
diff --git a/oox/source/xls/formulaparser.cxx b/oox/source/xls/formulaparser.cxx
index 34d87336f776..4a0f7c678033 100644
--- a/oox/source/xls/formulaparser.cxx
+++ b/oox/source/xls/formulaparser.cxx
@@ -587,17 +587,17 @@ FormulaParserImpl::FormulaParserImpl( const FormulaParser& rParent ) :
void FormulaParserImpl::importOoxFormula( FormulaContext&, const OUString& )
{
- OSL_ENSURE( false, "FormulaParserImpl::importOoxFormula - not implemented" );
+ OSL_FAIL( "FormulaParserImpl::importOoxFormula - not implemented" );
}
void FormulaParserImpl::importOobFormula( FormulaContext&, RecordInputStream& )
{
- OSL_ENSURE( false, "FormulaParserImpl::importOobFormula - not implemented" );
+ OSL_FAIL( "FormulaParserImpl::importOobFormula - not implemented" );
}
void FormulaParserImpl::importBiffFormula( FormulaContext&, BiffInputStream&, const sal_uInt16* )
{
- OSL_ENSURE( false, "FormulaParserImpl::importBiffFormula - not implemented" );
+ OSL_FAIL( "FormulaParserImpl::importBiffFormula - not implemented" );
}
void FormulaParserImpl::setFormula( FormulaContext& rContext, const ApiTokenSequence& rTokens )
@@ -1637,7 +1637,7 @@ bool OoxFormulaParserImpl::importArrayToken( RecordInputStream& rStrm )
rStrm.skip( 3 );
break;
default:
- OSL_ENSURE( false, "OoxFormulaParserImpl::importArrayToken - unknown data type" );
+ OSL_FAIL( "OoxFormulaParserImpl::importArrayToken - unknown data type" );
appendRawToken( OPCODE_PUSH ) <<= BiffHelper::calcDoubleFromError( BIFF_ERR_NA );
}
}
@@ -2359,7 +2359,7 @@ bool BiffFormulaParserImpl::importArrayToken( BiffInputStream& rStrm )
rStrm.skip( 7 );
break;
default:
- OSL_ENSURE( false, "BiffFormulaParserImpl::importArrayToken - unknown data type" );
+ OSL_FAIL( "BiffFormulaParserImpl::importArrayToken - unknown data type" );
appendRawToken( OPCODE_PUSH ) <<= BiffHelper::calcDoubleFromError( BIFF_ERR_NA );
}
}
diff --git a/oox/source/xls/numberformatsbuffer.cxx b/oox/source/xls/numberformatsbuffer.cxx
index d7a055469b48..f73ab915a9b1 100644
--- a/oox/source/xls/numberformatsbuffer.cxx
+++ b/oox/source/xls/numberformatsbuffer.cxx
@@ -1840,8 +1840,7 @@ sal_Int32 lclCreatePredefinedFormat( const Reference< XNumberFormats >& rxNumFmt
}
catch( Exception& )
{
- OSL_ENSURE( false,
- OStringBuffer( "lclCreatePredefinedFormat - cannot create predefined number format " ).
+ OSL_FAIL( OStringBuffer( "lclCreatePredefinedFormat - cannot create predefined number format " ).
append( OString::valueOf( static_cast< sal_Int32 >( nPredefId ) ) ).getStr() );
}
return nIndex;
@@ -1865,8 +1864,7 @@ sal_Int32 lclCreateFormat( const Reference< XNumberFormats >& rxNumFmts,
}
else
{
- OSL_ENSURE( false,
- OStringBuffer( "lclCreateFormat - cannot create number format '" ).
+ OSL_FAIL( OStringBuffer( "lclCreateFormat - cannot create number format '" ).
append( OUStringToOString( rFmtCode, osl_getThreadTextEncoding() ) ).
append( '\'' ).getStr() );
}
@@ -1978,7 +1976,7 @@ NumberFormatsBuffer::NumberFormatsBuffer( const WorkbookHelper& rHelper ) :
}
catch( Exception& )
{
- OSL_ENSURE( false, "NumberFormatsBuffer::NumberFormatsBuffer - cannot get system locale" );
+ OSL_FAIL( "NumberFormatsBuffer::NumberFormatsBuffer - cannot get system locale" );
}
// create built-in formats for current locale
diff --git a/oox/source/xls/pagesettings.cxx b/oox/source/xls/pagesettings.cxx
index 907cdf2a384d..ac85256890a1 100644
--- a/oox/source/xls/pagesettings.cxx
+++ b/oox/source/xls/pagesettings.cxx
@@ -927,8 +927,7 @@ Reference< XTextContent > HeaderFooterParser::createField( const OUString& rServ
}
catch( Exception& )
{
- OSL_ENSURE( false,
- OStringBuffer( "HeaderFooterParser::createField - error while creating text field \"" ).
+ OSL_FAIL( OStringBuffer( "HeaderFooterParser::createField - error while creating text field \"" ).
append( OUStringToOString( rServiceName, RTL_TEXTENCODING_ASCII_US ) ).
append( '"' ).getStr() );
}
diff --git a/oox/source/xls/pivotcachebuffer.cxx b/oox/source/xls/pivotcachebuffer.cxx
index aeaade3b0640..7905fdf453b2 100644
--- a/oox/source/xls/pivotcachebuffer.cxx
+++ b/oox/source/xls/pivotcachebuffer.cxx
@@ -317,7 +317,7 @@ OUString PivotCacheItem::getName() const
case XML_b: return OUString::valueOf( static_cast< sal_Bool >( maValue.get< bool >() ) ); // !TODO
case XML_e: return OUString(); // !TODO
}
- OSL_ENSURE( false, "PivotCacheItem::getName - invalid data type" );
+ OSL_FAIL( "PivotCacheItem::getName - invalid data type" );
return OUString();
}
@@ -339,7 +339,7 @@ void PivotCacheItemList::importItem( sal_Int32 nElement, const AttributeList& rA
case XLS_TOKEN( d ): rItem.readDate( rAttribs ); break;
case XLS_TOKEN( b ): rItem.readBool( rAttribs ); break;
case XLS_TOKEN( e ): rItem.readError( rAttribs, getUnitConverter() ); break;
- default: OSL_ENSURE( false, "PivotCacheItemList::importItem - unknown element type" );
+ default: OSL_FAIL( "PivotCacheItemList::importItem - unknown element type" );
}
}
@@ -366,7 +366,7 @@ void PivotCacheItemList::importItem( sal_Int32 nRecId, RecordInputStream& rStrm
case OOBIN_ID_PCITEMA_BOOL: rItem.readBool( rStrm ); break;
case OOBIN_ID_PCITEM_ERROR:
case OOBIN_ID_PCITEMA_ERROR: rItem.readError( rStrm ); break;
- default: OSL_ENSURE( false, "PivotCacheItemList::importItem - unknown record type" );
+ default: OSL_FAIL( "PivotCacheItemList::importItem - unknown record type" );
}
}
@@ -425,7 +425,7 @@ void PivotCacheItemList::importArray( RecordInputStream& rStrm )
case OOBIN_PCITEM_ARRAY_ERROR: createItem().readError( rStrm ); break;
case OOBIN_PCITEM_ARRAY_DATE: createItem().readDate( rStrm ); break;
default:
- OSL_ENSURE( false, "PivotCacheItemList::importArray - unknown data type" );
+ OSL_FAIL( "PivotCacheItemList::importArray - unknown data type" );
nIdx = nCount;
}
}
@@ -809,7 +809,7 @@ OUString PivotCacheField::createDateGroupField( const Reference< XDataPilotField
case XML_hours: aGroupInfo.GroupBy = HOURS; break;
case XML_minutes: aGroupInfo.GroupBy = MINUTES; break;
case XML_seconds: aGroupInfo.GroupBy = SECONDS; break;
- default: OSL_ENSURE( false, "PivotCacheField::convertRangeGrouping - unknown date/time interval" );
+ default: OSL_FAIL( "PivotCacheField::convertRangeGrouping - unknown date/time interval" );
}
try
@@ -996,7 +996,7 @@ void PivotCacheField::writeItemToSourceDataCell( WorksheetHelper& rSheetHelper,
case XML_d: rSheetHelper.setDateTimeCell( xCell, rItem.getValue().get< DateTime >() ); break;
case XML_b: rSheetHelper.setBooleanCell( xCell, rItem.getValue().get< bool >() ); break;
case XML_e: rSheetHelper.setErrorCell( xCell, static_cast< sal_uInt8 >( rItem.getValue().get< sal_Int32 >() ) ); break;
- default: OSL_ENSURE( false, "PivotCacheField::writeItemToSourceDataCell - unexpected item data type" );
+ default: OSL_FAIL( "PivotCacheField::writeItemToSourceDataCell - unexpected item data type" );
}
}
}
@@ -1529,7 +1529,7 @@ PivotCache* PivotCacheBuffer::importPivotCacheFragment( sal_Int32 nCacheId )
}
case FILTER_UNKNOWN:
- OSL_ENSURE( false, "PivotCacheBuffer::importPivotCacheFragment - unknown filter type" );
+ OSL_FAIL( "PivotCacheBuffer::importPivotCacheFragment - unknown filter type" );
}
return 0;
}
diff --git a/oox/source/xls/pivotcachefragment.cxx b/oox/source/xls/pivotcachefragment.cxx
index 9800ebb6e567..eaf063f0c072 100644
--- a/oox/source/xls/pivotcachefragment.cxx
+++ b/oox/source/xls/pivotcachefragment.cxx
@@ -249,7 +249,7 @@ ContextHandlerRef OoxPivotCacheRecordsFragment::onCreateContext( sal_Int32 nElem
case XLS_TOKEN( b ): aItem.readBool( rAttribs ); break;
case XLS_TOKEN( e ): aItem.readError( rAttribs, getUnitConverter() ); break;
case XLS_TOKEN( x ): aItem.readIndex( rAttribs ); break;
- default: OSL_ENSURE( false, "OoxPivotCacheRecordsFragment::onCreateContext - unexpected element" );
+ default: OSL_FAIL( "OoxPivotCacheRecordsFragment::onCreateContext - unexpected element" );
}
mrPivotCache.writeSourceDataCell( *this, mnCol, mnRow, aItem );
++mnCol;
@@ -319,7 +319,7 @@ void OoxPivotCacheRecordsFragment::importPCRecordItem( sal_Int32 nRecId, RecordI
case OOBIN_ID_PCITEM_BOOL: aItem.readBool( rStrm ); break;
case OOBIN_ID_PCITEM_ERROR: aItem.readError( rStrm ); break;
case OOBIN_ID_PCITEM_INDEX: aItem.readIndex( rStrm ); break;
- default: OSL_ENSURE( false, "OoxPivotCacheRecordsFragment::importPCRecordItem - unexpected record" );
+ default: OSL_FAIL( "OoxPivotCacheRecordsFragment::importPCRecordItem - unexpected record" );
}
mrPivotCache.writeSourceDataCell( *this, mnCol, mnRow, aItem );
++mnCol;
diff --git a/oox/source/xls/pivottablebuffer.cxx b/oox/source/xls/pivottablebuffer.cxx
index 2a6ce43a2484..d6391ee84757 100644
--- a/oox/source/xls/pivottablebuffer.cxx
+++ b/oox/source/xls/pivottablebuffer.cxx
@@ -694,7 +694,7 @@ void PivotTableField::convertDataField( const PTDataFieldModel& rDataField )
case XML_stdDevp: eAggFunc = GeneralFunction_STDEVP; break;
case XML_var: eAggFunc = GeneralFunction_VAR; break;
case XML_varp: eAggFunc = GeneralFunction_VARP; break;
- default: OSL_ENSURE( false, "PivotTableField::convertDataField - unknown aggregation function" );
+ default: OSL_FAIL( "PivotTableField::convertDataField - unknown aggregation function" );
}
aPropSet.setProperty( PROP_Function, eAggFunc );
@@ -1423,7 +1423,7 @@ void PivotTable::finalizeImport()
}
catch( Exception& )
{
- OSL_ENSURE( false, "PivotTable::finalizeImport - exception while creating the DataPilot table" );
+ OSL_FAIL( "PivotTable::finalizeImport - exception while creating the DataPilot table" );
}
}
}
diff --git a/oox/source/xls/sheetdatacontext.cxx b/oox/source/xls/sheetdatacontext.cxx
index a7aa5d303122..1e5aec5eddd3 100644
--- a/oox/source/xls/sheetdatacontext.cxx
+++ b/oox/source/xls/sheetdatacontext.cxx
@@ -253,7 +253,7 @@ void OoxSheetDataContext::onEndElement( const OUString& rChars )
break;
default:
- OSL_ENSURE( false, "OoxSheetDataContext::onEndElement - unknown formula type" );
+ OSL_FAIL( "OoxSheetDataContext::onEndElement - unknown formula type" );
}
}
catch( Exception& )
@@ -766,7 +766,7 @@ void BiffSheetDataContext::importBoolErr()
setErrorCell( maCurrCell.mxCell, nValue );
break;
default:
- OSL_ENSURE( false, "BiffSheetDataContext::importBoolErr - unknown cell type" );
+ OSL_FAIL( "BiffSheetDataContext::importBoolErr - unknown cell type" );
}
}
setCellFormat( maCurrCell );
@@ -978,7 +978,7 @@ void BiffSheetDataContext::importDataTable()
}
break;
default:
- OSL_ENSURE( false, "BiffSheetDataContext::importDataTable - unknown record id" );
+ OSL_FAIL( "BiffSheetDataContext::importDataTable - unknown record id" );
}
aModel.maRef1 = FormulaProcessorBase::generateAddress2dString( aRef1, false );
aModel.maRef2 = FormulaProcessorBase::generateAddress2dString( aRef2, false );
diff --git a/oox/source/xls/stylesbuffer.cxx b/oox/source/xls/stylesbuffer.cxx
index 91ed3f966f71..0c21d2225992 100644
--- a/oox/source/xls/stylesbuffer.cxx
+++ b/oox/source/xls/stylesbuffer.cxx
@@ -372,7 +372,7 @@ void Color::importColor( const AttributeList& rAttribs )
setIndexed( rAttribs.getInteger( XML_indexed, -1 ), rAttribs.getDouble( XML_tint, 0.0 ) );
else
{
- OSL_ENSURE( false, "Color::importColor - unknown color type" );
+ OSL_FAIL( "Color::importColor - unknown color type" );
setAuto();
}
}
@@ -408,7 +408,7 @@ void Color::importColor( RecordInputStream& rStrm )
rStrm.skip( 4 );
break;
default:
- OSL_ENSURE( false, "Color::importColor - unknown color type" );
+ OSL_FAIL( "Color::importColor - unknown color type" );
setAuto();
rStrm.skip( 4 );
}
@@ -570,7 +570,7 @@ sal_Int32 ColorPalette::getColor( sal_Int32 nPaletteIdx ) const
case OOX_COLOR_NOTEBACK: nColor = getBaseFilter().getGraphicHelper().getSystemColor( XML_infoBk ); break;
case OOX_COLOR_NOTETEXT: nColor = getBaseFilter().getGraphicHelper().getSystemColor( XML_infoText ); break;
case OOX_COLOR_FONTAUTO: nColor = API_RGB_TRANSPARENT; break;
- default: OSL_ENSURE( false, "ColorPalette::getColor - unknown color index" );
+ default: OSL_FAIL( "ColorPalette::getColor - unknown color index" );
}
return nColor;
}
@@ -887,7 +887,7 @@ void Font::importDxfFlag( sal_Int32 nElement, RecordInputStream& rStrm )
maUsedFlags.mbShadowUsed = true;
break;
default:
- OSL_ENSURE( false, "Font::importDxfFlag - unexpected element identifier" );
+ OSL_FAIL( "Font::importDxfFlag - unexpected element identifier" );
}
}
diff --git a/oox/source/xls/tablebuffer.cxx b/oox/source/xls/tablebuffer.cxx
index f9b68b6f74f5..80a8dbae460e 100644
--- a/oox/source/xls/tablebuffer.cxx
+++ b/oox/source/xls/tablebuffer.cxx
@@ -110,7 +110,7 @@ void Table::finalizeImport()
}
catch( Exception& )
{
- OSL_ENSURE( false, "Table::finalizeImport - cannot create database range" );
+ OSL_FAIL( "Table::finalizeImport - cannot create database range" );
}
}
diff --git a/oox/source/xls/viewsettings.cxx b/oox/source/xls/viewsettings.cxx
index 9f04cf3d8007..d3ebafc7fdb9 100644
--- a/oox/source/xls/viewsettings.cxx
+++ b/oox/source/xls/viewsettings.cxx
@@ -784,7 +784,7 @@ void ViewSettings::finalizeImport()
}
catch( Exception& )
{
- OSL_ENSURE( false, "ViewSettings::finalizeImport - cannot create document view settings" );
+ OSL_FAIL( "ViewSettings::finalizeImport - cannot create document view settings" );
}
/* Set visible area to be used if this document is an embedded OLE object.
diff --git a/oox/source/xls/worksheetbuffer.cxx b/oox/source/xls/worksheetbuffer.cxx
index 3d0d882325c7..d4cab601ab70 100644
--- a/oox/source/xls/worksheetbuffer.cxx
+++ b/oox/source/xls/worksheetbuffer.cxx
@@ -240,7 +240,7 @@ WorksheetBuffer::IndexNamePair WorksheetBuffer::createSheet( const OUString& rPr
}
catch( Exception& )
{
- OSL_ENSURE( false, "WorksheetBuffer::createSheet - cannot insert or rename worksheet" );
+ OSL_FAIL( "WorksheetBuffer::createSheet - cannot insert or rename worksheet" );
}
return IndexNamePair( -1, OUString() );
}
diff --git a/oox/source/xls/worksheethelper.cxx b/oox/source/xls/worksheethelper.cxx
index 48757b0c81a4..124625249831 100644
--- a/oox/source/xls/worksheethelper.cxx
+++ b/oox/source/xls/worksheethelper.cxx
@@ -1398,7 +1398,7 @@ void WorksheetData::insertHyperlink( const CellAddress& rAddress, const OUString
}
catch( const Exception& )
{
- OSL_ENSURE( false, "WorksheetData::insertHyperlink - cannot insert text field" );
+ OSL_FAIL( "WorksheetData::insertHyperlink - cannot insert text field" );
}
}
}
@@ -1449,7 +1449,7 @@ void WorksheetData::finalizeValidationRanges() const
case XML_textLength: eType = csss::ValidationType_TEXT_LEN; break;
case XML_time: eType = csss::ValidationType_TIME; break;
case XML_whole: eType = csss::ValidationType_WHOLE; break;
- default: OSL_ENSURE( false, "WorksheetData::finalizeValidationRanges - unknown validation type" );
+ default: OSL_FAIL( "WorksheetData::finalizeValidationRanges - unknown validation type" );
}
aValProps.setProperty( PROP_Type, eType );
@@ -1460,7 +1460,7 @@ void WorksheetData::finalizeValidationRanges() const
case XML_information: eAlertStyle = csss::ValidationAlertStyle_INFO; break;
case XML_stop: eAlertStyle = csss::ValidationAlertStyle_STOP; break;
case XML_warning: eAlertStyle = csss::ValidationAlertStyle_WARNING; break;
- default: OSL_ENSURE( false, "WorksheetData::finalizeValidationRanges - unknown error style" );
+ default: OSL_FAIL( "WorksheetData::finalizeValidationRanges - unknown error style" );
}
aValProps.setProperty( PROP_ErrorAlertStyle, eAlertStyle );