summaryrefslogtreecommitdiff
path: root/shell
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
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')
-rw-r--r--shell/inc/columninfo.hxx4
-rw-r--r--shell/inc/global.hxx2
-rw-r--r--shell/inc/infotips.hxx4
-rw-r--r--shell/inc/propertyhdl.hxx8
-rw-r--r--shell/inc/propsheets.hxx4
-rw-r--r--shell/inc/spsupp/COMOpenDocuments.hpp4
-rw-r--r--shell/inc/spsupp/COMRefCounted.hpp2
-rw-r--r--shell/inc/spsupp/spsuppClassFactory.hpp8
-rw-r--r--shell/inc/thumbviewer.hxx4
-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
20 files changed, 48 insertions, 48 deletions
diff --git a/shell/inc/columninfo.hxx b/shell/inc/columninfo.hxx
index 6a6710a65ac6..de122ad1f361 100644
--- a/shell/inc/columninfo.hxx
+++ b/shell/inc/columninfo.hxx
@@ -26,7 +26,7 @@
class CColumnInfo : public IColumnProvider
{
public:
- CColumnInfo(long RefCnt = 1);
+ CColumnInfo(LONG RefCnt = 1);
virtual ~CColumnInfo();
@@ -53,7 +53,7 @@ public:
LPCSHCOLUMNID pscid, LPCSHCOLUMNDATA pscd, VARIANT *pvarData) override;
private:
- long m_RefCnt;
+ LONG m_RefCnt;
};
#endif
diff --git a/shell/inc/global.hxx b/shell/inc/global.hxx
index fb812bcf8140..a729d59301e8 100644
--- a/shell/inc/global.hxx
+++ b/shell/inc/global.hxx
@@ -25,7 +25,7 @@
#endif
#include <windows.h>
-extern long g_DllRefCnt;
+extern LONG g_DllRefCnt;
#endif
diff --git a/shell/inc/infotips.hxx b/shell/inc/infotips.hxx
index ac9218a71762..5a1128cb7d61 100644
--- a/shell/inc/infotips.hxx
+++ b/shell/inc/infotips.hxx
@@ -28,7 +28,7 @@
class CInfoTip : public IQueryInfo, public IPersistFile
{
public:
- CInfoTip(long RefCnt = 1);
+ CInfoTip(LONG RefCnt = 1);
virtual ~CInfoTip();
@@ -78,7 +78,7 @@ public:
/* [out] */ LPOLESTR __RPC_FAR *ppszFileName) override;
private:
- long m_RefCnt;
+ LONG m_RefCnt;
Filepath_char_t m_szFileName[MAX_PATH];
std::wstring m_FileNameOnly;
};
diff --git a/shell/inc/propertyhdl.hxx b/shell/inc/propertyhdl.hxx
index 725885525de6..44c848e403cc 100644
--- a/shell/inc/propertyhdl.hxx
+++ b/shell/inc/propertyhdl.hxx
@@ -33,7 +33,7 @@ class CPropertyHdl : public IPropertyStore,
public IInitializeWithStream
{
public:
- CPropertyHdl(long RefCnt = 1);
+ CPropertyHdl(LONG RefCnt = 1);
virtual ~CPropertyHdl();
@@ -68,7 +68,7 @@ private:
void LoadProperties( CMetaInfoReader *pMetaInfoReader );
private:
- long m_RefCnt;
+ LONG m_RefCnt;
IPropertyStoreCache* m_pCache;
};
@@ -99,9 +99,9 @@ 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/inc/propsheets.hxx b/shell/inc/propsheets.hxx
index 2c3883555d1e..68e28192922d 100644
--- a/shell/inc/propsheets.hxx
+++ b/shell/inc/propsheets.hxx
@@ -30,7 +30,7 @@
class CPropertySheet : public IShellExtInit, public IShellPropSheetExt
{
public:
- CPropertySheet(long RefCnt = 1);
+ CPropertySheet(LONG RefCnt = 1);
virtual ~CPropertySheet();
@@ -74,7 +74,7 @@ private:
void InitPropPageStatistics(HWND hwnd, LPPROPSHEETPAGE lppsp);
private:
- long m_RefCnt;
+ LONG m_RefCnt;
Filepath_char_t m_szFileName[MAX_PATH];
};
diff --git a/shell/inc/spsupp/COMOpenDocuments.hpp b/shell/inc/spsupp/COMOpenDocuments.hpp
index 21b378d895e6..44089dd40672 100644
--- a/shell/inc/spsupp/COMOpenDocuments.hpp
+++ b/shell/inc/spsupp/COMOpenDocuments.hpp
@@ -172,10 +172,10 @@ public:
// Non-COM methods
- static long GetObjectCount();
+ static LONG GetObjectCount();
private:
- static long m_nObjCount;
+ static LONG m_nObjCount;
static ITypeInfo* m_pTypeInfo;
static constexpr DWORD iSupportedOptionsMask = INTERFACESAFE_FOR_UNTRUSTED_CALLER | INTERFACESAFE_FOR_UNTRUSTED_DATA;
DWORD m_iEnabledOptions = 0;
diff --git a/shell/inc/spsupp/COMRefCounted.hpp b/shell/inc/spsupp/COMRefCounted.hpp
index 0c2460ba2bf8..4a3ce80bfb5a 100644
--- a/shell/inc/spsupp/COMRefCounted.hpp
+++ b/shell/inc/spsupp/COMRefCounted.hpp
@@ -39,7 +39,7 @@ public:
}
private:
- long m_nRef = 1; // Created referenced
+ LONG m_nRef = 1; // Created referenced
};
#endif
diff --git a/shell/inc/spsupp/spsuppClassFactory.hpp b/shell/inc/spsupp/spsuppClassFactory.hpp
index 9deccbd97edc..bf97fca13fce 100644
--- a/shell/inc/spsupp/spsuppClassFactory.hpp
+++ b/shell/inc/spsupp/spsuppClassFactory.hpp
@@ -36,12 +36,12 @@ public:
// Non-COM methods
- static long GetObjectCount() { return m_nObjCount; }
- static long GetLockCount() { return m_nLockCount; }
+ static LONG GetObjectCount() { return m_nObjCount; }
+ static LONG GetLockCount() { return m_nLockCount; }
private:
- static long m_nObjCount;
- static long m_nLockCount;
+ static LONG m_nObjCount;
+ static LONG m_nLockCount;
};
#endif
diff --git a/shell/inc/thumbviewer.hxx b/shell/inc/thumbviewer.hxx
index 37e348118b5d..23310691e0b7 100644
--- a/shell/inc/thumbviewer.hxx
+++ b/shell/inc/thumbviewer.hxx
@@ -30,7 +30,7 @@
class CThumbviewer : public IPersistFile, public IExtractImage
{
public:
- CThumbviewer(long RefCnt = 1);
+ CThumbviewer(LONG RefCnt = 1);
virtual ~CThumbviewer();
@@ -86,7 +86,7 @@ public:
/* [out] */ LPOLESTR __RPC_FAR *ppszFileName) override;
private:
- long ref_count_;
+ LONG ref_count_;
std::wstring filename_;
SIZE thumbnail_size_;
DWORD color_depth_;
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()
{