summaryrefslogtreecommitdiff
path: root/framework/source/loadenv/loadenv.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'framework/source/loadenv/loadenv.cxx')
-rw-r--r--framework/source/loadenv/loadenv.cxx10
1 files changed, 9 insertions, 1 deletions
diff --git a/framework/source/loadenv/loadenv.cxx b/framework/source/loadenv/loadenv.cxx
index 4703d1cf5161..b527d0259e77 100644
--- a/framework/source/loadenv/loadenv.cxx
+++ b/framework/source/loadenv/loadenv.cxx
@@ -28,6 +28,7 @@
#include <services.h>
#include <comphelper/interaction.hxx>
#include <comphelper/lok.hxx>
+#include <comphelper/namedvaluecollection.hxx>
#include <comphelper/propertysequence.hxx>
#include <framework/interaction.hxx>
#include <comphelper/processfactory.hxx>
@@ -152,11 +153,18 @@ css::uno::Reference< css::lang::XComponent > LoadEnv::loadComponentFromURL(const
{
LoadEnv aEnv(xContext);
+ LoadEnvFeatures loadEnvFeatures = LoadEnvFeatures::WorkWithUI;
+ comphelper::NamedValueCollection aDescriptor( lArgs );
+ // tdf#118238 Only disable UI interaction when loading as hidden
+ if (aDescriptor.get("Hidden") == uno::Any(true) || Application::IsHeadlessModeEnabled())
+ loadEnvFeatures = LoadEnvFeatures::NONE;
+
aEnv.initializeLoading(sURL,
lArgs,
css::uno::Reference< css::frame::XFrame >(xLoader, css::uno::UNO_QUERY),
sTarget,
- nFlags);
+ nFlags,
+ loadEnvFeatures);
aEnv.startLoading();
aEnv.waitWhileLoading(); // wait for ever!