diff options
author | Chris Sherlock <chris.sherlock79@gmail.com> | 2017-05-07 17:03:35 +1000 |
---|---|---|
committer | Chris Sherlock <chris.sherlock79@gmail.com> | 2017-05-07 17:03:35 +1000 |
commit | 97eb00c75e173d4c8d0b483a7941ad3d2f23783e (patch) | |
tree | 7974a8b9423c56982646366b0859dfb2a1a88d50 /xmlscript | |
parent | d0a99cc2ed76be220f7e868e332ba19f6e48a440 (diff) |
revert OSL_ASSERT changes
Change-Id: I365d140446bd2a62cf8256acbfdd53fe72987380
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, 17 insertions, 11 deletions
diff --git a/xmlscript/source/xml_helper/xml_element.cxx b/xmlscript/source/xml_helper/xml_element.cxx index bd9a3dc12d03..326ba5305124 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 ) { - assert( (size_t)nPos < _attrNames.size() ); + OSL_ASSERT( (size_t)nPos < _attrNames.size() ); return _attrNames[ nPos ]; } OUString XMLElement::getTypeByIndex( sal_Int16 nPos ) { - assert( (size_t)nPos < _attrNames.size() ); + OSL_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 ) { - assert( (size_t)nPos < _attrNames.size() ); + OSL_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 12fbd746b265..99350b79e9b6 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 ) - { assert( _xDialogModel.is() && _xDialogModelFactory.is() && + { OSL_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 ) - { assert( _xControlModel.is() ); } + { OSL_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 c586a1b888d5..756424a96c5e 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 ); - assert( xProps.is() ); + OSL_ASSERT( xProps.is() ); Reference< beans::XPropertyState > xPropState( xProps, UNO_QUERY ); - assert( xPropState.is() ); + OSL_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 5afc801ff108..f5606ffe2d90 100644 --- a/xmlscript/source/xmldlg_imexp/xmldlg_import.cxx +++ b/xmlscript/source/xmldlg_imexp/xmldlg_import.cxx @@ -256,13 +256,19 @@ 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 - assert( false ); + OSL_ASSERT( false ); _hasValue |= 0x40; xProps->setPropertyValue( "VisualEffect", makeAny(_visualEffect) ); diff --git a/xmlscript/test/imexp.cxx b/xmlscript/test/imexp.cxx index 580a22bd294a..6965d4126a51 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 ); - assert( osl_File_E_None == rc ); + OSL_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; - assert( readBytes.getLength() >= nRead ); + OSL_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 ) ); - assert( xModel.is() ); + OSL_ASSERT( xModel.is() ); Reference< awt::XUnoControlDialog > xDlg = UnoControlDialog::create( xContext ); xDlg->setModel( xModel ); |