From 306efefe22e02248eff14f8be2cef68d75d26e55 Mon Sep 17 00:00:00 2001 From: Jan Holesovsky Date: Thu, 16 Jan 2014 16:26:55 +0100 Subject: Minimize the constructor functions to a bare minimum. Most of the constructors are supposed to be only a call of new TheInstance(arguments) or an equivalent; so let's just change the constructor caller accordingly, to accept unacquired new instance. If there are exceptions that need to do more heavy lifting, they do not have to use the constructor feature, or there can be a wrapper for the real implementation, doing the additional work in their (C++) constructor. Change-Id: I035c378778aeda60d15af4e56ca3761c586d5ded --- svx/source/customshapes/EnhancedCustomShapeEngine.cxx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'svx/source/customshapes') diff --git a/svx/source/customshapes/EnhancedCustomShapeEngine.cxx b/svx/source/customshapes/EnhancedCustomShapeEngine.cxx index 2c3cd3e3f978..dfe1711c4883 100644 --- a/svx/source/customshapes/EnhancedCustomShapeEngine.cxx +++ b/svx/source/customshapes/EnhancedCustomShapeEngine.cxx @@ -494,9 +494,7 @@ com_sun_star_drawing_EnhancedCustomShapeEngine_get_implementation( css::uno::XComponentContext *, css::uno::Sequence const &) { - rtl::Reference x(new EnhancedCustomShapeEngine); - x->acquire(); - return static_cast(x.get()); + return static_cast(new EnhancedCustomShapeEngine); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ -- cgit