diff options
author | Michael Stahl <mstahl@redhat.com> | 2011-11-24 00:52:07 +0100 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2011-11-24 00:52:07 +0100 |
commit | 9ace8bebd88ff41d65eeaa87a6d1f1dfd8875b6d (patch) | |
tree | aa0104d77acfc11fdf73f4705fba205443cf5750 /sw/source/core/doc/acmplwrd.cxx | |
parent | e70c28c4f4f589edf2a74d21648acc212eb80485 (diff) |
sw: enable more debug code:
Whole bunch of code is #if OSL_DEBUG_LEVEL > 1, reduce that to > 0 so more
assertions are active when building --enable-debug or --enable-dbgutil.
Diffstat (limited to 'sw/source/core/doc/acmplwrd.cxx')
-rw-r--r-- | sw/source/core/doc/acmplwrd.cxx | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/sw/source/core/doc/acmplwrd.cxx b/sw/source/core/doc/acmplwrd.cxx index 063aeb6ef103..d08398ab2ba9 100644 --- a/sw/source/core/doc/acmplwrd.cxx +++ b/sw/source/core/doc/acmplwrd.cxx @@ -56,7 +56,7 @@ class SwAutoCompleteClient : public SwClient { SwAutoCompleteWord* pAutoCompleteWord; SwDoc* pDoc; -#if OSL_DEBUG_LEVEL > 1 +#if OSL_DEBUG_LEVEL > 0 static sal_uLong nSwAutoCompleteClientCount; #endif public: @@ -67,7 +67,7 @@ public: SwAutoCompleteClient& operator=(const SwAutoCompleteClient& rClient); const SwDoc& GetDoc(){return *pDoc;} -#if OSL_DEBUG_LEVEL > 1 +#if OSL_DEBUG_LEVEL > 0 static sal_uLong GetElementCount() {return nSwAutoCompleteClientCount;} #endif protected: @@ -91,7 +91,7 @@ typedef const SwDoc* SwDocPtr; typedef std::vector<SwDocPtr> SwDocPtrVector; class SwAutoCompleteString : public String { -#if OSL_DEBUG_LEVEL > 1 +#if OSL_DEBUG_LEVEL > 0 static sal_uLong nSwAutoCompleteStringCount; #endif SwDocPtrVector aSourceDocs; @@ -102,11 +102,11 @@ class SwAutoCompleteString : public String void AddDocument(const SwDoc& rDoc); //returns true if last document reference has been removed sal_Bool RemoveDocument(const SwDoc& rDoc); -#if OSL_DEBUG_LEVEL > 1 +#if OSL_DEBUG_LEVEL > 0 static sal_uLong GetElementCount() {return nSwAutoCompleteStringCount;} #endif }; -#if OSL_DEBUG_LEVEL > 1 +#if OSL_DEBUG_LEVEL > 0 sal_uLong SwAutoCompleteClient::nSwAutoCompleteClientCount = 0; sal_uLong SwAutoCompleteString::nSwAutoCompleteStringCount = 0; #endif @@ -116,7 +116,7 @@ SwAutoCompleteClient::SwAutoCompleteClient(SwAutoCompleteWord& rToTell, SwDoc& r pDoc(&rSwDoc) { pDoc->GetPageDescFromPool(RES_POOLPAGE_STANDARD)->Add(this); -#if OSL_DEBUG_LEVEL > 1 +#if OSL_DEBUG_LEVEL > 0 ++nSwAutoCompleteClientCount; #endif } @@ -127,14 +127,14 @@ SwAutoCompleteClient::SwAutoCompleteClient(const SwAutoCompleteClient& rClient) pDoc(rClient.pDoc) { pDoc->GetPageDescFromPool(RES_POOLPAGE_STANDARD)->Add(this); -#if OSL_DEBUG_LEVEL > 1 +#if OSL_DEBUG_LEVEL > 0 ++nSwAutoCompleteClientCount; #endif } SwAutoCompleteClient::~SwAutoCompleteClient() { -#if OSL_DEBUG_LEVEL > 1 +#if OSL_DEBUG_LEVEL > 0 --nSwAutoCompleteClientCount; #endif } @@ -191,14 +191,14 @@ void SwAutoCompleteWord_Impl::RemoveDocument(const SwDoc& rDoc) SwAutoCompleteString::SwAutoCompleteString(const String& rStr, xub_StrLen nPos, xub_StrLen nLen) : String( rStr, nPos, nLen ) { -#if OSL_DEBUG_LEVEL > 1 +#if OSL_DEBUG_LEVEL > 0 ++nSwAutoCompleteStringCount; #endif } SwAutoCompleteString::~SwAutoCompleteString() { -#if OSL_DEBUG_LEVEL > 1 +#if OSL_DEBUG_LEVEL > 0 --nSwAutoCompleteStringCount; #endif } @@ -247,7 +247,7 @@ SwAutoCompleteWord::~SwAutoCompleteWord() delete pCurrent; } delete pImpl; -#if OSL_DEBUG_LEVEL > 1 +#if OSL_DEBUG_LEVEL > 0 sal_uLong nStrings = SwAutoCompleteString::GetElementCount(); sal_uLong nClients = SwAutoCompleteClient::GetElementCount(); OSL_ENSURE(!nStrings && !nClients, "AutoComplete: clients or string count mismatch"); |