[Libreoffice-commits] core.git: extensions/source

Tor Lillqvist tml at collabora.com
Wed May 30 22:21:12 UTC 2018


 extensions/source/ole/servprov.cxx |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 3f3b7b38df42695c934d6382659db1b79b236c28
Author: Tor Lillqvist <tml at collabora.com>
Date:   Thu Mar 22 10:43:31 2018 +0200

    We want just one SwVbaGlobals and SwVbaApplication for all Automation clients
    
    I think. Anyway, if it turns out we do want one per client, easy to
    revert this. (And it isn't very common to have several Automation
    clients connected at the same time anyway, surely.)
    
    There will still additionally be one SwVbaGlobals (and
    SwVbaApplication) per open document with a StarBasic interpreter,
    though. I think.
    
    Change-Id: I5f7dbfd65b5decb152c1192298bc85dcf6027d64
    Reviewed-on: https://gerrit.libreoffice.org/55094
    Reviewed-by: Tor Lillqvist <tml at collabora.com>
    Tested-by: Tor Lillqvist <tml at collabora.com>

diff --git a/extensions/source/ole/servprov.cxx b/extensions/source/ole/servprov.cxx
index f316e86a9f5c..843e6c128af0 100644
--- a/extensions/source/ole/servprov.cxx
+++ b/extensions/source/ole/servprov.cxx
@@ -476,8 +476,8 @@ OleServer::OleServer( const Reference<XMultiServiceFactory>& smgr):
 
     (void) provideInstance( [&]
                             {
-                                const Reference<XInterface> xWordGlobals = m_smgr->createInstance("ooo.vba.word.Globals");
-                                xWordGlobals->acquire();
+                                // We want just one SwVbaGlobals for all Automation clients
+                                static const Reference<XInterface> xWordGlobals = m_smgr->createInstance("ooo.vba.word.Globals");
                                 const Reference<ooo::vba::XHelperInterface> xHelperInterface(xWordGlobals, UNO_QUERY);
                                 Any aApplication = xHelperInterface->Application();
                                 Reference<XInterface> xApplication;


More information about the Libreoffice-commits mailing list