summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--extensions/source/bibliography/general.cxx2
-rw-r--r--include/vcl/vclenum.hxx10
-rw-r--r--vcl/source/window/layout.cxx20
-rw-r--r--vcl/source/window/window.cxx4
-rw-r--r--vcl/source/window/window2.cxx10
5 files changed, 23 insertions, 23 deletions
diff --git a/extensions/source/bibliography/general.cxx b/extensions/source/bibliography/general.cxx
index 2e422250ea6d..14c256ab0c46 100644
--- a/extensions/source/bibliography/general.cxx
+++ b/extensions/source/bibliography/general.cxx
@@ -505,7 +505,7 @@ uno::Reference< awt::XControlModel > BibGeneralPage::AddXControl(
vcl::Window* pWindow = VCLUnoHelper::GetWindow(xControl->getPeer());
pWindow->set_grid_top_attach(rLabel.get_grid_top_attach());
pWindow->set_grid_left_attach(rLabel.get_grid_left_attach()+1);
- pWindow->set_valign(VCL_ALIGN_CENTER);
+ pWindow->set_valign(VclAlign::Center);
rLabel.set_mnemonic_widget(pWindow);
if (&rLabel == pTitleFT)
pWindow->set_grid_width(3);
diff --git a/include/vcl/vclenum.hxx b/include/vcl/vclenum.hxx
index 8dcafe16dcd1..d6d918031649 100644
--- a/include/vcl/vclenum.hxx
+++ b/include/vcl/vclenum.hxx
@@ -99,12 +99,12 @@ inline bool operator !=(const ItalicMatrix& a, const ItalicMatrix& b)
return a.xx != b.xx || a.xy != b.xy || a.yx != b.yx || a.yy != b.yy;
}
-enum VclAlign
+enum class VclAlign
{
- VCL_ALIGN_FILL,
- VCL_ALIGN_START,
- VCL_ALIGN_END,
- VCL_ALIGN_CENTER
+ Fill,
+ Start,
+ End,
+ Center
};
enum class VclPackType
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;
}
}