diff options
author | Michael Weghorn <m.weghorn@posteo.de> | 2024-11-30 03:13:19 +0100 |
---|---|---|
committer | Michael Weghorn <m.weghorn@posteo.de> | 2024-11-30 09:41:49 +0100 |
commit | 2fe4500628ec7d98719b58ee98f0e227d536799c (patch) | |
tree | b8b0e4b04c308f0101891e747b558448fd10e470 /vcl/source/window | |
parent | de7cfac4df2d32da2eb75affffe3c36e0b89adbf (diff) |
vcl: Drop local var pointing to self in WindowData ctor
Before
commit 2e509b886f1d77ef158579385b55f1f94cfbc710
Date: Sun Jun 12 17:42:05 2022 +0200
Convert ImplWindowStateFromStr to WindowData(str)
, `rData` was a method param for ImplWindowStateFromStr.
Now, using it instead of just using `this` is
unnecessary.
Change-Id: I7974161990375e44d4d78097e49a9f42e118bcce
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177579
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
Diffstat (limited to 'vcl/source/window')
-rw-r--r-- | vcl/source/window/syswin.cxx | 71 |
1 files changed, 35 insertions, 36 deletions
diff --git a/vcl/source/window/syswin.cxx b/vcl/source/window/syswin.cxx index dddbe7741dea..810f1c5cf4ff 100644 --- a/vcl/source/window/syswin.cxx +++ b/vcl/source/window/syswin.cxx @@ -400,62 +400,61 @@ const Size& SystemWindow::GetMaxOutputSizePixel() const vcl::WindowData::WindowData(std::u16string_view rStr) { - vcl::WindowData& rData = *this; vcl::WindowDataMask nValidMask = vcl::WindowDataMask::NONE; sal_Int32 nIndex = 0; std::u16string_view aTokenStr = o3tl::getToken(rStr, 0, ',', nIndex); if (!aTokenStr.empty()) { - rData.setX(o3tl::toInt32(aTokenStr)); - if (rData.x() > -16384 && rData.x() < 16384) + setX(o3tl::toInt32(aTokenStr)); + if (x() > -16384 && x() < 16384) nValidMask |= vcl::WindowDataMask::X; else - rData.setX(0); + setX(0); } else - rData.setX(0); + setX(0); aTokenStr = o3tl::getToken(rStr, 0, ',', nIndex); if (!aTokenStr.empty()) { - rData.setY(o3tl::toInt32(aTokenStr)); - if (rData.y() > -16384 && rData.y() < 16384) + setY(o3tl::toInt32(aTokenStr)); + if (y() > -16384 && y() < 16384) nValidMask |= vcl::WindowDataMask::Y; else - rData.setY(0); + setY(0); } else - rData.setY(0); + setY(0); aTokenStr = o3tl::getToken(rStr, 0, ',', nIndex); if (!aTokenStr.empty()) { sal_Int32 nWidth = o3tl::toInt32(aTokenStr); if (nWidth >= 0) { - rData.setWidth(nWidth); + setWidth(nWidth); } - if (rData.width() > 0 && rData.width() < 16384) + if (width() > 0 && width() < 16384) nValidMask |= vcl::WindowDataMask::Width; else - rData.setWidth(0); + setWidth(0); } else - rData.setWidth(0); + setWidth(0); aTokenStr = o3tl::getToken(rStr, 0, ';', nIndex); if (!aTokenStr.empty()) { sal_Int32 nHeight = o3tl::toInt32(aTokenStr); if (nHeight >= 0) { - rData.setHeight(nHeight); + setHeight(nHeight); } - if (rData.height() > 0 && rData.height() < 16384) + if (height() > 0 && height() < 16384) nValidMask |= vcl::WindowDataMask::Height; else - rData.setHeight(0); + setHeight(0); } else - rData.setHeight(0); + setHeight(0); aTokenStr = o3tl::getToken(rStr, 0, ';', nIndex); if (!aTokenStr.empty()) { @@ -463,60 +462,60 @@ vcl::WindowData::WindowData(std::u16string_view rStr) // 91625 - ignore Minimize vcl::WindowState nState = static_cast<vcl::WindowState>(o3tl::toInt32(aTokenStr)); //nState &= ~vcl::WindowState::Minimized; - rData.setState(nState); + setState(nState); nValidMask |= vcl::WindowDataMask::State; } else - rData.setState(vcl::WindowState::NONE); + setState(vcl::WindowState::NONE); // read maximized pos/size aTokenStr = o3tl::getToken(rStr, 0, ',', nIndex); if (!aTokenStr.empty()) { - rData.SetMaximizedX(o3tl::toInt32(aTokenStr)); - if (rData.GetMaximizedX() > -16384 && rData.GetMaximizedX() < 16384) + SetMaximizedX(o3tl::toInt32(aTokenStr)); + if (GetMaximizedX() > -16384 && GetMaximizedX() < 16384) nValidMask |= vcl::WindowDataMask::MaximizedX; else - rData.SetMaximizedX(0); + SetMaximizedX(0); } else - rData.SetMaximizedX(0); + SetMaximizedX(0); aTokenStr = o3tl::getToken(rStr, 0, ',', nIndex); if (!aTokenStr.empty()) { - rData.SetMaximizedY(o3tl::toInt32(aTokenStr)); - if (rData.GetMaximizedY() > -16384 && rData.GetMaximizedY() < 16384) + SetMaximizedY(o3tl::toInt32(aTokenStr)); + if (GetMaximizedY() > -16384 && GetMaximizedY() < 16384) nValidMask |= vcl::WindowDataMask::MaximizedY; else - rData.SetMaximizedY(0); + SetMaximizedY(0); } else - rData.SetMaximizedY(0); + SetMaximizedY(0); aTokenStr = o3tl::getToken(rStr, 0, ',', nIndex); if (!aTokenStr.empty()) { - rData.SetMaximizedWidth(o3tl::toInt32(aTokenStr)); - if (rData.GetMaximizedWidth() > 0 && rData.GetMaximizedWidth() < 16384) + SetMaximizedWidth(o3tl::toInt32(aTokenStr)); + if (GetMaximizedWidth() > 0 && GetMaximizedWidth() < 16384) nValidMask |= vcl::WindowDataMask::MaximizedWidth; else - rData.SetMaximizedWidth(0); + SetMaximizedWidth(0); } else - rData.SetMaximizedWidth(0); + SetMaximizedWidth(0); aTokenStr = o3tl::getToken(rStr, 0, ';', nIndex); if (!aTokenStr.empty()) { - rData.SetMaximizedHeight(o3tl::toInt32(aTokenStr)); - if (rData.GetMaximizedHeight() > 0 && rData.GetMaximizedHeight() < 16384) + SetMaximizedHeight(o3tl::toInt32(aTokenStr)); + if (GetMaximizedHeight() > 0 && GetMaximizedHeight() < 16384) nValidMask |= vcl::WindowDataMask::MaximizedHeight; else - rData.SetMaximizedHeight(0); + SetMaximizedHeight(0); } else - rData.SetMaximizedHeight(0); + SetMaximizedHeight(0); // mark valid fields - rData.setMask(nValidMask); + setMask(nValidMask); } OUString vcl::WindowData::toStr() const |