summaryrefslogtreecommitdiff
path: root/sw/inc
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@suse.cz>2010-11-25 18:50:04 +0100
committerJan Holesovsky <kendy@suse.cz>2010-11-25 18:50:04 +0100
commit1a6bf8c433b128606af043a01a1366eab00b3d68 (patch)
tree446ad553d122fad153e3a28a52770dd7bd671e82 /sw/inc
parent2b20a3ef7a0b2ff030945d679b897c2062d7e0ff (diff)
parentc16ba8a04fd4599e439e7e039705e41691c43acb (diff)
Merge remote branch 'origin/libreoffice-3-3'
Conflicts: sw/inc/SwNumberTree.hxx sw/inc/calbck.hxx sw/inc/tox.hxx sw/inc/viscrs.hxx sw/source/core/doc/docnum.cxx sw/source/core/docnode/finalthreadmanager.cxx sw/source/core/docnode/ndnum.cxx sw/source/core/docnode/ndtbl.cxx sw/source/core/draw/dcontact.cxx sw/source/core/edit/edlingu.cxx sw/source/core/edit/ednumber.cxx sw/source/core/except/errhdl.cxx sw/source/core/fields/chpfld.cxx sw/source/core/fields/fldbas.cxx sw/source/core/frmedt/fetab.cxx sw/source/core/layout/flycnt.cxx sw/source/core/layout/makefile.mk sw/source/core/layout/pagechg.cxx sw/source/core/layout/tabfrm.cxx sw/source/core/ole/ndole.cxx sw/source/core/text/makefile.mk sw/source/core/txtnode/txtedt.cxx sw/source/filter/basflt/fltini.cxx sw/source/filter/html/swhtml.cxx sw/source/filter/ww1/fltshell.cxx sw/source/filter/ww1/w1sprm.cxx sw/source/filter/ww8/wrtw8nds.cxx sw/source/filter/ww8/wrtw8num.cxx sw/source/filter/ww8/ww8par3.cxx sw/source/filter/ww8/ww8par5.cxx sw/source/filter/ww8/ww8par6.cxx sw/source/filter/xml/xmltble.cxx sw/source/filter/xml/xmltbli.cxx sw/source/ui/dbui/dbinsdlg.cxx sw/source/ui/dbui/mmoutputpage.cxx sw/source/ui/dialog/swdlgfact.cxx sw/source/ui/docvw/edtwin.cxx sw/source/ui/docvw/srcedtw.cxx
Diffstat (limited to 'sw/inc')
-rw-r--r--sw/inc/SwNumberTree.hxx4
-rw-r--r--sw/inc/calbck.hxx2
-rw-r--r--sw/inc/crsrsh.hxx8
-rw-r--r--sw/inc/dcontact.hxx4
-rw-r--r--sw/inc/doc.hxx4
-rw-r--r--sw/inc/errhdl.hxx17
-rw-r--r--sw/inc/fldbas.hxx8
-rw-r--r--sw/inc/hints.hxx6
-rw-r--r--sw/inc/index.hxx10
-rw-r--r--sw/inc/ndhints.hxx2
-rw-r--r--sw/inc/ndindex.hxx2
-rw-r--r--sw/inc/node.hxx4
-rw-r--r--sw/inc/numrule.hxx6
-rw-r--r--sw/inc/pam.hxx6
-rw-r--r--sw/inc/swrect.hxx3
-rw-r--r--sw/inc/swtable.hxx21
-rw-r--r--sw/inc/tox.hxx38
-rw-r--r--sw/inc/txatbase.hxx22
-rw-r--r--sw/inc/txtatr.hxx2
-rw-r--r--sw/inc/txtfld.hxx2
-rw-r--r--sw/inc/txtftn.hxx2
-rw-r--r--sw/inc/txtinet.hxx2
-rw-r--r--sw/inc/txtrfmrk.hxx2
-rw-r--r--sw/inc/txttxmrk.hxx2
-rw-r--r--sw/inc/viscrs.hxx12
25 files changed, 92 insertions, 99 deletions
diff --git a/sw/inc/SwNumberTree.hxx b/sw/inc/SwNumberTree.hxx
index 8451f2222fa0..c31404136071 100644
--- a/sw/inc/SwNumberTree.hxx
+++ b/sw/inc/SwNumberTree.hxx
@@ -347,7 +347,7 @@ public:
*/
const SwNumberTreeNode* GetPrecedingNodeOf( const SwNumberTreeNode& rNode ) const;
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
static unsigned long GetInstances();
unsigned long GetSerial();
#endif
@@ -450,7 +450,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 7be6ce4fc889..8708f923fcb6 100644
--- a/sw/inc/calbck.hxx
+++ b/sw/inc/calbck.hxx
@@ -195,7 +195,7 @@ private:
class SwClientIter
{
friend SwClient* SwModify::_Remove(SwClient *); // for ptr correction
- friend void SwModify::Add(SwClient *); // only for ASSERT !
+ friend void SwModify::Add(SwClient *); // only for OSL_ENSURE !
SwModify const& rRoot;
SwClient *pAkt, *pDelNext;
diff --git a/sw/inc/crsrsh.hxx b/sw/inc/crsrsh.hxx
index 7f6168005142..d4f1c6a10880 100644
--- a/sw/inc/crsrsh.hxx
+++ b/sw/inc/crsrsh.hxx
@@ -442,13 +442,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 3bf48f9950e3..0af79aba1a53 100644
--- a/sw/inc/dcontact.hxx
+++ b/sw/inc/dcontact.hxx
@@ -162,7 +162,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();
@@ -177,7 +177,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 0b999bcfa86d..5160ab395318 100644
--- a/sw/inc/doc.hxx
+++ b/sw/inc/doc.hxx
@@ -489,7 +489,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
@@ -1049,7 +1049,7 @@ public:
inline void SetOLEPrtNotifyPending( bool bSet = true );
void PrtOLENotify( sal_Bool bAll ); //All or only marked
-#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 d755a13b672f..fd58b89a98a3 100644
--- a/sw/inc/fldbas.hxx
+++ b/sw/inc/fldbas.hxx
@@ -274,7 +274,7 @@ protected:
public:
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
virtual ~SwFieldType();
#endif
static const String& GetTypeStr( USHORT nTypeId );
@@ -342,10 +342,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 f6bb451549d1..cc0300793f61 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 39b5ed6990a8..5ec02976bfe0 100644
--- a/sw/inc/node.hxx
+++ b/sw/inc/node.hxx
@@ -91,7 +91,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
@@ -115,7 +115,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 f2fb02ad850a..21fc2abf5a63 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>
@@ -107,7 +107,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 b9ff1d7665a0..8d04419ed2ef 100644
--- a/sw/inc/pam.hxx
+++ b/sw/inc/pam.hxx
@@ -189,8 +189,10 @@ public:
m_pMark = m_pPoint;
}
}
-#ifndef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
+ void Exchange();
+#else
void Exchange()
{
if (m_pPoint != m_pMark)
@@ -200,8 +202,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 186af3878cbf..325c0cdd940b 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;
@@ -303,7 +304,7 @@ inline SwRect &SwRect::operator-=( const Size &rSz )
// other
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 fd73bdbb7d55..d6581a60d56b 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 ) :
@@ -319,7 +320,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
};
@@ -408,10 +409,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 4206fcae582a..4d286ace6949 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>
@@ -605,73 +606,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;
}
@@ -680,13 +681,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];
}
@@ -744,13 +745,13 @@ 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;
}
@@ -758,18 +759,17 @@ inline void SwTOXBase::SetTemplateName(const String& rName)
{
DBG_WARNING("SwTOXBase::SetTemplateName obsolete");
aStyleNames[0] = 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 f955c364e1cb..f5748117bf93 100644
--- a/sw/inc/txtfld.hxx
+++ b/sw/inc/txtfld.hxx
@@ -66,7 +66,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 1e6a2a66f905..07f082e0c8c3 100644
--- a/sw/inc/viscrs.hxx
+++ b/sw/inc/viscrs.hxx
@@ -162,9 +162,9 @@ public:
// TRUE: an die Position kann der Cursor gesetzt werden
virtual BOOL IsAtValidPos( BOOL bPoint = TRUE ) const;
-#ifdef DBG_UTIL
-// zum Testen des UNO-Crsr Verhaltens hier die Implementierung
-// am sichtbaren Cursor
+#if OSL_DEBUG_LEVEL > 1
+ // zum Testen des UNO-Crsr Verhaltens hier die Implementierung
+ // am sichtbaren Cursor
virtual BOOL IsSelOvr( int eFlags =
( nsSwCursorSelOverFlags::SELOVER_CHECKNODESSECTION |
nsSwCursorSelOverFlags::SELOVER_TOGGLE |
@@ -206,9 +206,9 @@ public:
// TRUE: an die Position kann der Cursor gesetzt werden
virtual BOOL IsAtValidPos( BOOL bPoint = TRUE ) const;
-#ifdef DBG_UTIL
-// zum Testen des UNO-Crsr Verhaltens hier die Implementierung
-// am sichtbaren Cursor
+#if OSL_DEBUG_LEVEL > 1
+ // zum Testen des UNO-Crsr Verhaltens hier die Implementierung
+ // am sichtbaren Cursor
virtual BOOL IsSelOvr( int eFlags =
( nsSwCursorSelOverFlags::SELOVER_CHECKNODESSECTION |
nsSwCursorSelOverFlags::SELOVER_TOGGLE |