summaryrefslogtreecommitdiff
path: root/vcl/source/window
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2016-12-21 15:51:29 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2016-12-22 06:43:06 +0000
commit21907d647c58594e58fde0d6507f63f6207fe4bd (patch)
tree498386823efa6f98c5ee94948c31db231570d925 /vcl/source/window
parent29fa61837f11c6149157f1c2dd850415a38a3e47 (diff)
convert VclSizeGroupMode to scoped enum
Change-Id: Id731fb3d5f9eb5ddaa3af41b010bff340f1077ce Reviewed-on: https://gerrit.libreoffice.org/32290 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl/source/window')
-rw-r--r--vcl/source/window/layout.cxx10
-rw-r--r--vcl/source/window/window2.cxx12
2 files changed, 11 insertions, 11 deletions
diff --git a/vcl/source/window/layout.cxx b/vcl/source/window/layout.cxx
index 9a5165830a3a..0b8795a27d11 100644
--- a/vcl/source/window/layout.cxx
+++ b/vcl/source/window/layout.cxx
@@ -2135,15 +2135,15 @@ bool VclSizeGroup::set_property(const OString &rKey, const OString &rValue)
set_ignore_hidden(toBool(rValue));
else if (rKey == "mode")
{
- VclSizeGroupMode eMode = VCL_SIZE_GROUP_HORIZONTAL;
+ VclSizeGroupMode eMode = VclSizeGroupMode::Horizontal;
if (rValue.equals("none"))
- eMode = VCL_SIZE_GROUP_NONE;
+ eMode = VclSizeGroupMode::NONE;
else if (rValue.equals("horizontal"))
- eMode = VCL_SIZE_GROUP_HORIZONTAL;
+ eMode = VclSizeGroupMode::Horizontal;
else if (rValue.equals("vertical"))
- eMode = VCL_SIZE_GROUP_VERTICAL;
+ eMode = VclSizeGroupMode::Vertical;
else if (rValue.equals("both"))
- eMode = VCL_SIZE_GROUP_BOTH;
+ eMode = VclSizeGroupMode::Both;
else
{
SAL_WARN("vcl.layout", "unknown size group mode" << rValue.getStr());
diff --git a/vcl/source/window/window2.cxx b/vcl/source/window/window2.cxx
index beeb364d071b..b6f4ea4d6ba5 100644
--- a/vcl/source/window/window2.cxx
+++ b/vcl/source/window/window2.cxx
@@ -1367,7 +1367,7 @@ void Window::queue_resize(StateChangedType eReason)
}
WindowImpl *pWindowImpl = mpWindowImpl->mpBorderWindow ? mpWindowImpl->mpBorderWindow->mpWindowImpl.get() : mpWindowImpl.get();
- if (pWindowImpl->m_xSizeGroup && pWindowImpl->m_xSizeGroup->get_mode() != VCL_SIZE_GROUP_NONE)
+ if (pWindowImpl->m_xSizeGroup && pWindowImpl->m_xSizeGroup->get_mode() != VclSizeGroupMode::NONE)
{
std::set<VclPtr<vcl::Window> > &rWindows = pWindowImpl->m_xSizeGroup->get_widgets();
for (VclPtr<vcl::Window> const & pOther : rWindows)
@@ -1665,7 +1665,7 @@ Size Window::get_preferred_size() const
if (pWindowImpl->m_xSizeGroup)
{
const VclSizeGroupMode eMode = pWindowImpl->m_xSizeGroup->get_mode();
- if (eMode != VCL_SIZE_GROUP_NONE)
+ if (eMode != VclSizeGroupMode::NONE)
{
const bool bIgnoreInHidden = pWindowImpl->m_xSizeGroup->get_ignore_hidden();
const std::set<VclPtr<vcl::Window> > &rWindows = pWindowImpl->m_xSizeGroup->get_widgets();
@@ -1677,9 +1677,9 @@ Size Window::get_preferred_size() const
if (bIgnoreInHidden && !pOther->IsVisible())
continue;
Size aOtherSize = pOther->get_ungrouped_preferred_size();
- if (eMode == VCL_SIZE_GROUP_BOTH || eMode == VCL_SIZE_GROUP_HORIZONTAL)
+ if (eMode == VclSizeGroupMode::Both || eMode == VclSizeGroupMode::Horizontal)
aRet.Width() = std::max(aRet.Width(), aOtherSize.Width());
- if (eMode == VCL_SIZE_GROUP_BOTH || eMode == VCL_SIZE_GROUP_VERTICAL)
+ if (eMode == VclSizeGroupMode::Both || eMode == VclSizeGroupMode::Vertical)
aRet.Height() = std::max(aRet.Height(), aOtherSize.Height());
}
}
@@ -1934,7 +1934,7 @@ void Window::add_to_size_group(const std::shared_ptr<VclSizeGroup>& xGroup)
//To-Do, multiple groups
pWindowImpl->m_xSizeGroup = xGroup;
pWindowImpl->m_xSizeGroup->insert(this);
- if (VCL_SIZE_GROUP_NONE != pWindowImpl->m_xSizeGroup->get_mode())
+ if (VclSizeGroupMode::NONE != pWindowImpl->m_xSizeGroup->get_mode())
queue_resize();
}
@@ -1944,7 +1944,7 @@ void Window::remove_from_all_size_groups()
//To-Do, multiple groups
if (pWindowImpl->m_xSizeGroup)
{
- if (VCL_SIZE_GROUP_NONE != pWindowImpl->m_xSizeGroup->get_mode())
+ if (VclSizeGroupMode::NONE != pWindowImpl->m_xSizeGroup->get_mode())
queue_resize();
pWindowImpl->m_xSizeGroup->erase(this);
pWindowImpl->m_xSizeGroup.reset();