summaryrefslogtreecommitdiff
path: root/desktop/win32
diff options
context:
space:
mode:
Diffstat (limited to 'desktop/win32')
-rw-r--r--desktop/win32/source/applauncher/launcher.cxx32
-rw-r--r--desktop/win32/source/applauncher/launcher.hxx14
-rw-r--r--desktop/win32/source/applauncher/sbase.cxx2
-rw-r--r--desktop/win32/source/applauncher/scalc.cxx2
-rw-r--r--desktop/win32/source/applauncher/sdraw.cxx2
-rw-r--r--desktop/win32/source/applauncher/simpress.cxx2
-rw-r--r--desktop/win32/source/applauncher/smath.cxx2
-rw-r--r--desktop/win32/source/applauncher/sweb.cxx2
-rw-r--r--desktop/win32/source/applauncher/swriter.cxx2
-rw-r--r--desktop/win32/source/extendloaderenvironment.cxx2
-rw-r--r--desktop/win32/source/extendloaderenvironment.hxx2
-rw-r--r--desktop/win32/source/guiloader/genericloader.cxx16
-rw-r--r--desktop/win32/source/guistdio/guistdio.cxx2
-rw-r--r--desktop/win32/source/guistdio/unopkgio.cxx2
-rw-r--r--desktop/win32/source/lwrapa.cxx2
-rw-r--r--desktop/win32/source/lwrapw.cxx2
-rw-r--r--desktop/win32/source/main.h2
-rw-r--r--desktop/win32/source/officeloader/officeloader.cxx74
-rw-r--r--desktop/win32/source/rebase/Resource.h10
-rw-r--r--desktop/win32/source/rebase/rebase.cxx34
-rw-r--r--desktop/win32/source/rebase/rebasegui.cxx54
-rw-r--r--desktop/win32/source/rwrapa.cxx2
-rw-r--r--desktop/win32/source/rwrapw.cxx2
-rw-r--r--desktop/win32/source/setup/Resource.h88
-rw-r--r--desktop/win32/source/setup/setup.cpp119
-rw-r--r--desktop/win32/source/setup/setup.hxx4
-rw-r--r--desktop/win32/source/setup/setup_a.cxx2
-rw-r--r--desktop/win32/source/setup/setup_help.hxx2
-rw-r--r--desktop/win32/source/setup/setup_main.cxx2
-rw-r--r--desktop/win32/source/setup/setup_main.hxx2
-rw-r--r--desktop/win32/source/setup/setup_w.cxx2
-rw-r--r--desktop/win32/source/sowrapper.cxx2
-rw-r--r--desktop/win32/source/unoinfo.cxx2
-rw-r--r--desktop/win32/source/wrapper.h78
-rw-r--r--desktop/win32/source/wrappera.cxx2
-rw-r--r--desktop/win32/source/wrapperw.cxx2
36 files changed, 286 insertions, 287 deletions
diff --git a/desktop/win32/source/applauncher/launcher.cxx b/desktop/win32/source/applauncher/launcher.cxx
index 4ea164d2eeed..dd50c351a9ff 100644
--- a/desktop/win32/source/applauncher/launcher.cxx
+++ b/desktop/win32/source/applauncher/launcher.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -33,12 +33,12 @@
#ifndef _WINDOWS_
-# define WIN32_LEAN_AND_MEAN
+# define WIN32_LEAN_AND_MEAN
#if defined _MSC_VER
#pragma warning(push, 1)
#endif
-# include <windows.h>
-# include <shellapi.h>
+# include <windows.h>
+# include <shellapi.h>
#if defined _MSC_VER
#pragma warning(pop)
#endif
@@ -57,7 +57,7 @@ extern "C" int APIENTRY _tWinMain( HINSTANCE, HINSTANCE, LPTSTR, int )
{
// Retreive startup info
- STARTUPINFO aStartupInfo;
+ STARTUPINFO aStartupInfo;
ZeroMemory( &aStartupInfo, sizeof(aStartupInfo) );
aStartupInfo.cb = sizeof( aStartupInfo );
@@ -65,10 +65,10 @@ extern "C" int APIENTRY _tWinMain( HINSTANCE, HINSTANCE, LPTSTR, int )
// Retrieve command line
- LPTSTR lpCommandLine = GetCommandLine();
+ LPTSTR lpCommandLine = GetCommandLine();
- LPTSTR *ppArguments = NULL;
- int nArguments = 0;
+ LPTSTR *ppArguments = NULL;
+ int nArguments = 0;
ppArguments = GetArgv( &nArguments );
@@ -84,19 +84,19 @@ extern "C" int APIENTRY _tWinMain( HINSTANCE, HINSTANCE, LPTSTR, int )
// Calculate application name
- TCHAR szApplicationName[MAX_PATH];
- TCHAR szDrive[MAX_PATH];
- TCHAR szDir[MAX_PATH];
- TCHAR szFileName[MAX_PATH];
- TCHAR szExt[MAX_PATH];
+ TCHAR szApplicationName[MAX_PATH];
+ TCHAR szDrive[MAX_PATH];
+ TCHAR szDir[MAX_PATH];
+ TCHAR szFileName[MAX_PATH];
+ TCHAR szExt[MAX_PATH];
GetModuleFileName( NULL, szApplicationName, MAX_PATH );
_tsplitpath( szApplicationName, szDrive, szDir, szFileName, szExt );
_tmakepath( szApplicationName, szDrive, szDir, OFFICE_IMAGE_NAME, _T(".exe") );
- PROCESS_INFORMATION aProcessInfo;
+ PROCESS_INFORMATION aProcessInfo;
- BOOL fSuccess = CreateProcess(
+ BOOL fSuccess = CreateProcess(
szApplicationName,
lpCommandLine,
NULL,
@@ -121,7 +121,7 @@ extern "C" int APIENTRY _tWinMain( HINSTANCE, HINSTANCE, LPTSTR, int )
return 0;
}
- DWORD dwError = GetLastError();
+ DWORD dwError = GetLastError();
LPVOID lpMsgBuf;
diff --git a/desktop/win32/source/applauncher/launcher.hxx b/desktop/win32/source/applauncher/launcher.hxx
index 46829d67037c..444789c96a5a 100644
--- a/desktop/win32/source/applauncher/launcher.hxx
+++ b/desktop/win32/source/applauncher/launcher.hxx
@@ -5,19 +5,19 @@
#endif
#ifndef _INC_TCHAR
-# ifdef UNICODE
-# define _UNICODE
-# endif
-# include <tchar.h>
+# ifdef UNICODE
+# define _UNICODE
+# endif
+# include <tchar.h>
#endif
#ifdef UNICODE
-# define GetArgv( pArgc ) CommandLineToArgvW( GetCommandLine(), pArgc )
+# define GetArgv( pArgc ) CommandLineToArgvW( GetCommandLine(), pArgc )
#else
-# define GetArgv( pArgc ) (*pArgc = __argc, __argv)
+# define GetArgv( pArgc ) (*pArgc = __argc, __argv)
#endif
-#define OFFICE_IMAGE_NAME _T("soffice")
+#define OFFICE_IMAGE_NAME _T("soffice")
extern _TCHAR APPLICATION_SWITCH[];
diff --git a/desktop/win32/source/applauncher/sbase.cxx b/desktop/win32/source/applauncher/sbase.cxx
index 9a1f31d3dce0..df940d0267dd 100644
--- a/desktop/win32/source/applauncher/sbase.cxx
+++ b/desktop/win32/source/applauncher/sbase.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/desktop/win32/source/applauncher/scalc.cxx b/desktop/win32/source/applauncher/scalc.cxx
index ceca63e14450..ed741c28e088 100644
--- a/desktop/win32/source/applauncher/scalc.cxx
+++ b/desktop/win32/source/applauncher/scalc.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/desktop/win32/source/applauncher/sdraw.cxx b/desktop/win32/source/applauncher/sdraw.cxx
index 034a7c4f949c..c8aa2f62f887 100644
--- a/desktop/win32/source/applauncher/sdraw.cxx
+++ b/desktop/win32/source/applauncher/sdraw.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/desktop/win32/source/applauncher/simpress.cxx b/desktop/win32/source/applauncher/simpress.cxx
index cd01d01b346d..616082792216 100644
--- a/desktop/win32/source/applauncher/simpress.cxx
+++ b/desktop/win32/source/applauncher/simpress.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/desktop/win32/source/applauncher/smath.cxx b/desktop/win32/source/applauncher/smath.cxx
index 3e670cd8e692..cec6bbdca14d 100644
--- a/desktop/win32/source/applauncher/smath.cxx
+++ b/desktop/win32/source/applauncher/smath.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/desktop/win32/source/applauncher/sweb.cxx b/desktop/win32/source/applauncher/sweb.cxx
index 1c2fd8eabd6c..578239dd1a9b 100644
--- a/desktop/win32/source/applauncher/sweb.cxx
+++ b/desktop/win32/source/applauncher/sweb.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/desktop/win32/source/applauncher/swriter.cxx b/desktop/win32/source/applauncher/swriter.cxx
index 1909cb97cded..5235e5b7b246 100644
--- a/desktop/win32/source/applauncher/swriter.cxx
+++ b/desktop/win32/source/applauncher/swriter.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/desktop/win32/source/extendloaderenvironment.cxx b/desktop/win32/source/extendloaderenvironment.cxx
index ee9de7f6099f..436003c7703e 100644
--- a/desktop/win32/source/extendloaderenvironment.cxx
+++ b/desktop/win32/source/extendloaderenvironment.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/desktop/win32/source/extendloaderenvironment.hxx b/desktop/win32/source/extendloaderenvironment.hxx
index b9b262bb13ed..2c1207a0dbac 100644
--- a/desktop/win32/source/extendloaderenvironment.hxx
+++ b/desktop/win32/source/extendloaderenvironment.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/desktop/win32/source/guiloader/genericloader.cxx b/desktop/win32/source/guiloader/genericloader.cxx
index 1d2075a65bc8..ac84ed35103c 100644
--- a/desktop/win32/source/guiloader/genericloader.cxx
+++ b/desktop/win32/source/guiloader/genericloader.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -55,9 +55,9 @@
static int GenericMain()
{
- TCHAR szTargetFileName[MAX_PATH];
+ TCHAR szTargetFileName[MAX_PATH];
TCHAR szIniDirectory[MAX_PATH];
- STARTUPINFO aStartupInfo;
+ STARTUPINFO aStartupInfo;
desktop_win32::extendLoaderEnvironment(szTargetFileName, szIniDirectory);
@@ -66,9 +66,9 @@ static int GenericMain()
GetStartupInfo( &aStartupInfo );
- DWORD dwExitCode = (DWORD)-1;
+ DWORD dwExitCode = (DWORD)-1;
- PROCESS_INFORMATION aProcessInfo;
+ PROCESS_INFORMATION aProcessInfo;
size_t iniDirLen = wcslen(szIniDirectory);
WCHAR cwd[MAX_PATH];
@@ -109,7 +109,7 @@ static int GenericMain()
p = desktop_win32::commandLineAppendEncoded(p, cwd);
}
desktop_win32::commandLineAppend(p, MY_STRING(L"\""));
-
+
BOOL fSuccess = CreateProcess(
szTargetFileName,
cl2,
@@ -126,7 +126,7 @@ static int GenericMain()
if ( fSuccess )
{
- DWORD dwWaitResult;
+ DWORD dwWaitResult;
do
{
@@ -137,7 +137,7 @@ static int GenericMain()
if ( WAIT_OBJECT_0 + 1 == dwWaitResult )
{
- MSG msg;
+ MSG msg;
PeekMessage( &msg, NULL, 0, 0, PM_REMOVE );
}
diff --git a/desktop/win32/source/guistdio/guistdio.cxx b/desktop/win32/source/guistdio/guistdio.cxx
index 1c12089818f0..7ebf4cb1204a 100644
--- a/desktop/win32/source/guistdio/guistdio.cxx
+++ b/desktop/win32/source/guistdio/guistdio.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/desktop/win32/source/guistdio/unopkgio.cxx b/desktop/win32/source/guistdio/unopkgio.cxx
index 8790cedfe98f..af99179c5f61 100644
--- a/desktop/win32/source/guistdio/unopkgio.cxx
+++ b/desktop/win32/source/guistdio/unopkgio.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/desktop/win32/source/lwrapa.cxx b/desktop/win32/source/lwrapa.cxx
index eba3059da517..11e4b9e400aa 100644
--- a/desktop/win32/source/lwrapa.cxx
+++ b/desktop/win32/source/lwrapa.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/desktop/win32/source/lwrapw.cxx b/desktop/win32/source/lwrapw.cxx
index 90a8b5d88f55..6a9b72ca3038 100644
--- a/desktop/win32/source/lwrapw.cxx
+++ b/desktop/win32/source/lwrapw.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/desktop/win32/source/main.h b/desktop/win32/source/main.h
index 9e3039da1884..9e72fb9c3e03 100644
--- a/desktop/win32/source/main.h
+++ b/desktop/win32/source/main.h
@@ -9,7 +9,7 @@ int MainA();
int MainW();
#ifdef __cplusplus
-} /* extern "C" */
+} /* extern "C" */
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/win32/source/officeloader/officeloader.cxx b/desktop/win32/source/officeloader/officeloader.cxx
index d3335c80a560..cce56b05a670 100644
--- a/desktop/win32/source/officeloader/officeloader.cxx
+++ b/desktop/win32/source/officeloader/officeloader.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -56,9 +56,9 @@
#include "../../../source/inc/exithelper.hxx"
#include "../extendloaderenvironment.hxx"
-#define PIPE_PREFIX TEXT("\\\\.\\pipe\\OSL_PIPE_")
-#define PIPE_POSTFIX TEXT("_SingleOfficeIPC_")
-#define PIPE_TERMINATION_SEQUENCE "InternalIPC::ProcessingDone"
+#define PIPE_PREFIX TEXT("\\\\.\\pipe\\OSL_PIPE_")
+#define PIPE_POSTFIX TEXT("_SingleOfficeIPC_")
+#define PIPE_TERMINATION_SEQUENCE "InternalIPC::ProcessingDone"
BOOL WINAPI ConvertSidToStringSid( PSID pSid, LPTSTR* StringSid )
{
@@ -128,7 +128,7 @@ BOOL WINAPI ConvertSidToStringSid( PSID pSid, LPTSTR* StringSid )
//---------------------------------------------------------------------------
-static LPTSTR *GetCommandArgs( int *pArgc )
+static LPTSTR *GetCommandArgs( int *pArgc )
{
#ifdef UNICODE
return CommandLineToArgvW( GetCommandLineW(), pArgc );
@@ -181,10 +181,10 @@ int WINAPI WinMain( HINSTANCE hInstance, HINSTANCE, LPSTR, int )
int WINAPI _tWinMain( HINSTANCE, HINSTANCE, LPTSTR, int )
#endif
{
- TCHAR szTargetFileName[MAX_PATH] = TEXT("");
+ TCHAR szTargetFileName[MAX_PATH] = TEXT("");
TCHAR szIniDirectory[MAX_PATH];
- TCHAR szPerfTuneIniFile[MAX_PATH] = TEXT("");
- STARTUPINFO aStartupInfo;
+ TCHAR szPerfTuneIniFile[MAX_PATH] = TEXT("");
+ STARTUPINFO aStartupInfo;
desktop_win32::extendLoaderEnvironment(szTargetFileName, szIniDirectory);
@@ -194,10 +194,10 @@ int WINAPI _tWinMain( HINSTANCE, HINSTANCE, LPTSTR, int )
GetStartupInfo( &aStartupInfo );
// Get image path with same name but with .bin extension
- TCHAR szModuleFileName[MAX_PATH];
+ TCHAR szModuleFileName[MAX_PATH];
GetModuleFileName( NULL, szModuleFileName, MAX_PATH );
- _TCHAR *lpLastSlash = _tcsrchr( szModuleFileName, '\\' );
+ _TCHAR *lpLastSlash = _tcsrchr( szModuleFileName, '\\' );
if ( lpLastSlash )
{
size_t len = lpLastSlash - szModuleFileName + 1;
@@ -208,10 +208,10 @@ int WINAPI _tWinMain( HINSTANCE, HINSTANCE, LPTSTR, int )
// Create process with same command line, environment and stdio handles which
// are directed to the created pipes
- DWORD dwExitCode = (DWORD)-1;
+ DWORD dwExitCode = (DWORD)-1;
- BOOL fSuccess = FALSE;
- LPTSTR lpCommandLine = NULL;
+ BOOL fSuccess = FALSE;
+ LPTSTR lpCommandLine = NULL;
int argc = 0;
LPTSTR * argv = NULL;
bool bFirst = true;
@@ -223,7 +223,7 @@ int WINAPI _tWinMain( HINSTANCE, HINSTANCE, LPTSTR, int )
do
{
- TCHAR szKey[32];
+ TCHAR szKey[32];
GetPrivateProfileString(
TEXT("PerformanceTuning"),
@@ -236,25 +236,25 @@ int WINAPI _tWinMain( HINSTANCE, HINSTANCE, LPTSTR, int )
if ( 0 == _tcscmp( szKey, TEXT("1") ) )
{
- HANDLE hProcessToken;
+ HANDLE hProcessToken;
if ( OpenProcessToken( GetCurrentProcess(), TOKEN_QUERY, &hProcessToken ) )
{
- TCHAR szPipeName[4096];
+ TCHAR szPipeName[4096];
- DWORD dwTokenLength = 0;
+ DWORD dwTokenLength = 0;
fSuccess = GetTokenInformation( hProcessToken, TokenUser, NULL, dwTokenLength, &dwTokenLength );
- PVOID pTokenInfo = _alloca(dwTokenLength);
+ PVOID pTokenInfo = _alloca(dwTokenLength);
fSuccess = GetTokenInformation( hProcessToken, TokenUser, pTokenInfo, dwTokenLength, &dwTokenLength );
CloseHandle( hProcessToken );
PSID pSid = ((PTOKEN_USER)pTokenInfo)->User.Sid;
- LPTSTR szUserIdent = NULL;
- TCHAR szSUPD[11] = TEXT("0");
+ LPTSTR szUserIdent = NULL;
+ TCHAR szSUPD[11] = TEXT("0");
fSuccess = ConvertSidToStringSid( pSid, &szUserIdent );
@@ -265,20 +265,20 @@ int WINAPI _tWinMain( HINSTANCE, HINSTANCE, LPTSTR, int )
LocalFree( szUserIdent );
- HANDLE hPipe = CreateFile(
+ HANDLE hPipe = CreateFile(
szPipeName,
- GENERIC_READ|GENERIC_WRITE,
+ GENERIC_READ|GENERIC_WRITE,
FILE_SHARE_READ | FILE_SHARE_WRITE,
NULL,
- OPEN_EXISTING,
- FILE_ATTRIBUTE_NORMAL,
+ OPEN_EXISTING,
+ FILE_ATTRIBUTE_NORMAL,
NULL);
if ( INVALID_HANDLE_VALUE != hPipe )
{
- DWORD dwBytesWritten;
- int argc = 0;
- LPWSTR *argv = CommandLineToArgvW( GetCommandLine(), &argc );
+ DWORD dwBytesWritten;
+ int argc = 0;
+ LPWSTR *argv = CommandLineToArgvW( GetCommandLine(), &argc );
fSuccess = WriteFile( hPipe, RTL_CONSTASCII_STRINGPARAM("InternalIPC::Arguments"), &dwBytesWritten, NULL );
if (fSuccess) {
@@ -300,8 +300,8 @@ int WINAPI _tWinMain( HINSTANCE, HINSTANCE, LPTSTR, int )
fSuccess = WriteFile( hPipe, "", 1, &dwBytesWritten, NULL );
if ( fSuccess )
{
- DWORD dwBytesRead = 0;
- char *pBuffer = (char *)_alloca( sizeof(PIPE_TERMINATION_SEQUENCE) );
+ DWORD dwBytesRead = 0;
+ char *pBuffer = (char *)_alloca( sizeof(PIPE_TERMINATION_SEQUENCE) );
fSuccess = ReadFile( hPipe, pBuffer, sizeof(PIPE_TERMINATION_SEQUENCE) - 1, &dwBytesRead, NULL );
if ( fSuccess )
{
@@ -353,7 +353,7 @@ int WINAPI _tWinMain( HINSTANCE, HINSTANCE, LPTSTR, int )
desktop_win32::commandLineAppend(p, MY_STRING(L"\""));
bFirst = false;
- TCHAR szParentProcessId[64]; // This is more than large enough for a 128 bit decimal value
+ TCHAR szParentProcessId[64]; // This is more than large enough for a 128 bit decimal value
BOOL bHeadlessMode( FALSE );
{
@@ -362,8 +362,8 @@ int WINAPI _tWinMain( HINSTANCE, HINSTANCE, LPTSTR, int )
// mode as self-destruction of the soffice.bin process can lead to
// certain side-effects (log-off can result in data-loss, ".lock" is not deleted.
// See 138244 for more information.
- int argc;
- LPTSTR *argv = GetCommandArgs( &argc );
+ int argc;
+ LPTSTR *argv = GetCommandArgs( &argc );
if ( argc > 1 )
{
@@ -376,12 +376,12 @@ int WINAPI _tWinMain( HINSTANCE, HINSTANCE, LPTSTR, int )
}
}
}
-
+
if ( _ltot( (long)GetCurrentProcessId(),szParentProcessId, 10 ) && bHeadlessMode )
SetEnvironmentVariable( TEXT("ATTACHED_PARENT_PROCESSID"), szParentProcessId );
- PROCESS_INFORMATION aProcessInfo;
-
+ PROCESS_INFORMATION aProcessInfo;
+
fSuccess = CreateProcess(
szTargetFileName,
lpCommandLine,
@@ -396,7 +396,7 @@ int WINAPI _tWinMain( HINSTANCE, HINSTANCE, LPTSTR, int )
if ( fSuccess )
{
- DWORD dwWaitResult;
+ DWORD dwWaitResult;
do
{
@@ -407,7 +407,7 @@ int WINAPI _tWinMain( HINSTANCE, HINSTANCE, LPTSTR, int )
if ( WAIT_OBJECT_0 + 1 == dwWaitResult )
{
- MSG msg;
+ MSG msg;
PeekMessage( &msg, NULL, 0, 0, PM_REMOVE );
}
diff --git a/desktop/win32/source/rebase/Resource.h b/desktop/win32/source/rebase/Resource.h
index a8e23f2eba1d..8c892111c995 100644
--- a/desktop/win32/source/rebase/Resource.h
+++ b/desktop/win32/source/rebase/Resource.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -29,10 +29,10 @@
#ifndef _RESOURCE_H
#define _RESOURCE_H
-#define IDS_APP_TITLE 10
-#define IDS_MSG_OPTIMIZED_FOR_CLIENT 11
-#define IDS_MSG_OPTIMIZED_FOR_SERVER 12
-#define IDS_MSG_NO_INSTALLATION_FOUND 13
+#define IDS_APP_TITLE 10
+#define IDS_MSG_OPTIMIZED_FOR_CLIENT 11
+#define IDS_MSG_OPTIMIZED_FOR_SERVER 12
+#define IDS_MSG_NO_INSTALLATION_FOUND 13
#define IDI_REBASEGUI 99
diff --git a/desktop/win32/source/rebase/rebase.cxx b/desktop/win32/source/rebase/rebase.cxx
index ba6c3937227a..e712c8d548e5 100644
--- a/desktop/win32/source/rebase/rebase.cxx
+++ b/desktop/win32/source/rebase/rebase.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -52,7 +52,7 @@
const int FORMAT_MESSAGE_SIZE = 4096;
const DWORD PE_Signature = 0x00004550;
-const DWORD BASEVIRTUALADDRESS = 0x10000000;
+const DWORD BASEVIRTUALADDRESS = 0x10000000;
namespace
{
@@ -62,7 +62,7 @@ bool IsValidHandle( HANDLE handle )
return ((NULL != handle) && (INVALID_HANDLE_VALUE != handle));
}
-void fail()
+void fail()
{
LPWSTR buf = NULL;
FormatMessageW(
@@ -79,12 +79,12 @@ bool rebaseImage( wchar_t* pszFilePath, ULONG nNewImageBase)
ULONG_PTR lpOldImageBase;
ULONG ulNewImageSize;
ULONG_PTR lpNewImageBase = nNewImageBase;
- ULONG ulDateTimeStamp = 0;
+ ULONG ulDateTimeStamp = 0;
bool bResult(false);
-
+
char cszFilePath[_MAX_PATH+1] = {0};
int nResult = WideCharToMultiByte(CP_ACP, 0, pszFilePath, -1, cszFilePath, _MAX_PATH, NULL, NULL);
-
+
if (nResult != 0)
{
BOOL bResult = ReBaseImage(
@@ -116,7 +116,7 @@ wchar_t* getBrandPath(wchar_t * path)
void rebaseImagesInFolder( wchar_t* pszFolder, DWORD nNewImageBase )
{
wchar_t szPattern[MAX_PATH];
- wchar_t *lpLastSlash = wcsrchr( pszFolder, '\\' );
+ wchar_t *lpLastSlash = wcsrchr( pszFolder, '\\' );
if ( lpLastSlash )
{
size_t len = lpLastSlash - pszFolder + 1;
@@ -124,8 +124,8 @@ void rebaseImagesInFolder( wchar_t* pszFolder, DWORD nNewImageBase )
wcsncpy( szPattern + len, TEXT("*.dll"), SAL_N_ELEMENTS(szPattern) - len );
}
- WIN32_FIND_DATA aFindFileData;
- HANDLE hFind = FindFirstFile( szPattern, &aFindFileData );
+ WIN32_FIND_DATA aFindFileData;
+ HANDLE hFind = FindFirstFile( szPattern, &aFindFileData );
if ( IsValidHandle(hFind) )
{
@@ -134,7 +134,7 @@ void rebaseImagesInFolder( wchar_t* pszFolder, DWORD nNewImageBase )
do
{
wchar_t szLibFilePath[MAX_PATH];
- wchar_t *lpLastSlash = wcsrchr( pszFolder, '\\' );
+ wchar_t *lpLastSlash = wcsrchr( pszFolder, '\\' );
if ( lpLastSlash )
{
size_t len = lpLastSlash - pszFolder + 1;
@@ -156,31 +156,31 @@ void rebaseImagesInFolder( wchar_t* pszFolder, DWORD nNewImageBase )
extern "C" int APIENTRY WinMain( HINSTANCE, HINSTANCE, LPSTR, int )
{
wchar_t path[MAX_PATH];
-
+
wchar_t * pathEnd = getBrandPath(path);
-
+
if (tools::buildPath(path, path, pathEnd, MY_STRING(L"")) == NULL)
fail();
rebaseImagesInFolder(path, BASEVIRTUALADDRESS);
-
+
if (tools::buildPath(path, path, pathEnd, MY_STRING(L"..\\basis-link")) == NULL)
fail();
pathEnd = tools::resolveLink(path);
-
+
if ( pathEnd == NULL )
return 0;
if (tools::buildPath(path, path, pathEnd, MY_STRING(L"\\program\\")) == NULL)
fail();
rebaseImagesInFolder(path, BASEVIRTUALADDRESS);
-
+
if (tools::buildPath(path, path, pathEnd, MY_STRING(L"\\ure-link")) == NULL)
fail();
pathEnd = tools::resolveLink(path);
-
+
if ( pathEnd == NULL )
return 0;
-
+
if (tools::buildPath(path, path, pathEnd, MY_STRING(L"\\bin\\")) == NULL)
fail();
rebaseImagesInFolder(path, BASEVIRTUALADDRESS);
diff --git a/desktop/win32/source/rebase/rebasegui.cxx b/desktop/win32/source/rebase/rebasegui.cxx
index 71b4f1246447..e1bb148c2b56 100644
--- a/desktop/win32/source/rebase/rebasegui.cxx
+++ b/desktop/win32/source/rebase/rebasegui.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -32,13 +32,13 @@
#define _UNICODE 1
#ifndef _WINDOWS_
-# define WIN32_LEAN_AND_MEAN
+# define WIN32_LEAN_AND_MEAN
#if defined _MSC_VER
#pragma warning(push, 1)
#endif
-# include <windows.h>
-# include <shellapi.h>
-# include <wchar.h>
+# include <windows.h>
+# include <shellapi.h>
+# include <wchar.h>
#if defined _MSC_VER
#pragma warning(pop)
#endif
@@ -51,9 +51,9 @@
const DWORD PE_Signature = 0x00004550;
-#define MY_LENGTH(s) (sizeof (s) / sizeof *(s) - 1)
-#define MY_STRING(s) (s), MY_LENGTH(s)
-#define MAX_STR_CAPTION 256
+#define MY_LENGTH(s) (sizeof (s) / sizeof *(s) - 1)
+#define MY_STRING(s) (s), MY_LENGTH(s)
+#define MAX_STR_CAPTION 256
#define MAX_TEXT_LENGTH 1024
static void failPath(wchar_t* pszAppTitle, wchar_t* pszMsg)
@@ -62,7 +62,7 @@ static void failPath(wchar_t* pszAppTitle, wchar_t* pszMsg)
TerminateProcess(GetCurrentProcess(), 255);
}
-static void fail()
+static void fail()
{
LPWSTR buf = NULL;
FormatMessageW(
@@ -77,27 +77,27 @@ static LPVOID getVirtualBaseAddress( wchar_t* pszFilePath )
{
HANDLE hFile;
HANDLE hFileMapping;
- LPVOID lpFileBase = 0;
+ LPVOID lpFileBase = 0;
PIMAGE_DOS_HEADER lpDosHeader;
PIMAGE_NT_HEADERS lpNTHeader;
- hFile = CreateFile(pszFilePath,
+ hFile = CreateFile(pszFilePath,
GENERIC_READ, FILE_SHARE_READ, NULL,
OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL,
0);
-
+
if ( hFile == INVALID_HANDLE_VALUE )
- {
+ {
return NULL;
}
-
+
hFileMapping = CreateFileMapping(hFile, NULL, PAGE_READONLY, 0, 0, NULL);
if ( hFileMapping == 0 )
- {
+ {
CloseHandle(hFile);
return NULL;
}
-
+
lpFileBase = MapViewOfFile(hFileMapping, FILE_MAP_READ, 0, 0, 0);
if ( lpFileBase == 0 )
{
@@ -108,16 +108,16 @@ static LPVOID getVirtualBaseAddress( wchar_t* pszFilePath )
lpDosHeader = (PIMAGE_DOS_HEADER)lpFileBase;
if ( lpDosHeader->e_magic == IMAGE_DOS_SIGNATURE )
- {
+ {
lpNTHeader = (PIMAGE_NT_HEADERS)((char*)lpDosHeader + lpDosHeader->e_lfanew);
if (lpNTHeader->Signature == PE_Signature )
lpFileBase = reinterpret_cast<LPVOID>( lpNTHeader->OptionalHeader.ImageBase );
}
-
+
UnmapViewOfFile(lpFileBase);
CloseHandle(hFileMapping);
CloseHandle(hFile);
-
+
return lpFileBase;
}
@@ -156,16 +156,16 @@ extern "C" int APIENTRY WinMain( HINSTANCE hInst, HINSTANCE, LPSTR, int )
wchar_t* pTextNoInstallation = new wchar_t[ MAX_TEXT_LENGTH ];
pTextNoInstallation[0] = '\0';
LoadString( hInst, IDS_MSG_NO_INSTALLATION_FOUND, pTextNoInstallation, MAX_TEXT_LENGTH );
-
+
LPVOID VBA = (void*)0x10000000;
wchar_t path[MAX_PATH];
-
+
wchar_t * pathEnd = getBrandPath(path);
-
+
if (tools::buildPath(path, path, pathEnd, MY_STRING(L"libxml2.dll")) == NULL)
fail();
bool bFast = checkImageVirtualBaseAddress(path, VBA);
-
+
if (tools::buildPath(path, path, pathEnd, MY_STRING(L"..\\basis-link")) == NULL)
fail();
pathEnd = tools::resolveLink(path);
@@ -180,10 +180,10 @@ extern "C" int APIENTRY WinMain( HINSTANCE hInst, HINSTANCE, LPSTR, int )
if (tools::buildPath(path, path, pathEnd, MY_STRING(L"\\ure-link")) == NULL)
fail();
pathEnd = tools::resolveLink(path);
-
+
if (pathEnd == NULL)
failPath(pAppTitle, pTextNoInstallation);
-
+
if (tools::buildPath(path, path, pathEnd, MY_STRING(L"\\bin\\sal3.dll")) == NULL)
fail();
bFast &= checkImageVirtualBaseAddress(path, VBA);
@@ -191,9 +191,9 @@ extern "C" int APIENTRY WinMain( HINSTANCE hInst, HINSTANCE, LPSTR, int )
const wchar_t* pOutput = pTextClient;
if (!bFast)
pOutput = pTextServer;
-
+
MessageBoxW( NULL, pOutput, pAppTitle, MB_OK );
-
+
return 0;
}
diff --git a/desktop/win32/source/rwrapa.cxx b/desktop/win32/source/rwrapa.cxx
index 080cb4e4be05..4d1f599f016b 100644
--- a/desktop/win32/source/rwrapa.cxx
+++ b/desktop/win32/source/rwrapa.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/desktop/win32/source/rwrapw.cxx b/desktop/win32/source/rwrapw.cxx
index 15abc299a341..d4912990e440 100644
--- a/desktop/win32/source/rwrapw.cxx
+++ b/desktop/win32/source/rwrapw.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/desktop/win32/source/setup/Resource.h b/desktop/win32/source/setup/Resource.h
index 600056d0a8ee..2f075004d68c 100644
--- a/desktop/win32/source/setup/Resource.h
+++ b/desktop/win32/source/setup/Resource.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -29,51 +29,51 @@
#ifndef _RESOURCE_H
#define _RESOURCE_H
-#define IDS_APP_TITLE 10
-#define IDS_APP_PROD_TITLE 11
-#define IDS_OUTOFMEM 12
-#define IDS_NOMSI 13
-#define IDS_USER_CANCELLED 14
-#define IDS_REQUIRES_ADMIN_PRIV 15
-#define IDS_FILE_NOT_FOUND 16
-#define IDS_INVALID_PARAM 17
-#define IDS_ALLOW_MSI_UPDATE 18
-#define IDS_USAGE 19
-#define IDS_ALREADY_RUNNING 20
-#define IDS_UNKNOWN_ERROR 21
-#define IDS_INVALID_PROFILE 22
-#define IDS_UNKNOWN_LANG 23
+#define IDS_APP_TITLE 10
+#define IDS_APP_PROD_TITLE 11
+#define IDS_OUTOFMEM 12
+#define IDS_NOMSI 13
+#define IDS_USER_CANCELLED 14
+#define IDS_REQUIRES_ADMIN_PRIV 15
+#define IDS_FILE_NOT_FOUND 16
+#define IDS_INVALID_PARAM 17
+#define IDS_ALLOW_MSI_UPDATE 18
+#define IDS_USAGE 19
+#define IDS_ALREADY_RUNNING 20
+#define IDS_UNKNOWN_ERROR 21
+#define IDS_INVALID_PROFILE 22
+#define IDS_UNKNOWN_LANG 23
#define IDS_SETUP_TO_OLD 24
#define IDS_SETUP_NOT_FOUND 25
-#define IDS_LANGUAGE_ENGLISH 50
-#define IDS_LANGUAGE_SPAIN 51
-#define IDS_LANGUAGE_GERMAN 52
-#define IDS_LANGUAGE_ZH_TW 53
-#define IDS_LANGUAGE_CS 54
-#define IDS_LANGUAGE_DA 55
-#define IDS_LANGUAGE_DE_DE 56
-#define IDS_LANGUAGE_EL 57
-#define IDS_LANGUAGE_EN_US 58
-#define IDS_LANGUAGE_ES 59
-#define IDS_LANGUAGE_FI 60
-#define IDS_LANGUAGE_FR_FR 61
-#define IDS_LANGUAGE_HE 62
-#define IDS_LANGUAGE_HU 63
-#define IDS_LANGUAGE_IT_IT 64
-#define IDS_LANGUAGE_JA 65
-#define IDS_LANGUAGE_KO 66
-#define IDS_LANGUAGE_NL_NL 67
-#define IDS_LANGUAGE_NO_NO 68
-#define IDS_LANGUAGE_PL 69
-#define IDS_LANGUAGE_PT_BR 70
-#define IDS_LANGUAGE_RU 71
-#define IDS_LANGUAGE_SK 72
-#define IDS_LANGUAGE_SV_SE 73
-#define IDS_LANGUAGE_TH 74
-#define IDS_LANGUAGE_TR 75
-#define IDS_LANGUAGE_ET 76
-#define IDS_LANGUAGE_ZH_CN 77
-#define IDS_LANGUAGE_PT_PT 78
+#define IDS_LANGUAGE_ENGLISH 50
+#define IDS_LANGUAGE_SPAIN 51
+#define IDS_LANGUAGE_GERMAN 52
+#define IDS_LANGUAGE_ZH_TW 53
+#define IDS_LANGUAGE_CS 54
+#define IDS_LANGUAGE_DA 55
+#define IDS_LANGUAGE_DE_DE 56
+#define IDS_LANGUAGE_EL 57
+#define IDS_LANGUAGE_EN_US 58
+#define IDS_LANGUAGE_ES 59
+#define IDS_LANGUAGE_FI 60
+#define IDS_LANGUAGE_FR_FR 61
+#define IDS_LANGUAGE_HE 62
+#define IDS_LANGUAGE_HU 63
+#define IDS_LANGUAGE_IT_IT 64
+#define IDS_LANGUAGE_JA 65
+#define IDS_LANGUAGE_KO 66
+#define IDS_LANGUAGE_NL_NL 67
+#define IDS_LANGUAGE_NO_NO 68
+#define IDS_LANGUAGE_PL 69
+#define IDS_LANGUAGE_PT_BR 70
+#define IDS_LANGUAGE_RU 71
+#define IDS_LANGUAGE_SK 72
+#define IDS_LANGUAGE_SV_SE 73
+#define IDS_LANGUAGE_TH 74
+#define IDS_LANGUAGE_TR 75
+#define IDS_LANGUAGE_ET 76
+#define IDS_LANGUAGE_ZH_CN 77
+#define IDS_LANGUAGE_PT_PT 78
#define IDI_INSTALLER 99
diff --git a/desktop/win32/source/setup/setup.cpp b/desktop/win32/source/setup/setup.cpp
index 85b457491946..69d09a47f647 100644
--- a/desktop/win32/source/setup/setup.cpp
+++ b/desktop/win32/source/setup/setup.cpp
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -174,7 +174,7 @@ SetupAppX::~SetupAppX()
tm *pTime = localtime( &aTime ); // Convert time to struct tm form
Log( TEXT( "End: %s\n\r\n\r\n" ), _tasctime( pTime ) );
-
+
if ( m_pLogFile ) fclose( m_pLogFile );
if ( m_pTmpName )
@@ -225,16 +225,16 @@ boolean SetupAppX::Initialize( HINSTANCE hInst )
m_hMapFile = CreateFileMapping(
INVALID_HANDLE_VALUE, // use paging file
- NULL, // default security
+ NULL, // default security
PAGE_READWRITE, // read/write access
- 0, // max. object size
- sizeof( int ), // buffer size
+ 0, // max. object size
+ sizeof( int ), // buffer size
sMemMapName );
if ( m_hMapFile )
{
m_pMSIErrorCode = (int*) MapViewOfFile( m_hMapFile, // handle to map object
FILE_MAP_ALL_ACCESS, // read/write permission
- 0,
+ 0,
0,
sizeof( int ) );
if ( m_pMSIErrorCode )
@@ -247,7 +247,7 @@ boolean SetupAppX::Initialize( HINSTANCE hInst )
Log( TEXT("Starting: %s\r\n"), m_pModuleFile );
Log( TEXT(" CommandLine=<%s>\r\n"), m_pCmdLine );
-
+
if ( m_bQuiet )
Log( TEXT(" Using quiet install mode\r\n") );
@@ -265,34 +265,33 @@ boolean SetupAppX::GetProfileSection( LPCTSTR pFileName, LPCTSTR pSection,
{
if ( !rSize || !*pRetBuf )
{
- rSize = 512;
+ rSize = 10000;
*pRetBuf = new TCHAR[ rSize ];
}
DWORD nRet = GetPrivateProfileSection( pSection, *pRetBuf, rSize, pFileName );
- if ( nRet && ( nRet + 2 > rSize ) ) // buffer was too small, retry with bigger one
+ while ( nRet && ( nRet + 2 >= rSize ) ) // buffer was too small, retry until big enough
{
- if ( nRet < 32767 - 2 )
- {
- delete [] (*pRetBuf);
- rSize = nRet + 2;
- *pRetBuf = new TCHAR[ rSize ];
+ if (rSize > 1000000)
+ break;
+ delete [] (*pRetBuf);
+ rSize = rSize * 2;
+ *pRetBuf = new TCHAR[ rSize ];
- nRet = GetPrivateProfileSection( pSection, *pRetBuf, rSize, pFileName );
- }
+ nRet = GetPrivateProfileSection( pSection, *pRetBuf, rSize, pFileName );
}
if ( !nRet )
{
SetError( WIN::GetLastError() );
-
+
TCHAR sBuf[80];
StringCchPrintf( sBuf, 80, TEXT("ERROR: GetPrivateProfileSection(): GetLastError returned %u\r\n"), GetError() );
Log( sBuf );
return false;
}
- else if ( nRet + 2 > rSize )
+ else if ( nRet + 2 >= rSize )
{
SetError( ERROR_OUTOFMEMORY );
Log( TEXT( "ERROR: GetPrivateProfileSection() out of memory\r\n" ) );
@@ -343,7 +342,7 @@ boolean SetupAppX::ReadProfile()
LPTSTR pValue = 0;
pCurLine += GetNameValue( pCurLine, &pName, &pValue );
-
+
if ( lstrcmpi( TEXT( "database" ), pName ) == 0 )
{
m_pDatabase = pValue;
@@ -409,7 +408,7 @@ boolean SetupAppX::ReadProfile()
pCurLine += nNext;
delete [] pValue;
}
-
+
m_ppLanguageList = new LanguageDataX*[ m_nLanguageCount ];
for ( int i=0; i < m_nLanguageCount; i++ )
@@ -419,7 +418,7 @@ boolean SetupAppX::ReadProfile()
m_nLanguageCount = i;
break;
}
-
+
pCurLine += GetNameValue( pCurLine, &pName, &pValue );
m_ppLanguageList[ i ] = new LanguageDataX( pValue );
Log( TEXT( " Language = %s\r\n" ), pValue );
@@ -430,7 +429,7 @@ boolean SetupAppX::ReadProfile()
delete [] pValue;
}
}
-
+
if ( pRetBuf )
delete [] pRetBuf;
}
@@ -478,16 +477,16 @@ boolean SetupAppX::GetPatches()
*pFilePart = '\0';
StringCchCopy( pBaseDir, nPatternLen, pPattern );
StringCchCat( pPattern, nPatternLen, TEXT("*.msp") );
-
+
WIN32_FIND_DATA aFindFileData;
-
+
HANDLE hFindPatches = FindFirstFile( pPattern, &aFindFileData );
-
+
if ( hFindPatches != INVALID_HANDLE_VALUE )
{
if ( ! IsPatchInstalled( pBaseDir, aFindFileData.cFileName ) )
AddFileToPatchList( pBaseDir, aFindFileData.cFileName );
-
+
while ( FindNextFile( hFindPatches, &aFindFileData ) )
{
if ( ! IsPatchInstalled( pBaseDir, aFindFileData.cFileName ) )
@@ -503,7 +502,7 @@ boolean SetupAppX::GetPatches()
delete [] pPattern;
delete [] pBaseDir;
-
+
return bRet;
}
@@ -537,17 +536,17 @@ boolean SetupAppX::GetPathToFile( TCHAR* pFileName, TCHAR** pPath )
// normalize the path
int nReturn = GetFullPathName( pTempPath, nPath, *pPath, &pFilePart );
-
+
if ( nReturn > nPath )
{
// try again, with larger buffer
delete [] (*pPath);
nPath = nReturn;
*pPath = new TCHAR[ nPath ];
-
+
nReturn = GetFullPathName( pTempPath, nPath, *pPath, &pFilePart );
}
-
+
if ( 0 == nReturn )
{
// error -- invalid path
@@ -583,11 +582,11 @@ int SetupAppX::GetNameValue( TCHAR* pLine, TCHAR** pName, TCHAR** pValue )
LPTSTR pChar = pLine;
LPTSTR pLast = NULL;
-
+
// Skip leading spaces.
while (' ' == *pChar || '\t' == *pChar)
pChar = CharNext( pChar );
-
+
*pName = pChar;
// look for the end of the name
@@ -623,7 +622,7 @@ boolean SetupAppX::ChooseLanguage( long& rLanguage )
if ( m_bQuiet )
return true;
-
+
// When there are none or only one language, there is nothing
// to do here
if ( m_nLanguageCount > 1 )
@@ -632,7 +631,7 @@ boolean SetupAppX::ChooseLanguage( long& rLanguage )
LANGID nUserDefLang = GetUserDefaultLangID();
LANGID nSysDefLang = GetSystemDefaultLangID();
-
+
int nUserPrimary = PRIMARYLANGID( nUserDefLang );
int nSysPrimary = PRIMARYLANGID( nSysDefLang );
@@ -707,7 +706,7 @@ HMODULE SetupAppX::LoadMsiLibrary()
{
HMODULE hMsi = NULL;
HKEY hInstKey = NULL;
-
+
// find registered location of Msi.dll
if ( ERROR_SUCCESS == RegOpenKeyEx( HKEY_LOCAL_MACHINE, sInstKey, 0, KEY_READ, &hInstKey ) )
{
@@ -740,7 +739,7 @@ HMODULE SetupAppX::LoadMsiLibrary()
}
}
}
-
+
if ( !hMsi ) // use the default location
{
hMsi = LoadLibrary( sMsiDll );
@@ -756,7 +755,7 @@ LPCTSTR SetupAppX::GetPathToMSI()
HKEY hInstKey = NULL;
TCHAR *sMsiFolder = new TCHAR[ MAX_PATH + 1 ];
DWORD nMsiFolderSize = MAX_PATH + 1;
-
+
sMsiFolder[0] = '\0';
// find registered location of Msi.dll
@@ -779,7 +778,7 @@ LPCTSTR SetupAppX::GetPathToMSI()
if ( ERROR_SUCCESS != nRet || dwType != REG_SZ || nMsiFolderSize == 0 )
sMsiFolder[0] = '\0';
}
-
+
if ( sMsiFolder[0] == '\0' ) // use the default location
{
Log( TEXT( " Could not find path to msiexec.exe in registry" ) );
@@ -824,14 +823,14 @@ LPCTSTR SetupAppX::GetPathToMSI()
boolean SetupAppX::LaunchInstaller( LPCTSTR pParam )
{
LPCTSTR sMsiPath = GetPathToMSI();
-
+
if ( !sMsiPath )
{
Log( TEXT( "ERROR: msiexec not found!" ) );
SetError( ERROR_FILE_NOT_FOUND );
return false;
}
-
+
STARTUPINFO aSUI;
PROCESS_INFORMATION aPI;
@@ -949,9 +948,9 @@ boolean SetupAppX::Install( long nLanguage )
nParLen += lstrlen( PARAM_MINOR_UPGRADE );
else
nParLen += lstrlen( PARAM_PACKAGE );
-
+
nParLen += lstrlen( pDataBasePath ) + 3; // two quotes, one null
-
+
if ( NeedReboot() )
nParLen += lstrlen( PARAM_REBOOT );
@@ -1055,7 +1054,7 @@ void SetupAppX::DisplayError( UINT nErr ) const
break;
case ERROR_OUTOFMEMORY: WIN::LoadString( m_hInst, IDS_OUTOFMEM, sError, MAX_TEXT_LENGTH );
break;
- case ERROR_INSTALL_USEREXIT:
+ case ERROR_INSTALL_USEREXIT:
WIN::LoadString( m_hInst, IDS_USER_CANCELLED, sError, MAX_TEXT_LENGTH );
break;
case ERROR_INSTALL_ALREADY_RUNNING: // 1618
@@ -1170,11 +1169,11 @@ boolean SetupAppX::CheckVersion()
else
{
PFnDllGetVersion pDllGetVersion = (PFnDllGetVersion) GetProcAddress( hMsi, MSIAPI_DllGetVersion );
-
+
if ( pDllGetVersion )
{
DLLVERSIONINFO aInfo;
-
+
aInfo.cbSize = sizeof( DLLVERSIONINFO );
if ( NOERROR == pDllGetVersion( &aInfo ) )
{
@@ -1200,7 +1199,7 @@ boolean SetupAppX::CheckVersion()
Log( TEXT("Warning: Patching not supported! MSI-Version <%s>\r\n"), pMsiVersion );
}
}
-
+
FreeLibrary( hMsi );
}
@@ -1460,16 +1459,16 @@ DWORD SetupAppX::GetNextArgument( LPCTSTR pStr, LPTSTR *pArg, LPTSTR *pNext,
nCount += 1;
}
}
-
+
if ( pArg )
{
*pArg = new TCHAR[ nCount ];
StringCchCopyN ( *pArg, nCount, pFirst, nCount-1 );
}
-
+
if ( pNext )
*pNext = CharNext( pChar );
-
+
return ERROR_SUCCESS;
}
@@ -1559,7 +1558,7 @@ boolean SetupAppX::GetCmdLineParameters( LPTSTR *pCmdLine )
m_pLogFile = _tfopen( pFileName, TEXT( "ab" ) );
else
m_pLogFile = _tfopen( pFileName, TEXT( "wb" ) );
-
+
delete [] pFileName;
}
}
@@ -1653,7 +1652,7 @@ boolean SetupAppX::IsAdmin()
{
PSID aPsidAdmin;
SID_IDENTIFIER_AUTHORITY aAuthority = SECURITY_NT_AUTHORITY;
-
+
if ( !AllocateAndInitializeSid( &aAuthority, 2, SECURITY_BUILTIN_DOMAIN_RID,
DOMAIN_ALIAS_RID_ADMINS, 0, 0, 0, 0, 0, 0,
&aPsidAdmin ) )
@@ -1661,10 +1660,10 @@ boolean SetupAppX::IsAdmin()
BOOL bIsAdmin = FALSE;
- if ( GetOSVersion() >= 5 )
+ if ( GetOSVersion() >= 5 )
{
HMODULE hAdvapi32 = LoadLibrary( ADVAPI32_DLL );
-
+
if ( !hAdvapi32 )
bIsAdmin = FALSE;
else
@@ -1702,7 +1701,7 @@ boolean SetupAppX::IsAdmin()
}
WIN::CloseHandle( hAccessToken );
-
+
if ( bSuccess )
{
PTOKEN_GROUPS pGroups = (PTOKEN_GROUPS)(UCHAR*) szInfoBuffer;
@@ -1715,11 +1714,11 @@ boolean SetupAppX::IsAdmin()
}
}
}
-
+
delete [] szInfoBuffer;
}
}
-
+
WIN::FreeSid( aPsidAdmin );
return bIsAdmin ? true : false;
@@ -1735,7 +1734,7 @@ LPTSTR SetupAppX::CopyIniFile( LPCTSTR pIniFile )
Log( TEXT( "ERROR: Could not create temp file\n" ) );
return NULL;
}
-
+
FILE *pOut = _tfopen( m_pTmpName, TEXT( "wb" ) );
FILE *pIn = _tfopen( pIniFile, TEXT( "rb" ) );
@@ -1759,7 +1758,7 @@ LPTSTR SetupAppX::CopyIniFile( LPCTSTR pIniFile )
if ( pOut ) fclose( pOut );
if ( pIn ) fclose( pIn );
-
+
return m_pTmpName;
}
@@ -1767,7 +1766,7 @@ LPTSTR SetupAppX::CopyIniFile( LPCTSTR pIniFile )
void SetupAppX::ConvertNewline( LPTSTR pText ) const
{
int i=0;
-
+
while ( pText[i] != 0 )
{
if ( ( pText[i] == '\\' ) && ( pText[i+1] == 'n' ) )
@@ -1788,7 +1787,7 @@ LPTSTR SetupAppX::SetProdToAppTitle( LPCTSTR pProdName )
LPTSTR pAppProdTitle = new TCHAR[ MAX_STR_CAPTION ];
pAppProdTitle[0] = '\0';
-
+
WIN::LoadString( m_hInst, IDS_APP_PROD_TITLE, pAppProdTitle, MAX_STR_CAPTION );
int nAppLen = lstrlen( pAppProdTitle );
diff --git a/desktop/win32/source/setup/setup.hxx b/desktop/win32/source/setup/setup.hxx
index 6eccda100699..c3bb71cb3fc6 100644
--- a/desktop/win32/source/setup/setup.hxx
+++ b/desktop/win32/source/setup/setup.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -140,7 +140,7 @@ public:
virtual UINT GetError() const;
virtual void DisplayError( UINT nErr ) const;
-
+
void Log( LPCTSTR pMessage, LPCTSTR pText = NULL ) const;
long GetLanguageCount() const { return m_nLanguageCount; }
diff --git a/desktop/win32/source/setup/setup_a.cxx b/desktop/win32/source/setup/setup_a.cxx
index a680673e1729..b3cb31bea40a 100644
--- a/desktop/win32/source/setup/setup_a.cxx
+++ b/desktop/win32/source/setup/setup_a.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/desktop/win32/source/setup/setup_help.hxx b/desktop/win32/source/setup/setup_help.hxx
index 1330fa70f191..f37daa5be37e 100644
--- a/desktop/win32/source/setup/setup_help.hxx
+++ b/desktop/win32/source/setup/setup_help.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/desktop/win32/source/setup/setup_main.cxx b/desktop/win32/source/setup/setup_main.cxx
index 5bfc8b6d155b..effd3de52ed8 100644
--- a/desktop/win32/source/setup/setup_main.cxx
+++ b/desktop/win32/source/setup/setup_main.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/desktop/win32/source/setup/setup_main.hxx b/desktop/win32/source/setup/setup_main.hxx
index dfcb201e3cd3..f966e6ae0348 100644
--- a/desktop/win32/source/setup/setup_main.hxx
+++ b/desktop/win32/source/setup/setup_main.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/desktop/win32/source/setup/setup_w.cxx b/desktop/win32/source/setup/setup_w.cxx
index 9de15b2e535d..d123eeb350e6 100644
--- a/desktop/win32/source/setup/setup_w.cxx
+++ b/desktop/win32/source/setup/setup_w.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/desktop/win32/source/sowrapper.cxx b/desktop/win32/source/sowrapper.cxx
index f62536a86525..b7020f09c595 100644
--- a/desktop/win32/source/sowrapper.cxx
+++ b/desktop/win32/source/sowrapper.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/desktop/win32/source/unoinfo.cxx b/desktop/win32/source/unoinfo.cxx
index 0ce5c98b7215..6ec5727a3603 100644
--- a/desktop/win32/source/unoinfo.cxx
+++ b/desktop/win32/source/unoinfo.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/desktop/win32/source/wrapper.h b/desktop/win32/source/wrapper.h
index f0ff5b617f99..6ccf063b36a5 100644
--- a/desktop/win32/source/wrapper.h
+++ b/desktop/win32/source/wrapper.h
@@ -10,7 +10,7 @@
#if defined _MSC_VER
#pragma warning(push, 1)
#endif
-# include <windows.h>
+# include <windows.h>
#if defined _MSC_VER
#pragma warning(pop)
#endif
@@ -18,38 +18,38 @@
#ifndef _INC_TCHAR
-# ifdef UNICODE
-# define _UNICODE
-# endif
-# include <tchar.h>
+# ifdef UNICODE
+# define _UNICODE
+# endif
+# include <tchar.h>
#endif
#ifdef UNICODE
-# define Main MainW
-# define GetArgv( pArgc ) CommandLineToArgvW( GetCommandLine(), pArgc )
-# define PROCESS_CREATIONFLAGS CREATE_UNICODE_ENVIRONMENT
+# define Main MainW
+# define GetArgv( pArgc ) CommandLineToArgvW( GetCommandLine(), pArgc )
+# define PROCESS_CREATIONFLAGS CREATE_UNICODE_ENVIRONMENT
#else
-# define GetArgv( pArgc ) (*pArgc = __argc, __argv)
-# define PROCESS_CREATIONFLAGS 0
-# define Main MainA
+# define GetArgv( pArgc ) (*pArgc = __argc, __argv)
+# define PROCESS_CREATIONFLAGS 0
+# define Main MainA
#endif
-#define BIN_EXT_STR TEXT(".bin")
-#define PARAM_LIBPATH_STR TEXT("-libpath=")
-#define PARAM_LOCAL_STR TEXT("-local")
-#define PARAM_REMOTE_STR TEXT("-remote")
+#define BIN_EXT_STR TEXT(".bin")
+#define PARAM_LIBPATH_STR TEXT("-libpath=")
+#define PARAM_LOCAL_STR TEXT("-local")
+#define PARAM_REMOTE_STR TEXT("-remote")
#if defined( REMOTE )
-#define DEFAULT_LIBPATH TEXT("remote;")
+#define DEFAULT_LIBPATH TEXT("remote;")
#elif defined( LOCAL )
-#define DEFAULT_LIBPATH TEXT("local;")
+#define DEFAULT_LIBPATH TEXT("local;")
#endif
extern "C" int Main()
{
// Retreive startup info
- STARTUPINFO aStartupInfo;
+ STARTUPINFO aStartupInfo;
ZeroMemory( &aStartupInfo, sizeof(aStartupInfo) );
aStartupInfo.cb = sizeof( aStartupInfo );
@@ -57,21 +57,21 @@ extern "C" int Main()
// Retrieve command line
- LPTSTR lpCommandLine = GetCommandLine();
+ LPTSTR lpCommandLine = GetCommandLine();
- LPTSTR *ppArguments = NULL;
- int nArguments = 0;
+ LPTSTR *ppArguments = NULL;
+ int nArguments = 0;
ppArguments = GetArgv( &nArguments );
// Calculate application name
- TCHAR szApplicationName[MAX_PATH];
- TCHAR szDrive[MAX_PATH];
- TCHAR szDir[MAX_PATH];
- TCHAR szFileName[MAX_PATH];
- TCHAR szExt[MAX_PATH];
+ TCHAR szApplicationName[MAX_PATH];
+ TCHAR szDrive[MAX_PATH];
+ TCHAR szDir[MAX_PATH];
+ TCHAR szFileName[MAX_PATH];
+ TCHAR szExt[MAX_PATH];
GetModuleFileName( NULL, szApplicationName, MAX_PATH );
_tsplitpath( szApplicationName, szDrive, szDir, szFileName, szExt );
@@ -79,8 +79,8 @@ extern "C" int Main()
// Retreive actual environment
- TCHAR szBuffer[1024];
- TCHAR szPathValue[1024] = TEXT("");
+ TCHAR szBuffer[1024];
+ TCHAR szPathValue[1024] = TEXT("");
#ifdef DEFAULT_LIBPATH
_tmakepath( szPathValue, szDrive, szDir, DEFAULT_LIBPATH, TEXT("") );
@@ -100,7 +100,7 @@ extern "C" int Main()
}
else if ( 0 == _tcsncmp( ppArguments[argn], PARAM_LIBPATH_STR, _tcslen(PARAM_LIBPATH_STR) ) )
{
- LPTSTR pFileSpec = NULL;
+ LPTSTR pFileSpec = NULL;
GetFullPathName( ppArguments[argn] + _tcslen(PARAM_LIBPATH_STR), sizeof(szPathValue) / sizeof(TCHAR), szPathValue, &pFileSpec );
_tcscat( szPathValue, TEXT(";") );
@@ -112,21 +112,21 @@ extern "C" int Main()
_tcscat( szPathValue, szBuffer );
SetEnvironmentVariable( TEXT("PATH"), szPathValue);
- LPVOID lpEnvironment = GetEnvironmentStrings();
-
+ LPVOID lpEnvironment = GetEnvironmentStrings();
+
// Retrieve current directory
- TCHAR szCurrentDirectory[MAX_PATH];
+ TCHAR szCurrentDirectory[MAX_PATH];
GetCurrentDirectory( MAX_PATH, szCurrentDirectory );
// Set the Flags
- DWORD dwCreationFlags = PROCESS_CREATIONFLAGS;
+ DWORD dwCreationFlags = PROCESS_CREATIONFLAGS;
- PROCESS_INFORMATION aProcessInfo;
+ PROCESS_INFORMATION aProcessInfo;
- BOOL fSuccess = CreateProcess(
+ BOOL fSuccess = CreateProcess(
szApplicationName,
lpCommandLine,
NULL,
@@ -140,7 +140,7 @@ extern "C" int Main()
if ( fSuccess )
{
- DWORD dwExitCode;
+ DWORD dwExitCode;
WaitForSingleObject( aProcessInfo.hProcess, INFINITE );
fSuccess = GetExitCodeProcess( aProcessInfo.hProcess, &dwExitCode );
@@ -148,12 +148,12 @@ extern "C" int Main()
return dwExitCode;
}
- DWORD dwError = GetLastError();
+ DWORD dwError = GetLastError();
LPVOID lpMsgBuf;
- FormatMessage(
- FORMAT_MESSAGE_ALLOCATE_BUFFER |
+ FormatMessage(
+ FORMAT_MESSAGE_ALLOCATE_BUFFER |
FORMAT_MESSAGE_FROM_SYSTEM,
NULL,
dwError,
diff --git a/desktop/win32/source/wrappera.cxx b/desktop/win32/source/wrappera.cxx
index 0a74b1030a3a..c9a21299229d 100644
--- a/desktop/win32/source/wrappera.cxx
+++ b/desktop/win32/source/wrappera.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/desktop/win32/source/wrapperw.cxx b/desktop/win32/source/wrapperw.cxx
index d76ca9b678ad..e6927ab82074 100644
--- a/desktop/win32/source/wrapperw.cxx
+++ b/desktop/win32/source/wrapperw.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite