summaryrefslogtreecommitdiff
path: root/setup_native
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2019-11-19 15:15:50 +0100
committerStephan Bergmann <sbergman@redhat.com>2019-11-19 21:34:30 +0100
commit5a11fe87a6f1507149a0965aa740dcdf4ccef3c3 (patch)
tree3f3e788a0e54c94e980bd61e4466d4d6e2c34415 /setup_native
parent77d301f5e40e4f0fb4a127b8b6361a0fb1b1dbd9 (diff)
loplugin:fakebool (clang-cl)
...plus follow-up loplugin:implicitboolconversion and loplugin:redundantcast Change-Id: I9fc9c5cb46fbb50da87ff80af64cb0dfda3e5f90 Reviewed-on: https://gerrit.libreoffice.org/83207 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'setup_native')
-rw-r--r--setup_native/source/win32/customactions/reg4allmsdoc/reg4allmsi.cxx8
-rw-r--r--setup_native/source/win32/customactions/regactivex/regactivex.cxx28
-rw-r--r--setup_native/source/win32/customactions/sellang/sellang.cxx4
-rw-r--r--setup_native/source/win32/customactions/shellextensions/vistaspecial.cxx2
-rw-r--r--setup_native/source/win32/customactions/tools/checkversion.cxx2
5 files changed, 22 insertions, 22 deletions
diff --git a/setup_native/source/win32/customactions/reg4allmsdoc/reg4allmsi.cxx b/setup_native/source/win32/customactions/reg4allmsdoc/reg4allmsi.cxx
index b1ffb6976c87..1a2e82eb7c54 100644
--- a/setup_native/source/win32/customactions/reg4allmsdoc/reg4allmsi.cxx
+++ b/setup_native/source/win32/customactions/reg4allmsdoc/reg4allmsi.cxx
@@ -89,9 +89,9 @@ static void OutputDebugStringFormatW( LPCWSTR, ... )
}
#endif
-static BOOL CheckExtensionInRegistry( LPCWSTR lpSubKey )
+static bool CheckExtensionInRegistry( LPCWSTR lpSubKey )
{
- BOOL bRet = false;
+ bool bRet = false;
HKEY hKey = nullptr;
LONG lResult = RegOpenKeyExW( HKEY_CLASSES_ROOT, lpSubKey, 0, KEY_QUERY_VALUE, &hKey );
@@ -216,14 +216,14 @@ static void saveOldRegistration( LPCWSTR lpSubKey )
}
}
-static void registerForExtensions( MSIHANDLE handle, BOOL bRegisterAll )
+static void registerForExtensions( MSIHANDLE handle, bool bRegisterAll )
{ // Check all file extensions
int nIndex = 0;
while ( g_Extensions[nIndex] != nullptr )
{
saveOldRegistration( g_Extensions[nIndex] );
- BOOL bRegister = bRegisterAll || CheckExtensionInRegistry( g_Extensions[nIndex] );
+ bool bRegister = bRegisterAll || CheckExtensionInRegistry( g_Extensions[nIndex] );
if ( bRegister )
registerForExtension( handle, nIndex, true );
++nIndex;
diff --git a/setup_native/source/win32/customactions/regactivex/regactivex.cxx b/setup_native/source/win32/customactions/regactivex/regactivex.cxx
index f7234a4725c8..2815d1d85f03 100644
--- a/setup_native/source/win32/customactions/regactivex/regactivex.cxx
+++ b/setup_native/source/win32/customactions/regactivex/regactivex.cxx
@@ -37,7 +37,7 @@
typedef int ( __stdcall * DllNativeRegProc ) ( int, BOOL, BOOL, const wchar_t* );
typedef int ( __stdcall * DllNativeUnregProc ) ( int, BOOL, BOOL );
-static BOOL UnicodeEquals( wchar_t const * pStr1, wchar_t const * pStr2 )
+static bool UnicodeEquals( wchar_t const * pStr1, wchar_t const * pStr2 )
{
if ( pStr1 == nullptr && pStr2 == nullptr )
return TRUE;
@@ -54,7 +54,7 @@ static BOOL UnicodeEquals( wchar_t const * pStr1, wchar_t const * pStr2 )
}
-static void RegisterActiveXNative( const wchar_t* pActiveXPath, int nMode, BOOL InstallForAllUser, BOOL InstallFor64Bit )
+static void RegisterActiveXNative( const wchar_t* pActiveXPath, int nMode, bool InstallForAllUser, bool InstallFor64Bit )
{
HINSTANCE hModule = LoadLibraryExW( pActiveXPath, nullptr, LOAD_WITH_ALTERED_SEARCH_PATH );
if( hModule )
@@ -82,7 +82,7 @@ static void RegisterActiveXNative( const wchar_t* pActiveXPath, int nMode, BOOL
}
-static void UnregisterActiveXNative( const wchar_t* pActiveXPath, int nMode, BOOL InstallForAllUser, BOOL InstallFor64Bit )
+static void UnregisterActiveXNative( const wchar_t* pActiveXPath, int nMode, bool InstallForAllUser, bool InstallFor64Bit )
{
HINSTANCE hModule = LoadLibraryExW( pActiveXPath, nullptr, LOAD_WITH_ALTERED_SEARCH_PATH );
if( hModule )
@@ -96,7 +96,7 @@ static void UnregisterActiveXNative( const wchar_t* pActiveXPath, int nMode, BOO
}
-static BOOL GetMsiPropW( MSIHANDLE hMSI, const wchar_t* pPropName, wchar_t** ppValue )
+static bool GetMsiPropW( MSIHANDLE hMSI, const wchar_t* pPropName, wchar_t** ppValue )
{
DWORD sz = 0;
if ( MsiGetPropertyW( hMSI, pPropName, const_cast<wchar_t *>(L""), &sz ) == ERROR_MORE_DATA )
@@ -116,7 +116,7 @@ static BOOL GetMsiPropW( MSIHANDLE hMSI, const wchar_t* pPropName, wchar_t** ppV
}
-static BOOL GetActiveXControlPath( MSIHANDLE hMSI, wchar_t** ppActiveXPath )
+static bool GetActiveXControlPath( MSIHANDLE hMSI, wchar_t** ppActiveXPath )
{
wchar_t* pProgPath = nullptr;
if ( GetMsiPropW( hMSI, L"INSTALLLOCATION", &pProgPath ) && pProgPath )
@@ -136,7 +136,7 @@ static BOOL GetActiveXControlPath( MSIHANDLE hMSI, wchar_t** ppActiveXPath )
}
-static BOOL GetDelta( MSIHANDLE hMSI, int& nOldInstallMode, int& nInstallMode, int& nDeinstallMode )
+static bool GetDelta( MSIHANDLE hMSI, int& nOldInstallMode, int& nInstallMode, int& nDeinstallMode )
{
// for now the chart is always installed
nOldInstallMode = CHART_COMPONENT;
@@ -235,9 +235,9 @@ static BOOL GetDelta( MSIHANDLE hMSI, int& nOldInstallMode, int& nInstallMode, i
}
-static BOOL MakeInstallForAllUsers( MSIHANDLE hMSI )
+static bool MakeInstallForAllUsers( MSIHANDLE hMSI )
{
- BOOL bResult = FALSE;
+ bool bResult = FALSE;
wchar_t* pVal = nullptr;
if ( GetMsiPropW( hMSI, L"ALLUSERS", &pVal ) && pVal )
{
@@ -249,9 +249,9 @@ static BOOL MakeInstallForAllUsers( MSIHANDLE hMSI )
}
-static BOOL MakeInstallFor64Bit( MSIHANDLE hMSI )
+static bool MakeInstallFor64Bit( MSIHANDLE hMSI )
{
- BOOL bResult = FALSE;
+ bool bResult = FALSE;
wchar_t* pVal = nullptr;
if ( GetMsiPropW( hMSI, L"VersionNT64", &pVal ) && pVal )
{
@@ -272,8 +272,8 @@ extern "C" __declspec(dllexport) UINT __stdcall InstallActiveXControl( MSIHANDLE
int nOldInstallMode = 0;
int nInstallMode = 0;
int nDeinstallMode = 0;
- BOOL bInstallForAllUser = MakeInstallForAllUsers( hMSI );
- BOOL bInstallFor64Bit = MakeInstallFor64Bit( hMSI );
+ bool bInstallForAllUser = MakeInstallForAllUsers( hMSI );
+ bool bInstallFor64Bit = MakeInstallFor64Bit( hMSI );
wchar_t* pActiveXPath = nullptr;
if ( GetActiveXControlPath( hMSI, &pActiveXPath ) && pActiveXPath
@@ -319,8 +319,8 @@ extern "C" __declspec(dllexport) UINT __stdcall DeinstallActiveXControl( MSIHAND
wchar_t* pActiveXPath = nullptr;
if ( current_state == INSTALLSTATE_LOCAL && GetActiveXControlPath( hMSI, &pActiveXPath ) && pActiveXPath )
{
- BOOL bInstallForAllUser = MakeInstallForAllUsers( hMSI );
- BOOL bInstallFor64Bit = MakeInstallFor64Bit( hMSI );
+ bool bInstallForAllUser = MakeInstallForAllUsers( hMSI );
+ bool bInstallFor64Bit = MakeInstallFor64Bit( hMSI );
{
UnregisterActiveXNative( pActiveXPath,
diff --git a/setup_native/source/win32/customactions/sellang/sellang.cxx b/setup_native/source/win32/customactions/sellang/sellang.cxx
index e82560f4239a..2610da36003e 100644
--- a/setup_native/source/win32/customactions/sellang/sellang.cxx
+++ b/setup_native/source/win32/customactions/sellang/sellang.cxx
@@ -38,7 +38,7 @@
#include <spellchecker_selection.hxx>
-static BOOL GetMsiPropA( MSIHANDLE hMSI, const char* pPropName, char** ppValue )
+static bool GetMsiPropA( MSIHANDLE hMSI, const char* pPropName, char** ppValue )
{
DWORD sz = 0;
if ( MsiGetPropertyA( hMSI, pPropName, const_cast<char *>(""), &sz ) == ERROR_MORE_DATA ) {
@@ -183,7 +183,7 @@ enum_ui_lang_proc (LPTSTR language, LONG_PTR /* unused_lParam */)
return TRUE;
}
-static BOOL
+static bool
present_in_ui_langs(const char *lang)
{
for (int i = 0; i < num_ui_langs; i++)
diff --git a/setup_native/source/win32/customactions/shellextensions/vistaspecial.cxx b/setup_native/source/win32/customactions/shellextensions/vistaspecial.cxx
index ee4f7dc0df87..e61f4a43f38e 100644
--- a/setup_native/source/win32/customactions/shellextensions/vistaspecial.cxx
+++ b/setup_native/source/win32/customactions/shellextensions/vistaspecial.cxx
@@ -24,7 +24,7 @@
#include <systools/win32/uwinapi.h>
#include "../tools/seterror.hxx"
-static BOOL RemoveCompleteDirectoryW(const std::wstring& rPath)
+static bool RemoveCompleteDirectoryW(const std::wstring& rPath)
{
bool bDirectoryRemoved = true;
diff --git a/setup_native/source/win32/customactions/tools/checkversion.cxx b/setup_native/source/win32/customactions/tools/checkversion.cxx
index daf20963673b..c5355008d13d 100644
--- a/setup_native/source/win32/customactions/tools/checkversion.cxx
+++ b/setup_native/source/win32/customactions/tools/checkversion.cxx
@@ -30,7 +30,7 @@
#include "seterror.hxx"
-static BOOL GetMsiPropW( MSIHANDLE hMSI, const wchar_t* pPropName, wchar_t** ppValue )
+static bool GetMsiPropW( MSIHANDLE hMSI, const wchar_t* pPropName, wchar_t** ppValue )
{
DWORD sz = 0;
if ( MsiGetPropertyW( hMSI, pPropName, const_cast<wchar_t *>(L""), &sz ) == ERROR_MORE_DATA )