Kaydet (Commit) 34ca5a2f authored tarafından Chris Sherlock's avatar Chris Sherlock

tdf#43157: convert xmlscript from OSL_ASSERT to assert

Change-Id: I8470851db8f70cbde96ca033ebd5aa515da84510
üst 367fa84a
......@@ -69,13 +69,13 @@ sal_Int16 XMLElement::getLength()
OUString XMLElement::getNameByIndex( sal_Int16 nPos )
{
OSL_ASSERT( (size_t)nPos < _attrNames.size() );
assert( (size_t)nPos < _attrNames.size() );
return _attrNames[ nPos ];
}
OUString XMLElement::getTypeByIndex( sal_Int16 nPos )
{
OSL_ASSERT( (size_t)nPos < _attrNames.size() );
assert( (size_t)nPos < _attrNames.size() );
static_cast<void>(nPos);
// xxx todo
return OUString();
......@@ -89,7 +89,7 @@ OUString XMLElement::getTypeByName( OUString const & /*rName*/ )
OUString XMLElement::getValueByIndex( sal_Int16 nPos )
{
OSL_ASSERT( (size_t)nPos < _attrNames.size() );
assert( (size_t)nPos < _attrNames.size() );
return _attrValues[ nPos ];
}
......
......@@ -164,7 +164,7 @@ public:
, _xDialogModelFactory( xDialogModel, css::uno::UNO_QUERY_THROW )
, XMLNS_DIALOGS_UID( 0 )
, XMLNS_SCRIPT_UID( 0 )
{ OSL_ASSERT( _xDialogModel.is() && _xDialogModelFactory.is() &&
{ assert( _xDialogModel.is() && _xDialogModelFactory.is() &&
_xContext.is() ); }
DialogImport( const DialogImport& rOther ) :
::cppu::WeakImplHelper< css::xml::input::XRoot >()
......@@ -380,7 +380,7 @@ public:
: _pImport( pImport ),
_xControlModel( xControlModel_ ),
_aId( id )
{ OSL_ASSERT( _xControlModel.is() ); }
{ assert( _xControlModel.is() ); }
const css::uno::Reference< css::beans::XPropertySet >& getControlModel() const
{ return _xControlModel; }
......
......@@ -1365,9 +1365,9 @@ void SAL_CALL exportDialogModel(
StyleBag all_styles;
// window
Reference< beans::XPropertySet > xProps( xDialogModel, UNO_QUERY );
OSL_ASSERT( xProps.is() );
assert( xProps.is() );
Reference< beans::XPropertyState > xPropState( xProps, UNO_QUERY );
OSL_ASSERT( xPropState.is() );
assert( xPropState.is() );
ElementDescriptor * pElem = new ElementDescriptor( xProps, xPropState, XMLNS_DIALOGS_PREFIX ":bulletinboard", xDocument );
Reference< xml::sax::XAttributeList > xElem( pElem );
......
......@@ -256,19 +256,13 @@ void StyleElement::importVisualEffectStyle(
if (getStringAttr( &aValue, "look", _xAttributes, m_xImport->XMLNS_DIALOGS_UID ))
{
if ( aValue == "none" )
{
_visualEffect = awt::VisualEffect::NONE;
}
else if ( aValue == "3d" )
{
_visualEffect = awt::VisualEffect::LOOK3D;
}
else if ( aValue == "simple" )
{
_visualEffect = awt::VisualEffect::FLAT;
}
else
OSL_ASSERT( false );
assert( false );
_hasValue |= 0x40;
xProps->setPropertyValue( "VisualEffect", makeAny(_visualEffect) );
......
......@@ -63,7 +63,7 @@ Reference< XComponentContext > createInitialComponentContext(
OUString file_url;
oslFileError rc = osl_getFileURLFromSystemPath(
inst_dir.pData, &file_url.pData );
OSL_ASSERT( osl_File_E_None == rc );
assert( osl_File_E_None == rc );
OUString unorc = file_url + ("/" LIBO_ETC_FOLDER "/" SAL_CONFIGFILE("louno") );
......@@ -123,7 +123,7 @@ void exportToFile(
nRead = xStream->readBytes( readBytes, 1024 );
if (! nRead)
break;
OSL_ASSERT( readBytes.getLength() >= nRead );
assert( readBytes.getLength() >= nRead );
sal_Int32 nPos = bytes.getLength();
bytes.realloc( nPos + nRead );
......@@ -169,7 +169,7 @@ void MyApp::Main()
RTL_TEXTENCODING_ASCII_US ) );
Reference< container::XNameContainer > xModel(
importFile( aParam1.getStr(), xContext ) );
OSL_ASSERT( xModel.is() );
assert( xModel.is() );
Reference< awt::XUnoControlDialog > xDlg = UnoControlDialog::create( xContext );
xDlg->setModel( xModel );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment