1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 /* not protected, do only include once! */
24 #define Folder WIN_Folder
25 #define GradientStyle_RECT WIN_GradientStyle_RECT
38 #define WIN32_LEAN_AND_MEAN
47 // For some old versions of the Windows SDK, at least GidplusTypes.h (as indirectly included from
48 // gdiplus.h, which in turn we often include from between these prewin.h/postwin.h wrappers) expects
49 // pre-existing min and max. That is true for e.g.
50 // C:/Program Files (x86)/Windows Kits/10/Include/10.0.19041.0/um/GdiplusTypes.h, but not for e.g.
51 // C:/Program Files (x86)/Windows Kits/10/Include/10.0.22000.0/um/GdiplusTypes.h which explicitly
52 // defines its own GDIPLUS_MIN/MAX macros. The easiest fix appears to be to define min/max here and
53 // to undefine them again in postwin.h, until no supported version of the Windows SDK requires this
55 #define min(a, b) (((a) < (b)) ? (a) : (b))
56 #define max(a, b) (((a) > (b)) ? (a) : (b))
60 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */