summaryrefslogtreecommitdiff
path: root/basctl
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 /basctl
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 'basctl')
-rw-r--r--basctl/source/basicide/baside2.cxx7
1 files changed, 6 insertions, 1 deletions
diff --git a/basctl/source/basicide/baside2.cxx b/basctl/source/basicide/baside2.cxx
index e8bac4aa19af..af35a3a3dc7b 100644
--- a/basctl/source/basicide/baside2.cxx
+++ b/basctl/source/basicide/baside2.cxx
@@ -36,6 +36,7 @@
#include <com/sun/star/ui/dialogs/TemplateDescription.hpp>
#include <com/sun/star/ui/dialogs/FilePicker.hpp>
#include <com/sun/star/ui/dialogs/XFilePickerControlAccess.hpp>
+#include <comphelper/SetFlagContextHelper.hxx>
#include <comphelper/string.hxx>
#include <svl/srchdefs.hxx>
#include <svtools/ehdl.hxx>
@@ -282,7 +283,11 @@ void ModulWindow::CheckCompileBasic()
bool bWasModified = GetBasic()->IsModified();
- bDone = m_xModule->Compile();
+ {
+ // tdf#106529: only use strict compilation mode when compiling from the IDE
+ css::uno::ContextLayer layer(comphelper::NewFlagContext("BasicStrict"));
+ bDone = m_xModule->Compile();
+ }
if ( !bWasModified )
GetBasic()->SetModified(false);