diff options
Diffstat (limited to 'svl')
-rw-r--r-- | svl/source/items/aeitem.cxx | 6 | ||||
-rw-r--r-- | svl/source/items/cenumitm.cxx | 6 | ||||
-rw-r--r-- | svl/source/items/cintitem.cxx | 16 |
3 files changed, 14 insertions, 14 deletions
diff --git a/svl/source/items/aeitem.cxx b/svl/source/items/aeitem.cxx index c4f9f117cf93..6ad2c764b1cd 100644 --- a/svl/source/items/aeitem.cxx +++ b/svl/source/items/aeitem.cxx @@ -93,13 +93,13 @@ sal_uInt16 SfxAllEnumItem::GetValueCount() const OUString SfxAllEnumItem::GetValueTextByPos( sal_uInt16 nPos ) const { - DBG_ASSERT( pValues && nPos < pValues->size(), "enum overflow" ); + assert(pValues && nPos < pValues->size()); return (*pValues)[nPos].aText; } sal_uInt16 SfxAllEnumItem::GetValueByPos( sal_uInt16 nPos ) const { - DBG_ASSERT( pValues && nPos < pValues->size(), "enum overflow" ); + assert(pValues && nPos < pValues->size()); return (*pValues)[nPos].nValue; } @@ -192,7 +192,7 @@ bool SfxAllEnumItem::IsEnabled( sal_uInt16 nValue ) const void SfxAllEnumItem::RemoveValue( sal_uInt16 nValue ) { sal_uInt16 nPos = GetPosByValue(nValue); - DBG_ASSERT( nPos != USHRT_MAX, "removing value not in enum" ); + assert(nPos != USHRT_MAX); pValues->erase( pValues->begin() + nPos ); } diff --git a/svl/source/items/cenumitm.cxx b/svl/source/items/cenumitm.cxx index e31ce2cbbb36..187eb73991e9 100644 --- a/svl/source/items/cenumitm.cxx +++ b/svl/source/items/cenumitm.cxx @@ -65,7 +65,7 @@ bool SfxEnumItemInterface::PutValue(const css::uno::Any& rVal, SetEnumValue(sal_uInt16(nTheValue)); return true; } - OSL_FAIL("SfxEnumItemInterface::PutValue(): Wrong type"); + SAL_WARN("svl.items", "SfxEnumItemInterface::PutValue(): Wrong type"); return false; } @@ -141,7 +141,7 @@ void SfxEnumItem::SetEnumValue(sal_uInt16 const nTheValue) void SfxEnumItem::SetValue(sal_uInt16 const nTheValue) { - DBG_ASSERT(GetRefCount() == 0, "SfxEnumItem::SetValue(): Pooled item"); + assert(GetRefCount() == 0 && "SfxEnumItem::SetValue(): Pooled item"); m_nValue = nTheValue; } @@ -199,7 +199,7 @@ bool SfxBoolItem::PutValue(const css::uno::Any& rVal, sal_uInt8) m_bValue = bTheValue; return true; } - OSL_FAIL("SfxBoolItem::PutValue(): Wrong type"); + SAL_WARN("svl.items", "SfxBoolItem::PutValue(): Wrong type"); return false; } diff --git a/svl/source/items/cintitem.cxx b/svl/source/items/cintitem.cxx index a6c73d0bc48c..bb5aaea88143 100644 --- a/svl/source/items/cintitem.cxx +++ b/svl/source/items/cintitem.cxx @@ -57,7 +57,7 @@ bool CntByteItem::PutValue(const css::uno::Any& rVal, sal_uInt8) return true; } - OSL_FAIL( "CntByteItem::PutValue - Wrong type!" ); + SAL_WARN("svl.items", "CntByteItem::PutValue - Wrong type!"); return false; } @@ -123,12 +123,12 @@ bool CntUInt16Item::PutValue(const css::uno::Any& rVal, sal_uInt8) sal_Int32 nValue = 0; if (rVal >>= nValue) { - DBG_ASSERT( nValue <= USHRT_MAX, "Overflow in UInt16 value!"); - m_nValue = (sal_uInt16)nValue; + SAL_WARN_IF(nValue > USHRT_MAX, "svl.items", "Overflow in UInt16 value!"); + m_nValue = static_cast<sal_uInt16>(nValue); return true; } - OSL_FAIL( "CntUInt16Item::PutValue - Wrong type!" ); + SAL_WARN("svl.items", "CntUInt16Item::PutValue - Wrong type!"); return false; } @@ -194,7 +194,7 @@ bool CntInt32Item::PutValue(const css::uno::Any& rVal, sal_uInt8) return true; } - OSL_FAIL( "CntInt32Item::PutValue - Wrong type!" ); + SAL_WARN("svl.items", "CntInt32Item::PutValue - Wrong type!"); return false; } @@ -248,7 +248,7 @@ bool CntUInt32Item::GetPresentation(SfxItemPresentation, bool CntUInt32Item::QueryValue(css::uno::Any& rVal, sal_uInt8) const { sal_Int32 nValue = m_nValue; - DBG_ASSERT( nValue>=0, "Overflow in UInt32 value!"); + SAL_WARN_IF(nValue < 0, "svl.items", "Overflow in UInt32 value!"); rVal <<= nValue; return true; } @@ -259,12 +259,12 @@ bool CntUInt32Item::PutValue(const css::uno::Any& rVal, sal_uInt8) sal_Int32 nValue = 0; if (rVal >>= nValue) { - DBG_ASSERT( nValue>=0, "Overflow in UInt32 value!"); + SAL_WARN_IF(nValue < 0, "svl.items", "Overflow in UInt32 value!"); m_nValue = nValue; return true; } - OSL_FAIL( "CntUInt32Item::PutValue - Wrong type!" ); + SAL_WARN("svl.items", "CntUInt32Item::PutValue - Wrong type!"); return false; } |