summaryrefslogtreecommitdiff
path: root/editeng
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2014-12-03 00:18:00 +0100
committerMichael Stahl <mstahl@redhat.com>2014-12-03 13:13:30 +0100
commit2b846d7e847441a1da7f63fe1e8139e743f143be (patch)
tree2bc5c9f67e95a81808b347f284bf44c6c2d0f7bc /editeng
parent7ae2a4d68a79408c0be7d5b6cb349d0aaac38a01 (diff)
editeng: it's like there's a nest of these things
Change-Id: Iceef908e8cc1e7a2849398bd2d9e6e7cb1a9e9c9
Diffstat (limited to 'editeng')
-rw-r--r--editeng/source/editeng/editdbg.cxx17
-rw-r--r--editeng/source/editeng/editdoc.hxx4
-rw-r--r--editeng/source/editeng/impedit3.cxx8
3 files changed, 14 insertions, 15 deletions
diff --git a/editeng/source/editeng/editdbg.cxx b/editeng/source/editeng/editdbg.cxx
index c78a1b64a5c2..4a8c6e5917de 100644
--- a/editeng/source/editeng/editdbg.cxx
+++ b/editeng/source/editeng/editdbg.cxx
@@ -485,21 +485,20 @@ void EditDbg::ShowEditEngineData( EditEngine* pEE, bool bInfoBox )
if ( bInfoBox )
InfoBox(0, OUString( "D:\\DEBUG.LOG !" ) ).Execute();
}
+#endif
-#if OSL_DEBUG_LEVEL > 2
-sal_Bool ParaPortion::DbgCheckTextPortions()
+#if OSL_DEBUG_LEVEL > 0
+bool ParaPortion::DbgCheckTextPortions(ParaPortion const& rPara)
{
// check, if Portion length ok:
sal_uInt16 nXLen = 0;
- for ( sal_uInt16 nPortion = 0; nPortion < aTextPortionList.Count(); nPortion++ )
- nXLen = nXLen + aTextPortionList[nPortion]->GetLen();
- return nXLen == pNode->Len() ? sal_True : sal_False;
+ for (sal_uInt16 nPortion = 0; nPortion < rPara.aTextPortionList.Count(); nPortion++)
+ {
+ nXLen = nXLen + rPara.aTextPortionList[nPortion]->GetLen();
+ }
+ return nXLen == rPara.pNode->Len();
}
-#endif
-
-#endif
-#if OSL_DEBUG_LEVEL > 0
void CheckOrderedList(const CharAttribList::AttribsType& rAttribs, bool bStart)
{
sal_Int32 nPrev = 0;
diff --git a/editeng/source/editeng/editdoc.hxx b/editeng/source/editeng/editdoc.hxx
index 0740757cd121..5e4559ceeee2 100644
--- a/editeng/source/editeng/editdoc.hxx
+++ b/editeng/source/editeng/editdoc.hxx
@@ -647,8 +647,8 @@ public:
short GetInvalidDiff() const { return nInvalidDiff; }
void CorrectValuesBehindLastFormattedLine( sal_Int32 nLastFormattedLine );
-#if OSL_DEBUG_LEVEL > 2
- sal_Bool DbgCheckTextPortions();
+#if OSL_DEBUG_LEVEL > 0
+ static bool DbgCheckTextPortions(ParaPortion const&);
#endif
};
diff --git a/editeng/source/editeng/impedit3.cxx b/editeng/source/editeng/impedit3.cxx
index bcbe8dcb73c0..e4af13171947 100644
--- a/editeng/source/editeng/impedit3.cxx
+++ b/editeng/source/editeng/impedit3.cxx
@@ -2386,8 +2386,8 @@ void ImpEditEngine::CreateTextPortions( ParaPortion* pParaPortion, sal_Int32& rS
}
DBG_ASSERT( pParaPortion->GetTextPortions().Count(), "No Portions?!" );
-#if OSL_DEBUG_LEVEL > 2
- OSL_ENSURE( pParaPortion->DbgCheckTextPortions(), "Portion is broken?" );
+#if OSL_DEBUG_LEVEL > 0
+ OSL_ENSURE( ParaPortion::DbgCheckTextPortions(*pParaPortion), "Portion is broken?" );
#endif
}
@@ -2502,8 +2502,8 @@ void ImpEditEngine::RecalcTextPortion( ParaPortion* pParaPortion, sal_Int32 nSta
}
}
}
-#if OSL_DEBUG_LEVEL > 2
- OSL_ENSURE( pParaPortion->DbgCheckTextPortions(), "Portions are broken?" );
+#if OSL_DEBUG_LEVEL > 0
+ OSL_ENSURE( ParaPortion::DbgCheckTextPortions(*pParaPortion), "Portions are broken?" );
#endif
}