summaryrefslogtreecommitdiff
path: root/extensions
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2018-03-22 10:43:31 +0200
committerTor Lillqvist <tml@collabora.com>2018-05-31 21:41:35 +0300
commitb547b18fa0e90ed1dc89a7ea553af24c2166ad51 (patch)
treef4ec27840c572d0f6c832f6eefca1e8220b2d3f5 /extensions
parenta4f2b65e4f32f523484ce51b12ebbe78816c2769 (diff)
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@collabora.com> Tested-by: Tor Lillqvist <tml@collabora.com> (cherry picked from commit 3f3b7b38df42695c934d6382659db1b79b236c28)
Diffstat (limited to 'extensions')
-rw-r--r--extensions/source/ole/servprov.cxx4
1 files changed, 2 insertions, 2 deletions
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<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;