diff options
author | Mikhail Voytenko <mav@openoffice.org> | 2010-05-19 11:00:36 +0200 |
---|---|---|
committer | Mikhail Voytenko <mav@openoffice.org> | 2010-05-19 11:00:36 +0200 |
commit | fc05fb607569bf4eff1b37c7eba1fc4369702744 (patch) | |
tree | 54b0cc912e88c85e5c5344c77480f99a2fb80022 /desktop/win32 | |
parent | e6d9970ba08599dfaf13998b9cc0908554f00176 (diff) |
jl152: #i108704# use all the arguments when restarting on Windows
Diffstat (limited to 'desktop/win32')
-rw-r--r-- | desktop/win32/source/officeloader/officeloader.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/desktop/win32/source/officeloader/officeloader.cxx b/desktop/win32/source/officeloader/officeloader.cxx index ef980e1e994e..7c2dafc79bbb 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 ); |