summaryrefslogtreecommitdiff
path: root/xmlscript
diff options
context:
space:
mode:
authorThomas Arnhold <thomas@arnhold.org>2011-03-12 12:08:22 +0100
committerThomas Arnhold <thomas@arnhold.org>2011-03-13 16:50:43 +0100
commit6495f3945ec0dd4cef37b8dfd5217562de4a3269 (patch)
tree8547adeed9ab7d2452d7efbe0c5cad284930695f /xmlscript
parent1f6580e985d5c3aa0f3161dd884e71a673e7a0b1 (diff)
Move OSL_ENSURE(0,...) to OSL_FAIL(...)
Diffstat (limited to 'xmlscript')
-rw-r--r--xmlscript/source/xmldlg_imexp/exp_share.hxx2
-rw-r--r--xmlscript/source/xmldlg_imexp/xmldlg_expmodels.cxx6
-rw-r--r--xmlscript/source/xmldlg_imexp/xmldlg_export.cxx48
-rw-r--r--xmlscript/source/xmldlg_imexp/xmldlg_impmodels.cxx2
-rw-r--r--xmlscript/test/imexp.cxx8
5 files changed, 33 insertions, 33 deletions
diff --git a/xmlscript/source/xmldlg_imexp/exp_share.hxx b/xmlscript/source/xmldlg_imexp/exp_share.hxx
index aaf6bd6aeef6..385e9c977c1c 100644
--- a/xmlscript/source/xmldlg_imexp/exp_share.hxx
+++ b/xmlscript/source/xmldlg_imexp/exp_share.hxx
@@ -246,7 +246,7 @@ inline void ElementDescriptor::read(
if (a >>= v)
addAttribute( attrName, ::rtl::OUString::valueOf(v) );
else
- OSL_ENSURE( 0, "### unexpected property type!" );
+ OSL_FAIL( "### unexpected property type!" );
}
}
diff --git a/xmlscript/source/xmldlg_imexp/xmldlg_expmodels.cxx b/xmlscript/source/xmldlg_imexp/xmldlg_expmodels.cxx
index 01f1efee03b2..9f91a337810c 100644
--- a/xmlscript/source/xmldlg_imexp/xmldlg_expmodels.cxx
+++ b/xmlscript/source/xmldlg_imexp/xmldlg_expmodels.cxx
@@ -256,7 +256,7 @@ void ElementDescriptor::readButtonModel( StyleBag * all_styles )
OUString( RTL_CONSTASCII_USTRINGPARAM("true") ) );
break;
default:
- OSL_ENSURE( 0, "### unexpected radio state!" );
+ OSL_FAIL( "### unexpected radio state!" );
break;
}
}
@@ -325,7 +325,7 @@ void ElementDescriptor::readCheckBoxModel( StyleBag * all_styles )
OSL_ENSURE( bTriState, "### detected tristate value, but TriState is not set!" );
break;
default:
- OSL_ENSURE( 0, "### unexpected checkbox state!" );
+ OSL_FAIL( "### unexpected checkbox state!" );
break;
}
}
@@ -532,7 +532,7 @@ void ElementDescriptor::readRadioButtonModel( StyleBag * all_styles )
OUString( RTL_CONSTASCII_USTRINGPARAM("true") ) );
break;
default:
- OSL_ENSURE( 0, "### unexpected radio state!" );
+ OSL_FAIL( "### unexpected radio state!" );
break;
}
}
diff --git a/xmlscript/source/xmldlg_imexp/xmldlg_export.cxx b/xmlscript/source/xmldlg_imexp/xmldlg_export.cxx
index 4ae2ebdabc11..2dce75b26f67 100644
--- a/xmlscript/source/xmldlg_imexp/xmldlg_export.cxx
+++ b/xmlscript/source/xmldlg_imexp/xmldlg_export.cxx
@@ -160,7 +160,7 @@ Reference< xml::sax::XAttributeList > Style::createElement()
break;
}
default:
- OSL_ENSURE( 0, "### unexpected border value!" );
+ OSL_FAIL( "### unexpected border value!" );
break;
}
}
@@ -183,7 +183,7 @@ Reference< xml::sax::XAttributeList > Style::createElement()
OUSTR("simple") );
break;
default:
- OSL_ENSURE( 0, "### unexpected visual effect value!" );
+ OSL_FAIL( "### unexpected visual effect value!" );
break;
}
}
@@ -247,7 +247,7 @@ Reference< xml::sax::XAttributeList > Style::createElement()
OUString( RTL_CONSTASCII_USTRINGPARAM("system") ) );
break;
default:
- OSL_ENSURE( 0, "### unexpected font-family!" );
+ OSL_FAIL( "### unexpected font-family!" );
break;
}
}
@@ -297,7 +297,7 @@ Reference< xml::sax::XAttributeList > Style::createElement()
OUString( RTL_CONSTASCII_USTRINGPARAM("symbol") ) );
break;
default:
- OSL_ENSURE( 0, "### unexpected font-charset!" );
+ OSL_FAIL( "### unexpected font-charset!" );
break;
}
}
@@ -315,7 +315,7 @@ Reference< xml::sax::XAttributeList > Style::createElement()
OUString( RTL_CONSTASCII_USTRINGPARAM("variable") ) );
break;
default:
- OSL_ENSURE( 0, "### unexpected font-pitch!" );
+ OSL_FAIL( "### unexpected font-pitch!" );
break;
}
}
@@ -353,7 +353,7 @@ Reference< xml::sax::XAttributeList > Style::createElement()
OUString( RTL_CONSTASCII_USTRINGPARAM("reverse_italic") ) );
break;
default:
- OSL_ENSURE( 0, "### unexpected font-slant!" );
+ OSL_FAIL( "### unexpected font-slant!" );
break;
}
}
@@ -431,7 +431,7 @@ Reference< xml::sax::XAttributeList > Style::createElement()
OUString( RTL_CONSTASCII_USTRINGPARAM("boldwave") ) );
break;
default:
- OSL_ENSURE( 0, "### unexpected font-underline!" );
+ OSL_FAIL( "### unexpected font-underline!" );
break;
}
}
@@ -461,7 +461,7 @@ Reference< xml::sax::XAttributeList > Style::createElement()
OUString( RTL_CONSTASCII_USTRINGPARAM("x") ) );
break;
default:
- OSL_ENSURE( 0, "### unexpected font-strikeout!" );
+ OSL_FAIL( "### unexpected font-strikeout!" );
break;
}
}
@@ -501,7 +501,7 @@ Reference< xml::sax::XAttributeList > Style::createElement()
OUString( RTL_CONSTASCII_USTRINGPARAM("scalable") ) );
break;
default:
- OSL_ENSURE( 0, "### unexpected font-type!" );
+ OSL_FAIL( "### unexpected font-type!" );
break;
}
}
@@ -523,7 +523,7 @@ Reference< xml::sax::XAttributeList > Style::createElement()
OUString( RTL_CONSTASCII_USTRINGPARAM("engraved") ) );
break;
default:
- OSL_ENSURE( 0, "### unexpected font-relief!" );
+ OSL_FAIL( "### unexpected font-relief!" );
break;
}
// dialog:font-emphasismark (none|dot|circle|disc|accent|above|below) #IMPLIED
@@ -562,7 +562,7 @@ Reference< xml::sax::XAttributeList > Style::createElement()
OUString( RTL_CONSTASCII_USTRINGPARAM("below") ) );
break;
default:
- OSL_ENSURE( 0, "### unexpected font-emphasismark!" );
+ OSL_FAIL( "### unexpected font-emphasismark!" );
break;
}
}
@@ -626,7 +626,7 @@ void ElementDescriptor::readStringAttr(
if (a >>= v)
addAttribute( rAttrName, v );
else
- OSL_ENSURE( 0, "### unexpected property type!" );
+ OSL_FAIL( "### unexpected property type!" );
}
}
@@ -694,7 +694,7 @@ void ElementDescriptor::readDateFormatAttr( OUString const & rPropName, OUString
addAttribute( rAttrName, OUString( RTL_CONSTASCII_USTRINGPARAM("short_YYYYMMDD_DIN5008") ) );
break;
default:
- OSL_ENSURE( 0, "### unexpected date format!" );
+ OSL_FAIL( "### unexpected date format!" );
break;
}
}
@@ -729,7 +729,7 @@ void ElementDescriptor::readTimeFormatAttr( OUString const & rPropName, OUString
addAttribute( rAttrName, OUString( RTL_CONSTASCII_USTRINGPARAM("Duration_long") ) );
break;
default:
- OSL_ENSURE( 0, "### unexpected time format!" );
+ OSL_FAIL( "### unexpected time format!" );
break;
}
}
@@ -755,7 +755,7 @@ void ElementDescriptor::readAlignAttr( OUString const & rPropName, OUString cons
addAttribute( rAttrName, OUString( RTL_CONSTASCII_USTRINGPARAM("right") ) );
break;
default:
- OSL_ENSURE( 0, "### illegal alignment value!" );
+ OSL_FAIL( "### illegal alignment value!" );
break;
}
}
@@ -783,7 +783,7 @@ void ElementDescriptor::readVerticalAlignAttr( OUString const & rPropName, OUStr
addAttribute( rAttrName, OUString( RTL_CONSTASCII_USTRINGPARAM("bottom") ) );
break;
default:
- OSL_ENSURE( 0, "### illegal vertical alignment value!" );
+ OSL_FAIL( "### illegal vertical alignment value!" );
break;
}
}
@@ -839,7 +839,7 @@ void ElementDescriptor::readImageAlignAttr( OUString const & rPropName, OUString
addAttribute( rAttrName, OUString( RTL_CONSTASCII_USTRINGPARAM("bottom") ) );
break;
default:
- OSL_ENSURE( 0, "### illegal image alignment value!" );
+ OSL_FAIL( "### illegal image alignment value!" );
break;
}
}
@@ -895,7 +895,7 @@ void ElementDescriptor::readImagePositionAttr( OUString const & rPropName, OUStr
addAttribute( rAttrName, OUString( RTL_CONSTASCII_USTRINGPARAM("center") ) );
break;
default:
- OSL_ENSURE( 0, "### illegal image position value!" );
+ OSL_FAIL( "### illegal image position value!" );
break;
}
}
@@ -924,7 +924,7 @@ void ElementDescriptor::readButtonTypeAttr( OUString const & rPropName, OUString
addAttribute( rAttrName, OUString( RTL_CONSTASCII_USTRINGPARAM("help") ) );
break;
default:
- OSL_ENSURE( 0, "### illegal button-type value!" );
+ OSL_FAIL( "### illegal button-type value!" );
break;
}
}
@@ -947,7 +947,7 @@ void ElementDescriptor::readOrientationAttr( OUString const & rPropName, OUStrin
addAttribute( rAttrName, OUString( RTL_CONSTASCII_USTRINGPARAM("vertical") ) );
break;
default:
- OSL_ENSURE( 0, "### illegal orientation value!" );
+ OSL_FAIL( "### illegal orientation value!" );
break;
}
}
@@ -973,7 +973,7 @@ void ElementDescriptor::readLineEndFormatAttr( OUString const & rPropName, OUStr
addAttribute( rAttrName, OUString( RTL_CONSTASCII_USTRINGPARAM("carriage-return-line-feed") ) );
break;
default:
- OSL_ENSURE( 0, "### illegal line end format value!" );
+ OSL_FAIL( "### illegal line end format value!" );
break;
}
}
@@ -1066,7 +1066,7 @@ void ElementDescriptor::readSelectionTypeAttr( OUString const & rPropName, OUStr
addAttribute( rAttrName, OUString( RTL_CONSTASCII_USTRINGPARAM("range") ) );
break;
default:
- OSL_ENSURE( 0, "### illegal selection type value!" );
+ OSL_FAIL( "### illegal selection type value!" );
break;
}
}
@@ -1114,7 +1114,7 @@ void ElementDescriptor::readDefaults( bool supportPrintable, bool supportVisible
}
else
{
- OSL_ENSURE( 0, "unexpected property type for \"Enabled\": not bool!" );
+ OSL_FAIL( "unexpected property type for \"Enabled\": not bool!" );
}
sal_Bool bVisible = sal_True;
@@ -1303,7 +1303,7 @@ void ElementDescriptor::readEvents()
}
else
{
- OSL_ENSURE( 0, "### unexpected event type in container!" );
+ OSL_FAIL( "### unexpected event type in container!" );
}
}
}
diff --git a/xmlscript/source/xmldlg_imexp/xmldlg_impmodels.cxx b/xmlscript/source/xmldlg_imexp/xmldlg_impmodels.cxx
index e09f2d6b519e..2aa541b08efd 100644
--- a/xmlscript/source/xmldlg_imexp/xmldlg_impmodels.cxx
+++ b/xmlscript/source/xmldlg_imexp/xmldlg_impmodels.cxx
@@ -722,7 +722,7 @@ void FormattedFieldElement::endElement()
}
catch (util::MalformedNumberFormatException & exc)
{
- OSL_ENSURE( 0, "### util::MalformedNumberFormatException occurred!" );
+ OSL_FAIL( "### util::MalformedNumberFormatException occurred!" );
// rethrow
throw xml::sax::SAXException( exc.Message, Reference< XInterface >(), Any() );
}
diff --git a/xmlscript/test/imexp.cxx b/xmlscript/test/imexp.cxx
index 45a76ffc15fa..100a3972101b 100644
--- a/xmlscript/test/imexp.cxx
+++ b/xmlscript/test/imexp.cxx
@@ -95,7 +95,7 @@ Reference< XComponentContext > createInitialComponentContext(
catch( Exception& rExc )
{
OString aStr( OUStringToOString( rExc.Message, RTL_TEXTENCODING_ASCII_US ) );
- OSL_ENSURE( 0, aStr.getStr() );
+ OSL_FAIL( aStr.getStr() );
}
return xContext;
@@ -178,7 +178,7 @@ void MyApp::Main()
{
if (GetCommandLineParamCount() < 2)
{
- OSL_ENSURE( 0, "usage: imexp inst_dir inputfile [outputfile]\n" );
+ OSL_FAIL( "usage: imexp inst_dir inputfile [outputfile]\n" );
return;
}
@@ -226,12 +226,12 @@ void MyApp::Main()
aStr += OString( " >>> " );
aStr += OUStringToOString( exc.Message, RTL_TEXTENCODING_ASCII_US );
}
- OSL_ENSURE( 0, aStr.getStr() );
+ OSL_FAIL( aStr.getStr() );
}
catch (uno::Exception & rExc)
{
OString aStr( OUStringToOString( rExc.Message, RTL_TEXTENCODING_ASCII_US ) );
- OSL_ENSURE( 0, aStr.getStr() );
+ OSL_FAIL( aStr.getStr() );
}
Reference< lang::XComponent > xComp( xContext, UNO_QUERY );