summaryrefslogtreecommitdiff
path: root/setup_native/source/win32/customactions/shellextensions/checkrunningoffice.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'setup_native/source/win32/customactions/shellextensions/checkrunningoffice.cxx')
-rw-r--r--[-rwxr-xr-x]setup_native/source/win32/customactions/shellextensions/checkrunningoffice.cxx9
1 files changed, 6 insertions, 3 deletions
diff --git a/setup_native/source/win32/customactions/shellextensions/checkrunningoffice.cxx b/setup_native/source/win32/customactions/shellextensions/checkrunningoffice.cxx
index 9a028953fef1..f50c795c5c8a 100755..100644
--- a/setup_native/source/win32/customactions/shellextensions/checkrunningoffice.cxx
+++ b/setup_native/source/win32/customactions/shellextensions/checkrunningoffice.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -50,6 +51,7 @@
#include <string>
#include <queue>
#include <stdio.h>
+#include <sal/macros.h>
#include <systools/win32/uwinapi.h>
#include <../tools/seterror.hxx>
@@ -64,7 +66,7 @@ inline void OutputDebugStringFormat( LPCTSTR pFormat, ... )
va_list args;
va_start( args, pFormat );
- _vsntprintf( buffer, elementsof(buffer), pFormat, args );
+ _vsntprintf( buffer, SAL_N_ELEMENTS(buffer), pFormat, args );
OutputDebugString( buffer );
}
#else
@@ -126,7 +128,7 @@ static BOOL MoveFileEx9x( LPCSTR lpExistingFileNameA, LPCSTR lpNewFileNameA, DWO
)
{
CHAR szBuffer[32767]; // The buffer size must not exceed 32K
- DWORD dwBufLen = GetPrivateProfileSectionA( RENAME_SECTION, szBuffer, elementsof(szBuffer), WININIT_FILENAME );
+ DWORD dwBufLen = GetPrivateProfileSectionA( RENAME_SECTION, szBuffer, SAL_N_ELEMENTS(szBuffer), WININIT_FILENAME );
CHAR szRename[MAX_PATH]; // This is enough for at most to times 67 chracters
strcpy( szRename, szNewFileNameA );
@@ -134,7 +136,7 @@ static BOOL MoveFileEx9x( LPCSTR lpExistingFileNameA, LPCSTR lpNewFileNameA, DWO
strcat( szRename, szExistingFileNameA );
size_t lnRename = strlen(szRename);
- if ( dwBufLen + lnRename + 2 <= elementsof(szBuffer) )
+ if ( dwBufLen + lnRename + 2 <= SAL_N_ELEMENTS(szBuffer) )
{
CopyMemory( &szBuffer[dwBufLen], szRename, lnRename );
szBuffer[dwBufLen + lnRename ] = 0;
@@ -288,3 +290,4 @@ extern "C" UINT __stdcall IsOfficeRunning( MSIHANDLE handle )
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */