summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTamas Bunth <tamas.bunth@collabora.co.uk>2017-06-29 11:46:31 +0200
committerTamás Bunth <btomi96@gmail.com>2017-06-30 09:45:05 +0200
commit5c5a49eda1555db7b7519e9b0398cfd469c9bcb5 (patch)
treed87c81311acb729327af3946c82db720eb6fc006
parent489a6ba4aab012bf71d5f6783c0e9cc1c207d1d6 (diff)
oovbaapi: implement Application.GetOperatingSystem
Without version number of the system for now. Documentation: https://msdn.microsoft.com/en-us/vba/excel-vba/articles/application-operatingsystem-property-excel Change-Id: I0c76ea3909ecaa3896823136b3a3ebf2a2fdb4d1 Reviewed-on: https://gerrit.libreoffice.org/39383 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tamás Bunth <btomi96@gmail.com>
-rw-r--r--sc/source/ui/vba/vbaapplication.cxx15
1 files changed, 12 insertions, 3 deletions
diff --git a/sc/source/ui/vba/vbaapplication.cxx b/sc/source/ui/vba/vbaapplication.cxx
index e678d58a67d4..f751ccff7f65 100644
--- a/sc/source/ui/vba/vbaapplication.cxx
+++ b/sc/source/ui/vba/vbaapplication.cxx
@@ -917,9 +917,18 @@ ScVbaApplication::getPathSeparator()
OUString SAL_CALL
ScVbaApplication::getOperatingSystem()
{
- // TODO implement
- SAL_WARN("sc", "not implemented");
- return OUString();
+ // TODO Solution should contain the version number of the operating system
+ // too.
+#if defined(_WIN32)
+ return OUString("Windows");
+#elif defined(MACOSX)
+ return OUString("Macintosh");
+#elif defined(UNX)
+ // M. Office is not available on Unix systems, so it is not documented.
+ return OUString("Unix");
+#else
+ return OUString("Unknown");
+#endif
}
// Helpers for Intersect and Union