summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2016-05-29 12:52:29 +0200
committerNoel Grandin <noelgrandin@gmail.com>2016-05-30 06:36:21 +0000
commit06cb2df4dba489d83c44babc2b36f91ec9fde5c9 (patch)
tree60fe7312ed0de3ffd3eddc2a90e449086a8aed9c /vcl
parenta6dacbe1d7d17283c20c75d3c97f72a0f876a716 (diff)
Convert VclAlign to scoped enum
Change-Id: I03718cc63ec5c1260ebd599bddb1a787ca8f5788 Reviewed-on: https://gerrit.libreoffice.org/25603 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/window/layout.cxx20
-rw-r--r--vcl/source/window/window.cxx4
-rw-r--r--vcl/source/window/window2.cxx10
3 files changed, 17 insertions, 17 deletions
diff --git a/vcl/source/window/layout.cxx b/vcl/source/window/layout.cxx
index 5e82e4a7c017..b099a9681021 100644
--- a/vcl/source/window/layout.cxx
+++ b/vcl/source/window/layout.cxx
@@ -56,7 +56,7 @@ void VclContainer::setLayoutAllocation(vcl::Window &rChild, const Point &rAllocP
VclAlign eValign = rChild.get_valign();
//typical case
- if (eHalign == VCL_ALIGN_FILL && eValign == VCL_ALIGN_FILL)
+ if (eHalign == VclAlign::Fill && eValign == VclAlign::Fill)
{
setLayoutPosSize(rChild, rAllocPos, rChildAlloc);
return;
@@ -68,19 +68,19 @@ void VclContainer::setLayoutAllocation(vcl::Window &rChild, const Point &rAllocP
switch (eHalign)
{
- case VCL_ALIGN_FILL:
+ case VclAlign::Fill:
break;
- case VCL_ALIGN_START:
+ case VclAlign::Start:
if (aChildPreferredSize.Width() < rChildAlloc.Width())
aChildSize.Width() = aChildPreferredSize.Width();
break;
- case VCL_ALIGN_END:
+ case VclAlign::End:
if (aChildPreferredSize.Width() < rChildAlloc.Width())
aChildSize.Width() = aChildPreferredSize.Width();
aChildPos.X() += rChildAlloc.Width();
aChildPos.X() -= aChildSize.Width();
break;
- case VCL_ALIGN_CENTER:
+ case VclAlign::Center:
if (aChildPreferredSize.Width() < aChildSize.Width())
aChildSize.Width() = aChildPreferredSize.Width();
aChildPos.X() += (rChildAlloc.Width() - aChildSize.Width()) / 2;
@@ -89,19 +89,19 @@ void VclContainer::setLayoutAllocation(vcl::Window &rChild, const Point &rAllocP
switch (eValign)
{
- case VCL_ALIGN_FILL:
+ case VclAlign::Fill:
break;
- case VCL_ALIGN_START:
+ case VclAlign::Start:
if (aChildPreferredSize.Height() < rChildAlloc.Height())
aChildSize.Height() = aChildPreferredSize.Height();
break;
- case VCL_ALIGN_END:
+ case VclAlign::End:
if (aChildPreferredSize.Height() < rChildAlloc.Height())
aChildSize.Height() = aChildPreferredSize.Height();
aChildPos.Y() += rChildAlloc.Height();
aChildPos.Y() -= aChildSize.Height();
break;
- case VCL_ALIGN_CENTER:
+ case VclAlign::Center:
if (aChildPreferredSize.Height() < aChildSize.Height())
aChildSize.Height() = aChildPreferredSize.Height();
aChildPos.Y() += (rChildAlloc.Height() - aChildSize.Height()) / 2;
@@ -2171,7 +2171,7 @@ short MessageDialog::Execute()
}
m_pImage->set_grid_left_attach(0);
m_pImage->set_grid_top_attach(0);
- m_pImage->set_valign(VCL_ALIGN_START);
+ m_pImage->set_valign(VclAlign::Start);
m_pImage->Show();
WinBits nWinStyle = WB_CLIPCHILDREN | WB_LEFT | WB_VCENTER | WB_NOLABEL | WB_NOTABSTOP;
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index 83ae01cd4bf0..140ad6029f0c 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -638,8 +638,8 @@ WindowImpl::WindowImpl( WindowType nType )
mnDlgCtrlFlags = DialogControlFlags::NONE; // DialogControl-Flags
mnLockCount = 0; // LockCount
meAlwaysInputMode = AlwaysInputNone; // neither AlwaysEnableInput nor AlwaysDisableInput called
- meHalign = VCL_ALIGN_FILL;
- meValign = VCL_ALIGN_FILL;
+ meHalign = VclAlign::Fill;
+ meValign = VclAlign::Fill;
mePackType = VclPackType::Start;
mnPadding = 0;
mnGridHeight = 1;
diff --git a/vcl/source/window/window2.cxx b/vcl/source/window/window2.cxx
index cd67ca6e72f4..00475f1bb626 100644
--- a/vcl/source/window/window2.cxx
+++ b/vcl/source/window/window2.cxx
@@ -1420,16 +1420,16 @@ namespace
{
VclAlign toAlign(const OString &rValue)
{
- VclAlign eRet = VCL_ALIGN_FILL;
+ VclAlign eRet = VclAlign::Fill;
if (rValue == "fill")
- eRet = VCL_ALIGN_FILL;
+ eRet = VclAlign::Fill;
else if (rValue == "start")
- eRet = VCL_ALIGN_START;
+ eRet = VclAlign::Start;
else if (rValue == "end")
- eRet = VCL_ALIGN_END;
+ eRet = VclAlign::End;
else if (rValue == "center")
- eRet = VCL_ALIGN_CENTER;
+ eRet = VclAlign::Center;
return eRet;
}
}