[Libreoffice-commits] core.git: Branch 'libreoffice-5-1' - vcl/inc vcl/osx
Douglas Mencken
dougmencken at gmail.com
Tue Jan 26 18:09:26 PST 2016
vcl/inc/osx/salinst.h | 3 +++
vcl/osx/salinst.cxx | 17 +++++++++++++++++
2 files changed, 20 insertions(+)
New commits:
commit 32ac2b153abc078a65634aff12660a5e67864d66
Author: Douglas Mencken <dougmencken at gmail.com>
Date: Mon Jan 18 01:11:18 2016 -0500
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 at libreoffice.org>
Reviewed-by: Chris Sherlock <chris.sherlock79 at gmail.com>
(cherry picked from commit ee27dae3b5df1e3fc63ecb2ee2c2d123fd4c8cff)
Reviewed-on: https://gerrit.libreoffice.org/21805
diff --git a/vcl/inc/osx/salinst.h b/vcl/inc/osx/salinst.h
index 5c65241..4a6d12f 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 8cdce3f..b7467be 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:
More information about the Libreoffice-commits
mailing list