summaryrefslogtreecommitdiff
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
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>
-rw-r--r--vcl/inc/osx/salinst.h3
-rw-r--r--vcl/osx/salinst.cxx17
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 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: