summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJosh Heidenreich <josh.sickmate@gmail.com>2012-02-08 18:48:37 +1030
committerPetr Mladek <pmladek@suse.cz>2012-02-08 15:24:16 +0100
commitcce15c38036c5d7de1405012dc448f3fb3ab3476 (patch)
tree1d1cb12f965b993a8e499823ca7c25a04a2a7ce6
parentcee3e301b4553095b70cf6abff15038b4aae8936 (diff)
Fix fdo#45117 - Alien save dialog buttons run off the edge
Adjusts the width of the dialog to be wider, if required. Signed-off-by: Petr Mladek <pmladek@suse.cz>
-rw-r--r--sfx2/source/dialog/alienwarn.cxx4
1 files changed, 4 insertions, 0 deletions
diff --git a/sfx2/source/dialog/alienwarn.cxx b/sfx2/source/dialog/alienwarn.cxx
index e913c88ef243..3e99575412a2 100644
--- a/sfx2/source/dialog/alienwarn.cxx
+++ b/sfx2/source/dialog/alienwarn.cxx
@@ -174,6 +174,10 @@ void SfxAlienWarningDialog::InitSize()
// new size of the dialog
aNewSize = GetSizePixel();
aNewSize.Height() -= nDelta;
+ if (aPos.X() + nTxtW + IMPL_EXTRA_BUTTON_WIDTH > aNewSize.Width())
+ {
+ aNewSize.Width() = aPos.X() + nTxtW + IMPL_EXTRA_BUTTON_WIDTH;
+ }
SetSizePixel( aNewSize );
}