From 64dafbe584fe7644ec29b96b6a9a9588ba4619bd Mon Sep 17 00:00:00 2001 From: Jesús Corrius Date: Fri, 26 Apr 2013 14:17:56 +0200 Subject: 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 Tested-by: Tor Lillqvist --- 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(-) (limited to 'desktop/win32/source') diff --git a/desktop/win32/source/applauncher/launcher.cxx b/desktop/win32/source/applauncher/launcher.cxx index d72d7dde4b24..0edcdbfa9cad 100644 --- a/desktop/win32/source/applauncher/launcher.cxx +++ b/desktop/win32/source/applauncher/launcher.cxx @@ -34,8 +34,6 @@ #include #include -#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 a937c8f17088..1ea51cf2b757 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 4b51080b770d..e6123a66b14f 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 = L"TheDocumentFoundation.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 356c719698f1..4d1112437bf2 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 = L"TheDocumentFoundation.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 8202f3a26abc..57112523f698 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 = L"TheDocumentFoundation.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 35b828fce3dc..53a0dccdc0cd 100644 --- a/desktop/win32/source/applauncher/simpress.cxx +++ b/desktop/win32/source/applauncher/simpress.cxx @@ -21,6 +21,4 @@ _TCHAR APPLICATION_SWITCH[] = _T( "--impress" ); -LPCWSTR APPUSERMODELID = L"TheDocumentFoundation.LibreOffice.Impress"; - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/desktop/win32/source/applauncher/smath.cxx b/desktop/win32/source/applauncher/smath.cxx index c52ee3790867..e71c84ba4fe5 100644 --- a/desktop/win32/source/applauncher/smath.cxx +++ b/desktop/win32/source/applauncher/smath.cxx @@ -21,6 +21,4 @@ _TCHAR APPLICATION_SWITCH[] = _T( "--math" ); -LPCWSTR APPUSERMODELID = L"TheDocumentFoundation.LibreOffice.Math"; - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/desktop/win32/source/applauncher/sweb.cxx b/desktop/win32/source/applauncher/sweb.cxx index dc9b8b19b894..3824ece6f2ae 100644 --- a/desktop/win32/source/applauncher/sweb.cxx +++ b/desktop/win32/source/applauncher/sweb.cxx @@ -21,6 +21,4 @@ _TCHAR APPLICATION_SWITCH[] = _T( "--web" ); -LPCWSTR APPUSERMODELID = L"TheDocumentFoundation.LibreOffice.Writer"; - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/desktop/win32/source/applauncher/swriter.cxx b/desktop/win32/source/applauncher/swriter.cxx index ba1f2b93f9a5..013ce9ec10ae 100644 --- a/desktop/win32/source/applauncher/swriter.cxx +++ b/desktop/win32/source/applauncher/swriter.cxx @@ -21,6 +21,4 @@ _TCHAR APPLICATION_SWITCH[] = _T( "--writer" ); -LPCWSTR APPUSERMODELID = L"TheDocumentFoundation.LibreOffice.Writer"; - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ -- cgit