summaryrefslogtreecommitdiff
path: root/desktop/win32
diff options
context:
space:
mode:
authorMikhail Voytenko <mav@openoffice.org>2010-05-19 11:00:36 +0200
committerMikhail Voytenko <mav@openoffice.org>2010-05-19 11:00:36 +0200
commitf2b398a55c63073e415e1a1cbe975aeb1bb5b5e1 (patch)
tree0ebb8e01bd19c6b065069debb3c047c94814295e /desktop/win32
parentd512aad0cd92fc8f74e7d988c5c344d8e68463ad (diff)
jl152: #i108704# use all the arguments when restarting on Windows
Diffstat (limited to 'desktop/win32')
-rw-r--r--desktop/win32/source/officeloader/officeloader.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/desktop/win32/source/officeloader/officeloader.cxx b/desktop/win32/source/officeloader/officeloader.cxx
index 94c469f262..a1a352ecb9 100644
--- a/desktop/win32/source/officeloader/officeloader.cxx
+++ b/desktop/win32/source/officeloader/officeloader.cxx
@@ -212,7 +212,7 @@ int WINAPI _tWinMain( HINSTANCE, HINSTANCE, LPTSTR, int )
LPTSTR lpCommandLine = NULL;
int argc = 0;
LPTSTR * argv = NULL;
- bool first = true;
+ bool bFirst = true;
WCHAR cwd[MAX_PATH];
DWORD cwdLen = GetCurrentDirectoryW(MAX_PATH, cwd);
if (cwdLen >= MAX_PATH) {
@@ -318,7 +318,7 @@ int WINAPI _tWinMain( HINSTANCE, HINSTANCE, LPTSTR, int )
}
}
- if (first) {
+ if ( bFirst ) {
argv = GetCommandArgs(&argc);
std::size_t n = wcslen(argv[0]) + 2;
for (int i = 1; i < argc; ++i) {
@@ -334,7 +334,7 @@ int WINAPI _tWinMain( HINSTANCE, HINSTANCE, LPTSTR, int )
lpCommandLine, MY_STRING(L"\""));
p = desktop_win32::commandLineAppend(p, argv[0]);
for (int i = 1; i < argc; ++i) {
- if (first || wcsncmp(argv[i], MY_STRING(L"-env:")) == 0) {
+ if (bFirst || ::desktop::ExitHelper::E_NORMAL_RESTART == dwExitCode || wcsncmp(argv[i], MY_STRING(L"-env:")) == 0) {
p = desktop_win32::commandLineAppend(p, MY_STRING(L"\" \""));
p = desktop_win32::commandLineAppend(p, argv[i]);
}
@@ -348,7 +348,7 @@ int WINAPI _tWinMain( HINSTANCE, HINSTANCE, LPTSTR, int )
p = desktop_win32::commandLineAppendEncoded(p, cwd);
}
desktop_win32::commandLineAppend(p, MY_STRING(L"\""));
- first = false;
+ bFirst = false;
TCHAR szParentProcessId[64]; // This is more than large enough for a 128 bit decimal value
BOOL bHeadlessMode( FALSE );