[Libreoffice-commits] core.git: Branch 'private/kohei/headless-perf' - 2 commits - sfx2/source

Kohei Yoshida kohei.yoshida at collabora.com
Wed May 28 10:40:20 PDT 2014


 sfx2/source/doc/objxtor.cxx |    8 ++++++++
 1 file changed, 8 insertions(+)

New commits:
commit 1c64f3f56c1c19207a6f82cf890deaef318e9e14
Author: Kohei Yoshida <kohei.yoshida at collabora.com>
Date:   Wed May 28 13:40:19 2014 -0400

    Avoid handling basic manager etc when the embedded scripts are disabled.
    
    This saves a bit of time.
    
    Change-Id: If49f514f6e927830b1f45f4c34587d92429decc5

diff --git a/sfx2/source/doc/objxtor.cxx b/sfx2/source/doc/objxtor.cxx
index 6a70a33..368858c 100644
--- a/sfx2/source/doc/objxtor.cxx
+++ b/sfx2/source/doc/objxtor.cxx
@@ -940,6 +940,11 @@ void SfxObjectShell::SetCurrentComponent( const Reference< XInterface >& _rxComp
     // but we should have filtered quite some unnecessary calls already.
 
 #ifndef DISABLE_SCRIPTING
+    Reference<document::XEmbeddedScripts> xScripts(_rxComponent, UNO_QUERY);
+    if (!xScripts.is())
+        // Likely BASIC is disabled.
+        return;
+
     BasicManager* pAppMgr = SFX_APP()->GetBasicManager();
     rTheCurrentComponent = _rxComponent;
     if ( pAppMgr )
commit 4ed2dd68567d1c2383181f168d8cec315962d5cf
Author: Kohei Yoshida <kohei.yoshida at collabora.com>
Date:   Wed May 28 12:58:26 2014 -0400

    Don't return basic manager when scripting is disabled.
    
    Change-Id: I782bb4071f89555d93aa87e5b1b28194c907633d

diff --git a/sfx2/source/doc/objxtor.cxx b/sfx2/source/doc/objxtor.cxx
index fabd427..6a70a33 100644
--- a/sfx2/source/doc/objxtor.cxx
+++ b/sfx2/source/doc/objxtor.cxx
@@ -694,6 +694,9 @@ BasicManager* SfxObjectShell::GetBasicManager() const
 #ifdef DISABLE_SCRIPTING
     return NULL;
 #else
+    if (pImp->m_bNoBasicCapabilities)
+        return NULL;
+
     BasicManager* pBasMgr = lcl_getBasicManagerForDocument( *this );
     if ( !pBasMgr )
         pBasMgr = SFX_APP()->GetBasicManager();


More information about the Libreoffice-commits mailing list