[Libreoffice-commits] .: extensions/source

Tor Lillqvist tml at kemper.freedesktop.org
Mon Jan 24 08:57:02 PST 2011


 extensions/source/ole/jscriptclasses.hxx |    3 ++-
 extensions/source/ole/makefile.mk        |    2 +-
 extensions/source/ole/servprov.cxx       |   12 ++++++------
 extensions/source/ole/servprov.hxx       |   11 ++++-------
 extensions/source/ole/unoobjw.cxx        |    6 +++---
 extensions/source/ole/unoobjw.hxx        |    9 ++-------
 extensions/source/ole/unotypewrapper.hxx |    4 +++-
 7 files changed, 21 insertions(+), 26 deletions(-)

New commits:
commit bafa185bec55ce11a3693fe70486cd99fb8eb865
Author: Tor Lillqvist <tlillqvist at novell.com>
Date:   Mon Jan 24 17:37:04 2011 +0200

    Fix fallout of WIN_ULONG change in pre/postsys.h

diff --git a/extensions/source/ole/jscriptclasses.hxx b/extensions/source/ole/jscriptclasses.hxx
index 7eab4bd..f19898e 100644
--- a/extensions/source/ole/jscriptclasses.hxx
+++ b/extensions/source/ole/jscriptclasses.hxx
@@ -42,7 +42,6 @@
 #include <atlbase.h>
 extern CComModule _Module;
 #include <atlcom.h>
-#include <tools/postsys.h>
 
 #pragma warning (pop)
 #pragma warning (disable:4505)
@@ -158,6 +157,8 @@ private:
     CComVariant m_varValue;
 };
 
+#include <tools/postsys.h>
+
 #endif
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/extensions/source/ole/makefile.mk b/extensions/source/ole/makefile.mk
index e20e83e..87841c4 100644
--- a/extensions/source/ole/makefile.mk
+++ b/extensions/source/ole/makefile.mk
@@ -121,7 +121,7 @@ SHL2OBJS=$(REAL_OWNGUID_SLOFILES)
 DEF2NAME=$(SHL2TARGET)
 DEF2EXPORTFILE=$(TARGET).dxp
 
-.ENDIF
+.ENDIF # "$(GUI)" == "WNT" && "$(DISABLE_ATL)"==""
 
 #----------------------------------------------------------------
 
diff --git a/extensions/source/ole/servprov.cxx b/extensions/source/ole/servprov.cxx
index ecf45a4..608abd8 100644
--- a/extensions/source/ole/servprov.cxx
+++ b/extensions/source/ole/servprov.cxx
@@ -154,15 +154,15 @@ STDMETHODIMP ProviderOleWrapper_Impl::QueryInterface(REFIID riid, void FAR* FAR*
     return ResultFromScode(E_NOINTERFACE);
 }
 
-STDMETHODIMP_(ULONG) ProviderOleWrapper_Impl::AddRef()
+STDMETHODIMP_(WIN_ULONG) ProviderOleWrapper_Impl::AddRef()
 {
     return osl_incrementInterlockedCount( &m_refCount);
 }
 
-STDMETHODIMP_(ULONG) ProviderOleWrapper_Impl::Release()
+STDMETHODIMP_(WIN_ULONG) ProviderOleWrapper_Impl::Release()
 {
     MutexGuard aGuard( Mutex::getGlobalMutex());
-    ULONG refCount = --m_refCount;
+    WIN_ULONG refCount = --m_refCount;
     if (m_refCount == 0)
     {
         delete this;
@@ -300,15 +300,15 @@ STDMETHODIMP OneInstanceOleWrapper_Impl::QueryInterface(REFIID riid, void FAR* F
     return ResultFromScode(E_NOINTERFACE);
 }
 
-STDMETHODIMP_(ULONG) OneInstanceOleWrapper_Impl::AddRef()
+STDMETHODIMP_(WIN_ULONG) OneInstanceOleWrapper_Impl::AddRef()
 {
     return osl_incrementInterlockedCount( &m_refCount);
 }
 
-STDMETHODIMP_(ULONG) OneInstanceOleWrapper_Impl::Release()
+STDMETHODIMP_(WIN_ULONG) OneInstanceOleWrapper_Impl::Release()
 {
     MutexGuard oGuard( Mutex::getGlobalMutex());
-    ULONG refCount = --m_refCount;
+    WIN_ULONG refCount = --m_refCount;
     if ( m_refCount == 0)
     {
         delete this;
diff --git a/extensions/source/ole/servprov.hxx b/extensions/source/ole/servprov.hxx
index 49091b1..c2d683c 100644
--- a/extensions/source/ole/servprov.hxx
+++ b/extensions/source/ole/servprov.hxx
@@ -35,7 +35,6 @@
 #include "ole2uno.hxx"
 #include "unoconversionutilities.hxx"
 
-
 using namespace com::sun::star::bridge;
 using namespace cppu;
 using namespace std;
@@ -97,8 +96,8 @@ public:
     
     /* IUnknown methods */
     STDMETHOD(QueryInterface)(REFIID riid, LPVOID FAR * ppvObj);
-    STDMETHOD_(ULONG, AddRef)();
-    STDMETHOD_(ULONG, Release)();
+    STDMETHOD_(WIN_ULONG, AddRef)();
+    STDMETHOD_(WIN_ULONG, Release)();
 
     /* IClassFactory methods */
     STDMETHOD(CreateInstance)(IUnknown FAR* punkOuter, REFIID riid, void FAR* FAR* ppv);
@@ -139,8 +138,8 @@ public:
     
     /* IUnknown methods */
     STDMETHOD(QueryInterface)(REFIID riid, LPVOID FAR * ppvObj);
-    STDMETHOD_(ULONG, AddRef)();
-    STDMETHOD_(ULONG, Release)();
+    STDMETHOD_(WIN_ULONG, AddRef)();
+    STDMETHOD_(WIN_ULONG, Release)();
 
     /* IClassFactory methods */
     STDMETHOD(CreateInstance)(IUnknown FAR* punkOuter, REFIID riid, void FAR* FAR* ppv);
@@ -274,6 +273,4 @@ protected:
 } // end namespace
 #endif
 
-
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/extensions/source/ole/unoobjw.cxx b/extensions/source/ole/unoobjw.cxx
index 5c56c00..77bfbf6 100644
--- a/extensions/source/ole/unoobjw.cxx
+++ b/extensions/source/ole/unoobjw.cxx
@@ -157,7 +157,7 @@ STDMETHODIMP InterfaceOleWrapper_Impl::QueryInterface(REFIID riid, LPVOID FAR *
     return ret;
 }	
 
-STDMETHODIMP_(ULONG) InterfaceOleWrapper_Impl::AddRef()
+STDMETHODIMP_(WIN_ULONG) InterfaceOleWrapper_Impl::AddRef()
 {
     acquire();
     // does not need to guard because one should not rely on the return value of
@@ -165,9 +165,9 @@ STDMETHODIMP_(ULONG) InterfaceOleWrapper_Impl::AddRef()
     return m_refCount;
 }	
 
-STDMETHODIMP_(ULONG) InterfaceOleWrapper_Impl::Release()
+STDMETHODIMP_(WIN_ULONG) InterfaceOleWrapper_Impl::Release()
 {
-    ULONG n= m_refCount;
+    WIN_ULONG n= m_refCount;
     release();
     return n - 1;
 }	
diff --git a/extensions/source/ole/unoobjw.hxx b/extensions/source/ole/unoobjw.hxx
index e007dd6..7552e44 100644
--- a/extensions/source/ole/unoobjw.hxx
+++ b/extensions/source/ole/unoobjw.hxx
@@ -35,10 +35,7 @@
 #include <com/sun/star/script/InvocationInfo.hpp>
 #include <salhelper/simplereferenceobject.hxx>
 
-#include <tools/presys.h>
 #include "comifaces.hxx"
-#include <tools/postsys.h>
-
 #include "ole2uno.hxx"
 #include "unoconversionutilities.hxx"
 
@@ -130,8 +127,8 @@ public:
 
     /* IUnknown methods */
     STDMETHOD(QueryInterface)(REFIID riid, LPVOID FAR * ppvObj);
-    STDMETHOD_(ULONG, AddRef)();
-    STDMETHOD_(ULONG, Release)();
+    STDMETHOD_(WIN_ULONG, AddRef)();
+    STDMETHOD_(WIN_ULONG, Release)();
 
     /* IDispatch methods */
     STDMETHOD( GetTypeInfoCount )( unsigned int * pctinfo );
@@ -293,8 +290,6 @@ protected:
 
 };
 
-
-
 } // end namespace
 
 #endif
diff --git a/extensions/source/ole/unotypewrapper.hxx b/extensions/source/ole/unotypewrapper.hxx
index 4e75ccf..1d072c9 100644
--- a/extensions/source/ole/unotypewrapper.hxx
+++ b/extensions/source/ole/unotypewrapper.hxx
@@ -41,7 +41,6 @@
 #include <atlbase.h>
 extern CComModule _Module;
 #include <atlcom.h>
-#include <tools/postsys.h>
 
 #pragma warning (pop)
 #pragma warning (disable:4505)
@@ -98,6 +97,9 @@ public:
     CComBSTR m_sName;
 };
 
+// This here so that WIN_ULONG is used also in the magic macros above
+#include <tools/postsys.h>
+
 #endif
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */


More information about the Libreoffice-commits mailing list