diff options
author | Noel <noelgrandin@gmail.com> | 2020-11-05 11:23:02 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-11-05 14:10:12 +0100 |
commit | c967a7f0130d804a73fa7073c4a1703fcd51bd75 (patch) | |
tree | 336872d761fe3e1110b48e8940f91ac20880d831 /scripting | |
parent | 349099b4e0fa59c3f340d3a1fb175db04220708a (diff) |
loplugin:reducevarscope in scripting
Change-Id: I214f58c9d0bd8e574e8882234c84f595605d2fe7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105331
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'scripting')
-rw-r--r-- | scripting/source/basprov/basmethnode.cxx | 3 | ||||
-rw-r--r-- | scripting/source/stringresource/stringresource.cxx | 3 |
2 files changed, 3 insertions, 3 deletions
diff --git a/scripting/source/basprov/basmethnode.cxx b/scripting/source/basprov/basmethnode.cxx index 26ed5f08ed80..9ac68be5faf8 100644 --- a/scripting/source/basprov/basmethnode.cxx +++ b/scripting/source/basprov/basmethnode.cxx @@ -192,7 +192,7 @@ namespace basprov } OUString sDocURL, sLibName, sModName; - sal_uInt16 nLine1 = 0, nLine2; + sal_uInt16 nLine1 = 0; if ( !m_bIsAppScript ) { @@ -215,6 +215,7 @@ namespace basprov if ( m_pMethod ) { + sal_uInt16 nLine2; m_pMethod->GetLineRange( nLine1, nLine2 ); SbModule* pModule = m_pMethod->GetModule(); if ( pModule ) 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"; |