summaryrefslogtreecommitdiff
path: root/vcl/source
diff options
context:
space:
mode:
authorIvo Hinkelmann <ihi@openoffice.org>2008-01-14 12:05:13 +0000
committerIvo Hinkelmann <ihi@openoffice.org>2008-01-14 12:05:13 +0000
commit26b331e95e6dc8aec2f657cc311b1bfb4c146d6c (patch)
tree72a3d0134bc3c9022afc1dfd8ed28fedb30784d2 /vcl/source
parentb2111cded7ea6bd3371a0c72db94d5831d108715 (diff)
INTEGRATION: CWS awtfixes1 (1.86.10); FILE MERGED
2007/11/29 19:03:24 fridrich_strba 1.86.10.4: RESYNC: (1.88-1.90); FILE MERGED 2007/11/01 21:40:58 jcn 1.86.10.3: Issue number: i#80754# Submitted by: jcn Reviewed by: mmeeks Use correct width of spin button calculation. Fixes spinfield with larger font sizes. 2007/08/17 14:45:57 mmeeks 1.86.10.2: RESYNC: (1.86-1.88); FILE MERGED 2007/08/17 13:52:57 mmeeks 1.86.10.1: Issue number: i#80754# Submitted by: mmeeks Start of virtual method for sizing ...
Diffstat (limited to 'vcl/source')
-rw-r--r--vcl/source/control/edit.cxx21
1 files changed, 16 insertions, 5 deletions
diff --git a/vcl/source/control/edit.cxx b/vcl/source/control/edit.cxx
index cb8751b32172..ec93a8844c62 100644
--- a/vcl/source/control/edit.cxx
+++ b/vcl/source/control/edit.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: edit.cxx,v $
*
- * $Revision: 1.90 $
+ * $Revision: 1.91 $
*
- * last change: $Author: hr $ $Date: 2007-09-26 15:06:07 $
+ * last change: $Author: ihi $ $Date: 2008-01-14 13:05:13 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -2734,9 +2734,20 @@ void Edit::SetSubEdit( Edit* pEdit )
Size Edit::CalcMinimumSize() const
{
- Size aSz( GetTextWidth( GetText() ), GetTextHeight() );
- aSz = CalcWindowSize( aSz );
- return aSz;
+ Size aSize ( GetTextWidth( GetText() ), GetTextHeight() );
+ return CalcWindowSize( aSize );
+}
+
+// -----------------------------------------------------------------------
+
+Size Edit::GetOptimalSize(WindowSizeType eType) const
+{
+ switch (eType) {
+ case WINDOWSIZE_MINIMUM:
+ return CalcMinimumSize();
+ default:
+ return Control::GetOptimalSize( eType );
+ }
}
// -----------------------------------------------------------------------