diff options
author | Cédric Bosdonnat <cedricbosdo@openoffice.org> | 2010-11-25 17:08:45 +0100 |
---|---|---|
committer | Cédric Bosdonnat <cedricbosdo@openoffice.org> | 2010-11-25 17:12:34 +0100 |
commit | df07d391d83966cf2369ac7fec8d0b88cbe49bcf (patch) | |
tree | dfba6829252f68ebb66a4aeffb04196ff81f6498 /sw/inc/tox.hxx | |
parent | 228904385d4b23962361bbd2753a46256fba1ad9 (diff) |
Removed DBG_UTIL from sw
* Fixed the different dbglevel builds
* This needed to change all the sw local ASSERT to OSL_ENSURE...
Diffstat (limited to 'sw/inc/tox.hxx')
-rw-r--r-- | sw/inc/tox.hxx | 41 |
1 files changed, 21 insertions, 20 deletions
diff --git a/sw/inc/tox.hxx b/sw/inc/tox.hxx index bcdb9759b0..ce31eca223 100644 --- a/sw/inc/tox.hxx +++ b/sw/inc/tox.hxx @@ -32,6 +32,7 @@ #include <i18npool/lang.h> #include <tools/string.hxx> +#include <osl/diagnose.h> #include <editeng/svxenum.hxx> #include <svl/svarray.hxx> @@ -619,73 +620,73 @@ inline void SwTOXMark::SetAlternativeText(const String& rAlt) inline void SwTOXMark::SetLevel( USHORT nLvl ) { - ASSERT( !GetTOXType() || GetTOXType()->GetType() != TOX_INDEX, "Falscher Feldtyp"); + OSL_ENSURE( !GetTOXType() || GetTOXType()->GetType() != TOX_INDEX, "Falscher Feldtyp"); nLevel = nLvl; } inline void SwTOXMark::SetPrimaryKey( const String& rKey ) { - ASSERT(GetTOXType()->GetType() == TOX_INDEX, "Falscher Feldtyp"); + OSL_ENSURE( GetTOXType()->GetType() == TOX_INDEX, "Falscher Feldtyp"); aPrimaryKey = rKey; } inline void SwTOXMark::SetSecondaryKey( const String& rKey ) { - ASSERT(GetTOXType()->GetType() == TOX_INDEX, "Falscher Feldtyp"); + OSL_ENSURE(GetTOXType()->GetType() == TOX_INDEX, "Falscher Feldtyp"); aSecondaryKey = rKey; } inline void SwTOXMark::SetTextReading( const String& rTxt ) { - ASSERT(GetTOXType()->GetType() == TOX_INDEX, "Falscher Feldtyp"); + OSL_ENSURE(GetTOXType()->GetType() == TOX_INDEX, "Falscher Feldtyp"); aTextReading = rTxt; } inline void SwTOXMark::SetPrimaryKeyReading( const String& rKey ) { - ASSERT(GetTOXType()->GetType() == TOX_INDEX, "Falscher Feldtyp"); + OSL_ENSURE(GetTOXType()->GetType() == TOX_INDEX, "Falscher Feldtyp"); aPrimaryKeyReading = rKey; } inline void SwTOXMark::SetSecondaryKeyReading( const String& rKey ) { - ASSERT(GetTOXType()->GetType() == TOX_INDEX, "Falscher Feldtyp"); + OSL_ENSURE(GetTOXType()->GetType() == TOX_INDEX, "Falscher Feldtyp"); aSecondaryKeyReading = rKey; } inline USHORT SwTOXMark::GetLevel() const { - ASSERT( !GetTOXType() || GetTOXType()->GetType() != TOX_INDEX, "Falscher Feldtyp"); + OSL_ENSURE( !GetTOXType() || GetTOXType()->GetType() != TOX_INDEX, "Falscher Feldtyp"); return nLevel; } inline const String& SwTOXMark::GetPrimaryKey() const { - ASSERT(GetTOXType()->GetType() == TOX_INDEX, "Falscher Feldtyp"); + OSL_ENSURE(GetTOXType()->GetType() == TOX_INDEX, "Falscher Feldtyp"); return aPrimaryKey; } inline const String& SwTOXMark::GetSecondaryKey() const { - ASSERT(GetTOXType()->GetType() == TOX_INDEX, "Falscher Feldtyp"); + OSL_ENSURE(GetTOXType()->GetType() == TOX_INDEX, "Falscher Feldtyp"); return aSecondaryKey; } inline const String& SwTOXMark::GetTextReading() const { - ASSERT(GetTOXType()->GetType() == TOX_INDEX, "Falscher Feldtyp"); + OSL_ENSURE(GetTOXType()->GetType() == TOX_INDEX, "Falscher Feldtyp"); return aTextReading; } inline const String& SwTOXMark::GetPrimaryKeyReading() const { - ASSERT(GetTOXType()->GetType() == TOX_INDEX, "Falscher Feldtyp"); + OSL_ENSURE(GetTOXType()->GetType() == TOX_INDEX, "Falscher Feldtyp"); return aPrimaryKeyReading; } inline const String& SwTOXMark::GetSecondaryKeyReading() const { - ASSERT(GetTOXType()->GetType() == TOX_INDEX, "Falscher Feldtyp"); + OSL_ENSURE(GetTOXType()->GetType() == TOX_INDEX, "Falscher Feldtyp"); return aSecondaryKeyReading; } @@ -694,13 +695,13 @@ inline const String& SwTOXMark::GetSecondaryKeyReading() const // inline void SwForm::SetTemplate(USHORT nLevel, const String& rTemplate) { - ASSERT(nLevel < GetFormMax(), "Index >= FORM_MAX"); + OSL_ENSURE(nLevel < GetFormMax(), "Index >= FORM_MAX"); aTemplate[nLevel] = rTemplate; } inline const String& SwForm::GetTemplate(USHORT nLevel) const { - ASSERT(nLevel < GetFormMax(), "Index >= FORM_MAX"); + OSL_ENSURE(nLevel < GetFormMax(), "Index >= FORM_MAX"); return aTemplate[nLevel]; } @@ -758,20 +759,20 @@ inline TOXTypes SwTOXBase::GetType() const inline void SwTOXBase::SetLevel(USHORT nLev) { - ASSERT(GetTOXType()->GetType() != TOX_INDEX, "Falscher Feldtyp"); + OSL_ENSURE(GetTOXType()->GetType() != TOX_INDEX, "Falscher Feldtyp"); aData.nLevel = nLev; } inline USHORT SwTOXBase::GetLevel() const { - ASSERT(GetTOXType()->GetType() != TOX_INDEX, "Falscher Feldtyp"); + OSL_ENSURE(GetTOXType()->GetType() != TOX_INDEX, "Falscher Feldtyp"); return aData.nLevel; } inline void SwTOXBase::SetTemplateName(const String& rName) { -// ASSERT(GetTOXType()->GetType() == TOX_USER, "Falscher Feldtyp"); -// ASSERT(aData.pTemplateName, "pTemplateName == 0"); +// OSL_ENSURE(GetTOXType()->GetType() == TOX_USER, "Falscher Feldtyp"); +// OSL_ENSURE(aData.pTemplateName, "pTemplateName == 0"); // (*aData.pTemplateName) = rName; DBG_WARNING("SwTOXBase::SetTemplateName obsolete"); aStyleNames[0] = rName; @@ -780,13 +781,13 @@ inline void SwTOXBase::SetTemplateName(const String& rName) inline USHORT SwTOXBase::GetOptions() const { - ASSERT(GetTOXType()->GetType() == TOX_INDEX, "Falscher Feldtyp"); + OSL_ENSURE(GetTOXType()->GetType() == TOX_INDEX, "Falscher Feldtyp"); return aData.nOptions; } inline void SwTOXBase::SetOptions(USHORT nOpt) { - ASSERT(GetTOXType()->GetType() == TOX_INDEX, "Falscher Feldtyp"); + OSL_ENSURE(GetTOXType()->GetType() == TOX_INDEX, "Falscher Feldtyp"); aData.nOptions = nOpt; } |