sd/source/ui/controller/slidelayoutcontroller.cxx | 6 ++++-- sd/source/ui/toolpanel/ToolPanelFactory.cxx | 3 ++- sd/source/ui/unoidl/sddetect.cxx | 3 ++- 3 files changed, 8 insertions(+), 4 deletions(-)
New commits: commit 5ea6f6d400e59e037032fb3091c3f6880b562ce9 Author: Stephan Bergmann <sberg...@redhat.com> Date: Mon Jan 7 12:36:08 2013 +0100 UNO objects must be allocated on the heap This was a regression introduced with 5ea7e74c29f7279b6c31d38185ace576f68f4fb2 "fix some memory leaks in sd." Change-Id: Ibcb2527b396886a5a904d8843c8560765ed859f5 diff --git a/sd/source/ui/controller/slidelayoutcontroller.cxx b/sd/source/ui/controller/slidelayoutcontroller.cxx index 5cce3a4..ddd6170 100644 --- a/sd/source/ui/controller/slidelayoutcontroller.cxx +++ b/sd/source/ui/controller/slidelayoutcontroller.cxx @@ -331,7 +331,8 @@ Sequence< OUString > SlideLayoutController_getSupportedServiceNames() throw( Ru Reference< XInterface > SAL_CALL SlideLayoutController_createInstance( const Reference< XMultiServiceFactory >& rSMgr ) throw( RuntimeException ) { - return SlideLayoutController( rSMgr, ".uno:AssignLayout", false ); + return static_cast< cppu::OWeakObject * >( + new SlideLayoutController( rSMgr, ".uno:AssignLayout", false )); } // -------------------------------------------------------------------- @@ -354,7 +355,8 @@ Sequence< OUString > InsertSlideController_getSupportedServiceNames() throw( Ru Reference< XInterface > SAL_CALL InsertSlideController_createInstance( const Reference< XMultiServiceFactory >& rSMgr ) throw( RuntimeException ) { - return SlideLayoutController( rSMgr, ".uno:InsertPage" , true ); + return static_cast< cppu::OWeakObject * >( + new SlideLayoutController( rSMgr, ".uno:InsertPage" , true ) ); } //======================================================================== diff --git a/sd/source/ui/toolpanel/ToolPanelFactory.cxx b/sd/source/ui/toolpanel/ToolPanelFactory.cxx index 5989ad0..fdc58a1 100644 --- a/sd/source/ui/toolpanel/ToolPanelFactory.cxx +++ b/sd/source/ui/toolpanel/ToolPanelFactory.cxx @@ -100,7 +100,8 @@ namespace sd { namespace toolpanel //------------------------------------------------------------------------------------------------------------------ Reference< XInterface > SAL_CALL ToolPanelFactory_createInstance( const Reference< XComponentContext >& i_rContext ) { - return Reference< XInterface >( ToolPanelFactory( i_rContext ) ); + return static_cast< cppu::OWeakObject * >( + new ToolPanelFactory( i_rContext ) ); } //------------------------------------------------------------------------------------------------------------------ diff --git a/sd/source/ui/unoidl/sddetect.cxx b/sd/source/ui/unoidl/sddetect.cxx index 8a8bb94..eff86c5 100644 --- a/sd/source/ui/unoidl/sddetect.cxx +++ b/sd/source/ui/unoidl/sddetect.cxx @@ -515,7 +515,8 @@ rtl::OUString SdFilterDetect::impl_getStaticImplementationName() /* Helper for registry */ UNOREFERENCE< UNOXINTERFACE > SAL_CALL SdFilterDetect::impl_createInstance( const UNOREFERENCE< UNOXMULTISERVICEFACTORY >& xServiceManager ) throw( UNOEXCEPTION ) { - return UNOREFERENCE< UNOXINTERFACE >( SdFilterDetect( xServiceManager ) ); + return static_cast< cppu::OWeakObject * >( + new SdFilterDetect( xServiceManager ) ); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits