[Libreoffice-commits] core.git: 6 commits - extensions/source

Stephan Bergmann sbergman at redhat.com
Fri Mar 4 15:16:02 UTC 2016


 extensions/source/activex/SOActionsApproval.cxx     |   15 +++++
 extensions/source/activex/SOActionsApproval.h       |    8 ++-
 extensions/source/activex/SOActiveX.cxx             |   52 +++++++++++---------
 extensions/source/activex/SOActiveX.h               |   15 ++++-
 extensions/source/activex/SOComWindowPeer.cxx       |   15 +++++
 extensions/source/activex/SOComWindowPeer.h         |    8 ++-
 extensions/source/activex/SODispatchInterceptor.cxx |   25 ++++++---
 extensions/source/activex/StdAfx2.h                 |    3 +
 extensions/source/activex/com_uno_helper.h          |    4 -
 extensions/source/activex/so_activex.cxx            |   16 +++++-
 10 files changed, 119 insertions(+), 42 deletions(-)

New commits:
commit af04ae6b02f3048607bbff6a1b721ea5a2a8de63
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Fri Mar 4 16:15:00 2016 +0100

    Constness issues
    
    Change-Id: Ib72b6225f20e1e53e9d811ddb2d266f17f57404b

diff --git a/extensions/source/activex/SOActiveX.cxx b/extensions/source/activex/SOActiveX.cxx
index 4fa427f..95e362d 100644
--- a/extensions/source/activex/SOActiveX.cxx
+++ b/extensions/source/activex/SOActiveX.cxx
@@ -60,7 +60,7 @@ void OutputError_Impl( HWND hw, HRESULT ErrorCode )
 }
 
 HRESULT ExecuteFunc( IDispatch* idispUnoObject,
-                     OLECHAR* sFuncName,
+                     OLECHAR const * sFuncName,
                      CComVariant* params,
                      unsigned int count,
                      CComVariant* pResult )
@@ -69,7 +69,7 @@ HRESULT ExecuteFunc( IDispatch* idispUnoObject,
         return E_FAIL;
 
     DISPID id;
-    HRESULT hr = idispUnoObject->GetIDsOfNames( IID_NULL, &sFuncName, 1, LOCALE_USER_DEFAULT, &id);
+    HRESULT hr = idispUnoObject->GetIDsOfNames( IID_NULL, const_cast<OLECHAR **>(&sFuncName), 1, LOCALE_USER_DEFAULT, &id);
     if( !SUCCEEDED( hr ) ) return hr;
 
     DISPPARAMS dispparams= { params, 0, count, 0};
@@ -88,7 +88,7 @@ HRESULT ExecuteFunc( IDispatch* idispUnoObject,
 }
 
 HRESULT GetIDispByFunc( IDispatch* idispUnoObject,
-                          OLECHAR* sFuncName,
+                          OLECHAR const * sFuncName,
                           CComVariant* params,
                           unsigned int count,
                           CComPtr<IDispatch>& pdispResult )
@@ -109,14 +109,14 @@ HRESULT GetIDispByFunc( IDispatch* idispUnoObject,
 }
 
 HRESULT PutPropertiesToIDisp( IDispatch* pdispObject,
-                              OLECHAR** sMemberNames,
+                              OLECHAR const ** sMemberNames,
                               CComVariant* pVariant,
                               unsigned int count )
 {
     for( unsigned int ind = 0; ind < count; ind++ )
     {
         DISPID id;
-        HRESULT hr = pdispObject->GetIDsOfNames( IID_NULL, &sMemberNames[ind], 1, LOCALE_USER_DEFAULT, &id );
+        HRESULT hr = pdispObject->GetIDsOfNames( IID_NULL, const_cast<OLECHAR **>(&sMemberNames[ind]), 1, LOCALE_USER_DEFAULT, &id );
         if( !SUCCEEDED( hr ) ) return hr;
 
         hr = CComDispatchDriver::PutProperty( pdispObject, id, &pVariant[ind] );
@@ -127,14 +127,14 @@ HRESULT PutPropertiesToIDisp( IDispatch* pdispObject,
 }
 
 HRESULT GetPropertiesFromIDisp( IDispatch* pdispObject,
-                                OLECHAR** sMemberNames,
+                                OLECHAR const ** sMemberNames,
                                 CComVariant* pVariant,
                                 unsigned int count )
 {
     for( unsigned int ind = 0; ind < count; ind++ )
     {
         DISPID id;
-        HRESULT hr = pdispObject->GetIDsOfNames( IID_NULL, &sMemberNames[ind], 1, LOCALE_USER_DEFAULT, &id );
+        HRESULT hr = pdispObject->GetIDsOfNames( IID_NULL, const_cast<OLECHAR **>(&sMemberNames[ind]), 1, LOCALE_USER_DEFAULT, &id );
         if( !SUCCEEDED( hr ) ) return hr;
 
         hr = CComDispatchDriver::GetProperty( pdispObject, id, &pVariant[ind] );
@@ -390,7 +390,7 @@ STDMETHODIMP CSOActiveX::Load( LPPROPERTYBAG pPropBag, LPERRORLOG /*pErrorLog*/
         return hr;
 
     mbReadyForActivation = FALSE;
-    hr = CBindStatusCallback<CSOActiveX>::Download( this, &CSOActiveX::CallbackCreateXInputStream, mCurFileUrl, m_spClientSite, FALSE );
+    hr = CBindStatusCallback<CSOActiveX>::Download( this, &CSOActiveX::CallbackCreateXInputStream, const_cast<OLECHAR *>(mCurFileUrl), m_spClientSite, FALSE );
     if ( hr == MK_S_ASYNCHRONOUS )
         hr = S_OK;
 
@@ -406,20 +406,20 @@ STDMETHODIMP CSOActiveX::Load( LPPROPERTYBAG pPropBag, LPERRORLOG /*pErrorLog*/
     return hr;
 }
 
-HRESULT CSOActiveX::GetUnoStruct( OLECHAR* sStructName, CComPtr<IDispatch>& pdispResult )
+HRESULT CSOActiveX::GetUnoStruct( OLECHAR const * sStructName, CComPtr<IDispatch>& pdispResult )
 {
     CComVariant aComStruct( sStructName );
     return GetIDispByFunc( mpDispFactory, L"Bridge_GetStruct", &aComStruct, 1, pdispResult );
 }
 
-HRESULT CSOActiveX::GetUrlStruct( OLECHAR* sUrl, CComPtr<IDispatch>& pdispUrl )
+HRESULT CSOActiveX::GetUrlStruct( OLECHAR const * sUrl, CComPtr<IDispatch>& pdispUrl )
 {
     HRESULT hr = GetUnoStruct( L"com.sun.star.util.URL", pdispUrl );
     if( !SUCCEEDED( hr ) ) return hr;
 
-    OLECHAR* sURLMemberName = L"Complete";
+    OLECHAR const * sURLMemberName = L"Complete";
     DISPID nURLID;
-    hr = pdispUrl->GetIDsOfNames( IID_NULL, &sURLMemberName, 1, LOCALE_USER_DEFAULT, &nURLID );
+    hr = pdispUrl->GetIDsOfNames( IID_NULL, const_cast<OLECHAR **>(&sURLMemberName), 1, LOCALE_USER_DEFAULT, &nURLID );
     if( !SUCCEEDED( hr ) ) return hr;
     CComVariant aComUrl( sUrl );
     hr = CComDispatchDriver::PutProperty( pdispUrl, nURLID, &aComUrl );
@@ -452,7 +452,7 @@ HRESULT CSOActiveX::SetLayoutManagerProps()
         return E_FAIL;
 
     CComVariant pVarLayoutMgr;
-    OLECHAR* sLMPropName = L"LayoutManager";
+    OLECHAR const * sLMPropName = L"LayoutManager";
     HRESULT hr = GetPropertiesFromIDisp( mpDispFrame, &sLMPropName, &pVarLayoutMgr, 1 );
     if( pVarLayoutMgr.vt != VT_DISPATCH || pVarLayoutMgr.pdispVal == NULL )
         return E_FAIL;
@@ -463,7 +463,7 @@ HRESULT CSOActiveX::SetLayoutManagerProps()
     if( !SUCCEEDED( hr ) || !pdispLM )
         return E_FAIL;
 
-    OLECHAR* sATName = L"AutomaticToolbars";
+    OLECHAR const * sATName = L"AutomaticToolbars";
     CComVariant pATProp;
     pATProp.vt = VT_BOOL; pATProp.boolVal = VARIANT_FALSE ;
     hr = PutPropertiesToIDisp( pdispLM, &sATName, &pATProp, 1 );
@@ -486,7 +486,7 @@ HRESULT CSOActiveX::CreateFrameOldWay( HWND hwnd, int width, int height )
     HRESULT hr = GetUnoStruct( L"com.sun.star.awt.Rectangle", pdispRectangle );
     if( !SUCCEEDED( hr ) ) return hr;
 
-    OLECHAR* sRectMemberNames[4] = { L"X",
+    OLECHAR const * sRectMemberNames[4] = { L"X",
                                       L"Y",
                                       L"Width",
                                       L"Height" };
@@ -502,7 +502,7 @@ HRESULT CSOActiveX::CreateFrameOldWay( HWND hwnd, int width, int height )
     if( !SUCCEEDED( hr ) ) return hr;
 
     // fill in descriptor with info
-    OLECHAR* sDescriptorMemberNames[6] = { L"Type",
+    OLECHAR const * sDescriptorMemberNames[6] = { L"Type",
                                  L"WindowServiceName",
                                  L"ParentIndex",
                                  L"Parent",
@@ -636,7 +636,7 @@ HRESULT CSOActiveX::CallLoadComponentFromURL1PBool( OLECHAR* sUrl, OLECHAR* sArg
     HRESULT hr = GetUnoStruct( L"com.sun.star.beans.PropertyValue", pdispPropVal );
     if( !SUCCEEDED( hr ) ) return hr;
 
-    OLECHAR*    sPropMemberNames[2] = { L"Name", L"Value" };
+    OLECHAR const * sPropMemberNames[2] = { L"Name", L"Value" };
     CComVariant pPropVar[2];
     pPropVar[0] = CComVariant( sArgName );
     pPropVar[1].vt = VT_BOOL; pPropVar[1].boolVal = sArgVal ? VARIANT_TRUE : VARIANT_FALSE ;
@@ -659,7 +659,7 @@ HRESULT CSOActiveX::CallLoadComponentFromURL1PBool( OLECHAR* sUrl, OLECHAR* sArg
     return S_OK;
 }
 
-HRESULT CSOActiveX::CallDispatchMethod( OLECHAR* sUrl,
+HRESULT CSOActiveX::CallDispatchMethod( OLECHAR const * sUrl,
                                         CComVariant* aArgNames,
                                         CComVariant* aArgVals,
                                         unsigned int count )
@@ -687,7 +687,7 @@ HRESULT CSOActiveX::CallDispatchMethod( OLECHAR* sUrl,
         hr = GetUnoStruct( L"com.sun.star.beans.PropertyValue", pdispPropVal );
         if( !SUCCEEDED( hr ) ) return hr;
 
-        OLECHAR*    sPropMemberNames[2] = { L"Name", L"Value" };
+        OLECHAR const * sPropMemberNames[2] = { L"Name", L"Value" };
         CComVariant pPropVar[2];
         pPropVar[0] = aArgNames[ix];
         pPropVar[1] = aArgVals[ix];
@@ -822,7 +822,7 @@ HRESULT CSOActiveX::LoadURLToFrame( )
             {
                 // this is a presentation
                 // let the slide show be shown in the document window
-                OLECHAR* pPropName = L"IsFullScreen";
+                OLECHAR const * pPropName = L"IsFullScreen";
                 CComVariant pPresProp;
                 pPresProp.vt = VT_BOOL; pPresProp.boolVal = VARIANT_FALSE ;
                 hr = PutPropertiesToIDisp( pdispPres, &pPropName, &pPresProp, 1 );
diff --git a/extensions/source/activex/SOActiveX.h b/extensions/source/activex/SOActiveX.h
index 23824a2..570b37e 100644
--- a/extensions/source/activex/SOActiveX.h
+++ b/extensions/source/activex/SOActiveX.h
@@ -87,7 +87,7 @@ protected:
     CComPtr<IDispatch>      mpDispFrame;
     CComPtr<IDispatch>      mpInstanceLocker;
     CComPtr<IDispatch>      mpDispWin;
-    OLECHAR*                mCurFileUrl;
+    OLECHAR const *         mCurFileUrl;
     BOOL                    mbLoad;
     BOOL                    mbViewOnly;
     WNDCLASS                mPWinClass;
@@ -185,11 +185,11 @@ public:
 
     HRESULT SetLayoutManagerProps();
     HRESULT CreateFrameOldWay( HWND hwnd, int width, int height );
-    HRESULT GetUnoStruct( OLECHAR* sStructName, CComPtr<IDispatch>& pdispResult );
+    HRESULT GetUnoStruct( OLECHAR const * sStructName, CComPtr<IDispatch>& pdispResult );
     HRESULT LoadURLToFrame();
-    HRESULT CallDispatchMethod( OLECHAR* sUrl, CComVariant* sArgNames, CComVariant* sArgVal, unsigned int count );
+    HRESULT CallDispatchMethod( OLECHAR const * sUrl, CComVariant* sArgNames, CComVariant* sArgVal, unsigned int count );
     HRESULT CallLoadComponentFromURL1PBool( OLECHAR* sUrl, OLECHAR* sArgName, BOOL sArgVal );
-    HRESULT GetUrlStruct( OLECHAR* sUrl, CComPtr<IDispatch>& pdispUrl );
+    HRESULT GetUrlStruct( OLECHAR const * sUrl, CComPtr<IDispatch>& pdispUrl );
     HRESULT Cleanup();
     HRESULT TerminateOffice();
     HRESULT GetURL( const OLECHAR* url,
diff --git a/extensions/source/activex/SODispatchInterceptor.cxx b/extensions/source/activex/SODispatchInterceptor.cxx
index 035d613..8df2813 100644
--- a/extensions/source/activex/SODispatchInterceptor.cxx
+++ b/extensions/source/activex/SODispatchInterceptor.cxx
@@ -66,9 +66,9 @@ STDMETHODIMP SODispatchInterceptor::queryDispatch( IDispatch FAR* aURL,
     if ( !aURL || !retVal ) return E_FAIL;
 
     CComVariant aTargetUrl;
-    OLECHAR* sURLMemberName = L"Complete";
+    OLECHAR const * sURLMemberName = L"Complete";
     DISPID nURLID;
-    HRESULT hr = aURL->GetIDsOfNames( IID_NULL, &sURLMemberName, 1, LOCALE_USER_DEFAULT, &nURLID );
+    HRESULT hr = aURL->GetIDsOfNames( IID_NULL, const_cast<OLECHAR **>(&sURLMemberName), 1, LOCALE_USER_DEFAULT, &nURLID );
     if( !SUCCEEDED( hr ) ) return hr;
 
     hr = CComDispatchDriver::GetProperty( aURL, nURLID, &aTargetUrl );
@@ -139,7 +139,7 @@ STDMETHODIMP SODispatchInterceptor::queryDispatches( SAFEARRAY FAR* aDescripts,
         SafeArrayGetElement( aDescripts, &ind, pElem );
         if( pElem )
         {
-            OLECHAR* pMemberNames[3] = { L"FeatureURL", L"FrameName", L"SearchFlags" };
+            OLECHAR const * pMemberNames[3] = { L"FeatureURL", L"FrameName", L"SearchFlags" };
             CComVariant pValues[3];
             hr = GetPropertiesFromIDisp( pElem, pMemberNames, pValues, 3 );
             if( !SUCCEEDED( hr ) ) return hr;
@@ -160,7 +160,7 @@ STDMETHODIMP SODispatchInterceptor::queryDispatches( SAFEARRAY FAR* aDescripts,
 STDMETHODIMP SODispatchInterceptor::dispatch( IDispatch FAR* aURL, SAFEARRAY FAR* aArgs)
 {
     // get url from aURL
-    OLECHAR* pUrlName = L"Complete";
+    OLECHAR const * pUrlName = L"Complete";
     CComVariant pValue;
     HRESULT hr = GetPropertiesFromIDisp( aURL, &pUrlName, &pValue, 1 );
     if( !SUCCEEDED( hr ) ) return hr;
@@ -186,7 +186,7 @@ STDMETHODIMP SODispatchInterceptor::dispatch( IDispatch FAR* aURL, SAFEARRAY FAR
             SafeArrayGetElement( aArgs, &ind, &pVarElem );
             if( pVarElem.vt == VT_DISPATCH && pVarElem.pdispVal != NULL )
             {
-                OLECHAR* pMemberNames[2] = { L"Name", L"Value" };
+                OLECHAR const * pMemberNames[2] = { L"Name", L"Value" };
                 CComVariant pValues[2];
                 hr = GetPropertiesFromIDisp( pVarElem.pdispVal, pMemberNames, pValues, 2 );
                 if( !SUCCEEDED( hr ) ) return hr;
diff --git a/extensions/source/activex/com_uno_helper.h b/extensions/source/activex/com_uno_helper.h
index d0caa0a..a3d09ea 100644
--- a/extensions/source/activex/com_uno_helper.h
+++ b/extensions/source/activex/com_uno_helper.h
@@ -20,7 +20,7 @@
 #include "stdafx2.h"
 
 HRESULT ExecuteFunc( IDispatch* idispUnoObject,
-                     OLECHAR* sFuncName,
+                     OLECHAR const * sFuncName,
                      CComVariant* params,
                      unsigned int count,
                      CComVariant* pResult );
@@ -37,7 +37,7 @@ HRESULT PutPropertiesToIDisp( IDispatch* pdispObject,
                               unsigned int count );
 
 HRESULT GetPropertiesFromIDisp( IDispatch* pdispObject,
-                                OLECHAR** sMemberNames,
+                                OLECHAR const ** sMemberNames,
                                 CComVariant* pVariant,
                                 unsigned int count );
 
commit 1590a19cb56445227a90d7e9e8ed6a11ea7fddf0
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Fri Mar 4 16:14:39 2016 +0100

    Avoid more warnings in external includes (clang-cl)
    
    Change-Id: Ia0fe12b1159a5fa9fd36b8731bfab178b403e67e

diff --git a/extensions/source/activex/StdAfx2.h b/extensions/source/activex/StdAfx2.h
index 8d929a9..6ec5fe5 100644
--- a/extensions/source/activex/StdAfx2.h
+++ b/extensions/source/activex/StdAfx2.h
@@ -49,8 +49,11 @@
 #pragma clang diagnostic ignored "-Wint-to-pointer-cast"
 #pragma clang diagnostic ignored "-Winvalid-noreturn"
 #pragma clang diagnostic ignored "-Wmicrosoft"
+#pragma clang diagnostic ignored "-Wmissing-field-initializers"
 #pragma clang diagnostic ignored "-Wnon-pod-varargs"
+#pragma clang diagnostic ignored "-Wnon-virtual-dtor"
 #pragma clang diagnostic ignored "-Wsequence-point"
+#pragma clang diagnostic ignored "-Wsign-compare"
 #pragma clang diagnostic ignored "-Wtypename-missing"
 #endif
 
commit a80d75c701f7a83998e05d53a5899fbccb21d2cc
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Fri Mar 4 16:10:46 2016 +0100

    -Werror,-Wreorder
    
    Change-Id: I57a5c19143d59cfec42b0109846b7d62fec2b0ad

diff --git a/extensions/source/activex/SOActiveX.cxx b/extensions/source/activex/SOActiveX.cxx
index 0fdbb82..4fa427f 100644
--- a/extensions/source/activex/SOActiveX.cxx
+++ b/extensions/source/activex/SOActiveX.cxx
@@ -150,8 +150,8 @@ CSOActiveX::CSOActiveX()
 : mCookie(0)
 , mCurFileUrl( L"private:factory/swriter" )
 , mbLoad( FALSE )
-, mParentWin( NULL )
 , mbViewOnly( TRUE )
+, mParentWin( NULL )
 , mOffWin( NULL )
 , mpDispatchInterceptor( NULL )
 , mnVersion( SO_NOT_DETECTED )
commit f26996bd3398afa789a5491968244563ccf70908
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Fri Mar 4 16:08:49 2016 +0100

    Silence -Werror,-Wnon-virtual-dtor in generated so_activex.h (clang-cl)
    
    Change-Id: If9472d25f469030102b26894793ba45ab0fafaa3

diff --git a/extensions/source/activex/SOActionsApproval.cxx b/extensions/source/activex/SOActionsApproval.cxx
index d0e2442..32f592c 100644
--- a/extensions/source/activex/SOActionsApproval.cxx
+++ b/extensions/source/activex/SOActionsApproval.cxx
@@ -25,10 +25,17 @@
 
 #include "stdafx2.h"
 
-#include "so_activex.h"
 #include "SOActionsApproval.h"
 #include <sal/macros.h>
 
+#if defined __clang__
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wnon-virtual-dtor"
+#endif
+#include "so_activex.h"
+#if defined __clang__
+#pragma clang diagnostic pop
+#endif
 
 STDMETHODIMP SOActionsApproval::InterfaceSupportsErrorInfo(REFIID riid)
 {
diff --git a/extensions/source/activex/SOActionsApproval.h b/extensions/source/activex/SOActionsApproval.h
index 68d9778..d56ce3d 100644
--- a/extensions/source/activex/SOActionsApproval.h
+++ b/extensions/source/activex/SOActionsApproval.h
@@ -33,8 +33,14 @@
 
 #include <atlctl.h>
 
+#if defined __clang__
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wnon-virtual-dtor"
+#endif
 #include "so_activex.h"
-
+#if defined __clang__
+#pragma clang diagnostic pop
+#endif
 
 // SOActionsApproval
 
diff --git a/extensions/source/activex/SOActiveX.cxx b/extensions/source/activex/SOActiveX.cxx
index 538ccd9..0fdbb82 100644
--- a/extensions/source/activex/SOActiveX.cxx
+++ b/extensions/source/activex/SOActiveX.cxx
@@ -23,12 +23,20 @@
 #pragma warning (disable:4265)
 
 #include "stdafx2.h"
-#include "so_activex.h"
 #include "SOActiveX.h"
 #include "SOComWindowPeer.h"
 #include "SODispatchInterceptor.h"
 #include "SOActionsApproval.h"
 
+#if defined __clang__
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wnon-virtual-dtor"
+#endif
+#include "so_activex.h"
+#if defined __clang__
+#pragma clang diagnostic pop
+#endif
+
 #pragma warning (pop)
 
 #define STAROFFICE_WINDOWCLASS "SOParentWindow"
diff --git a/extensions/source/activex/SOActiveX.h b/extensions/source/activex/SOActiveX.h
index bacee818..23824a2 100644
--- a/extensions/source/activex/SOActiveX.h
+++ b/extensions/source/activex/SOActiveX.h
@@ -33,7 +33,14 @@
 
 #include <atlctl.h>
 
+#if defined __clang__
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wnon-virtual-dtor"
+#endif
 #include "so_activex.h"
+#if defined __clang__
+#pragma clang diagnostic pop
+#endif
 
 #pragma warning (pop)
 
diff --git a/extensions/source/activex/SOComWindowPeer.cxx b/extensions/source/activex/SOComWindowPeer.cxx
index 1b7266a..afee0ba 100644
--- a/extensions/source/activex/SOComWindowPeer.cxx
+++ b/extensions/source/activex/SOComWindowPeer.cxx
@@ -24,10 +24,17 @@
 #include <cstddef>
 
 #include "stdafx2.h"
-#include "so_activex.h"
 #include "SOComWindowPeer.h"
 #include <sal/macros.h>
 
+#if defined __clang__
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wnon-virtual-dtor"
+#endif
+#include "so_activex.h"
+#if defined __clang__
+#pragma clang diagnostic pop
+#endif
 
 STDMETHODIMP SOComWindowPeer::InterfaceSupportsErrorInfo(REFIID riid)
 {
diff --git a/extensions/source/activex/SOComWindowPeer.h b/extensions/source/activex/SOComWindowPeer.h
index b038378..b1c6f86 100644
--- a/extensions/source/activex/SOComWindowPeer.h
+++ b/extensions/source/activex/SOComWindowPeer.h
@@ -33,8 +33,14 @@
 
 #include <atlctl.h>
 
+#if defined __clang__
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wnon-virtual-dtor"
+#endif
 #include "so_activex.h"
-
+#if defined __clang__
+#pragma clang diagnostic pop
+#endif
 
 // SOComWindowPeer
 
diff --git a/extensions/source/activex/SODispatchInterceptor.cxx b/extensions/source/activex/SODispatchInterceptor.cxx
index 1ffb662..035d613 100644
--- a/extensions/source/activex/SODispatchInterceptor.cxx
+++ b/extensions/source/activex/SODispatchInterceptor.cxx
@@ -25,12 +25,19 @@
 
 #include "stdio.h"
 #include "stdafx2.h"
-#include "so_activex.h"
 #include "SOActiveX.h"
 #include "SODispatchInterceptor.h"
 #include "com_uno_helper.h"
 #include <sal/macros.h>
 
+#if defined __clang__
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wnon-virtual-dtor"
+#endif
+#include "so_activex.h"
+#if defined __clang__
+#pragma clang diagnostic pop
+#endif
 
 STDMETHODIMP SODispatchInterceptor::InterfaceSupportsErrorInfo(REFIID riid)
 {
diff --git a/extensions/source/activex/so_activex.cxx b/extensions/source/activex/so_activex.cxx
index a423020..21229a8 100644
--- a/extensions/source/activex/so_activex.cxx
+++ b/extensions/source/activex/so_activex.cxx
@@ -27,7 +27,15 @@
 #include "stdafx2.h"
 #include "resource.h"
 #include <initguid.h>
+
+#if defined __clang__
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wnon-virtual-dtor"
+#endif
 #include "so_activex.h"
+#if defined __clang__
+#pragma clang diagnostic pop
+#endif
 
 #if defined __clang__
 #pragma clang diagnostic push
commit 368d7e97475a0282c868b32d006b237201cd0e39
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Fri Mar 4 16:05:45 2016 +0100

    Silence -Werror,-Wmissing-field-initializers in END_OBJECT_MAP (clang-cl)
    
    Change-Id: I726679681137e54d55af13ad1d4900525fa60eba

diff --git a/extensions/source/activex/so_activex.cxx b/extensions/source/activex/so_activex.cxx
index b5e9daf..a423020 100644
--- a/extensions/source/activex/so_activex.cxx
+++ b/extensions/source/activex/so_activex.cxx
@@ -47,8 +47,14 @@ CComModule _Module;
 
 BEGIN_OBJECT_MAP(ObjectMap)
 OBJECT_ENTRY(CLSID_SOActiveX, CSOActiveX)
+#if defined __clang__
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wmissing-field-initializers"
+#endif
 END_OBJECT_MAP()
-
+#if defined __clang__
+#pragma clang diagnostic pop
+#endif
 
 #define X64_LIB_NAME "so_activex_x64.dll"
 #define X32_LIB_NAME "so_activex.dll"
commit 8fd288d86acbc6d490ece19d48f1b1af63774a98
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Fri Mar 4 16:02:49 2016 +0100

    -Werror,-Wsign-compare
    
    Change-Id: Ia7b0518a05cda8881ab6feed9852e9f060813b5c

diff --git a/extensions/source/activex/SOActionsApproval.cxx b/extensions/source/activex/SOActionsApproval.cxx
index b6b6d59..d0e2442 100644
--- a/extensions/source/activex/SOActionsApproval.cxx
+++ b/extensions/source/activex/SOActionsApproval.cxx
@@ -19,6 +19,10 @@
 
 // SOActionsApproval.cpp : Implementation of CHelpApp and DLL registration.
 
+#include <sal/config.h>
+
+#include <cstddef>
+
 #include "stdafx2.h"
 
 #include "so_activex.h"
@@ -33,7 +37,7 @@ STDMETHODIMP SOActionsApproval::InterfaceSupportsErrorInfo(REFIID riid)
         &IID_ISOActionsApproval,
     };
 
-    for (int i=0;i<SAL_N_ELEMENTS(arr);i++)
+    for (std::size_t i=0;i<SAL_N_ELEMENTS(arr);i++)
     {
 #ifdef _MSC_VER
         if (InlineIsEqualGUID(*arr[i],riid))
diff --git a/extensions/source/activex/SOComWindowPeer.cxx b/extensions/source/activex/SOComWindowPeer.cxx
index e752685..1b7266a 100644
--- a/extensions/source/activex/SOComWindowPeer.cxx
+++ b/extensions/source/activex/SOComWindowPeer.cxx
@@ -19,6 +19,10 @@
 
 // SOComWindowPeer.cpp : Implementation of CHelpApp and DLL registration.
 
+#include <sal/config.h>
+
+#include <cstddef>
+
 #include "stdafx2.h"
 #include "so_activex.h"
 #include "SOComWindowPeer.h"
@@ -32,7 +36,7 @@ STDMETHODIMP SOComWindowPeer::InterfaceSupportsErrorInfo(REFIID riid)
         &IID_ISOComWindowPeer,
     };
 
-    for (int i=0;i<SAL_N_ELEMENTS(arr);i++)
+    for (std::size_t i=0;i<SAL_N_ELEMENTS(arr);i++)
     {
 #ifdef _MSC_VER
         if (InlineIsEqualGUID(*arr[i],riid))
diff --git a/extensions/source/activex/SODispatchInterceptor.cxx b/extensions/source/activex/SODispatchInterceptor.cxx
index 2cdd23e..1ffb662 100644
--- a/extensions/source/activex/SODispatchInterceptor.cxx
+++ b/extensions/source/activex/SODispatchInterceptor.cxx
@@ -19,6 +19,10 @@
 
 // SODispatchInterceptor.cpp : Implementation of CHelpApp and DLL registration.
 
+#include <sal/config.h>
+
+#include <cstddef>
+
 #include "stdio.h"
 #include "stdafx2.h"
 #include "so_activex.h"
@@ -35,7 +39,7 @@ STDMETHODIMP SODispatchInterceptor::InterfaceSupportsErrorInfo(REFIID riid)
         &IID_ISODispatchInterceptor,
     };
 
-    for (int i=0;i<SAL_N_ELEMENTS(arr);i++)
+    for (std::size_t i=0;i<SAL_N_ELEMENTS(arr);i++)
     {
 #ifdef _MSC_VER
         if (InlineIsEqualGUID(*arr[i],riid))


More information about the Libreoffice-commits mailing list