[Libreoffice-commits] core.git: desktop/win32
desktop/win32/source/loader.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 919d2e63ac628440726f8bfc671536ec7febafed Author: Stephan Bergmann AuthorDate: Mon Apr 12 09:51:36 2021 +0200 Commit: Stephan Bergmann CommitDate: Mon Apr 12 11:23:46 2021 +0200 Fix previous typo-in-comment fix ...10c02f69106a248f3c0514b36ec95895ce98d8d7 "we where -> we were" Change-Id: Icc82890293d56aa3a17b0f5867382873521465f7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113968 Reviewed-by: Noel Grandin Reviewed-by: Stephan Bergmann Tested-by: Jenkins diff --git a/desktop/win32/source/loader.cxx b/desktop/win32/source/loader.cxx index b0e3c2a691e4..d30f0ef90896 100644 --- a/desktop/win32/source/loader.cxx +++ b/desktop/win32/source/loader.cxx @@ -346,7 +346,7 @@ int officeloader_impl(bool bAllowConsole) do { // On Windows XP it seems as the desktop calls WaitForInputIdle after "OpenWith" so -// we have to do so as if we here processing any messages +// we have to do so as if we were processing any messages dwWaitResult = MsgWaitForMultipleObjects(1, , FALSE, INFINITE, QS_ALLEVENTS); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: desktop/win32
desktop/win32/source/loader.cxx |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) New commits: commit 10c02f69106a248f3c0514b36ec95895ce98d8d7 Author: Noel Grandin AuthorDate: Sun Apr 11 10:51:54 2021 +0200 Commit: Noel Grandin CommitDate: Sun Apr 11 17:08:54 2021 +0200 we where -> we were Change-Id: I993442061ac59e1ecd86b7d97a3e52c561987878 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113942 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/desktop/win32/source/loader.cxx b/desktop/win32/source/loader.cxx index 82b323d7c772..b0e3c2a691e4 100644 --- a/desktop/win32/source/loader.cxx +++ b/desktop/win32/source/loader.cxx @@ -346,7 +346,7 @@ int officeloader_impl(bool bAllowConsole) do { // On Windows XP it seems as the desktop calls WaitForInputIdle after "OpenWith" so -// we have to do so as if we where processing any messages +// we have to do so as if we here processing any messages dwWaitResult = MsgWaitForMultipleObjects(1, , FALSE, INFINITE, QS_ALLEVENTS); @@ -453,7 +453,7 @@ int unopkgloader_impl(bool bAllowConsole) do { // On Windows XP it seems as the desktop calls WaitForInputIdle after "OpenWidth" so we have to do so -// as if we where processing any messages +// as if we were processing any messages dwWaitResult = MsgWaitForMultipleObjects(1, , FALSE, INFINITE, QS_ALLEVENTS); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: desktop/win32
desktop/win32/source/loader.cxx | 54 +--- 1 file changed, 51 insertions(+), 3 deletions(-) New commits: commit 7f477f8dd85c84c9c1a9e673b685dc0e03d1d45a Author: Deb Barkley-Yeung AuthorDate: Sun Nov 22 21:57:23 2020 -0800 Commit: Mike Kaganski CommitDate: Mon Nov 30 10:35:37 2020 +0100 tdf#48413 handle wildcards on Windows Since Windows doesn't handle wildcards on the command line, handle wildcards manually. Change-Id: I8c61ad77184827237edb3722183bf4a0b9a480a7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106393 Tested-by: Jenkins Reviewed-by: Mike Kaganski diff --git a/desktop/win32/source/loader.cxx b/desktop/win32/source/loader.cxx index 3adf34aa3043..82b323d7c772 100644 --- a/desktop/win32/source/loader.cxx +++ b/desktop/win32/source/loader.cxx @@ -77,6 +77,25 @@ std::wstring EscapeArg(LPCWSTR sArg) return sResult; } +void AddEscapedArg(LPCWSTR sArg, std::vector& aEscapedArgs, + std::size_t& iLengthAccumulator) +{ +std::wstring sEscapedArg = EscapeArg(sArg); +aEscapedArgs.push_back(sEscapedArg); +iLengthAccumulator += sEscapedArg.length() + 1; // a space between args +} + +bool HasWildCard(LPCWSTR sArg) +{ +while (*sArg != L'\0') +{ +if (*sArg == L'*' || *sArg == L'?') +return true; +sArg++; +} +return false; +} + } namespace desktop_win32 { @@ -214,9 +233,38 @@ int officeloader_impl(bool bAllowConsole) std::size_t n = 0; for (int i = 0; i < argc; ++i) { -std::wstring sEscapedArg = EscapeArg(argv[i]); -aEscapedArgs.push_back(sEscapedArg); -n += sEscapedArg.length() + 1; // a space between args +// check for wildCards in arguments- windows does not expand automatically +if (HasWildCard(argv[i])) +{ +WIN32_FIND_DATAW aFindData; +HANDLE h = FindFirstFileW(argv[i], ); +if (h == INVALID_HANDLE_VALUE) +{ +AddEscapedArg(argv[i], aEscapedArgs, n); +} +else +{ +const int nPathSize = 32 * 1024; +wchar_t drive[nPathSize]; +wchar_t dir[nPathSize]; +wchar_t path[nPathSize]; +_wsplitpath_s(argv[i], drive, nPathSize, dir, nPathSize, nullptr, 0, + nullptr, 0); +_wmakepath_s(path, nPathSize, drive, dir, aFindData.cFileName, nullptr); +AddEscapedArg(path, aEscapedArgs, n); + +while (FindNextFileW(h, )) +{ +_wmakepath_s(path, nPathSize, drive, dir, aFindData.cFileName, nullptr); +AddEscapedArg(path, aEscapedArgs, n); +} +FindClose(h); +} +} +else +{ +AddEscapedArg(argv[i], aEscapedArgs, n); +} } LocalFree(argv); n += MY_LENGTH(L" \"-env:OOO_CWD=2") + 4 * cwdLen + MY_LENGTH(L"\"") + 1; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: desktop/win32
desktop/win32/source/loader.cxx |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) New commits: commit 30c6ff74b5a6068ffb9479761edbd8224e83211a Author: Thorsten Behrens AuthorDate: Tue Sep 17 13:56:38 2019 +0200 Commit: Thorsten Behrens CommitDate: Tue Sep 17 16:54:43 2019 +0200 WIN make sure bootstrap.ini is openend read-only As fstream opens read-write by default, and obviously usually program dir content is not modifiable.. Change-Id: I16ade5a87e50c2e94d3f4df3f59fc298b40ceb7f Reviewed-on: https://gerrit.libreoffice.org/79061 Reviewed-by: Thorsten Behrens Tested-by: Thorsten Behrens diff --git a/desktop/win32/source/loader.cxx b/desktop/win32/source/loader.cxx index 8b750f45df6c..6eab8ddaf24a 100644 --- a/desktop/win32/source/loader.cxx +++ b/desktop/win32/source/loader.cxx @@ -26,6 +26,7 @@ #include #include +#include #include #include @@ -178,7 +179,7 @@ int officeloader_impl(bool bAllowConsole) try { boost::property_tree::ptree pt; -std::fstream aFile(szBootstrapIni); +std::ifstream aFile(szBootstrapIni); boost::property_tree::ini_parser::read_ini(aFile, pt); nMaxMemoryInMB = pt.get("Win32.LimitMaximumMemoryInMB", nMaxMemoryInMB); bExcludeChildProcesses = pt.get("Win32.ExcludeChildProcessesFromLimit", bExcludeChildProcesses); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: desktop/win32
desktop/win32/source/loader.cxx | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) New commits: commit 9d79fb32b76762394f68f80c1cd3dec8864f4d17 Author: Stephan Bergmann AuthorDate: Wed Jan 30 14:30:10 2019 +0100 Commit: Stephan Bergmann CommitDate: Wed Jan 30 16:25:51 2019 +0100 -Werror,-Wlogical-op-parentheses (clang-cl) Change-Id: Ia505271b395588647a2e0b3db449000d110cb395 Reviewed-on: https://gerrit.libreoffice.org/67139 Tested-by: Jenkins Reviewed-by: Stephan Bergmann diff --git a/desktop/win32/source/loader.cxx b/desktop/win32/source/loader.cxx index 3960dd2c6f1c..d86a3b692ba4 100644 --- a/desktop/win32/source/loader.cxx +++ b/desktop/win32/source/loader.cxx @@ -89,12 +89,12 @@ void extendLoaderEnvironment(WCHAR * binPath, WCHAR * iniDirectory) { *nameEnd++ = *p; } if (!(nameEnd - name >= 4 && nameEnd[-4] == L'.' && - ((nameEnd[-3] == L'E' || nameEnd[-3] == L'e') && - (nameEnd[-2] == L'X' || nameEnd[-2] == L'x') && - (nameEnd[-1] == L'E' || nameEnd[-1] == L'e') || - (nameEnd[-3] == L'C' || nameEnd[-3] == L'c') && - (nameEnd[-2] == L'O' || nameEnd[-2] == L'o') && - (nameEnd[-1] == L'M' || nameEnd[-1] == L'm' + (((nameEnd[-3] == L'E' || nameEnd[-3] == L'e') && + (nameEnd[-2] == L'X' || nameEnd[-2] == L'x') && + (nameEnd[-1] == L'E' || nameEnd[-1] == L'e')) || + ((nameEnd[-3] == L'C' || nameEnd[-3] == L'c') && + (nameEnd[-2] == L'O' || nameEnd[-2] == L'o') && + (nameEnd[-1] == L'M' || nameEnd[-1] == L'm') { *nameEnd = L'.'; nameEnd += 4; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: desktop/win32
desktop/win32/source/QuickStart/QuickStart.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit a41d7ee25ea5057cd887c67d33d42f4c764f9c77 Author: brinzing AuthorDate: Sat Oct 27 17:32:38 2018 +0200 Commit: Mike Kaganski CommitDate: Sat Oct 27 20:36:16 2018 +0200 possible fix for issue 120928 - quickstart --killtray throws exception Change-Id: Id4081439075f4beecc2b0e4aed035d5ee28a2cfd Reviewed-on: https://gerrit.libreoffice.org/62429 Reviewed-by: Mike Kaganski Tested-by: Jenkins diff --git a/desktop/win32/source/QuickStart/QuickStart.cxx b/desktop/win32/source/QuickStart/QuickStart.cxx index 1f5f912a88e3..0db45b41a125 100644 --- a/desktop/win32/source/QuickStart/QuickStart.cxx +++ b/desktop/win32/source/QuickStart/QuickStart.cxx @@ -83,7 +83,7 @@ int APIENTRY wWinMain(HINSTANCE /*hInstance*/, for ( int i = 1; i < __argc; i++ ) { -if ( 0 == strcmp( __argv[i], "--killtray" ) ) +if ( 0 == wcscmp( __wargv[i], L"--killtray" ) ) { HWND hwndTray = FindWindowW( QUICKSTART_CLASSNAME, nullptr ); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: desktop/win32
desktop/win32/source/officeloader/officeloader.cxx | 78 ++--- 1 file changed, 55 insertions(+), 23 deletions(-) New commits: commit 0b92d04ab61b4d39d714df6210d6f6bf8fdec5bf Author: Mike Kaganski AuthorDate: Tue Oct 2 15:55:05 2018 +0300 Commit: Mike Kaganski CommitDate: Mon Oct 22 10:22:46 2018 +0200 tdf#120249: fix escaping to handle quotes and multiple trailing backslshes Follow-up of commit f4103a42d58535e21c48ff94ab000ab0305c62e3 Change-Id: I4562386d3151875dff8e9eddf31c4afcefb7 Reviewed-on: https://gerrit.libreoffice.org/61245 Tested-by: Jenkins Reviewed-by: Mike Kaganski diff --git a/desktop/win32/source/officeloader/officeloader.cxx b/desktop/win32/source/officeloader/officeloader.cxx index cd471ca2a5f9..e1b3323fbe9e 100644 --- a/desktop/win32/source/officeloader/officeloader.cxx +++ b/desktop/win32/source/officeloader/officeloader.cxx @@ -21,6 +21,9 @@ #include #include +#include +#include +#include #include #include "../loader.hxx" @@ -30,6 +33,38 @@ static LPWSTR *GetCommandArgs( int *pArgc ) return CommandLineToArgvW( GetCommandLineW(), pArgc ); } +// tdf#120249: quotes in arguments need to be escaped; backslashes before quotes need doubling. See +// https://docs.microsoft.com/en-us/windows/desktop/api/shellapi/nf-shellapi-commandlinetoargvw +static std::wstring EscapeArg(LPCWSTR sArg) +{ +const size_t nOrigSize = wcslen(sArg); +LPCWSTR const end = sArg + nOrigSize; +std::wstring sResult(L"\""); + +LPCWSTR lastPosQuote = sArg; +LPCWSTR posQuote; +while ((posQuote = std::find(lastPosQuote, end, L'"')) != end) +{ +LPCWSTR posBackslash = posQuote; +while (posBackslash != lastPosQuote && *(posBackslash - 1) == L'\\') +--posBackslash; + +sResult.append(lastPosQuote, posBackslash); +sResult.append((posQuote - posBackslash) * 2 + 1, L'\\'); // 2n+1 '\' to escape the '"' +sResult.append(1, L'"'); +lastPosQuote = posQuote + 1; +} + +LPCWSTR posTrailingBackslashSeq = end; +while (posTrailingBackslashSeq != lastPosQuote && *(posTrailingBackslashSeq - 1) == L'\\') +--posTrailingBackslashSeq; +sResult.append(lastPosQuote, posTrailingBackslashSeq); +sResult.append((end - posTrailingBackslashSeq) * 2, L'\\'); // 2n '\' before closing '"' +sResult.append(1, L'"'); + +return sResult; +} + int WINAPI wWinMain( HINSTANCE, HINSTANCE, LPWSTR, int ) { WCHARszTargetFileName[MAX_PATH] = {}; @@ -56,48 +91,46 @@ int WINAPI wWinMain( HINSTANCE, HINSTANCE, LPWSTR, int ) BOOLfSuccess = FALSE; LPWSTR lpCommandLine = nullptr; -int argc = 0; -LPWSTR * argv = nullptr; bool bFirst = true; WCHAR cwd[MAX_PATH]; DWORD cwdLen = GetCurrentDirectoryW(MAX_PATH, cwd); if (cwdLen >= MAX_PATH) { cwdLen = 0; } +std::vector aEscapedArgs; do { if ( bFirst ) { -argv = GetCommandArgs(); -std::size_t n = wcslen(argv[0]) + 2; -for (int i = 1; i < argc; ++i) { -n += wcslen(argv[i]) + 4; // 2 doublequotes + a space + optional trailing backslash +int argc = 0; +LPWSTR* argv = GetCommandArgs(); +std::size_t n = 0; +for (int i = 0; i < argc; ++i) { +std::wstring sEscapedArg = EscapeArg(argv[i]); +aEscapedArgs.push_back(sEscapedArg); +n += sEscapedArg.length() + 1; // a space between args } +LocalFree(argv); n += MY_LENGTH(L" \"-env:OOO_CWD=2") + 4 * cwdLen + MY_LENGTH(L"\"") + 1; // 4 * cwdLen: each char preceded by backslash, each trailing // backslash doubled lpCommandLine = new WCHAR[n]; } -WCHAR * p = desktop_win32::commandLineAppend( -lpCommandLine, MY_STRING(L"\"")); -p = desktop_win32::commandLineAppend(p, argv[0]); -for (int i = 1; i < argc; ++i) { -if (bFirst || EXITHELPER_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]); -const size_t arglen = wcslen(argv[i]); -// tdf#120249: if an argument ends with backslash, we should escape it with another -// backslash; otherwise, the trailing backslash will be treated as an escapement -// character for the following doublequote by CommandLineToArgvW in soffice.bin. See -// https://docs.microsoft.com/en-us/windows/desktop/api/shellapi/nf-shellapi-commandlinetoargvw -if (arglen && argv[i][arglen-1] == '\\') -p = desktop_win32::commandLineAppend(p, MY_STRING(L"\\")); +WCHAR* p =
[Libreoffice-commits] core.git: desktop/win32
desktop/win32/source/officeloader/officeloader.cxx |9 - 1 file changed, 8 insertions(+), 1 deletion(-) New commits: commit f4103a42d58535e21c48ff94ab000ab0305c62e3 Author: Mike Kaganski AuthorDate: Mon Oct 1 21:29:47 2018 +0300 Commit: Mike Kaganski CommitDate: Mon Oct 1 22:49:28 2018 +0200 tdf#120249: escape trailing backslash in argument passed to soffice.bin ... to avoid treating \" as in-argument " instead of end of argument See https://docs.microsoft.com/en-us/windows/desktop/api/shellapi/nf-shellapi-commandlinetoargvw Change-Id: Ie283ba04117e13bc06c5b92412a945f945e67ff3 Reviewed-on: https://gerrit.libreoffice.org/61214 Tested-by: Jenkins Reviewed-by: Mike Kaganski diff --git a/desktop/win32/source/officeloader/officeloader.cxx b/desktop/win32/source/officeloader/officeloader.cxx index 10393741b235..cd471ca2a5f9 100644 --- a/desktop/win32/source/officeloader/officeloader.cxx +++ b/desktop/win32/source/officeloader/officeloader.cxx @@ -71,7 +71,7 @@ int WINAPI wWinMain( HINSTANCE, HINSTANCE, LPWSTR, int ) argv = GetCommandArgs(); std::size_t n = wcslen(argv[0]) + 2; for (int i = 1; i < argc; ++i) { -n += wcslen(argv[i]) + 3; +n += wcslen(argv[i]) + 4; // 2 doublequotes + a space + optional trailing backslash } n += MY_LENGTH(L" \"-env:OOO_CWD=2") + 4 * cwdLen + MY_LENGTH(L"\"") + 1; @@ -86,6 +86,13 @@ int WINAPI wWinMain( HINSTANCE, HINSTANCE, LPWSTR, int ) if (bFirst || EXITHELPER_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]); +const size_t arglen = wcslen(argv[i]); +// tdf#120249: if an argument ends with backslash, we should escape it with another +// backslash; otherwise, the trailing backslash will be treated as an escapement +// character for the following doublequote by CommandLineToArgvW in soffice.bin. See +// https://docs.microsoft.com/en-us/windows/desktop/api/shellapi/nf-shellapi-commandlinetoargvw +if (arglen && argv[i][arglen-1] == '\\') +p = desktop_win32::commandLineAppend(p, MY_STRING(L"\\")); } } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: desktop/win32
desktop/win32/source/officeloader/officeloader.cxx |3 +++ 1 file changed, 3 insertions(+) New commits: commit 92bad369d99b02f1be0bfb8f79d3e85c271492bb Author: Caolán McNamaraDate: Fri Oct 20 11:39:07 2017 +0100 drmemory: fix small leak Change-Id: Ib7f6beb52dc832ee570e21ac5ab65d25946b622f Reviewed-on: https://gerrit.libreoffice.org/43597 Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/desktop/win32/source/officeloader/officeloader.cxx b/desktop/win32/source/officeloader/officeloader.cxx index 338a5fb8db96..45b94a8e128d 100644 --- a/desktop/win32/source/officeloader/officeloader.cxx +++ b/desktop/win32/source/officeloader/officeloader.cxx @@ -125,6 +125,8 @@ int WINAPI wWinMain( HINSTANCE, HINSTANCE, LPWSTR, int ) } } } + +LocalFree(argv2); } if ( _ltow( (long)GetCurrentProcessId(),szParentProcessId, 10 ) && bHeadlessMode ) @@ -172,6 +174,7 @@ int WINAPI wWinMain( HINSTANCE, HINSTANCE, LPWSTR, int ) } while ( fSuccess && ( EXITHELPER_CRASH_WITH_RESTART == dwExitCode || EXITHELPER_NORMAL_RESTART == dwExitCode )); delete[] lpCommandLine; +LocalFree(argv); return fSuccess ? dwExitCode : -1; } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: desktop/win32
desktop/win32/source/applauncher/launcher.cxx | 52 +++--- desktop/win32/source/applauncher/launcher.hxx | 18 - desktop/win32/source/applauncher/sbase.cxx|2 - desktop/win32/source/applauncher/scalc.cxx|2 - desktop/win32/source/applauncher/sdraw.cxx|2 - desktop/win32/source/applauncher/simpress.cxx |2 - desktop/win32/source/applauncher/smath.cxx|2 - desktop/win32/source/applauncher/sweb.cxx |2 - desktop/win32/source/applauncher/swriter.cxx |2 - 9 files changed, 30 insertions(+), 54 deletions(-) New commits: commit 4830592796cdc42ca1f111840b5cc31a220b50d7 Author: Mike KaganskiDate: Thu Sep 14 19:32:30 2017 +0300 applauncher: don't use 8-bit string functions Change-Id: I44e9641fb800a7a0203b689b035adbe27c4efee1 Reviewed-on: https://gerrit.libreoffice.org/42301 Reviewed-by: Mike Kaganski Tested-by: Mike Kaganski diff --git a/desktop/win32/source/applauncher/launcher.cxx b/desktop/win32/source/applauncher/launcher.cxx index beb05f56d90a..d3114aa2d804 100644 --- a/desktop/win32/source/applauncher/launcher.cxx +++ b/desktop/win32/source/applauncher/launcher.cxx @@ -19,50 +19,42 @@ #include "launcher.hxx" -#include - #include #include -extern "C" int APIENTRY _tWinMain( HINSTANCE, HINSTANCE, LPTSTR, int ) +extern "C" int APIENTRY wWinMain( HINSTANCE, HINSTANCE, LPWSTR, int ) { // Retrieve startup info -STARTUPINFO aStartupInfo; +STARTUPINFOW aStartupInfo; ZeroMemory( , sizeof(aStartupInfo) ); aStartupInfo.cb = sizeof( aStartupInfo ); -GetStartupInfo( ); +GetStartupInfoW( ); // Retrieve command line -LPTSTR lpCommandLine = GetCommandLine(); - -{ -lpCommandLine = static_cast(_alloca( sizeof(_TCHAR) * (_tcslen(lpCommandLine) + _tcslen(APPLICATION_SWITCH) + 2) )); - -_tcscpy( lpCommandLine, GetCommandLine() ); -_tcscat( lpCommandLine, _T(" ") ); -_tcscat( lpCommandLine, APPLICATION_SWITCH ); -} +LPWSTR lpCommandLine = static_cast(_alloca( sizeof(WCHAR) * (wcslen(GetCommandLineW()) + wcslen(APPLICATION_SWITCH) + 2) )); +wcscpy( lpCommandLine, GetCommandLineW() ); +wcscat( lpCommandLine, L" " ); +wcscat( lpCommandLine, APPLICATION_SWITCH ); // Calculate application name -TCHAR szApplicationName[MAX_PATH]; -TCHAR szDrive[MAX_PATH]; -TCHAR szDir[MAX_PATH]; -TCHAR szFileName[MAX_PATH]; -TCHAR szExt[MAX_PATH]; - -GetModuleFileName( nullptr, szApplicationName, MAX_PATH ); -_tsplitpath( szApplicationName, szDrive, szDir, szFileName, szExt ); -_tmakepath( szApplicationName, szDrive, szDir, _T("soffice"), _T(".exe") ); +WCHAR szApplicationName[MAX_PATH]; +WCHAR szDrive[MAX_PATH]; +WCHAR szDir[MAX_PATH]; +WCHAR szFileName[MAX_PATH]; +WCHAR szExt[MAX_PATH]; +GetModuleFileNameW( nullptr, szApplicationName, MAX_PATH ); +_wsplitpath( szApplicationName, szDrive, szDir, szFileName, szExt ); +_wmakepath( szApplicationName, szDrive, szDir, L"soffice", L".exe" ); PROCESS_INFORMATION aProcessInfo; -BOOLfSuccess = CreateProcess( +BOOL fSuccess = CreateProcessW( szApplicationName, lpCommandLine, nullptr, @@ -87,28 +79,28 @@ extern "C" int APIENTRY _tWinMain( HINSTANCE, HINSTANCE, LPTSTR, int ) return 0; } -DWORD dwError = GetLastError(); +DWORD dwError = GetLastError(); -LPVOID lpMsgBuf; +LPWSTR lpMsgBuf; -FormatMessage( +FormatMessageW( FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM, nullptr, dwError, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), // Default language -reinterpret_cast(), +reinterpret_cast(), 0, nullptr ); // Display the string. -MessageBox( nullptr, static_cast(lpMsgBuf), nullptr, MB_OK | MB_ICONERROR ); +MessageBoxW( nullptr, lpMsgBuf, nullptr, MB_OK | MB_ICONERROR ); // Free the buffer. LocalFree( lpMsgBuf ); -return GetLastError(); +return dwError; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/desktop/win32/source/applauncher/launcher.hxx b/desktop/win32/source/applauncher/launcher.hxx index bfc5e588455c..fdd651042481 100644 --- a/desktop/win32/source/applauncher/launcher.hxx +++ b/desktop/win32/source/applauncher/launcher.hxx @@ -20,23 +20,7 @@ #pragma once #include -#include -#include -#include -#ifndef _INC_TCHAR -# ifdef UNICODE -# define _UNICODE -# endif -# include -#endif - -#ifdef UNICODE -# define GetArgv( pArgc ) CommandLineToArgvW( GetCommandLine(), pArgc ) -#else -# define GetArgv( pArgc ) (*pArgc = __argc, __argv) -#endif - -extern _TCHAR APPLICATION_SWITCH[]; +extern WCHAR APPLICATION_SWITCH[]; /*
[Libreoffice-commits] core.git: desktop/win32
desktop/win32/source/guiloader/genericloader.cxx | 41 +++-- desktop/win32/source/loader.cxx| 14 desktop/win32/source/loader.hxx|8 +- desktop/win32/source/officeloader/officeloader.cxx | 63 ++--- 4 files changed, 31 insertions(+), 95 deletions(-) New commits: commit d2bf7caff23c875f7c058e07b4f18b3d76da0b0c Author: Mike KaganskiDate: Thu Sep 14 20:57:33 2017 +0300 loader: don't use 8-bit string functions Change-Id: I13f4fcf86dd385cecfa0a8cfd34037352a42253f Reviewed-on: https://gerrit.libreoffice.org/42302 Reviewed-by: Mike Kaganski Tested-by: Mike Kaganski diff --git a/desktop/win32/source/guiloader/genericloader.cxx b/desktop/win32/source/guiloader/genericloader.cxx index db66ee39445b..8beb240c0316 100644 --- a/desktop/win32/source/guiloader/genericloader.cxx +++ b/desktop/win32/source/guiloader/genericloader.cxx @@ -17,42 +17,21 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#define UNICODE -#define _UNICODE - -#define WIN32_LEAN_AND_MEAN -#if defined _MSC_VER -#pragma warning(push, 1) -#endif -#include -#include -#if defined _MSC_VER -#pragma warning(pop) -#endif - -#include - -#include -#include -#include -#include - #include #include "../loader.hxx" - static int GenericMain() { -TCHAR szTargetFileName[MAX_PATH]; -TCHAR szIniDirectory[MAX_PATH]; -STARTUPINFO aStartupInfo; +WCHARszTargetFileName[MAX_PATH]; +WCHARszIniDirectory[MAX_PATH]; +STARTUPINFOW aStartupInfo; desktop_win32::extendLoaderEnvironment(szTargetFileName, szIniDirectory); ZeroMemory( , sizeof(aStartupInfo) ); aStartupInfo.cb = sizeof(aStartupInfo); -GetStartupInfo( ); +GetStartupInfoW( ); DWORD dwExitCode = (DWORD)-1; @@ -70,9 +49,9 @@ static int GenericMain() tools::buildPath( redirect, szIniDirectory, szIniDirectory + iniDirLen, MY_STRING(L"redirect.ini")) != nullptr && -(GetBinaryType(redirect, ) || // cheaper check for file existence? +(GetBinaryTypeW(redirect, ) || // cheaper check for file existence? GetLastError() != ERROR_FILE_NOT_FOUND); -LPTSTR cl1 = GetCommandLine(); +LPWSTR cl1 = GetCommandLineW(); WCHAR * cl2 = new WCHAR[ wcslen(cl1) + (hasRedirect @@ -98,7 +77,7 @@ static int GenericMain() } desktop_win32::commandLineAppend(p, MY_STRING(L"\"")); -BOOL fSuccess = CreateProcess( +BOOL fSuccess = CreateProcessW( szTargetFileName, cl2, nullptr, @@ -127,7 +106,7 @@ static int GenericMain() { MSG msg; -PeekMessage( , nullptr, 0, 0, PM_REMOVE ); +PeekMessageW( , nullptr, 0, 0, PM_REMOVE ); } } while ( WAIT_OBJECT_0 + 1 == dwWaitResult ); @@ -141,12 +120,12 @@ static int GenericMain() return dwExitCode; } -int WINAPI _tWinMain( HINSTANCE, HINSTANCE, LPTSTR, int ) +int WINAPI wWinMain( HINSTANCE, HINSTANCE, LPWSTR, int ) { return GenericMain(); } -int __cdecl _tmain() +int __cdecl wmain() { return GenericMain(); } diff --git a/desktop/win32/source/loader.cxx b/desktop/win32/source/loader.cxx index 9cb133d1d573..72bcafc50457 100644 --- a/desktop/win32/source/loader.cxx +++ b/desktop/win32/source/loader.cxx @@ -17,22 +17,8 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include - -#define WIN32_LEAN_AND_MEAN -#if defined _MSC_VER -#pragma warning(push, 1) -#endif -#include -#include -#if defined _MSC_VER -#pragma warning(pop) -#endif - #include - #include "loader.hxx" - #include namespace { diff --git a/desktop/win32/source/loader.hxx b/desktop/win32/source/loader.hxx index 365afa637ffe..059fae479958 100644 --- a/desktop/win32/source/loader.hxx +++ b/desktop/win32/source/loader.hxx @@ -20,11 +20,9 @@ #ifndef INCLUDED_DESKTOP_WIN32_SOURCE_LOADER_HXX #define INCLUDED_DESKTOP_WIN32_SOURCE_LOADER_HXX -#include - -#include - -#include +#define WIN32_LEAN_AND_MEAN +#include +#include #define MY_LENGTH(s) (sizeof (s) / sizeof *(s) - 1) #define MY_STRING(s) (s), MY_LENGTH(s) diff --git a/desktop/win32/source/officeloader/officeloader.cxx b/desktop/win32/source/officeloader/officeloader.cxx index 78c4bc1bfcec..c6987a72ec99 100644 --- a/desktop/win32/source/officeloader/officeloader.cxx +++ b/desktop/win32/source/officeloader/officeloader.cxx @@ -17,50 +17,23 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#define UNICODE -#define _UNICODE - #include -#include - -#define WIN32_LEAN_AND_MEAN -#if defined _MSC_VER -#pragma warning(push, 1) -#endif -#include -#if defined _MSC_VER -#pragma warning(pop) -#endif - -#include -#include -#include
[Libreoffice-commits] core.git: desktop/win32
desktop/win32/source/officeloader/officeloader.cxx | 36 - 1 file changed, 36 deletions(-) New commits: commit 856f7fc68683b2ed92f65bd79f1b6a23570e06cb Author: Stephan BergmannDate: Tue Apr 5 10:14:36 2016 +0200 -Werror,-Wunused-function Change-Id: I2d0a21b0f38feafa6e3fde0245b1fdb9b5771152 diff --git a/desktop/win32/source/officeloader/officeloader.cxx b/desktop/win32/source/officeloader/officeloader.cxx index 68c2e55..3f9760f 100644 --- a/desktop/win32/source/officeloader/officeloader.cxx +++ b/desktop/win32/source/officeloader/officeloader.cxx @@ -56,42 +56,6 @@ static LPTSTR *GetCommandArgs( int *pArgc ) #endif } - -namespace { - -bool writeArgument(HANDLE pipe, char prefix, WCHAR const * argument) { -CHAR szBuffer[4096]; -int n = WideCharToMultiByte( -CP_UTF8, 0, argument, -1, szBuffer, sizeof (szBuffer), NULL, NULL); -char b[1 + 2 * ((sizeof szBuffer) - 1)]; // hopefully does not overflow -b[0] = prefix; -char * p = b + 1; -for (int i = 0; i < n - 1; ++i) { // cannot underflow (n >= 0) -char c = szBuffer[i]; -switch (c) { -case '\0': -*p++ = '\\'; -*p++ = '0'; -break; -case ',': -*p++ = '\\'; -*p++ = ','; -break; -case '\\': -*p++ = '\\'; -*p++ = '\\'; -break; -default: -*p++ = c; -break; -} -} -DWORD w; -return WriteFile(pipe, b, p - b, , NULL); -} - -} - #ifdef __MINGW32__ int WINAPI WinMain( HINSTANCE, HINSTANCE, LPSTR, int ) #else ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: desktop/win32
desktop/win32/source/officeloader/officeloader.cxx |1 - 1 file changed, 1 deletion(-) New commits: commit 35313dead30ed869e9ebd5dbd8950bc5f6c714d6 Author: Stephan BergmannDate: Tue Mar 29 17:46:11 2016 +0200 Remove obsolete comment The code it commented got removed with 77c52217238b6a1b08b74852aa79163306c688a9 "INTEGRATION: CWS sb83". Change-Id: I709db766806a75823e3436a0b3d5a6eba307ecca diff --git a/desktop/win32/source/officeloader/officeloader.cxx b/desktop/win32/source/officeloader/officeloader.cxx index 9940448..504c000 100644 --- a/desktop/win32/source/officeloader/officeloader.cxx +++ b/desktop/win32/source/officeloader/officeloader.cxx @@ -180,7 +180,6 @@ int WINAPI _tWinMain( HINSTANCE, HINSTANCE, LPTSTR, int ) aStartupInfo.cb = sizeof(aStartupInfo); GetStartupInfo( ); -// Get image path with same name but with .bin extension TCHAR szModuleFileName[MAX_PATH]; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: desktop/win32
desktop/win32/source/officeloader/officeloader.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 3f88d949d9a1446e673385cc4d7ca40c7477fded Author: Michael Stahl mst...@redhat.com Date: Mon Jan 5 21:43:20 2015 +0100 desktop: fix copypasta in officeloader.cxx Change-Id: I66736e0b1e72e27c02ea718c3f07547b83fd949f diff --git a/desktop/win32/source/officeloader/officeloader.cxx b/desktop/win32/source/officeloader/officeloader.cxx index 7eb1427..e782c90 100644 --- a/desktop/win32/source/officeloader/officeloader.cxx +++ b/desktop/win32/source/officeloader/officeloader.cxx @@ -379,7 +379,7 @@ int WINAPI _tWinMain( HINSTANCE, HINSTANCE, LPTSTR, int ) for ( n = 1; n argc2; n++ ) { if ( 0 == _tcsnicmp( argv2[n], _T(-headless), 9 ) || - 0 == _tcsnicmp( argv2[n], _T(--headless), 9 ) ) + 0 == _tcsnicmp( argv2[n], _T(--headless), 10 ) ) { bHeadlessMode = TRUE; } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: desktop/win32
desktop/win32/source/guistdio/guistdio.inc |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) New commits: commit 52d35df0e61019e722675a27fbb01101a96bff75 Author: Tor Lillqvist t...@iki.fi Date: Fri Aug 30 11:29:46 2013 +0300 WaE: size/t/DWORD/int: possible loss of data Change-Id: I4fa005a8ddb3efd3dc624110215b938ee20a67a6 diff --git a/desktop/win32/source/guistdio/guistdio.inc b/desktop/win32/source/guistdio/guistdio.inc index 17d986e..5918ccc 100644 --- a/desktop/win32/source/guistdio/guistdio.inc +++ b/desktop/win32/source/guistdio/guistdio.inc @@ -172,10 +172,10 @@ DWORD WINAPI InputThread( LPVOID pParam ) WideCharToMultiByte( GetConsoleCP(), 0, L\r\n, 2, mbBuff, cNewLine, NULL, NULL); -const size_t dwBufferSize = 256; +const DWORD dwBufferSize = 256; char* readBuf = (char*) malloc(dwBufferSize); int readAll = 0; -size_t curBufSize = dwBufferSize; +DWORD curBufSize = dwBufferSize; while ( ReadFile( GetStdHandle( STD_INPUT_HANDLE ), readBuf + readAll, ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: desktop/win32 framework/source scp2/source vcl/inc vcl/Library_vcl.mk vcl/win
desktop/win32/source/applauncher/launcher.cxx | 39 - framework/source/helper/titlebarupdate.cxx| 32 ++- scp2/source/base/registryitem_base.scp|2 scp2/source/calc/registryitem_calc.scp|8 +- scp2/source/draw/registryitem_draw.scp|8 +- scp2/source/impress/registryitem_impress.scp |8 +- scp2/source/math/registryitem_math.scp|4 - scp2/source/writer/registryitem_writer.scp| 14 ++-- vcl/Library_vcl.mk|1 vcl/inc/win/salframe.h|7 +- vcl/win/source/window/salframe.cxx| 75 +- 11 files changed, 131 insertions(+), 67 deletions(-) New commits: commit 19f3d9310caef84fe2815eb89af448a81937bddd Author: Jesús Corrius jcorr...@gmail.com Date: Sat Jul 20 17:10:43 2013 +0200 fdo#35785 LibreOffice's support of recent documents in Windows 7 broken Change-Id: I916ba1335b0a0420f568ab9340632f273e3c9516 Reviewed-on: https://gerrit.libreoffice.org/4997 Reviewed-by: Fridrich Strba fridr...@documentfoundation.org Tested-by: Fridrich Strba fridr...@documentfoundation.org diff --git a/desktop/win32/source/applauncher/launcher.cxx b/desktop/win32/source/applauncher/launcher.cxx index c6a40d3..b0f031a 100644 --- a/desktop/win32/source/applauncher/launcher.cxx +++ b/desktop/win32/source/applauncher/launcher.cxx @@ -34,51 +34,12 @@ #include stdlib.h #include malloc.h -#define PACKVERSION(major,minor) MAKELONG(minor,major) -#define APPUSERMODELID LTheDocumentFoundation.LibreOffice - - #ifdef __MINGW32__ extern C int APIENTRY WinMain( HINSTANCE, HINSTANCE, LPSTR, int ) #else extern C int APIENTRY _tWinMain( HINSTANCE, HINSTANCE, LPTSTR, int ) #endif { -// Set an explicit Application User Model ID for the process - -WCHAR szShell32[MAX_PATH]; -GetSystemDirectoryW(szShell32, MAX_PATH); -wcscat(szShell32, L\\Shell32.dll); - -HINSTANCE hinstDll = LoadLibraryW(szShell32); - -if(hinstDll) -{ -DLLVERSIONINFO dvi; -ZeroMemory(dvi, sizeof(dvi)); -dvi.cbSize = sizeof(dvi); - -DLLGETVERSIONPROC pDllGetVersion; -pDllGetVersion = (DLLGETVERSIONPROC)GetProcAddress(hinstDll, DllGetVersion); -HRESULT hr = (*pDllGetVersion)(dvi); - -if(SUCCEEDED(hr)) -{ -DWORD dwVersion = PACKVERSION(dvi.dwMajorVersion, dvi.dwMinorVersion); -if(dwVersion = PACKVERSION(6,1)) // Shell32 version in Windows 7 -{ -typedef HRESULT (WINAPI *SETCURRENTPROCESSEXPLICITAPPUSERMODELID)(PCWSTR); -SETCURRENTPROCESSEXPLICITAPPUSERMODELID pSetCurrentProcessExplicitAppUserModelID; -pSetCurrentProcessExplicitAppUserModelID = - (SETCURRENTPROCESSEXPLICITAPPUSERMODELID)GetProcAddress(hinstDll, SetCurrentProcessExplicitAppUserModelID); - -if(pSetCurrentProcessExplicitAppUserModelID) -(*pSetCurrentProcessExplicitAppUserModelID) (APPUSERMODELID); -} -} -} -FreeLibrary(hinstDll); - // Retreive startup info STARTUPINFO aStartupInfo; diff --git a/framework/source/helper/titlebarupdate.cxx b/framework/source/helper/titlebarupdate.cxx index 6833933..f5506a1 100644 --- a/framework/source/helper/titlebarupdate.cxx +++ b/framework/source/helper/titlebarupdate.cxx @@ -172,7 +172,7 @@ void TitleBarUpdate::impl_updateApplicationID(const css::uno::Reference css::fr OUString aModuleId = xModuleManager-identify(xFrame); OUString sDesktopName; - +#if defined(UNX) !defined(MACOSX) if ( aModuleId.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(com.sun.star.text.TextDocument)) || aModuleId.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(com.sun.star.text.GlobalDocument)) || aModuleId.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(com.sun.star.text.WebDocument)) || @@ -198,6 +198,34 @@ void TitleBarUpdate::impl_updateApplicationID(const css::uno::Reference css::fr sApplicationID = utl::ConfigManager::getProductName().toAsciiLowerCase(); sApplicationID += OUString(sal_Unicode('-')); sApplicationID += sDesktopName; +#elif defined(WNT) +if ( aModuleId.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(com.sun.star.text.TextDocument)) || + aModuleId.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(com.sun.star.text.GlobalDocument)) || + aModuleId.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(com.sun.star.text.WebDocument)) || + aModuleId.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(com.sun.star.xforms.XMLFormDocument)) ) +sDesktopName = OUString(Writer); +else if ( aModuleId == com.sun.star.sheet.SpreadsheetDocument ) +sDesktopName = OUString(Calc); +else if ( aModuleId == com.sun.star.presentation.PresentationDocument ) +sDesktopName = OUString(Impress); +else
[Libreoffice-commits] core.git: desktop/win32
desktop/win32/source/applauncher/launcher.cxx | 40 +- 1 file changed, 39 insertions(+), 1 deletion(-) New commits: commit 6c670f63a7859e24bdfa20759bd8b7c3b4a911ef Author: Jesús Corrius jcorr...@gmail.com Date: Sat Apr 27 20:11:25 2013 +0200 fdo#35785: don't rely on the old apps fallback mechanism to fix this bug Change-Id: Id0967358956868538f7563c51f7ed5e106771302 Reviewed-on: https://gerrit.libreoffice.org/3639 Reviewed-by: Tor Lillqvist t...@iki.fi Tested-by: Tor Lillqvist t...@iki.fi diff --git a/desktop/win32/source/applauncher/launcher.cxx b/desktop/win32/source/applauncher/launcher.cxx index 0edcdbf..c6a40d3 100644 --- a/desktop/win32/source/applauncher/launcher.cxx +++ b/desktop/win32/source/applauncher/launcher.cxx @@ -34,6 +34,9 @@ #include stdlib.h #include malloc.h +#define PACKVERSION(major,minor) MAKELONG(minor,major) +#define APPUSERMODELID LTheDocumentFoundation.LibreOffice + #ifdef __MINGW32__ extern C int APIENTRY WinMain( HINSTANCE, HINSTANCE, LPSTR, int ) @@ -41,7 +44,42 @@ extern C int APIENTRY WinMain( HINSTANCE, HINSTANCE, LPSTR, int ) extern C int APIENTRY _tWinMain( HINSTANCE, HINSTANCE, LPTSTR, int ) #endif { -// Retrieve startup info +// Set an explicit Application User Model ID for the process + +WCHAR szShell32[MAX_PATH]; +GetSystemDirectoryW(szShell32, MAX_PATH); +wcscat(szShell32, L\\Shell32.dll); + +HINSTANCE hinstDll = LoadLibraryW(szShell32); + +if(hinstDll) +{ +DLLVERSIONINFO dvi; +ZeroMemory(dvi, sizeof(dvi)); +dvi.cbSize = sizeof(dvi); + +DLLGETVERSIONPROC pDllGetVersion; +pDllGetVersion = (DLLGETVERSIONPROC)GetProcAddress(hinstDll, DllGetVersion); +HRESULT hr = (*pDllGetVersion)(dvi); + +if(SUCCEEDED(hr)) +{ +DWORD dwVersion = PACKVERSION(dvi.dwMajorVersion, dvi.dwMinorVersion); +if(dwVersion = PACKVERSION(6,1)) // Shell32 version in Windows 7 +{ +typedef HRESULT (WINAPI *SETCURRENTPROCESSEXPLICITAPPUSERMODELID)(PCWSTR); +SETCURRENTPROCESSEXPLICITAPPUSERMODELID pSetCurrentProcessExplicitAppUserModelID; +pSetCurrentProcessExplicitAppUserModelID = + (SETCURRENTPROCESSEXPLICITAPPUSERMODELID)GetProcAddress(hinstDll, SetCurrentProcessExplicitAppUserModelID); + +if(pSetCurrentProcessExplicitAppUserModelID) +(*pSetCurrentProcessExplicitAppUserModelID) (APPUSERMODELID); +} +} +} +FreeLibrary(hinstDll); + +// Retreive startup info STARTUPINFO aStartupInfo; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: desktop/win32
desktop/win32/source/applauncher/launcher.cxx | 37 -- desktop/win32/source/applauncher/launcher.hxx |1 desktop/win32/source/applauncher/sbase.cxx|2 - desktop/win32/source/applauncher/scalc.cxx|2 - desktop/win32/source/applauncher/sdraw.cxx|2 - desktop/win32/source/applauncher/simpress.cxx |2 - desktop/win32/source/applauncher/smath.cxx|2 - desktop/win32/source/applauncher/sweb.cxx |2 - desktop/win32/source/applauncher/swriter.cxx |2 - 9 files changed, 52 deletions(-) New commits: commit 64dafbe584fe7644ec29b96b6a9a9588ba4619bd Author: Jesús Corrius jcorr...@gmail.com Date: Fri Apr 26 14:17:56 2013 +0200 Fix fdo#35785: recent documents feature of the Windows 7 Start menu broken Change-Id: I61cffeaf661db7e7b8f642bbbd9457203f75cb9a Reviewed-on: https://gerrit.libreoffice.org/3623 Reviewed-by: Tor Lillqvist t...@iki.fi Tested-by: Tor Lillqvist t...@iki.fi diff --git a/desktop/win32/source/applauncher/launcher.cxx b/desktop/win32/source/applauncher/launcher.cxx index d72d7dd..0edcdbf 100644 --- a/desktop/win32/source/applauncher/launcher.cxx +++ b/desktop/win32/source/applauncher/launcher.cxx @@ -34,8 +34,6 @@ #include stdlib.h #include malloc.h -#define PACKVERSION(major,minor) MAKELONG(minor,major) - #ifdef __MINGW32__ extern C int APIENTRY WinMain( HINSTANCE, HINSTANCE, LPSTR, int ) @@ -43,41 +41,6 @@ extern C int APIENTRY WinMain( HINSTANCE, HINSTANCE, LPSTR, int ) extern C int APIENTRY _tWinMain( HINSTANCE, HINSTANCE, LPTSTR, int ) #endif { -// Set an explicit Application User Model ID for the process - -WCHAR szShell32[MAX_PATH]; -GetSystemDirectoryW(szShell32, MAX_PATH); -wcscat(szShell32, L\\Shell32.dll); - -HINSTANCE hinstDll = LoadLibraryW(szShell32); - -if(hinstDll) -{ -DLLVERSIONINFO dvi; -ZeroMemory(dvi, sizeof(dvi)); -dvi.cbSize = sizeof(dvi); - -DLLGETVERSIONPROC pDllGetVersion; -pDllGetVersion = (DLLGETVERSIONPROC)GetProcAddress(hinstDll, DllGetVersion); -HRESULT hr = (*pDllGetVersion)(dvi); - -if(SUCCEEDED(hr)) -{ -DWORD dwVersion = PACKVERSION(dvi.dwMajorVersion, dvi.dwMinorVersion); -if(dwVersion = PACKVERSION(6,1)) // Shell32 version in Windows 7 -{ -typedef HRESULT (WINAPI *SETCURRENTPROCESSEXPLICITAPPUSERMODELID)(PCWSTR); -SETCURRENTPROCESSEXPLICITAPPUSERMODELID pSetCurrentProcessExplicitAppUserModelID; -pSetCurrentProcessExplicitAppUserModelID = - (SETCURRENTPROCESSEXPLICITAPPUSERMODELID)GetProcAddress(hinstDll, SetCurrentProcessExplicitAppUserModelID); - -if(pSetCurrentProcessExplicitAppUserModelID) -(*pSetCurrentProcessExplicitAppUserModelID) (APPUSERMODELID); -} -} -} -FreeLibrary(hinstDll); - // Retrieve startup info STARTUPINFO aStartupInfo; diff --git a/desktop/win32/source/applauncher/launcher.hxx b/desktop/win32/source/applauncher/launcher.hxx index a937c8f..1ea51cf 100644 --- a/desktop/win32/source/applauncher/launcher.hxx +++ b/desktop/win32/source/applauncher/launcher.hxx @@ -43,6 +43,5 @@ #define OFFICE_IMAGE_NAME _T(soffice) extern _TCHAR APPLICATION_SWITCH[]; -extern LPCWSTR APPUSERMODELID; /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/desktop/win32/source/applauncher/sbase.cxx b/desktop/win32/source/applauncher/sbase.cxx index 4b51080..e6123a6 100644 --- a/desktop/win32/source/applauncher/sbase.cxx +++ b/desktop/win32/source/applauncher/sbase.cxx @@ -21,6 +21,4 @@ _TCHAR APPLICATION_SWITCH[] = _T( --base ); -LPCWSTR APPUSERMODELID = LTheDocumentFoundation.LibreOffice.Base; - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/desktop/win32/source/applauncher/scalc.cxx b/desktop/win32/source/applauncher/scalc.cxx index 356c719..4d11124 100644 --- a/desktop/win32/source/applauncher/scalc.cxx +++ b/desktop/win32/source/applauncher/scalc.cxx @@ -21,6 +21,4 @@ _TCHAR APPLICATION_SWITCH[] = _T( --calc ); -LPCWSTR APPUSERMODELID = LTheDocumentFoundation.LibreOffice.Calc; - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/desktop/win32/source/applauncher/sdraw.cxx b/desktop/win32/source/applauncher/sdraw.cxx index 8202f3a..57112523 100644 --- a/desktop/win32/source/applauncher/sdraw.cxx +++ b/desktop/win32/source/applauncher/sdraw.cxx @@ -21,6 +21,4 @@ _TCHAR APPLICATION_SWITCH[] = _T( --draw ); -LPCWSTR APPUSERMODELID = LTheDocumentFoundation.LibreOffice.Draw; - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/desktop/win32/source/applauncher/simpress.cxx b/desktop/win32/source/applauncher/simpress.cxx index 35b828f..53a0dcc 100644 --- a/desktop/win32/source/applauncher/simpress.cxx +++ b/desktop/win32/source/applauncher/simpress.cxx @@ -21,6 +21,4 @@ _TCHAR APPLICATION_SWITCH[]
[Libreoffice-commits] core.git: desktop/win32 framework/source np_sdk/inc np_sdk/mozsrc sal/inc sc/qa ucbhelper/source
desktop/win32/source/applauncher/launcher.cxx |2 +- desktop/win32/source/wrapper.h |4 ++-- framework/source/layoutmanager/toolbarlayoutmanager.cxx |2 +- np_sdk/inc/npfunctions.h|4 ++-- np_sdk/mozsrc/npupp.h |4 ++-- sal/inc/osl/file.h |4 ++-- sc/qa/unit/subsequent_filters-test.cxx |4 ++-- ucbhelper/source/client/content.cxx |4 ++-- 8 files changed, 14 insertions(+), 14 deletions(-) New commits: commit e3f141323eea90259248cef4576ddb267b9c2d06 Author: Julien Nabet serval2...@yahoo.fr Date: Sat Feb 23 16:51:36 2013 +0100 Fix typos retreive/retrieve furture/future Change-Id: I639c2970b2a88ca3d5aa1dcd2ad4ec047b4a369c diff --git a/desktop/win32/source/applauncher/launcher.cxx b/desktop/win32/source/applauncher/launcher.cxx index c504af4..b09068d 100644 --- a/desktop/win32/source/applauncher/launcher.cxx +++ b/desktop/win32/source/applauncher/launcher.cxx @@ -78,7 +78,7 @@ extern C int APIENTRY _tWinMain( HINSTANCE, HINSTANCE, LPTSTR, int ) } FreeLibrary(hinstDll); -// Retreive startup info +// Retrieve startup info STARTUPINFO aStartupInfo; diff --git a/desktop/win32/source/wrapper.h b/desktop/win32/source/wrapper.h index eb8f7b2..17b8106 100644 --- a/desktop/win32/source/wrapper.h +++ b/desktop/win32/source/wrapper.h @@ -64,7 +64,7 @@ extern C int Main() { -// Retreive startup info +// Retrieve startup info STARTUPINFO aStartupInfo; @@ -94,7 +94,7 @@ extern C int Main() _tsplitpath( szApplicationName, szDrive, szDir, szFileName, szExt ); _tmakepath( szApplicationName, szDrive, szDir, szFileName, BIN_EXT_STR ); -// Retreive actual environment +// Retrieve actual environment TCHAR szBuffer[1024]; TCHAR szPathValue[1024] = TEXT(); diff --git a/framework/source/layoutmanager/toolbarlayoutmanager.cxx b/framework/source/layoutmanager/toolbarlayoutmanager.cxx index 3bf232c..1c3852a 100644 --- a/framework/source/layoutmanager/toolbarlayoutmanager.cxx +++ b/framework/source/layoutmanager/toolbarlayoutmanager.cxx @@ -1242,7 +1242,7 @@ void ToolbarLayoutManager::implts_reparentToolbars() uno::Reference awt::XWindow xWindow; try { -// We have to retreive the window reference with try/catch as it is +// We have to retrieve the window reference with try/catch as it is // possible that all elements have been disposed! xWindow = uno::Reference awt::XWindow ( xUIElement-getRealInterface(), uno::UNO_QUERY ); } diff --git a/np_sdk/inc/npfunctions.h b/np_sdk/inc/npfunctions.h index 90faa3c..6430533 100644 --- a/np_sdk/inc/npfunctions.h +++ b/np_sdk/inc/npfunctions.h @@ -214,11 +214,11 @@ typedef struct _NPNetscapeFuncs { #ifdef XP_MACOSX /* * Mac OS X version(s) of NP_GetMIMEDescription(const char *) - * These can be called to retreive MIME information from the plugin dynamically + * These can be called to retrieve MIME information from the plugin dynamically * * Note: For compatibility with Quicktime, BPSupportedMIMEtypes is another way * to get mime info from the plugin only on OSX and may not be supported - * in furture version -- use NP_GetMIMEDescription instead + * in future version -- use NP_GetMIMEDescription instead */ enum { diff --git a/np_sdk/mozsrc/npupp.h b/np_sdk/mozsrc/npupp.h index 75fbdc2..320aa74 100644 --- a/np_sdk/mozsrc/npupp.h +++ b/np_sdk/mozsrc/npupp.h @@ -1161,11 +1161,11 @@ typedef NPError (* NP_LOADDS NPP_MainEntryUPP)(NPNetscapeFuncs*, NPPluginFuncs*, /* * Mac version(s) of NP_GetMIMEDescription(const char *) - * These can be called to retreive MIME information from the plugin dynamically + * These can be called to retrieve MIME information from the plugin dynamically * * Note: For compatibility with Quicktime, BPSupportedMIMEtypes is another way * to get mime info from the plugin only on OSX and may not be supported - * in furture version--use NP_GetMIMEDescription instead + * in future version--use NP_GetMIMEDescription instead */ enum diff --git a/sal/inc/osl/file.h b/sal/inc/osl/file.h index 8730270..e8277e2 100644 --- a/sal/inc/osl/file.h +++ b/sal/inc/osl/file.h @@ -361,7 +361,7 @@ typedef enum { #define osl_File_Attribute_OthRead 0x1000 #define osl_File_Attribute_OthExe 0x2000 -/* Flags specifying which fields to retreive by osl_getFileStatus */ +/* Flags specifying which fields to retrieve by osl_getFileStatus */ #define osl_FileStatus_Mask_Type0x0001 #define osl_FileStatus_Mask_Attributes 0x0002 @@ -545,7 +545,7 @@ SAL_DLLPUBLIC oslFileError SAL_CALL osl_getVolumeDeviceMountPath(