From edd0e3ac9f9728ff88d63113d64911cee1e29a06 Mon Sep 17 00:00:00 2001 From: Mike Kaganski Date: Sat, 7 Sep 2024 11:02:26 +0200 Subject: Simplify a bit Change-Id: I8756f02ca9cb641528d621704cbed09d964c6ef9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172959 Tested-by: Jenkins Reviewed-by: Mike Kaganski --- package/source/zippackage/ZipPackageStream.cxx | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'package/source') diff --git a/package/source/zippackage/ZipPackageStream.cxx b/package/source/zippackage/ZipPackageStream.cxx index d8d71b1ffe8f..04c853e6ae32 100644 --- a/package/source/zippackage/ZipPackageStream.cxx +++ b/package/source/zippackage/ZipPackageStream.cxx @@ -305,10 +305,8 @@ uno::Reference< io::XInputStream > ZipPackageStream::TryToGetRawFromDataStream( } // insert a new stream in the package - uno::Reference< XInterface > xTmp; Any aRoot = pPackage->getByHierarchicalName(u"/"_ustr); - aRoot >>= xTmp; - uno::Reference< container::XNameContainer > xRootNameContainer( xTmp, UNO_QUERY_THROW ); + auto xRootNameContainer = aRoot.queryThrow(); uno::Reference< XInterface > xNPSDummy( xNewPackStream, UNO_QUERY ); xRootNameContainer->insertByName(u"dummy"_ustr, Any( xNPSDummy ) ); @@ -337,7 +335,6 @@ uno::Reference< io::XInputStream > ZipPackageStream::TryToGetRawFromDataStream( xNewPSProps.clear(); xNPSDummy.clear(); xNewPackStream.clear(); - xTmp.clear(); xRootNameContainer.clear(); // return the stream representing the first temporary file -- cgit v1.2.3