summaryrefslogtreecommitdiff
path: root/forms
diff options
context:
space:
mode:
authorNoel Power <noel.power@suse.com>2013-05-03 14:21:10 +0100
committerNoel Power <noel.power@suse.com>2013-05-09 14:11:20 +0100
commit2f3359dbe86ad5b64b1c8e5c41b2fec3be9242a5 (patch)
treefc7cba5b4ea012217eb6fff2e98230f9f160b017 /forms
parent7e735236e93754078dffa0c5c85316be87a5ce9f (diff)
fix memory leak with orphaned controls created on the fly
Diffstat (limited to 'forms')
-rw-r--r--forms/source/misc/InterfaceContainer.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/forms/source/misc/InterfaceContainer.cxx b/forms/source/misc/InterfaceContainer.cxx
index 43253b8d1e38..3a1361db17cc 100644
--- a/forms/source/misc/InterfaceContainer.cxx
+++ b/forms/source/misc/InterfaceContainer.cxx
@@ -149,7 +149,8 @@ void OInterfaceContainer::impl_addVbEvents_nolck_nothrow( const sal_Int32 i_nIn
xProps->getPropertyValue( OUString("DefaultControl") ) >>= sServiceName;
Reference< ooo::vba::XVBAToOOEventDescGen > xDescSupplier( m_xServiceFactory->createInstance( OUString("ooo.vba.VBAToOOEventDesc") ), UNO_QUERY_THROW );
- Sequence< ScriptEventDescriptor > vbaEvents = xDescSupplier->getEventDescriptions( m_xServiceFactory->createInstance( sServiceName ), sCodeName );
+ Sequence< ScriptEventDescriptor > vbaEvents = xDescSupplier->getEventDescriptions( sServiceName , sCodeName );
+
// register the vba script events
m_xEventAttacher->registerScriptEvents( i_nIndex, vbaEvents );
}