summaryrefslogtreecommitdiff
path: root/sw/source
diff options
context:
space:
mode:
authorTor Lillqvist <tml@iki.fi>2012-03-05 21:41:31 +0200
committerTor Lillqvist <tml@iki.fi>2012-03-05 22:30:12 +0200
commitb344c30ab49b6faf8a24be42bdfcf4e946a861cd (patch)
tree75699c0eb98676e6f9359a44fae78a29594ad751 /sw/source
parentb69285590d704b08852c22dbb5ed073bff9998ce (diff)
Sprinkle more DISABLE_SCRIPTING ifdefs
Diffstat (limited to 'sw/source')
-rw-r--r--sw/source/core/doc/doc.cxx2
-rw-r--r--sw/source/core/unocore/unocoll.cxx13
-rw-r--r--sw/source/filter/html/htmlbas.cxx2
-rw-r--r--sw/source/filter/ww8/ww8par.cxx4
-rw-r--r--sw/source/ui/app/docsh2.cxx2
-rw-r--r--sw/source/ui/shells/frmsh.cxx2
6 files changed, 24 insertions, 1 deletions
diff --git a/sw/source/core/doc/doc.cxx b/sw/source/core/doc/doc.cxx
index 41fba1651f1d..52c9a70da33f 100644
--- a/sw/source/core/doc/doc.cxx
+++ b/sw/source/core/doc/doc.cxx
@@ -2688,6 +2688,7 @@ void SwDoc::ChkCondColls()
uno::Reference< script::vba::XVBAEventProcessor >
SwDoc::GetVbaEventProcessor()
{
+#ifndef DISABLE_SCRIPTING
if( !mxVbaEvents.is() && pDocShell && ooo::vba::isAlienWordDoc( *pDocShell ) )
{
try
@@ -2701,6 +2702,7 @@ SwDoc::GetVbaEventProcessor()
{
}
}
+#endif
return mxVbaEvents;
}
diff --git a/sw/source/core/unocore/unocoll.cxx b/sw/source/core/unocore/unocoll.cxx
index 3ea75523f9af..f5302fb17038 100644
--- a/sw/source/core/unocore/unocoll.cxx
+++ b/sw/source/core/unocore/unocoll.cxx
@@ -97,6 +97,8 @@ using namespace ::com::sun::star::lang;
using rtl::OUString;
+#ifndef DISABLE_SCRIPTING
+
class SwVbaCodeNameProvider : public ::cppu::WeakImplHelper1< document::XCodeNameQuery >
{
SwDocShell* mpDocShell;
@@ -260,6 +262,7 @@ public:
return sal_True;
return sal_False;
}
+
::com::sun::star::uno::Any SAL_CALL getByName( const ::rtl::OUString& aName ) throw (::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException)
{
if ( !hasByName( aName ) )
@@ -282,6 +285,8 @@ public:
};
+#endif
+
struct ProvNamesId_Type
{
const char * pName;
@@ -573,12 +578,15 @@ uno::Reference< uno::XInterface > SwXServiceProvider::MakeInstance(sal_uInt16
}
break;
case SW_SERVICE_VBAOBJECTPROVIDER :
+#ifndef DISABLE_SCRIPTING
{
SwVbaObjectForCodeNameProvider* pObjProv = new SwVbaObjectForCodeNameProvider( pDoc->GetDocShell() );
xRet = (cppu::OWeakObject*)pObjProv;
}
+#endif
break;
case SW_SERVICE_VBACODENAMEPROVIDER :
+#ifndef DISABLE_SCRIPTING
{
if ( pDoc->GetDocShell() && ooo::vba::isAlienWordDoc( *pDoc->GetDocShell() ) )
{
@@ -586,8 +594,10 @@ uno::Reference< uno::XInterface > SwXServiceProvider::MakeInstance(sal_uInt16
xRet = (cppu::OWeakObject*)pObjProv;
}
}
+#endif
break;
case SW_SERVICE_VBAPROJECTNAMEPROVIDER :
+#ifndef DISABLE_SCRIPTING
{
uno::Reference< container::XNameContainer > xProjProv = pDoc->GetVBATemplateToProjectCache();
if ( !xProjProv.is() && pDoc->GetDocShell() && ooo::vba::isAlienWordDoc( *pDoc->GetDocShell() ) )
@@ -598,8 +608,10 @@ uno::Reference< uno::XInterface > SwXServiceProvider::MakeInstance(sal_uInt16
//xRet = (cppu::OWeakObject*)xProjProv;
xRet = xProjProv;
}
+#endif
break;
case SW_SERVICE_VBAGLOBALS :
+#ifndef DISABLE_SCRIPTING
{
if ( pDoc )
{
@@ -614,6 +626,7 @@ uno::Reference< uno::XInterface > SwXServiceProvider::MakeInstance(sal_uInt16
aGlobs >>= xRet;
}
}
+#endif
break;
case SW_SERVICE_TYPE_FOOTNOTE :
diff --git a/sw/source/filter/html/htmlbas.cxx b/sw/source/filter/html/htmlbas.cxx
index 665da0339f82..5fbd867d6d76 100644
--- a/sw/source/filter/html/htmlbas.cxx
+++ b/sw/source/filter/html/htmlbas.cxx
@@ -267,6 +267,7 @@ void SwHTMLParser::InsertBasicDocEvent( rtl::OUString aEvent, const String& rNam
void SwHTMLWriter::OutBasic()
{
+#ifndef DISABLE_SCRIPTING
if( !bCfgStarBasic )
return;
@@ -319,6 +320,7 @@ void SwHTMLWriter::OutBasic()
eDestEnc, &aNonConvertableCharacters );
}
}
+#endif
}
static const char* aEventNames[] =
diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index f417f3d20328..3b34027c5e65 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -4610,10 +4610,12 @@ sal_uLong SwWW8ImplReader::CoreLoad(WW8Glossary *pGloss, const SwPosition &rPos)
uno::Sequence< uno::Any > aArgs(1);
aArgs[ 0 ] <<= mpDocShell->GetModel();
aGlobs <<= ::comphelper::getProcessServiceFactory()->createInstanceWithArguments( "ooo.vba.word.Globals", aArgs );
+
+#ifndef DISABLE_SCRIPTING
BasicManager *pBasicMan = mpDocShell->GetBasicManager();
if (pBasicMan)
pBasicMan->SetGlobalUNOConstant( "VBAGlobals", aGlobs );
-
+#endif
BasicProjImportHelper aBasicImporter( *mpDocShell );
// Import vba via oox filter
bool bRet = aBasicImporter.import( mpDocShell->GetMedium()->GetInputStream() );
diff --git a/sw/source/ui/app/docsh2.cxx b/sw/source/ui/app/docsh2.cxx
index 707899b2a961..46cd7092d77f 100644
--- a/sw/source/ui/app/docsh2.cxx
+++ b/sw/source/ui/app/docsh2.cxx
@@ -1583,6 +1583,7 @@ void SwDocShell::ReloadFromHtml( const String& rStreamName, SwSrcView* pSrcView
// there are some from Meta-Tags dublicated or triplicated afterwards.
ClearHeaderAttributesForSourceViewHack();
+#ifndef DISABLE_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
@@ -1623,6 +1624,7 @@ void SwDocShell::ReloadFromHtml( const String& rStreamName, SwSrcView* pSrcView
"Deleting Basics didn't work" );
}
}
+#endif
sal_Bool bWasBrowseMode = pDoc->get(IDocumentSettingAccess::BROWSE_MODE);
RemoveLink();
diff --git a/sw/source/ui/shells/frmsh.cxx b/sw/source/ui/shells/frmsh.cxx
index 58917a49e844..504efda20739 100644
--- a/sw/source/ui/shells/frmsh.cxx
+++ b/sw/source/ui/shells/frmsh.cxx
@@ -1100,7 +1100,9 @@ void SwFrameShell::ExecFrameStyle(SfxRequest& rReq)
}
//Distance nur setzen, wenn der Request vom Controller kommt
+#ifndef DISABLE_SCRIPTING
if(!StarBASIC::IsRunning())
+#endif
{
aNewBox.SetDistance( rBoxItem.GetDistance() );
}