From b547b18fa0e90ed1dc89a7ea553af24c2166ad51 Mon Sep 17 00:00:00 2001 From: Tor Lillqvist Date: Thu, 22 Mar 2018 10:43:31 +0200 Subject: 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 Tested-by: Tor Lillqvist (cherry picked from commit 3f3b7b38df42695c934d6382659db1b79b236c28) --- extensions/source/ole/servprov.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'extensions') diff --git a/extensions/source/ole/servprov.cxx b/extensions/source/ole/servprov.cxx index 4cf615a0b778..10ce1843d45d 100644 --- a/extensions/source/ole/servprov.cxx +++ b/extensions/source/ole/servprov.cxx @@ -476,8 +476,8 @@ OleServer::OleServer( const Reference& smgr): (void) provideInstance( [&] { - const Reference xWordGlobals = m_smgr->createInstance("ooo.vba.word.Globals"); - xWordGlobals->acquire(); + // We want just one SwVbaGlobals for all Automation clients + static const Reference xWordGlobals = m_smgr->createInstance("ooo.vba.word.Globals"); const Reference xHelperInterface(xWordGlobals, UNO_QUERY); Any aApplication = xHelperInterface->Application(); Reference xApplication; -- cgit v1.2.3