diff options
author | Philipp Lohmann <pl@openoffice.org> | 2009-03-26 18:54:45 +0000 |
---|---|---|
committer | Philipp Lohmann <pl@openoffice.org> | 2009-03-26 18:54:45 +0000 |
commit | 227c5f207931e2025e85fc751e4b13cc86bb5a98 (patch) | |
tree | 70bb1e19e17f5cb1ad56c43a2c006e9e15962a4a /vcl/source/window/printdlg.cxx | |
parent | a8466c6d9bdc60423ad990199ebe0ec0ab82048f (diff) |
#i92516# sizing issues
Diffstat (limited to 'vcl/source/window/printdlg.cxx')
-rw-r--r-- | vcl/source/window/printdlg.cxx | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/vcl/source/window/printdlg.cxx b/vcl/source/window/printdlg.cxx index 8f247b2a471e..2587d8ea6348 100644 --- a/vcl/source/window/printdlg.cxx +++ b/vcl/source/window/printdlg.cxx @@ -249,11 +249,11 @@ bool PrintDialog::isCollate() void PrintDialog::setupOptionalUI() { Window* pCurParent = 0; - long nCurY = 0, nXPos = 5; + long nCurY = 0, nXPos = 5, nMaxY = 0; USHORT nOptPageId = 9; MapMode aFontMapMode( MAP_APPFONT ); - Size aTabSize = maTabCtrl.GetSizePixel(); + Size aTabSize = maTabCtrl.GetTabPageSizePixel(); const Sequence< PropertyValue >& rOptions( maPListener->getUIOptions() ); for( int i = 0; i < rOptions.getLength(); i++ ) { @@ -319,6 +319,9 @@ void PrintDialog::setupOptionalUI() { if( aCtrlType.equalsAscii( "Group" ) || ! pCurParent ) { + if( nCurY > nMaxY ) + nMaxY = nCurY; + // add new tab page TabPage* pNewGroup = new TabPage( &maTabCtrl ); maControls.push_front( pNewGroup ); @@ -448,7 +451,7 @@ void PrintDialog::setupOptionalUI() if( nEntryWidth > nMaxTextWidth ) nMaxTextWidth = nEntryWidth; } - nMaxTextWidth += 30; + nMaxTextWidth += 50; sal_Int32 nSelectVal = 0; PropertyValue* pVal = maPListener->getValue( aPropertyName ); if( pVal && pVal->Value.hasValue() ) @@ -569,6 +572,18 @@ void PrintDialog::setupOptionalUI() DBG_ERROR( "Unsupported UI option" ); } } + + if( nCurY > nMaxY ) + nMaxY = nCurY; + + // resize dialog if necessary + Size aMaxSize( LogicToPixel( Size( nMaxY, nMaxY ), aFontMapMode ) ); + if( aMaxSize.Height() > aTabSize.Height() ) + { + Size aCurSize( GetSizePixel() ); + aCurSize.Height() += aMaxSize.Height() - aTabSize.Height(); + SetSizePixel( aCurSize ); + } } void PrintDialog::checkControlDependencies() |