summaryrefslogtreecommitdiffstats
path: root/desktop
diff options
context:
space:
mode:
authorPranav Kant <pranavk@collabora.com>2016-06-21 20:23:13 +0530
committerPranav Kant <pranavk@collabora.com>2016-06-21 22:08:51 +0530
commitd7b45c97b30f109aff0be6602a8fc8103af71e7f (patch)
tree9fc15ce9bd69df67a336107e734d8b38bf8de015 /desktop
parentconnecitivty: [loplugin:nullptr] (diff)
downloadcore-d7b45c97b30f109aff0be6602a8fc8103af71e7f.tar.gz
core-d7b45c97b30f109aff0be6602a8fc8103af71e7f.zip
lok: Change version string to JSON format
Change-Id: Ie1264fed9964b09006980df2e151e170b48b4082
Diffstat (limited to 'desktop')
-rw-r--r--desktop/source/lib/init.cxx10
1 files changed, 9 insertions, 1 deletions
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 2d30a3239e56..ab765dce3538 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -2007,7 +2007,15 @@ static void lo_setDocumentPassword(LibreOfficeKit* pThis,
static char* lo_getVersionInfo(LibreOfficeKit* /*pThis*/)
{
- const OString sVersionStr = OUStringToOString(ReplaceStringHookProc("%PRODUCTNAME %PRODUCTVERSION %PRODUCTEXTENSION %BUILDID"), RTL_TEXTENCODING_UTF8);
+ const OUString sVersionStrTemplate(
+ "{ "
+ "\"ProductName\": \"%PRODUCTNAME\", "
+ "\"ProductVersion\": \"%PRODUCTVERSION\", "
+ "\"ProductExtension\": \"%PRODUCTEXTENSION\", "
+ "\"BuildId\": \"%BUILDID\" "
+ "}"
+ );
+ const OString sVersionStr = OUStringToOString(ReplaceStringHookProc(sVersionStrTemplate), RTL_TEXTENCODING_UTF8);
char* pVersion = static_cast<char*>(malloc(sVersionStr.getLength() + 1));
strcpy(pVersion, sVersionStr.getStr());