From fc05fb607569bf4eff1b37c7eba1fc4369702744 Mon Sep 17 00:00:00 2001 From: Mikhail Voytenko Date: Wed, 19 May 2010 11:00:36 +0200 Subject: jl152: #i108704# use all the arguments when restarting on Windows --- desktop/win32/source/officeloader/officeloader.cxx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'desktop/win32') 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 ); -- cgit v1.2.3