From 9f90050aa17a76adef94b4ba2568db2da1bd1b9b Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Tue, 26 Nov 2019 14:37:20 +0100 Subject: loplugin:consttobool (clang-cl) Change-Id: I81fea38cd737a8be74e6ece333ca37cc434a1c33 Reviewed-on: https://gerrit.libreoffice.org/83765 Tested-by: Jenkins Reviewed-by: Stephan Bergmann --- canvas/source/directx/dx_9rm.cxx | 2 +- desktop/win32/source/loader.cxx | 6 +-- dtrans/source/win32/clipb/MtaOleClipb.cxx | 4 +- dtrans/source/win32/dtobj/DTransHelper.hxx | 8 +-- embedserv/source/embed/tracker.cxx | 6 +-- embedserv/source/inprocserv/dllentry.cxx | 4 +- extensions/source/activex/SOActiveX.cxx | 14 ++--- sal/osl/w32/file_dirvol.cxx | 22 ++++---- sal/osl/w32/procimpl.cxx | 4 +- sal/osl/w32/security.cxx | 10 ++-- .../win32/customactions/regactivex/regactivex.cxx | 20 ++++---- .../source/win32/customactions/sellang/sellang.cxx | 8 +-- .../win32/customactions/tools/checkversion.cxx | 4 +- sfx2/source/appl/shutdowniconw32.cxx | 6 +-- .../source/win32/shlxthandler/ooofilt/ooofilt.cxx | 20 ++++---- .../win32/shlxthandler/propsheets/propsheets.cxx | 4 +- vcl/inc/win/salframe.h | 2 +- vcl/win/gdi/gdiimpl.cxx | 16 +++--- vcl/win/gdi/salbmp.cxx | 26 +++++----- vcl/win/gdi/salfont.cxx | 8 +-- vcl/win/gdi/salgdi.cxx | 22 ++++---- vcl/win/gdi/salnativewidgets-luna.cxx | 32 ++++++------ vcl/win/gdi/salprn.cxx | 60 +++++++++++----------- vcl/win/window/salframe.cxx | 4 +- vcl/win/window/salmenu.cxx | 8 +-- vcl/win/window/salobj.cxx | 26 +++++----- winaccessibility/source/UAccCOM/MAccessible.cxx | 18 +++---- winaccessibility/source/UAccCOM/acccommon.h | 18 +++---- .../mscrypt/securityenvironment_mscryptimpl.cxx | 4 +- 29 files changed, 193 insertions(+), 193 deletions(-) diff --git a/canvas/source/directx/dx_9rm.cxx b/canvas/source/directx/dx_9rm.cxx index 872b537aa769..e09185130b8d 100644 --- a/canvas/source/directx/dx_9rm.cxx +++ b/canvas/source/directx/dx_9rm.cxx @@ -554,7 +554,7 @@ namespace dxcanvas const_cast(&rWindow), 0) ); // system child window must not receive mouse events - mpWindow->SetMouseTransparent( TRUE ); + mpWindow->SetMouseTransparent( true ); // parent should receive paint messages as well mpWindow->SetParentClipMode(ParentClipMode::NoClip); diff --git a/desktop/win32/source/loader.cxx b/desktop/win32/source/loader.cxx index a64af994e268..23706de032c9 100644 --- a/desktop/win32/source/loader.cxx +++ b/desktop/win32/source/loader.cxx @@ -153,7 +153,7 @@ int officeloader_impl(bool bAllowConsole) DWORD dwExitCode = DWORD(-1); - bool fSuccess = FALSE; + bool fSuccess = false; LPWSTR lpCommandLine = nullptr; bool bFirst = true; WCHAR cwd[MAX_PATH]; @@ -251,7 +251,7 @@ int officeloader_impl(bool bAllowConsole) bFirst = false; WCHAR szParentProcessId[64]; // This is more than large enough for a 128 bit decimal value - bool bHeadlessMode(FALSE); + bool bHeadlessMode(false); { // Check command line arguments for "--headless" parameter. We only @@ -271,7 +271,7 @@ int officeloader_impl(bool bAllowConsole) if (0 == wcsnicmp(argv2[n], L"-headless", 9) || 0 == wcsnicmp(argv2[n], L"--headless", 10)) { - bHeadlessMode = TRUE; + bHeadlessMode = true; } } } diff --git a/dtrans/source/win32/clipb/MtaOleClipb.cxx b/dtrans/source/win32/clipb/MtaOleClipb.cxx index 5ab8e1adb9a9..fc8a16d86d0c 100644 --- a/dtrans/source/win32/clipb/MtaOleClipb.cxx +++ b/dtrans/source/win32/clipb/MtaOleClipb.cxx @@ -62,8 +62,8 @@ namespace /* private */ const sal_uInt32 MAX_WAITTIME = 10000; // msec const sal_uInt32 MAX_WAIT_SHUTDOWN = 10000; // msec - const bool MANUAL_RESET = TRUE; - const bool INIT_NONSIGNALED = FALSE; + const bool MANUAL_RESET = true; + const bool INIT_NONSIGNALED = false; /* Cannot use osl conditions because they are blocking without waking up on messages sent by another thread diff --git a/dtrans/source/win32/dtobj/DTransHelper.hxx b/dtrans/source/win32/dtobj/DTransHelper.hxx index 89f8e483d1b7..d677184fb0ee 100644 --- a/dtrans/source/win32/dtobj/DTransHelper.hxx +++ b/dtrans/source/win32/dtobj/DTransHelper.hxx @@ -27,7 +27,7 @@ #include #include -#define AUTO_INIT TRUE +#define AUTO_INIT true // a helper class to manage a global memory area, the clients can write // into the global memory area and extract the handle to the global mem @@ -95,7 +95,7 @@ public: explicit CRawHGlobalPtr( HGLOBAL hGlob ) : m_hGlob( hGlob ), - m_bIsLocked( FALSE ), + m_bIsLocked( false ), m_pGlobMem( nullptr ) { } @@ -104,7 +104,7 @@ public: explicit CRawHGlobalPtr( const CStgTransferHelper& theHGlobalHelper ) : m_hGlob( theHGlobalHelper.getHGlobal( ) ), - m_bIsLocked( FALSE ), + m_bIsLocked( false ), m_pGlobMem( nullptr ) { } @@ -137,7 +137,7 @@ public: BOOL Unlock( ) { GlobalUnlock( m_hGlob ); - m_bIsLocked = FALSE; + m_bIsLocked = false; m_pGlobMem = nullptr; return ( NO_ERROR == GetLastError( ) ); diff --git a/embedserv/source/embed/tracker.cxx b/embedserv/source/embed/tracker.cxx index c17655e45866..a4cd899b6de1 100644 --- a/embedserv/source/embed/tracker.cxx +++ b/embedserv/source/embed/tracker.cxx @@ -254,7 +254,7 @@ void Tracker::Construct() static const WCHAR szWindows[] = L"windows"; static const WCHAR szInplaceBorderWidth[] = L"oleinplaceborderwidth"; afxHandleSize = GetProfileIntW(szWindows, szInplaceBorderWidth, 4); - bInitialized = TRUE; + bInitialized = true; afxCursors[0] = afxCursors[2] = LoadCursor(nullptr,IDC_SIZENWSE); afxCursors[4] = afxCursors[6] = LoadCursor(nullptr,IDC_SIZENS); @@ -385,7 +385,7 @@ BOOL Tracker::TrackHandle(int nHandle,HWND hWnd,POINT point,HWND hWndClipTo) } RECT rectOld; - bool bMoved = FALSE; + bool bMoved = false; // get messages until capture lost or cancelled/accepted for (;;) @@ -428,7 +428,7 @@ BOOL Tracker::TrackHandle(int nHandle,HWND hWnd,POINT point,HWND hWndClipTo) } OnChangedRect(rectOld); if (msg.message != WM_LBUTTONUP) - bMoved = TRUE; + bMoved = true; } if (m_bFinalErase) goto ExitLoop; diff --git a/embedserv/source/inprocserv/dllentry.cxx b/embedserv/source/inprocserv/dllentry.cxx index 9e0c40601226..f5e46e12fbe2 100644 --- a/embedserv/source/inprocserv/dllentry.cxx +++ b/embedserv/source/inprocserv/dllentry.cxx @@ -100,13 +100,13 @@ namespace { int nGuidLen = GetStringFromClassID( *guidList[nInd], &pSubKey[23], 38 ); - bool bLocalSuccess = FALSE; + bool bLocalSuccess = false; if ( nGuidLen == 38 ) { if ( ERROR_SUCCESS == RegOpenKeyW( HKEY_LOCAL_MACHINE, pSubKey, &hKey ) ) { if ( ERROR_SUCCESS == RegSetValueExW( hKey, L"", 0, REG_SZ, reinterpret_cast(pLibrary), nLen*sizeof(wchar_t) ) ) - bLocalSuccess = TRUE; + bLocalSuccess = true; } if ( hKey ) diff --git a/extensions/source/activex/SOActiveX.cxx b/extensions/source/activex/SOActiveX.cxx index ebecf0968e85..2c6c4365a339 100644 --- a/extensions/source/activex/SOActiveX.cxx +++ b/extensions/source/activex/SOActiveX.cxx @@ -212,7 +212,7 @@ HRESULT CSOActiveX::Cleanup() if( mpDispFrame ) { - bool bCloserActivated = FALSE; + bool bCloserActivated = false; CComPtr pDispDocumentCloser; CComVariant aDocCloser( L"com.sun.star.embed.DocumentCloser" ); @@ -715,14 +715,14 @@ void CSOActiveX::CallbackCreateXInputStream( CBindStatusCallback* /* if ( mbReadyForActivation ) return; - bool bSuccess = FALSE; - bool bFinishDownload = FALSE; + bool bSuccess = false; + bool bFinishDownload = false; if ( !pBytes ) { // means the download is finished, dwSize contains hresult - bFinishDownload = TRUE; + bFinishDownload = true; if ( SUCCEEDED( dwSize ) ) - bSuccess = TRUE; + bSuccess = true; } else { @@ -757,7 +757,7 @@ void CSOActiveX::CallbackCreateXInputStream( CBindStatusCallback* /* CComVariant dummyResult; hr = ExecuteFunc( mpDispTempFile, L"writeBytes", aArgs, 1, &dummyResult ); if( SUCCEEDED( hr ) ) - bSuccess = TRUE; + bSuccess = true; } } } @@ -767,7 +767,7 @@ void CSOActiveX::CallbackCreateXInputStream( CBindStatusCallback* /* if ( !bSuccess ) { // the download failed, let StarOffice download - bFinishDownload = TRUE; + bFinishDownload = true; mpDispTempFile = CComPtr< IDispatch >(); } diff --git a/sal/osl/w32/file_dirvol.cxx b/sal/osl/w32/file_dirvol.cxx index 70e9b9ccc444..2c6ecbd34a28 100644 --- a/sal/osl/w32/file_dirvol.cxx +++ b/sal/osl/w32/file_dirvol.cxx @@ -40,7 +40,7 @@ BOOL TimeValueToFileTime(const TimeValue *cpTimeVal, FILETIME *pFTime) SYSTEMTIME BaseSysTime; FILETIME BaseFileTime; FILETIME FTime; - bool fSuccess = FALSE; + bool fSuccess = false; BaseSysTime.wYear = 1970; BaseSysTime.wMonth = 1; @@ -71,7 +71,7 @@ BOOL FileTimeToTimeValue(const FILETIME *cpFTime, TimeValue *pTimeVal) { SYSTEMTIME BaseSysTime; FILETIME BaseFileTime; - bool fSuccess = FALSE; /* Assume failure */ + bool fSuccess = false; /* Assume failure */ BaseSysTime.wYear = 1970; BaseSysTime.wMonth = 1; @@ -277,7 +277,7 @@ static HANDLE WINAPI OpenLogicalDrivesEnum() static bool WINAPI EnumLogicalDrives(HANDLE hEnum, LPWSTR lpBuffer) { - bool fSuccess = FALSE; + bool fSuccess = false; LPDRIVEENUM pEnum = static_cast(hEnum); if ( pEnum ) @@ -288,7 +288,7 @@ static bool WINAPI EnumLogicalDrives(HANDLE hEnum, LPWSTR lpBuffer) { CopyMemory( lpBuffer, pEnum->lpCurrent, (nLen + 1) * sizeof(WCHAR) ); pEnum->lpCurrent += nLen + 1; - fSuccess = TRUE; + fSuccess = true; } else SetLastError( ERROR_NO_MORE_FILES ); @@ -301,13 +301,13 @@ static bool WINAPI EnumLogicalDrives(HANDLE hEnum, LPWSTR lpBuffer) static bool WINAPI CloseLogicalDrivesEnum(HANDLE hEnum) { - bool fSuccess = FALSE; + bool fSuccess = false; LPDRIVEENUM pEnum = static_cast(hEnum); if ( pEnum ) { HeapFree( GetProcessHeap(), 0, pEnum ); - fSuccess = TRUE; + fSuccess = true; } else SetLastError( ERROR_INVALID_HANDLE ); @@ -370,7 +370,7 @@ static HANDLE WINAPI OpenDirectory( rtl_uString* pPath) static bool WINAPI EnumDirectory(HANDLE hDirectory, LPWIN32_FIND_DATAW pFindData) { - bool fSuccess = FALSE; + bool fSuccess = false; LPDIRECTORY pDirectory = static_cast(hDirectory); if ( pDirectory ) @@ -382,14 +382,14 @@ static bool WINAPI EnumDirectory(HANDLE hDirectory, LPWIN32_FIND_DATAW pFindData if ( pDirectory->aFirstData.cFileName[0] ) { *pFindData = pDirectory->aFirstData; - fSuccess = TRUE; + fSuccess = true; pDirectory->aFirstData.cFileName[0] = 0; } else if ( IsValidHandle( pDirectory->hFind ) ) fSuccess = FindNextFileW( pDirectory->hFind, pFindData ); else { - fSuccess = FALSE; + fSuccess = false; SetLastError( ERROR_NO_MORE_FILES ); } @@ -405,7 +405,7 @@ static bool WINAPI EnumDirectory(HANDLE hDirectory, LPWIN32_FIND_DATAW pFindData static bool WINAPI CloseDirectory(HANDLE hDirectory) { - bool fSuccess = FALSE; + bool fSuccess = false; LPDIRECTORY pDirectory = static_cast(hDirectory); if (pDirectory) @@ -1717,7 +1717,7 @@ oslFileError SAL_CALL osl_setFileAttributes( } else { - fSuccess = FALSE; + fSuccess = false; } if ( !fSuccess ) diff --git a/sal/osl/w32/procimpl.cxx b/sal/osl/w32/procimpl.cxx index 814359647575..25b356a74d0b 100644 --- a/sal/osl/w32/procimpl.cxx +++ b/sal/osl/w32/procimpl.cxx @@ -198,7 +198,7 @@ namespace /* private */ sa.lpSecurityDescriptor = p_security_descriptor; sa.bInheritHandle = b_read_pipe_inheritable || b_write_pipe_inheritable; - bool bRet = FALSE; + bool bRet = false; HANDLE hTemp = nullptr; if (!b_read_pipe_inheritable && b_write_pipe_inheritable) @@ -520,7 +520,7 @@ oslProcessError SAL_CALL osl_executeProcess_WithRedirectedIO( OUString cmdline = command_line.makeStringAndClear(); PROCESS_INFORMATION process_info; - bool bRet = FALSE; + bool bRet = false; if ((Security != nullptr) && (static_cast(Security)->m_hToken != nullptr)) { diff --git a/sal/osl/w32/security.cxx b/sal/osl/w32/security.cxx index bd3cf3339dc7..75485820716f 100644 --- a/sal/osl/w32/security.cxx +++ b/sal/osl/w32/security.cxx @@ -536,11 +536,11 @@ static bool Privilege(LPCTSTR strPrivilege, bool bEnable) // obtain the processes token if (!OpenProcessToken(GetCurrentProcess(), TOKEN_ADJUST_PRIVILEGES | TOKEN_DUP_QUERY, &hToken)) - return FALSE; + return false; // get the luid if (!LookupPrivilegeValue(nullptr, strPrivilege, &tp.Privileges[0].Luid)) - return FALSE; + return false; tp.PrivilegeCount = 1; @@ -551,12 +551,12 @@ static bool Privilege(LPCTSTR strPrivilege, bool bEnable) // enable or disable the privilege if (!AdjustTokenPrivileges(hToken, FALSE, &tp, 0, nullptr, nullptr)) - return FALSE; + return false; if (!CloseHandle(hToken)) - return FALSE; + return false; - return TRUE; + return true; } static bool getUserNameImpl(oslSecurity Security, rtl_uString **strName, bool bIncludeDomain) diff --git a/setup_native/source/win32/customactions/regactivex/regactivex.cxx b/setup_native/source/win32/customactions/regactivex/regactivex.cxx index 2815d1d85f03..48b11bd4f452 100644 --- a/setup_native/source/win32/customactions/regactivex/regactivex.cxx +++ b/setup_native/source/win32/customactions/regactivex/regactivex.cxx @@ -40,9 +40,9 @@ typedef int ( __stdcall * DllNativeUnregProc ) ( int, BOOL, BOOL ); static bool UnicodeEquals( wchar_t const * pStr1, wchar_t const * pStr2 ) { if ( pStr1 == nullptr && pStr2 == nullptr ) - return TRUE; + return true; else if ( pStr1 == nullptr || pStr2 == nullptr ) - return FALSE; + return false; while( *pStr1 == *pStr2 && *pStr1 && *pStr2 ) { @@ -109,10 +109,10 @@ static bool GetMsiPropW( MSIHANDLE hMSI, const wchar_t* pPropName, wchar_t** ppV MsiGetPropertyW( hMSI, pPropName, buff, &sz ); *ppValue = buff; - return TRUE; + return true; } - return FALSE; + return false; } @@ -129,10 +129,10 @@ static bool GetActiveXControlPath( MSIHANDLE hMSI, wchar_t** ppActiveXPath ) free(pProgPath); - return TRUE; + return true; } - return FALSE; + return false; } @@ -231,13 +231,13 @@ static bool GetDelta( MSIHANDLE hMSI, int& nOldInstallMode, int& nInstallMode, i // assert( FALSE ); } - return TRUE; + return true; } static bool MakeInstallForAllUsers( MSIHANDLE hMSI ) { - bool bResult = FALSE; + bool bResult = false; wchar_t* pVal = nullptr; if ( GetMsiPropW( hMSI, L"ALLUSERS", &pVal ) && pVal ) { @@ -251,11 +251,11 @@ static bool MakeInstallForAllUsers( MSIHANDLE hMSI ) static bool MakeInstallFor64Bit( MSIHANDLE hMSI ) { - bool bResult = FALSE; + bool bResult = false; wchar_t* pVal = nullptr; if ( GetMsiPropW( hMSI, L"VersionNT64", &pVal ) && pVal ) { - bResult = TRUE; + bResult = true; free( pVal ); } diff --git a/setup_native/source/win32/customactions/sellang/sellang.cxx b/setup_native/source/win32/customactions/sellang/sellang.cxx index 2610da36003e..8740b86a4757 100644 --- a/setup_native/source/win32/customactions/sellang/sellang.cxx +++ b/setup_native/source/win32/customactions/sellang/sellang.cxx @@ -51,7 +51,7 @@ static bool GetMsiPropA( MSIHANDLE hMSI, const char* pPropName, char** ppValue ) *ppValue = buff; return ( strlen(buff) > 0 ); } - return FALSE; + return false; } static const char * @@ -190,11 +190,11 @@ present_in_ui_langs(const char *lang) { if (strchr (lang, '_') != nullptr) if (memcmp (ui_langs[i], lang, std::min(strlen(ui_langs[i]), strlen(lang))) == 0) - return TRUE; + return true; if (strcmp (ui_langs[i], lang) == 0) - return TRUE; + return true; } - return FALSE; + return false; } namespace { diff --git a/setup_native/source/win32/customactions/tools/checkversion.cxx b/setup_native/source/win32/customactions/tools/checkversion.cxx index c5355008d13d..3f0b30f3ce34 100644 --- a/setup_native/source/win32/customactions/tools/checkversion.cxx +++ b/setup_native/source/win32/customactions/tools/checkversion.cxx @@ -43,10 +43,10 @@ static bool GetMsiPropW( MSIHANDLE hMSI, const wchar_t* pPropName, wchar_t** ppV MsiGetPropertyW( hMSI, pPropName, buff, &sz ); *ppValue = buff; - return TRUE; + return true; } - return FALSE; + return false; } diff --git a/sfx2/source/appl/shutdowniconw32.cxx b/sfx2/source/appl/shutdowniconw32.cxx index a5c81d5e1b0f..c056db166f51 100644 --- a/sfx2/source/appl/shutdowniconw32.cxx +++ b/sfx2/source/appl/shutdowniconw32.cxx @@ -749,10 +749,10 @@ static bool CreateShortcut( const OUString& rAbsObject, const OUString& rAbsObje { hres = ppf->Save( o3tl::toW(rAbsShortcut.getStr()), TRUE ); ppf->Release(); - } else return FALSE; + } else return false; psl->Release(); - } else return FALSE; - return TRUE; + } else return false; + return true; } diff --git a/shell/source/win32/shlxthandler/ooofilt/ooofilt.cxx b/shell/source/win32/shlxthandler/ooofilt/ooofilt.cxx index 86558ee6e424..7088dfbc027b 100644 --- a/shell/source/win32/shlxthandler/ooofilt/ooofilt.cxx +++ b/shell/source/win32/shlxthandler/ooofilt/ooofilt.cxx @@ -84,8 +84,8 @@ COooFilter::COooFilter() : m_ulPropertyNum(0), m_ulCurrentPropertyNum(0), m_ulChunkID(1), - m_fContents(FALSE), - m_fEof(FALSE), + m_fContents(false), + m_fEof(false), m_ChunkPosition(0), m_cAttributes(0), m_pAttributes(nullptr), @@ -203,7 +203,7 @@ SCODE STDMETHODCALLTYPE COooFilter::Init( *pFlags = IFILTER_FLAGS_OLE_PROPERTIES; try { - m_fContents = FALSE; + m_fContents = false; m_ulPropertyNum = 0; m_ulCurrentPropertyNum = 0; if ( m_cAttributes > 0 ) @@ -228,7 +228,7 @@ SCODE STDMETHODCALLTYPE COooFilter::Init( pAttrib[ulNumAttr].GetPropertyPropid() == PID_STG_CONTENTS && pAttrib[ulNumAttr].GetPropSet() == guidStorage ) { - m_fContents = TRUE; + m_fContents = true; } // save the requested properties. m_pAttributes[ulNumAttr] = pAttrib[ulNumAttr]; @@ -237,7 +237,7 @@ SCODE STDMETHODCALLTYPE COooFilter::Init( else if ( grfFlags & IFILTER_INIT_APPLY_INDEX_ATTRIBUTES ) { // Filter contents and all pseudo-properties - m_fContents = TRUE; + m_fContents = true; m_pAttributes = new CFullPropSpec[COUNT_ATTRIBUTES]; m_cAttributes = COUNT_ATTRIBUTES; @@ -255,21 +255,21 @@ SCODE STDMETHODCALLTYPE COooFilter::Init( else if ( 0 == grfFlags ) { // Filter only contents - m_fContents = TRUE; + m_fContents = true; } else - m_fContents = FALSE; + m_fContents = false; // Re-initialize if ( m_fContents ) { - m_fEof = FALSE; + m_fEof = false; m_eState = FilterState::FilteringContent; m_ulUnicodeCharsRead = 0; m_ChunkPosition = 0; } else { - m_fEof = TRUE; + m_fEof = true; m_eState = FilterState::FilteringProperty; } m_ulChunkID = 1; @@ -312,7 +312,7 @@ SCODE STDMETHODCALLTYPE COooFilter::GetChunk(STAT_CHUNK * pStat) if( m_ChunkPosition == m_pContentReader ->getChunkBuffer().size() ) { m_ulUnicodeBufferLen=0; - m_fEof = TRUE; + m_fEof = true; } if ( !m_fContents || m_fEof ) diff --git a/shell/source/win32/shlxthandler/propsheets/propsheets.cxx b/shell/source/win32/shlxthandler/propsheets/propsheets.cxx index 196d9ed49ba2..12985d71f4b6 100644 --- a/shell/source/win32/shlxthandler/propsheets/propsheets.cxx +++ b/shell/source/win32/shlxthandler/propsheets/propsheets.cxx @@ -229,11 +229,11 @@ bool CALLBACK CPropertySheet::PropPageSummaryProc(HWND hwnd, UINT uiMsg, WPARAM LPPROPSHEETPAGE psp = reinterpret_cast(lParam); CPropertySheet* pImpl = reinterpret_cast(psp->lParam); pImpl->InitPropPageSummary(hwnd, psp); - return TRUE; + return true; } } - return FALSE; + return false; } diff --git a/vcl/inc/win/salframe.h b/vcl/inc/win/salframe.h index 25c6819bb7e2..f0c758806f71 100644 --- a/vcl/inc/win/salframe.h +++ b/vcl/inc/win/salframe.h @@ -101,7 +101,7 @@ public: virtual void SetMenu( SalMenu* pSalMenu ) override; virtual void DrawMenuBar() override; virtual void SetExtendedFrameStyle( SalExtStyle nExtStyle ) override; - virtual void Show( bool bVisible, bool bNoActivate = FALSE ) override; + virtual void Show( bool bVisible, bool bNoActivate = false ) override; virtual void SetMinClientSize( long nWidth, long nHeight ) override; virtual void SetMaxClientSize( long nWidth, long nHeight ) override; virtual void SetPosSize( long nX, long nY, long nWidth, long nHeight, sal_uInt16 nFlags ) override; diff --git a/vcl/win/gdi/gdiimpl.cxx b/vcl/win/gdi/gdiimpl.cxx index 95fd346af1a5..79621f53bf60 100644 --- a/vcl/win/gdi/gdiimpl.cxx +++ b/vcl/win/gdi/gdiimpl.cxx @@ -470,7 +470,7 @@ void WinSalGraphicsImpl::copyArea( long nDestX, long nDestY, hOldClipRgn = CreateRectRgn( 0, 0, 0, 0 ); nOldClipRgnType = GetClipRgn( mrParent.getHDC(), hOldClipRgn ); - bRestoreClipRgn = TRUE; // indicate changed clipregion and force invalidate + bRestoreClipRgn = true; // indicate changed clipregion and force invalidate ExtSelectClipRgn( mrParent.getHDC(), hInvalidateRgn, RGN_DIFF ); } } @@ -810,7 +810,7 @@ std::shared_ptr WinSalGraphicsImpl::getBitmap( long nX, long nY, long { pSalBitmap = std::make_shared(); - if( !pSalBitmap->Create( hBmpBitmap, FALSE, FALSE ) ) + if( !pSalBitmap->Create( hBmpBitmap, false, false ) ) { pSalBitmap.reset(); } @@ -1285,8 +1285,8 @@ void WinSalGraphicsImpl::SetLineColor() ResetPen(GetStockPen(NULL_PEN)); // set new data - mbPen = FALSE; - mbStockPen = TRUE; + mbPen = false; + mbStockPen = true; } void WinSalGraphicsImpl::SetLineColor(Color nColor) @@ -1307,7 +1307,7 @@ void WinSalGraphicsImpl::SetLineColor(Color nColor) // set new data mnPenColor = nPenColor; maLineColor = nColor; - mbPen = TRUE; + mbPen = true; mbStockPen = bStockPen; } @@ -1369,8 +1369,8 @@ void WinSalGraphicsImpl::SetFillColor() ResetBrush(GetStockBrush(NULL_BRUSH)); // set new data - mbBrush = FALSE; - mbStockBrush = TRUE; + mbBrush = false; + mbStockBrush = true; } void WinSalGraphicsImpl::SetFillColor(Color nColor) @@ -1391,7 +1391,7 @@ void WinSalGraphicsImpl::SetFillColor(Color nColor) // set new data mnBrushColor = nBrushColor; maFillColor = nColor; - mbBrush = TRUE; + mbBrush = true; mbStockBrush = bStockBrush; } diff --git a/vcl/win/gdi/salbmp.cxx b/vcl/win/gdi/salbmp.cxx index 173ea361bbe8..128f786381e0 100644 --- a/vcl/win/gdi/salbmp.cxx +++ b/vcl/win/gdi/salbmp.cxx @@ -470,7 +470,7 @@ Gdiplus::Bitmap* WinSalBitmap::ImplCreateGdiPlusBitmap(const WinSalBitmap& rAlph bool WinSalBitmap::Create( HANDLE hBitmap, bool bDIB, bool bCopyHandle ) { - bool bRet = TRUE; + bool bRet = true; if( bDIB ) mhDIB = static_cast( bCopyHandle ? ImplCopyDIBOrDDB( hBitmap, true ) : hBitmap ); @@ -508,18 +508,18 @@ bool WinSalBitmap::Create( HANDLE hBitmap, bool bDIB, bool bCopyHandle ) else { mhDDB = nullptr; - bRet = FALSE; + bRet = false; } } else - bRet = FALSE; + bRet = false; return bRet; } bool WinSalBitmap::Create( const Size& rSize, sal_uInt16 nBitCount, const BitmapPalette& rPal ) { - bool bRet = FALSE; + bool bRet = false; mhDIB = ImplCreateDIB( rSize, nBitCount, rPal ); @@ -527,7 +527,7 @@ bool WinSalBitmap::Create( const Size& rSize, sal_uInt16 nBitCount, const Bitmap { maSize = rSize; mnBitCount = nBitCount; - bRet = TRUE; + bRet = true; } return bRet; @@ -535,7 +535,7 @@ bool WinSalBitmap::Create( const Size& rSize, sal_uInt16 nBitCount, const Bitmap bool WinSalBitmap::Create( const SalBitmap& rSSalBitmap ) { - bool bRet = FALSE; + bool bRet = false; const WinSalBitmap& rSalBitmap = static_cast(rSSalBitmap); if ( rSalBitmap.mhDIB || rSalBitmap.mhDDB ) @@ -553,7 +553,7 @@ bool WinSalBitmap::Create( const SalBitmap& rSSalBitmap ) maSize = rSalBitmap.maSize; mnBitCount = rSalBitmap.mnBitCount; - bRet = TRUE; + bRet = true; } } @@ -562,7 +562,7 @@ bool WinSalBitmap::Create( const SalBitmap& rSSalBitmap ) bool WinSalBitmap::Create( const SalBitmap& rSSalBmp, SalGraphics* pSGraphics ) { - bool bRet = FALSE; + bool bRet = false; const WinSalBitmap& rSalBmp = static_cast(rSSalBmp); WinSalGraphics* pGraphics = static_cast(pSGraphics); @@ -594,7 +594,7 @@ bool WinSalBitmap::Create( const SalBitmap& rSSalBmp, SalGraphics* pSGraphics ) maSize = Size( aDDBInfo.bmWidth, aDDBInfo.bmHeight ); mnBitCount = aDDBInfo.bmPlanes * aDDBInfo.bmBitsPixel; - bRet = TRUE; + bRet = true; } else if( hNewDDB ) DeleteObject( hNewDDB ); @@ -605,7 +605,7 @@ bool WinSalBitmap::Create( const SalBitmap& rSSalBmp, SalGraphics* pSGraphics ) bool WinSalBitmap::Create( const SalBitmap& rSSalBmp, sal_uInt16 nNewBitCount ) { - bool bRet = FALSE; + bool bRet = false; const WinSalBitmap& rSalBmp = static_cast(rSSalBmp); @@ -634,7 +634,7 @@ bool WinSalBitmap::Create( const SalBitmap& rSSalBmp, sal_uInt16 nNewBitCount ) GlobalUnlock( mhDIB ); maSize = rSalBmp.maSize; mnBitCount = nNewBitCount; - bRet = TRUE; + bRet = true; } else { @@ -950,7 +950,7 @@ void WinSalBitmap::ImplDecodeRLEBuffer( const BYTE* pSrcBuf, BYTE* pDstBuf, sal_uLong nRunByte; sal_uLong i; BYTE cTmp; - bool bEndDecoding = FALSE; + bool bEndDecoding = false; if( pRLE && pDIB ) { @@ -996,7 +996,7 @@ void WinSalBitmap::ImplDecodeRLEBuffer( const BYTE* pSrcBuf, BYTE* pDstBuf, nX = 0; } else if( nRunByte == 1 ) - bEndDecoding = TRUE; + bEndDecoding = true; else { nX += *pRLE++; diff --git a/vcl/win/gdi/salfont.cxx b/vcl/win/gdi/salfont.cxx index 9d8439c7387c..0a962c49f8db 100644 --- a/vcl/win/gdi/salfont.cxx +++ b/vcl/win/gdi/salfont.cxx @@ -1568,7 +1568,7 @@ bool WinSalGraphics::CreateFontSubset( const OUString& rToFile, OUString aSysPath; if( osl_File_E_None != osl_getSystemPathFromFileURL( rToFile.pData, &aSysPath.pData ) ) - return FALSE; + return false; const rtl_TextEncoding aThreadEncoding = osl_getThreadTextEncoding(); const OString aToFile(OUStringToOString(aSysPath, aThreadEncoding)); @@ -1591,7 +1591,7 @@ bool WinSalGraphics::CreateFontSubset( const OUString& rToFile, // get raw font file data const RawFontData xRawFontData( getHDC(), 0 ); if( !xRawFontData.get() ) - return FALSE; + return false; // open font file sal_uInt32 nFaceNum = 0; @@ -1601,7 +1601,7 @@ bool WinSalGraphics::CreateFontSubset( const OUString& rToFile, ScopedTrueTypeFont aSftTTF; SFErrCodes nRC = aSftTTF.open( xRawFontData.get(), xRawFontData.size(), nFaceNum ); if( nRC != SFErrCodes::Ok ) - return FALSE; + return false; TTGlobalFontInfo aTTInfo; ::GetTTGlobalFontInfo( aSftTTF.get(), &aTTInfo ); @@ -1647,7 +1647,7 @@ bool WinSalGraphics::CreateFontSubset( const OUString& rToFile, std::unique_ptr pMetrics = ::GetTTSimpleGlyphMetrics( aSftTTF.get(), aShortIDs, nGlyphCount, aIFSD.mbVertical ); if( !pMetrics ) - return FALSE; + return false; sal_uInt16 nNotDefAdv = pMetrics[0]; pMetrics[0] = pMetrics[nNotDef]; pMetrics[nNotDef] = nNotDefAdv; diff --git a/vcl/win/gdi/salgdi.cxx b/vcl/win/gdi/salgdi.cxx index 2d4a283bb818..c8b1aa4471e7 100644 --- a/vcl/win/gdi/salgdi.cxx +++ b/vcl/win/gdi/salgdi.cxx @@ -153,7 +153,7 @@ void ImplInitSalGDI() HBITMAP hBmpOld = static_cast(::SelectObject( hMemDC, hMemBmp )); HBRUSH hMemBrush = ::CreateSolidBrush( PALETTERGB( 175, 171, 169 ) ); HBRUSH hBrushOld = static_cast(::SelectObject( hMemDC, hMemBrush )); - bool bDither16 = TRUE; + bool bDither16 = true; ::PatBlt( hMemDC, 0, 0, 8, 8, PATCOPY ); const COLORREF aCol( ::GetPixel( hMemDC, 0, 0 ) ); @@ -161,7 +161,7 @@ void ImplInitSalGDI() for( int nY = 0; ( nY < 8 ) && bDither16; nY++ ) for( int nX = 0; ( nX < 8 ) && bDither16; nX++ ) if( ::GetPixel( hMemDC, nX, nY ) != aCol ) - bDither16 = FALSE; + bDither16 = false; ::SelectObject( hMemDC, hBrushOld ); ::DeleteObject( hMemBrush ); @@ -828,7 +828,7 @@ static BYTE* ImplSearchEntry( BYTE* pSource, BYTE const * pDest, sal_uLong nComp static bool ImplGetBoundingBox( double* nNumb, BYTE* pSource, sal_uLong nSize ) { - bool bRetValue = FALSE; + bool bRetValue = false; BYTE* pDest = ImplSearchEntry( pSource, reinterpret_cast("%%BoundingBox:"), nSize, 14 ); if ( pDest ) { @@ -843,9 +843,9 @@ static bool ImplGetBoundingBox( double* nNumb, BYTE* pSource, sal_uLong nSize ) for ( i = 0; ( i < 4 ) && nSizeLeft; i++ ) { int nDivision = 1; - bool bDivision = FALSE; - bool bNegative = FALSE; - bool bValid = TRUE; + bool bDivision = false; + bool bNegative = false; + bool bValid = true; while ( ( --nSizeLeft ) && ( ( *pDest == ' ' ) || ( *pDest == 0x9 ) ) ) pDest++; BYTE nByte = *pDest; @@ -855,12 +855,12 @@ static bool ImplGetBoundingBox( double* nNumb, BYTE* pSource, sal_uLong nSize ) { case '.' : if ( bDivision ) - bValid = FALSE; + bValid = false; else - bDivision = TRUE; + bDivision = true; break; case '-' : - bNegative = TRUE; + bNegative = true; break; default : if ( ( nByte < '0' ) || ( nByte > '9' ) ) @@ -883,7 +883,7 @@ static bool ImplGetBoundingBox( double* nNumb, BYTE* pSource, sal_uLong nSize ) nNumb[i] /= nDivision; } if ( i == 4 ) - bRetValue = TRUE; + bRetValue = true; } return bRetValue; } @@ -1032,7 +1032,7 @@ bool WinSalGraphics::drawEPS( long nX, long nY, long nWidth, long nHeight, void* "b4_Inc_state_salWin restore\n\n" ); *reinterpret_cast(const_cast(aBuf.getStr())) = static_cast( aBuf.getLength() - 2 ); Escape ( getHDC(), nEscape, aBuf.getLength(), aBuf.getStr(), nullptr ); - bRetValue = TRUE; + bRetValue = true; } } } diff --git a/vcl/win/gdi/salnativewidgets-luna.cxx b/vcl/win/gdi/salnativewidgets-luna.cxx index 84a9bda35ec3..2eb7161974f8 100644 --- a/vcl/win/gdi/salnativewidgets-luna.cxx +++ b/vcl/win/gdi/salnativewidgets-luna.cxx @@ -240,13 +240,13 @@ bool WinSalGraphics::isNativeControlSupported( ControlType nType, ControlPart nP break; case ControlType::Scrollbar: if( nPart == ControlPart::DrawBackgroundHorz || nPart == ControlPart::DrawBackgroundVert ) - return FALSE; // no background painting needed + return false; // no background painting needed if( nPart == ControlPart::Entire ) hTheme = getThemeHandle( mhWnd, L"Scrollbar"); break; case ControlType::Combobox: if( nPart == ControlPart::HasBackgroundTexture ) - return FALSE; // we do not paint the inner part (ie the selection background/focus indication) + return false; // we do not paint the inner part (ie the selection background/focus indication) if( nPart == ControlPart::Entire ) hTheme = getThemeHandle( mhWnd, L"Edit"); else if( nPart == ControlPart::ButtonDown ) @@ -267,14 +267,14 @@ bool WinSalGraphics::isNativeControlSupported( ControlType nType, ControlPart nP case ControlType::Editbox: case ControlType::MultilineEditbox: if( nPart == ControlPart::HasBackgroundTexture ) - return FALSE; // we do not paint the inner part (ie the selection background/focus indication) + return false; // we do not paint the inner part (ie the selection background/focus indication) //return TRUE; if( nPart == ControlPart::Entire ) hTheme = getThemeHandle( mhWnd, L"Edit"); break; case ControlType::Listbox: if( nPart == ControlPart::HasBackgroundTexture ) - return FALSE; // we do not paint the inner part (ie the selection background/focus indication) + return false; // we do not paint the inner part (ie the selection background/focus indication) if( nPart == ControlPart::Entire || nPart == ControlPart::ListboxWindow ) hTheme = getThemeHandle( mhWnd, L"Listview"); else if( nPart == ControlPart::ButtonDown ) @@ -339,7 +339,7 @@ bool WinSalGraphics::hitTestNativeControl( ControlType, const Point&, bool& ) { - return FALSE; + return false; } static bool ImplDrawTheme( HTHEME hTheme, HDC hDC, int iPart, int iState, RECT rc, const OUString& aStr) @@ -996,7 +996,7 @@ static bool ImplDrawNativeControl( HDC hDC, HTHEME hTheme, RECT rc, if( nType == ControlType::Progress ) { if( nPart != ControlPart::Entire ) - return FALSE; + return false; if( ! ImplDrawTheme( hTheme, hDC, PP_BAR, iState, rc, aCaption) ) return false; @@ -1051,7 +1051,7 @@ static bool ImplDrawNativeControl( HDC hDC, HTHEME hTheme, RECT rc, if( nType == ControlType::ListNode ) { if( nPart != ControlPart::Entire ) - return FALSE; + return false; ButtonValue aButtonValue = aValue.getTristateVal(); iPart = TVP_GLYPH; @@ -1064,7 +1064,7 @@ static bool ImplDrawNativeControl( HDC hDC, HTHEME hTheme, RECT rc, iState = GLPS_CLOSED; break; default: - return FALSE; + return false; } return ImplDrawTheme( hTheme, hDC, iPart, iState, rc, aCaption ); } @@ -1326,7 +1326,7 @@ bool WinSalGraphics::getNativeControlRegion( ControlType nType, tools::Rectangle &rNativeBoundingRegion, tools::Rectangle &rNativeContentRegion ) { - bool bRet = FALSE; + bool bRet = false; // FIXME: rNativeBoundingRegion has a different origin // depending on which part is used; horrors. @@ -1368,7 +1368,7 @@ bool WinSalGraphics::getNativeControlRegion( ControlType nType, rNativeContentRegion = aRect; rNativeBoundingRegion = rNativeContentRegion; if( !rNativeContentRegion.IsEmpty() ) - bRet = TRUE; + bRet = true; } } } @@ -1382,7 +1382,7 @@ bool WinSalGraphics::getNativeControlRegion( ControlType nType, rNativeContentRegion = aRect; rNativeBoundingRegion = rNativeContentRegion; if( !rNativeContentRegion.IsEmpty() ) - bRet = TRUE; + bRet = true; } } if( (nType == ControlType::Listbox || nType == ControlType::Combobox ) && nPart == ControlPart::Entire ) @@ -1400,7 +1400,7 @@ bool WinSalGraphics::getNativeControlRegion( ControlType nType, rNativeContentRegion = aBoxRect; rNativeBoundingRegion = rNativeContentRegion; if( !aRect.IsEmpty() ) - bRet = TRUE; + bRet = true; } } @@ -1432,7 +1432,7 @@ bool WinSalGraphics::getNativeControlRegion( ControlType nType, aBoxRect.SetRight( aBoxRect.Left() + aRect.GetWidth() ); rNativeContentRegion = aBoxRect; rNativeBoundingRegion = rNativeContentRegion; - bRet = TRUE; + bRet = true; } } } @@ -1455,7 +1455,7 @@ bool WinSalGraphics::getNativeControlRegion( ControlType nType, { rNativeContentRegion = aRect; rNativeBoundingRegion = rNativeContentRegion; - bRet = TRUE; + bRet = true; } } } @@ -1485,7 +1485,7 @@ bool WinSalGraphics::getNativeControlRegion( ControlType nType, rNativeContentRegion = aRect; rNativeBoundingRegion = rNativeContentRegion; } - bRet = TRUE; + bRet = true; } } @@ -1517,7 +1517,7 @@ bool WinSalGraphics::getNativeControlRegion( ControlType nType, } } rNativeBoundingRegion = aControlRect; - bRet = TRUE; + bRet = true; } ReleaseDC( mhWnd, hDC ); diff --git a/vcl/win/gdi/salprn.cxx b/vcl/win/gdi/salprn.cxx index 211f84a8609d..98886c72a9dc 100644 --- a/vcl/win/gdi/salprn.cxx +++ b/vcl/win/gdi/salprn.cxx @@ -290,11 +290,11 @@ static bool ImplTestSalJobSetup( WinSalInfoPrinter const * pPrinter, HANDLE hPrn; LPWSTR pPrinterNameW = const_cast(o3tl::toW(pPrinter->maDeviceName.getStr())); if ( !OpenPrinterW( pPrinterNameW, &hPrn, nullptr ) ) - return FALSE; + return false; // #131642# hPrn==HGDI_ERROR even though OpenPrinter() succeeded! if( hPrn == HGDI_ERROR ) - return FALSE; + return false; nSysJobSize = DocumentPropertiesW( nullptr, hPrn, pPrinterNameW, @@ -303,7 +303,7 @@ static bool ImplTestSalJobSetup( WinSalInfoPrinter const * pPrinter, if( nSysJobSize < 0 ) { ClosePrinter( hPrn ); - return FALSE; + return false; } DEVMODEW *pBuffer = static_cast(_alloca( nSysJobSize )); LONG nRet = DocumentPropertiesW( nullptr, hPrn, @@ -312,7 +312,7 @@ static bool ImplTestSalJobSetup( WinSalInfoPrinter const * pPrinter, if( nRet < 0 ) { ClosePrinter( hPrn ); - return FALSE; + return false; } // the spec version differs between the windows platforms, ie 98,NT,2000/XP @@ -333,7 +333,7 @@ static bool ImplTestSalJobSetup( WinSalInfoPrinter const * pPrinter, if( pDevModeW && (dmSpecVersion == pDevModeW->dmSpecVersion) && (dmDriverVersion == pDevModeW->dmDriverVersion) ) - return TRUE; + return true; } if ( bDelete ) { @@ -343,7 +343,7 @@ static bool ImplTestSalJobSetup( WinSalInfoPrinter const * pPrinter, } } - return FALSE; + return false; } static bool ImplUpdateSalJobSetup( WinSalInfoPrinter const * pPrinter, ImplJobSetup* pSetupData, @@ -352,10 +352,10 @@ static bool ImplUpdateSalJobSetup( WinSalInfoPrinter const * pPrinter, ImplJobSe HANDLE hPrn; LPWSTR pPrinterNameW = const_cast(o3tl::toW(pPrinter->maDeviceName.getStr())); if ( !OpenPrinterW( pPrinterNameW, &hPrn, nullptr ) ) - return FALSE; + return false; // #131642# hPrn==HGDI_ERROR even though OpenPrinter() succeeded! if( hPrn == HGDI_ERROR ) - return FALSE; + return false; LONG nRet; HWND hWnd = nullptr; @@ -369,7 +369,7 @@ static bool ImplUpdateSalJobSetup( WinSalInfoPrinter const * pPrinter, ImplJobSe if ( nSysJobSize < 0 ) { ClosePrinter( hPrn ); - return FALSE; + return false; } // make Outputbuffer @@ -412,7 +412,7 @@ static bool ImplUpdateSalJobSetup( WinSalInfoPrinter const * pPrinter, ImplJobSe if( (nRet < 0) || (pVisibleDlgParent && (nRet == IDCANCEL)) ) { std::free( pOutBuffer ); - return FALSE; + return false; } // fill up string buffers with 0 so they do not influence a JobSetup's memcmp @@ -436,7 +436,7 @@ static bool ImplUpdateSalJobSetup( WinSalInfoPrinter const * pPrinter, ImplJobSe pSetupData->SetDriverData(reinterpret_cast(pOutBuffer)); pSetupData->SetSystem( JOBSETUP_SYSTEM_WINDOWS ); - return TRUE; + return true; } static void ImplDevModeToJobSetup( WinSalInfoPrinter const * pPrinter, ImplJobSetup* pSetupData, JobSetFlags nFlags ) @@ -1039,7 +1039,7 @@ static bool ImplUpdateSalPrnIC( WinSalInfoPrinter* pPrinter, const ImplJobSetup* { HDC hNewDC = ImplCreateSalPrnIC( pPrinter, pSetupData ); if ( !hNewDC ) - return FALSE; + return false; if ( pPrinter->mpGraphics ) { @@ -1051,7 +1051,7 @@ static bool ImplUpdateSalPrnIC( WinSalInfoPrinter* pPrinter, const ImplJobSetup* pPrinter->mpGraphics = ImplCreateSalPrnGraphics( hNewDC ); pPrinter->mhDC = hNewDC; - return TRUE; + return true; } @@ -1094,9 +1094,9 @@ void WinSalInstance::DestroyInfoPrinter( SalInfoPrinter* pPrinter ) WinSalInfoPrinter::WinSalInfoPrinter() : mpGraphics( nullptr ), mhDC( nullptr ), - mbGraphics( FALSE ) + mbGraphics( false ) { - m_bPapersInit = FALSE; + m_bPapersInit = false; } WinSalInfoPrinter::~WinSalInfoPrinter() @@ -1151,14 +1151,14 @@ SalGraphics* WinSalInfoPrinter::AcquireGraphics() return nullptr; if ( mpGraphics ) - mbGraphics = TRUE; + mbGraphics = true; return mpGraphics; } void WinSalInfoPrinter::ReleaseGraphics( SalGraphics* ) { - mbGraphics = FALSE; + mbGraphics = false; } bool WinSalInfoPrinter::Setup(weld::Window* pFrame, ImplJobSetup* pSetupData) @@ -1169,13 +1169,13 @@ bool WinSalInfoPrinter::Setup(weld::Window* pFrame, ImplJobSetup* pSetupData) return ImplUpdateSalPrnIC( this, pSetupData ); } - return FALSE; + return false; } bool WinSalInfoPrinter::SetPrinterData( ImplJobSetup* pSetupData ) { if ( !ImplTestSalJobSetup( this, pSetupData, false ) ) - return FALSE; + return false; return ImplUpdateSalPrnIC( this, pSetupData ); } @@ -1188,7 +1188,7 @@ bool WinSalInfoPrinter::SetData( JobSetFlags nFlags, ImplJobSetup* pSetupData ) return ImplUpdateSalPrnIC( this, pSetupData ); } - return FALSE; + return false; } sal_uInt16 WinSalInfoPrinter::GetPaperBinCount( const ImplJobSetup* pSetupData ) @@ -1351,8 +1351,8 @@ WinSalPrinter::WinSalPrinter() : mhDC( nullptr ), mnError( SalPrinterError::NONE ), mnCopies( 0 ), - mbCollate( FALSE ), - mbAbort( FALSE ), + mbCollate( false ), + mbAbort( false ), mbValid( true ) { SalData* pSalData = GetSalData(); @@ -1418,7 +1418,7 @@ bool WinSalPrinter::StartJob( const OUString* pFileName, ImplJobSetup* pSetupData ) { mnError = SalPrinterError::NONE; - mbAbort = FALSE; + mbAbort = false; mnCopies = nCopies; mbCollate = bCollate; @@ -1447,7 +1447,7 @@ bool WinSalPrinter::StartJob( const OUString* pFileName, if ( !hDC ) { mnError = SalPrinterError::General; - return FALSE; + return false; } // make sure mhDC is set before the printer driver may call our abortproc @@ -1455,11 +1455,11 @@ bool WinSalPrinter::StartJob( const OUString* pFileName, if ( SetAbortProc( hDC, SalPrintAbortProc ) <= 0 ) { mnError = SalPrinterError::General; - return FALSE; + return false; } mnError = SalPrinterError::NONE; - mbAbort = FALSE; + mbAbort = false; // As the Telecom Balloon Fax driver tends to send messages repeatedly // we try to process first all, and then insert a dummy message @@ -1484,7 +1484,7 @@ bool WinSalPrinter::StartJob( const OUString* pFileName, else { mnError = SalPrinterError::Abort; - return FALSE; + return false; } } @@ -1513,10 +1513,10 @@ bool WinSalPrinter::StartJob( const OUString* pFileName, mnError = SalPrinterError::Abort; else mnError = SalPrinterError::General; - return FALSE; + return false; } - return TRUE; + return true; } void WinSalPrinter::DoEndDoc(HDC hDC) @@ -1553,7 +1553,7 @@ bool WinSalPrinter::EndJob() mhDC = nullptr; } - return TRUE; + return true; } SalGraphics* WinSalPrinter::StartPage( ImplJobSetup* pSetupData, bool bNewJobData ) diff --git a/vcl/win/window/salframe.cxx b/vcl/win/window/salframe.cxx index afecae44beaf..2669083506b1 100644 --- a/vcl/win/window/salframe.cxx +++ b/vcl/win/window/salframe.cxx @@ -3472,7 +3472,7 @@ static bool ImplHandleKeyMsg( HWND hWnd, UINT nMsg, SalKeyEvent aKeyEvt; SalEvent nEvent; MSG aCharMsg; - bool bCharPeek = FALSE; + bool bCharPeek = false; UINT nCharMsg = WM_CHAR; bool bKeyUp = (nMsg == WM_KEYUP) || (nMsg == WM_SYSKEYUP); @@ -3490,7 +3490,7 @@ static bool ImplHandleKeyMsg( HWND hWnd, UINT nMsg, WM_CHAR, WM_CHAR, PM_NOREMOVE | PM_NOYIELD ); if ( bCharPeek && (nDeadChar == aCharMsg.wParam) ) { - bCharPeek = FALSE; + bCharPeek = false; nDeadChar = 0; if ( wParam == VK_BACK ) diff --git a/vcl/win/window/salmenu.cxx b/vcl/win/window/salmenu.cxx index 190f50730474..3e90600c6670 100644 --- a/vcl/win/window/salmenu.cxx +++ b/vcl/win/window/salmenu.cxx @@ -36,9 +36,9 @@ static DWORD myerr=0; bool SalData::IsKnownMenuHandle( HMENU hMenu ) { if( mhMenuSet.find( hMenu ) == mhMenuSet.end() ) - return FALSE; + return false; else - return TRUE; + return true; } // WinSalInst factory methods @@ -115,7 +115,7 @@ static void ImplDrawMenuBar( SalMenu *pMenu ) WinSalMenu::WinSalMenu() { mhMenu = nullptr; - mbMenuBar = FALSE; + mbMenuBar = false; mhWnd = nullptr; mpParentMenu = nullptr; } @@ -139,7 +139,7 @@ bool WinSalMenu::VisibleMenuBar() // and the application will properly react to all native // menu messages. - return FALSE; + return false; } void WinSalMenu::SetFrame( const SalFrame *pFrame ) diff --git a/vcl/win/window/salobj.cxx b/vcl/win/window/salobj.cxx index e01dc072bfa3..0cf2fa8ada37 100644 --- a/vcl/win/window/salobj.cxx +++ b/vcl/win/window/salobj.cxx @@ -35,20 +35,20 @@ static bool ImplIsSysWindowOrChild( HWND hWndParent, HWND hWndChild ) { if ( hWndParent == hWndChild ) - return TRUE; + return true; HWND hTempWnd = ::GetParent( hWndChild ); while ( hTempWnd ) { // stop searching if not a child window if ( !(GetWindowStyle( hTempWnd ) & WS_CHILD) ) - return FALSE; + return false; if ( hTempWnd == hWndParent ) - return TRUE; + return true; hTempWnd = ::GetParent( hTempWnd ); } - return FALSE; + return false; } WinSalObject* ImplFindSalObject( HWND hWndChild ) @@ -174,20 +174,20 @@ bool ImplSalPreDispatchMsg( const MSG* pMsg ) // process KeyEvents even if the control does not process them itself // SysKeys are processed as WM_SYSCOMMAND // Char-Events are not processed, as they are not accelerator-relevant - bool bWantedKeyCode = FALSE; + bool bWantedKeyCode = false; // A-Z, 0-9 only when combined with the Control-key if ( ((pMsg->wParam >= 65) && (pMsg->wParam <= 90)) || ((pMsg->wParam >= 48) && (pMsg->wParam <= 57)) ) { if ( GetKeyState( VK_CONTROL ) & 0x8000 ) - bWantedKeyCode = TRUE; + bWantedKeyCode = true; } else if ( ((pMsg->wParam >= VK_F1) && (pMsg->wParam <= VK_F24)) || ((pMsg->wParam >= VK_SPACE) && (pMsg->wParam <= VK_HELP)) || (pMsg->wParam == VK_BACK) || (pMsg->wParam == VK_TAB) || (pMsg->wParam == VK_CLEAR) || (pMsg->wParam == VK_RETURN) || (pMsg->wParam == VK_ESCAPE) ) - bWantedKeyCode = TRUE; + bWantedKeyCode = true; if ( bWantedKeyCode ) { ImplSalYieldMutexAcquireWithWait(); @@ -208,7 +208,7 @@ bool ImplSalPreDispatchMsg( const MSG* pMsg ) ((nKeyCode >= 65) && (nKeyCode <= 90)) || ((nKeyCode >= 97) && (nKeyCode <= 122)) ) { - bool bRet = FALSE; + bool bRet = false; ImplSalYieldMutexAcquireWithWait(); pObject = ImplFindSalObject( pMsg->hwnd ); if ( pObject ) @@ -219,19 +219,19 @@ bool ImplSalPreDispatchMsg( const MSG* pMsg ) if ( pFrame ) { if ( ImplHandleSalObjSysCharMsg( pFrame->mhWnd, pMsg->wParam, pMsg->lParam ) ) - bRet = TRUE; + bRet = true; } } } ImplSalYieldMutexRelease(); if ( bRet ) - return TRUE; + return true; } } else pSalData->mnSalObjWantKeyEvt = 0; - return FALSE; + return false; } void ImplSalPostDispatchMsg( const MSG* pMsg ) @@ -619,7 +619,7 @@ void WinSalObject::BeginSetClipRegion( sal_uInt32 nRectCount ) mpClipRgnData->rdh.nRgnSize = nRectBufSize; SetRectEmpty( &(mpClipRgnData->rdh.rcBound) ); mpNextClipRect = reinterpret_cast(&(mpClipRgnData->Buffer)); - mbFirstClipRect = TRUE; + mbFirstClipRect = true; } void WinSalObject::UnionClipRegion( long nX, long nY, long nWidth, long nHeight ) @@ -635,7 +635,7 @@ void WinSalObject::UnionClipRegion( long nX, long nY, long nWidth, long nHeight pBoundRect->top = nY; pBoundRect->right = nRight; pBoundRect->bottom = nBottom; - mbFirstClipRect = FALSE; + mbFirstClipRect = false; } else { diff --git a/winaccessibility/source/UAccCOM/MAccessible.cxx b/winaccessibility/source/UAccCOM/MAccessible.cxx index 7afe11a5bf32..5ffc93106c79 100644 --- a/winaccessibility/source/UAccCOM/MAccessible.cxx +++ b/winaccessibility/source/UAccCOM/MAccessible.cxx @@ -145,19 +145,19 @@ using namespace com::sun::star::accessibility::AccessibleRole; #define QUERYXINTERFACE(ainterface) \ { \ if(pXAcc == nullptr) \ - return FALSE; \ + return false; \ pRContext = pXAcc->getAccessibleContext(); \ if( !pRContext.is() ) \ { \ - return FALSE; \ + return false; \ } \ Reference pRXI(pRContext,UNO_QUERY);\ if( !pRXI.is() ) \ { \ - return FALSE; \ + return false; \ } \ *ppXI = pRXI.get(); \ - return TRUE; \ + return true; \ } #define ISDESTROY() \ @@ -178,7 +178,7 @@ m_pIParent(nullptr), m_dChildID(0x00), m_dFocusChildID(UACC_NO_FOCUS), m_hwnd(nullptr), -m_isDestroy(FALSE), +m_isDestroy(false), m_bRequiresSave(FALSE) { m_sLocation.m_dLeft=0; @@ -2021,14 +2021,14 @@ COM_DECLSPEC_NOTHROW STDMETHODIMP CMAccessible:: get_groupPosition(long __RPC_FA } int level = 0; - bool isFound = FALSE; + bool isFound = false; while( pParentAcc.is() && !isFound) { level++; pRParentContext = pParentAcc->getAccessibleContext(); Role = pRParentContext->getAccessibleRole(); if( (Role == TREE) || (Role == LIST) ) - isFound = TRUE; + isFound = true; pParentAcc = pRParentContext->getAccessibleParent(); } @@ -2539,7 +2539,7 @@ bool CMAccessible::GetXInterfaceFromXAccessible(XAccessible* pXAcc, XInterface** break; } - return FALSE; + return false; } template static HRESULT @@ -2650,7 +2650,7 @@ CMAccessible::get_IAccessibleFromXAccessible(XAccessible * pXAcc, IAccessible ** { return FALSE; } - bool isGet = FALSE; + bool isGet = false; if(g_pAgent) isGet = g_pAgent->GetIAccessibleFromXAccessible(pXAcc, ppIA); diff --git a/winaccessibility/source/UAccCOM/acccommon.h b/winaccessibility/source/UAccCOM/acccommon.h index 7e338e05a3bf..f178ad3f32da 100644 --- a/winaccessibility/source/UAccCOM/acccommon.h +++ b/winaccessibility/source/UAccCOM/acccommon.h @@ -26,22 +26,22 @@ struct ltComp bool operator()(REFGUID rguid1, REFGUID rguid2) const { if(reinterpret_cast(&rguid1)[0] < reinterpret_cast(&rguid2)[0]) - return TRUE; + return true; else if(reinterpret_cast(&rguid1)[0] > reinterpret_cast(&rguid2)[0]) - return FALSE; + return false; if(reinterpret_cast(&rguid1)[1] < reinterpret_cast(&rguid2)[1]) - return TRUE; + return true; else if(reinterpret_cast(&rguid1)[1] > reinterpret_cast(&rguid2)[1]) - return FALSE; + return false; if(reinterpret_cast(&rguid1)[2] < reinterpret_cast(&rguid2)[2]) - return TRUE; + return true; else if(reinterpret_cast(&rguid1)[2] > reinterpret_cast(&rguid2)[2]) - return FALSE; + return false; if(reinterpret_cast(&rguid1)[3] < reinterpret_cast(&rguid2)[3]) - return TRUE; + return true; else if(reinterpret_cast(&rguid1)[3] > reinterpret_cast(&rguid2)[3]) - return FALSE; - return FALSE; + return false; + return false; } }; diff --git a/xmlsecurity/source/xmlsec/mscrypt/securityenvironment_mscryptimpl.cxx b/xmlsecurity/source/xmlsec/mscrypt/securityenvironment_mscryptimpl.cxx index afa9f99ff0d7..a0c47b9c443c 100644 --- a/xmlsecurity/source/xmlsec/mscrypt/securityenvironment_mscryptimpl.cxx +++ b/xmlsecurity/source/xmlsec/mscrypt/securityenvironment_mscryptimpl.cxx @@ -602,7 +602,7 @@ uno::Sequence< uno::Reference < XCertificate > > SecurityEnvironment_MSCryptImpl pChainContext = nullptr ; - bool bChain = FALSE; + bool bChain = false; if( pCertContext != nullptr ) { HCERTSTORE hAdditionalStore = nullptr; @@ -786,7 +786,7 @@ sal_Int32 SecurityEnvironment_MSCryptImpl::verifyCertificate( HCERTSTORE hCollectionStore = nullptr; HCERTSTORE hIntermediateCertsStore = nullptr; - bool bChain = FALSE; + bool bChain = false; if( pCertContext != nullptr ) { hIntermediateCertsStore = -- cgit