diff options
author | Noel Grandin <noel@peralex.com> | 2015-07-23 13:19:40 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-07-24 09:52:08 +0200 |
commit | 9e28cc8ca79b5c42955867a62e89faf8facc5e80 (patch) | |
tree | d882dd9776f44748debac32c65b80194387cffe5 /svtools/source/dialogs/wizdlg.cxx | |
parent | dc7fc2074dd81f0960e6c112ead1cfe5bfd1bf4c (diff) |
convert WindowAlign to scoped enum
Change-Id: I028d108b3a83bd5541d873c4d03b87339cd3be52
Diffstat (limited to 'svtools/source/dialogs/wizdlg.cxx')
-rw-r--r-- | svtools/source/dialogs/wizdlg.cxx | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/svtools/source/dialogs/wizdlg.cxx b/svtools/source/dialogs/wizdlg.cxx index 39d63906d5c5..b35b901e462a 100644 --- a/svtools/source/dialogs/wizdlg.cxx +++ b/svtools/source/dialogs/wizdlg.cxx @@ -57,7 +57,7 @@ void WizardDialog::ImplInitData() mpNextBtn = NULL; mpViewWindow = NULL; mnCurLevel = 0; - meViewAlign = WINDOWALIGN_LEFT; + meViewAlign = WindowAlign::Left; mbEmptyViewMargin = false; mnLeftAlignCount = 0; @@ -100,13 +100,13 @@ void WizardDialog::ImplCalcSize( Size& rSize ) if ( mpViewWindow && mpViewWindow->IsVisible() ) { Size aViewSize = mpViewWindow->GetSizePixel(); - if ( meViewAlign == WINDOWALIGN_TOP ) + if ( meViewAlign == WindowAlign::Top ) rSize.Height() += aViewSize.Height(); - else if ( meViewAlign == WINDOWALIGN_LEFT ) + else if ( meViewAlign == WindowAlign::Left ) rSize.Width() += aViewSize.Width(); - else if ( meViewAlign == WINDOWALIGN_BOTTOM ) + else if ( meViewAlign == WindowAlign::Bottom ) rSize.Height() += aViewSize.Height(); - else if ( meViewAlign == WINDOWALIGN_RIGHT ) + else if ( meViewAlign == WindowAlign::Right ) rSize.Width() += aViewSize.Width(); } } @@ -196,14 +196,14 @@ void WizardDialog::ImplPosCtrls() long nViewHeight = 0; long nDlgHeight = nOffY; PosSizeFlags nViewPosFlags = PosSizeFlags::Pos; - if ( meViewAlign == WINDOWALIGN_TOP ) + if ( meViewAlign == WindowAlign::Top ) { nViewOffX = WIZARDDIALOG_VIEW_DLGOFFSET_X; nViewOffY = WIZARDDIALOG_VIEW_DLGOFFSET_Y; nViewWidth = aDlgSize.Width()-(WIZARDDIALOG_VIEW_DLGOFFSET_X*2); nViewPosFlags |= PosSizeFlags::Width; } - else if ( meViewAlign == WINDOWALIGN_LEFT ) + else if ( meViewAlign == WindowAlign::Left ) { if ( mbEmptyViewMargin ) { @@ -219,14 +219,14 @@ void WizardDialog::ImplPosCtrls() } nViewPosFlags |= PosSizeFlags::Height; } - else if ( meViewAlign == WINDOWALIGN_BOTTOM ) + else if ( meViewAlign == WindowAlign::Bottom ) { nViewOffX = WIZARDDIALOG_VIEW_DLGOFFSET_X; nViewOffY = nDlgHeight-mpViewWindow->GetSizePixel().Height()-WIZARDDIALOG_VIEW_DLGOFFSET_Y; nViewWidth = aDlgSize.Width()-(WIZARDDIALOG_VIEW_DLGOFFSET_X*2); nViewPosFlags |= PosSizeFlags::Width; } - else if ( meViewAlign == WINDOWALIGN_RIGHT ) + else if ( meViewAlign == WindowAlign::Right ) { nViewOffX = aDlgSize.Width()-mpViewWindow->GetSizePixel().Width()-WIZARDDIALOG_VIEW_DLGOFFSET_X; nViewOffY = WIZARDDIALOG_VIEW_DLGOFFSET_Y; @@ -283,20 +283,20 @@ void WizardDialog::ImplPosTabPage() if ( mpViewWindow && mpViewWindow->IsVisible() ) { Size aViewSize = mpViewWindow->GetSizePixel(); - if ( meViewAlign == WINDOWALIGN_TOP ) + if ( meViewAlign == WindowAlign::Top ) { nOffY += aViewSize.Height()+WIZARDDIALOG_VIEW_DLGOFFSET_Y; aDlgSize.Height() -= aViewSize.Height()+WIZARDDIALOG_VIEW_DLGOFFSET_Y; } - else if ( meViewAlign == WINDOWALIGN_LEFT ) + else if ( meViewAlign == WindowAlign::Left ) { long nViewOffset = mbEmptyViewMargin ? 0 : WIZARDDIALOG_VIEW_DLGOFFSET_X; nOffX += aViewSize.Width() + nViewOffset; aDlgSize.Width() -= nOffX; } - else if ( meViewAlign == WINDOWALIGN_BOTTOM ) + else if ( meViewAlign == WindowAlign::Bottom ) aDlgSize.Height() -= aViewSize.Height()+WIZARDDIALOG_VIEW_DLGOFFSET_Y; - else if ( meViewAlign == WINDOWALIGN_RIGHT ) + else if ( meViewAlign == WindowAlign::Right ) aDlgSize.Width() -= aViewSize.Width()+WIZARDDIALOG_VIEW_DLGOFFSET_X; } Point aPos( nOffX, nOffY ); |