summaryrefslogtreecommitdiff
path: root/package
diff options
context:
space:
mode:
authorMichael Weghorn <m.weghorn@posteo.de>2014-12-19 08:47:29 +0100
committerNoel Grandin <noelgrandin@gmail.com>2014-12-19 11:00:32 +0000
commitd41bc0f7b328ed6c69b2c2822de00165cdc62c61 (patch)
treef92cb1c15af79b7100e90d713eaa3ee6adcd5115 /package
parentbfb9eb550c4facb9aa6346a8d19f015cf5182668 (diff)
fdo#39440 reduce scope of local variables
This addresses some cppcheck warnings. Change-Id: Idcedd908c653d5a5700884f233ad134dde8be018 Reviewed-on: https://gerrit.libreoffice.org/13540 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'package')
-rw-r--r--package/source/zippackage/ZipPackage.cxx6
1 files changed, 4 insertions, 2 deletions
diff --git a/package/source/zippackage/ZipPackage.cxx b/package/source/zippackage/ZipPackage.cxx
index c30ca99a66ad..9eee46e82194 100644
--- a/package/source/zippackage/ZipPackage.cxx
+++ b/package/source/zippackage/ZipPackage.cxx
@@ -194,7 +194,6 @@ void ZipPackage::parseManifest()
if ( m_nFormat == embed::StorageFormats::PACKAGE )
{
bool bManifestParsed = false;
- bool bDifferentStartKeyAlgorithm = false;
const OUString sMeta ("META-INF");
if ( m_xRootFolder->hasByName( sMeta ) )
{
@@ -410,6 +409,8 @@ void ZipPackage::parseManifest()
bool bODF12AndNewer = ( m_pRootFolder->GetVersion().compareTo( ODFVER_012_TEXT ) >= 0 );
if ( !m_bForceRecovery && bODF12AndNewer )
{
+ bool bDifferentStartKeyAlgorithm = false;
+
if ( m_bInconsistent )
{
// this is an ODF1.2 document that contains streams not referred in the manifest.xml;
@@ -575,12 +576,13 @@ void ZipPackage::getZipFileContents()
void SAL_CALL ZipPackage::initialize( const uno::Sequence< Any >& aArguments )
throw( Exception, RuntimeException, std::exception )
{
- bool bHaveZipFile = true;
uno::Reference< XProgressHandler > xProgressHandler;
beans::NamedValue aNamedValue;
if ( aArguments.getLength() )
{
+ bool bHaveZipFile = true;
+
for( int ind = 0; ind < aArguments.getLength(); ind++ )
{
OUString aParamUrl;