Kaydet (Commit) a027ed95 authored tarafından Ashod Nakashian's avatar Ashod Nakashian Kaydeden (comit) Michael Stahl

Wingdi RGB macro handling improved

Improved the isolation of windows headers.
Specifically, RGB macro is better handled now.

Change-Id: I0eeea16d0de9da3455810c80b0715f7b54ae8c3f
Reviewed-on: https://gerrit.libreoffice.org/20039Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarMichael Stahl <mstahl@redhat.com>
üst 9e2973db
......@@ -107,7 +107,7 @@ DEFAULTS = \
'svx.svx' : ( 3, EXCLUDE, EXCLUDE, INCLUDE), # 20.7
'svx.svxcore' : ( 7, EXCLUDE, INCLUDE, EXCLUDE), # 37.0
'sw.msword' : ( 4, EXCLUDE, INCLUDE, INCLUDE), # 22.4
'sw.sw' : (11, EXCLUDE, EXCLUDE, INCLUDE), # 212.3
'sw.sw' : ( 7, EXCLUDE, EXCLUDE, INCLUDE), # 129.6
'sw.swui' : ( 3, EXCLUDE, INCLUDE, INCLUDE), # 26.1
'sw.vbaswobj' : ( 4, EXCLUDE, INCLUDE, INCLUDE), # 13.1
'tools.tl' : ( 5, EXCLUDE, EXCLUDE, EXCLUDE), # 4.2
......@@ -117,7 +117,7 @@ DEFAULTS = \
'vbahelper.msforms' : ( 3, EXCLUDE, INCLUDE, INCLUDE), # 5.2
'vbahelper.vbahelper' : ( 3, EXCLUDE, EXCLUDE, INCLUDE), # 7.0
'vcl.vcl' : ( 6, EXCLUDE, INCLUDE, INCLUDE), # 35.7
'writerfilter.writerfilter' : ( 3, EXCLUDE, EXCLUDE, INCLUDE), # 15.8
'writerfilter.writerfilter' : ( 5, EXCLUDE, EXCLUDE, EXCLUDE), # 19.7/27.3
'xmloff.xo' : ( 7, EXCLUDE, INCLUDE, INCLUDE), # 22.1
'xmloff.xof' : ( 1, EXCLUDE, EXCLUDE, INCLUDE), # 4.4
'xmlscript.xmlscript' : ( 4, EXCLUDE, EXCLUDE, INCLUDE), # 3.6
......@@ -393,10 +393,6 @@ def filter_ignore(line, module):
ignore_list += [
'tbunosearchcontrollers.hxx', # Anonymous namespace
]
if module == 'sw':
ignore_list += [
'com/sun/star/ucb/NameClash.hpp', # conflicts with ERROR from Windows.h
]
if module == 'vcl':
ignore_list += [
'accmgr.hxx', # redefines ImplAccelList
......@@ -748,8 +744,8 @@ def generate(includes, libname, filename, module):
if module == 'svx' and libname == 'svx':
svx_define = """
#ifdef WNT
#define UNICODE
#define _UNICODE
# define UNICODE
# define _UNICODE
#endif
"""
f.write(svx_define)
......@@ -759,12 +755,14 @@ def generate(includes, libname, filename, module):
for i in includes:
f.write(i + '\n')
# ado needs to guard against macro polution
if module == 'connectivity' and libname == 'ado':
# Some libraries pull windows headers that aren't self contained.
if (module == 'connectivity' and libname == 'ado') or \
(module == 'xmlsecurity' and libname == 'xsec_xmlsec'):
ado_define = """
// Prevent windows header macro pollution.
#undef OPTIONAL
#undef DELETE
// Cleanup windows header macro pollution.
#ifdef WNT
# include <postwin.h>
#endif
"""
f.write(ado_define)
......@@ -835,8 +833,7 @@ def main():
header = make_pch_filename(root, module, libname)
if not os.path.exists(os.path.join(root, module)):
raise Exception('Error: module [' + str(module) +
'] not found. Not running from the root of LO repository?')
raise Exception('Error: module [{}] not found.'.format(module))
key = '{}.{}'.format(module, libname)
if key in DEFAULTS:
......
......@@ -13,7 +13,7 @@
manual changes will be rewritten by the next run of update_pch.sh (which presumably
also fixes all possible problems, so it's usually better to use it).
Generated on 2015-11-14 14:16:28 using:
Generated on 2015-12-02 12:47:53 using:
./bin/update_pch connectivity ado --cutoff=2 --exclude:system --exclude:module --exclude:local
If after updating build fails, use the following command to locate conflicting headers:
......@@ -69,8 +69,9 @@
#include <connectivity/dbtoolsdllapi.hxx>
#include <connectivity/sdbcx/IRefreshable.hxx>
// Prevent windows header macro pollution.
#undef OPTIONAL
#undef DELETE
// Cleanup windows header macro pollution.
#ifdef WNT
# include <postwin.h>
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
......@@ -13,7 +13,7 @@
manual changes will be rewritten by the next run of update_pch.sh (which presumably
also fixes all possible problems, so it's usually better to use it).
Generated on 2015-11-14 14:16:28 using:
Generated on 2015-12-02 12:47:53 using:
./bin/update_pch connectivity odbc --cutoff=2 --exclude:system --exclude:module --include:local
If after updating build fails, use the following command to locate conflicting headers:
......@@ -22,8 +22,6 @@
#include <algorithm>
#include <cstddef>
#include <stddef.h>
#include <stdlib.h>
#include <string.h>
#include <boost/type_traits/is_same.hpp>
#include <boost/type_traits/remove_reference.hpp>
......@@ -38,10 +36,8 @@
#include <rtl/ustrbuf.hxx>
#include <rtl/ustring.hxx>
#include <sal/config.h>
#include <sal/macros.h>
#include <sal/saldllapi.h>
#include <sal/types.h>
#include <sal/typesizes.h>
#include <salhelper/singletonref.hxx>
#include <com/sun/star/lang/DisposedException.hpp>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
......
......@@ -24,33 +24,40 @@
#define Rectangle BLA_Rectangle
#define Folder WIN_Folder
#define GradientStyle_RECT WIN_GradientStyle_RECT
#ifndef IN
#define IN
# define IN
#endif
#ifndef OUT
#define OUT
# define OUT
#endif
#if !defined STRICT
#define STRICT
# define STRICT
#endif
#ifdef _MSC_VER
#pragma warning(push, 1)
#pragma warning (disable: 4005)
# pragma warning(push, 1)
# pragma warning (disable: 4005)
#endif
#include <windows.h>
#ifdef _MSC_VER
#pragma warning(pop)
# pragma warning(pop)
#endif
#include <shellapi.h>
#include <commdlg.h>
#include <dlgs.h>
#ifdef _MSC_VER
#pragma warning(push, 1)
# pragma warning(push, 1)
#endif
#include <commctrl.h>
#ifdef _MSC_VER
#pragma warning(pop)
# pragma warning(pop)
#endif
#endif
......
......@@ -93,8 +93,6 @@
</xsl:if>
<xsl:text>#include "comphelper/configuration.hxx"&#xA;</xsl:text>
<xsl:text>&#xA;</xsl:text>
<xsl:text>#undef RGB&#xA;</xsl:text>
<xsl:text>&#xA;</xsl:text>
<xsl:text>namespace officecfg { namespace </xsl:text>
<xsl:value-of select="$ns1"/>
<xsl:if test="$ns2">
......
......@@ -29,6 +29,9 @@
#include <docpool.hxx>
#include <formula/vectortoken.hxx>
// RGB is leaked macro from wingdi.h which conflicts in Office/Common.hxx.
#undef RGB
#include <officecfg/Office/Common.hxx>
#include <svl/broadcast.hxx>
......
......@@ -13,7 +13,7 @@
manual changes will be rewritten by the next run of update_pch.sh (which presumably
also fixes all possible problems, so it's usually better to use it).
Generated on 2015-11-14 14:16:58 using:
Generated on 2015-12-02 12:43:17 using:
./bin/update_pch sw msword --cutoff=4 --exclude:system --include:module --include:local
If after updating build fails, use the following command to locate conflicting headers:
......@@ -162,6 +162,7 @@
#include <vcl/pointr.hxx>
#include <vcl/ptrstyle.hxx>
#include <vcl/region.hxx>
#include <vcl/salgtype.hxx>
#include <vcl/salnativewidgets.hxx>
#include <vcl/scheduler.hxx>
#include <vcl/scopedbitmapaccess.hxx>
......
This diff is collapsed.
......@@ -13,7 +13,7 @@
manual changes will be rewritten by the next run of update_pch.sh (which presumably
also fixes all possible problems, so it's usually better to use it).
Generated on 2015-11-14 14:16:53 using:
Generated on 2015-12-02 12:43:12 using:
./bin/update_pch sw swui --cutoff=3 --exclude:system --include:module --include:local
If after updating build fails, use the following command to locate conflicting headers:
......@@ -172,6 +172,7 @@
#include <vcl/ptrstyle.hxx>
#include <vcl/quickselectionengine.hxx>
#include <vcl/region.hxx>
#include <vcl/salgtype.hxx>
#include <vcl/salnativewidgets.hxx>
#include <vcl/scheduler.hxx>
#include <vcl/scopedbitmapaccess.hxx>
......
......@@ -13,7 +13,7 @@
manual changes will be rewritten by the next run of update_pch.sh (which presumably
also fixes all possible problems, so it's usually better to use it).
Generated on 2015-11-14 14:16:51 using:
Generated on 2015-12-02 12:43:09 using:
./bin/update_pch sw vbaswobj --cutoff=4 --exclude:system --include:module --include:local
If after updating build fails, use the following command to locate conflicting headers:
......@@ -138,7 +138,6 @@
#include <vcl/graph.h>
#include <vcl/graph.hxx>
#include <vcl/hatch.hxx>
#include <vcl/idle.hxx>
#include <vcl/image.hxx>
#include <vcl/impdel.hxx>
#include <vcl/inputctx.hxx>
......@@ -161,6 +160,7 @@
#include <vcl/prntypes.hxx>
#include <vcl/ptrstyle.hxx>
#include <vcl/region.hxx>
#include <vcl/salgtype.hxx>
#include <vcl/salnativewidgets.hxx>
#include <vcl/scheduler.hxx>
#include <vcl/scopedbitmapaccess.hxx>
......
......@@ -66,8 +66,6 @@
#include "prewin.h"
#include <gdiplus.h>
#include <gdiplusenums.h>
#include <gdipluscolor.h>
#include <shlobj.h>
#ifdef _WIN32_WINNT_WINBLUE
......
......@@ -13,8 +13,8 @@
manual changes will be rewritten by the next run of update_pch.sh (which presumably
also fixes all possible problems, so it's usually better to use it).
Generated on 2015-11-14 14:16:42 using:
./bin/update_pch writerfilter writerfilter --cutoff=3 --exclude:system --exclude:module --include:local
Generated on 2015-12-02 15:48:57 using:
./bin/update_pch writerfilter writerfilter --cutoff=5 --exclude:system --exclude:module --include:local
If after updating build fails, use the following command to locate conflicting headers:
./bin/update_pch_bisect ./writerfilter/inc/pch/precompiled_writerfilter.hxx "/opt/lo/bin/make writerfilter.build" --find-conflicts
......@@ -22,27 +22,25 @@
#include <cassert>
#include <cstddef>
#include <cstdlib>
#include <iomanip>
#include <iostream>
#include <limits>
#include <map>
#include <memory>
#include <ostream>
#include <sstream>
#include <stdlib.h>
#include <string.h>
#include <string>
#include <vector>
#include <boost/intrusive_ptr.hpp>
#include <boost/logic/tribool.hpp>
#include <boost/optional.hpp>
#include <boost/tuple/tuple.hpp>
#include <osl/diagnose.h>
#include <osl/doublecheckedlocking.h>
#include <osl/file.hxx>
#include <osl/mutex.h>
#include <osl/getglobalmutex.hxx>
#include <osl/mutex.hxx>
#include <osl/process.h>
#include <osl/thread.hxx>
#include <rtl/instance.hxx>
#include <rtl/math.hxx>
#include <rtl/strbuf.hxx>
#include <rtl/string.hxx>
......@@ -51,52 +49,24 @@
#include <rtl/ustring.hxx>
#include <rtl/uuid.h>
#include <sal/config.h>
#include <sal/detail/log.h>
#include <sal/log.hxx>
#include <sal/macros.h>
#include <sal/saldllapi.h>
#include <sal/types.h>
#include <vcl/dllapi.h>
#include <vcl/svapp.hxx>
#include <basegfx/color/bcolor.hxx>
#include <com/sun/star/beans/PropertyValue.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/beans/XPropertyState.hpp>
#include <com/sun/star/container/XNameContainer.hpp>
#include <com/sun/star/container/XNamed.hpp>
#include <com/sun/star/document/XDocumentPropertiesSupplier.hpp>
#include <com/sun/star/document/XFilter.hpp>
#include <com/sun/star/document/XImporter.hpp>
#include <com/sun/star/drawing/XControlShape.hpp>
#include <com/sun/star/drawing/XDrawPage.hpp>
#include <com/sun/star/drawing/XDrawPageSupplier.hpp>
#include <com/sun/star/drawing/XShape.hpp>
#include <com/sun/star/embed/XEmbeddedObject.hpp>
#include <com/sun/star/frame/XModel.hpp>
#include <com/sun/star/graphic/XGraphic.hpp>
#include <com/sun/star/io/XInputStream.hpp>
#include <com/sun/star/io/XStream.hpp>
#include <com/sun/star/lang/Locale.hpp>
#include <com/sun/star/lang/WrappedTargetRuntimeException.hpp>
#include <com/sun/star/lang/XComponent.hpp>
#include <com/sun/star/lang/XInitialization.hpp>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/style/ParagraphAdjust.hpp>
#include <com/sun/star/style/XStyle.hpp>
#include <com/sun/star/style/XStyleFamiliesSupplier.hpp>
#include <com/sun/star/lang/XTypeProvider.hpp>
#include <com/sun/star/table/BorderLine2.hpp>
#include <com/sun/star/table/ShadowFormat.hpp>
#include <com/sun/star/text/HoriOrientation.hpp>
#include <com/sun/star/text/RelOrientation.hpp>
#include <com/sun/star/text/SizeType.hpp>
#include <com/sun/star/text/TableColumnSeparator.hpp>
#include <com/sun/star/text/TextContentAnchorType.hpp>
#include <com/sun/star/text/VertOrientation.hpp>
#include <com/sun/star/text/WrapTextMode.hpp>
#include <com/sun/star/text/WritingMode.hpp>
#include <com/sun/star/text/XTextColumns.hpp>
#include <com/sun/star/text/XTextFieldsSupplier.hpp>
#include <com/sun/star/uno/Any.h>
#include <com/sun/star/uno/Any.hxx>
#include <com/sun/star/uno/Reference.h>
......@@ -107,40 +77,18 @@
#include <com/sun/star/uno/Type.hxx>
#include <com/sun/star/uno/XComponentContext.hpp>
#include <com/sun/star/uno/genfunc.hxx>
#include <com/sun/star/xml/sax/XFastTokenHandler.hpp>
#include <comphelper/comphelperdllapi.h>
#include <comphelper/propertyvalue.hxx>
#include <comphelper/sequence.hxx>
#include <comphelper/sequenceashashmap.hxx>
#include <comphelper/string.hxx>
#include <cppu/cppudllapi.h>
#include <cppu/unotype.hxx>
#include <cppuhelper/implbase.hxx>
#include <cppuhelper/implbase1.hxx>
#include <cppuhelper/supportsservice.hxx>
#include <dmapper/GraphicZOrderHelper.hxx>
#include <dmapper/resourcemodel.hxx>
#include <filter/msfilter/util.hxx>
#include <i18nlangtag/i18nlangtagdllapi.h>
#include <i18nlangtag/lang.h>
#include <i18nlangtag/languagetag.hxx>
#include <o3tl/typed_flags_set.hxx>
#include <oox/dllapi.h>
#include <oox/drawingml/drawingmltypes.hxx>
#include <oox/helper/storagebase.hxx>
#include <oox/token/namespaces.hxx>
#include <oox/token/tokens.hxx>
#include <ooxml/QNameToString.hxx>
#include <ooxml/resourceids.hxx>
#include <svl/poolitem.hxx>
#include <svx/svxdllapi.h>
#include <tools/color.hxx>
#include <tools/errinf.hxx>
#include <tools/gen.hxx>
#include <tools/lineend.hxx>
#include <tools/ref.hxx>
#include <tools/solar.h>
#include <tools/stream.hxx>
#include <tools/toolsdllapi.h>
#include <uno/data.h>
#include <uno/sequence2.h>
......
......@@ -13,7 +13,7 @@
manual changes will be rewritten by the next run of update_pch.sh (which presumably
also fixes all possible problems, so it's usually better to use it).
Generated on 2015-11-14 14:16:41 using:
Generated on 2015-12-02 12:42:58 using:
./bin/update_pch xmlsecurity xsec_xmlsec --cutoff=2 --exclude:system --include:module --include:local
If after updating build fails, use the following command to locate conflicting headers:
......@@ -26,6 +26,7 @@
#include <cstring>
#include <exception>
#include <iomanip>
#include <memory>
#include <new>
#include <ostream>
#include <pk11pub.h>
......@@ -117,4 +118,9 @@
#include <xmlsecurity/biginteger.hxx>
#include <xmlsecurity/xmlsec-wrapper.h>
// Cleanup windows header macro pollution.
#ifdef WNT
# include <postwin.h>
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
......@@ -22,16 +22,15 @@
* and turn off the additional virtual methods which are part of some interfaces when compiled
* with debug
*/
#ifdef DEBUG
#undef DEBUG
#endif
#include <com/sun/star/mozilla/XMozillaBootstrap.hpp>
#include <com/sun/star/xml/crypto/DigestID.hpp>
#include <com/sun/star/xml/crypto/CipherID.hpp>
#include <cppuhelper/supportsservice.hxx>
// RGB is leaked macro from wingdi.h which conflicts in Office/Common.hxx.
#undef RGB
#include <officecfg/Office/Common.hxx>
#include <sal/types.h>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment