summaryrefslogtreecommitdiff
path: root/sfx2/source/dialog
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:20:38 +0100
commit2e0ec77cd6bbfe599d63f3a67218c1cf09bb19a6 (patch)
treed727dcc7572c7d19db6d3345f9cc478b3e651b88 /sfx2/source/dialog
parent1a3561d98b5e7edabe03dbad786a0ea2f741db66 (diff)
autoresize 'Use ODF format' button, too
Diffstat (limited to 'sfx2/source/dialog')
-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: */