summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndras Timar <atimar@suse.com>2012-01-09 21:18:38 +0100
committerAndras Timar <atimar@suse.com>2012-01-09 21:18:38 +0100
commit2d6441cfc4248a8c8d9aaa3a9dcd4b608b77b858 (patch)
tree2150d37f6b4ea3d415722a46f87c3c6e17a8be27
parentd4f161ed509071ee01798f3bf2d6333386826089 (diff)
autoresize 'Use ODF format' button, too
-rw-r--r--sfx2/source/dialog/alienwarn.cxx16
1 files changed, 11 insertions, 5 deletions
diff --git a/sfx2/source/dialog/alienwarn.cxx b/sfx2/source/dialog/alienwarn.cxx
index 6acf1075dce4..e913c88ef243 100644
--- a/sfx2/source/dialog/alienwarn.cxx
+++ b/sfx2/source/dialog/alienwarn.cxx
@@ -155,11 +155,6 @@ void SfxAlienWarningDialog::InitSize()
(*pCurrent)->SetPosPixel( aNewPos );
}
- // new size of the dialog
- aNewSize = GetSizePixel();
- aNewSize.Height() -= nDelta;
- SetSizePixel( aNewSize );
-
// recalculate the size and position of the buttons
m_aMoreInfoBtn.Hide();
nTxtW = m_aKeepCurrentBtn.GetCtrlTextWidth( m_aKeepCurrentBtn.GetText() );
@@ -170,6 +165,17 @@ void SfxAlienWarningDialog::InitSize()
Point aPos = m_aSaveODFBtn.GetPosPixel();
aPos.X() = AW_COL_3 + nTxtW;
m_aSaveODFBtn.SetPosPixel( aPos );
+ nTxtW = m_aSaveODFBtn.GetCtrlTextWidth( m_aSaveODFBtn.GetText() );
+ nTxtW += IMPL_EXTRA_BUTTON_WIDTH;
+ aNewSize = m_aSaveODFBtn.GetSizePixel();
+ aNewSize.Width() = nTxtW;
+ m_aSaveODFBtn.SetSizePixel( aNewSize );
+
+ // new size of the dialog
+ aNewSize = GetSizePixel();
+ aNewSize.Height() -= nDelta;
+ SetSizePixel( aNewSize );
+
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */