diff options
author | Frank Schoenheit [fs] <frank.schoenheit@oracle.com> | 2011-01-28 10:22:51 +0100 |
---|---|---|
committer | Frank Schoenheit [fs] <frank.schoenheit@oracle.com> | 2011-01-28 10:22:51 +0100 |
commit | b699625287f8fe517bfd018fd6a7edeacdb9c270 (patch) | |
tree | 50ca1b7b67f7b0772ac710042205c8c6f0af9fec /toolkit/source | |
parent | 3dc20e5afd346992dab451a7eeab921cb6e1aef1 (diff) |
dba34b: do not use a throbber image which doesn't fit into the window
Diffstat (limited to 'toolkit/source')
-rwxr-xr-x | toolkit/source/awt/animatedimagespeer.cxx | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/toolkit/source/awt/animatedimagespeer.cxx b/toolkit/source/awt/animatedimagespeer.cxx index 5e127d399434..c9c640d51c60 100755 --- a/toolkit/source/awt/animatedimagespeer.cxx +++ b/toolkit/source/awt/animatedimagespeer.cxx @@ -234,6 +234,12 @@ namespace toolkit ++check ) { + if ( ( check->Width > aWindowSizePixel.Width() ) + || ( check->Height > aWindowSizePixel.Height() ) + ) + // do not use an image set which doesn't fit into the window + continue; + const sal_Int64 distance = ( aWindowSizePixel.Width() - check->Width ) * ( aWindowSizePixel.Width() - check->Width ) + ( aWindowSizePixel.Height() - check->Height ) * ( aWindowSizePixel.Height() - check->Height ); |