diff options
author | Jon Nermut <jon.nermut@asdeqlabs.com> | 2018-01-18 20:38:00 +1100 |
---|---|---|
committer | jan iversen <jani@libreoffice.org> | 2018-01-18 11:51:48 +0100 |
commit | 0c6cfea81e99a815c35b1a0e908a29bc6dc424f1 (patch) | |
tree | 1e67f4db10f9f5584e3a28064e1b567a2655d0a6 /ios/LibreOfficeLight | |
parent | bccb5c54cdcaaea09ee8a3929c7bcc4b94972c11 (diff) |
iOS: add a temporarily exposed function that calls CallbackFlushHandler::Invoke in order to manually flush the callback queue. To be reverted once the callback problem is solved.
Change-Id: I95273b8a01eec62f639edd6767f69e02a294d8aa
Reviewed-on: https://gerrit.libreoffice.org/48101
Reviewed-by: jan iversen <jani@libreoffice.org>
Tested-by: jan iversen <jani@libreoffice.org>
Diffstat (limited to 'ios/LibreOfficeLight')
3 files changed, 18 insertions, 0 deletions
diff --git a/ios/LibreOfficeLight/LibreOfficeLight/LOKit/Document.swift b/ios/LibreOfficeLight/LibreOfficeLight/LOKit/Document.swift index f708334f5c97..79e28d674595 100644 --- a/ios/LibreOfficeLight/LibreOfficeLight/LOKit/Document.swift +++ b/ios/LibreOfficeLight/LibreOfficeLight/LOKit/Document.swift @@ -536,6 +536,12 @@ open class Document { docClass.setViewLanguage(pDoc, id, language); } + + public func invokeHandlers() + { + temporaryHackToInvokeCallbackHandlers(pDoc) + + } } diff --git a/ios/LibreOfficeLight/LibreOfficeLight/LOKit/LOKitThread.swift b/ios/LibreOfficeLight/LibreOfficeLight/LOKit/LOKitThread.swift index 314ef0355f3f..e8f60e0f2119 100644 --- a/ios/LibreOfficeLight/LibreOfficeLight/LOKit/LOKitThread.swift +++ b/ios/LibreOfficeLight/LibreOfficeLight/LOKit/LOKitThread.swift @@ -212,6 +212,15 @@ public class DocumentHolder { closure(self.doc) } + self.invokeHandlers() + } + + public func invokeHandlers() + { + LOKitThread.instance.async + { + self.doc.invokeHandlers() + } } /// Gives sync access to the document - blocks until the closure runs. @@ -220,6 +229,7 @@ public class DocumentHolder { return LOKitThread.instance.sync { + self.invokeHandlers() return closure(self.doc) } } diff --git a/ios/LibreOfficeLight/LibreOfficeLight/lokit-Bridging-Header.h b/ios/LibreOfficeLight/LibreOfficeLight/lokit-Bridging-Header.h index bc276e9d31e2..67feadb801f3 100644 --- a/ios/LibreOfficeLight/LibreOfficeLight/lokit-Bridging-Header.h +++ b/ios/LibreOfficeLight/LibreOfficeLight/lokit-Bridging-Header.h @@ -12,3 +12,5 @@ // as its own xCode project. #define LOK_USE_UNSTABLE_API #import "../../source/LibreOfficeKit.h" + +void temporaryHackToInvokeCallbackHandlers(LibreOfficeKitDocument* pThis); |