diff options
author | Caolán McNamara <caolan.mcnamara@collabora.com> | 2024-11-11 14:20:16 +0000 |
---|---|---|
committer | Caolán McNamara <caolan.mcnamara@collabora.com> | 2024-11-11 22:33:36 +0100 |
commit | 8c6972a49020e6e09936e6bece1347627a963337 (patch) | |
tree | 8e63226363376ee57419bd6b8f15090781174796 | |
parent | 0de900cec7b04d75cf9ab0779d7a1ca3c730ae32 (diff) |
add AbortOnLoadFailure to optionally assert on failure to load
intended for use with crashtesting to detect when we export something we
can't import
Change-Id: I80c2f5198f8695c00a68cf09d4512d56c5a537a0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176412
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
-rw-r--r-- | framework/source/loadenv/loadenv.cxx | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/framework/source/loadenv/loadenv.cxx b/framework/source/loadenv/loadenv.cxx index 994d2f7306cd..328152765c93 100644 --- a/framework/source/loadenv/loadenv.cxx +++ b/framework/source/loadenv/loadenv.cxx @@ -204,6 +204,10 @@ css::uno::Reference< css::lang::XComponent > LoadEnv::loadComponentFromURL(const } } + // if AbortOnLoadFailure is set and we couldn't load the document, assert, intended for use with crashtesting to + // detect when we export something we can't import + assert(xComponent.is() || comphelper::NamedValueCollection::get(lArgs, u"AbortOnLoadFailure") != uno::Any(true)); + return xComponent; } |