summaryrefslogtreecommitdiff
path: root/vcl/inc
diff options
context:
space:
mode:
authorDmitriy Shilin <dshil@fastmail.com>2019-01-08 03:39:16 -0800
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-01-09 11:06:02 +0100
commit8addcffd4c4b1ce8d7e4c8dee01c312b68f1de71 (patch)
tree2ab0e083e7c6d7a1741614cd7daa293517dfd46f /vcl/inc
parent3c97782c7e1ea437511249d750bf882bff17ef09 (diff)
tdf#107792 vcl/win: replace ScopedHDC with type alias
Change-Id: I2d12ebc2a7e353ce685ec5132b0a65b393c36212 Reviewed-on: https://gerrit.libreoffice.org/65962 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl/inc')
-rw-r--r--vcl/inc/win/ScopedHDC.hxx45
1 files changed, 0 insertions, 45 deletions
diff --git a/vcl/inc/win/ScopedHDC.hxx b/vcl/inc/win/ScopedHDC.hxx
deleted file mode 100644
index bd4642ee6642..000000000000
--- a/vcl/inc/win/ScopedHDC.hxx
+++ /dev/null
@@ -1,45 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * 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_INC_WIN_SCOPEDHDC_HXX
-#define INCLUDED_VCL_INC_WIN_SCOPEDHDC_HXX
-
-class ScopedHDC
-{
-private:
- HDC m_hDC;
-
-public:
- explicit ScopedHDC(HDC hDC)
- : m_hDC(hDC)
- {}
-
- ScopedHDC(const ScopedHDC&) = delete;
- ScopedHDC& operator=(const ScopedHDC&) = delete;
-
- ~ScopedHDC()
- {
- if (m_hDC)
- DeleteDC(m_hDC);
- }
-
- HDC get() const
- {
- return m_hDC;
- }
-
- explicit operator bool() const
- {
- return m_hDC != nullptr;
- }
-};
-
-#endif // INCLUDED_VCL_INC_WIN_SCOPEDHDC_HXX
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */