summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
Diffstat (limited to 'sw')
-rw-r--r--sw/Library_sw.mk2
-rw-r--r--sw/Module_sw.mk2
-rw-r--r--sw/source/core/doc/doc.cxx4
-rw-r--r--sw/source/core/unocore/unocoll.cxx12
-rw-r--r--sw/source/filter/html/htmlbas.cxx4
-rw-r--r--sw/source/filter/ww8/ww8par.cxx4
-rw-r--r--sw/source/uibase/app/docsh.cxx4
-rw-r--r--sw/source/uibase/app/docsh2.cxx4
-rw-r--r--sw/source/uibase/shells/frmsh.cxx4
9 files changed, 27 insertions, 13 deletions
diff --git a/sw/Library_sw.mk b/sw/Library_sw.mk
index 825a193b7459..acf947acc6ed 100644
--- a/sw/Library_sw.mk
+++ b/sw/Library_sw.mk
@@ -71,7 +71,7 @@ $(eval $(call gb_Library_use_libraries,sw,\
tl \
ucbhelper \
utl \
- $(if $(filter TRUE,$(DISABLE_SCRIPTING)),, \
+ $(call gb_Helper_optional,SCRIPTING, \
vbahelper) \
vcl \
xmlreader \
diff --git a/sw/Module_sw.mk b/sw/Module_sw.mk
index ba58d73bba52..d2059683dab7 100644
--- a/sw/Module_sw.mk
+++ b/sw/Module_sw.mk
@@ -38,7 +38,7 @@ $(eval $(call gb_Module_add_l10n_targets,sw,\
UIConfig_qa \
))
-ifneq ($(DISABLE_SCRIPTING),TRUE)
+ifneq ($(filter SCRIPTING,$(BUILD_TYPE)),)
$(eval $(call gb_Module_add_targets,sw,\
Library_vbaswobj \
diff --git a/sw/source/core/doc/doc.cxx b/sw/source/core/doc/doc.cxx
index 3b9dc9f57d7b..6959e49d7f89 100644
--- a/sw/source/core/doc/doc.cxx
+++ b/sw/source/core/doc/doc.cxx
@@ -17,6 +17,8 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <config_features.h>
+
#include <doc.hxx>
#include <DocumentFieldsManager.hxx>
#include <DocumentSettingManager.hxx>
@@ -1706,7 +1708,7 @@ void SwDoc::ChkCondColls()
uno::Reference< script::vba::XVBAEventProcessor >
SwDoc::GetVbaEventProcessor()
{
-#ifndef DISABLE_SCRIPTING
+#if HAVE_FEATURE_SCRIPTING
if( !mxVbaEvents.is() && mpDocShell && ooo::vba::isAlienWordDoc( *mpDocShell ) )
{
try
diff --git a/sw/source/core/unocore/unocoll.cxx b/sw/source/core/unocore/unocoll.cxx
index 09d054089d03..91630f0f96e5 100644
--- a/sw/source/core/unocore/unocoll.cxx
+++ b/sw/source/core/unocore/unocoll.cxx
@@ -17,6 +17,8 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <config_features.h>
+
#include <swtypes.hxx>
#include <cmdid.h>
#include <hintids.hxx>
@@ -89,7 +91,7 @@ using namespace ::com::sun::star::text;
using namespace ::com::sun::star::container;
using namespace ::com::sun::star::lang;
-#ifndef DISABLE_SCRIPTING
+#if HAVE_FEATURE_SCRIPTING
class SwVbaCodeNameProvider : public ::cppu::WeakImplHelper1< document::XCodeNameQuery >
{
@@ -562,7 +564,7 @@ SwXServiceProvider::MakeInstance(sal_uInt16 nObjectType, SwDoc & rDoc)
}
break;
case SW_SERVICE_VBAOBJECTPROVIDER :
-#ifndef DISABLE_SCRIPTING
+#if HAVE_FEATURE_SCRIPTING
{
SwVbaObjectForCodeNameProvider* pObjProv =
new SwVbaObjectForCodeNameProvider(rDoc.GetDocShell());
@@ -571,7 +573,7 @@ SwXServiceProvider::MakeInstance(sal_uInt16 nObjectType, SwDoc & rDoc)
#endif
break;
case SW_SERVICE_VBACODENAMEPROVIDER :
-#ifndef DISABLE_SCRIPTING
+#if HAVE_FEATURE_SCRIPTING
{
if (rDoc.GetDocShell() && ooo::vba::isAlienWordDoc(*rDoc.GetDocShell()))
{
@@ -582,7 +584,7 @@ SwXServiceProvider::MakeInstance(sal_uInt16 nObjectType, SwDoc & rDoc)
#endif
break;
case SW_SERVICE_VBAPROJECTNAMEPROVIDER :
-#ifndef DISABLE_SCRIPTING
+#if HAVE_FEATURE_SCRIPTING
{
uno::Reference< container::XNameContainer > xProjProv = rDoc.GetVBATemplateToProjectCache();
if (!xProjProv.is() && rDoc.GetDocShell()
@@ -596,7 +598,7 @@ SwXServiceProvider::MakeInstance(sal_uInt16 nObjectType, SwDoc & rDoc)
#endif
break;
case SW_SERVICE_VBAGLOBALS :
-#ifndef DISABLE_SCRIPTING
+#if HAVE_FEATURE_SCRIPTING
{
uno::Any aGlobs;
BasicManager *pBasicMan = rDoc.GetDocShell()->GetBasicManager();
diff --git a/sw/source/filter/html/htmlbas.cxx b/sw/source/filter/html/htmlbas.cxx
index 22cb2c845ad1..f05ae7a7c925 100644
--- a/sw/source/filter/html/htmlbas.cxx
+++ b/sw/source/filter/html/htmlbas.cxx
@@ -17,6 +17,8 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <config_features.h>
+
#include <hintids.hxx>
#include <comphelper/string.hxx>
#include <rtl/strbuf.hxx>
@@ -254,7 +256,7 @@ void SwHTMLParser::InsertBasicDocEvent( const OUString& aEvent, const OUString&
void SwHTMLWriter::OutBasic()
{
-#ifndef DISABLE_SCRIPTING
+#if HAVE_FEATURE_SCRIPTING
if( !bCfgStarBasic )
return;
diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index c162f75cfed1..fafab4302037 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -17,6 +17,8 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <config_features.h>
+
#include <sal/config.h>
#include <boost/noncopyable.hpp>
@@ -5175,7 +5177,7 @@ sal_uLong SwWW8ImplReader::CoreLoad(WW8Glossary *pGloss, const SwPosition &rPos)
aArgs[ 0 ] <<= mpDocShell->GetModel();
aGlobs <<= ::comphelper::getProcessServiceFactory()->createInstanceWithArguments( "ooo.vba.word.Globals", aArgs );
-#ifndef DISABLE_SCRIPTING
+#if HAVE_FEATURE_SCRIPTING
BasicManager *pBasicMan = mpDocShell->GetBasicManager();
if (pBasicMan)
pBasicMan->SetGlobalUNOConstant( "VBAGlobals", aGlobs );
diff --git a/sw/source/uibase/app/docsh.cxx b/sw/source/uibase/app/docsh.cxx
index deeb9d74aa06..b7be7533163d 100644
--- a/sw/source/uibase/app/docsh.cxx
+++ b/sw/source/uibase/app/docsh.cxx
@@ -17,6 +17,8 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <config_features.h>
+
#include <hintids.hxx>
#include <vcl/layout.hxx>
#include <vcl/msgbox.hxx>
@@ -582,7 +584,7 @@ bool SwDocShell::ConvertTo( SfxMedium& rMedium )
if( pFlt->GetUserData() == "HTML" )
{
-#ifndef DISABLE_SCRIPTING
+#if HAVE_FEATURE_SCRIPTING
SvxHtmlOptions& rHtmlOpt = SvxHtmlOptions::Get();
if( !rHtmlOpt.IsStarBasic() && rHtmlOpt.IsStarBasicWarning() && HasBasic() )
{
diff --git a/sw/source/uibase/app/docsh2.cxx b/sw/source/uibase/app/docsh2.cxx
index 8117908fa512..a554ebd78ccf 100644
--- a/sw/source/uibase/app/docsh2.cxx
+++ b/sw/source/uibase/app/docsh2.cxx
@@ -17,6 +17,8 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <config_features.h>
+
#include <com/sun/star/drawing/ModuleDispatcher.hpp>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/frame/DispatchHelper.hpp>
@@ -1288,7 +1290,7 @@ void SwDocShell::ReloadFromHtml( const OUString& rStreamName, SwSrcView* pSrcVie
// there are some from Meta-Tags dublicated or triplicated afterwards.
ClearHeaderAttributesForSourceViewHack();
-#ifndef DISABLE_SCRIPTING
+#if HAVE_FEATURE_SCRIPTING
// The Document-Basic also bites the dust ...
// A EnterBasicCall is not needed here, because nothing is called and
// there can't be any Dok-Basic, that has not yet been loaded inside
diff --git a/sw/source/uibase/shells/frmsh.cxx b/sw/source/uibase/shells/frmsh.cxx
index 51d226e6d134..46ec8f3cf8ab 100644
--- a/sw/source/uibase/shells/frmsh.cxx
+++ b/sw/source/uibase/shells/frmsh.cxx
@@ -17,6 +17,8 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <config_features.h>
+
#include <hintids.hxx>
#include <svl/whiter.hxx>
#include <svtools/imapobj.hxx>
@@ -1032,7 +1034,7 @@ void SwFrameShell::ExecFrameStyle(SfxRequest& rReq)
}
//Set distance only if the request is received from the controller.
-#ifndef DISABLE_SCRIPTING
+#if HAVE_FEATURE_SCRIPTING
if(!StarBASIC::IsRunning())
#endif
{