summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2013-01-07 12:43:26 +0100
committerStephan Bergmann <sbergman@redhat.com>2013-01-07 12:43:26 +0100
commit5637b244cfe0c6b886188f71d3f974ef72abb9cd (patch)
treec726236ca9938d630bfea1bd6e0db304741f1bbf /svx
parent9b62bbc91e91b6b724dbf95c6977cc6cc049edb1 (diff)
UNO objects must be allocated on the heap
This was a regression introduced with 6da90944b5134d65bfbd7dcaf024956aa139efc1 "ugly memory leak." Change-Id: Ie976d7ddcdac974aeeba14ffd64c4641b5d096a4
Diffstat (limited to 'svx')
-rw-r--r--svx/source/tbxctrls/tbunosearchcontrollers.cxx13
1 files changed, 9 insertions, 4 deletions
diff --git a/svx/source/tbxctrls/tbunosearchcontrollers.cxx b/svx/source/tbxctrls/tbunosearchcontrollers.cxx
index 91efdc3134bf..9cda39023530 100644
--- a/svx/source/tbxctrls/tbunosearchcontrollers.cxx
+++ b/svx/source/tbxctrls/tbunosearchcontrollers.cxx
@@ -767,25 +767,30 @@ void SAL_CALL FindbarDispatcher::removeStatusListener( const css::uno::Reference
css::uno::Reference< css::uno::XInterface > SAL_CALL FindTextToolbarController_createInstance(
const css::uno::Reference< css::lang::XMultiServiceFactory >& rSMgr )
{
- return FindTextToolbarController( rSMgr );
+ return static_cast< cppu::OWeakObject * >(
+ new FindTextToolbarController( rSMgr ) );
}
css::uno::Reference< css::uno::XInterface > SAL_CALL DownSearchToolboxController_createInstance(
const css::uno::Reference< css::lang::XMultiServiceFactory >& rSMgr )
{
- return UpDownSearchToolboxController( rSMgr, UpDownSearchToolboxController::DOWN );
+ return static_cast< cppu::OWeakObject * >(
+ new UpDownSearchToolboxController(
+ rSMgr, UpDownSearchToolboxController::DOWN ) );
}
css::uno::Reference< css::uno::XInterface > SAL_CALL UpSearchToolboxController_createInstance(
const css::uno::Reference< css::lang::XMultiServiceFactory >& rSMgr )
{
- return UpDownSearchToolboxController( rSMgr, UpDownSearchToolboxController::UP );
+ return static_cast< cppu::OWeakObject * >(
+ new UpDownSearchToolboxController(
+ rSMgr, UpDownSearchToolboxController::UP ) );
}
css::uno::Reference< css::uno::XInterface > SAL_CALL FindbarDispatcher_createInstance(
const css::uno::Reference< css::lang::XMultiServiceFactory >& rSMgr )
{
- return FindbarDispatcher( rSMgr );
+ return static_cast< cppu::OWeakObject * >( new FindbarDispatcher( rSMgr ) );
}
//-----------------------------------------------------------------------------------------------------------