diff options
author | Dmitriy Shilin <dshil@fastmail.com> | 2019-01-12 06:04:39 -0800 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2019-01-13 11:06:01 +0100 |
commit | 60e308e60a623bd45b7a30aa7f538ee6ed3d42cb (patch) | |
tree | b24deda9e3ff7b80fe888f7657271105b2fd31c2 /vcl/win | |
parent | cc2dbc14354b937ade02049ec69b07170bde765f (diff) |
tdf#107792 vcl/win: move scoped_gdi.hxx to vcl/inc/win
Change-Id: Id08a98d31673cfa9b701e7efdaefd94d24a93807
Reviewed-on: https://gerrit.libreoffice.org/66214
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'vcl/win')
-rw-r--r-- | vcl/win/gdi/gdiimpl.cxx | 2 | ||||
-rw-r--r-- | vcl/win/gdi/scoped_gdi.hxx | 42 | ||||
-rw-r--r-- | vcl/win/gdi/winlayout.cxx | 2 |
3 files changed, 2 insertions, 44 deletions
diff --git a/vcl/win/gdi/gdiimpl.cxx b/vcl/win/gdi/gdiimpl.cxx index 1bb39b84cd2e..ec7682b14899 100644 --- a/vcl/win/gdi/gdiimpl.cxx +++ b/vcl/win/gdi/gdiimpl.cxx @@ -20,7 +20,6 @@ #include <svsys.h> #include "gdiimpl.hxx" -#include "scoped_gdi.hxx" #include <string.h> #include <rtl/strbuf.hxx> @@ -33,6 +32,7 @@ #include <win/saldata.hxx> #include <win/salgdi.h> #include <win/salbmp.h> +#include <win/scoped_gdi.hxx> #include <vcl/salbtype.hxx> #include <win/salframe.h> #include <basegfx/matrix/b2dhommatrixtools.hxx> diff --git a/vcl/win/gdi/scoped_gdi.hxx b/vcl/win/gdi/scoped_gdi.hxx deleted file mode 100644 index b5a66d9d3698..000000000000 --- a/vcl/win/gdi/scoped_gdi.hxx +++ /dev/null @@ -1,42 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - */ - -#ifndef INCLUDED_VCL_WIN_GDI_SCOPED_GDI_HXX -#define INCLUDED_VCL_WIN_GDI_SCOPED_GDI_HXX - -#include <win/svsys.h> -#include <win/wincomp.hxx> - -#include <memory> - -struct HBRUSHDeleter -{ - using pointer = HBRUSH; - void operator()(HBRUSH hBrush) { DeleteBrush(hBrush); } -}; - -struct HRGNDeleter -{ - using pointer = HRGN; - void operator()(HRGN hRgn) { DeleteRegion(hRgn); } -}; - -struct HDCDeleter -{ - using pointer = HDC; - void operator()(HDC hDC) { DeleteDC(hDC); } -}; - -using ScopedHBRUSH = std::unique_ptr<HBRUSH, HBRUSHDeleter>; -using ScopedHRGN = std::unique_ptr<HRGN, HRGNDeleter>; -using ScopedHDC = std::unique_ptr<HDC, HDCDeleter>; - -#endif // INCLUDED_VCL_WIN_GDI_SCOPED_GDI_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */ diff --git a/vcl/win/gdi/winlayout.cxx b/vcl/win/gdi/winlayout.cxx index f5e2c025e965..ebaf2f1be2d6 100644 --- a/vcl/win/gdi/winlayout.cxx +++ b/vcl/win/gdi/winlayout.cxx @@ -35,10 +35,10 @@ #include <outdev.h> #include <win/DWriteTextRenderer.hxx> +#include <win/scoped_gdi.hxx> #include <sft.hxx> #include <sallayout.hxx> -#include "scoped_gdi.hxx" #include <cstdio> #include <cstdlib> |