diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2017-09-28 12:40:42 +0300 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2017-09-29 14:55:11 +0200 |
commit | 0dd2e602e5c1b46e82abc6051677aeaab1d265b8 (patch) | |
tree | 7f7a1cbc9cb87c38c732d4691129bf81dc1d04ff /fpicker | |
parent | 8b12c98ec7ec0b5ba20c28890ee63803fb9518d5 (diff) |
Drop check for Windows versions we don't support
Since we dropped support of Vista and below in master toward 6.0,
those checks are needless. Removing the code that only worked in
older versions, and streamlining the resulting code.
Also, use kernel32.dll version for Windows version, instead of
deprecated GetVersionEx, and inconvenient VersionHelpers. Since both
GetVersion(Ex) and VersionHelpers (based on VerifyVersionInfo) are
subject to manifest-based behavior since Windows 8.1, this move will
hopefully result in more reliable OS version detection.
Change-Id: I3edd8fc1843e64b6a65bd3a126be6a085511f13c
Reviewed-on: https://gerrit.libreoffice.org/42905
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'fpicker')
-rw-r--r-- | fpicker/source/win32/filepicker/FPentry.cxx | 3 | ||||
-rw-r--r-- | fpicker/source/win32/misc/WinImplHelper.cxx | 30 | ||||
-rw-r--r-- | fpicker/source/win32/misc/WinImplHelper.hxx | 2 |
3 files changed, 0 insertions, 35 deletions
diff --git a/fpicker/source/win32/filepicker/FPentry.cxx b/fpicker/source/win32/filepicker/FPentry.cxx index 5eaf4d00c023..f5ce7ba45e12 100644 --- a/fpicker/source/win32/filepicker/FPentry.cxx +++ b/fpicker/source/win32/filepicker/FPentry.cxx @@ -44,9 +44,6 @@ static Reference< XInterface > SAL_CALL createInstance( { Reference< XInterface > xDlg; - if (!IsWindowsVistaOrNewer()) - std::abort(); // not supported - xDlg.set(static_cast<XFilePicker2*>( new ::fpicker::win32::vista::VistaFilePicker(rServiceManager))); diff --git a/fpicker/source/win32/misc/WinImplHelper.cxx b/fpicker/source/win32/misc/WinImplHelper.cxx index d31dd622a8df..09de0484e134 100644 --- a/fpicker/source/win32/misc/WinImplHelper.cxx +++ b/fpicker/source/win32/misc/WinImplHelper.cxx @@ -24,10 +24,6 @@ #include <rtl/ustrbuf.hxx> #include <com/sun/star/uno/Sequence.hxx> -#ifdef _WIN32_WINNT_WINBLUE -#include <VersionHelpers.h> -#endif - using ::com::sun::star::lang::IllegalArgumentException; using ::com::sun::star::uno::Reference; using ::com::sun::star::uno::XInterface; @@ -52,32 +48,6 @@ const sal_Unicode AMPERSAND_SIGN = L'&'; // Windows ME VER_PLATFORM_WIN32_WINDOWS 4 90 -// determine if we are running under Vista or newer OS - -bool SAL_CALL IsWindowsVistaOrNewer() -{ -// the Win32 SDK 8.1 deprecates GetVersionEx() -#ifdef _WIN32_WINNT_WINBLUE - return IsWindowsVistaOrGreater(); -#else - OSVERSIONINFO osvi; - osvi.dwOSVersionInfoSize = sizeof(osvi); - - if(!GetVersionEx(&osvi)) - return false; - - bool bRet = (VER_PLATFORM_WIN32_NT == osvi.dwPlatformId) && - (osvi.dwMajorVersion >= 6); - - bRet = bRet && - (osvi.dwMinorVersion >= - sal::static_int_cast< unsigned int >(0)); - - return bRet; -#endif -} - - void Replace( const OUString& aLabel, sal_Unicode OldChar, sal_Unicode NewChar, OUStringBuffer& aBuffer ) { OSL_ASSERT( aLabel.getLength( ) ); diff --git a/fpicker/source/win32/misc/WinImplHelper.hxx b/fpicker/source/win32/misc/WinImplHelper.hxx index 9102dbfd4dd3..eee2900dc08c 100644 --- a/fpicker/source/win32/misc/WinImplHelper.hxx +++ b/fpicker/source/win32/misc/WinImplHelper.hxx @@ -37,8 +37,6 @@ #include <com/sun/star/uno/Any.hxx> #include <com/sun/star/lang/IllegalArgumentException.hpp> -bool SAL_CALL IsWindowsVistaOrNewer(); - // converts a soffice label to a windows label // the following rules for character replacements // will be done: |