summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--framework/source/layoutmanager/helpers.cxx10
-rw-r--r--framework/source/layoutmanager/toolbarlayoutmanager.cxx20
-rw-r--r--framework/source/uielement/popuptoolbarcontroller.cxx2
-rw-r--r--include/tools/wintypes.hxx4
-rw-r--r--include/vcl/splitwin.hxx2
-rw-r--r--include/vcl/toolbox.hxx2
-rw-r--r--reportdesign/source/ui/report/DesignView.cxx2
-rw-r--r--rsc/inc/rscdb.hxx2
-rw-r--r--rsc/source/parser/rscicpx.cxx8
-rw-r--r--sfx2/source/dialog/splitwin.cxx28
-rw-r--r--sfx2/source/sidebar/SidebarController.cxx8
-rw-r--r--svtools/source/dialogs/roadmapwizard.cxx2
-rw-r--r--svtools/source/dialogs/wizdlg.cxx26
-rw-r--r--svx/source/mnuctrls/clipboardctl.cxx2
-rw-r--r--sw/source/ui/index/cnttab.cxx2
-rw-r--r--sw/source/uibase/ribbar/workctrl.cxx4
-rw-r--r--vcl/source/window/dockingarea.cxx18
-rw-r--r--vcl/source/window/menubarwindow.cxx2
-rw-r--r--vcl/source/window/splitwin.cxx74
-rw-r--r--vcl/source/window/tabdlg.cxx10
-rw-r--r--vcl/source/window/toolbox.cxx80
-rw-r--r--vcl/source/window/toolbox2.cxx10
22 files changed, 161 insertions, 157 deletions
diff --git a/framework/source/layoutmanager/helpers.cxx b/framework/source/layoutmanager/helpers.cxx
index 527eeebfbb2e..6ea1c831e736 100644
--- a/framework/source/layoutmanager/helpers.cxx
+++ b/framework/source/layoutmanager/helpers.cxx
@@ -64,7 +64,7 @@ bool isReverseOrderDockingArea( const sal_Int32 nDockArea )
bool isToolboxHorizontalAligned( ToolBox* pToolBox )
{
if ( pToolBox )
- return (( pToolBox->GetAlign() == WINDOWALIGN_TOP ) || ( pToolBox->GetAlign() == WINDOWALIGN_BOTTOM ));
+ return (( pToolBox->GetAlign() == WindowAlign::Top ) || ( pToolBox->GetAlign() == WindowAlign::Bottom ));
return false;
}
@@ -184,13 +184,13 @@ uno::Reference< awt::XWindowPeer > createToolkitWindow( const uno::Reference< un
WindowAlign ImplConvertAlignment( sal_Int16 aAlignment )
{
if ( aAlignment == ui::DockingArea_DOCKINGAREA_LEFT )
- return WINDOWALIGN_LEFT;
+ return WindowAlign::Left;
else if ( aAlignment == ui::DockingArea_DOCKINGAREA_RIGHT )
- return WINDOWALIGN_RIGHT;
+ return WindowAlign::Right;
else if ( aAlignment == ui::DockingArea_DOCKINGAREA_TOP )
- return WINDOWALIGN_TOP;
+ return WindowAlign::Top;
else
- return WINDOWALIGN_BOTTOM;
+ return WindowAlign::Bottom;
}
OUString getElementTypeFromResourceURL( const OUString& aResourceURL )
diff --git a/framework/source/layoutmanager/toolbarlayoutmanager.cxx b/framework/source/layoutmanager/toolbarlayoutmanager.cxx
index 40a62d94c767..6eb25c055194 100644
--- a/framework/source/layoutmanager/toolbarlayoutmanager.cxx
+++ b/framework/source/layoutmanager/toolbarlayoutmanager.cxx
@@ -1032,13 +1032,13 @@ void ToolbarLayoutManager::setParentWindow(
{
SolarMutexGuard aGuard;
VclPtr< ::DockingAreaWindow > pWindow = dynamic_cast< ::DockingAreaWindow* >(VCLUnoHelper::GetWindow( xTopDockWindow ).get() );
- if( pWindow ) pWindow->SetAlign( WINDOWALIGN_TOP );
+ if( pWindow ) pWindow->SetAlign( WindowAlign::Top );
pWindow = dynamic_cast< ::DockingAreaWindow* >(VCLUnoHelper::GetWindow( xBottomDockWindow ).get() );
- if( pWindow ) pWindow->SetAlign( WINDOWALIGN_BOTTOM );
+ if( pWindow ) pWindow->SetAlign( WindowAlign::Bottom );
pWindow = dynamic_cast< ::DockingAreaWindow* >(VCLUnoHelper::GetWindow( xLeftDockWindow ).get() );
- if( pWindow ) pWindow->SetAlign( WINDOWALIGN_LEFT );
+ if( pWindow ) pWindow->SetAlign( WindowAlign::Left );
pWindow = dynamic_cast< ::DockingAreaWindow* >(VCLUnoHelper::GetWindow( xRightDockWindow ).get() );
- if( pWindow ) pWindow->SetAlign( WINDOWALIGN_RIGHT );
+ if( pWindow ) pWindow->SetAlign( WindowAlign::Right );
implts_reparentToolbars();
}
else
@@ -3540,9 +3540,9 @@ throw (uno::RuntimeException, std::exception)
if( e.bFloating )
{
if ( aUIDockingElement.m_aFloatingData.m_bIsHorizontal )
- pToolBox->SetAlign( WINDOWALIGN_TOP );
+ pToolBox->SetAlign( WindowAlign::Top );
else
- pToolBox->SetAlign( WINDOWALIGN_LEFT );
+ pToolBox->SetAlign( WindowAlign::Left );
}
else
{
@@ -3655,9 +3655,9 @@ throw (uno::RuntimeException, std::exception)
{
pToolBox->SetLineCount( aUIDockingElement.m_aFloatingData.m_nLines );
if ( aUIDockingElement.m_aFloatingData.m_bIsHorizontal )
- pToolBox->SetAlign( WINDOWALIGN_TOP );
+ pToolBox->SetAlign( WindowAlign::Top );
else
- pToolBox->SetAlign( WINDOWALIGN_LEFT );
+ pToolBox->SetAlign( WindowAlign::Left );
}
bool bUndefPos = hasDefaultPosValue( aUIDockingElement.m_aFloatingData.m_aPos );
@@ -3734,9 +3734,9 @@ throw (uno::RuntimeException, std::exception)
if ( aUIDockingElement.m_bFloating )
{
if ( aUIDockingElement.m_aFloatingData.m_bIsHorizontal )
- pToolBox->SetAlign( WINDOWALIGN_TOP );
+ pToolBox->SetAlign( WindowAlign::Top );
else
- pToolBox->SetAlign( WINDOWALIGN_LEFT );
+ pToolBox->SetAlign( WindowAlign::Left );
}
else
pToolBox->SetAlign( ImplConvertAlignment( aUIDockingElement.m_aDockedData.m_nDockedArea) );
diff --git a/framework/source/uielement/popuptoolbarcontroller.cxx b/framework/source/uielement/popuptoolbarcontroller.cxx
index d2e9da89f434..aa529089023e 100644
--- a/framework/source/uielement/popuptoolbarcontroller.cxx
+++ b/framework/source/uielement/popuptoolbarcontroller.cxx
@@ -190,7 +190,7 @@ PopupMenuToolbarController::createPopupWindow()
sal_uInt16 nId = m_xPopupMenu->execute(
css::uno::Reference< css::awt::XWindowPeer >( getParent(), css::uno::UNO_QUERY ),
VCLUnoHelper::ConvertToAWTRect( pToolBox->GetItemRect( m_nToolBoxId ) ),
- ( eAlign == WINDOWALIGN_TOP || eAlign == WINDOWALIGN_BOTTOM ) ?
+ ( eAlign == WindowAlign::Top || eAlign == WindowAlign::Bottom ) ?
css::awt::PopupMenuDirection::EXECUTE_DOWN :
css::awt::PopupMenuDirection::EXECUTE_RIGHT );
pToolBox->SetItemDown( m_nToolBoxId, false );
diff --git a/include/tools/wintypes.hxx b/include/tools/wintypes.hxx
index bfd038ee6e6c..01a04d921803 100644
--- a/include/tools/wintypes.hxx
+++ b/include/tools/wintypes.hxx
@@ -285,11 +285,13 @@ WinBits const WB_EXT_DOCMODIFIED = 0x00000002;
// WindowAlign
-enum WindowAlign { WINDOWALIGN_LEFT, WINDOWALIGN_TOP, WINDOWALIGN_RIGHT, WINDOWALIGN_BOTTOM };
+enum class WindowAlign { Left, Top, Right, Bottom };
+
enum ImageAlign { IMAGEALIGN_LEFT, IMAGEALIGN_TOP, IMAGEALIGN_RIGHT, IMAGEALIGN_BOTTOM,
IMAGEALIGN_LEFT_TOP, IMAGEALIGN_LEFT_BOTTOM, IMAGEALIGN_TOP_LEFT,
IMAGEALIGN_TOP_RIGHT, IMAGEALIGN_RIGHT_TOP, IMAGEALIGN_RIGHT_BOTTOM,
IMAGEALIGN_BOTTOM_LEFT, IMAGEALIGN_BOTTOM_RIGHT, IMAGEALIGN_CENTER };
+
enum class SymbolAlign { LEFT, RIGHT };
// ButtonDialog-Types
diff --git a/include/vcl/splitwin.hxx b/include/vcl/splitwin.hxx
index 8918d4235b10..5a2711a486dd 100644
--- a/include/vcl/splitwin.hxx
+++ b/include/vcl/splitwin.hxx
@@ -184,7 +184,7 @@ public:
sal_uInt16 GetItemCount( sal_uInt16 nSetId = 0 ) const;
bool IsItemValid( sal_uInt16 nId ) const;
- void SetAlign( WindowAlign eNewAlign = WINDOWALIGN_TOP );
+ void SetAlign( WindowAlign eNewAlign = WindowAlign::Top );
WindowAlign GetAlign() const { return meAlign; }
bool IsHorizontal() const { return mbHorz; }
diff --git a/include/vcl/toolbox.hxx b/include/vcl/toolbox.hxx
index f0541cd0fed0..bda8d0b4acc1 100644
--- a/include/vcl/toolbox.hxx
+++ b/include/vcl/toolbox.hxx
@@ -352,7 +352,7 @@ public:
void SetToolboxButtonSize( ToolBoxButtonSize eSize );
ToolBoxButtonSize GetToolboxButtonSize() const;
- void SetAlign( WindowAlign eNewAlign = WINDOWALIGN_TOP );
+ void SetAlign( WindowAlign eNewAlign = WindowAlign::Top );
WindowAlign GetAlign() const { return meAlign; }
bool IsHorizontal() const { return mbHorz; }
diff --git a/reportdesign/source/ui/report/DesignView.cxx b/reportdesign/source/ui/report/DesignView.cxx
index e43858882e14..a12453ec3587 100644
--- a/reportdesign/source/ui/report/DesignView.cxx
+++ b/reportdesign/source/ui/report/DesignView.cxx
@@ -114,7 +114,7 @@ ODesignView::ODesignView( vcl::Window* pParent,
// Splitter einrichten
m_aSplitWin->SetSplitHdl(LINK(this, ODesignView,SplitHdl));
m_aSplitWin->ShowAutoHideButton();
- m_aSplitWin->SetAlign(WINDOWALIGN_LEFT);
+ m_aSplitWin->SetAlign(WindowAlign::Left);
m_aSplitWin->Show();
m_aMarkIdle.SetPriority( SchedulerPriority::LOW );
diff --git a/rsc/inc/rscdb.hxx b/rsc/inc/rscdb.hxx
index 7428785fca7b..bbaa74dbb014 100644
--- a/rsc/inc/rscdb.hxx
+++ b/rsc/inc/rscdb.hxx
@@ -43,6 +43,7 @@ enum class KeyFuncType : sal_Int32;
enum class MenuItemBits : sal_Int16;
enum class ToolBoxItemType;
enum class ButtonType;
+enum class WindowAlign;
struct WriteRcContext
{
@@ -155,6 +156,7 @@ class RscTypCont
inline void SETCONST( RscConst *p1, const char * p2, ToolBoxItemType p3 ) { SETCONST(p1, p2, static_cast<sal_uInt32>(p3)); }
inline void SETCONST( RscConst *p1, Atom p2, ButtonType p3 ) { SETCONST(p1, p2, static_cast<sal_uInt32>(p3)); }
inline void SETCONST( RscConst *p1, const char * p2, ButtonType p3 ) { SETCONST(p1, p2, static_cast<sal_uInt32>(p3)); }
+ inline void SETCONST( RscConst *p1, const char * p2, WindowAlign p3 ) { SETCONST(p1, p2, static_cast<sal_uInt32>(p3)); }
RscEnum * InitLangType();
RscEnum * InitFieldUnitsType();
RscEnum * InitColor();
diff --git a/rsc/source/parser/rscicpx.cxx b/rsc/source/parser/rscicpx.cxx
index 0d23d0b05b58..03fe7be6a9f6 100644
--- a/rsc/source/parser/rscicpx.cxx
+++ b/rsc/source/parser/rscicpx.cxx
@@ -1251,10 +1251,10 @@ RscTop * RscTypCont::InitClassToolBox( RscTop * pSuper,
RscEnum * pEnum;
aBaseLst.push_back( pEnum = new RscEnum( pHS->getID( "EnumToolBoxAlign" ), RSC_NOTYPE ) );
- SETCONST( pEnum, "BOXALIGN_TOP", WINDOWALIGN_TOP );
- SETCONST( pEnum, "BOXALIGN_LEFT", WINDOWALIGN_LEFT );
- SETCONST( pEnum, "BOXALIGN_RIGHT", WINDOWALIGN_RIGHT );
- SETCONST( pEnum, "BOXALIGN_BOTTOM", WINDOWALIGN_BOTTOM );
+ SETCONST( pEnum, "BOXALIGN_TOP", WindowAlign::Top );
+ SETCONST( pEnum, "BOXALIGN_LEFT", WindowAlign::Left );
+ SETCONST( pEnum, "BOXALIGN_RIGHT", WindowAlign::Right );
+ SETCONST( pEnum, "BOXALIGN_BOTTOM", WindowAlign::Bottom );
// Variable einfuegen
nId = aNmTb.Put( "Align", VARNAME );
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;
}
diff --git a/svtools/source/dialogs/roadmapwizard.cxx b/svtools/source/dialogs/roadmapwizard.cxx
index e63997907de9..1fae0a962dac 100644
--- a/svtools/source/dialogs/roadmapwizard.cxx
+++ b/svtools/source/dialogs/roadmapwizard.cxx
@@ -140,7 +140,7 @@ namespace svt
m_pImpl->pRoadmap->SetSizePixel( aRoadmapSize );
SetViewWindow( m_pImpl->pRoadmap );
- SetViewAlign( WINDOWALIGN_LEFT );
+ SetViewAlign( WindowAlign::Left );
m_pImpl->pRoadmap->Show();
}
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 );
diff --git a/svx/source/mnuctrls/clipboardctl.cxx b/svx/source/mnuctrls/clipboardctl.cxx
index a76ece6816e3..e085c20f8104 100644
--- a/svx/source/mnuctrls/clipboardctl.cxx
+++ b/svx/source/mnuctrls/clipboardctl.cxx
@@ -86,7 +86,7 @@ VclPtr<SfxPopupWindow> SvxClipBoardControl::CreatePopupWindow()
rBox.SetItemDown( nId, true );
pPopup->Execute( &rBox, rBox.GetItemRect( nId ),
- (rBox.GetAlign() == WINDOWALIGN_TOP || rBox.GetAlign() == WINDOWALIGN_BOTTOM) ?
+ (rBox.GetAlign() == WindowAlign::Top || rBox.GetAlign() == WindowAlign::Bottom) ?
PopupMenuFlags::ExecuteDown : PopupMenuFlags::ExecuteRight );
rBox.SetItemDown( nId, false );
diff --git a/sw/source/ui/index/cnttab.cxx b/sw/source/ui/index/cnttab.cxx
index 4faab6be474c..635127f989b5 100644
--- a/sw/source/ui/index/cnttab.cxx
+++ b/sw/source/ui/index/cnttab.cxx
@@ -312,7 +312,7 @@ SwMultiTOXTabDialog::SwMultiTOXTabDialog(vcl::Window* pParent, const SfxItemSet&
m_pShowExampleCB->Check( SW_MOD()->GetModuleConfig()->IsShowIndexPreview());
m_pExampleContainerWIN->SetAccessibleName(m_pShowExampleCB->GetText());
- SetViewAlign( WINDOWALIGN_LEFT );
+ SetViewAlign( WindowAlign::Left );
// SetViewWindow does not work if the dialog is visible!
if(!m_pShowExampleCB->IsChecked())
diff --git a/sw/source/uibase/ribbar/workctrl.cxx b/sw/source/uibase/ribbar/workctrl.cxx
index 8370f4fe019b..81f546240309 100644
--- a/sw/source/uibase/ribbar/workctrl.cxx
+++ b/sw/source/uibase/ribbar/workctrl.cxx
@@ -121,7 +121,7 @@ VclPtr<SfxPopupWindow> SwTbxAutoTextCtrl::CreatePopupWindow()
pToolBox->SetItemDown( nId, true );
pPopup->Execute( pToolBox, pToolBox->GetItemRect( nId ),
- (pToolBox->GetAlign() == WINDOWALIGN_TOP || pToolBox->GetAlign() == WINDOWALIGN_BOTTOM) ?
+ (pToolBox->GetAlign() == WindowAlign::Top || pToolBox->GetAlign() == WindowAlign::Bottom) ?
PopupMenuFlags::ExecuteDown : PopupMenuFlags::ExecuteRight );
pToolBox->SetItemDown( nId, false );
@@ -213,7 +213,7 @@ VclPtr<SfxPopupWindow> SwTbxFieldCtrl::CreatePopupWindow()
pToolBox->SetItemDown( nId, true );
pPopup->Execute( pToolBox, pToolBox->GetItemRect( nId ),
- (pToolBox->GetAlign() == WINDOWALIGN_TOP || pToolBox->GetAlign() == WINDOWALIGN_BOTTOM) ?
+ (pToolBox->GetAlign() == WindowAlign::Top || pToolBox->GetAlign() == WindowAlign::Bottom) ?
PopupMenuFlags::ExecuteDown : PopupMenuFlags::ExecuteRight );
pToolBox->SetItemDown( nId, false );
diff --git a/vcl/source/window/dockingarea.cxx b/vcl/source/window/dockingarea.cxx
index e847685278e3..4cb8b006e245 100644
--- a/vcl/source/window/dockingarea.cxx
+++ b/vcl/source/window/dockingarea.cxx
@@ -37,7 +37,7 @@ public:
DockingAreaWindow::ImplData::ImplData()
{
- meAlign = WINDOWALIGN_TOP;
+ meAlign = WindowAlign::Top;
}
DockingAreaWindow::ImplData::~ImplData()
@@ -78,7 +78,7 @@ static void ImplInvalidateMenubar( DockingAreaWindow* pThis )
// due to a possible common gradient covering menubar and top dockingarea
// the menubar must be repainted if the top dockingarea changes size or visibility
if( ImplGetSVData()->maNWFData.mbMenuBarDockingAreaCommonBG &&
- (pThis->GetAlign() == WINDOWALIGN_TOP)
+ (pThis->GetAlign() == WindowAlign::Top)
&& pThis->IsNativeControlSupported( CTRL_TOOLBAR, PART_ENTIRE_CONTROL )
&& pThis->IsNativeControlSupported( CTRL_MENUBAR, PART_ENTIRE_CONTROL ) )
{
@@ -102,7 +102,7 @@ void DockingAreaWindow::StateChanged( StateChangedType nType )
bool DockingAreaWindow::IsHorizontal() const
{
- return ( mpImplData->meAlign == WINDOWALIGN_TOP || mpImplData->meAlign == WINDOWALIGN_BOTTOM );
+ return ( mpImplData->meAlign == WindowAlign::Top || mpImplData->meAlign == WindowAlign::Bottom );
}
void DockingAreaWindow::SetAlign( WindowAlign eNewAlign )
@@ -122,12 +122,12 @@ WindowAlign DockingAreaWindow::GetAlign() const
void DockingAreaWindow::ApplySettings(vcl::RenderContext& rRenderContext)
{
const StyleSettings rSetting = rRenderContext.GetSettings().GetStyleSettings();
- const BitmapEx& rPersonaBitmap = (GetAlign() == WINDOWALIGN_TOP) ? rSetting.GetPersonaHeader() : rSetting.GetPersonaFooter();
+ const BitmapEx& rPersonaBitmap = (GetAlign() == WindowAlign::Top) ? rSetting.GetPersonaHeader() : rSetting.GetPersonaFooter();
- if (!rPersonaBitmap.IsEmpty() && (GetAlign() == WINDOWALIGN_TOP || GetAlign()==WINDOWALIGN_BOTTOM))
+ if (!rPersonaBitmap.IsEmpty() && (GetAlign() == WindowAlign::Top || GetAlign()==WindowAlign::Bottom))
{
Wallpaper aWallpaper(rPersonaBitmap);
- if (GetAlign() == WINDOWALIGN_TOP)
+ if (GetAlign() == WindowAlign::Top)
aWallpaper.SetStyle(WallpaperStyle::TopRight);
else
aWallpaper.SetStyle(WallpaperStyle::BottomRight);
@@ -169,7 +169,7 @@ void DockingAreaWindow::Paint(vcl::RenderContext& rRenderContext, const Rectangl
{
ToolbarValue aControlValue;
- if (GetAlign() == WINDOWALIGN_TOP && ImplGetSVData()->maNWFData.mbMenuBarDockingAreaCommonBG)
+ if (GetAlign() == WindowAlign::Top && ImplGetSVData()->maNWFData.mbMenuBarDockingAreaCommonBG)
{
// give NWF a hint that this dockingarea is adjacent to the menubar
// useful for special gradient effects that should cover both windows
@@ -177,9 +177,9 @@ void DockingAreaWindow::Paint(vcl::RenderContext& rRenderContext, const Rectangl
}
ControlState nState = ControlState::ENABLED;
- const bool isFooter = GetAlign() == WINDOWALIGN_BOTTOM && !rSetting.GetPersonaFooter().IsEmpty();
+ const bool isFooter = GetAlign() == WindowAlign::Bottom && !rSetting.GetPersonaFooter().IsEmpty();
- if ((GetAlign() == WINDOWALIGN_TOP && !rSetting.GetPersonaHeader().IsEmpty() ) || isFooter)
+ if ((GetAlign() == WindowAlign::Top && !rSetting.GetPersonaHeader().IsEmpty() ) || isFooter)
Erase(rRenderContext);
else if (!ImplGetSVData()->maNWFData.mbDockingAreaSeparateTB)
{
diff --git a/vcl/source/window/menubarwindow.cxx b/vcl/source/window/menubarwindow.cxx
index c6a0783bb2f3..718ffc000e02 100644
--- a/vcl/source/window/menubarwindow.cxx
+++ b/vcl/source/window/menubarwindow.cxx
@@ -562,7 +562,7 @@ static int ImplGetTopDockingAreaHeight( vcl::Window *pWindow )
if ( pChildWin->GetType() == WINDOW_DOCKINGAREA )
pDockingArea = static_cast< DockingAreaWindow* >( pChildWin );
- if( pDockingArea && pDockingArea->GetAlign() == WINDOWALIGN_TOP &&
+ if( pDockingArea && pDockingArea->GetAlign() == WindowAlign::Top &&
pDockingArea->IsVisible() && pDockingArea->GetOutputSizePixel().Height() != 0 )
{
return pDockingArea->GetOutputSizePixel().Height();
diff --git a/vcl/source/window/splitwin.cxx b/vcl/source/window/splitwin.cxx
index 69c14f8363a0..fc5cc4730dd3 100644
--- a/vcl/source/window/splitwin.cxx
+++ b/vcl/source/window/splitwin.cxx
@@ -204,19 +204,19 @@ static void ImplCalcBorder( WindowAlign eAlign, bool bNoAlign,
{
switch ( eAlign )
{
- case WINDOWALIGN_TOP:
+ case WindowAlign::Top:
rLeft = 2;
rTop = 2;
rRight = 2;
rBottom = 0;
break;
- case WINDOWALIGN_LEFT:
+ case WindowAlign::Left:
rLeft = 0;
rTop = 2;
rRight = 2;
rBottom = 2;
break;
- case WINDOWALIGN_BOTTOM:
+ case WindowAlign::Bottom:
rLeft = 2;
rTop = 0;
rRight = 2;
@@ -249,7 +249,7 @@ void SplitWindow::ImplDrawBorder(vcl::RenderContext& rRenderContext)
{
switch (meAlign)
{
- case WINDOWALIGN_BOTTOM:
+ case WindowAlign::Bottom:
rRenderContext.SetLineColor(rStyleSettings.GetShadowColor());
rRenderContext.DrawLine(Point(0, 0), Point(nDX - 1, 0));
rRenderContext.DrawLine(Point(0, nDY - 2), Point(nDX - 1, nDY - 2));
@@ -258,7 +258,7 @@ void SplitWindow::ImplDrawBorder(vcl::RenderContext& rRenderContext)
rRenderContext.DrawLine(Point(0, 1), Point(nDX - 1, 1));
rRenderContext.DrawLine(Point(0, nDY - 1), Point(nDX - 1, nDY - 1));
break;
- case WINDOWALIGN_TOP:
+ case WindowAlign::Top:
rRenderContext.SetLineColor(rStyleSettings.GetShadowColor());
rRenderContext.DrawLine(Point(0, nDY - 2), Point(nDX - 1, nDY - 2));
rRenderContext.DrawLine(Point(0, 0), Point(nDX - 1, 0));
@@ -267,7 +267,7 @@ void SplitWindow::ImplDrawBorder(vcl::RenderContext& rRenderContext)
rRenderContext.DrawLine(Point(0, nDY - 1), Point(nDX - 1, nDY - 1));
rRenderContext.DrawLine(Point(0, 1), Point(nDX - 1, 1));
break;
- case WINDOWALIGN_LEFT:
+ case WindowAlign::Left:
rRenderContext.SetLineColor(rStyleSettings.GetShadowColor());
rRenderContext.DrawLine(Point(nDX - 2, 0), Point(nDX - 2, nDY - 2));
rRenderContext.DrawLine(Point(0, 0), Point(nDX - 1, 0));
@@ -302,28 +302,28 @@ void SplitWindow::ImplDrawBorderLine(vcl::RenderContext& rRenderContext)
switch (meAlign)
{
- case WINDOWALIGN_LEFT:
+ case WindowAlign::Left:
rRenderContext.SetLineColor( rStyleSettings.GetShadowColor() );
rRenderContext.DrawLine( Point( nDX-SPLITWIN_SPLITSIZEEXLN-1, 1 ), Point( nDX-SPLITWIN_SPLITSIZEEXLN-1, nDY-2 ) );
rRenderContext.SetLineColor( rStyleSettings.GetLightColor() );
rRenderContext.DrawLine( Point( nDX-SPLITWIN_SPLITSIZEEXLN, 1 ), Point( nDX-SPLITWIN_SPLITSIZEEXLN, nDY-3 ) );
break;
- case WINDOWALIGN_RIGHT:
+ case WindowAlign::Right:
rRenderContext.SetLineColor( rStyleSettings.GetShadowColor() );
rRenderContext.DrawLine( Point( SPLITWIN_SPLITSIZEEXLN-1, 0 ), Point( SPLITWIN_SPLITSIZEEXLN-1, nDY-2 ) );
rRenderContext.SetLineColor( rStyleSettings.GetLightColor() );
rRenderContext.DrawLine( Point( SPLITWIN_SPLITSIZEEXLN, 1 ), Point( SPLITWIN_SPLITSIZEEXLN, nDY-3 ) );
break;
- case WINDOWALIGN_TOP:
+ case WindowAlign::Top:
rRenderContext.SetLineColor( rStyleSettings.GetShadowColor() );
rRenderContext.DrawLine( Point( 0, nDY-SPLITWIN_SPLITSIZEEXLN-1 ), Point( nDX-1, nDY-SPLITWIN_SPLITSIZEEXLN-1 ) );
rRenderContext.SetLineColor( rStyleSettings.GetLightColor() );
rRenderContext.DrawLine( Point( 0, nDY-SPLITWIN_SPLITSIZEEXLN ), Point( nDX-1, nDY-SPLITWIN_SPLITSIZEEXLN ) );
break;
- case WINDOWALIGN_BOTTOM:
+ case WindowAlign::Bottom:
rRenderContext.SetLineColor( rStyleSettings.GetShadowColor() );
rRenderContext.DrawLine( Point( 0, 5 ), Point( nDX-1, 5 ) );
@@ -1321,7 +1321,7 @@ void SplitWindow::ImplInit( vcl::Window* pParent, WinBits nStyle )
mnBottomBorder = 0;
mnMaxSize = 0;
mnMouseOff = 0;
- meAlign = WINDOWALIGN_TOP;
+ meAlign = WindowAlign::Top;
mnWinStyle = nStyle;
mnSplitTest = 0;
mnSplitPos = 0;
@@ -1424,11 +1424,11 @@ void SplitWindow::ImplSetWindowSize( long nDelta )
Size aSize = GetSizePixel();
switch ( meAlign )
{
- case WINDOWALIGN_TOP:
+ case WindowAlign::Top:
aSize.Height() += nDelta;
SetSizePixel( aSize );
break;
- case WINDOWALIGN_BOTTOM:
+ case WindowAlign::Bottom:
{
maDragRect.Top() += nDelta;
Point aPos = GetPosPixel();
@@ -1437,11 +1437,11 @@ void SplitWindow::ImplSetWindowSize( long nDelta )
SetPosSizePixel( aPos, aSize );
break;
}
- case WINDOWALIGN_LEFT:
+ case WindowAlign::Left:
aSize.Width() += nDelta;
SetSizePixel( aSize );
break;
- case WINDOWALIGN_RIGHT:
+ case WindowAlign::Right:
default:
{
maDragRect.Left() += nDelta;
@@ -1498,17 +1498,17 @@ Size SplitWindow::CalcLayoutSizePixel( const Size& aNewSize )
switch ( meAlign )
{
- case WINDOWALIGN_TOP:
+ case WindowAlign::Top:
aSize.Height() += nDelta;
break;
- case WINDOWALIGN_BOTTOM:
+ case WindowAlign::Bottom:
aPos.Y() -= nDelta;
aSize.Height() += nDelta;
break;
- case WINDOWALIGN_LEFT:
+ case WindowAlign::Left:
aSize.Width() += nDelta;
break;
- case WINDOWALIGN_RIGHT:
+ case WindowAlign::Right:
default:
aPos.X() -= nDelta;
aSize.Width() += nDelta;
@@ -1660,7 +1660,7 @@ void SplitWindow::ImplGetButtonRect( Rectangle& rRect, long nEx, bool bTest ) co
switch ( meAlign )
{
- case WINDOWALIGN_TOP:
+ case WindowAlign::Top:
rRect.Left() = mnLeftBorder+nEx;
rRect.Top() = mnDY-mnBottomBorder-nSplitSize;
rRect.Right() = rRect.Left()+SPLITWIN_SPLITSIZEAUTOHIDE;
@@ -1671,7 +1671,7 @@ void SplitWindow::ImplGetButtonRect( Rectangle& rRect, long nEx, bool bTest ) co
rRect.Bottom() += mnBottomBorder;
}
break;
- case WINDOWALIGN_BOTTOM:
+ case WindowAlign::Bottom:
rRect.Left() = mnLeftBorder+nEx;
rRect.Top() = mnTopBorder;
rRect.Right() = rRect.Left()+SPLITWIN_SPLITSIZEAUTOHIDE;
@@ -1682,7 +1682,7 @@ void SplitWindow::ImplGetButtonRect( Rectangle& rRect, long nEx, bool bTest ) co
rRect.Bottom() += mnBottomBorder;
}
break;
- case WINDOWALIGN_LEFT:
+ case WindowAlign::Left:
rRect.Left() = mnDX-mnRightBorder-nSplitSize;
rRect.Top() = mnTopBorder+nEx;
rRect.Right() = mnDX-mnRightBorder-1;
@@ -1693,7 +1693,7 @@ void SplitWindow::ImplGetButtonRect( Rectangle& rRect, long nEx, bool bTest ) co
rRect.Right() += mnRightBorder;
}
break;
- case WINDOWALIGN_RIGHT:
+ case WindowAlign::Right:
rRect.Left() = mnLeftBorder;
rRect.Top() = mnTopBorder+nEx;
rRect.Right() = mnLeftBorder+nSplitSize-1;
@@ -1977,12 +1977,12 @@ void SplitWindow::ImplDrawFadeIn(vcl::RenderContext& rRenderContext, bool bInPai
bool bLeft = true;
switch (meAlign)
{
- case WINDOWALIGN_TOP:
- case WINDOWALIGN_LEFT:
+ case WindowAlign::Top:
+ case WindowAlign::Left:
bLeft = false;
break;
- case WINDOWALIGN_BOTTOM:
- case WINDOWALIGN_RIGHT:
+ case WindowAlign::Bottom:
+ case WindowAlign::Right:
default:
bLeft = true;
break;
@@ -1991,7 +1991,7 @@ void SplitWindow::ImplDrawFadeIn(vcl::RenderContext& rRenderContext, bool bInPai
if (!bInPaint)
rRenderContext.Erase(aTempRect);
- ImplDrawGrip(rRenderContext, aTempRect, (meAlign == WINDOWALIGN_TOP) || (meAlign == WINDOWALIGN_BOTTOM), bLeft);
+ ImplDrawGrip(rRenderContext, aTempRect, (meAlign == WindowAlign::Top) || (meAlign == WindowAlign::Bottom), bLeft);
}
}
@@ -2005,12 +2005,12 @@ void SplitWindow::ImplDrawFadeOut(vcl::RenderContext& rRenderContext, bool bInPa
bool bLeft = true;
switch (meAlign)
{
- case WINDOWALIGN_BOTTOM:
- case WINDOWALIGN_RIGHT:
+ case WindowAlign::Bottom:
+ case WindowAlign::Right:
bLeft = false;
break;
- case WINDOWALIGN_TOP:
- case WINDOWALIGN_LEFT:
+ case WindowAlign::Top:
+ case WindowAlign::Left:
default:
bLeft = true;
break;
@@ -2019,7 +2019,7 @@ void SplitWindow::ImplDrawFadeOut(vcl::RenderContext& rRenderContext, bool bInPa
if (!bInPaint)
rRenderContext.Erase(aTempRect);
- ImplDrawGrip(rRenderContext, aTempRect, (meAlign == WINDOWALIGN_TOP) || (meAlign == WINDOWALIGN_BOTTOM), bLeft);
+ ImplDrawGrip(rRenderContext, aTempRect, (meAlign == WindowAlign::Top) || (meAlign == WindowAlign::Bottom), bLeft);
}
}
@@ -3200,19 +3200,19 @@ void SplitWindow::ImplNewAlign()
{
switch ( meAlign )
{
- case WINDOWALIGN_TOP:
+ case WindowAlign::Top:
mbHorz = true;
mbBottomRight = false;
break;
- case WINDOWALIGN_BOTTOM:
+ case WindowAlign::Bottom:
mbHorz = true;
mbBottomRight = true;
break;
- case WINDOWALIGN_LEFT:
+ case WindowAlign::Left:
mbHorz = false;
mbBottomRight = false;
break;
- case WINDOWALIGN_RIGHT:
+ case WindowAlign::Right:
mbHorz = false;
mbBottomRight = true;
break;
diff --git a/vcl/source/window/tabdlg.cxx b/vcl/source/window/tabdlg.cxx
index 1080cb8eb421..c5bea40f1278 100644
--- a/vcl/source/window/tabdlg.cxx
+++ b/vcl/source/window/tabdlg.cxx
@@ -27,7 +27,7 @@ void TabDialog::ImplInitTabDialogData()
{
mpFixedLine = NULL;
mpViewWindow = NULL;
- meViewAlign = WINDOWALIGN_LEFT;
+ meViewAlign = WindowAlign::Left;
mbPosControls = true;
}
@@ -97,7 +97,7 @@ void TabDialog::ImplPosControls()
long nViewHeight = 0;
PosSizeFlags nViewPosFlags = PosSizeFlags::Pos;
Size aViewSize = mpViewWindow->GetSizePixel();
- if ( meViewAlign == WINDOWALIGN_TOP )
+ if ( meViewAlign == WindowAlign::Top )
{
nViewOffX = aTabOffset.X();
nViewOffY = nOffY+IMPL_DIALOG_OFFSET;
@@ -106,7 +106,7 @@ void TabDialog::ImplPosControls()
aTabOffset.Y() += aViewSize.Height()+IMPL_DIALOG_OFFSET;
aDlgSize.Height() += aViewSize.Height()+IMPL_DIALOG_OFFSET;
}
- else if ( meViewAlign == WINDOWALIGN_BOTTOM )
+ else if ( meViewAlign == WindowAlign::Bottom )
{
nViewOffX = aTabOffset.X();
nViewOffY = aTabOffset.Y()+aTabSize.Height()+IMPL_DIALOG_OFFSET;
@@ -114,7 +114,7 @@ void TabDialog::ImplPosControls()
nViewPosFlags |= PosSizeFlags::Width;
aDlgSize.Height() += aViewSize.Height()+IMPL_DIALOG_OFFSET;
}
- else if ( meViewAlign == WINDOWALIGN_RIGHT )
+ else if ( meViewAlign == WindowAlign::Right )
{
nViewOffX = aTabOffset.X()+aTabSize.Width()+IMPL_DIALOG_OFFSET;
nViewOffY = aTabOffset.Y();
@@ -123,7 +123,7 @@ void TabDialog::ImplPosControls()
aDlgSize.Width() += aViewSize.Width()+IMPL_DIALOG_OFFSET;
nBtnEx = aViewSize.Width()+IMPL_DIALOG_OFFSET;
}
- else // meViewAlign == WINDOWALIGN_LEFT
+ else // meViewAlign == WindowAlign::Left
{
nViewOffX = IMPL_DIALOG_OFFSET;
nViewOffY = aTabOffset.Y();
diff --git a/vcl/source/window/toolbox.cxx b/vcl/source/window/toolbox.cxx
index 0100068259d2..09847f88a28a 100644
--- a/vcl/source/window/toolbox.cxx
+++ b/vcl/source/window/toolbox.cxx
@@ -189,7 +189,7 @@ void ToolBox::ImplUpdateDragArea( ToolBox *pThis )
pWrapper->SetDragArea( Rectangle() );
else
{
- if( pThis->meAlign == WINDOWALIGN_TOP || pThis->meAlign == WINDOWALIGN_BOTTOM )
+ if( pThis->meAlign == WindowAlign::Top || pThis->meAlign == WindowAlign::Bottom )
pWrapper->SetDragArea( Rectangle( 0, 0, ImplGetDragWidth( pThis ), pThis->GetOutputSizePixel().Height() ) );
else
pWrapper->SetDragArea( Rectangle( 0, 0, pThis->GetOutputSizePixel().Width(), ImplGetDragWidth( pThis ) ) );
@@ -215,21 +215,21 @@ void ToolBox::ImplCalcBorder( WindowAlign eAlign, long& rLeft, long& rTop,
// no shadow border for dockable toolbars
int borderwidth = pWrapper ? 0: 2;
- if ( eAlign == WINDOWALIGN_TOP )
+ if ( eAlign == WindowAlign::Top )
{
rLeft = borderwidth+dragwidth;
rTop = borderwidth;
rRight = borderwidth;
rBottom = 0;
}
- else if ( eAlign == WINDOWALIGN_LEFT )
+ else if ( eAlign == WindowAlign::Left )
{
rLeft = borderwidth;
rTop = borderwidth+dragwidth;
rRight = 0;
rBottom = borderwidth;
}
- else if ( eAlign == WINDOWALIGN_BOTTOM )
+ else if ( eAlign == WindowAlign::Bottom )
{
rLeft = borderwidth+dragwidth;
rTop = 0;
@@ -287,7 +287,7 @@ void ToolBox::ImplDrawGrip(vcl::RenderContext& rRenderContext)
Size aSz(GetOutputSizePixel());
- if (meAlign == WINDOWALIGN_TOP || meAlign == WINDOWALIGN_BOTTOM)
+ if (meAlign == WindowAlign::Top || meAlign == WindowAlign::Bottom)
{
int height = (int) (0.6 * aSz.Height() + 0.5);
int i = (aSz.Height() - height) / 2;
@@ -533,9 +533,9 @@ void ToolBox::ImplDrawBackground(vcl::RenderContext& rRenderContext, const Recta
const StyleSettings rSetting = Application::GetSettings().GetStyleSettings();
if (!bNativeOk)
{
- const bool isFooter = GetAlign() == WINDOWALIGN_BOTTOM && !rSetting.GetPersonaFooter().IsEmpty();
+ const bool isFooter = GetAlign() == WindowAlign::Bottom && !rSetting.GetPersonaFooter().IsEmpty();
if (!IsBackground() ||
- ((GetAlign() == WINDOWALIGN_TOP && !rSetting.GetPersonaHeader().IsEmpty() ) || isFooter))
+ ((GetAlign() == WindowAlign::Top && !rSetting.GetPersonaHeader().IsEmpty() ) || isFooter))
{
if (!IsInPaint())
ImplDrawTransparentBackground(rRenderContext, aPaintRegion);
@@ -589,7 +589,7 @@ void ToolBox::ImplDrawBorder(vcl::RenderContext& rRenderContext)
if( pWrapper )
return;
- if (meAlign == WINDOWALIGN_BOTTOM)
+ if (meAlign == WindowAlign::Bottom)
{
// draw bottom border
rRenderContext.SetLineColor( rStyleSettings.GetShadowColor() );
@@ -605,9 +605,9 @@ void ToolBox::ImplDrawBorder(vcl::RenderContext& rRenderContext)
rRenderContext.SetLineColor( rStyleSettings.GetLightColor() );
rRenderContext.DrawLine( Point( 0, 1 ), Point( nDX-1, 1 ) );
- if (meAlign == WINDOWALIGN_LEFT || meAlign == WINDOWALIGN_RIGHT)
+ if (meAlign == WindowAlign::Left || meAlign == WindowAlign::Right)
{
- if (meAlign == WINDOWALIGN_LEFT)
+ if (meAlign == WindowAlign::Left)
{
// draw left-bottom border
rRenderContext.SetLineColor( rStyleSettings.GetShadowColor() );
@@ -630,7 +630,7 @@ void ToolBox::ImplDrawBorder(vcl::RenderContext& rRenderContext)
}
}
- if ( meAlign == WINDOWALIGN_BOTTOM || meAlign == WINDOWALIGN_TOP )
+ if ( meAlign == WindowAlign::Bottom || meAlign == WindowAlign::Top )
{
// draw right border
rRenderContext.SetLineColor( rStyleSettings.GetShadowColor() );
@@ -684,18 +684,18 @@ Size ToolBox::ImplCalcSize( const ToolBox* pThis, sal_uInt16 nCalcLines, sal_uIn
if ( nCalcMode == TB_CALCMODE_HORZ )
{
pThis->mpData->mbAssumeDocked = true; // force non-floating mode during calculation
- ImplCalcBorder( WINDOWALIGN_TOP, nLeft, nTop, nRight, nBottom, pThis );
+ ImplCalcBorder( WindowAlign::Top, nLeft, nTop, nRight, nBottom, pThis );
const_cast<ToolBox*>(pThis)->mbHorz = true;
if ( pThis->mbHorz != bOldHorz )
- const_cast<ToolBox*>(pThis)->meAlign = WINDOWALIGN_TOP;
+ const_cast<ToolBox*>(pThis)->meAlign = WindowAlign::Top;
}
else if ( nCalcMode == TB_CALCMODE_VERT )
{
pThis->mpData->mbAssumeDocked = true; // force non-floating mode during calculation
- ImplCalcBorder( WINDOWALIGN_LEFT, nLeft, nTop, nRight, nBottom, pThis );
+ ImplCalcBorder( WindowAlign::Left, nLeft, nTop, nRight, nBottom, pThis );
const_cast<ToolBox*>(pThis)->mbHorz = false;
if ( pThis->mbHorz != bOldHorz )
- const_cast<ToolBox*>(pThis)->meAlign = WINDOWALIGN_LEFT;
+ const_cast<ToolBox*>(pThis)->meAlign = WindowAlign::Left;
}
else if ( nCalcMode == TB_CALCMODE_FLOAT )
{
@@ -703,7 +703,7 @@ Size ToolBox::ImplCalcSize( const ToolBox* pThis, sal_uInt16 nCalcLines, sal_uIn
nLeft = nTop = nRight = nBottom = 0;
const_cast<ToolBox*>(pThis)->mbHorz = true;
if ( pThis->mbHorz != bOldHorz )
- const_cast<ToolBox*>(pThis)->meAlign = WINDOWALIGN_TOP;
+ const_cast<ToolBox*>(pThis)->meAlign = WindowAlign::Top;
}
if ( (pThis->meAlign != eOldAlign) || (pThis->mbHorz != bOldHorz) ||
@@ -945,22 +945,22 @@ sal_uInt16 ToolBox::ImplTestLineSize( ToolBox* pThis, const Point& rPos )
{
WindowAlign eAlign = pThis->GetAlign();
- if ( eAlign == WINDOWALIGN_LEFT )
+ if ( eAlign == WindowAlign::Left )
{
if ( rPos.X() > pThis->mnDX-DOCK_LINEOFFSET )
return DOCK_LINEHSIZE | DOCK_LINERIGHT;
}
- else if ( eAlign == WINDOWALIGN_TOP )
+ else if ( eAlign == WindowAlign::Top )
{
if ( rPos.Y() > pThis->mnDY-DOCK_LINEOFFSET )
return DOCK_LINEVSIZE | DOCK_LINEBOTTOM;
}
- else if ( eAlign == WINDOWALIGN_RIGHT )
+ else if ( eAlign == WindowAlign::Right )
{
if ( rPos.X() < DOCK_LINEOFFSET )
return DOCK_LINEHSIZE | DOCK_LINELEFT;
}
- else if ( eAlign == WINDOWALIGN_BOTTOM )
+ else if ( eAlign == WindowAlign::Bottom )
{
if ( rPos.Y() < DOCK_LINEOFFSET )
return DOCK_LINEVSIZE | DOCK_LINETOP;
@@ -1395,7 +1395,7 @@ void ToolBox::ImplInit( vcl::Window* pParent, WinBits nStyle )
mbIsKeyEvent = false;
mbChangingHighlight = false;
meButtonType = ButtonType::SYMBOLONLY;
- meAlign = WINDOWALIGN_TOP;
+ meAlign = WindowAlign::Top;
meLastStyle = PointerStyle::Arrow;
mnWinStyle = nStyle;
meLayoutMode = TBX_LAYOUT_NORMAL;
@@ -1456,8 +1456,8 @@ void ToolBox::ApplySettings(vcl::RenderContext& rRenderContext)
else
{
if (rRenderContext.IsNativeControlSupported(CTRL_TOOLBAR, PART_ENTIRE_CONTROL)
- || (GetAlign() == WINDOWALIGN_TOP && !Application::GetSettings().GetStyleSettings().GetPersonaHeader().IsEmpty())
- || (GetAlign() == WINDOWALIGN_BOTTOM && !Application::GetSettings().GetStyleSettings().GetPersonaFooter().IsEmpty()))
+ || (GetAlign() == WindowAlign::Top && !Application::GetSettings().GetStyleSettings().GetPersonaHeader().IsEmpty())
+ || (GetAlign() == WindowAlign::Bottom && !Application::GetSettings().GetStyleSettings().GetPersonaFooter().IsEmpty()))
{
rRenderContext.SetBackground();
rRenderContext.SetTextColor(rStyleSettings.GetMenuBarTextColor());
@@ -1519,8 +1519,8 @@ void ToolBox::ImplInitSettings(bool bFont, bool bForeground, bool bBackground)
else
{
if (IsNativeControlSupported(CTRL_TOOLBAR, PART_ENTIRE_CONTROL)
- || (GetAlign() == WINDOWALIGN_TOP && !Application::GetSettings().GetStyleSettings().GetPersonaHeader().IsEmpty())
- || (GetAlign() == WINDOWALIGN_BOTTOM && !Application::GetSettings().GetStyleSettings().GetPersonaFooter().IsEmpty()))
+ || (GetAlign() == WindowAlign::Top && !Application::GetSettings().GetStyleSettings().GetPersonaHeader().IsEmpty())
+ || (GetAlign() == WindowAlign::Bottom && !Application::GetSettings().GetStyleSettings().GetPersonaFooter().IsEmpty()))
{
SetBackground();
SetTextColor(rStyleSettings.GetMenuBarTextColor());
@@ -3213,7 +3213,7 @@ void ToolBox::ImplDrawItem(vcl::RenderContext& rRenderContext, sal_uInt16 nPos,
// rotate text when vertically docked
vcl::Font aOldFont = rRenderContext.GetFont();
if( pItem->mbVisibleText && !ImplIsFloatingMode() &&
- ((meAlign == WINDOWALIGN_LEFT) || (meAlign == WINDOWALIGN_RIGHT)) )
+ ((meAlign == WindowAlign::Left) || (meAlign == WindowAlign::Right)) )
{
bRotate = true;
@@ -3679,14 +3679,14 @@ void ToolBox::MouseMove( const MouseEvent& rMEvt )
sal_uInt16 nLinePtr = ImplTestLineSize( this, rMEvt.GetPosPixel() );
if ( nLinePtr & DOCK_LINEHSIZE )
{
- if ( meAlign == WINDOWALIGN_LEFT )
+ if ( meAlign == WindowAlign::Left )
eStyle = PointerStyle::WindowESize;
else
eStyle = PointerStyle::WindowWSize;
}
else if ( nLinePtr & DOCK_LINEVSIZE )
{
- if ( meAlign == WINDOWALIGN_TOP )
+ if ( meAlign == WindowAlign::Top )
eStyle = PointerStyle::WindowSSize;
else
eStyle = PointerStyle::WindowNSize;
@@ -4573,7 +4573,7 @@ void ToolBox::ToggleFloatingMode()
if ( ImplIsFloatingMode() )
{
mbHorz = true;
- meAlign = WINDOWALIGN_TOP;
+ meAlign = WindowAlign::Top;
mbScroll = true;
if( mbOldHorz != mbHorz )
@@ -4585,7 +4585,7 @@ void ToolBox::ToggleFloatingMode()
else
{
mbScroll = (mnWinStyle & WB_SCROLL) != 0;
- if ( (meAlign == WINDOWALIGN_TOP) || (meAlign == WINDOWALIGN_BOTTOM) )
+ if ( (meAlign == WindowAlign::Top) || (meAlign == WindowAlign::Bottom) )
mbHorz = true;
else
mbHorz = false;
@@ -4677,16 +4677,16 @@ bool ToolBox::Docking( const Point& rPos, Rectangle& rRect )
Size aInSize = aInRect.GetSize();
if ( aInPosTL.X() <= 0 )
- meDockAlign = WINDOWALIGN_LEFT;
+ meDockAlign = WindowAlign::Left;
else if ( aInPosTL.Y() <= 0)
- meDockAlign = WINDOWALIGN_TOP;
+ meDockAlign = WindowAlign::Top;
else if ( aInPosBR.X() >= aInSize.Width() )
- meDockAlign = WINDOWALIGN_RIGHT;
+ meDockAlign = WindowAlign::Right;
else if ( aInPosBR.Y() >= aInSize.Height() )
- meDockAlign = WINDOWALIGN_BOTTOM;
+ meDockAlign = WindowAlign::Bottom;
// update the Dock size if Dock-Align was changed
- if ( (meDockAlign == WINDOWALIGN_TOP) || (meDockAlign == WINDOWALIGN_BOTTOM) )
+ if ( (meDockAlign == WindowAlign::Top) || (meDockAlign == WindowAlign::Bottom) )
aDockSize.Width() = maInDockRect.GetWidth();
else
aDockSize.Height() = maInDockRect.GetHeight();
@@ -4696,20 +4696,20 @@ bool ToolBox::Docking( const Point& rPos, Rectangle& rRect )
Point aPosTL( maInDockRect.TopLeft() );
switch ( meDockAlign )
{
- case WINDOWALIGN_TOP :
+ case WindowAlign::Top :
aDockingRect.SetPos( aPosTL );
break;
- case WINDOWALIGN_LEFT :
+ case WindowAlign::Left :
aDockingRect.SetPos( aPosTL );
break;
- case WINDOWALIGN_BOTTOM :
+ case WindowAlign::Bottom :
{
Point aPosBL( maInDockRect.BottomLeft() );
aPosBL.Y() -= aDockingRect.GetHeight();
aDockingRect.SetPos( aPosBL );
break;
}
- case WINDOWALIGN_RIGHT :
+ case WindowAlign::Right :
{
Point aPosTR( maInDockRect.TopRight() );
aPosTR.X() -= aDockingRect.GetWidth();
@@ -4829,7 +4829,7 @@ Size ToolBox::CalcWindowSizePixel( sal_uInt16 nCalcLines ) const
Size ToolBox::CalcWindowSizePixel( sal_uInt16 nCalcLines, WindowAlign eAlign ) const
{
return ImplCalcSize( this, nCalcLines,
- (eAlign == WINDOWALIGN_TOP || eAlign == WINDOWALIGN_BOTTOM) ? TB_CALCMODE_HORZ : TB_CALCMODE_VERT );
+ (eAlign == WindowAlign::Top || eAlign == WindowAlign::Bottom) ? TB_CALCMODE_HORZ : TB_CALCMODE_VERT );
}
sal_uInt16 ToolBox::ImplCountLineBreaks( const ToolBox *pThis )
diff --git a/vcl/source/window/toolbox2.cxx b/vcl/source/window/toolbox2.cxx
index 856b807c6782..7bd7610b48bc 100644
--- a/vcl/source/window/toolbox2.cxx
+++ b/vcl/source/window/toolbox2.cxx
@@ -826,7 +826,7 @@ void ToolBox::SetAlign( WindowAlign eNewAlign )
if ( !ImplIsFloatingMode() )
{
// set horizontal/vertical alignment
- if ( (eNewAlign == WINDOWALIGN_LEFT) || (eNewAlign == WINDOWALIGN_RIGHT) )
+ if ( (eNewAlign == WindowAlign::Left) || (eNewAlign == WindowAlign::Right) )
mbHorz = false;
else
mbHorz = true;
@@ -974,14 +974,14 @@ Point ToolBox::ImplGetPopupPosition( const Rectangle& rRect, const Size& rSize )
Point devPos; // the position in device coordinates for screen comparison
switch( meAlign )
{
- case WINDOWALIGN_TOP:
+ case WindowAlign::Top:
aPos = rRect.BottomLeft();
aPos.Y()++;
devPos = OutputToAbsoluteScreenPixel( aPos );
if( devPos.Y() + rSize.Height() >= aScreen.Bottom() )
aPos.Y() = rRect.Top() - rSize.Height();
break;
- case WINDOWALIGN_BOTTOM:
+ case WindowAlign::Bottom:
aPos = rRect.TopLeft();
aPos.Y()--;
devPos = OutputToAbsoluteScreenPixel( aPos );
@@ -990,14 +990,14 @@ Point ToolBox::ImplGetPopupPosition( const Rectangle& rRect, const Size& rSize )
else
aPos.Y() = rRect.Bottom();
break;
- case WINDOWALIGN_LEFT:
+ case WindowAlign::Left:
aPos = rRect.TopRight();
aPos.X()++;
devPos = OutputToAbsoluteScreenPixel( aPos );
if( devPos.X() + rSize.Width() >= aScreen.Right() )
aPos.X() = rRect.Left() - rSize.Width();
break;
- case WINDOWALIGN_RIGHT:
+ case WindowAlign::Right:
aPos = rRect.TopLeft();
aPos.X()--;
devPos = OutputToAbsoluteScreenPixel( aPos );