diff options
author | Jesús Corrius <jcorrius@gmail.com> | 2013-07-20 17:10:43 +0200 |
---|---|---|
committer | Fridrich Strba <fridrich@documentfoundation.org> | 2013-07-20 21:01:01 +0000 |
commit | 19f3d9310caef84fe2815eb89af448a81937bddd (patch) | |
tree | 8784aea768d9355497f56cd1f3dfad4e55563014 /desktop | |
parent | 822577f412214f282588b627fd6addb489f6a9f0 (diff) |
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 <fridrich@documentfoundation.org>
Tested-by: Fridrich Strba <fridrich@documentfoundation.org>
Diffstat (limited to 'desktop')
-rw-r--r-- | desktop/win32/source/applauncher/launcher.cxx | 39 |
1 files changed, 0 insertions, 39 deletions
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 <stdlib.h> #include <malloc.h> -#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; |