summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-07-23 13:19:40 +0200
committerNoel Grandin <noel@peralex.com>2015-07-24 09:52:08 +0200
commit9e28cc8ca79b5c42955867a62e89faf8facc5e80 (patch)
treed882dd9776f44748debac32c65b80194387cffe5 /sfx2
parentdc7fc2074dd81f0960e6c112ead1cfe5bfd1bf4c (diff)
convert WindowAlign to scoped enum
Change-Id: I028d108b3a83bd5541d873c4d03b87339cd3be52
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/dialog/splitwin.cxx28
-rw-r--r--sfx2/source/sidebar/SidebarController.cxx8
2 files changed, 18 insertions, 18 deletions
diff --git a/sfx2/source/dialog/splitwin.cxx b/sfx2/source/dialog/splitwin.cxx
index 077dbe389b11..3b2ea7890b0b 100644
--- a/sfx2/source/dialog/splitwin.cxx
+++ b/sfx2/source/dialog/splitwin.cxx
@@ -135,12 +135,12 @@ void SfxEmptySplitWin_Impl::Actualize()
Size aSize( pOwner->GetSizePixel() );
switch ( pOwner->GetAlign() )
{
- case WINDOWALIGN_LEFT:
- case WINDOWALIGN_RIGHT:
+ case WindowAlign::Left:
+ case WindowAlign::Right:
aSize.Width() = GetFadeInSize();
break;
- case WINDOWALIGN_TOP:
- case WINDOWALIGN_BOTTOM:
+ case WindowAlign::Top:
+ case WindowAlign::Bottom:
aSize.Height() = GetFadeInSize();
break;
}
@@ -219,20 +219,20 @@ SfxSplitWindow::SfxSplitWindow( vcl::Window* pParent, SfxChildAlignment eAl,
switch ( eAlign )
{
case SfxChildAlignment::LEFT:
- eTbxAlign = WINDOWALIGN_LEFT;
+ eTbxAlign = WindowAlign::Left;
break;
case SfxChildAlignment::RIGHT:
- eTbxAlign = WINDOWALIGN_RIGHT;
+ eTbxAlign = WindowAlign::Right;
break;
case SfxChildAlignment::TOP:
- eTbxAlign = WINDOWALIGN_TOP;
+ eTbxAlign = WindowAlign::Top;
break;
case SfxChildAlignment::BOTTOM:
- eTbxAlign = WINDOWALIGN_BOTTOM;
+ eTbxAlign = WindowAlign::Bottom;
bPinned = true;
break;
default:
- eTbxAlign = WINDOWALIGN_TOP; // some sort of default...
+ eTbxAlign = WindowAlign::Top; // some sort of default...
break; // -Wall lots not handled..
}
@@ -379,12 +379,12 @@ void SfxSplitWindow::StartSplit()
Rectangle aRect = pWorkWin->GetFreeArea( !bPinned );
switch ( GetAlign() )
{
- case WINDOWALIGN_LEFT:
- case WINDOWALIGN_RIGHT:
+ case WindowAlign::Left:
+ case WindowAlign::Right:
nSize = aSize.Width() + aRect.GetWidth();
break;
- case WINDOWALIGN_TOP:
- case WINDOWALIGN_BOTTOM:
+ case WindowAlign::Top:
+ case WindowAlign::Bottom:
nSize = aSize.Height() + aRect.GetHeight();
break;
}
@@ -714,7 +714,7 @@ void SfxSplitWindow::InsertWindow_Impl( SfxDock_Impl* pDock,
// Create a new nLine:th line
SplitWindowItemFlags nBits = nItemBits;
- if ( GetAlign() == WINDOWALIGN_TOP || GetAlign() == WINDOWALIGN_BOTTOM )
+ if ( GetAlign() == WindowAlign::Top || GetAlign() == WindowAlign::Bottom )
nBits |= SplitWindowItemFlags::ColSet;
InsertItem( nId, nSetSize, nLine, 0, nBits );
}
diff --git a/sfx2/source/sidebar/SidebarController.cxx b/sfx2/source/sidebar/SidebarController.cxx
index 2d86f6598e87..9bdd5e00369b 100644
--- a/sfx2/source/sidebar/SidebarController.cxx
+++ b/sfx2/source/sidebar/SidebarController.cxx
@@ -349,9 +349,9 @@ void SidebarController::NotifyResize()
if (mpCurrentDeck)
{
SfxSplitWindow* pSplitWindow = GetSplitWindow();
- WindowAlign eAlign = pSplitWindow ? pSplitWindow->GetAlign() : WINDOWALIGN_RIGHT;
+ WindowAlign eAlign = pSplitWindow ? pSplitWindow->GetAlign() : WindowAlign::Right;
long nDeckX, nTabX;
- if (eAlign == WINDOWALIGN_LEFT) // attach the Sidebar towards the left-side of screen
+ if (eAlign == WindowAlign::Left) // attach the Sidebar towards the left-side of screen
{
nDeckX = nTabBarDefaultWidth;
nTabX = 0;
@@ -683,9 +683,9 @@ void SidebarController::SwitchToDeck (
SfxSplitWindow* pSplitWindow = GetSplitWindow();
sal_Int32 nTabBarDefaultWidth = TabBar::GetDefaultWidth() * mpTabBar->GetDPIScaleFactor();
- WindowAlign eAlign = pSplitWindow ? pSplitWindow->GetAlign() : WINDOWALIGN_RIGHT;
+ WindowAlign eAlign = pSplitWindow ? pSplitWindow->GetAlign() : WindowAlign::Right;
long nDeckX;
- if (eAlign == WINDOWALIGN_LEFT) // attach the Sidebar towards the left-side of screen
+ if (eAlign == WindowAlign::Left) // attach the Sidebar towards the left-side of screen
{
nDeckX = nTabBarDefaultWidth;
}