summaryrefslogtreecommitdiff
path: root/svtools
diff options
context:
space:
mode:
authorMalte Timmermann <mt@openoffice.org>2002-08-01 13:09:23 +0000
committerMalte Timmermann <mt@openoffice.org>2002-08-01 13:09:23 +0000
commit265a261f018c6f0255f082d027e274af361be899 (patch)
tree53f0d5d6ca30f813b0517c133624fcd06b97f028 /svtools
parentb506cf401e2577bccf6236e9aaf77496ec721afa (diff)
#101908# GetTextHeight: Format on demand
Diffstat (limited to 'svtools')
-rw-r--r--svtools/source/edit/texteng.cxx13
1 files changed, 9 insertions, 4 deletions
diff --git a/svtools/source/edit/texteng.cxx b/svtools/source/edit/texteng.cxx
index c3951c6b2016..68a8c35f17f8 100644
--- a/svtools/source/edit/texteng.cxx
+++ b/svtools/source/edit/texteng.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: texteng.cxx,v $
*
- * $Revision: 1.13 $
+ * $Revision: 1.14 $
*
- * last change: $Author: mt $ $Date: 2002-07-19 13:28:10 $
+ * last change: $Author: mt $ $Date: 2002-08-01 14:09:23 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -1085,14 +1085,19 @@ USHORT TextEngine::GetCharPos( ULONG nPortion, USHORT nLine, long nXPos, BOOL bS
ULONG TextEngine::GetTextHeight() const
{
DBG_ASSERT( GetUpdateMode(), "Sollte bei Update=FALSE nicht verwendet werden: GetTextHeight" );
- DBG_ASSERT( IsFormatted() || IsFormatting(), "GetTextHeight: Nicht formatiert" );
+
+ if ( !IsFormatted() && !IsFormatting() )
+ ((TextEngine*)this)->FormatDoc();
+
return mnCurTextHeight;
}
ULONG TextEngine::GetTextHeight( ULONG nParagraph ) const
{
DBG_ASSERT( GetUpdateMode(), "Sollte bei Update=FALSE nicht verwendet werden: GetTextHeight" );
- DBG_ASSERT( IsFormatted() || IsFormatting(), "GetTextHeight: Nicht formatiert" );
+
+ if ( !IsFormatted() && !IsFormatting() )
+ ((TextEngine*)this)->FormatDoc();
return CalcParaHeight( nParagraph );
}