lok: vcl: fix multiple floatwin removal case more robustly.
[LibreOffice.git] / sal / osl / w32 / filetime.hxx
blobcb7dd5d3a31e7a91ad0ec5a55b96ddd80059f080
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 */
10 #ifndef INCLUDED_SAL_OSL_W32_FILETIME_HXX
11 #define INCLUDED_SAL_OSL_W32_FILETIME_HXX
13 #include <sal/config.h>
15 #define WIN32_LEAN_AND_MEAN
16 #include <windows.h>
18 #include <osl/time.h>
20 BOOL TimeValueToFileTime(TimeValue const * cpTimeVal, FILETIME * pFTime);
22 BOOL FileTimeToTimeValue(FILETIME const * cpFTime, TimeValue * pTimeVal);
24 namespace osl { namespace detail {
26 inline __int64 getFiletime(FILETIME const & ft) {
27 return (DWORD64(ft.dwHighDateTime) << 32) | ft.dwLowDateTime;
30 inline void setFiletime(FILETIME & ft, __int64 value) {
31 ft.dwHighDateTime = value >> 32;
32 ft.dwLowDateTime = value & 0xFFFFFFFF;
35 } }
37 #endif
39 /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */