From c967a7f0130d804a73fa7073c4a1703fcd51bd75 Mon Sep 17 00:00:00 2001 From: Noel Date: Thu, 5 Nov 2020 11:23:02 +0200 Subject: loplugin:reducevarscope in scripting Change-Id: I214f58c9d0bd8e574e8882234c84f595605d2fe7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105331 Tested-by: Jenkins Reviewed-by: Noel Grandin --- scripting/source/stringresource/stringresource.cxx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'scripting/source/stringresource/stringresource.cxx') diff --git a/scripting/source/stringresource/stringresource.cxx b/scripting/source/stringresource/stringresource.cxx index 217536d66c55..455174f2eff8 100644 --- a/scripting/source/stringresource/stringresource.cxx +++ b/scripting/source/stringresource/stringresource.cxx @@ -886,12 +886,11 @@ void StringResourcePersistenceImpl::implStoreAtStorage Reference< io::XStream > xElementStream = Storage->openStreamElement( aStreamName, ElementModes::READWRITE ); - OUString aPropName("MediaType"); - uno::Reference< beans::XPropertySet > xProps( xElementStream, uno::UNO_QUERY ); OSL_ENSURE( xProps.is(), "The StorageStream must implement XPropertySet interface!" ); if ( xProps.is() ) { + OUString aPropName("MediaType"); xProps->setPropertyValue( aPropName, uno::makeAny( OUString("text/plain") ) ); aPropName = "UseCommonStoragePasswordEncryption"; -- cgit