[Libreoffice-commits] online.git: kit/Kit.cpp
Henry Castro
hcastro at collabora.com
Sat Dec 17 12:36:29 UTC 2016
kit/Kit.cpp | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
New commits:
commit f0c5e907ab136c2daa823aa90e674994e89a4e8d
Author: Henry Castro <hcastro at collabora.com>
Date: Sat Dec 17 08:32:49 2016 -0400
kit: debug, simulate loading document
Very useful when the bug is reproducible in the preinit, init lokit stages,
so the scenario can be isolated.
diff --git a/kit/Kit.cpp b/kit/Kit.cpp
index 8c7b95d..6f40370 100644
--- a/kit/Kit.cpp
+++ b/kit/Kit.cpp
@@ -1716,6 +1716,25 @@ void lokit_main(const std::string& childRoot,
return TerminationFlag.load();
});
+#if 0
+ std::string uri = "file://$HOME/docs/basic-presentation.pptx";
+ std::shared_ptr<lok::Document> loKitDoc;
+
+ const auto flags = LOK_FEATURE_DOCUMENT_PASSWORD
+ | LOK_FEATURE_DOCUMENT_PASSWORD_TO_MODIFY
+ | LOK_FEATURE_PART_IN_INVALIDATION_CALLBACK;
+ loKit->setOptionalFeatures(flags);
+ loKitDoc.reset(loKit->documentLoad(uri.c_str()));
+ if (!loKitDoc || !loKitDoc->get())
+ {
+ LOG_ERR("Failed to load: " << uri << ", error: " << loKit->getError());
+ std::_Exit(Application::EXIT_OK);
+ }
+
+ // specific case to debug
+ // ...
+#endif
+
// Let forkit handle the jail cleanup.
}
catch (const Exception& exc)
More information about the Libreoffice-commits
mailing list