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 /vcl/source/control/throbber.cxx | |
parent | 3dc20e5afd346992dab451a7eeab921cb6e1aef1 (diff) |
dba34b: do not use a throbber image which doesn't fit into the window
Diffstat (limited to 'vcl/source/control/throbber.cxx')
-rw-r--r-- | vcl/source/control/throbber.cxx | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/vcl/source/control/throbber.cxx b/vcl/source/control/throbber.cxx index da2f94dca10e..6ebd02cb5de1 100644 --- a/vcl/source/control/throbber.cxx +++ b/vcl/source/control/throbber.cxx @@ -192,6 +192,13 @@ void Throbber::initImages() { ENSURE_OR_CONTINUE( !check->empty(), "Throbber::initImages: illegal image!" ); const Size aImageSize = (*check)[0].GetSizePixel(); + + if ( ( aImageSize.Width() > aWindowSizePixel.Width() ) + || ( aImageSize.Height() > aWindowSizePixel.Height() ) + ) + // do not use an image set which doesn't fit into the window + continue; + const sal_Int64 distance = ( aWindowSizePixel.Width() - aImageSize.Width() ) * ( aWindowSizePixel.Width() - aImageSize.Width() ) + ( aWindowSizePixel.Height() - aImageSize.Height() ) * ( aWindowSizePixel.Height() - aImageSize.Height() ); |