summaryrefslogtreecommitdiff
path: root/shell/source
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2020-11-27 10:38:05 +0100
committerStephan Bergmann <sbergman@redhat.com>2020-11-27 13:16:46 +0100
commit2a78e9ddafcfa644e771bb2fc47d5ca23f46af59 (patch)
tree44d9688f35431cc55c13f8f9b15fb8065bc91bdd /shell/source
parenta93b47c0a788771cc761f37e610985cbeb971a1e (diff)
Windows InterlockedIncrement/Decrement use LONG
Change-Id: Ib3e8e89332399eba443d9ff291f694cfceb95af1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106726 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'shell/source')
-rw-r--r--shell/source/win32/shlxthandler/classfactory.cxx4
-rw-r--r--shell/source/win32/shlxthandler/classfactory.hxx4
-rw-r--r--shell/source/win32/shlxthandler/columninfo/columninfo.cxx4
-rw-r--r--shell/source/win32/shlxthandler/infotips/infotips.cxx4
-rw-r--r--shell/source/win32/shlxthandler/ooofilt/ooofilt.hxx6
-rw-r--r--shell/source/win32/shlxthandler/prophdl/propertyhdl.cxx10
-rw-r--r--shell/source/win32/shlxthandler/propsheets/propsheets.cxx8
-rw-r--r--shell/source/win32/shlxthandler/shlxthdl.cxx2
-rw-r--r--shell/source/win32/shlxthandler/thumbviewer/thumbviewer.cxx6
-rw-r--r--shell/source/win32/spsupp/COMOpenDocuments.cxx4
-rw-r--r--shell/source/win32/spsupp/spsuppClassFactory.cxx4
11 files changed, 28 insertions, 28 deletions
diff --git a/shell/source/win32/shlxthandler/classfactory.cxx b/shell/source/win32/shlxthandler/classfactory.cxx
index 1f4200521778..e7384d36b577 100644
--- a/shell/source/win32/shlxthandler/classfactory.cxx
+++ b/shell/source/win32/shlxthandler/classfactory.cxx
@@ -26,7 +26,7 @@
#include <shlxthdl.hxx>
-long CClassFactory::s_ServerLocks = 0;
+LONG CClassFactory::s_ServerLocks = 0;
CClassFactory::CClassFactory(const CLSID& clsid) :
@@ -70,7 +70,7 @@ ULONG STDMETHODCALLTYPE CClassFactory::AddRef()
ULONG STDMETHODCALLTYPE CClassFactory::Release()
{
- long refcnt = InterlockedDecrement(&m_RefCnt);
+ LONG refcnt = InterlockedDecrement(&m_RefCnt);
if (0 == refcnt)
delete this;
diff --git a/shell/source/win32/shlxthandler/classfactory.hxx b/shell/source/win32/shlxthandler/classfactory.hxx
index 2b6ab987f279..8dd01aa0ecaf 100644
--- a/shell/source/win32/shlxthandler/classfactory.hxx
+++ b/shell/source/win32/shlxthandler/classfactory.hxx
@@ -54,10 +54,10 @@ public:
static bool IsLocked();
private:
- long m_RefCnt;
+ LONG m_RefCnt;
CLSID m_Clsid;
- static long s_ServerLocks;
+ static LONG s_ServerLocks;
};
#endif
diff --git a/shell/source/win32/shlxthandler/columninfo/columninfo.cxx b/shell/source/win32/shlxthandler/columninfo/columninfo.cxx
index d1329e0fee0b..c036a63f8f7d 100644
--- a/shell/source/win32/shlxthandler/columninfo/columninfo.cxx
+++ b/shell/source/win32/shlxthandler/columninfo/columninfo.cxx
@@ -55,7 +55,7 @@ bool IsOOFileExtension(wchar_t const * Extension)
}
-CColumnInfo::CColumnInfo(long RefCnt) :
+CColumnInfo::CColumnInfo(LONG RefCnt) :
m_RefCnt(RefCnt)
{
InterlockedIncrement(&g_DllRefCnt);
@@ -95,7 +95,7 @@ COM_DECLSPEC_NOTHROW ULONG STDMETHODCALLTYPE CColumnInfo::AddRef()
COM_DECLSPEC_NOTHROW ULONG STDMETHODCALLTYPE CColumnInfo::Release()
{
- long refcnt = InterlockedDecrement(&m_RefCnt);
+ LONG refcnt = InterlockedDecrement(&m_RefCnt);
if (0 == m_RefCnt)
delete this;
diff --git a/shell/source/win32/shlxthandler/infotips/infotips.cxx b/shell/source/win32/shlxthandler/infotips/infotips.cxx
index 3e3d0c3a1a88..60343e1a4c0b 100644
--- a/shell/source/win32/shlxthandler/infotips/infotips.cxx
+++ b/shell/source/win32/shlxthandler/infotips/infotips.cxx
@@ -39,7 +39,7 @@
const std::wstring WSPACE(SPACE);
-CInfoTip::CInfoTip(long RefCnt) :
+CInfoTip::CInfoTip(LONG RefCnt) :
m_RefCnt(RefCnt)
{
ZeroMemory(m_szFileName, sizeof(m_szFileName));
@@ -89,7 +89,7 @@ ULONG STDMETHODCALLTYPE CInfoTip::AddRef()
ULONG STDMETHODCALLTYPE CInfoTip::Release()
{
- long refcnt = InterlockedDecrement(&m_RefCnt);
+ LONG refcnt = InterlockedDecrement(&m_RefCnt);
if (0 == m_RefCnt)
delete this;
diff --git a/shell/source/win32/shlxthandler/ooofilt/ooofilt.hxx b/shell/source/win32/shlxthandler/ooofilt/ooofilt.hxx
index 1fa9af31c9fa..c178452ffcb5 100644
--- a/shell/source/win32/shlxthandler/ooofilt/ooofilt.hxx
+++ b/shell/source/win32/shlxthandler/ooofilt/ooofilt.hxx
@@ -32,7 +32,7 @@ class CContentReader;
class CMetaInfoReader;
class CFullPropSpec;
-long g_lInstances = 0; // Global count of COooFilter and COooFilterCF instances
+LONG g_lInstances = 0; // Global count of COooFilter and COooFilterCF instances
GUID const guidStorage = PSGUID_STORAGE; // GUID for storage property set
//C-------------------------------------------------------------------------
@@ -134,7 +134,7 @@ private:
COooFilter();
virtual ~COooFilter();
- long m_lRefs; // Reference count
+ LONG m_lRefs; // Reference count
CContentReader * m_pContentReader; // A content reader that retrieves document content.
CMetaInfoReader * m_pMetaInfoReader; // A metainfo reader that retrieves document metainfo.
FilterState m_eState; // State of filtering
@@ -187,7 +187,7 @@ private:
COooFilterCF();
virtual ~COooFilterCF();
- long m_lRefs; // Reference count
+ LONG m_lRefs; // Reference count
};
#endif // INCLUDED_SHELL_SOURCE_WIN32_SHLXTHANDLER_OOOFILT_OOOFILT_HXX
diff --git a/shell/source/win32/shlxthandler/prophdl/propertyhdl.cxx b/shell/source/win32/shlxthandler/prophdl/propertyhdl.cxx
index 5b7121bcf333..49a8b8d067f1 100644
--- a/shell/source/win32/shlxthandler/prophdl/propertyhdl.cxx
+++ b/shell/source/win32/shlxthandler/prophdl/propertyhdl.cxx
@@ -36,7 +36,7 @@
// Module global
-long g_DllRefCnt = 0;
+LONG g_DllRefCnt = 0;
static HINSTANCE g_hModule = nullptr;
const PROPERTYKEY g_rgPROPERTIES[] =
@@ -51,7 +51,7 @@ const PROPERTYKEY g_rgPROPERTIES[] =
size_t const gPropertyTableSize = SAL_N_ELEMENTS(g_rgPROPERTIES);
-CPropertyHdl::CPropertyHdl( long nRefCnt ) :
+CPropertyHdl::CPropertyHdl( LONG nRefCnt ) :
m_RefCnt( nRefCnt ),
m_pCache( nullptr )
{
@@ -115,7 +115,7 @@ ULONG STDMETHODCALLTYPE CPropertyHdl::AddRef()
ULONG STDMETHODCALLTYPE CPropertyHdl::Release()
{
- long refcnt = InterlockedDecrement( &m_RefCnt );
+ LONG refcnt = InterlockedDecrement( &m_RefCnt );
if ( 0 == m_RefCnt )
delete this;
@@ -297,7 +297,7 @@ void CPropertyHdl::LoadProperties( CMetaInfoReader *pMetaInfoReader )
// CClassFactory
-long CClassFactory::s_ServerLocks = 0;
+LONG CClassFactory::s_ServerLocks = 0;
CClassFactory::CClassFactory( const CLSID& clsid ) :
@@ -340,7 +340,7 @@ ULONG STDMETHODCALLTYPE CClassFactory::AddRef()
ULONG STDMETHODCALLTYPE CClassFactory::Release()
{
- long refcnt = InterlockedDecrement( &m_RefCnt );
+ LONG refcnt = InterlockedDecrement( &m_RefCnt );
if (0 == refcnt)
delete this;
diff --git a/shell/source/win32/shlxthandler/propsheets/propsheets.cxx b/shell/source/win32/shlxthandler/propsheets/propsheets.cxx
index a14d49915a8b..218b921332a0 100644
--- a/shell/source/win32/shlxthandler/propsheets/propsheets.cxx
+++ b/shell/source/win32/shlxthandler/propsheets/propsheets.cxx
@@ -47,17 +47,17 @@
----------------------------------------------*/
-CPropertySheet::CPropertySheet(long RefCnt) :
+CPropertySheet::CPropertySheet(LONG RefCnt) :
m_RefCnt(RefCnt)
{
- OutputDebugStringFormatW(L"CPropertySheet::CTor [%d], [%d]", m_RefCnt, g_DllRefCnt );
+ OutputDebugStringFormatW(L"CPropertySheet::CTor [%d], [%ld]", m_RefCnt, g_DllRefCnt );
InterlockedIncrement(&g_DllRefCnt);
}
CPropertySheet::~CPropertySheet()
{
- OutputDebugStringFormatW(L"CPropertySheet::DTor [%d], [%d]", m_RefCnt, g_DllRefCnt );
+ OutputDebugStringFormatW(L"CPropertySheet::DTor [%d], [%ld]", m_RefCnt, g_DllRefCnt );
InterlockedDecrement(&g_DllRefCnt);
}
@@ -100,7 +100,7 @@ ULONG STDMETHODCALLTYPE CPropertySheet::AddRef()
ULONG STDMETHODCALLTYPE CPropertySheet::Release()
{
OutputDebugStringFormatW(L"CPropertySheet::Release [%d]", m_RefCnt );
- long refcnt = InterlockedDecrement(&m_RefCnt);
+ LONG refcnt = InterlockedDecrement(&m_RefCnt);
if (0 == refcnt)
delete this;
diff --git a/shell/source/win32/shlxthandler/shlxthdl.cxx b/shell/source/win32/shlxthandler/shlxthdl.cxx
index 24ca14a44c4b..6383cc2f60c0 100644
--- a/shell/source/win32/shlxthandler/shlxthdl.cxx
+++ b/shell/source/win32/shlxthandler/shlxthdl.cxx
@@ -32,7 +32,7 @@
// Module global
-long g_DllRefCnt = 0;
+LONG g_DllRefCnt = 0;
HINSTANCE g_hModule = nullptr;
namespace /* private */
diff --git a/shell/source/win32/shlxthandler/thumbviewer/thumbviewer.cxx b/shell/source/win32/shlxthandler/thumbviewer/thumbviewer.cxx
index 7cc013b87b91..a2ae80dd0daf 100644
--- a/shell/source/win32/shlxthandler/thumbviewer/thumbviewer.cxx
+++ b/shell/source/win32/shlxthandler/thumbviewer/thumbviewer.cxx
@@ -142,7 +142,7 @@ ULONG STDMETHODCALLTYPE StreamOnZipBuffer::AddRef()
ULONG STDMETHODCALLTYPE StreamOnZipBuffer::Release()
{
- long refcnt = InterlockedDecrement(&ref_count_);
+ LONG refcnt = InterlockedDecrement(&ref_count_);
if (0 == ref_count_)
delete this;
@@ -268,7 +268,7 @@ HRESULT STDMETHODCALLTYPE StreamOnZipBuffer::Clone(IStream **)
{ return E_NOTIMPL; }
-CThumbviewer::CThumbviewer(long RefCnt) :
+CThumbviewer::CThumbviewer(LONG RefCnt) :
ref_count_(RefCnt)
{
InterlockedIncrement(&g_DllRefCnt);
@@ -324,7 +324,7 @@ ULONG STDMETHODCALLTYPE CThumbviewer::AddRef()
ULONG STDMETHODCALLTYPE CThumbviewer::Release()
{
- long refcnt = InterlockedDecrement(&ref_count_);
+ LONG refcnt = InterlockedDecrement(&ref_count_);
if (0 == ref_count_)
delete this;
diff --git a/shell/source/win32/spsupp/COMOpenDocuments.cxx b/shell/source/win32/spsupp/COMOpenDocuments.cxx
index b851f0e5b8b9..87a61691d476 100644
--- a/shell/source/win32/spsupp/COMOpenDocuments.cxx
+++ b/shell/source/win32/spsupp/COMOpenDocuments.cxx
@@ -84,7 +84,7 @@ HRESULT ImplViewDocument(IDispatch* /*pdisp*/, BSTR bstrDocumentLocation, int Op
}
} // namespace
-long COMOpenDocuments::m_nObjCount = 0;
+LONG COMOpenDocuments::m_nObjCount = 0;
ITypeInfo* COMOpenDocuments::m_pTypeInfo = nullptr;
COMOpenDocuments::COMOpenDocuments()
@@ -419,6 +419,6 @@ HRESULT STDMETHODCALLTYPE COMOpenDocuments::SetInterfaceSafetyOptions(
// Non-COM methods
-long COMOpenDocuments::GetObjectCount() { return m_nObjCount; }
+LONG COMOpenDocuments::GetObjectCount() { return m_nObjCount; }
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/shell/source/win32/spsupp/spsuppClassFactory.cxx b/shell/source/win32/spsupp/spsuppClassFactory.cxx
index 737e43b440d3..2a95cf0506fe 100644
--- a/shell/source/win32/spsupp/spsuppClassFactory.cxx
+++ b/shell/source/win32/spsupp/spsuppClassFactory.cxx
@@ -10,8 +10,8 @@
#include <spsuppClassFactory.hpp>
#include <COMOpenDocuments.hpp>
-long ClassFactory::m_nObjCount = 0;
-long ClassFactory::m_nLockCount = 0;
+LONG ClassFactory::m_nObjCount = 0;
+LONG ClassFactory::m_nLockCount = 0;
ClassFactory::ClassFactory()
{