From d13251f284797ab9de8164e111931cdee74e3699 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Sat, 17 Aug 2013 13:08:32 +0100 Subject: fix DBG_ASSERT post String->OUString conversion Change-Id: I9ade42e97218449f7fef7d2582fbbe8d1063c2f6 --- vcl/source/edit/texteng.cxx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'vcl') diff --git a/vcl/source/edit/texteng.cxx b/vcl/source/edit/texteng.cxx index 0de2ffd6cae1..cd84e6f06d85 100644 --- a/vcl/source/edit/texteng.cxx +++ b/vcl/source/edit/texteng.cxx @@ -1224,8 +1224,11 @@ sal_uLong TextEngine::CalcTextHeight() sal_uLong TextEngine::CalcTextWidth( sal_uLong nPara, sal_uInt16 nPortionStart, sal_uInt16 nLen, const Font* pFont ) { +#ifdef DBG_UTIL // within the text there must not be a Portion change (attribute/tab)! - DBG_ASSERT( mpDoc->GetNodes().GetObject( nPara )->GetText().indexOf( '\t', nPortionStart ) >= (nPortionStart+nLen), "CalcTextWidth: Tab!" ); + sal_Int32 nTabPos = mpDoc->GetNodes().GetObject( nPara )->GetText().indexOf( '\t', nPortionStart ); + DBG_ASSERT( nTabPos == -1 || nTabPos >= (nPortionStart+nLen), "CalcTextWidth: Tab!" ); +#endif sal_uLong nWidth; if ( mnFixCharWidth100 ) -- cgit