diff options
author | Dmitriy Shilin <dshil@fastmail.com> | 2019-01-30 21:40:28 -0800 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2019-02-01 09:14:30 +0100 |
commit | 77c9bcb1af09d20a813cc3a16c50a57ab09eb0b5 (patch) | |
tree | 7b2cd04dcb555f57755e72b2cbfcbc382d0436ce /vcl/win | |
parent | e375ad4d4112b98efeb679c560af188de9246f02 (diff) |
tdf#122820 vcl/win: do not use un-named C++ objects
Change-Id: Ifbaf53ff002f8f61f9f49ab9bb14e7598e006402
Reviewed-on: https://gerrit.libreoffice.org/67187
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'vcl/win')
-rw-r--r-- | vcl/win/gdi/gdiimpl.cxx | 8 | ||||
-rw-r--r-- | vcl/win/gdi/salnativewidgets-luna.cxx | 4 | ||||
-rw-r--r-- | vcl/win/gdi/winlayout.cxx | 2 |
3 files changed, 7 insertions, 7 deletions
diff --git a/vcl/win/gdi/gdiimpl.cxx b/vcl/win/gdi/gdiimpl.cxx index 432d5add15a5..f4af3a06fecb 100644 --- a/vcl/win/gdi/gdiimpl.cxx +++ b/vcl/win/gdi/gdiimpl.cxx @@ -766,9 +766,9 @@ void WinSalGraphicsImpl::drawMask(const SalTwoRect& rPosAry, SalTwoRect aPosAry = rPosAry; const HDC hDC = mrParent.getHDC(); - ScopedSelectedHBRUSH(hDC, CreateSolidBrush(RGB(nMaskColor.GetRed(), - nMaskColor.GetGreen(), - nMaskColor.GetBlue()))); + ScopedSelectedHBRUSH hBrush(hDC, CreateSolidBrush(RGB(nMaskColor.GetRed(), + nMaskColor.GetGreen(), + nMaskColor.GetBlue()))); // WIN/WNT seems to have a minor problem mapping the correct color of the // mask to the palette if we draw the DIB directly ==> draw DDB @@ -1563,7 +1563,7 @@ void WinSalGraphicsImpl::DrawPixelImpl( long nX, long nY, COLORREF crColor ) return; } - ScopedSelectedHBRUSH(hDC, CreateSolidBrush(crColor)); + ScopedSelectedHBRUSH hBrush(hDC, CreateSolidBrush(crColor)); PatBlt(hDC, static_cast<int>(nX), static_cast<int>(nY), int(1), int(1), PATINVERT); } diff --git a/vcl/win/gdi/salnativewidgets-luna.cxx b/vcl/win/gdi/salnativewidgets-luna.cxx index 7f5a33737d15..9066a21ca884 100644 --- a/vcl/win/gdi/salnativewidgets-luna.cxx +++ b/vcl/win/gdi/salnativewidgets-luna.cxx @@ -459,7 +459,7 @@ static void impl_drawAeroToolbar( HDC hDC, RECT rc, bool bHorizontal ) GdiGradientFill( hDC, vert, 2, g_rect, 1, GRADIENT_FILL_RECT_V ); // and a darker horizontal line under that - ScopedSelectedHPEN(hDC, CreatePen(PS_SOLID, 1, RGB( 0xb0, 0xb0, 0xb0))); + ScopedSelectedHPEN hPen(hDC, CreatePen(PS_SOLID, 1, RGB( 0xb0, 0xb0, 0xb0))); MoveToEx( hDC, rc.left, gradient_bottom, nullptr ); LineTo( hDC, rc.right, gradient_bottom ); @@ -480,7 +480,7 @@ static void impl_drawAeroToolbar( HDC hDC, RECT rc, bool bHorizontal ) to_x = rc.right; from_y = to_y = rc.top; - ScopedSelectedHPEN(hDC, CreatePen(PS_SOLID, 1, RGB( 0xb0, 0xb0, 0xb0))); + ScopedSelectedHPEN hPen(hDC, CreatePen(PS_SOLID, 1, RGB( 0xb0, 0xb0, 0xb0))); MoveToEx( hDC, from_x, from_y, nullptr ); LineTo( hDC, to_x, to_y ); diff --git a/vcl/win/gdi/winlayout.cxx b/vcl/win/gdi/winlayout.cxx index 24dbcb1b9815..9b63fc583516 100644 --- a/vcl/win/gdi/winlayout.cxx +++ b/vcl/win/gdi/winlayout.cxx @@ -368,7 +368,7 @@ hb_font_t* WinFontInstance::ImplInitHbFont() { // Get the font metrics. HDC hDC = m_pGraphics->getHDC(); - ScopedSelectedHFONT(hDC, CreateFontIndirectW(&aLogFont)); + ScopedSelectedHFONT hFont(hDC, CreateFontIndirectW(&aLogFont)); GetTextMetricsW(hDC, &aFontMetric); } |