Kaydet (Commit) 97eb00c7 authored tarafından Chris Sherlock's avatar Chris Sherlock

revert OSL_ASSERT changes

Change-Id: I365d140446bd2a62cf8256acbfdd53fe72987380
üst d0a99cc2
......@@ -156,7 +156,7 @@ namespace accessibility
MAP_ENTRY::iterator mi = m_mapEntry.find(pEntry);
if(mi != m_mapEntry.end())
{
assert(mi->second.get() != nullptr);
OSL_ASSERT(mi->second.get() != nullptr);
m_xFocusedChild = mi->second;
}
else
......
......@@ -910,7 +910,7 @@ uno::Reference< ::media::XPlayerWindow > SAL_CALL Player::createPlayerWindow( co
rArguments[ 2 ] >>= pIntPtr;
SystemChildWindow *pParentWindow = reinterpret_cast< SystemChildWindow* >( pIntPtr );
const SystemEnvData* pEnvData = pParentWindow ? pParentWindow->GetSystemData() : nullptr;
assert(pEnvData);
OSL_ASSERT(pEnvData);
if (pEnvData)
{
#if defined(ENABLE_GTKSINK)
......
......@@ -56,7 +56,7 @@ Player::~Player()
QTMovie* Player::getMovie()
{
assert( mpMovie );
OSL_ASSERT( mpMovie );
return mpMovie;
}
......
......@@ -891,7 +891,7 @@ bool implImportDialog( vcl::Window* pWin, const OUString& rCurPath, const Script
{}
}
bool bValidName = !aXmlDlgName.isEmpty();
assert( bValidName );
OSL_ASSERT( bValidName );
if( !bValidName )
return bDone;
......@@ -934,7 +934,7 @@ bool implImportDialog( vcl::Window* pWin, const OUString& rCurPath, const Script
Shell* pShell = GetShell();
if (!pShell)
{
assert(pShell);
OSL_ASSERT(pShell);
return bDone;
}
......
......@@ -737,7 +737,7 @@ namespace basegfx
if( nCurrPolyIdx == -1 )
nCurrPolyIdx=first->getTargetPolygonIndex();
assert(nCurrPolyIdx != -1);
OSL_ASSERT(nCurrPolyIdx != -1);
// second encounter of my rect -> second edge
// encountered, done
......
......@@ -754,7 +754,7 @@ void unoToSbxValue( SbxVariable* pVar, const Any& aValue )
typelib_TypeDescription * pTD = nullptr;
aType.getDescription( &pTD );
assert( pTD && pTD->eTypeClass == typelib_TypeClass_SEQUENCE );
OSL_ASSERT( pTD && pTD->eTypeClass == typelib_TypeClass_SEQUENCE );
Type aElementType( reinterpret_cast<typelib_IndirectTypeDescription *>(pTD)->pType );
::typelib_typedescription_release( pTD );
......@@ -1321,7 +1321,7 @@ Any sbxToUnoValue( const SbxValue* pVar, const Type& rType, Property* pUnoProper
OUString aClassName = xIdlTargetClass->getName();
typelib_TypeDescription * pSeqTD = nullptr;
typelib_typedescription_getByName( &pSeqTD, aClassName.pData );
assert( pSeqTD );
OSL_ASSERT( pSeqTD );
Type aElemType( reinterpret_cast<typelib_IndirectTypeDescription *>(pSeqTD)->pType );
// convert all array member and register them
......@@ -1362,7 +1362,7 @@ Any sbxToUnoValue( const SbxValue* pVar, const Type& rType, Property* pUnoProper
{
OUString aTypeName = aCurType.getTypeName();
typelib_typedescription_getByName( &pSeqTD, aTypeName.pData );
assert( pSeqTD );
OSL_ASSERT( pSeqTD );
if( pSeqTD->eTypeClass == typelib_TypeClass_SEQUENCE )
{
aCurType = Type( reinterpret_cast<typelib_IndirectTypeDescription *>(pSeqTD)->pType );
......@@ -4605,7 +4605,7 @@ bool SbModule::createCOMWrapperForIface( Any& o_rRetAny, SbClassModuleObject* pP
}
while( pParentBasic == nullptr && pCurObject != nullptr );
assert( pParentBasic != nullptr );
OSL_ASSERT( pParentBasic != nullptr );
registerComponentToBeDisposedForBasic( xComponent, pParentBasic );
}
......
......@@ -50,7 +50,7 @@ using namespace css;
Missing support for functions returning structs (see TODO in call()).
Missing support for additional data types (64 bit integers, Any, ...; would
trigger assert(false) in various switches).
trigger OSL_ASSERT(false) in various switches).
It is assumed that the variables passed into SbiDllMgr::Call to represent
the arguments and return value have types that exactly match the Declare
......@@ -143,7 +143,7 @@ template< typename T > void add(
}
std::size_t alignment(SbxVariable * variable) {
assert(variable != nullptr);
OSL_ASSERT(variable != nullptr);
if ((variable->GetType() & SbxARRAY) == 0) {
switch (variable->GetType()) {
case SbxINTEGER:
......@@ -168,7 +168,7 @@ std::size_t alignment(SbxVariable * variable) {
case SbxBYTE:
return 1;
default:
assert(false);
OSL_ASSERT(false);
return 1;
}
} else {
......@@ -190,7 +190,7 @@ SbError marshal(
SbError marshalString(
SbxVariable * variable, bool special, MarshalData & data, void ** buffer)
{
assert(variable != nullptr && buffer != nullptr);
OSL_ASSERT(variable != nullptr && buffer != nullptr);
OString str;
SbError e = convert(variable->GetOUString(), &str);
if (e != ERRCODE_NONE) {
......@@ -207,7 +207,7 @@ SbError marshalStruct(
SbxVariable * variable, std::vector< char > & blob, std::size_t offset,
MarshalData & data)
{
assert(variable != nullptr);
OSL_ASSERT(variable != nullptr);
SbxArray * props = dynamic_cast<SbxObject*>( variable->GetObject() )->
GetProperties();
for (sal_uInt16 i = 0; i < props->Count(); ++i) {
......@@ -223,7 +223,7 @@ SbError marshalArray(
SbxVariable * variable, std::vector< char > & blob, std::size_t offset,
MarshalData & data)
{
assert(variable != nullptr);
OSL_ASSERT(variable != nullptr);
SbxDimArray * arr = dynamic_cast<SbxDimArray*>( variable->GetObject() );
int dims = arr->GetDims();
std::vector< sal_Int32 > low(dims);
......@@ -255,7 +255,7 @@ SbError marshal(
bool outer, SbxVariable * variable, bool special,
std::vector< char > & blob, std::size_t offset, MarshalData & data)
{
assert(variable != nullptr);
OSL_ASSERT(variable != nullptr);
if (!(variable->GetFlags() & SbxFlagBits::Reference)) {
if ((variable->GetType() & SbxARRAY) == 0) {
switch (variable->GetType()) {
......@@ -297,7 +297,7 @@ SbError marshal(
add(blob, variable->GetByte(), outer ? 8 : 1, offset);
break;
default:
assert(false);
OSL_ASSERT(false);
break;
}
} else {
......@@ -344,7 +344,7 @@ SbError marshal(
break;
}
default:
assert(false);
OSL_ASSERT(false);
break;
}
} else {
......@@ -370,7 +370,7 @@ template< typename T > T read(void const ** pointer) {
}
void const * unmarshal(SbxVariable * variable, void const * data) {
assert(variable != nullptr);
OSL_ASSERT(variable != nullptr);
if ((variable->GetType() & SbxARRAY) == 0) {
switch (variable->GetType()) {
case SbxINTEGER:
......@@ -408,7 +408,7 @@ void const * unmarshal(SbxVariable * variable, void const * data) {
variable->PutByte(read< sal_uInt8 >(&data));
break;
default:
assert(false);
OSL_ASSERT(false);
break;
}
} else {
......@@ -596,7 +596,7 @@ SbError call(
result.PutByte(static_cast< sal_uInt8 >(iRetVal));
break;
default:
assert(false);
OSL_ASSERT(false);
break;
}
for (int i = 1; i < (arguments == nullptr ? 0 : arguments->Count()); ++i) {
......@@ -621,7 +621,7 @@ SbError call(
SbError getProcData(HMODULE handle, OUString const & name, ProcData * proc)
{
assert(proc != nullptr);
OSL_ASSERT(proc != nullptr);
if (name.getLength() != 0 && name[0] == '@') { //TODO: "@" vs. "#"???
sal_Int32 n = name.copy(1).toInt32(); //TODO: handle bad input
if (n <= 0 || n > 0xFFFF) {
......
......@@ -51,7 +51,7 @@ using namespace css::uno;
Missing support for functions returning structs (see TODO in call()).
Missing support for additional data types (64 bit integers, Any, ...; would
trigger assert(false) in various switches).
trigger OSL_ASSERT(false) in various switches).
It is assumed that the variables passed into SbiDllMgr::Call to represent
the arguments and return value have types that exactly match the Declare
......@@ -151,7 +151,7 @@ template< typename T > void add(
}
std::size_t alignment(SbxVariable * variable) {
assert(variable != 0);
OSL_ASSERT(variable != 0);
if ((variable->GetType() & SbxARRAY) == 0) {
switch (variable->GetType()) {
case SbxINTEGER:
......@@ -176,7 +176,7 @@ std::size_t alignment(SbxVariable * variable) {
case SbxBYTE:
return 1;
default:
assert(false);
OSL_ASSERT(false);
return 1;
}
} else {
......@@ -198,7 +198,7 @@ SbError marshal(
SbError marshalString(
SbxVariable * variable, bool special, MarshalData & data, void ** buffer)
{
assert(variable != 0 && buffer != 0);
OSL_ASSERT(variable != 0 && buffer != 0);
OString str;
SbError e = convert(variable->GetOUString(), &str);
if (e != ERRCODE_NONE) {
......@@ -216,7 +216,7 @@ SbError marshalStruct(
SbxVariable * variable, std::vector< char > & blob, std::size_t offset,
MarshalData & data)
{
assert(variable != 0);
OSL_ASSERT(variable != 0);
SbxArray * props = dynamic_cast<SbxObject*>( variable->GetObject() )->
GetProperties();
for (sal_uInt16 i = 0; i < props->Count(); ++i) {
......@@ -232,7 +232,7 @@ SbError marshalArray(
SbxVariable * variable, std::vector< char > & blob, std::size_t offset,
MarshalData & data)
{
assert(variable != 0);
OSL_ASSERT(variable != 0);
SbxDimArray * arr = dynamic_cast<SbxDimArray*>( variable->GetObject() );
int dims = arr->GetDims();
std::vector< sal_Int32 > low(dims);
......@@ -264,7 +264,7 @@ SbError marshal(
bool outer, SbxVariable * variable, bool special,
std::vector< char > & blob, std::size_t offset, MarshalData & data)
{
assert(variable != 0);
OSL_ASSERT(variable != 0);
SbxDataType eVarType = variable->GetType();
bool bByVal = !(variable->GetFlags() & SbxFlagBits::Reference);
......@@ -312,7 +312,7 @@ SbError marshal(
add(blob, variable->GetByte(), outer ? 4 : 1, offset);
break;
default:
assert(false);
OSL_ASSERT(false);
break;
}
} else {
......@@ -359,7 +359,7 @@ SbError marshal(
break;
}
default:
assert(false);
OSL_ASSERT(false);
break;
}
} else {
......@@ -385,7 +385,7 @@ template< typename T > T read(void const ** pointer) {
}
void const * unmarshal(SbxVariable * variable, void const * data) {
assert(variable != 0);
OSL_ASSERT(variable != 0);
if ((variable->GetType() & SbxARRAY) == 0) {
switch (variable->GetType()) {
case SbxINTEGER:
......@@ -423,7 +423,7 @@ void const * unmarshal(SbxVariable * variable, void const * data) {
variable->PutByte(read< sal_uInt8 >(&data));
break;
default:
assert(false);
OSL_ASSERT(false);
break;
}
} else {
......@@ -550,7 +550,7 @@ SbError call(
DllMgr_call32(proc.proc, address(stack), stack.size())));
break;
default:
assert(false);
OSL_ASSERT(false);
break;
}
for (sal_uInt16 i = 1; i < (arguments == 0 ? 0 : arguments->Count()); ++i) {
......@@ -575,7 +575,7 @@ SbError call(
SbError getProcData(HMODULE handle, OUString const & name, ProcData * proc)
{
assert(proc != 0);
OSL_ASSERT(proc != 0);
if ( !name.isEmpty() && name[0] == '@' ) { //TODO: "@" vs. "#"???
sal_Int32 n = name.copy(1).toInt32(); //TODO: handle bad input
if (n <= 0 || n > 0xFFFF) {
......
......@@ -206,7 +206,7 @@ void SfxDialogLibraryContainer::storeLibrariesToStorage( const uno::Reference< e
{
// if we cannot get the version then the
// Oasis2OOoTransformer will not be used
assert(false);
OSL_ASSERT(false);
}
}
......
......@@ -663,7 +663,7 @@ namespace cairocanvas
{
int i;
assert( rColors.getLength() == rStops.getLength() );
OSL_ASSERT( rColors.getLength() == rStops.getLength() );
for( i = 0; i < rColors.getLength(); i++ )
{
......
......@@ -193,7 +193,7 @@ namespace oglcanvas
for( sal_Int32 i=0; i<nNumCols; ++i )
*pCurrCol++ = rHelper.getDevice()->getDeviceColorSpace()->convertToARGB(rValues.maColors[i])[0];
assert(nNumCols == rValues.maStops.getLength());
OSL_ASSERT(nNumCols == rValues.maStops.getLength());
switch( rValues.meType )
{
......
......@@ -87,7 +87,7 @@ AccessibleBase::AccessibleBase(
m_bStateSetInitialized( false )
{
// initialize some states
assert(m_xStateSetHelper.is());
OSL_ASSERT( m_xStateSetHelper.is() );
m_xStateSetHelper->AddState( AccessibleStateType::ENABLED );
m_xStateSetHelper->AddState( AccessibleStateType::SHOWING );
m_xStateSetHelper->AddState( AccessibleStateType::VISIBLE );
......@@ -97,7 +97,7 @@ AccessibleBase::AccessibleBase(
AccessibleBase::~AccessibleBase()
{
assert(m_bIsDisposed);
OSL_ASSERT( m_bIsDisposed );
}
bool AccessibleBase::CheckDisposeState( bool bThrowException /* default: true */ ) const
......@@ -177,14 +177,14 @@ bool AccessibleBase::NotifyEvent( EventType eEventType, const AccessibleUniqueId
void AccessibleBase::AddState( sal_Int16 aState )
{
CheckDisposeState();
assert(m_xStateSetHelper.is());
OSL_ASSERT( m_xStateSetHelper.is() );
m_xStateSetHelper->AddState( aState );
}
void AccessibleBase::RemoveState( sal_Int16 aState )
{
CheckDisposeState();
assert(m_xStateSetHelper.is());
OSL_ASSERT( m_xStateSetHelper.is() );
m_xStateSetHelper->RemoveState( aState );
}
......
......@@ -55,7 +55,7 @@ AccessibleChartElement::AccessibleChartElement(
AccessibleChartElement::~AccessibleChartElement()
{
assert(CheckDisposeState(false /* don't throw exceptions */));
OSL_ASSERT( CheckDisposeState( false /* don't throw exceptions */ ) );
}
// ________ protected ________
......
......@@ -65,7 +65,7 @@ AccessibleChartShape::AccessibleChartShape(
AccessibleChartShape::~AccessibleChartShape()
{
assert(CheckDisposeState(false /* don't throw exceptions */));
OSL_ASSERT( CheckDisposeState( false /* don't throw exceptions */ ) );
if ( m_pAccShape.is() )
{
......
......@@ -582,7 +582,7 @@ void ChartDataWrapper::fireChartDataChangeEvent( css::chart::ChartDataChangeEven
return;
uno::Reference< uno::XInterface > xSrc( static_cast< cppu::OWeakObject* >( this ));
assert(xSrc.is());
OSL_ASSERT( xSrc.is());
if( xSrc.is() )
aEvent.Source = xSrc;
......@@ -625,7 +625,7 @@ void ChartDataWrapper::applyData( lcl_Operator& rDataOperator )
bool bPercent = false;
bool bDeep = false;
uno::Reference< css::chart::XChartDocument > xOldDoc( xChartDoc, uno::UNO_QUERY );
assert(xOldDoc.is());
OSL_ASSERT( xOldDoc.is());
uno::Reference< beans::XPropertySet > xDiaProp( xOldDoc->getDiagram(), uno::UNO_QUERY );
if( xDiaProp.is())
{
......@@ -659,7 +659,7 @@ void ChartDataWrapper::applyData( lcl_Operator& rDataOperator )
switchToInternalDataProvider();
rDataOperator.apply(m_xDataAccess);
uno::Reference< chart2::data::XDataProvider > xDataProvider( xChartDoc->getDataProvider() );
assert(xDataProvider.is());
OSL_ASSERT( xDataProvider.is() );
if( !xDataProvider.is() )
return;
uno::Reference< chart2::data::XDataSource > xSource( xDataProvider->createDataSource( aArguments ) );
......
......@@ -273,8 +273,8 @@ Reference< beans::XPropertySet > TitleWrapper::getFirstCharacterPropertySet()
void TitleWrapper::getFastCharacterPropertyValue( sal_Int32 nHandle, Any& rValue )
{
assert( FAST_PROPERTY_ID_START_CHAR_PROP <= nHandle &&
nHandle < CharacterProperties::FAST_PROPERTY_ID_END_CHAR_PROP );
OSL_ASSERT( FAST_PROPERTY_ID_START_CHAR_PROP <= nHandle &&
nHandle < CharacterProperties::FAST_PROPERTY_ID_END_CHAR_PROP );
Reference< beans::XPropertySet > xProp( getFirstCharacterPropertySet(), uno::UNO_QUERY );
Reference< beans::XFastPropertySet > xFastProp( xProp, uno::UNO_QUERY );
......@@ -296,8 +296,8 @@ void TitleWrapper::getFastCharacterPropertyValue( sal_Int32 nHandle, Any& rValue
void TitleWrapper::setFastCharacterPropertyValue(
sal_Int32 nHandle, const Any& rValue )
{
assert( FAST_PROPERTY_ID_START_CHAR_PROP <= nHandle &&
nHandle < CharacterProperties::FAST_PROPERTY_ID_END_CHAR_PROP );
OSL_ASSERT( FAST_PROPERTY_ID_START_CHAR_PROP <= nHandle &&
nHandle < CharacterProperties::FAST_PROPERTY_ID_END_CHAR_PROP );
Reference< chart2::XTitle > xTitle( this->getTitleObject() );
if( xTitle.is())
......
......@@ -636,7 +636,7 @@ void DataBrowser::RenewTable()
OUString DataBrowser::GetColString( sal_Int32 nColumnId ) const
{
assert(m_apDataBrowserModel.get());
OSL_ASSERT( m_apDataBrowserModel.get());
if( nColumnId > 0 )
return OUString( m_apDataBrowserModel->getRoleOfColumn( nColumnId - 1 ));
return OUString();
......@@ -694,7 +694,7 @@ OUString DataBrowser::GetCellText( long nRow, sal_uInt16 nColumnId ) const
}
else
{
assert(m_apDataBrowserModel->getCellType( nColIndex ) == DataBrowserModel::TEXT);
OSL_ASSERT( m_apDataBrowserModel->getCellType( nColIndex ) == DataBrowserModel::TEXT );
aResult = m_apDataBrowserModel->getCellText( nColIndex, nRow );
}
}
......
......@@ -279,7 +279,7 @@ private:
void DataBrowserModel::insertDataSeries( sal_Int32 nAfterColumnIndex )
{
assert(m_apDialogModel.get());
OSL_ASSERT( m_apDialogModel.get());
Reference< chart2::XInternalDataProvider > xDataProvider(
m_apDialogModel->getDataProvider(), uno::UNO_QUERY );
......@@ -400,7 +400,7 @@ void DataBrowserModel::insertComplexCategoryLevel( sal_Int32 nAfterColumnIndex )
{
//create a new text column for complex categories
assert(m_apDialogModel.get());
OSL_ASSERT( m_apDialogModel.get());
Reference< chart2::XInternalDataProvider > xDataProvider( m_apDialogModel->getDataProvider(), uno::UNO_QUERY );