summaryrefslogtreecommitdiff
path: root/sfx2/source
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-03-23 12:44:45 +0200
committerNoel Grandin <noel@peralex.com>2015-03-24 09:36:56 +0200
commitffcfcd76d12a54e8a65a2b8d0ba7432d4c57f6ea (patch)
tree907e2824a4cb8423bef30382753bf78a987e2438 /sfx2/source
parenteba9e9f88cf518a289e69e676098319177409e60 (diff)
convert SfxChildAlignment to enum class
Change-Id: I9013bc6dace79421b0a9ad0401a4fb59365d4dcf
Diffstat (limited to 'sfx2/source')
-rw-r--r--sfx2/source/appl/childwin.cxx2
-rw-r--r--sfx2/source/appl/workwin.cxx172
-rw-r--r--sfx2/source/control/dispatch.cxx2
-rw-r--r--sfx2/source/dialog/dockwin.cxx232
-rw-r--r--sfx2/source/dialog/infobar.cxx2
-rw-r--r--sfx2/source/dialog/navigat.cxx2
-rw-r--r--sfx2/source/dialog/partwnd.cxx2
-rw-r--r--sfx2/source/dialog/recfloat.cxx2
-rw-r--r--sfx2/source/dialog/splitwin.cxx8
-rw-r--r--sfx2/source/dialog/taskpane.cxx8
-rw-r--r--sfx2/source/sidebar/SidebarChildWindow.cxx2
-rw-r--r--sfx2/source/sidebar/SidebarDockingWindow.cxx24
12 files changed, 229 insertions, 229 deletions
diff --git a/sfx2/source/appl/childwin.cxx b/sfx2/source/appl/childwin.cxx
index 6e19bb762b83..2a904ca2421c 100644
--- a/sfx2/source/appl/childwin.cxx
+++ b/sfx2/source/appl/childwin.cxx
@@ -159,7 +159,7 @@ bool GetSplitSizeFromString( const OUString& rStr, Size& rSize )
SfxChildWindow::SfxChildWindow(vcl::Window *pParentWindow, sal_uInt16 nId)
: pParent(pParentWindow)
, nType(nId)
- , eChildAlignment(SFX_ALIGN_NOALIGNMENT)
+ , eChildAlignment(SfxChildAlignment::NOALIGNMENT)
, pWindow(0L)
{
pImp = new SfxChildWindow_Impl;
diff --git a/sfx2/source/appl/workwin.cxx b/sfx2/source/appl/workwin.cxx
index d27f2243d0a2..7f3920dcc088 100644
--- a/sfx2/source/appl/workwin.cxx
+++ b/sfx2/source/appl/workwin.cxx
@@ -402,55 +402,55 @@ sal_uInt16 ChildAlignValue(SfxChildAlignment eAlign)
switch (eAlign)
{
- case SFX_ALIGN_HIGHESTTOP:
+ case SfxChildAlignment::HIGHESTTOP:
ret = 1;
break;
- case SFX_ALIGN_LOWESTBOTTOM:
+ case SfxChildAlignment::LOWESTBOTTOM:
ret = 2;
break;
- case SFX_ALIGN_FIRSTLEFT:
+ case SfxChildAlignment::FIRSTLEFT:
ret = 3;
break;
- case SFX_ALIGN_LASTRIGHT:
+ case SfxChildAlignment::LASTRIGHT:
ret = 4;
break;
- case SFX_ALIGN_LEFT:
+ case SfxChildAlignment::LEFT:
ret = 5;
break;
- case SFX_ALIGN_RIGHT:
+ case SfxChildAlignment::RIGHT:
ret = 6;
break;
- case SFX_ALIGN_FIRSTRIGHT:
+ case SfxChildAlignment::FIRSTRIGHT:
ret = 7;
break;
- case SFX_ALIGN_LASTLEFT:
+ case SfxChildAlignment::LASTLEFT:
ret = 8;
break;
- case SFX_ALIGN_TOP:
+ case SfxChildAlignment::TOP:
ret = 9;
break;
- case SFX_ALIGN_BOTTOM:
+ case SfxChildAlignment::BOTTOM:
ret = 10;
break;
- case SFX_ALIGN_TOOLBOXTOP:
+ case SfxChildAlignment::TOOLBOXTOP:
ret = 11;
break;
- case SFX_ALIGN_TOOLBOXBOTTOM:
+ case SfxChildAlignment::TOOLBOXBOTTOM:
ret = 12;
break;
- case SFX_ALIGN_LOWESTTOP:
+ case SfxChildAlignment::LOWESTTOP:
ret = 13;
break;
- case SFX_ALIGN_HIGHESTBOTTOM:
+ case SfxChildAlignment::HIGHESTBOTTOM:
ret = 14;
break;
- case SFX_ALIGN_TOOLBOXLEFT:
+ case SfxChildAlignment::TOOLBOXLEFT:
ret = 15;
break;
- case SFX_ALIGN_TOOLBOXRIGHT:
+ case SfxChildAlignment::TOOLBOXRIGHT:
ret = 16;
break;
- case SFX_ALIGN_NOALIGNMENT:
+ case SfxChildAlignment::NOALIGNMENT:
break; // -Wall not handled...
}
@@ -463,55 +463,55 @@ sal_uInt16 ChildTravelValue( SfxChildAlignment eAlign )
switch (eAlign)
{
- case SFX_ALIGN_FIRSTLEFT:
+ case SfxChildAlignment::FIRSTLEFT:
ret = 1;
break;
- case SFX_ALIGN_LEFT:
+ case SfxChildAlignment::LEFT:
ret = 2;
break;
- case SFX_ALIGN_LASTLEFT:
+ case SfxChildAlignment::LASTLEFT:
ret = 3;
break;
- case SFX_ALIGN_TOOLBOXLEFT:
+ case SfxChildAlignment::TOOLBOXLEFT:
ret = 4;
break;
- case SFX_ALIGN_HIGHESTTOP:
+ case SfxChildAlignment::HIGHESTTOP:
ret = 5;
break;
- case SFX_ALIGN_TOP:
+ case SfxChildAlignment::TOP:
ret = 6;
break;
- case SFX_ALIGN_TOOLBOXTOP:
+ case SfxChildAlignment::TOOLBOXTOP:
ret = 7;
break;
- case SFX_ALIGN_LOWESTTOP:
+ case SfxChildAlignment::LOWESTTOP:
ret = 8;
break;
- case SFX_ALIGN_HIGHESTBOTTOM:
+ case SfxChildAlignment::HIGHESTBOTTOM:
ret = 9;
break;
- case SFX_ALIGN_TOOLBOXBOTTOM:
+ case SfxChildAlignment::TOOLBOXBOTTOM:
ret = 10;
break;
- case SFX_ALIGN_BOTTOM:
+ case SfxChildAlignment::BOTTOM:
ret = 11;
break;
- case SFX_ALIGN_LOWESTBOTTOM:
+ case SfxChildAlignment::LOWESTBOTTOM:
ret = 12;
break;
- case SFX_ALIGN_TOOLBOXRIGHT:
+ case SfxChildAlignment::TOOLBOXRIGHT:
ret = 13;
break;
- case SFX_ALIGN_FIRSTRIGHT:
+ case SfxChildAlignment::FIRSTRIGHT:
ret = 14;
break;
- case SFX_ALIGN_RIGHT:
+ case SfxChildAlignment::RIGHT:
ret = 15;
break;
- case SFX_ALIGN_LASTRIGHT:
+ case SfxChildAlignment::LASTRIGHT:
ret = 16;
break;
- case SFX_ALIGN_NOALIGNMENT:
+ case SfxChildAlignment::NOALIGNMENT:
break; // -Wall not handled.
}
@@ -565,10 +565,10 @@ SfxFrameWorkWin_Impl::SfxFrameWorkWin_Impl( vcl::Window *pWin, SfxFrame *pFrm, S
// and receives the docked window.
SfxChildAlignment eAlign =
- ( n == SFX_SPLITWINDOWS_LEFT ? SFX_ALIGN_LEFT :
- n == SFX_SPLITWINDOWS_RIGHT ? SFX_ALIGN_RIGHT :
- n == SFX_SPLITWINDOWS_TOP ? SFX_ALIGN_TOP :
- SFX_ALIGN_BOTTOM );
+ ( n == SFX_SPLITWINDOWS_LEFT ? SfxChildAlignment::LEFT :
+ n == SFX_SPLITWINDOWS_RIGHT ? SfxChildAlignment::RIGHT :
+ n == SFX_SPLITWINDOWS_TOP ? SfxChildAlignment::TOP :
+ SfxChildAlignment::BOTTOM );
SfxSplitWindow *pSplitWin = new SfxSplitWindow(pWorkWin, eAlign, this, pParent==0 );
pSplit[n] = pSplitWin;
}
@@ -847,10 +847,10 @@ SvBorder SfxWorkWindow::Arrange_Impl()
bool bAllowHiding = true;
switch ( pCli->eAlign )
{
- case SFX_ALIGN_HIGHESTTOP:
- case SFX_ALIGN_TOP:
- case SFX_ALIGN_TOOLBOXTOP:
- case SFX_ALIGN_LOWESTTOP:
+ case SfxChildAlignment::HIGHESTTOP:
+ case SfxChildAlignment::TOP:
+ case SfxChildAlignment::TOOLBOXTOP:
+ case SfxChildAlignment::LOWESTTOP:
aSize.Width() = aTmp.GetWidth();
if ( pCli->pWin->GetType() == WINDOW_SPLITWINDOW )
aSize = static_cast<SplitWindow *>(pCli->pWin)->CalcLayoutSizePixel( aSize );
@@ -858,14 +858,14 @@ SvBorder SfxWorkWindow::Arrange_Impl()
aBorder.Top() += aSize.Height();
aPos = aTmp.TopLeft();
aTmp.Top() += aSize.Height();
- if ( pCli->eAlign == SFX_ALIGN_HIGHESTTOP )
+ if ( pCli->eAlign == SfxChildAlignment::HIGHESTTOP )
aUpperClientArea.Top() += aSize.Height();
break;
- case SFX_ALIGN_LOWESTBOTTOM:
- case SFX_ALIGN_BOTTOM:
- case SFX_ALIGN_TOOLBOXBOTTOM:
- case SFX_ALIGN_HIGHESTBOTTOM:
+ case SfxChildAlignment::LOWESTBOTTOM:
+ case SfxChildAlignment::BOTTOM:
+ case SfxChildAlignment::TOOLBOXBOTTOM:
+ case SfxChildAlignment::HIGHESTBOTTOM:
aSize.Width() = aTmp.GetWidth();
if ( pCli->pWin->GetType() == WINDOW_SPLITWINDOW )
aSize = static_cast<SplitWindow *>(pCli->pWin)->CalcLayoutSizePixel( aSize );
@@ -873,14 +873,14 @@ SvBorder SfxWorkWindow::Arrange_Impl()
aPos = aTmp.BottomLeft();
aPos.Y() -= (aSize.Height()-1);
aTmp.Bottom() -= aSize.Height();
- if ( pCli->eAlign == SFX_ALIGN_LOWESTBOTTOM )
+ if ( pCli->eAlign == SfxChildAlignment::LOWESTBOTTOM )
aUpperClientArea.Bottom() -= aSize.Height();
break;
- case SFX_ALIGN_FIRSTLEFT:
- case SFX_ALIGN_LEFT:
- case SFX_ALIGN_LASTLEFT:
- case SFX_ALIGN_TOOLBOXLEFT:
+ case SfxChildAlignment::FIRSTLEFT:
+ case SfxChildAlignment::LEFT:
+ case SfxChildAlignment::LASTLEFT:
+ case SfxChildAlignment::TOOLBOXLEFT:
aSize.Height() = aTmp.GetHeight();
if ( pCli->pWin->GetType() == WINDOW_SPLITWINDOW )
aSize = static_cast<SplitWindow *>(pCli->pWin)->CalcLayoutSizePixel( aSize );
@@ -888,14 +888,14 @@ SvBorder SfxWorkWindow::Arrange_Impl()
aBorder.Left() += aSize.Width();
aPos = aTmp.TopLeft();
aTmp.Left() += aSize.Width();
- if ( pCli->eAlign != SFX_ALIGN_TOOLBOXLEFT )
+ if ( pCli->eAlign != SfxChildAlignment::TOOLBOXLEFT )
aUpperClientArea.Left() += aSize.Width();
break;
- case SFX_ALIGN_FIRSTRIGHT:
- case SFX_ALIGN_RIGHT:
- case SFX_ALIGN_LASTRIGHT:
- case SFX_ALIGN_TOOLBOXRIGHT:
+ case SfxChildAlignment::FIRSTRIGHT:
+ case SfxChildAlignment::RIGHT:
+ case SfxChildAlignment::LASTRIGHT:
+ case SfxChildAlignment::TOOLBOXRIGHT:
aSize.Height() = aTmp.GetHeight();
if ( pCli->pWin->GetType() == WINDOW_SPLITWINDOW )
aSize = static_cast<SplitWindow *>(pCli->pWin)->CalcLayoutSizePixel( aSize );
@@ -903,7 +903,7 @@ SvBorder SfxWorkWindow::Arrange_Impl()
aPos = aTmp.TopRight();
aPos.X() -= (aSize.Width()-1);
aTmp.Right() -= aSize.Width();
- if ( pCli->eAlign != SFX_ALIGN_TOOLBOXRIGHT )
+ if ( pCli->eAlign != SfxChildAlignment::TOOLBOXRIGHT )
aUpperClientArea.Right() -= aSize.Width();
break;
@@ -1439,7 +1439,7 @@ void SfxWorkWindow::UpdateChildWindows_Impl()
// In Presentation mode or FullScreen only FloatingWindows
SfxChildAlignment eAlign;
if ( pCW->aInfo.GetExtraData_Impl( &eAlign ) )
- bCreate = ( eAlign == SFX_ALIGN_NOALIGNMENT );
+ bCreate = ( eAlign == SfxChildAlignment::NOALIGNMENT );
}
else
bCreate = true;
@@ -1461,7 +1461,7 @@ void SfxWorkWindow::UpdateChildWindows_Impl()
else if ( pChildWin )
{
// Window already exists, it should also be visible?
- if ( ( !bIsFullScreen || pChildWin->GetAlignment() == SFX_ALIGN_NOALIGNMENT ) && bAllChildrenVisible )
+ if ( ( !bIsFullScreen || pChildWin->GetAlignment() == SfxChildAlignment::NOALIGNMENT ) && bAllChildrenVisible )
{
// Update Mode is compatible; definitely enable it
bCreate = AllowChildWindowCreation_Impl( *pCW );
@@ -1470,7 +1470,7 @@ void SfxWorkWindow::UpdateChildWindows_Impl()
if ( pCW->pCli )
{
// The window is a direct Child
- if ( bAllChildrenVisible && ( (IsDockingAllowed() && bInternalDockingAllowed) || pCW->pCli->eAlign == SFX_ALIGN_NOALIGNMENT ) )
+ if ( bAllChildrenVisible && ( (IsDockingAllowed() && bInternalDockingAllowed) || pCW->pCli->eAlign == SfxChildAlignment::NOALIGNMENT ) )
pCW->pCli->nVisible |= SfxChildVisibility::NOT_HIDDEN;
}
else
@@ -1542,13 +1542,13 @@ void SfxWorkWindow::CreateChildWin_Impl( SfxChildWin_Impl *pCW, bool bSetFocus )
pCW->pWin = pChildWin;
- if ( pChildWin->GetAlignment() == SFX_ALIGN_NOALIGNMENT || pChildWin->GetWindow()->GetParent() == pWorkWin)
+ if ( pChildWin->GetAlignment() == SfxChildAlignment::NOALIGNMENT || pChildWin->GetWindow()->GetParent() == pWorkWin)
{
// The window is not docked or docked outside of one split windows
// and must therefore be registered explicitly as a Child
pCW->pCli = RegisterChild_Impl(*(pChildWin->GetWindow()), pChildWin->GetAlignment(), pChildWin->CanGetFocus());
pCW->pCli->nVisible = SfxChildVisibility::VISIBLE;
- if ( pChildWin->GetAlignment() != SFX_ALIGN_NOALIGNMENT && bIsFullScreen )
+ if ( pChildWin->GetAlignment() != SfxChildAlignment::NOALIGNMENT && bIsFullScreen )
pCW->pCli->nVisible ^= SfxChildVisibility::ACTIVE;
pCW->pCli->bSetFocus = bSetFocus;
}
@@ -1661,7 +1661,7 @@ void SfxWorkWindow::HidePopups_Impl(bool bHide, bool bParent, sal_uInt16 nId )
for ( sal_uInt16 n = 0; n < aChildWins.size(); ++n )
{
SfxChildWindow *pCW = aChildWins[n]->pWin;
- if (pCW && pCW->GetAlignment() == SFX_ALIGN_NOALIGNMENT && pCW->GetType() != nId)
+ if (pCW && pCW->GetAlignment() == SfxChildAlignment::NOALIGNMENT && pCW->GetType() != nId)
{
vcl::Window *pWin = pCW->GetWindow();
SfxChild_Impl *pChild = FindChild_Impl(*pWin);
@@ -1718,7 +1718,7 @@ void SfxWorkWindow::ConfigChild_Impl(SfxChildIdentifier eChild,
if ( pDockWin )
{
- if ( eChild == SfxChildIdentifier::DOCKINGWINDOW || pDockWin->GetAlignment() == SFX_ALIGN_NOALIGNMENT )
+ if ( eChild == SfxChildIdentifier::DOCKINGWINDOW || pDockWin->GetAlignment() == SfxChildAlignment::NOALIGNMENT )
{
if ( eChild == SfxChildIdentifier::SPLITWINDOW && eConfig == SfxDockingConfig::TOGGLEFLOATMODE)
{
@@ -1793,65 +1793,65 @@ void SfxWorkWindow::ConfigChild_Impl(SfxChildIdentifier eChild,
{
switch ( pCli->eAlign )
{
- case SFX_ALIGN_TOP:
+ case SfxChildAlignment::TOP:
// Objekt-Toolboxes come always last
aInnerRect.Top() += pCli->aSize.Height();
break;
- case SFX_ALIGN_HIGHESTTOP:
+ case SfxChildAlignment::HIGHESTTOP:
// Always performed first
aInnerRect.Top() += pCli->aSize.Height();
break;
- case SFX_ALIGN_LOWESTTOP:
+ case SfxChildAlignment::LOWESTTOP:
// Is only counted if it is the current window
if ( i == nPos )
aInnerRect.Top() += pCli->aSize.Height();
break;
- case SFX_ALIGN_BOTTOM:
+ case SfxChildAlignment::BOTTOM:
// Objekt-Toolboxes come always last
aInnerRect.Bottom() -= pCli->aSize.Height();
break;
- case SFX_ALIGN_LOWESTBOTTOM:
+ case SfxChildAlignment::LOWESTBOTTOM:
// Always performed first
aInnerRect.Bottom() -= pCli->aSize.Height();
break;
- case SFX_ALIGN_HIGHESTBOTTOM:
+ case SfxChildAlignment::HIGHESTBOTTOM:
// Is only counted if it is the current window
if ( i == nPos )
aInnerRect.Bottom() -= pCli->aSize.Height();
break;
- case SFX_ALIGN_LEFT:
+ case SfxChildAlignment::LEFT:
// Toolboxes come always last
aInnerRect.Left() += pCli->aSize.Width();
break;
- case SFX_ALIGN_FIRSTLEFT:
+ case SfxChildAlignment::FIRSTLEFT:
// Always performed first
aInnerRect.Left() += pCli->aSize.Width();
break;
- case SFX_ALIGN_LASTLEFT:
+ case SfxChildAlignment::LASTLEFT:
// Is only counted if it is the current window
if (i == nPos)
aInnerRect.Left() += pCli->aSize.Width();
- case SFX_ALIGN_RIGHT:
+ case SfxChildAlignment::RIGHT:
// Toolboxes come always last
aInnerRect.Right() -= pCli->aSize.Width();
break;
- case SFX_ALIGN_FIRSTRIGHT:
+ case SfxChildAlignment::FIRSTRIGHT:
// Is only counted if it is the current window
if (i == nPos)
aInnerRect.Right() -= pCli->aSize.Width();
break;
- case SFX_ALIGN_LASTRIGHT:
+ case SfxChildAlignment::LASTRIGHT:
// Always performed first
aInnerRect.Right() -= pCli->aSize.Width();
break;
@@ -1873,12 +1873,12 @@ void SfxWorkWindow::ConfigChild_Impl(SfxChildIdentifier eChild,
if ( nPos == USHRT_MAX && !pCW )
return;
- SfxChildAlignment eAlign = SFX_ALIGN_NOALIGNMENT;
+ SfxChildAlignment eAlign = SfxChildAlignment::NOALIGNMENT;
SfxChild_Impl *pCli = ( nPos != USHRT_MAX ) ? aChildren[nPos] : 0;
if ( pCli && pDockWin )
{
eAlign = pDockWin->GetAlignment();
- if ( eChild == SfxChildIdentifier::DOCKINGWINDOW || eAlign == SFX_ALIGN_NOALIGNMENT)
+ if ( eChild == SfxChildIdentifier::DOCKINGWINDOW || eAlign == SfxChildAlignment::NOALIGNMENT)
{
// configuration inside the SplitWindow, no change for the SplitWindows' configuration
pCli->bResize = true;
@@ -2159,7 +2159,7 @@ bool SfxWorkWindow::IsFloating( sal_uInt16 nId )
SfxChildAlignment eAlign;
if ( pCW->aInfo.GetExtraData_Impl( &eAlign ) )
- return( eAlign == SFX_ALIGN_NOALIGNMENT );
+ return( eAlign == SfxChildAlignment::NOALIGNMENT );
else
return true;
}
@@ -2484,16 +2484,16 @@ SfxSplitWindow* SfxWorkWindow::GetSplitWindow_Impl( SfxChildAlignment eAlign )
{
switch ( eAlign )
{
- case SFX_ALIGN_TOP:
+ case SfxChildAlignment::TOP:
return pSplit[2];
- case SFX_ALIGN_BOTTOM:
+ case SfxChildAlignment::BOTTOM:
return pSplit[3];
- case SFX_ALIGN_LEFT:
+ case SfxChildAlignment::LEFT:
return pSplit[0];
- case SFX_ALIGN_RIGHT:
+ case SfxChildAlignment::RIGHT:
return pSplit[1];
default:
@@ -2514,7 +2514,7 @@ void SfxWorkWindow::MakeChildrenVisible_Impl( bool bVis )
for ( sal_uInt16 n=0; n<aSortedList.size(); ++n )
{
SfxChild_Impl* pCli = aChildren[aSortedList[n]];
- if ( (pCli->eAlign == SFX_ALIGN_NOALIGNMENT) || (IsDockingAllowed() && bInternalDockingAllowed) )
+ if ( (pCli->eAlign == SfxChildAlignment::NOALIGNMENT) || (IsDockingAllowed() && bInternalDockingAllowed) )
pCli->nVisible |= SfxChildVisibility::ACTIVE;
}
}
@@ -2747,7 +2747,7 @@ bool SfxWorkWindow::ActivateNextChild_Impl( bool bForward )
if ( aList.empty() )
return false;
- sal_uInt16 nTopValue = ChildTravelValue( SFX_ALIGN_LOWESTTOP );
+ sal_uInt16 nTopValue = ChildTravelValue( SfxChildAlignment::LOWESTTOP );
for ( sal_uInt16 i=0; i<aList.size(); i++ )
{
SfxChild_Impl* pCli = aChildren[aList[i]];
diff --git a/sfx2/source/control/dispatch.cxx b/sfx2/source/control/dispatch.cxx
index bf6e77f738f7..142646dc19f9 100644
--- a/sfx2/source/control/dispatch.cxx
+++ b/sfx2/source/control/dispatch.cxx
@@ -725,7 +725,7 @@ void SfxDispatcher::DoDeactivate_Impl(bool bMDI, SfxViewFrame* pNew)
for (size_t n=0; n<xImp->aChildWins.size();)
{
SfxChildWindow *pWin = pWorkWin->GetChildWindow_Impl( (sal_uInt16) ( xImp->aChildWins[n] & 0xFFFF ) );
- if (!pWin || (pWin && pWin->GetAlignment() == SFX_ALIGN_NOALIGNMENT))
+ if (!pWin || (pWin && pWin->GetAlignment() == SfxChildAlignment::NOALIGNMENT))
xImp->aChildWins.erase(xImp->aChildWins.begin()+n);
else
n++;
diff --git a/sfx2/source/dialog/dockwin.cxx b/sfx2/source/dialog/dockwin.cxx
index bc0a3bf83774..7118b2824e74 100644
--- a/sfx2/source/dialog/dockwin.cxx
+++ b/sfx2/source/dialog/dockwin.cxx
@@ -132,7 +132,7 @@ SfxDockingWrapper::SfxDockingWrapper( vcl::Window* pParentWnd ,
SfxTitleDockingWindow* pTitleDockWindow = new SfxTitleDockingWindow( pBindings, this, pParentWnd,
WB_STDDOCKWIN | WB_CLIPCHILDREN | WB_SIZEABLE | WB_3DLOOK | WB_ROLLABLE);
pWindow = pTitleDockWindow;
- eChildAlignment = SFX_ALIGN_NOALIGNMENT;
+ eChildAlignment = SfxChildAlignment::NOALIGNMENT;
// Use factory manager to retrieve XWindow factory. That can be used to instantiate
// the real window factory.
@@ -455,21 +455,21 @@ void SfxDockingWindow::Resize()
Size aSize( GetSizePixel() );
switch ( pImp->GetDockAlignment() )
{
- case SFX_ALIGN_LEFT:
- case SFX_ALIGN_FIRSTLEFT:
- case SFX_ALIGN_LASTLEFT:
- case SFX_ALIGN_RIGHT:
- case SFX_ALIGN_FIRSTRIGHT:
- case SFX_ALIGN_LASTRIGHT:
+ case SfxChildAlignment::LEFT:
+ case SfxChildAlignment::FIRSTLEFT:
+ case SfxChildAlignment::LASTLEFT:
+ case SfxChildAlignment::RIGHT:
+ case SfxChildAlignment::FIRSTRIGHT:
+ case SfxChildAlignment::LASTRIGHT:
pImp->nHorizontalSize = aSize.Width();
pImp->aSplitSize = aSize;
break;
- case SFX_ALIGN_TOP:
- case SFX_ALIGN_LOWESTTOP:
- case SFX_ALIGN_HIGHESTTOP:
- case SFX_ALIGN_BOTTOM:
- case SFX_ALIGN_HIGHESTBOTTOM:
- case SFX_ALIGN_LOWESTBOTTOM:
+ case SfxChildAlignment::TOP:
+ case SfxChildAlignment::LOWESTTOP:
+ case SfxChildAlignment::HIGHESTTOP:
+ case SfxChildAlignment::BOTTOM:
+ case SfxChildAlignment::HIGHESTBOTTOM:
+ case SfxChildAlignment::LOWESTBOTTOM:
pImp->nVerticalSize = aSize.Height();
pImp->aSplitSize = aSize;
break;
@@ -506,7 +506,7 @@ bool SfxDockingWindow::PrepareToggleFloatingMode()
if (!IsFloatingMode())
{
// Test, if FloatingMode is permitted.
- if ( CheckAlignment(GetAlignment(),SFX_ALIGN_NOALIGNMENT) != SFX_ALIGN_NOALIGNMENT )
+ if ( CheckAlignment(GetAlignment(),SfxChildAlignment::NOALIGNMENT) != SfxChildAlignment::NOALIGNMENT )
return false;
if ( pImp->pSplitWin )
@@ -521,7 +521,7 @@ bool SfxDockingWindow::PrepareToggleFloatingMode()
pImp->aWinState = GetFloatingWindow()->GetWindowState();
// Test if it is allowed to dock,
- if (CheckAlignment(GetAlignment(),pImp->GetLastAlignment()) == SFX_ALIGN_NOALIGNMENT)
+ if (CheckAlignment(GetAlignment(),pImp->GetLastAlignment()) == SfxChildAlignment::NOALIGNMENT)
return false;
// Test, if the Workwindow allows for docking at the moment.
@@ -562,7 +562,7 @@ void SfxDockingWindow::ToggleFloatingMode()
if (IsFloatingMode())
{
- SetAlignment(SFX_ALIGN_NOALIGNMENT);
+ SetAlignment(SfxChildAlignment::NOALIGNMENT);
if ( !pImp->aWinState.isEmpty() )
GetFloatingWindow()->SetWindowState( pImp->aWinState );
else
@@ -681,7 +681,7 @@ bool SfxDockingWindow::Docking( const Point& rPos, Rectangle& rRect )
{
// Mouse within OuterRect: calculate Alignment and Rectangle
SfxChildAlignment eAlign = CalcAlignment(rPos, rRect);
- if (eAlign == SFX_ALIGN_NOALIGNMENT)
+ if (eAlign == SfxChildAlignment::NOALIGNMENT)
bFloatMode = true;
pImp->SetDockAlignment(eAlign);
}
@@ -689,15 +689,15 @@ bool SfxDockingWindow::Docking( const Point& rPos, Rectangle& rRect )
{
// Mouse is not within OuterRect: must be FloatingWindow
// Is this allowed?
- if (CheckAlignment(pImp->GetDockAlignment(),SFX_ALIGN_NOALIGNMENT) != SFX_ALIGN_NOALIGNMENT)
+ if (CheckAlignment(pImp->GetDockAlignment(),SfxChildAlignment::NOALIGNMENT) != SfxChildAlignment::NOALIGNMENT)
return false;
bFloatMode = true;
- if ( SFX_ALIGN_NOALIGNMENT != pImp->GetDockAlignment() )
+ if ( SfxChildAlignment::NOALIGNMENT != pImp->GetDockAlignment() )
{
// Due to a bug the rRect may only be changed when the
// alignment is changed!
- pImp->SetDockAlignment(SFX_ALIGN_NOALIGNMENT);
- rRect.SetSize(CalcDockingSize(SFX_ALIGN_NOALIGNMENT));
+ pImp->SetDockAlignment(SfxChildAlignment::NOALIGNMENT);
+ rRect.SetSize(CalcDockingSize(SfxChildAlignment::NOALIGNMENT));
}
}
@@ -710,34 +710,34 @@ bool SfxDockingWindow::Docking( const Point& rPos, Rectangle& rRect )
switch ( pImp->GetDockAlignment() )
{
- case SFX_ALIGN_LEFT:
- case SFX_ALIGN_FIRSTLEFT:
- case SFX_ALIGN_LASTLEFT:
+ case SfxChildAlignment::LEFT:
+ case SfxChildAlignment::FIRSTLEFT:
+ case SfxChildAlignment::LASTLEFT:
aPos = aInnerRect.TopLeft();
if ( pImp->GetDockAlignment() == GetAlignment() )
aPos.X() -= aSize.Width();
break;
- case SFX_ALIGN_TOP:
- case SFX_ALIGN_LOWESTTOP:
- case SFX_ALIGN_HIGHESTTOP:
+ case SfxChildAlignment::TOP:
+ case SfxChildAlignment::LOWESTTOP:
+ case SfxChildAlignment::HIGHESTTOP:
aPos = Point(aOuterRect.Left(), aInnerRect.Top());
if ( pImp->GetDockAlignment() == GetAlignment() )
aPos.Y() -= aSize.Height();
break;
- case SFX_ALIGN_RIGHT:
- case SFX_ALIGN_FIRSTRIGHT:
- case SFX_ALIGN_LASTRIGHT:
+ case SfxChildAlignment::RIGHT:
+ case SfxChildAlignment::FIRSTRIGHT:
+ case SfxChildAlignment::LASTRIGHT:
aPos = Point(aInnerRect.Right() - rRect.GetSize().Width(),
aInnerRect.Top());
if ( pImp->GetDockAlignment() == GetAlignment() )
aPos.X() += aSize.Width();
break;
- case SFX_ALIGN_BOTTOM:
- case SFX_ALIGN_HIGHESTBOTTOM:
- case SFX_ALIGN_LOWESTBOTTOM:
+ case SfxChildAlignment::BOTTOM:
+ case SfxChildAlignment::HIGHESTBOTTOM:
+ case SfxChildAlignment::LOWESTBOTTOM:
aPos = Point(aOuterRect.Left(),
aInnerRect.Bottom() - rRect.GetSize().Height());
if ( pImp->GetDockAlignment() == GetAlignment() )
@@ -823,7 +823,7 @@ void SfxDockingWindow::EndDocking( const Rectangle& rRect, bool bFloatMode )
pImp->bEndDocked = false;
}
- SetAlignment( IsFloatingMode() ? SFX_ALIGN_NOALIGNMENT : pImp->GetDockAlignment() );
+ SetAlignment( IsFloatingMode() ? SfxChildAlignment::NOALIGNMENT : pImp->GetDockAlignment() );
}
@@ -888,7 +888,7 @@ SfxDockingWindow::SfxDockingWindow( SfxBindings *pBindinx, SfxChildWindow *pCW,
pImp->nLine = pImp->nDockLine = 0;
pImp->nPos = pImp->nDockPos = 0;
pImp->bNewLine = false;
- pImp->SetLastAlignment(SFX_ALIGN_NOALIGNMENT);
+ pImp->SetLastAlignment(SfxChildAlignment::NOALIGNMENT);
pImp->aMoveIdle.SetPriority(SchedulerPriority::RESIZE);
pImp->aMoveIdle.SetIdleHdl(LINK(this,SfxDockingWindow,TimerHdl));
}
@@ -939,7 +939,7 @@ SfxDockingWindow::SfxDockingWindow( SfxBindings *pBindinx, SfxChildWindow *pCW,
pImp->nLine = pImp->nDockLine = 0;
pImp->nPos = pImp->nDockPos = 0;
pImp->bNewLine = false;
- pImp->SetLastAlignment(SFX_ALIGN_NOALIGNMENT);
+ pImp->SetLastAlignment(SfxChildAlignment::NOALIGNMENT);
pImp->aMoveIdle.SetPriority(SchedulerPriority::RESIZE);
pImp->aMoveIdle.SetIdleHdl(LINK(this,SfxDockingWindow,TimerHdl));
}
@@ -987,7 +987,7 @@ SfxDockingWindow::SfxDockingWindow( SfxBindings *pBindinx, SfxChildWindow *pCW,
pImp->nLine = pImp->nDockLine = 0;
pImp->nPos = pImp->nDockPos = 0;
pImp->bNewLine = false;
- pImp->SetLastAlignment(SFX_ALIGN_NOALIGNMENT);
+ pImp->SetLastAlignment(SfxChildAlignment::NOALIGNMENT);
pImp->aMoveIdle.SetPriority(SchedulerPriority::RESIZE);
pImp->aMoveIdle.SetIdleHdl(LINK(this,SfxDockingWindow,TimerHdl));
}
@@ -1003,7 +1003,7 @@ void SfxDockingWindow::Initialize(SfxChildWinInfo *pInfo)
{
if ( !pMgr )
{
- pImp->SetDockAlignment( SFX_ALIGN_NOALIGNMENT );
+ pImp->SetDockAlignment( SfxChildAlignment::NOALIGNMENT );
pImp->bConstructed = true;
return;
}
@@ -1103,7 +1103,7 @@ void SfxDockingWindow::Initialize(SfxChildWinInfo *pInfo)
}
SfxWorkWindow *pWorkWin = pBindings->GetWorkWindow_Impl();
- if ( GetAlignment() != SFX_ALIGN_NOALIGNMENT )
+ if ( GetAlignment() != SfxChildAlignment::NOALIGNMENT )
{
// check if SfxWorkWindow is able to allow docking at its border
if (
@@ -1111,14 +1111,14 @@ void SfxDockingWindow::Initialize(SfxChildWinInfo *pInfo)
!pWorkWin->IsInternalDockingAllowed() ||
( (GetFloatStyle() & WB_STANDALONE) && Application::IsInModalMode()) )
{
- SetAlignment( SFX_ALIGN_NOALIGNMENT );
+ SetAlignment( SfxChildAlignment::NOALIGNMENT );
}
}
// detect floating mode
// toggeling mode will not execute code in handlers, because pImp->bConstructed is not set yet
bool bFloatMode = IsFloatingMode();
- if ( bFloatMode != ((GetAlignment() == SFX_ALIGN_NOALIGNMENT)) )
+ if ( bFloatMode != ((GetAlignment() == SfxChildAlignment::NOALIGNMENT)) )
{
bFloatMode = !bFloatMode;
SetFloatingMode( bFloatMode );
@@ -1135,20 +1135,20 @@ void SfxDockingWindow::Initialize(SfxChildWinInfo *pInfo)
{
// validate last alignment
SfxChildAlignment eLastAlign = pImp->GetLastAlignment();
- if ( eLastAlign == SFX_ALIGN_NOALIGNMENT)
- eLastAlign = CheckAlignment(eLastAlign, SFX_ALIGN_LEFT);
- if ( eLastAlign == SFX_ALIGN_NOALIGNMENT)
- eLastAlign = CheckAlignment(eLastAlign, SFX_ALIGN_RIGHT);
- if ( eLastAlign == SFX_ALIGN_NOALIGNMENT)
- eLastAlign = CheckAlignment(eLastAlign, SFX_ALIGN_TOP);
- if ( eLastAlign == SFX_ALIGN_NOALIGNMENT)
- eLastAlign = CheckAlignment(eLastAlign, SFX_ALIGN_BOTTOM);
+ if ( eLastAlign == SfxChildAlignment::NOALIGNMENT)
+ eLastAlign = CheckAlignment(eLastAlign, SfxChildAlignment::LEFT);
+ if ( eLastAlign == SfxChildAlignment::NOALIGNMENT)
+ eLastAlign = CheckAlignment(eLastAlign, SfxChildAlignment::RIGHT);
+ if ( eLastAlign == SfxChildAlignment::NOALIGNMENT)
+ eLastAlign = CheckAlignment(eLastAlign, SfxChildAlignment::TOP);
+ if ( eLastAlign == SfxChildAlignment::NOALIGNMENT)
+ eLastAlign = CheckAlignment(eLastAlign, SfxChildAlignment::BOTTOM);
pImp->SetLastAlignment(eLastAlign);
}
else
{
// docked window must have NOALIGNMENT as last alignment
- pImp->SetLastAlignment(SFX_ALIGN_NOALIGNMENT);
+ pImp->SetLastAlignment(SfxChildAlignment::NOALIGNMENT);
if ( pImp->bSplitable )
{
@@ -1302,9 +1302,9 @@ SfxChildAlignment SfxDockingWindow::CalcAlignment(const Point& rPos, Rectangle&
{
// calculate hypothetical sizes for different modes
- Size aFloatingSize(CalcDockingSize(SFX_ALIGN_NOALIGNMENT));
- Size aVerticalSize(CalcDockingSize(SFX_ALIGN_LEFT));
- Size aHorizontalSize(CalcDockingSize(SFX_ALIGN_TOP));
+ Size aFloatingSize(CalcDockingSize(SfxChildAlignment::NOALIGNMENT));
+ Size aVerticalSize(CalcDockingSize(SfxChildAlignment::LEFT));
+ Size aHorizontalSize(CalcDockingSize(SfxChildAlignment::TOP));
// check if docking is permitted
SfxWorkWindow *pWorkWin = pBindings->GetWorkWindow_Impl();
@@ -1390,7 +1390,7 @@ SfxChildAlignment SfxDockingWindow::CalcAlignment(const Point& rPos, Rectangle&
if ( bBecomesFloating )
{
- eDockAlign = CheckAlignment(pImp->GetDockAlignment(),SFX_ALIGN_NOALIGNMENT);
+ eDockAlign = CheckAlignment(pImp->GetDockAlignment(),SfxChildAlignment::NOALIGNMENT);
}
else
{
@@ -1403,36 +1403,36 @@ SfxChildAlignment SfxDockingWindow::CalcAlignment(const Point& rPos, Rectangle&
// check if alignment is still unchanged
switch ( GetAlignment() )
{
- case SFX_ALIGN_LEFT:
- case SFX_ALIGN_FIRSTLEFT:
- case SFX_ALIGN_LASTLEFT:
+ case SfxChildAlignment::LEFT:
+ case SfxChildAlignment::FIRSTLEFT:
+ case SfxChildAlignment::LASTLEFT:
if (aInPosTL.X() <= 0)
{
eDockAlign = GetAlignment();
bNoChange = true;
}
break;
- case SFX_ALIGN_TOP:
- case SFX_ALIGN_LOWESTTOP:
- case SFX_ALIGN_HIGHESTTOP:
+ case SfxChildAlignment::TOP:
+ case SfxChildAlignment::LOWESTTOP:
+ case SfxChildAlignment::HIGHESTTOP:
if ( aInPosTL.Y() <= 0)
{
eDockAlign = GetAlignment();
bNoChange = true;
}
break;
- case SFX_ALIGN_RIGHT:
- case SFX_ALIGN_FIRSTRIGHT:
- case SFX_ALIGN_LASTRIGHT:
+ case SfxChildAlignment::RIGHT:
+ case SfxChildAlignment::FIRSTRIGHT:
+ case SfxChildAlignment::LASTRIGHT:
if ( aInPosBR.X() >= aInSize.Width())
{
eDockAlign = GetAlignment();
bNoChange = true;
}
break;
- case SFX_ALIGN_BOTTOM:
- case SFX_ALIGN_LOWESTBOTTOM:
- case SFX_ALIGN_HIGHESTBOTTOM:
+ case SfxChildAlignment::BOTTOM:
+ case SfxChildAlignment::LOWESTBOTTOM:
+ case SfxChildAlignment::HIGHESTBOTTOM:
if ( aInPosBR.Y() >= aInSize.Height())
{
eDockAlign = GetAlignment();
@@ -1449,43 +1449,43 @@ SfxChildAlignment SfxDockingWindow::CalcAlignment(const Point& rPos, Rectangle&
bool bForbidden = true;
if ( aInPosTL.X() <= 0)
{
- eDockAlign = CheckAlignment(pImp->GetDockAlignment(),SFX_ALIGN_LEFT);
- bForbidden = ( eDockAlign != SFX_ALIGN_LEFT &&
- eDockAlign != SFX_ALIGN_FIRSTLEFT &&
- eDockAlign != SFX_ALIGN_LASTLEFT );
+ eDockAlign = CheckAlignment(pImp->GetDockAlignment(),SfxChildAlignment::LEFT);
+ bForbidden = ( eDockAlign != SfxChildAlignment::LEFT &&
+ eDockAlign != SfxChildAlignment::FIRSTLEFT &&
+ eDockAlign != SfxChildAlignment::LASTLEFT );
}
if ( bForbidden && aInPosTL.Y() <= 0)
{
- eDockAlign = CheckAlignment(pImp->GetDockAlignment(),SFX_ALIGN_TOP);
- bForbidden = ( eDockAlign != SFX_ALIGN_TOP &&
- eDockAlign != SFX_ALIGN_HIGHESTTOP &&
- eDockAlign != SFX_ALIGN_LOWESTTOP );
+ eDockAlign = CheckAlignment(pImp->GetDockAlignment(),SfxChildAlignment::TOP);
+ bForbidden = ( eDockAlign != SfxChildAlignment::TOP &&
+ eDockAlign != SfxChildAlignment::HIGHESTTOP &&
+ eDockAlign != SfxChildAlignment::LOWESTTOP );
}
if ( bForbidden && aInPosBR.X() >= aInSize.Width())
{
- eDockAlign = CheckAlignment(pImp->GetDockAlignment(),SFX_ALIGN_RIGHT);
- bForbidden = ( eDockAlign != SFX_ALIGN_RIGHT &&
- eDockAlign != SFX_ALIGN_FIRSTRIGHT &&
- eDockAlign != SFX_ALIGN_LASTRIGHT );
+ eDockAlign = CheckAlignment(pImp->GetDockAlignment(),SfxChildAlignment::RIGHT);
+ bForbidden = ( eDockAlign != SfxChildAlignment::RIGHT &&
+ eDockAlign != SfxChildAlignment::FIRSTRIGHT &&
+ eDockAlign != SfxChildAlignment::LASTRIGHT );
}
if ( bForbidden && aInPosBR.Y() >= aInSize.Height())
{
- eDockAlign = CheckAlignment(pImp->GetDockAlignment(),SFX_ALIGN_BOTTOM);
- bForbidden = ( eDockAlign != SFX_ALIGN_BOTTOM &&
- eDockAlign != SFX_ALIGN_HIGHESTBOTTOM &&
- eDockAlign != SFX_ALIGN_LOWESTBOTTOM );
+ eDockAlign = CheckAlignment(pImp->GetDockAlignment(),SfxChildAlignment::BOTTOM);
+ bForbidden = ( eDockAlign != SfxChildAlignment::BOTTOM &&
+ eDockAlign != SfxChildAlignment::HIGHESTBOTTOM &&
+ eDockAlign != SfxChildAlignment::LOWESTBOTTOM );
}
// the calculated alignment was rejected by the window -> take floating mode
if ( bForbidden )
- eDockAlign = CheckAlignment(pImp->GetDockAlignment(),SFX_ALIGN_NOALIGNMENT);
+ eDockAlign = CheckAlignment(pImp->GetDockAlignment(),SfxChildAlignment::NOALIGNMENT);
}
}
- if ( eDockAlign == SFX_ALIGN_NOALIGNMENT )
+ if ( eDockAlign == SfxChildAlignment::NOALIGNMENT )
{
// In the FloatingMode the tracking rectangle will get the floating
// size. Due to a bug the rRect may only be changed when the
@@ -1538,14 +1538,14 @@ SfxChildAlignment SfxDockingWindow::CalcAlignment(const Point& rPos, Rectangle&
Size aSize;
Point aPoint = aDockingRect.TopLeft();
Size aInnerSize = GetInnerRect().GetSize();
- if ( eDockAlign == SFX_ALIGN_LEFT || eDockAlign == SFX_ALIGN_RIGHT )
+ if ( eDockAlign == SfxChildAlignment::LEFT || eDockAlign == SfxChildAlignment::RIGHT )
{
if ( pImp->bNewLine )
{
// set height to height of free area
aSize.Height() = aInnerSize.Height();
aSize.Width() = pImp->nHorizontalSize;
- if ( eDockAlign == SFX_ALIGN_LEFT )
+ if ( eDockAlign == SfxChildAlignment::LEFT )
{
aPoint = aInnerRect.TopLeft();
}
@@ -1569,7 +1569,7 @@ SfxChildAlignment SfxDockingWindow::CalcAlignment(const Point& rPos, Rectangle&
// set width to width of free area
aSize.Width() = aInnerSize.Width();
aSize.Height() = pImp->nVerticalSize;
- if ( eDockAlign == SFX_ALIGN_TOP )
+ if ( eDockAlign == SfxChildAlignment::TOP )
{
aPoint = aInnerRect.TopLeft();
}
@@ -1598,15 +1598,15 @@ SfxChildAlignment SfxDockingWindow::CalcAlignment(const Point& rPos, Rectangle&
{
switch ( eDockAlign )
{
- case SFX_ALIGN_LEFT:
- case SFX_ALIGN_RIGHT:
- case SFX_ALIGN_FIRSTLEFT:
+ case SfxChildAlignment::LEFT:
+ case SfxChildAlignment::RIGHT:
+ case SfxChildAlignment::FIRSTLEFT:
aDockingRect.SetPos( aInnerRect.TopLeft() );
aDockingRect.SetSize( aVerticalSize );
break;
- case SFX_ALIGN_LASTLEFT:
- case SFX_ALIGN_FIRSTRIGHT:
- case SFX_ALIGN_LASTRIGHT:
+ case SfxChildAlignment::LASTLEFT:
+ case SfxChildAlignment::FIRSTRIGHT:
+ case SfxChildAlignment::LASTRIGHT:
{
Point aPt( aInnerRect.TopRight() );
aPt.X() -= aDockingRect.GetWidth();
@@ -1615,15 +1615,15 @@ SfxChildAlignment SfxDockingWindow::CalcAlignment(const Point& rPos, Rectangle&
break;
}
- case SFX_ALIGN_TOP:
- case SFX_ALIGN_BOTTOM:
- case SFX_ALIGN_LOWESTTOP:
+ case SfxChildAlignment::TOP:
+ case SfxChildAlignment::BOTTOM:
+ case SfxChildAlignment::LOWESTTOP:
aDockingRect.SetPos( aInnerRect.TopLeft() );
aDockingRect.SetSize( aHorizontalSize );
break;
- case SFX_ALIGN_HIGHESTTOP:
- case SFX_ALIGN_LOWESTBOTTOM:
- case SFX_ALIGN_HIGHESTBOTTOM:
+ case SfxChildAlignment::HIGHESTTOP:
+ case SfxChildAlignment::LOWESTBOTTOM:
+ case SfxChildAlignment::HIGHESTBOTTOM:
{
Point aPt( aInnerRect.BottomLeft() );
aPt.Y() -= aDockingRect.GetHeight();
@@ -1665,23 +1665,23 @@ Size SfxDockingWindow::CalcDockingSize(SfxChildAlignment eAlign)
Size aSize = GetFloatingSize();
switch (eAlign)
{
- case SFX_ALIGN_TOP:
- case SFX_ALIGN_BOTTOM:
- case SFX_ALIGN_LOWESTTOP:
- case SFX_ALIGN_HIGHESTTOP:
- case SFX_ALIGN_LOWESTBOTTOM:
- case SFX_ALIGN_HIGHESTBOTTOM:
+ case SfxChildAlignment::TOP:
+ case SfxChildAlignment::BOTTOM:
+ case SfxChildAlignment::LOWESTTOP:
+ case SfxChildAlignment::HIGHESTTOP:
+ case SfxChildAlignment::LOWESTBOTTOM:
+ case SfxChildAlignment::HIGHESTBOTTOM:
aSize.Width() = aOuterRect.Right() - aOuterRect.Left();
break;
- case SFX_ALIGN_LEFT:
- case SFX_ALIGN_RIGHT:
- case SFX_ALIGN_FIRSTLEFT:
- case SFX_ALIGN_LASTLEFT:
- case SFX_ALIGN_FIRSTRIGHT:
- case SFX_ALIGN_LASTRIGHT:
+ case SfxChildAlignment::LEFT:
+ case SfxChildAlignment::RIGHT:
+ case SfxChildAlignment::FIRSTLEFT:
+ case SfxChildAlignment::LASTLEFT:
+ case SfxChildAlignment::FIRSTRIGHT:
+ case SfxChildAlignment::LASTRIGHT:
aSize.Height() = aInnerRect.Bottom() - aInnerRect.Top();
break;
- case SFX_ALIGN_NOALIGNMENT:
+ case SfxChildAlignment::NOALIGNMENT:
break;
default:
break;
@@ -1746,28 +1746,28 @@ void SfxDockingWindow::Paint(const Rectangle& /*rRect*/)
GetOutputSizePixel());
switch (GetAlignment())
{
- case SFX_ALIGN_TOP:
+ case SfxChildAlignment::TOP:
{
DrawLine(aRect.BottomLeft(), aRect.BottomRight());
aRect.Bottom()--;
break;
}
- case SFX_ALIGN_BOTTOM:
+ case SfxChildAlignment::BOTTOM:
{
DrawLine(aRect.TopLeft(), aRect.TopRight());
aRect.Top()++;
break;
}
- case SFX_ALIGN_LEFT:
+ case SfxChildAlignment::LEFT:
{
DrawLine(aRect.TopRight(), aRect.BottomRight());
aRect.Right()--;
break;
}
- case SFX_ALIGN_RIGHT:
+ case SfxChildAlignment::RIGHT:
{
DrawLine(aRect.TopLeft(), aRect.BottomLeft());
aRect.Left()++;
diff --git a/sfx2/source/dialog/infobar.cxx b/sfx2/source/dialog/infobar.cxx
index 30fda30950e8..6d3924ce5459 100644
--- a/sfx2/source/dialog/infobar.cxx
+++ b/sfx2/source/dialog/infobar.cxx
@@ -312,7 +312,7 @@ SfxInfoBarContainerChild::SfxInfoBarContainerChild( vcl::Window* _pParent, sal_u
pWindow->SetPosSizePixel(Point(0, 0), Size(_pParent->GetSizePixel().getWidth(), 0));
pWindow->Show();
- eChildAlignment = SFX_ALIGN_LOWESTTOP;
+ eChildAlignment = SfxChildAlignment::LOWESTTOP;
}
SfxInfoBarContainerChild::~SfxInfoBarContainerChild()
diff --git a/sfx2/source/dialog/navigat.cxx b/sfx2/source/dialog/navigat.cxx
index bee29462f5ee..415c347d4970 100644
--- a/sfx2/source/dialog/navigat.cxx
+++ b/sfx2/source/dialog/navigat.cxx
@@ -36,7 +36,7 @@ SfxNavigatorWrapper::SfxNavigatorWrapper( vcl::Window* pParentWnd ,
{
pWindow = new SfxNavigator( pBindings, this, pParentWnd,
WB_STDDOCKWIN | WB_CLIPCHILDREN | WB_SIZEABLE | WB_3DLOOK | WB_ROLLABLE);
- eChildAlignment = SFX_ALIGN_NOALIGNMENT;
+ eChildAlignment = SfxChildAlignment::NOALIGNMENT;
pWindow->SetHelpId ( HID_NAVIGATOR_WINDOW );
pWindow->SetOutputSizePixel( Size( 270, 240 ) );
diff --git a/sfx2/source/dialog/partwnd.cxx b/sfx2/source/dialog/partwnd.cxx
index beddb3391512..0a168d8305b1 100644
--- a/sfx2/source/dialog/partwnd.cxx
+++ b/sfx2/source/dialog/partwnd.cxx
@@ -60,7 +60,7 @@ SfxPartChildWnd_Impl::SfxPartChildWnd_Impl
{
// Create Window
pWindow = new SfxPartDockWnd_Impl( pBindings, this, pParentWnd, WB_STDDOCKWIN | WB_CLIPCHILDREN | WB_SIZEABLE | WB_3DLOOK );
- eChildAlignment = SFX_ALIGN_TOP;
+ eChildAlignment = SfxChildAlignment::TOP;
assert(pInfo);
pInfo->nFlags |= SfxChildWindowFlags::FORCEDOCK;
diff --git a/sfx2/source/dialog/recfloat.cxx b/sfx2/source/dialog/recfloat.cxx
index 4e746944038a..d051bb3fa055 100644
--- a/sfx2/source/dialog/recfloat.cxx
+++ b/sfx2/source/dialog/recfloat.cxx
@@ -133,7 +133,7 @@ SfxRecordingFloatWrapper_Impl::SfxRecordingFloatWrapper_Impl( vcl::Window* pPare
{
pWindow = new SfxRecordingFloat_Impl( pBindings, this, pParentWnd );
SetWantsFocus( false );
- eChildAlignment = SFX_ALIGN_NOALIGNMENT;
+ eChildAlignment = SfxChildAlignment::NOALIGNMENT;
static_cast<SfxFloatingWindow*>(pWindow)->Initialize( pInfo );
}
diff --git a/sfx2/source/dialog/splitwin.cxx b/sfx2/source/dialog/splitwin.cxx
index 9270710ae285..250d6e56ad5f 100644
--- a/sfx2/source/dialog/splitwin.cxx
+++ b/sfx2/source/dialog/splitwin.cxx
@@ -213,16 +213,16 @@ SfxSplitWindow::SfxSplitWindow( vcl::Window* pParent, SfxChildAlignment eAl,
WindowAlign eTbxAlign;
switch ( eAlign )
{
- case SFX_ALIGN_LEFT:
+ case SfxChildAlignment::LEFT:
eTbxAlign = WINDOWALIGN_LEFT;
break;
- case SFX_ALIGN_RIGHT:
+ case SfxChildAlignment::RIGHT:
eTbxAlign = WINDOWALIGN_RIGHT;
break;
- case SFX_ALIGN_TOP:
+ case SfxChildAlignment::TOP:
eTbxAlign = WINDOWALIGN_TOP;
break;
- case SFX_ALIGN_BOTTOM:
+ case SfxChildAlignment::BOTTOM:
eTbxAlign = WINDOWALIGN_BOTTOM;
bPinned = true;
break;
diff --git a/sfx2/source/dialog/taskpane.cxx b/sfx2/source/dialog/taskpane.cxx
index c0f2d2ec4999..7e5d3310d035 100644
--- a/sfx2/source/dialog/taskpane.cxx
+++ b/sfx2/source/dialog/taskpane.cxx
@@ -240,7 +240,7 @@ namespace sfx2
{
pWindow = new TaskPaneDockingWindow( i_pBindings, *this, i_pParent,
WB_STDDOCKWIN | WB_CLIPCHILDREN | WB_SIZEABLE | WB_3DLOOK | WB_ROLLABLE);
- eChildAlignment = SFX_ALIGN_RIGHT;
+ eChildAlignment = SfxChildAlignment::RIGHT;
pWindow->SetHelpId( HID_TASKPANE_WINDOW );
pWindow->SetOutputSizePixel( Size( 300, 450 ) );
@@ -775,11 +775,11 @@ namespace sfx2
{
switch ( i_eAlignment )
{
- case SFX_ALIGN_LEFT:
+ case SfxChildAlignment::LEFT:
return LAYOUT_TABS_LEFT;
- case SFX_ALIGN_TOP:
+ case SfxChildAlignment::TOP:
return LAYOUT_TABS_TOP;
- case SFX_ALIGN_BOTTOM:
+ case SfxChildAlignment::BOTTOM:
return LAYOUT_TABS_BOTTOM;
default:
return LAYOUT_TABS_RIGHT;
diff --git a/sfx2/source/sidebar/SidebarChildWindow.cxx b/sfx2/source/sidebar/SidebarChildWindow.cxx
index 927395c5fd8f..22d71d3ca95a 100644
--- a/sfx2/source/sidebar/SidebarChildWindow.cxx
+++ b/sfx2/source/sidebar/SidebarChildWindow.cxx
@@ -42,7 +42,7 @@ SidebarChildWindow::SidebarChildWindow (
*this,
pParentWindow,
WB_STDDOCKWIN | WB_OWNERDRAWDECORATION | WB_CLIPCHILDREN | WB_SIZEABLE | WB_3DLOOK | WB_ROLLABLE);
- eChildAlignment = SFX_ALIGN_RIGHT;
+ eChildAlignment = SfxChildAlignment::RIGHT;
pWindow->SetHelpId(HID_SIDEBAR_WINDOW);
pWindow->SetOutputSizePixel(Size(GetDefaultWidth(pWindow), 450));
diff --git a/sfx2/source/sidebar/SidebarDockingWindow.cxx b/sfx2/source/sidebar/SidebarDockingWindow.cxx
index 914877262986..5ccf6fe60674 100644
--- a/sfx2/source/sidebar/SidebarDockingWindow.cxx
+++ b/sfx2/source/sidebar/SidebarDockingWindow.cxx
@@ -86,20 +86,20 @@ SfxChildAlignment SidebarDockingWindow::CheckAlignment (
{
switch (eRequestedAlignment)
{
- case SFX_ALIGN_TOP:
- case SFX_ALIGN_HIGHESTTOP:
- case SFX_ALIGN_LOWESTTOP:
- case SFX_ALIGN_BOTTOM:
- case SFX_ALIGN_LOWESTBOTTOM:
- case SFX_ALIGN_HIGHESTBOTTOM:
+ case SfxChildAlignment::TOP:
+ case SfxChildAlignment::HIGHESTTOP:
+ case SfxChildAlignment::LOWESTTOP:
+ case SfxChildAlignment::BOTTOM:
+ case SfxChildAlignment::LOWESTBOTTOM:
+ case SfxChildAlignment::HIGHESTBOTTOM:
return eCurrentAlignment;
- case SFX_ALIGN_LEFT:
- case SFX_ALIGN_RIGHT:
- case SFX_ALIGN_FIRSTLEFT:
- case SFX_ALIGN_LASTLEFT:
- case SFX_ALIGN_FIRSTRIGHT:
- case SFX_ALIGN_LASTRIGHT:
+ case SfxChildAlignment::LEFT:
+ case SfxChildAlignment::RIGHT:
+ case SfxChildAlignment::FIRSTLEFT:
+ case SfxChildAlignment::LASTLEFT:
+ case SfxChildAlignment::FIRSTRIGHT:
+ case SfxChildAlignment::LASTRIGHT:
return eRequestedAlignment;
default: