diff --git a/basic/source/comp/exprtree.cxx b/basic/source/comp/exprtree.cxx index cd6094db736b..bc9f4d5b3b94 100644 --- a/basic/source/comp/exprtree.cxx +++ b/basic/source/comp/exprtree.cxx @@ -22,8 +22,8 @@ #include #include #include +#include #include -#include SbiExpression::SbiExpression( SbiParser* p, SbiExprType t, SbiExprMode eMode, const KeywordSymbolInfo* pKeywordSymbolInfo ) @@ -1042,10 +1042,7 @@ SbiExprListPtr SbiExprList::ParseParameters( SbiParser* pParser, bool bStandalon // tdf#106529: only fail here in strict mode (i.e. when compiled from IDE), and // allow legacy code with missing closing parenthesis when started e.g. from // extensions and event handlers - bool bCheckStrict = false; - if (auto xContext = css::uno::getCurrentContext()) - xContext->getValueByName("BasicStrict") >>= bCheckStrict; - if (bCheckStrict) + if (comphelper::IsContextFlagActive("BasicStrict")) { pParser->Error(ERRCODE_BASIC_EXPECTED, RPAREN); pExprList->bError = true; diff --git a/stoc/source/javavm/javavm.cxx b/stoc/source/javavm/javavm.cxx index c2c5f469e914..8600a23eb759 100644 --- a/stoc/source/javavm/javavm.cxx +++ b/stoc/source/javavm/javavm.cxx @@ -48,6 +48,7 @@ #include #include #include +#include #include #include #include @@ -652,11 +653,7 @@ JavaVirtualMachine::getJavaVM(css::uno::Sequence< sal_Int8 > const & rProcessId) } case JFW_E_JAVA_DISABLED: { - bool bDontEnableJava = false; - auto xContext(css::uno::getCurrentContext()); - if (xContext.is()) - xContext->getValueByName("DontEnableJava") >>= bDontEnableJava; - if (bDontEnableJava) + if (comphelper::IsContextFlagActive("DontEnableJava")) return css::uno::Any(); //QueryBox: