summaryrefslogtreecommitdiff
path: root/toolkit
diff options
context:
space:
mode:
authorFrank Schoenheit [fs] <frank.schoenheit@sun.com>2010-06-16 14:30:30 +0200
committerFrank Schoenheit [fs] <frank.schoenheit@sun.com>2010-06-16 14:30:30 +0200
commit873a6fcf3d0322e5b701a7991979856ca688262f (patch)
treee002fba15e6ea4b4da7e83d46c74dc85660eff2b /toolkit
parent1184876fc2d6662101facfc1db7464a0d01e2428 (diff)
fs33a: fixed VCLXFixedText::calcAdjustedSize to respect the given size
Diffstat (limited to 'toolkit')
-rw-r--r--toolkit/source/awt/vclxwindows.cxx13
1 files changed, 6 insertions, 7 deletions
diff --git a/toolkit/source/awt/vclxwindows.cxx b/toolkit/source/awt/vclxwindows.cxx
index e2fc78421d5e..eaff4abf8621 100644
--- a/toolkit/source/awt/vclxwindows.cxx
+++ b/toolkit/source/awt/vclxwindows.cxx
@@ -2865,16 +2865,15 @@ short VCLXFixedText::getAlignment() throw(::com::sun::star::uno::RuntimeExceptio
return getMinimumSize();
}
-::com::sun::star::awt::Size VCLXFixedText::calcAdjustedSize( const ::com::sun::star::awt::Size& rNewSize ) throw(::com::sun::star::uno::RuntimeException)
+::com::sun::star::awt::Size VCLXFixedText::calcAdjustedSize( const ::com::sun::star::awt::Size& rMaxSize ) throw(::com::sun::star::uno::RuntimeException)
{
::vos::OGuard aGuard( GetMutex() );
- ::com::sun::star::awt::Size aSz = rNewSize;
- ::com::sun::star::awt::Size aMinSz = getMinimumSize();
- if ( aSz.Height != aMinSz.Height )
- aSz.Height = aMinSz.Height;
-
- return aSz;
+ Size aAdjustedSize( VCLUnoHelper::ConvertToVCLSize( rMaxSize ) );
+ FixedText* pFixedText = (FixedText*)GetWindow();
+ if ( pFixedText )
+ aAdjustedSize = pFixedText->CalcMinimumSize( rMaxSize.Width );
+ return VCLUnoHelper::ConvertToAWTSize( aAdjustedSize );
}
// ----------------------------------------------------