summaryrefslogtreecommitdiff
path: root/sw/inc
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2011-11-24 00:52:00 +0100
committerMichael Stahl <mstahl@redhat.com>2011-11-24 00:52:00 +0100
commit279a176397623ea83e98fac5a7f4132325b42594 (patch)
treeca21478406b36b744b80a105b3d6570214d98821 /sw/inc
parent0215f8b19451ab67c7fdaf91f2da8298a9b89c47 (diff)
sw: replace abuses of OSL_DEBUG_LEVEL with DBG_UTIL
OSL_DEBUG_LEVEL is set by make debug=t, which should never result in ABI incompatible objects.
Diffstat (limited to 'sw/inc')
-rw-r--r--sw/inc/SwNumberTree.hxx8
-rw-r--r--sw/inc/crsrsh.hxx4
-rw-r--r--sw/inc/dbgoutsw.hxx4
-rw-r--r--sw/inc/doc.hxx6
-rw-r--r--sw/inc/fldbas.hxx2
-rw-r--r--sw/inc/hints.hxx2
-rw-r--r--sw/inc/index.hxx10
-rw-r--r--sw/inc/ndarr.hxx2
-rw-r--r--sw/inc/ndhints.hxx2
-rw-r--r--sw/inc/ndindex.hxx6
-rw-r--r--sw/inc/ndtxt.hxx2
-rw-r--r--sw/inc/node.hxx17
-rw-r--r--sw/inc/numrule.hxx6
-rw-r--r--sw/inc/pam.hxx2
-rw-r--r--sw/inc/swtable.hxx23
-rw-r--r--sw/inc/viewopt.hxx64
-rw-r--r--sw/inc/viscrs.hxx6
17 files changed, 81 insertions, 85 deletions
diff --git a/sw/inc/SwNumberTree.hxx b/sw/inc/SwNumberTree.hxx
index c9a8979aea97..4775f2012ab4 100644
--- a/sw/inc/SwNumberTree.hxx
+++ b/sw/inc/SwNumberTree.hxx
@@ -347,7 +347,7 @@ public:
*/
const SwNumberTreeNode* GetPrecedingNodeOf( const SwNumberTreeNode& rNode ) const;
-#if OSL_DEBUG_LEVEL > 1
+#ifdef DBG_UTIL
static unsigned long GetInstances();
unsigned long GetSerial();
#endif
@@ -450,16 +450,16 @@ protected:
*/
mutable tSwNumberTreeChildren::const_iterator mItLastValid;
-#if OSL_DEBUG_LEVEL > 1
+#ifdef DBG_UTIL
/**
Counter for the number of created instances.
*/
- static unsigned long nInstances;
+ static unsigned long s_nInstances;
/**
Serial number.
*/
- unsigned long mnSerial;
+ unsigned long m_nSerial;
#endif
SwNumberTreeNode(const SwNumberTreeNode& );
diff --git a/sw/inc/crsrsh.hxx b/sw/inc/crsrsh.hxx
index 780e1d8046ff..18f1fde2d97f 100644
--- a/sw/inc/crsrsh.hxx
+++ b/sw/inc/crsrsh.hxx
@@ -111,7 +111,7 @@ struct SwContentAtPos
SW_CONTENT_CHECK = 0x0400,
SW_SMARTTAG = 0x0800,
SW_FORMCTRL = 0x1000
-#if OSL_DEBUG_LEVEL > 1
+#ifdef DBG_UTIL
,SW_CURR_ATTRS = 0x4000 // only for debugging
,SW_TABLEBOXVALUE = 0x8000 // only for debugging
#endif
@@ -451,7 +451,7 @@ public:
*/
void Combine();
-#if OSL_DEBUG_LEVEL > 1
+#ifdef DBG_UTIL
void SttCrsrMove();
void EndCrsrMove( const sal_Bool bIdleEnd = sal_False );
#else
diff --git a/sw/inc/dbgoutsw.hxx b/sw/inc/dbgoutsw.hxx
index 1ec37fdb4355..b090dfe0b52c 100644
--- a/sw/inc/dbgoutsw.hxx
+++ b/sw/inc/dbgoutsw.hxx
@@ -28,7 +28,7 @@
#ifndef __DBGOUTSW_HXX
#define __DBGOUTSW_HXX
-#if OSL_DEBUG_LEVEL > 1
+#ifdef DBG_UTIL
#include <boost/unordered_map.hpp>
#include <tox.hxx>
@@ -124,7 +124,7 @@ const char * dbg_out(const boost::unordered_map<tKey, tMember, fHashFunction> &
}
SW_DLLPUBLIC const char * dbg_out(const SwFormToken & rToken);
SW_DLLPUBLIC const char * dbg_out(const SwFormTokens & rTokens);
-#endif // OSL_DEBUG_LEVEL > 1
+#endif // DBG_UTIL
#endif // __DBGOUTSW_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/doc.hxx b/sw/inc/doc.hxx
index 52991c192d88..7bd5e2dd9abe 100644
--- a/sw/inc/doc.hxx
+++ b/sw/inc/doc.hxx
@@ -471,7 +471,7 @@ private:
bool mbColumnSelection : 1; // TRUE: this content has bee created by a column selection
// (clipboard docs only)
-#if OSL_DEBUG_LEVEL > 1
+#ifdef DBG_UTIL
bool mbXMLExport : 1; // sal_True: during XML export
#endif
@@ -1013,7 +1013,7 @@ public:
inline void SetOLEPrtNotifyPending( bool bSet = true );
void PrtOLENotify( sal_Bool bAll ); //All or only marked
-#if OSL_DEBUG_LEVEL > 1
+#ifdef DBG_UTIL
bool InXMLExport() const { return mbXMLExport; }
void SetXMLExport( bool bFlag ) { mbXMLExport = bFlag; }
#endif
@@ -2036,7 +2036,7 @@ public:
::sw::UndoManager const& GetUndoManager() const;
SfxObjectShell* CreateCopy(bool bCallInitNew) const;
-#if OSL_DEBUG_LEVEL > 0
+#ifdef DBG_UTIL
/**
* Dumps the entire nodes structure to the given destination (file nodes.xml in the current directory by default)
* @since 3.5
diff --git a/sw/inc/fldbas.hxx b/sw/inc/fldbas.hxx
index 843edcf39e49..fb3de9c70412 100644
--- a/sw/inc/fldbas.hxx
+++ b/sw/inc/fldbas.hxx
@@ -316,7 +316,7 @@ public:
// ResId
sal_uInt16 Which() const
-#if OSL_DEBUG_LEVEL > 1
+#ifdef DBG_UTIL
; // implemented in fldbas.cxx
#else
{ return pType->Which(); }
diff --git a/sw/inc/hints.hxx b/sw/inc/hints.hxx
index fb064c19a468..4d07b8039c25 100644
--- a/sw/inc/hints.hxx
+++ b/sw/inc/hints.hxx
@@ -196,7 +196,7 @@ public:
sal_uInt16 Count() const { return pChgSet->Count(); }
void ClearItem( sal_uInt16 nWhichL = 0 )
-#if OSL_DEBUG_LEVEL > 1
+#ifdef DBG_UTIL
;
#else
{ pChgSet->ClearItem( nWhichL ); }
diff --git a/sw/inc/index.hxx b/sw/inc/index.hxx
index 2a3a79231712..5c56fd5cf4ab 100644
--- a/sw/inc/index.hxx
+++ b/sw/inc/index.hxx
@@ -43,7 +43,7 @@ class SwIndex;
class SwIndexReg;
struct SwPosition;
-#if OSL_DEBUG_LEVEL > 1
+#ifdef DBG_UTIL
#define INLINE
#else
#define INLINE inline
@@ -53,9 +53,9 @@ class SW_DLLPUBLIC SwIndex
{
friend class SwIndexReg;
-#if OSL_DEBUG_LEVEL > 1
- static int nSerial;
- int MySerial;
+#ifdef DBG_UTIL
+ static int s_nSerial;
+ int m_nSerial;
#endif
xub_StrLen nIndex;
@@ -142,7 +142,7 @@ public:
// do not know a valid array (SwPaM/SwPosition!):
struct EmptyIndexArray: rtl::Static< SwIndexReg, EmptyIndexArray > {};
-#if !defined(OSL_DEBUG_LEVEL) || OSL_DEBUG_LEVEL < 2
+#ifndef DBG_UTIL
inline xub_StrLen SwIndex::operator++()
{
diff --git a/sw/inc/ndarr.hxx b/sw/inc/ndarr.hxx
index 019ccb6a0f9a..389069b0c2ba 100644
--- a/sw/inc/ndarr.hxx
+++ b/sw/inc/ndarr.hxx
@@ -337,7 +337,7 @@ public:
SwNode * DocumentSectionStartNode(SwNode * pNode) const;
SwNode * DocumentSectionEndNode(SwNode * pNode) const;
-#if OSL_DEBUG_LEVEL > 0
+#ifdef DBG_UTIL
/**
* Dumps the entire nodes structure to the given destination (file nodes.xml in the current directory by default)
* @since 3.5
diff --git a/sw/inc/ndhints.hxx b/sw/inc/ndhints.hxx
index 7a345792f5c5..8496aa015e91 100644
--- a/sw/inc/ndhints.hxx
+++ b/sw/inc/ndhints.hxx
@@ -115,7 +115,7 @@ public:
{ return m_HintStarts[nIdx]; }
inline sal_uInt16 Count() const { return m_HintStarts.Count(); }
-#if OSL_DEBUG_LEVEL > 1
+#ifdef DBG_UTIL
bool Check() const;
#endif
};
diff --git a/sw/inc/ndindex.hxx b/sw/inc/ndindex.hxx
index 15bbfe57f55f..af1028b70607 100644
--- a/sw/inc/ndindex.hxx
+++ b/sw/inc/ndindex.hxx
@@ -44,9 +44,9 @@ class SW_DLLPUBLIC SwNodeIndex
friend void SwNodes::DeRegisterIndex( SwNodeIndex& );
friend void SwNodes::RemoveNode( sal_uLong, sal_uLong, sal_Bool );
-#if OSL_DEBUG_LEVEL > 1
- static int nSerial;
- int MySerial;
+#ifdef DBG_UTIL
+ static int s_nSerial;
+ int m_nSerial;
#endif
SwNode* pNd;
diff --git a/sw/inc/ndtxt.hxx b/sw/inc/ndtxt.hxx
index fc60c194c4ec..381fc85cd129 100644
--- a/sw/inc/ndtxt.hxx
+++ b/sw/inc/ndtxt.hxx
@@ -801,7 +801,7 @@ public:
bool IsCollapse() const;
-#if OSL_DEBUG_LEVEL > 0
+#ifdef DBG_UTIL
virtual void dumpAsXml( xmlTextWriterPtr writer = NULL );
#endif
diff --git a/sw/inc/node.hxx b/sw/inc/node.hxx
index 1ad155504eda..f50e65f3feb9 100644
--- a/sw/inc/node.hxx
+++ b/sw/inc/node.hxx
@@ -88,13 +88,14 @@ class SwOLENodes;
// --------------------
// class SwNode
// --------------------
-class SW_DLLPUBLIC SwNode : private /* public*/ BigPtrEntry
+class SW_DLLPUBLIC SwNode
+ : private BigPtrEntry
{
friend class SwNodes;
-#if OSL_DEBUG_LEVEL > 1
- static long nSerial;
- long nMySerial;
+#ifdef DBG_UTIL
+ static long s_nSerial;
+ long m_nSerial;
#endif
sal_uInt8 nNodeType;
@@ -115,8 +116,8 @@ protected:
public:
virtual ~SwNode();
-#if OSL_DEBUG_LEVEL > 1
- long int GetSerial() const { return nMySerial; }
+#ifdef DBG_UTIL
+ long GetSerial() const { return m_nSerial; }
#endif
sal_uInt16 GetSectionLevel() const;
@@ -296,7 +297,7 @@ public:
sal_uInt8 HasPrevNextLayNode() const;
-#if OSL_DEBUG_LEVEL > 0
+#ifdef DBG_UTIL
/**
* Dumps the node structure to the given destination (file nodes.xml in the current directory by default)
* @since 3.5
@@ -337,7 +338,7 @@ public:
// Call ChkCondcoll to all ContentNodes of section.
void CheckSectionCondColl() const;
-#if OSL_DEBUG_LEVEL > 0
+#ifdef DBG_UTIL
virtual void dumpAsXml( xmlTextWriterPtr writer = NULL );
#endif
diff --git a/sw/inc/numrule.hxx b/sw/inc/numrule.hxx
index 0f7a3b23b796..35cbb4e513a0 100644
--- a/sw/inc/numrule.hxx
+++ b/sw/inc/numrule.hxx
@@ -115,9 +115,9 @@ public:
private:
friend void _FinitCore();
-#if OSL_DEBUG_LEVEL > 1
- long int nSerial;
- static long int nInstances;
+#if DBG_UTIL
+ long int m_nSerial;
+ static long int s_nInstances;
#endif
static SwNumFmt* aBaseFmts [ RULE_END ][ MAXLEVEL ];
diff --git a/sw/inc/pam.hxx b/sw/inc/pam.hxx
index 5be01df54692..456d8ff108d1 100644
--- a/sw/inc/pam.hxx
+++ b/sw/inc/pam.hxx
@@ -226,7 +226,7 @@ public:
m_pMark = m_pPoint;
}
}
-#if OSL_DEBUG_LEVEL > 1
+#ifdef DBG_UTIL
void Exchange();
#else
diff --git a/sw/inc/swtable.hxx b/sw/inc/swtable.hxx
index 4239bf6fcb21..34219d41c206 100644
--- a/sw/inc/swtable.hxx
+++ b/sw/inc/swtable.hxx
@@ -36,14 +36,10 @@
#include <swrect.hxx>
#include <frmfmt.hxx>
-#if OSL_DEBUG_LEVEL > 1
-class SwStartNode;
#include <memory>
#include <boost/noncopyable.hpp>
-#else
-#include <node.hxx> // For StartNode->GetMyIndex.
-#endif
+class SwStartNode;
class SwFmt;
class Color;
class SwTableFmt;
@@ -111,8 +107,9 @@ protected:
sal_Bool bModifyLocked :1;
sal_Bool bNewModel :1; // sal_False: old SubTableModel; sal_True: new RowSpanModel
-#if OSL_DEBUG_LEVEL > 1
- bool bDontChangeModel; // This is set by functions (like Merge()) to forbid a laet model change.
+#ifdef DBG_UTIL
+ /// This is set by functions (like Merge()) to forbid a late model change.
+ bool m_bDontChangeModel;
#endif
sal_Bool IsModifyLocked(){ return bModifyLocked;}
@@ -211,8 +208,8 @@ public:
sal_Bool Merge( SwDoc* pDoc, const SwSelBoxes& rBoxes, const SwSelBoxes& rMerged,
SwTableBox* pMergeBox, SwUndoTblMerge* pUndo = 0 )
{
-#if OSL_DEBUG_LEVEL > 1
- bDontChangeModel = true;
+#ifdef DBG_UTIL
+ m_bDontChangeModel = true;
#endif
return bNewModel ? NewMerge( pDoc, rBoxes, rMerged, pMergeBox, pUndo ) :
OldMerge( pDoc, rBoxes, pMergeBox, pUndo );
@@ -220,8 +217,8 @@ public:
sal_Bool SplitRow( SwDoc* pDoc, const SwSelBoxes& rBoxes, sal_uInt16 nCnt=1,
sal_Bool bSameHeight = sal_False )
{
-#if OSL_DEBUG_LEVEL > 1
- bDontChangeModel = true;
+#ifdef DBG_UTIL
+ m_bDontChangeModel = true;
#endif
return bNewModel ? NewSplitRow( pDoc, rBoxes, nCnt, bSameHeight ) :
OldSplitRow( pDoc, rBoxes, nCnt, bSameHeight );
@@ -326,7 +323,7 @@ public:
sal_Bool SetRowHeight( SwTableBox& rAktBox, sal_uInt16 eType,
SwTwips nAbsDiff, SwTwips nRelDiff, SwUndo** ppUndo );
void RegisterToFormat( SwFmt& rFmt );
-#if OSL_DEBUG_LEVEL > 1
+#ifdef DBG_UTIL
void CheckConsistency() const;
#endif
};
@@ -415,7 +412,7 @@ public:
const SwStartNode *GetSttNd() const { return pSttNd; }
sal_uLong GetSttIdx() const
-#if OSL_DEBUG_LEVEL > 1
+#ifdef DBG_UTIL
;
#else
{ return pSttNd ? pSttNd->GetIndex() : 0; }
diff --git a/sw/inc/viewopt.hxx b/sw/inc/viewopt.hxx
index 27b6d5609507..0c3e15625d36 100644
--- a/sw/inc/viewopt.hxx
+++ b/sw/inc/viewopt.hxx
@@ -170,18 +170,18 @@ protected:
sal_uInt8 nTblDest; // Destination for table background.
-#if OSL_DEBUG_LEVEL > 1
+#ifdef DBG_UTIL
// Corresponds to statements in ui/config/cfgvw.src.
- sal_Bool bTest1 :1; // Test-flag "Layout not loading"
- sal_Bool bTest2 :1; // Test-flag "WYSIWYG++"
- sal_Bool bTest3 :1; // Test-flag ""
- sal_Bool bTest4 :1; // Test-flag "WYSIWYG debug"
- sal_Bool bTest5 :1; // Test-flag "No idle format"
- sal_Bool bTest6 :1; // Test-flag "No screen adj"
- sal_Bool bTest7 :1; // Test-flag "win format"
- sal_Bool bTest8 :1; // Test-flag ""
- static sal_Bool bTest9; // Test-Flag "DrawingLayerNotLoading"
- sal_Bool bTest10 :1; // Test-Flag "Format by Input"
+ bool m_bTest1 :1; // Test-flag "Layout not loading"
+ bool m_bTest2 :1; // Test-flag "WYSIWYG++"
+ bool m_bTest3 :1; // Test-flag ""
+ bool m_bTest4 :1; // Test-flag "WYSIWYG debug"
+ bool m_bTest5 :1; // Test-flag "No idle format"
+ bool m_bTest6 :1; // Test-flag "No screen adj"
+ bool m_bTest7 :1; // Test-flag "win format"
+ bool m_bTest8 :1; // Test-flag ""
+ static bool s_bTest9; // Test-Flag "DrawingLayerNotLoading"
+ bool m_bTest10 :1; // Test-Flag "Format by Input"
#endif
public:
@@ -412,28 +412,28 @@ public:
sal_uInt16 GetViewLayoutColumns() const { return mnViewLayoutColumns; }
void SetViewLayoutColumns( sal_uInt16 nNew ) { mnViewLayoutColumns = nNew; }
-#if OSL_DEBUG_LEVEL > 1
+#ifdef DBG_UTIL
// Correspond to statements in ui/config/cfgvw.src.
- inline sal_Bool IsTest1() const { return bTest1; }
- inline void SetTest1( sal_Bool b ) { bTest1 = b; }
- inline sal_Bool IsTest2() const { return bTest2; }
- inline void SetTest2( sal_Bool b ) { bTest2 = b; }
- inline sal_Bool IsTest3() const { return bTest3; }
- inline void SetTest3( sal_Bool b ) { bTest3 = b; }
- inline sal_Bool IsTest4() const { return bTest4; }
- inline void SetTest4( sal_Bool b ) { bTest4 = b; }
- inline sal_Bool IsTest5() const { return bTest5; }
- inline void SetTest5( sal_Bool b ) { bTest5 = b; }
- inline sal_Bool IsTest6() const { return bTest6; }
- inline void SetTest6( sal_Bool b ) { bTest6 = b; }
- inline sal_Bool IsTest7() const { return bTest7; }
- inline void SetTest7( sal_Bool b ) { bTest7 = b; }
- inline sal_Bool IsTest8() const { return bTest8; }
- inline void SetTest8( sal_Bool b ) { bTest8 = b; }
- static inline sal_Bool IsTest9() { return bTest9; }
- static inline void SetTest9( sal_Bool b ) { bTest9 = b; }
- inline sal_Bool IsTest10() const { return bTest10; }
- inline void SetTest10( sal_Bool b ) { bTest10 = b; }
+ inline bool IsTest1() const { return m_bTest1; }
+ inline void SetTest1( bool b ) { m_bTest1 = b; }
+ inline bool IsTest2() const { return m_bTest2; }
+ inline void SetTest2( bool b ) { m_bTest2 = b; }
+ inline bool IsTest3() const { return m_bTest3; }
+ inline void SetTest3( bool b ) { m_bTest3 = b; }
+ inline bool IsTest4() const { return m_bTest4; }
+ inline void SetTest4( bool b ) { m_bTest4 = b; }
+ inline bool IsTest5() const { return m_bTest5; }
+ inline void SetTest5( bool b ) { m_bTest5 = b; }
+ inline bool IsTest6() const { return m_bTest6; }
+ inline void SetTest6( bool b ) { m_bTest6 = b; }
+ inline bool IsTest7() const { return m_bTest7; }
+ inline void SetTest7( bool b ) { m_bTest7 = b; }
+ inline bool IsTest8() const { return m_bTest8; }
+ inline void SetTest8( bool b ) { m_bTest8 = b; }
+ static inline bool IsTest9() { return s_bTest9; }
+ static inline void SetTest9( bool b ) { s_bTest9 = b; }
+ inline bool IsTest10() const { return m_bTest10; }
+ inline void SetTest10( bool b ) { m_bTest10 = b; }
#endif
inline sal_uInt16 GetZoom() const { return nZoom; }
diff --git a/sw/inc/viscrs.hxx b/sw/inc/viscrs.hxx
index 0a0a913de2c4..bf6c829b3162 100644
--- a/sw/inc/viscrs.hxx
+++ b/sw/inc/viscrs.hxx
@@ -162,8 +162,7 @@ public:
// sal_True: Cursor can be set to this position.
virtual sal_Bool IsAtValidPos( sal_Bool bPoint = sal_True ) const;
-#if OSL_DEBUG_LEVEL > 1
-
+#ifdef DBG_UTIL
// For testing of UNO-Crsr behavior here the implementation at visible cursor.
virtual sal_Bool IsSelOvr( int eFlags =
( nsSwCursorSelOverFlags::SELOVER_CHECKNODESSECTION |
@@ -205,8 +204,7 @@ public:
// sal_True: Cursor can be set to this position.
virtual sal_Bool IsAtValidPos( sal_Bool bPoint = sal_True ) const;
-#if OSL_DEBUG_LEVEL > 1
-
+#ifdef DBG_UTIL
// For testing of UNO-Crsr behavior here the implementation at visible cursor.
virtual sal_Bool IsSelOvr( int eFlags =
( nsSwCursorSelOverFlags::SELOVER_CHECKNODESSECTION |