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 | c16ba8a04fd4599e439e7e039705e41691c43acb (patch) | |
tree | 66a1c67973a674245548e10ff0746d1e473a7703 /sw/inc | |
parent | e9eaf033646695987e218907a565b555b976c5c8 (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')
-rw-r--r-- | sw/inc/SwNumberTree.hxx | 4 | ||||
-rw-r--r-- | sw/inc/calbck.hxx | 2 | ||||
-rw-r--r-- | sw/inc/crsrsh.hxx | 8 | ||||
-rw-r--r-- | sw/inc/dcontact.hxx | 4 | ||||
-rw-r--r-- | sw/inc/doc.hxx | 4 | ||||
-rw-r--r-- | sw/inc/errhdl.hxx | 17 | ||||
-rw-r--r-- | sw/inc/fldbas.hxx | 8 | ||||
-rw-r--r-- | sw/inc/hints.hxx | 6 | ||||
-rw-r--r-- | sw/inc/index.hxx | 10 | ||||
-rw-r--r-- | sw/inc/ndhints.hxx | 2 | ||||
-rw-r--r-- | sw/inc/ndindex.hxx | 2 | ||||
-rw-r--r-- | sw/inc/node.hxx | 4 | ||||
-rw-r--r-- | sw/inc/numrule.hxx | 6 | ||||
-rw-r--r-- | sw/inc/pam.hxx | 6 | ||||
-rw-r--r-- | sw/inc/swrect.hxx | 3 | ||||
-rw-r--r-- | sw/inc/swtable.hxx | 21 | ||||
-rw-r--r-- | sw/inc/tox.hxx | 41 | ||||
-rw-r--r-- | sw/inc/txatbase.hxx | 22 | ||||
-rw-r--r-- | sw/inc/txtatr.hxx | 2 | ||||
-rw-r--r-- | sw/inc/txtfld.hxx | 2 | ||||
-rw-r--r-- | sw/inc/txtftn.hxx | 2 | ||||
-rw-r--r-- | sw/inc/txtinet.hxx | 2 | ||||
-rw-r--r-- | sw/inc/txtrfmrk.hxx | 2 | ||||
-rw-r--r-- | sw/inc/txttxmrk.hxx | 2 | ||||
-rw-r--r-- | sw/inc/viscrs.hxx | 4 |
25 files changed, 90 insertions, 96 deletions
diff --git a/sw/inc/SwNumberTree.hxx b/sw/inc/SwNumberTree.hxx index 78abfd5138fb..e8c0ac0e08d1 100644 --- a/sw/inc/SwNumberTree.hxx +++ b/sw/inc/SwNumberTree.hxx @@ -376,7 +376,7 @@ public: // RTL_TEXTENCODING_ASCII_US), // int nDepth = -1) const; -#ifdef DBG_UTIL +#if OSL_DEBUG_LEVEL > 1 static unsigned long GetInstances(); unsigned long GetSerial(); #endif @@ -485,7 +485,7 @@ protected: */ mutable tSwNumberTreeChildren::iterator mItLastValid; -#ifdef DBG_UTIL +#if OSL_DEBUG_LEVEL > 1 /** Counter for the number of created instances. */ diff --git a/sw/inc/calbck.hxx b/sw/inc/calbck.hxx index 86fded93098b..9ce4a11a2159 100644 --- a/sw/inc/calbck.hxx +++ b/sw/inc/calbck.hxx @@ -198,7 +198,7 @@ private: class SwClientIter { friend SwClient* SwModify::_Remove(SwClient *); // fuer Ptr-Korrektur - friend void SwModify::Add(SwClient *); // nur fuer ASSERT ! + friend void SwModify::Add(SwClient *); // nur fuer OSL_ENSURE(! SwModify const& rRoot; SwClient *pAkt, *pDelNext; diff --git a/sw/inc/crsrsh.hxx b/sw/inc/crsrsh.hxx index 705450446a53..767b32abacd4 100644 --- a/sw/inc/crsrsh.hxx +++ b/sw/inc/crsrsh.hxx @@ -467,13 +467,13 @@ public: */ void Combine(); -#if !defined(DBG_UTIL) +#if OSL_DEBUG_LEVEL > 1 + void SttCrsrMove(); + void EndCrsrMove( const BOOL bIdleEnd = FALSE ); +#else void SttCrsrMove() { ++nCrsrMove; StartAction(); } void EndCrsrMove( const BOOL bIdleEnd = FALSE ) { EndAction( bIdleEnd ); --nCrsrMove; } -#else - void SttCrsrMove(); - void EndCrsrMove( const BOOL bIdleEnd = FALSE ); #endif /* diff --git a/sw/inc/dcontact.hxx b/sw/inc/dcontact.hxx index b49f241a0538..05e2c17bde70 100644 --- a/sw/inc/dcontact.hxx +++ b/sw/inc/dcontact.hxx @@ -182,7 +182,7 @@ public: // about the object (Writer fly frame resp. drawing object) const SwFmtAnchor& GetAnchorFmt() const { - ASSERT( GetFmt(), + OSL_ENSURE( GetFmt(), "<SwContact::GetAnchorFmt()> - no frame format -> crash" ); return GetFmt()->GetAnchor(); @@ -197,7 +197,7 @@ public: const SwPosition& GetCntntAnchor() const { - ASSERT( GetAnchorFmt().GetCntntAnchor(), + OSL_ENSURE( GetAnchorFmt().GetCntntAnchor(), "<SwContact::GetCntntAnchor()> - no content anchor -> crash" ); return *(GetAnchorFmt().GetCntntAnchor()); diff --git a/sw/inc/doc.hxx b/sw/inc/doc.hxx index ebdb3be92dae..750673d532ce 100644 --- a/sw/inc/doc.hxx +++ b/sw/inc/doc.hxx @@ -500,7 +500,7 @@ private: bool mbColumnSelection : 1; // true: this content has bee created by a column selection // (clipboard docs only) -#ifdef DBG_UTIL +#if OSL_DEBUG_LEVEL > 1 bool mbXMLExport : 1; // TRUE: during XML export #endif @@ -1077,7 +1077,7 @@ public: inline void SetOLEPrtNotifyPending( bool bSet = true ); void PrtOLENotify( sal_Bool bAll ); //Alle oder nur Markierte -#ifdef DBG_UTIL +#if OSL_DEBUG_LEVEL > 1 bool InXMLExport() const { return mbXMLExport; } void SetXMLExport( bool bFlag ) { mbXMLExport = bFlag; } #endif diff --git a/sw/inc/errhdl.hxx b/sw/inc/errhdl.hxx index 867c187286f4..20e734966523 100644 --- a/sw/inc/errhdl.hxx +++ b/sw/inc/errhdl.hxx @@ -28,13 +28,13 @@ #ifndef _ERRHDL_HXX #define _ERRHDL_HXX -#ifdef DBG_UTIL +#if OSL_DEBUG_LEVEL > 1 #include <tools/solar.h> #include <sal/types.h> #include "swdllapi.h" -extern BOOL bAssert; // TRUE, wenn eine ASSERT-Box hochkam +extern BOOL bAssert; // TRUE, wenn eine ASSERT Box hochkam // ----------------------------------------------------------------------- @@ -42,15 +42,7 @@ extern BOOL bAssert; // TRUE, wenn eine ASSERT-Box hochkam // wo der Fehler auftrat. // Die Funktion darf nicht direkt benutzt werden! // ----------------------------------------------------------------------- -SW_DLLPUBLIC void AssertFail( const sal_Char*, const sal_Char*, USHORT ); -SW_DLLPUBLIC void AssertFail( USHORT, const sal_Char*, USHORT ); - -#define ASSERT( cond, message ) \ - if( !(cond) ) { \ - const char *_pErrorText = #message; \ - const char *_pFileName = __FILE__; \ - ::AssertFail( _pErrorText, _pFileName, __LINE__ ); \ - } +SW_DLLPUBLIC void AssertFail( USHORT, const sal_Char* ); // ----------------------------------------------------------------------- // Prueft ob die angegebene Bedingung wahr ist, wenn nicht wird eine @@ -59,7 +51,7 @@ SW_DLLPUBLIC void AssertFail( USHORT, const sal_Char*, USHORT ); #define ASSERT_ID( cond, id ) \ if( !(cond) ) { \ const char *_pFileName = __FILE__; \ - ::AssertFail( (USHORT)id, _pFileName, __LINE__ ); \ + ::AssertFail( (USHORT)id, _pFileName ); \ } @@ -68,7 +60,6 @@ SW_DLLPUBLIC void AssertFail( USHORT, const sal_Char*, USHORT ); // ignoriert // ----------------------------------------------------------------------- #else -#define ASSERT( cond, message ) ; #define ASSERT_ID( cond, id ) ; #endif // PRODUCT diff --git a/sw/inc/fldbas.hxx b/sw/inc/fldbas.hxx index 882555a00dad..c3b8c1be4614 100644 --- a/sw/inc/fldbas.hxx +++ b/sw/inc/fldbas.hxx @@ -276,7 +276,7 @@ protected: public: -#ifdef DBG_UTIL +#if OSL_DEBUG_LEVEL > 1 virtual ~SwFieldType(); #endif static const String& GetTypeStr( USHORT nTypeId ); @@ -344,10 +344,10 @@ public: // ResId USHORT Which() const -#ifndef DBG_UTIL - { return pType->Which(); } +#if OSL_DEBUG_LEVEL > 1 + ; // implemented in fldbas.cxx #else - ; // in fldbas.cxx implementiert + { return pType->Which(); } #endif // TYP_ID diff --git a/sw/inc/hints.hxx b/sw/inc/hints.hxx index a1b74979a63b..9381893d4de9 100644 --- a/sw/inc/hints.hxx +++ b/sw/inc/hints.hxx @@ -196,10 +196,10 @@ public: USHORT Count() const { return pChgSet->Count(); } void ClearItem( USHORT nWhichL = 0 ) -#ifndef DBG_UTIL - { pChgSet->ClearItem( nWhichL ); } -#else +#if OSL_DEBUG_LEVEL > 1 ; +#else + { pChgSet->ClearItem( nWhichL ); } #endif }; diff --git a/sw/inc/index.hxx b/sw/inc/index.hxx index b2e0642eb199..8a18d2d09996 100644 --- a/sw/inc/index.hxx +++ b/sw/inc/index.hxx @@ -41,17 +41,17 @@ class SwIndex; class SwIndexReg; struct SwPosition; -#ifndef DBG_UTIL -#define INLINE inline -#else +#if OSL_DEBUG_LEVEL > 1 #define INLINE +#else +#define INLINE inline #endif class SW_DLLPUBLIC SwIndex { friend class SwIndexReg; -#ifdef DBG_UTIL +#if OSL_DEBUG_LEVEL > 1 static int nSerial; int MySerial; #endif @@ -148,7 +148,7 @@ public: void MoveTo( SwIndexReg& rArr ); }; -#ifndef DBG_UTIL +#if !defined(OSL_DEBUG_LEVEL) || OSL_DEBUG_LEVEL < 2 inline xub_StrLen SwIndex::operator++() { diff --git a/sw/inc/ndhints.hxx b/sw/inc/ndhints.hxx index 7d0769c9c2f7..29e8c13bd214 100644 --- a/sw/inc/ndhints.hxx +++ b/sw/inc/ndhints.hxx @@ -113,7 +113,7 @@ public: { return m_HintStarts[nIdx]; } inline USHORT Count() const { return m_HintStarts.Count(); } -#ifdef DBG_UTIL +#if OSL_DEBUG_LEVEL > 1 bool Check() const; #endif }; diff --git a/sw/inc/ndindex.hxx b/sw/inc/ndindex.hxx index 5a5b4867193c..51444abf210c 100644 --- a/sw/inc/ndindex.hxx +++ b/sw/inc/ndindex.hxx @@ -43,7 +43,7 @@ class SW_DLLPUBLIC SwNodeIndex friend void SwNodes::DeRegisterIndex( SwNodeIndex& ); friend void SwNodes::RemoveNode( ULONG, ULONG, BOOL ); -#ifdef DBG_UTIL +#if OSL_DEBUG_LEVEL > 1 static int nSerial; int MySerial; #endif diff --git a/sw/inc/node.hxx b/sw/inc/node.hxx index 2fbad0b0ce12..723c9efbd8a7 100644 --- a/sw/inc/node.hxx +++ b/sw/inc/node.hxx @@ -93,7 +93,7 @@ class SW_DLLPUBLIC SwNode : private /* public*/ BigPtrEntry { friend class SwNodes; -#ifdef DBG_UTIL +#if OSL_DEBUG_LEVEL > 1 static long nSerial; long nMySerial; #endif @@ -118,7 +118,7 @@ protected: public: virtual ~SwNode(); -#ifdef DBG_UTIL +#if OSL_DEBUG_LEVEL > 1 long int GetSerial() const { return nMySerial; } #endif diff --git a/sw/inc/numrule.hxx b/sw/inc/numrule.hxx index 1fe2560cdfaa..90433b0753a1 100644 --- a/sw/inc/numrule.hxx +++ b/sw/inc/numrule.hxx @@ -36,8 +36,8 @@ #include "swdllapi.h" #include <swtypes.hxx> #include <calbck.hxx> -#include <errhdl.hxx> // Fuer die inline-ASSERTs -#include <error.h> // Fuer die inline-ASSERTs +#include <errhdl.hxx> // Fuer die inline ASSERT +#include <error.h> // Fuer die inline ASSERT #include <hints.hxx> #include <hash_map> #include <stringhash.hxx> @@ -114,7 +114,7 @@ public: private: friend void _FinitCore(); -#ifdef DBG_UTIL +#if OSL_DEBUG_LEVEL > 1 long int nSerial; static long int nInstances; #endif diff --git a/sw/inc/pam.hxx b/sw/inc/pam.hxx index 79e3fa0dfdff..68b15fc92521 100644 --- a/sw/inc/pam.hxx +++ b/sw/inc/pam.hxx @@ -190,8 +190,10 @@ public: m_pMark = m_pPoint; } } -#ifndef DBG_UTIL +#if OSL_DEBUG_LEVEL > 1 + void Exchange(); +#else void Exchange() { if (m_pPoint != m_pMark) @@ -201,8 +203,6 @@ public: m_pMark = pTmp; } } -#else - void Exchange(); #endif /** A PaM marks a selection if Point and Mark are distinct positions. diff --git a/sw/inc/swrect.hxx b/sw/inc/swrect.hxx index 82dddd49cecc..e398e4f1baab 100644 --- a/sw/inc/swrect.hxx +++ b/sw/inc/swrect.hxx @@ -28,6 +28,7 @@ #ifndef _SWRECT_HXX #define _SWRECT_HXX #include "errhdl.hxx" +#include <osl/diagnose.h> #include <tools/gen.hxx> class SvStream; @@ -307,7 +308,7 @@ inline SwRect &SwRect::operator-=( const Size &rSz ) //--------------------------- Sonstiges inline Rectangle SwRect::SVRect() const { - ASSERT( !IsEmpty(), "SVRect() without Width or Height" ); + OSL_ENSURE( !IsEmpty(), "SVRect() without Width or Height" ); return Rectangle( m_Point.getX(), m_Point.getY(), m_Point.getX() + m_Size.getWidth() - 1, //Right() m_Point.getY() + m_Size.getHeight() - 1 ); //Bottom() diff --git a/sw/inc/swtable.hxx b/sw/inc/swtable.hxx index 600d5cd3949c..0dad43843d84 100644 --- a/sw/inc/swtable.hxx +++ b/sw/inc/swtable.hxx @@ -34,12 +34,13 @@ #include <swtypes.hxx> #include <calbck.hxx> #include <swrect.hxx> -#ifndef DBG_UTIL -#include <node.hxx> // fuer StartNode->GetMyIndex -#else + +#if OSL_DEBUG_LEVEL > 1 class SwStartNode; #include <memory> #include <boost/noncopyable.hpp> +#else +#include <node.hxx> // fuer StartNode->GetMyIndex #endif class Color; @@ -109,7 +110,7 @@ protected: BOOL bModifyLocked :1; BOOL bNewModel :1; // FALSE: old SubTableModel; TRUE: new RowSpanModel -#ifdef DBG_UTIL +#if OSL_DEBUG_LEVEL > 1 bool bDontChangeModel; // This is set by functions (like Merge()) to forbid a laet model change #endif @@ -208,7 +209,7 @@ public: BOOL Merge( SwDoc* pDoc, const SwSelBoxes& rBoxes, const SwSelBoxes& rMerged, SwTableBox* pMergeBox, SwUndoTblMerge* pUndo = 0 ) { -#ifdef DBG_UTIL +#if OSL_DEBUG_LEVEL > 1 bDontChangeModel = true; #endif return bNewModel ? NewMerge( pDoc, rBoxes, rMerged, pMergeBox, pUndo ) : @@ -217,7 +218,7 @@ public: BOOL SplitRow( SwDoc* pDoc, const SwSelBoxes& rBoxes, USHORT nCnt=1, BOOL bSameHeight = FALSE ) { -#ifdef DBG_UTIL +#if OSL_DEBUG_LEVEL > 1 bDontChangeModel = true; #endif return bNewModel ? NewSplitRow( pDoc, rBoxes, nCnt, bSameHeight ) : @@ -321,7 +322,7 @@ public: SwTwips nAbsDiff, SwTwips nRelDiff, SwUndo** ppUndo ); BOOL SetRowHeight( SwTableBox& rAktBox, USHORT eType, SwTwips nAbsDiff, SwTwips nRelDiff, SwUndo** ppUndo ); -#ifdef DBG_UTIL +#if OSL_DEBUG_LEVEL > 1 void CheckConsistency() const; #endif }; @@ -410,10 +411,10 @@ public: const SwStartNode *GetSttNd() const { return pSttNd; } ULONG GetSttIdx() const -#ifndef DBG_UTIL - { return pSttNd ? pSttNd->GetIndex() : 0; } -#else +#if OSL_DEBUG_LEVEL > 1 ; +#else + { return pSttNd ? pSttNd->GetIndex() : 0; } #endif // suche nach der naechsten/vorherigen Box mit Inhalt diff --git a/sw/inc/tox.hxx b/sw/inc/tox.hxx index 7c8805416c5f..ac4a490fef11 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; } diff --git a/sw/inc/txatbase.hxx b/sw/inc/txatbase.hxx index c5835a377164..53851003620d 100644 --- a/sw/inc/txatbase.hxx +++ b/sw/inc/txatbase.hxx @@ -152,7 +152,7 @@ inline const xub_StrLen* SwTxtAttr::GetAnyEnd() const inline const SfxPoolItem& SwTxtAttr::GetAttr() const { - ASSERT( m_pAttr, "SwTxtAttr: where is my attribute?" ); + OSL_ENSURE( m_pAttr, "SwTxtAttr: where is my attribute?" ); return *m_pAttr; } @@ -174,69 +174,69 @@ inline void SwTxtAttr::SetDontExpand( bool bDontExpand ) inline const SwFmtCharFmt& SwTxtAttr::GetCharFmt() const { - ASSERT( m_pAttr && m_pAttr->Which() == RES_TXTATR_CHARFMT, + OSL_ENSURE( m_pAttr && m_pAttr->Which() == RES_TXTATR_CHARFMT, "Wrong attribute" ); return (const SwFmtCharFmt&)(*m_pAttr); } inline const SwFmtAutoFmt& SwTxtAttr::GetAutoFmt() const { - ASSERT( m_pAttr && m_pAttr->Which() == RES_TXTATR_AUTOFMT, + OSL_ENSURE( m_pAttr && m_pAttr->Which() == RES_TXTATR_AUTOFMT, "Wrong attribute" ); return (const SwFmtAutoFmt&)(*m_pAttr); } inline const SwFmtFld& SwTxtAttr::GetFld() const { - ASSERT( m_pAttr && m_pAttr->Which() == RES_TXTATR_FIELD, + OSL_ENSURE( m_pAttr && m_pAttr->Which() == RES_TXTATR_FIELD, "Wrong attribute" ); return (const SwFmtFld&)(*m_pAttr); } inline const SwFmtFtn& SwTxtAttr::GetFtn() const { - ASSERT( m_pAttr && m_pAttr->Which() == RES_TXTATR_FTN, "Wrong attribute" ); + OSL_ENSURE( m_pAttr && m_pAttr->Which() == RES_TXTATR_FTN, "Wrong attribute" ); return (const SwFmtFtn&)(*m_pAttr); } inline const SwFmtFlyCnt& SwTxtAttr::GetFlyCnt() const { - ASSERT( m_pAttr && m_pAttr->Which() == RES_TXTATR_FLYCNT, + OSL_ENSURE( m_pAttr && m_pAttr->Which() == RES_TXTATR_FLYCNT, "Wrong attribute" ); return (const SwFmtFlyCnt&)(*m_pAttr); } inline const SwTOXMark& SwTxtAttr::GetTOXMark() const { - ASSERT( m_pAttr && m_pAttr->Which() == RES_TXTATR_TOXMARK, + OSL_ENSURE( m_pAttr && m_pAttr->Which() == RES_TXTATR_TOXMARK, "Wrong attribute" ); return (const SwTOXMark&)(*m_pAttr); } inline const SwFmtRefMark& SwTxtAttr::GetRefMark() const { - ASSERT( m_pAttr && m_pAttr->Which() == RES_TXTATR_REFMARK, + OSL_ENSURE( m_pAttr && m_pAttr->Which() == RES_TXTATR_REFMARK, "Wrong attribute" ); return (const SwFmtRefMark&)(*m_pAttr); } inline const SwFmtINetFmt& SwTxtAttr::GetINetFmt() const { - ASSERT( m_pAttr && m_pAttr->Which() == RES_TXTATR_INETFMT, + OSL_ENSURE( m_pAttr && m_pAttr->Which() == RES_TXTATR_INETFMT, "Wrong attribute" ); return (const SwFmtINetFmt&)(*m_pAttr); } inline const SwFmtRuby& SwTxtAttr::GetRuby() const { - ASSERT( m_pAttr && m_pAttr->Which() == RES_TXTATR_CJK_RUBY, + OSL_ENSURE( m_pAttr && m_pAttr->Which() == RES_TXTATR_CJK_RUBY, "Wrong attribute" ); return (const SwFmtRuby&)(*m_pAttr); } inline const SwFmtMeta& SwTxtAttr::GetMeta() const { - ASSERT( m_pAttr && (m_pAttr->Which() == RES_TXTATR_META || + OSL_ENSURE( m_pAttr && (m_pAttr->Which() == RES_TXTATR_META || m_pAttr->Which() == RES_TXTATR_METAFIELD), "Wrong attribute" ); return (const SwFmtMeta&)(*m_pAttr); diff --git a/sw/inc/txtatr.hxx b/sw/inc/txtatr.hxx index 97d24acd49a0..2e14cf50377e 100644 --- a/sw/inc/txtatr.hxx +++ b/sw/inc/txtatr.hxx @@ -112,7 +112,7 @@ public: inline const SwTxtNode& SwTxtRuby::GetTxtNode() const { - ASSERT( m_pTxtNode, "SwTxtRuby: where is my TxtNode?" ); + OSL_ENSURE( m_pTxtNode, "SwTxtRuby: where is my TxtNode?" ); return *m_pTxtNode; } diff --git a/sw/inc/txtfld.hxx b/sw/inc/txtfld.hxx index 1a883de7326e..a155da15b9fa 100644 --- a/sw/inc/txtfld.hxx +++ b/sw/inc/txtfld.hxx @@ -68,7 +68,7 @@ public: inline SwTxtNode& SwTxtFld::GetTxtNode() const { - ASSERT( m_pTxtNode, "SwTxtFld:: where is my TxtNode?" ); + OSL_ENSURE( m_pTxtNode, "SwTxtFld:: where is my TxtNode?" ); return *m_pTxtNode; } diff --git a/sw/inc/txtftn.hxx b/sw/inc/txtftn.hxx index da75ceb3abfe..55eaa777b3c7 100644 --- a/sw/inc/txtftn.hxx +++ b/sw/inc/txtftn.hxx @@ -74,7 +74,7 @@ public: inline const SwTxtNode& SwTxtFtn::GetTxtNode() const { - ASSERT( m_pTxtNode, "SwTxtFtn: where is my TxtNode?" ); + OSL_ENSURE( m_pTxtNode, "SwTxtFtn: where is my TxtNode?" ); return *m_pTxtNode; } diff --git a/sw/inc/txtinet.hxx b/sw/inc/txtinet.hxx index 4b5b34d31da9..48096c4f5cb3 100644 --- a/sw/inc/txtinet.hxx +++ b/sw/inc/txtinet.hxx @@ -74,7 +74,7 @@ public: inline const SwTxtNode& SwTxtINetFmt::GetTxtNode() const { - ASSERT( m_pTxtNode, "SwTxtINetFmt: where is my TxtNode?" ); + OSL_ENSURE( m_pTxtNode, "SwTxtINetFmt: where is my TxtNode?" ); return *m_pTxtNode; } diff --git a/sw/inc/txtrfmrk.hxx b/sw/inc/txtrfmrk.hxx index 0c06db1ff67a..c7507798be87 100644 --- a/sw/inc/txtrfmrk.hxx +++ b/sw/inc/txtrfmrk.hxx @@ -54,7 +54,7 @@ public: inline const SwTxtNode& SwTxtRefMark::GetTxtNode() const { - ASSERT( m_pTxtNode, "SwTxtRefMark: where is my TxtNode?" ); + OSL_ENSURE( m_pTxtNode, "SwTxtRefMark: where is my TxtNode?" ); return *m_pTxtNode; } diff --git a/sw/inc/txttxmrk.hxx b/sw/inc/txttxmrk.hxx index 3cc790002087..e70c28305082 100644 --- a/sw/inc/txttxmrk.hxx +++ b/sw/inc/txttxmrk.hxx @@ -58,7 +58,7 @@ public: inline const SwTxtNode& SwTxtTOXMark::GetTxtNode() const { - ASSERT( m_pTxtNode, "SwTxtTOXMark: where is my TxtNode?" ); + OSL_ENSURE( m_pTxtNode, "SwTxtTOXMark: where is my TxtNode?" ); return *m_pTxtNode; } diff --git a/sw/inc/viscrs.hxx b/sw/inc/viscrs.hxx index 5702e0b516b8..b9fbb6068b04 100644 --- a/sw/inc/viscrs.hxx +++ b/sw/inc/viscrs.hxx @@ -165,7 +165,7 @@ public: // TRUE: an die Position kann der Cursor gesetzt werden virtual BOOL IsAtValidPos( BOOL bPoint = TRUE ) const; -#ifdef DBG_UTIL +#if OSL_DEBUG_LEVEL > 1 // JP 05.03.98: zum Testen des UNO-Crsr Verhaltens hier die Implementierung // am sichtbaren Cursor virtual BOOL IsSelOvr( int eFlags = @@ -209,7 +209,7 @@ public: // TRUE: an die Position kann der Cursor gesetzt werden virtual BOOL IsAtValidPos( BOOL bPoint = TRUE ) const; -#ifdef DBG_UTIL +#if OSL_DEBUG_LEVEL > 1 // JP 05.03.98: zum Testen des UNO-Crsr Verhaltens hier die Implementierung // am sichtbaren Cursor virtual BOOL IsSelOvr( int eFlags = |