summaryrefslogtreecommitdiffstats
path: root/editeng
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2014-12-02 22:11:29 +0100
committerMichael Stahl <mstahl@redhat.com>2014-12-03 13:13:29 +0100
commit54988348f847f4712d8a168a3baf2a1fc2f3d5ac (patch)
treeb6c5626d38825c14a262207ffeac64a6616e2201 /editeng
parentrulers: Let's hide them by default. (diff)
downloadcore-54988348f847f4712d8a168a3baf2a1fc2f3d5ac.tar.gz
core-54988348f847f4712d8a168a3baf2a1fc2f3d5ac.zip
editeng: activate some more assertions hidden behind dbglevel=3
Change-Id: I46c168946c51f1c8064f5902aa97fb0c5b7a3934
Diffstat (limited to 'editeng')
-rw-r--r--editeng/source/editeng/editdoc.cxx15
-rw-r--r--editeng/source/editeng/editdoc.hxx4
-rw-r--r--editeng/source/editeng/impedit2.cxx4
3 files changed, 12 insertions, 11 deletions
diff --git a/editeng/source/editeng/editdoc.cxx b/editeng/source/editeng/editdoc.cxx
index 15be683b2665..e763cc6597a3 100644
--- a/editeng/source/editeng/editdoc.cxx
+++ b/editeng/source/editeng/editdoc.cxx
@@ -843,15 +843,16 @@ ParaPortion* ParaPortionList::SafeGetObject(sal_Int32 nPos)
return 0 <= nPos && nPos < (sal_Int32)maPortions.size() ? &maPortions[nPos] : NULL;
}
-#if OSL_DEBUG_LEVEL > 2
-void ParaPortionList::DbgCheck( EditDoc& rDoc)
+#if OSL_DEBUG_LEVEL > 0
+void
+ParaPortionList::DbgCheck(ParaPortionList const& rParas, EditDoc const& rDoc)
{
- DBG_ASSERT( Count() == rDoc.Count(), "ParaPortionList::DbgCheck() - Count() unequal!" );
- for ( sal_Int32 i = 0; i < Count(); i++ )
+ DBG_ASSERT( rParas.Count() == rDoc.Count(), "ParaPortionList::DbgCheck() - Count() unequal!" );
+ for (sal_Int32 i = 0; i < rParas.Count(); ++i)
{
- DBG_ASSERT( SafeGetObject(i), "ParaPortionList::DbgCheck() - Null-Pointer in List!" );
- DBG_ASSERT( GetObject(i)->GetNode(), "ParaPortionList::DbgCheck() - Null-Pointer in List(2)!" );
- DBG_ASSERT( GetObject(i)->GetNode() == rDoc.GetObject(i), "ParaPortionList::DbgCheck() - Entries intersect!" );
+ DBG_ASSERT( rParas.SafeGetObject(i), "ParaPortionList::DbgCheck() - Null-Pointer in List!" );
+ DBG_ASSERT( rParas.SafeGetObject(i)->GetNode(), "ParaPortionList::DbgCheck() - Null-Pointer in List(2)!" );
+ DBG_ASSERT( rParas.SafeGetObject(i)->GetNode() == rDoc.GetObject(i), "ParaPortionList::DbgCheck() - Entries intersect!" );
}
}
#endif
diff --git a/editeng/source/editeng/editdoc.hxx b/editeng/source/editeng/editdoc.hxx
index 7cbbd4322a0c..1c5703bcd0dc 100644
--- a/editeng/source/editeng/editdoc.hxx
+++ b/editeng/source/editeng/editdoc.hxx
@@ -680,9 +680,9 @@ public:
void Append(ParaPortion* p);
sal_Int32 Count() const;
-#if OSL_DEBUG_LEVEL > 2
+#if OSL_DEBUG_LEVEL > 0
// temporary:
- void DbgCheck( EditDoc& rDoc );
+ static void DbgCheck(ParaPortionList const&, EditDoc const& rDoc);
#endif
};
diff --git a/editeng/source/editeng/impedit2.cxx b/editeng/source/editeng/impedit2.cxx
index 3f030d1de1dd..cf226c1175b8 100644
--- a/editeng/source/editeng/impedit2.cxx
+++ b/editeng/source/editeng/impedit2.cxx
@@ -2176,8 +2176,8 @@ EditSelection ImpEditEngine::ImpMoveParagraphs( Range aOldPositions, sal_Int32 n
while( aTmpPortionList.Count() > 0 )
aTmpPortionList.Release( aTmpPortionList.Count() - 1 );
-#if OSL_DEBUG_LEVEL > 2
- GetParaPortions().DbgCheck(aEditDoc);
+#if OSL_DEBUG_LEVEL > 0
+ ParaPortionList::DbgCheck(GetParaPortions(), aEditDoc);
#endif
return aSelection;
}