[Libreoffice-commits] core.git: dbaccess/source framework/inc include/comphelper include/svl include/ucbhelper include/unotools l10ntools/source solenv/gbuild

Noel Grandin noel at peralex.com
Wed Jun 6 06:55:25 UTC 2018


 dbaccess/source/ui/misc/HtmlReader.cxx          |    3 +++
 dbaccess/source/ui/misc/RtfReader.cxx           |    4 ++++
 framework/inc/xml/saxnamespacefilter.hxx        |    6 ++++--
 framework/inc/xml/statusbardocumenthandler.hxx  |    6 ++++--
 framework/inc/xml/toolboxdocumenthandler.hxx    |    6 ++++--
 include/comphelper/ChainablePropertySetInfo.hxx |    6 ++++--
 include/comphelper/MasterPropertySetInfo.hxx    |    6 ++++--
 include/comphelper/containermultiplexer.hxx     |    6 ++++--
 include/svl/itemprop.hxx                        |   11 +++++++++--
 include/ucbhelper/activedatasink.hxx            |    7 ++++---
 include/ucbhelper/commandenvironment.hxx        |    6 ++++--
 include/unotools/streamwrap.hxx                 |    6 +++---
 l10ntools/source/cfgmerge.cxx                   |    3 +++
 solenv/gbuild/platform/com_MSC_class.mk         |    1 -
 14 files changed, 54 insertions(+), 23 deletions(-)

New commits:
commit 9739c37d8ad7c6fca269709674a6975fa7ebd191
Author: Noel Grandin <noel at peralex.com>
Date:   Sun Jun 3 13:07:55 2018 +0200

    enable incremental linking on windows
    
    requires a handful of workarounds
    
    Change-Id: I77c25580135eeec437716eceea1412607f8d14ca
    Reviewed-on: https://gerrit.libreoffice.org/55244
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/dbaccess/source/ui/misc/HtmlReader.cxx b/dbaccess/source/ui/misc/HtmlReader.cxx
index 8bc0b36eb156..c810a9175cf7 100644
--- a/dbaccess/source/ui/misc/HtmlReader.cxx
+++ b/dbaccess/source/ui/misc/HtmlReader.cxx
@@ -110,6 +110,9 @@ SvParserState OHTMLReader::CallParser()
     return m_bFoundTable ? eParseState : SvParserState::Error;
 }
 
+#if defined _MSC_VER
+#pragma warning(disable: 4702) // unreachable code, bug in MSVC2015
+#endif
 void OHTMLReader::NextToken( HtmlTokenId nToken )
 {
     if(m_bError || !m_nRows) // if there is an error or no more rows to check, return immediately
diff --git a/dbaccess/source/ui/misc/RtfReader.cxx b/dbaccess/source/ui/misc/RtfReader.cxx
index f09ac52b8eb3..1d71e1b81c78 100644
--- a/dbaccess/source/ui/misc/RtfReader.cxx
+++ b/dbaccess/source/ui/misc/RtfReader.cxx
@@ -92,6 +92,10 @@ SvParserState ORTFReader::CallParser()
     return m_bFoundTable ? eParseState : SvParserState::Error;
 }
 
+#if defined _MSC_VER
+#pragma warning(disable: 4702) // unreachable code, bug in MSVC2015
+#endif
+
 void ORTFReader::NextToken( int nToken )
 {
     if(m_bError || !m_nRows) // if there is an error or no more rows to check, return immediately
diff --git a/framework/inc/xml/saxnamespacefilter.hxx b/framework/inc/xml/saxnamespacefilter.hxx
index 68fce7d4834c..8fcb84534998 100644
--- a/framework/inc/xml/saxnamespacefilter.hxx
+++ b/framework/inc/xml/saxnamespacefilter.hxx
@@ -32,8 +32,10 @@
 namespace framework
 {
 
-class FWE_DLLPUBLIC SaxNamespaceFilter final :
-                           public ::cppu::WeakImplHelper< css::xml::sax::XDocumentHandler >
+// workaround for incremental linking bugs in MSVC2015
+class SAL_DLLPUBLIC_TEMPLATE SaxNamespaceFilter_Base : public cppu::WeakImplHelper< css::xml::sax::XDocumentHandler > {};
+
+class FWE_DLLPUBLIC SaxNamespaceFilter final : public SaxNamespaceFilter_Base
 {
     public:
         SaxNamespaceFilter( css::uno::Reference< css::xml::sax::XDocumentHandler > const & rSax1DocumentHandler );
diff --git a/framework/inc/xml/statusbardocumenthandler.hxx b/framework/inc/xml/statusbardocumenthandler.hxx
index b0cb57c4fe23..bc12c5a724a1 100644
--- a/framework/inc/xml/statusbardocumenthandler.hxx
+++ b/framework/inc/xml/statusbardocumenthandler.hxx
@@ -35,8 +35,10 @@ namespace framework{
 
 // Hash code function for using in all hash maps of follow implementation.
 
-class FWE_DLLPUBLIC OReadStatusBarDocumentHandler :
-                                        public ::cppu::WeakImplHelper< css::xml::sax::XDocumentHandler >
+// workaround for incremental linking bugs in MSVC2015
+class SAL_DLLPUBLIC_TEMPLATE OReadStatusBarDocumentHandler_Base : public cppu::WeakImplHelper< css::xml::sax::XDocumentHandler > {};
+
+class FWE_DLLPUBLIC OReadStatusBarDocumentHandler : public OReadStatusBarDocumentHandler_Base
 {
     public:
         enum StatusBar_XML_Entry
diff --git a/framework/inc/xml/toolboxdocumenthandler.hxx b/framework/inc/xml/toolboxdocumenthandler.hxx
index c2be53da64d1..dd13ee53eba5 100644
--- a/framework/inc/xml/toolboxdocumenthandler.hxx
+++ b/framework/inc/xml/toolboxdocumenthandler.hxx
@@ -34,8 +34,10 @@ namespace framework{
 
 // Hash code function for using in all hash maps of follow implementation.
 
-class FWE_DLLPUBLIC OReadToolBoxDocumentHandler :
-                                    public ::cppu::WeakImplHelper< css::xml::sax::XDocumentHandler >
+// workaround for incremental linking bugs in MSVC2015
+class SAL_DLLPUBLIC_TEMPLATE OReadToolBoxDocumentHandler_Base : public cppu::WeakImplHelper< css::xml::sax::XDocumentHandler > {};
+
+class FWE_DLLPUBLIC OReadToolBoxDocumentHandler : public OReadToolBoxDocumentHandler_Base
 {
     public:
         enum ToolBox_XML_Entry
diff --git a/include/comphelper/ChainablePropertySetInfo.hxx b/include/comphelper/ChainablePropertySetInfo.hxx
index b7807c74fec4..16bfced1376b 100644
--- a/include/comphelper/ChainablePropertySetInfo.hxx
+++ b/include/comphelper/ChainablePropertySetInfo.hxx
@@ -33,8 +33,10 @@
  */
 namespace comphelper
 {
-    class COMPHELPER_DLLPUBLIC ChainablePropertySetInfo:
-        public ::cppu::WeakImplHelper< css::beans::XPropertySetInfo >
+    // workaround for incremental linking bugs in MSVC2015
+    class SAL_DLLPUBLIC_TEMPLATE ChainablePropertySetInfo_Base : public cppu::WeakImplHelper< css::beans::XPropertySetInfo > {};
+
+    class COMPHELPER_DLLPUBLIC ChainablePropertySetInfo : public ChainablePropertySetInfo_Base
     {
     public:
         ChainablePropertySetInfo( PropertyInfo const * pMap );
diff --git a/include/comphelper/MasterPropertySetInfo.hxx b/include/comphelper/MasterPropertySetInfo.hxx
index 07416c79c633..8559b2e2fd45 100644
--- a/include/comphelper/MasterPropertySetInfo.hxx
+++ b/include/comphelper/MasterPropertySetInfo.hxx
@@ -26,8 +26,10 @@
 
 namespace comphelper
 {
-    class COMPHELPER_DLLPUBLIC MasterPropertySetInfo:
-        public ::cppu::WeakImplHelper< css::beans::XPropertySetInfo >
+    // workaround for incremental linking bugs in MSVC2015
+    class SAL_DLLPUBLIC_TEMPLATE MasterPropertySetInfo_Base : public cppu::WeakImplHelper< css::beans::XPropertySetInfo > {};
+
+    class COMPHELPER_DLLPUBLIC MasterPropertySetInfo : public MasterPropertySetInfo_Base
     {
     public:
         MasterPropertySetInfo( PropertyInfo const * pMap );
diff --git a/include/comphelper/containermultiplexer.hxx b/include/comphelper/containermultiplexer.hxx
index 0a3729a5809b..a896c690d530 100644
--- a/include/comphelper/containermultiplexer.hxx
+++ b/include/comphelper/containermultiplexer.hxx
@@ -64,8 +64,10 @@ namespace comphelper
         void setAdapter(OContainerListenerAdapter* _pAdapter);
     };
 
-    class COMPHELPER_DLLPUBLIC OContainerListenerAdapter
-        : public cppu::WeakImplHelper<css::container::XContainerListener>
+    // workaround for incremental linking bugs in MSVC2015
+    class SAL_DLLPUBLIC_TEMPLATE OContainerListenerAdapter_Base : public cppu::WeakImplHelper< css::container::XContainerListener > {};
+
+    class COMPHELPER_DLLPUBLIC OContainerListenerAdapter : public OContainerListenerAdapter_Base
     {
         friend class OContainerListener;
 
diff --git a/include/svl/itemprop.hxx b/include/svl/itemprop.hxx
index 334ae8d5f35a..05dc671fc99b 100644
--- a/include/svl/itemprop.hxx
+++ b/include/svl/itemprop.hxx
@@ -182,7 +182,11 @@ public:
 };
 
 struct SfxItemPropertySetInfo_Impl;
-class SVL_DLLPUBLIC SfxItemPropertySetInfo : public cppu::WeakImplHelper<css::beans::XPropertySetInfo>
+
+// workaround for incremental linking bugs in MSVC2015
+class SAL_DLLPUBLIC_TEMPLATE SfxItemPropertySetInfo_Base : public cppu::WeakImplHelper< css::beans::XPropertySetInfo > {};
+
+class SVL_DLLPUBLIC SfxItemPropertySetInfo : public SfxItemPropertySetInfo_Base
 {
     std::unique_ptr<SfxItemPropertySetInfo_Impl> m_pImpl;
 
@@ -202,7 +206,10 @@ public:
 
 };
 
-class SVL_DLLPUBLIC SfxExtItemPropertySetInfo: public cppu::WeakImplHelper<css::beans::XPropertySetInfo>
+// workaround for incremental linking bugs in MSVC2015
+class SAL_DLLPUBLIC_TEMPLATE SfxExtItemPropertySetInfo_Base : public cppu::WeakImplHelper< css::beans::XPropertySetInfo > {};
+
+class SVL_DLLPUBLIC SfxExtItemPropertySetInfo: public SfxExtItemPropertySetInfo_Base
 {
     SfxItemPropertyMap aExtMap;
 public:
diff --git a/include/ucbhelper/activedatasink.hxx b/include/ucbhelper/activedatasink.hxx
index 4cdc69a2b2c7..7e2cbcc8274c 100644
--- a/include/ucbhelper/activedatasink.hxx
+++ b/include/ucbhelper/activedatasink.hxx
@@ -27,14 +27,15 @@
 namespace ucbhelper
 {
 
+// workaround for incremental linking bugs in MSVC2015
+class SAL_DLLPUBLIC_TEMPLATE ActiveDataSink_Base : public cppu::WeakImplHelper< css::io::XActiveDataSink > {};
+
 /**
   * This class implements the interface css::io::XActiveDataSink.
   * Instances of this class can be passed with the parameters of an
   * "open" command.
   */
-
-class UCBHELPER_DLLPUBLIC ActiveDataSink :
-        public cppu::WeakImplHelper< css::io::XActiveDataSink >
+class UCBHELPER_DLLPUBLIC ActiveDataSink : public ActiveDataSink_Base
 {
     css::uno::Reference< css::io::XInputStream > m_xStream;
 
diff --git a/include/ucbhelper/commandenvironment.hxx b/include/ucbhelper/commandenvironment.hxx
index 919f49ca3a3a..1819d8328b5b 100644
--- a/include/ucbhelper/commandenvironment.hxx
+++ b/include/ucbhelper/commandenvironment.hxx
@@ -29,13 +29,15 @@ namespace ucbhelper
 {
 struct CommandEnvironment_Impl;
 
+// workaround for incremental linking bugs in MSVC2015
+class SAL_DLLPUBLIC_TEMPLATE CommandEnvironment_Base : public cppu::WeakImplHelper< css::ucb::XCommandEnvironment > {};
+
 /**
   * This class implements the interface
   * css::ucb::XCommandEnvironment. Instances of this class can
   * be used to supply environments to commands executed by UCB contents.
   */
-class UCBHELPER_DLLPUBLIC CommandEnvironment :
-            public cppu::WeakImplHelper< css::ucb::XCommandEnvironment >
+class UCBHELPER_DLLPUBLIC CommandEnvironment : public CommandEnvironment_Base
 {
     std::unique_ptr<CommandEnvironment_Impl> m_pImpl;
 
diff --git a/include/unotools/streamwrap.hxx b/include/unotools/streamwrap.hxx
index b50b92434fd8..81f463ea6e2c 100644
--- a/include/unotools/streamwrap.hxx
+++ b/include/unotools/streamwrap.hxx
@@ -35,11 +35,11 @@ class SvStream;
 namespace utl
 {
 
-//= OInputStreamWrapper
+// workaround for incremental linking bugs in MSVC2015
+class SAL_DLLPUBLIC_TEMPLATE OInputStreamWrapper_Base : public cppu::WeakImplHelper< css::io::XInputStream > {};
 
 /// helper class for wrapping an SvStream into an com.sun.star.io::XInputStream
-class UNOTOOLS_DLLPUBLIC OInputStreamWrapper
-        : public cppu::WeakImplHelper<css::io::XInputStream>
+class UNOTOOLS_DLLPUBLIC OInputStreamWrapper : public OInputStreamWrapper_Base
 {
 protected:
     ::osl::Mutex    m_aMutex;
diff --git a/l10ntools/source/cfgmerge.cxx b/l10ntools/source/cfgmerge.cxx
index 2eda993d72f7..ed124c5c428a 100644
--- a/l10ntools/source/cfgmerge.cxx
+++ b/l10ntools/source/cfgmerge.cxx
@@ -158,6 +158,9 @@ void CfgParser::AddText(
     pStackData->sText[ rIsoLang ] = rText;
 }
 
+#if defined _MSC_VER
+#pragma warning(disable: 4702) // unreachable code, bug in MSVC2015, it thinks the std::exit is unreachable
+#endif
 void CfgParser::ExecuteAnalyzedToken( int nToken, char *pToken )
 {
     OString sToken( pToken );
diff --git a/solenv/gbuild/platform/com_MSC_class.mk b/solenv/gbuild/platform/com_MSC_class.mk
index 3c3cfc472b9f..1fefa80fef61 100644
--- a/solenv/gbuild/platform/com_MSC_class.mk
+++ b/solenv/gbuild/platform/com_MSC_class.mk
@@ -214,7 +214,6 @@ endef
 gb_Windows_PE_TARGETTYPEFLAGS := \
 	-release \
 	-opt:noref \
-	-incremental:no \
 	$(if $(filter $(true),$(gb_SYMBOL)),-debug) \
 	$(if $(filter NO,$(LIBRARY_X64)), -safeseh) \
 	-nxcompat \


More information about the Libreoffice-commits mailing list