[Libreoffice-commits] core.git: solenv/gbuild xmloff/source

Stephan Bergmann sbergman at redhat.com
Sat Dec 17 19:51:25 UTC 2016


 solenv/gbuild/platform/com_MSC_defs.mk                |    3 +++
 xmloff/source/core/XMLEmbeddedObjectImportContext.cxx |   13 ++-----------
 2 files changed, 5 insertions(+), 11 deletions(-)

New commits:
commit 08e18475c39f9fd79aea47c37afaf92734bb727d
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Sat Dec 17 20:50:47 2016 +0100

    More blind fix attempt for MSVC
    
    Change-Id: I023d79c0d8928d8b43df67996ca4eb9dc6bfb25e

diff --git a/solenv/gbuild/platform/com_MSC_defs.mk b/solenv/gbuild/platform/com_MSC_defs.mk
index d41552a..db6ec22 100644
--- a/solenv/gbuild/platform/com_MSC_defs.mk
+++ b/solenv/gbuild/platform/com_MSC_defs.mk
@@ -115,6 +115,8 @@ gb_AFLAGS := $(AFLAGS)
 
 # C4505: 'function' : unreferenced local function has been removed
 
+# C4510: 'class' : default constructor could not be generated
+
 # C4512: 'class' : assignment operator could not be generated
 # (an issue with MSVC 2013 that appears to be gone with MSVC 2015)
 
@@ -186,6 +188,7 @@ gb_CXXFLAGS := \
 	-wd4351 \
 	-wd4373 \
 	-wd4505 \
+	-wd4510 \
 	-wd4512 \
 	-wd4611 \
 	-wd4706 \
diff --git a/xmloff/source/core/XMLEmbeddedObjectImportContext.cxx b/xmloff/source/core/XMLEmbeddedObjectImportContext.cxx
index afe67ad..c9fc928 100644
--- a/xmloff/source/core/XMLEmbeddedObjectImportContext.cxx
+++ b/xmloff/source/core/XMLEmbeddedObjectImportContext.cxx
@@ -134,16 +134,6 @@ void XMLEmbeddedObjectImportContext::SetComponent(
     xComp = rComp;  // keep ref to component only if there is a handler
 }
 
-namespace {
-
-struct Entry {
-    XMLTokenEnum eClass;
-    OUStringLiteral sFilterService;
-    Entry() = delete; // avoid MSVC warning C4510
-};
-
-}
-
 XMLEmbeddedObjectImportContext::XMLEmbeddedObjectImportContext(
         SvXMLImport& rImport, sal_uInt16 nPrfx, const OUString& rLName,
         const Reference< XAttributeList >& xAttrList ) :
@@ -192,7 +182,8 @@ XMLEmbeddedObjectImportContext::XMLEmbeddedObjectImportContext(
 
         if( !sClass.isEmpty() )
         {
-            static Entry const aServiceMap[] = {
+            static struct { XMLTokenEnum eClass; OUStringLiteral sFilterService;
+            } const aServiceMap[] = {
                 { XML_TEXT,         OUStringLiteral(XML_IMPORT_FILTER_WRITER) },
                 { XML_ONLINE_TEXT,  OUStringLiteral(XML_IMPORT_FILTER_WRITER) },
                 { XML_SPREADSHEET,  OUStringLiteral(XML_IMPORT_FILTER_CALC) },


More information about the Libreoffice-commits mailing list