diff options
author | Douglas Mencken <dougmencken@gmail.com> | 2016-01-18 01:11:18 -0500 |
---|---|---|
committer | Chris Sherlock <chris.sherlock79@gmail.com> | 2016-01-27 02:08:48 +0000 |
commit | 32ac2b153abc078a65634aff12660a5e67864d66 (patch) | |
tree | 95d403520965091e577fba76df09a1dd03957fe9 | |
parent | 8fd3e9f3e4c464c8646dbbac15fd0d52b8604b08 (diff) |
tdf#96407 Provide OS X version info for About box
since commits 56a9594649872f4076b6891f & 52856b6ea7b6b01e8a8455ed
the about box now includes information about a version of operating system
Change-Id: Iaf28b555ec1eb3dfe8c6e9b9567fa0dda18741db
Reviewed-on: https://gerrit.libreoffice.org/21564
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
(cherry picked from commit ee27dae3b5df1e3fc63ecb2ee2c2d123fd4c8cff)
Reviewed-on: https://gerrit.libreoffice.org/21805
-rw-r--r-- | vcl/inc/osx/salinst.h | 3 | ||||
-rw-r--r-- | vcl/osx/salinst.cxx | 17 |
2 files changed, 20 insertions, 0 deletions
diff --git a/vcl/inc/osx/salinst.h b/vcl/inc/osx/salinst.h index 5c652414e82e..4a6d12f719dd 100644 --- a/vcl/inc/osx/salinst.h +++ b/vcl/inc/osx/salinst.h @@ -1,3 +1,4 @@ + /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * This file is part of the LibreOffice project. @@ -120,6 +121,8 @@ public: virtual void AddToRecentDocumentList(const OUString& rFileUrl, const OUString& rMimeType, const OUString& rDocumentService) override; + virtual OUString getOSVersion() override; + // dtrans implementation virtual css::uno::Reference< css::uno::XInterface > CreateClipboard( const css::uno::Sequence< css::uno::Any >& i_rArguments ) override; diff --git a/vcl/osx/salinst.cxx b/vcl/osx/salinst.cxx index 8cdce3ffc4f5..b7467be811bf 100644 --- a/vcl/osx/salinst.cxx +++ b/vcl/osx/salinst.cxx @@ -974,6 +974,23 @@ SalSession* AquaSalInstance::CreateSalSession() return nullptr; } +OUString AquaSalInstance::getOSVersion() +{ + NSString * versionString = nullptr; + NSString * sysVersionDictionaryPath = @"/System/Library/CoreServices/SystemVersion.plist"; + NSDictionary * sysVersionDict = [ NSDictionary dictionaryWithContentsOfFile: sysVersionDictionaryPath ]; + if ( sysVersionDict ) + versionString = [ sysVersionDict valueForKey: @"ProductVersion" ]; + + OUString aVersion = "Mac OS X "; + if ( versionString ) + aVersion += OUString::fromUtf8( [ versionString UTF8String ] ); + else + aVersion += "(unknown)"; + + return aVersion; +} + class MacImeStatus : public SalI18NImeStatus { public: |