summaryrefslogtreecommitdiff
path: root/vcl/osx
diff options
context:
space:
mode:
authorDouglas Mencken <dougmencken@gmail.com>2016-01-18 01:11:18 -0500
committerChris Sherlock <chris.sherlock79@gmail.com>2016-01-22 07:21:26 +0000
commitee27dae3b5df1e3fc63ecb2ee2c2d123fd4c8cff (patch)
tree5221bd5435af1577d77acde3565650c3e1667969 /vcl/osx
parent3b9f894b40ed6df39949ac1442adee34cf65d7bf (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>
Diffstat (limited to 'vcl/osx')
-rw-r--r--vcl/osx/salinst.cxx17
1 files changed, 17 insertions, 0 deletions
diff --git a/vcl/osx/salinst.cxx b/vcl/osx/salinst.cxx
index 153998a63be8..41ad480e50a4 100644
--- a/vcl/osx/salinst.cxx
+++ b/vcl/osx/salinst.cxx
@@ -976,6 +976,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: