From 2660d24a07866e083c5135ea263030f3e3a2e729 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Mon, 13 Jul 2015 16:17:00 +0200 Subject: new loplugin: refcounting This was a feature requested by mmeeks, as a result of tdf#92611. It validates that things that extend XInterface are not directly heap/stack-allocated, but have their lifecycle managed via css::uno::Reference or rtl::Reference. Change-Id: I28e3b8b236f6a4a56d0a6d6f26ad54e44b36e692 Reviewed-on: https://gerrit.libreoffice.org/16924 Reviewed-by: Noel Grandin Tested-by: Noel Grandin --- xmloff/source/meta/xmlversion.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'xmloff') diff --git a/xmloff/source/meta/xmlversion.cxx b/xmloff/source/meta/xmlversion.cxx index 068449ec8e39..fa316026add5 100644 --- a/xmloff/source/meta/xmlversion.cxx +++ b/xmloff/source/meta/xmlversion.cxx @@ -351,9 +351,9 @@ void SAL_CALL XMLVersionListPersistence::store( const uno::Reference< embed::XSt Reference< XDocumentHandler > xHandler( xWriter, uno::UNO_QUERY ); - XMLVersionListExport aExp( xContext, rVersions, sVerName, xHandler ); + Reference< XMLVersionListExport > xExp( new XMLVersionListExport( xContext, rVersions, sVerName, xHandler ) ); - aExp.exportDoc( ::xmloff::token::XML_VERSION ); + xExp->exportDoc( ::xmloff::token::XML_VERSION ); xVerStream = uno::Reference< io::XStream >(); // use refcounting for now to dispose } -- cgit v1.2.3