diff options
author | Noel <noelgrandin@gmail.com> | 2020-09-30 09:39:36 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-09-30 11:48:48 +0200 |
commit | 7ced53424a21ab264374d97aacdfb4ec166c8171 (patch) | |
tree | a119f33d08617939ed0a8c8dc4870c7832443506 /svx/source/gallery2 | |
parent | 6b709ad5d46dc33f29ec28183cea40cf9e77e2af (diff) |
loplugin:reducevarscope in svx
Change-Id: I88fdaa74c4944f9ffc81db6df08a29283362375a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103647
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svx/source/gallery2')
-rw-r--r-- | svx/source/gallery2/gallery1.cxx | 2 | ||||
-rw-r--r-- | svx/source/gallery2/gallerybinaryengineentry.cxx | 3 | ||||
-rw-r--r-- | svx/source/gallery2/galtheme.cxx | 3 |
3 files changed, 3 insertions, 5 deletions
diff --git a/svx/source/gallery2/gallery1.cxx b/svx/source/gallery2/gallery1.cxx index 750fd1491220..c522fdf49e93 100644 --- a/svx/source/gallery2/gallery1.cxx +++ b/svx/source/gallery2/gallery1.cxx @@ -355,7 +355,6 @@ void Gallery::ImplLoadSubDirs( const INetURLObject& rBaseURL, bool& rbDirIsReadO { INetURLObject aSdgURL( aThmURL); aSdgURL.SetExtension( "sdg" ); INetURLObject aSdvURL( aThmURL ); aSdvURL.SetExtension( "sdv" ); - OUString aTitle; try { @@ -363,6 +362,7 @@ void Gallery::ImplLoadSubDirs( const INetURLObject& rBaseURL, bool& rbDirIsReadO ::ucbhelper::Content aSdgCnt( aSdgURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ), xEnv, comphelper::getProcessComponentContext() ); ::ucbhelper::Content aSdvCnt( aSdvURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ), xEnv, comphelper::getProcessComponentContext() ); + OUString aTitle; try { aThmCnt.getPropertyValue( s_sTitle ) >>= aTitle; diff --git a/svx/source/gallery2/gallerybinaryengineentry.cxx b/svx/source/gallery2/gallerybinaryengineentry.cxx index 0b0831169a4d..8537d52b2a9d 100644 --- a/svx/source/gallery2/gallerybinaryengineentry.cxx +++ b/svx/source/gallery2/gallerybinaryengineentry.cxx @@ -85,7 +85,6 @@ GalleryThemeEntry* GalleryBinaryEngineEntry::CreateThemeEntry(const INetURLObjec if (pIStm) { - OUString aThemeName; sal_uInt16 nVersion; pIStm->ReadUInt16(nVersion); @@ -96,7 +95,7 @@ GalleryThemeEntry* GalleryBinaryEngineEntry::CreateThemeEntry(const INetURLObjec sal_uInt32 nThemeId = 0; OString aTmpStr = read_uInt16_lenPrefixed_uInt8s_ToOString(*pIStm); - aThemeName = OStringToOUString(aTmpStr, RTL_TEXTENCODING_UTF8); + OUString aThemeName = OStringToOUString(aTmpStr, RTL_TEXTENCODING_UTF8); // execute a character conversion if (nVersion >= 0x0004) diff --git a/svx/source/gallery2/galtheme.cxx b/svx/source/gallery2/galtheme.cxx index e6dcf1acf75c..2319328dc8f9 100644 --- a/svx/source/gallery2/galtheme.cxx +++ b/svx/source/gallery2/galtheme.cxx @@ -686,7 +686,6 @@ SvStream& GalleryTheme::ReadData( SvStream& rIStm ) std::unique_ptr<GalleryObject> pObj(new GalleryObject); OUString aFileName; - OUString aPath; sal_uInt16 nTemp; rIStm.ReadCharAsBool( bRel ); @@ -702,7 +701,7 @@ SvStream& GalleryTheme::ReadData( SvStream& rIStm ) if( bRel ) { aFileName = aFileName.replaceAll( "\\", "/" ); - aPath = aRelURL1.GetMainURL( INetURLObject::DecodeMechanism::NONE ); + OUString aPath = aRelURL1.GetMainURL( INetURLObject::DecodeMechanism::NONE ); if( aFileName[ 0 ] != '/' ) aPath += "/"; |