diff options
author | Chris Sherlock <chris.sherlock79@gmail.com> | 2017-05-07 08:59:32 +1000 |
---|---|---|
committer | Chris Sherlock <chris.sherlock79@gmail.com> | 2017-05-07 08:59:32 +1000 |
commit | 34ca5a2fb5085bb38a9ab050f60ac0a2283acd03 (patch) | |
tree | fa895dc0ea90dad8506183d6c29753f72c7eb328 /xmlscript | |
parent | 367fa84af9783be40cc05adb154612e38c237172 (diff) |
tdf#43157: convert xmlscript from OSL_ASSERT to assert
Change-Id: I8470851db8f70cbde96ca033ebd5aa515da84510
Diffstat (limited to 'xmlscript')
-rw-r--r-- | xmlscript/source/xml_helper/xml_element.cxx | 6 | ||||
-rw-r--r-- | xmlscript/source/xmldlg_imexp/imp_share.hxx | 4 | ||||
-rw-r--r-- | xmlscript/source/xmldlg_imexp/xmldlg_export.cxx | 4 | ||||
-rw-r--r-- | xmlscript/source/xmldlg_imexp/xmldlg_import.cxx | 8 | ||||
-rw-r--r-- | xmlscript/test/imexp.cxx | 6 |
5 files changed, 11 insertions, 17 deletions
diff --git a/xmlscript/source/xml_helper/xml_element.cxx b/xmlscript/source/xml_helper/xml_element.cxx index 326ba5305124..bd9a3dc12d03 100644 --- a/xmlscript/source/xml_helper/xml_element.cxx +++ b/xmlscript/source/xml_helper/xml_element.cxx @@ -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 ]; } diff --git a/xmlscript/source/xmldlg_imexp/imp_share.hxx b/xmlscript/source/xmldlg_imexp/imp_share.hxx index 99350b79e9b6..12fbd746b265 100644 --- a/xmlscript/source/xmldlg_imexp/imp_share.hxx +++ b/xmlscript/source/xmldlg_imexp/imp_share.hxx @@ -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; } diff --git a/xmlscript/source/xmldlg_imexp/xmldlg_export.cxx b/xmlscript/source/xmldlg_imexp/xmldlg_export.cxx index 756424a96c5e..c586a1b888d5 100644 --- a/xmlscript/source/xmldlg_imexp/xmldlg_export.cxx +++ b/xmlscript/source/xmldlg_imexp/xmldlg_export.cxx @@ -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 ); diff --git a/xmlscript/source/xmldlg_imexp/xmldlg_import.cxx b/xmlscript/source/xmldlg_imexp/xmldlg_import.cxx index f5606ffe2d90..5afc801ff108 100644 --- a/xmlscript/source/xmldlg_imexp/xmldlg_import.cxx +++ b/xmlscript/source/xmldlg_imexp/xmldlg_import.cxx @@ -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) ); diff --git a/xmlscript/test/imexp.cxx b/xmlscript/test/imexp.cxx index 6965d4126a51..580a22bd294a 100644 --- a/xmlscript/test/imexp.cxx +++ b/xmlscript/test/imexp.cxx @@ -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 ); |