diff options
author | Pascal Junck <pjunck@openoffice.org> | 2004-10-27 12:24:07 +0000 |
---|---|---|
committer | Pascal Junck <pjunck@openoffice.org> | 2004-10-27 12:24:07 +0000 |
commit | 43ee6d041d85b2eaafe67d25930fe33b97f34ce2 (patch) | |
tree | 45b8c8d2143fb68d16f6d06ef94aad4df286380b /svtools | |
parent | 671b1389a5abbe753b18f1c84cb47491ba51c915 (diff) |
INTEGRATION: CWS dbwizard1 (1.4.116); FILE MERGED
2004/08/16 09:42:14 bc 1.4.116.1: #i20313# modifications for the database setup wizard
Diffstat (limited to 'svtools')
-rw-r--r-- | svtools/source/dialogs/wizdlg.cxx | 78 |
1 files changed, 58 insertions, 20 deletions
diff --git a/svtools/source/dialogs/wizdlg.cxx b/svtools/source/dialogs/wizdlg.cxx index d3b37f83f3bb..9192b6470417 100644 --- a/svtools/source/dialogs/wizdlg.cxx +++ b/svtools/source/dialogs/wizdlg.cxx @@ -2,9 +2,9 @@ * * $RCSfile: wizdlg.cxx,v $ * - * $Revision: 1.4 $ + * $Revision: 1.5 $ * - * last change: $Author: kz $ $Date: 2004-05-19 14:02:06 $ + * last change: $Author: pjunck $ $Date: 2004-10-27 13:24:07 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -104,7 +104,7 @@ struct ImplWizButtonData // ======================================================================= -void WizardDialog::ImplInitData() +void WizardDialog::ImplInitData(sal_Bool _bRoadmapMode, sal_Int16 _nLeftAlignCount) { mpFirstPage = NULL; mpFirstBtn = NULL; @@ -115,6 +115,8 @@ void WizardDialog::ImplInitData() mpViewWindow = NULL; mnCurLevel = 0; meViewAlign = WINDOWALIGN_LEFT; + mbRoadmapMode = _bRoadmapMode; + mnLeftAlignCount = _nLeftAlignCount; } // ----------------------------------------------------------------------- @@ -162,31 +164,50 @@ void WizardDialog::ImplPosCtrls() long nOffY = aDlgSize.Height(); ImplWizButtonData* pBtnData = mpFirstBtn; + int i = 0; while ( pBtnData ) { - Size aBtnSize = pBtnData->mpButton->GetSizePixel(); - long nBtnHeight = aBtnSize.Height(); - if ( nBtnHeight > nMaxHeight ) - nMaxHeight = nBtnHeight; - nBtnWidth += aBtnSize.Width(); - nBtnWidth += pBtnData->mnOffset; + if (i >= mnLeftAlignCount) + { + Size aBtnSize = pBtnData->mpButton->GetSizePixel(); + long nBtnHeight = aBtnSize.Height(); + if ( nBtnHeight > nMaxHeight ) + nMaxHeight = nBtnHeight; + nBtnWidth += aBtnSize.Width(); + nBtnWidth += pBtnData->mnOffset; + } pBtnData = pBtnData->mpNext; + i++; } if ( nMaxHeight ) { long nOffX = aDlgSize.Width()-nBtnWidth-WIZARDDIALOG_BUTTON_DLGOFFSET_X; + long nOffLeftAlignX = LogicalCoordinateToPixel(6); nOffY -= WIZARDDIALOG_BUTTON_OFFSET_Y+nMaxHeight; pBtnData = mpFirstBtn; + int i = 0; while ( pBtnData ) { Size aBtnSize = pBtnData->mpButton->GetSizePixel(); - Point aPos( nOffX, nOffY+((nMaxHeight-aBtnSize.Height())/2) ); - pBtnData->mpButton->SetPosPixel( aPos ); - nOffX += aBtnSize.Width(); - nOffX += pBtnData->mnOffset; + if (i >= mnLeftAlignCount) + { + Point aPos( nOffX, nOffY+((nMaxHeight-aBtnSize.Height())/2) ); + pBtnData->mpButton->SetPosPixel( aPos ); + nOffX += aBtnSize.Width(); + nOffX += pBtnData->mnOffset; + } + else + { + Point aPos( nOffLeftAlignX, nOffY+((nMaxHeight-aBtnSize.Height())/2) ); + pBtnData->mpButton->SetPosPixel( aPos ); + nOffLeftAlignX += aBtnSize.Width(); + nOffLeftAlignX += pBtnData->mnOffset; + } + pBtnData = pBtnData->mpNext; + i++; } nOffY -= WIZARDDIALOG_BUTTON_OFFSET_Y; @@ -216,9 +237,18 @@ void WizardDialog::ImplPosCtrls() } else if ( meViewAlign == WINDOWALIGN_LEFT ) { - nViewOffX = WIZARDDIALOG_VIEW_DLGOFFSET_X; - nViewOffY = WIZARDDIALOG_VIEW_DLGOFFSET_Y; - nViewHeight = nDlgHeight-(WIZARDDIALOG_VIEW_DLGOFFSET_Y*2); + if (mbRoadmapMode) + { + nViewOffX = 0; + nViewOffY = 0; + nViewHeight = nDlgHeight; + } + else + { + nViewOffX = WIZARDDIALOG_VIEW_DLGOFFSET_X; + nViewOffY = WIZARDDIALOG_VIEW_DLGOFFSET_Y; + nViewHeight = nDlgHeight-(WIZARDDIALOG_VIEW_DLGOFFSET_Y*2); + } nViewPosFlags |= WINDOW_POSSIZE_HEIGHT; } else if ( meViewAlign == WINDOWALIGN_BOTTOM ) @@ -241,6 +271,14 @@ void WizardDialog::ImplPosCtrls() } } + +long WizardDialog::LogicalCoordinateToPixel(int iCoordinate){ + Size aLocSize = LogicToPixel(Size( iCoordinate, 0 ), MAP_APPFONT ); + int iPixelCoordinate = aLocSize.Width(); + return iPixelCoordinate; +} + + // ----------------------------------------------------------------------- void WizardDialog::ImplPosTabPage() @@ -343,18 +381,18 @@ TabPage* WizardDialog::ImplGetPage( USHORT nLevel ) const // ======================================================================= -WizardDialog::WizardDialog( Window* pParent, WinBits nStyle ) : +WizardDialog::WizardDialog( Window* pParent, WinBits nStyle, sal_Bool _bRoadmapMode, sal_Int16 _nLeftAlignCount ) : ModalDialog( pParent, nStyle ) { - ImplInitData(); + ImplInitData(_bRoadmapMode, _nLeftAlignCount); } // ----------------------------------------------------------------------- -WizardDialog::WizardDialog( Window* pParent, const ResId& rResId ) : +WizardDialog::WizardDialog( Window* pParent, const ResId& rResId, sal_Bool _bRoadmapMode, sal_Int16 _nLeftAlignCount ) : ModalDialog( pParent, rResId ) { - ImplInitData(); + ImplInitData(_bRoadmapMode, _nLeftAlignCount); } // ----------------------------------------------------------------------- |