From 19f3d9310caef84fe2815eb89af448a81937bddd Mon Sep 17 00:00:00 2001 From: Jesús Corrius Date: Sat, 20 Jul 2013 17:10:43 +0200 Subject: 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 Tested-by: Fridrich Strba --- desktop/win32/source/applauncher/launcher.cxx | 39 --------------------------- 1 file changed, 39 deletions(-) (limited to 'desktop') diff --git a/desktop/win32/source/applauncher/launcher.cxx b/desktop/win32/source/applauncher/launcher.cxx index c6a40d34400b..b0f031a9068b 100644 --- a/desktop/win32/source/applauncher/launcher.cxx +++ b/desktop/win32/source/applauncher/launcher.cxx @@ -34,51 +34,12 @@ #include #include -#define PACKVERSION(major,minor) MAKELONG(minor,major) -#define APPUSERMODELID L"TheDocumentFoundation.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; -- cgit