summaryrefslogtreecommitdiff
path: root/desktop
diff options
context:
space:
mode:
authorJesús Corrius <jcorrius@gmail.com>2013-07-20 17:10:43 +0200
committerMichael Meeks <michael.meeks@suse.com>2013-07-22 10:53:55 +0000
commitf7d410edfa0866bd7759b2b977800d5744d8b544 (patch)
treeea9a949fe65d65799541c1cdeca05531d588e058 /desktop
parenta6ae1cc0a2c5fd9f9bc0a834038b73e79b78fc6d (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> (cherry picked from commit 19f3d9310caef84fe2815eb89af448a81937bddd) Shell32.dll is already loaded Since the vcllo.dll links already the shell32.dll because of its symbol SHAddToRecentDocs, no need to increase reference of that library. Just get the module handle. Moreover, a mere presence of the symbol SHGetPropertyStoreForWindow in shell32.dll indicates that we are running at least on Windows 7 or Windows Server 2008 R2. There is thus no need to check for the library version. Change-Id: I9ddfb8407fd805faf588779ac5fa8c10a0ae8898 Reviewed-on: https://gerrit.libreoffice.org/5016 Reviewed-by: Fridrich Strba <fridrich@documentfoundation.org> Tested-by: Fridrich Strba <fridrich@documentfoundation.org> (cherry picked from commit 50d330c3d238b7b6182787959b30a6d665eab078) Reviewed-on: https://gerrit.libreoffice.org/5024 Reviewed-by: Jesús Corrius <jcorrius@gmail.com> Reviewed-by: Tor Lillqvist <tml@iki.fi> Reviewed-by: Michael Meeks <michael.meeks@suse.com> Tested-by: Michael Meeks <michael.meeks@suse.com>
Diffstat (limited to 'desktop')
-rw-r--r--desktop/win32/source/applauncher/launcher.cxx39
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;