summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRĂ¼diger Timm <rt@openoffice.org>2008-08-01 08:00:47 +0000
committerRĂ¼diger Timm <rt@openoffice.org>2008-08-01 08:00:47 +0000
commit98da7cb3d279839f1fde3915bcdc7444835e973c (patch)
tree4a3002ee5c799117d6b1691bd7a2de5222b6c60b
parent3e89afb8d56ea987ff8e044320f7c0301006099b (diff)
INTEGRATION: CWS vcl30stop1 (1.107.32); FILE MERGED
2008/07/21 17:47:07 pl 1.107.32.1: #i91917# fix ImplCalcLines
-rw-r--r--vcl/source/window/toolbox.cxx9
1 files changed, 7 insertions, 2 deletions
diff --git a/vcl/source/window/toolbox.cxx b/vcl/source/window/toolbox.cxx
index 654ff9235a74..1d99af6fc8d0 100644
--- a/vcl/source/window/toolbox.cxx
+++ b/vcl/source/window/toolbox.cxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: toolbox.cxx,v $
- * $Revision: 1.107 $
+ * $Revision: 1.108 $
*
* This file is part of OpenOffice.org.
*
@@ -1034,7 +1034,12 @@ USHORT ToolBox::ImplCalcLines( ToolBox* pThis, long nToolSize )
nToolSize += TB_LINESPACING;
}
- return (USHORT)(nToolSize/nLineHeight);
+ // #i91917# always report at least one line
+ long nLines = nToolSize/nLineHeight;
+ if( nLines < 1 )
+ nLines = 1;
+
+ return static_cast<USHORT>(nLines);
}
// -----------------------------------------------------------------------