summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xtoolkit/source/awt/animatedimagespeer.cxx6
-rw-r--r--vcl/source/control/throbber.cxx7
2 files changed, 13 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 );
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() );