[Libreoffice-commits] core.git: 2 commits - desktop/source include/LibreOfficeKit

Tor Lillqvist tml at collabora.com
Wed May 6 11:19:39 PDT 2015


 desktop/source/lib/init.cxx               |    4 +---
 include/LibreOfficeKit/LibreOfficeKit.hxx |    4 ++--
 2 files changed, 3 insertions(+), 5 deletions(-)

New commits:
commit 968091e1fcd1805073a60a3f7c271009bae41bce
Author: Tor Lillqvist <tml at collabora.com>
Date:   Wed May 6 21:17:51 2015 +0300

    Enable passing in a UserInstallation also in the C++ API
    
    Change-Id: I0549a58bc6cebdfd9d69c078b4a6e8a891182019

diff --git a/include/LibreOfficeKit/LibreOfficeKit.hxx b/include/LibreOfficeKit/LibreOfficeKit.hxx
index 0140348..bd8832a 100644
--- a/include/LibreOfficeKit/LibreOfficeKit.hxx
+++ b/include/LibreOfficeKit/LibreOfficeKit.hxx
@@ -284,9 +284,9 @@ public:
 };
 
 /// Factory method to create a lok::Office instance.
-inline Office* lok_cpp_init(const char* pInstallPath)
+inline Office* lok_cpp_init(const char* pInstallPath, const char* pUserProfilePath = NULL)
 {
-    LibreOfficeKit* pThis = lok_init(pInstallPath);
+    LibreOfficeKit* pThis = lok_init_2(pInstallPath, pUserProfilePath);
     if (pThis == NULL || pThis->pClass->nSize == 0)
         return NULL;
     return new ::lok::Office(pThis);
commit 713a8f3f53028b89f0836f86923370515a210585
Author: Tor Lillqvist <tml at collabora.com>
Date:   Wed May 6 21:15:59 2015 +0300

    Nah, the Android NDK we use doesn't have std::to_string()
    
    So do the verbose OUString::number().toUtf8().getStr() dance.
    
    Change-Id: Ied5f6c3ec936544f0f36eeafd07f9496e9061373

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index fcfa33f..4cdce60 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -9,8 +9,6 @@
 
 #include <config_folders.h>
 
-#include <string>
-
 #include <stdio.h>
 #include <string.h>
 #include <stdlib.h>
@@ -905,7 +903,7 @@ static void lo_status_indicator_callback(void *data, comphelper::LibreOfficeKit:
         pLib->mpCallback(LOK_CALLBACK_STATUS_INDICATOR_START, 0, pLib->mpCallbackData);
         break;
     case comphelper::LibreOfficeKit::statusIndicatorCallbackType::SetValue:
-        pLib->mpCallback(LOK_CALLBACK_STATUS_INDICATOR_SET_VALUE, std::to_string(percent).c_str(), pLib->mpCallbackData);
+        pLib->mpCallback(LOK_CALLBACK_STATUS_INDICATOR_SET_VALUE, OUString::number(percent).toUtf8().getStr(), pLib->mpCallbackData);
         break;
     case comphelper::LibreOfficeKit::statusIndicatorCallbackType::Finish:
         pLib->mpCallback(LOK_CALLBACK_STATUS_INDICATOR_FINISH, 0, pLib->mpCallbackData);


More information about the Libreoffice-commits mailing list