summaryrefslogtreecommitdiff
path: root/scripting
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2019-10-28 18:59:57 +0300
committerMike Kaganski <mike.kaganski@collabora.com>2019-11-09 09:53:38 +0100
commitd628258f279d003ba4e11f1f7e2e69273acd008c (patch)
tree15eb418ed03271538d1155402d41f8d1778937a6 /scripting
parent7e7e97fc0bd2f3d7b794b3fc064c60ef86e9b72b (diff)
tdf#80731: Only check closing parenthesis when in IDE
This reinstates the fix by Pierre Lepage, which was reverted in 351dead74b4c213b13102f81b5ae9bb47ad8ca39, and makes sure it only has effect when the compilation is started from IDE. The idea is that the IDE is used primarily for development, and that's a good opportunity to detect any error in the code. When the code is compiled from outside of the IDE (like running an extension), the error is tolerated to allow users run the legacy code having this error. Hopefully this is enough for tdf#106529. This re-uses comphelper's NoEnableJavaInteractionContext class, which is converted into general-purpose SetFlagContext class to avoid code duplication. Change-Id: Ie290019cb190b8d1d590699ec13bd63eac478d09 Reviewed-on: https://gerrit.libreoffice.org/81616 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'scripting')
-rw-r--r--scripting/source/provider/MasterScriptProvider.cxx6
1 files changed, 2 insertions, 4 deletions
diff --git a/scripting/source/provider/MasterScriptProvider.cxx b/scripting/source/provider/MasterScriptProvider.cxx
index 9367ea4c4236..41d64c0704f2 100644
--- a/scripting/source/provider/MasterScriptProvider.cxx
+++ b/scripting/source/provider/MasterScriptProvider.cxx
@@ -18,7 +18,7 @@
*/
-#include <comphelper/DisableInteractionHelper.hxx>
+#include <comphelper/SetFlagContextHelper.hxx>
#include <comphelper/documentinfo.hxx>
#include <cppuhelper/implementationentry.hxx>
@@ -26,7 +26,6 @@
#include <cppuhelper/factory.hxx>
#include <cppuhelper/supportsservice.hxx>
#include <tools/diagnose_ex.h>
-#include <uno/current_context.hxx>
#include <com/sun/star/frame/XModel.hpp>
#include <com/sun/star/lang/EventObject.hpp>
@@ -479,8 +478,7 @@ template <typename Proc> bool FindProviderAndApply(ProviderCache& rCache, Proc p
// This allows us to avoid useless user interaction in case when other provider
// (not JVM) actually handles the operation.
{
- css::uno::ContextLayer layer(
- new comphelper::NoEnableJavaInteractionContext(css::uno::getCurrentContext()));
+ css::uno::ContextLayer layer(comphelper::NoEnableJavaInteractionContext());
bSuccess = pass();
}
// 2. Now retry asking to enable JVM in case we didn't succeed first time