summaryrefslogtreecommitdiff
path: root/sw/source/core/swg
diff options
context:
space:
mode:
authorMichael Weghorn <m.weghorn@posteo.de>2015-01-16 13:00:37 +0000
committerNoel Grandin <noelgrandin@gmail.com>2015-01-19 06:15:36 +0000
commitd1aecd4353bd6ac3961a30df67de78f4b8f0a66b (patch)
tree5d7fd75ed46970a1f459a763cfade2fa7d299f54 /sw/source/core/swg
parent07e84cae983c08afdba03018413a19d01abb3006 (diff)
fdo#39440 sw: reduce scope of local variables
This addresses some cppcheck warnings. Change-Id: Iccdd4bebd46f274697597b13746c820aaadc99a4 Reviewed-on: https://gerrit.libreoffice.org/13960 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'sw/source/core/swg')
-rw-r--r--sw/source/core/swg/SwXMLTextBlocks1.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/sw/source/core/swg/SwXMLTextBlocks1.cxx b/sw/source/core/swg/SwXMLTextBlocks1.cxx
index 3eca795659b5..afb847de1aa7 100644
--- a/sw/source/core/swg/SwXMLTextBlocks1.cxx
+++ b/sw/source/core/swg/SwXMLTextBlocks1.cxx
@@ -276,13 +276,14 @@ sal_uLong SwXMLTextBlocks::GetMacroTable( sal_uInt16 nIdx,
sal_uLong SwXMLTextBlocks::GetBlockText( const OUString& rShort, OUString& rText )
{
sal_uLong n = 0;
- bool bTextOnly = true;
OUString aFolderName = GeneratePackageName ( rShort );
OUString aStreamName = aFolderName + ".xml";
rText.clear();
try
{
+ bool bTextOnly = true;
+
xRoot = xBlkRoot->openStorageElement( aFolderName, embed::ElementModes::READ );
uno::Reference < container::XNameAccess > xAccess( xRoot, uno::UNO_QUERY );
if ( !xAccess->hasByName( aStreamName ) || !xRoot->isStreamElement( aStreamName ) )