diff options
author | Caolán McNamara <caolanm@redhat.com> | 2017-12-02 14:46:17 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2017-12-02 18:21:43 +0100 |
commit | 1c53061bb93afffc07dee6781064021aea1d8911 (patch) | |
tree | e5186dac5a0bc26e23f2e4e59c7e3d7d1aff67dd /package | |
parent | 2e8fa58ebb5105a824f398a3384a8b0ea2229f9e (diff) |
improve scoping
Change-Id: I4b42d1357e951acda8e7cdba416dc298f260a541
Reviewed-on: https://gerrit.libreoffice.org/45713
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'package')
-rw-r--r-- | package/source/zippackage/ZipPackage.cxx | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/package/source/zippackage/ZipPackage.cxx b/package/source/zippackage/ZipPackage.cxx index 3823ed07ffb8..27e578d51bda 100644 --- a/package/source/zippackage/ZipPackage.cxx +++ b/package/source/zippackage/ZipPackage.cxx @@ -472,8 +472,6 @@ void ZipPackage::parseContentType() void ZipPackage::getZipFileContents() { std::unique_ptr<ZipEnumeration> xEnum = m_pZipFile->entries(); - ZipPackageStream *pPkgStream; - ZipPackageFolder *pPkgFolder, *pCurrent; OUString sTemp, sDirName; sal_Int32 nOldIndex, nStreamIndex; FolderHash::iterator aIter; @@ -481,7 +479,7 @@ void ZipPackage::getZipFileContents() while (xEnum->hasMoreElements()) { nOldIndex = 0; - pCurrent = m_xRootFolder.get(); + ZipPackageFolder* pCurrent = m_xRootFolder.get(); const ZipEntry & rEntry = *xEnum->nextElement(); OUString rName = rEntry.sPath; @@ -511,7 +509,7 @@ void ZipPackage::getZipFileContents() break; if ( !pCurrent->hasByName( sTemp ) ) { - pPkgFolder = new ZipPackageFolder( m_xContext, m_nFormat, m_bAllowRemoveOnInsert ); + ZipPackageFolder* pPkgFolder = new ZipPackageFolder(m_xContext, m_nFormat, m_bAllowRemoveOnInsert); pPkgFolder->setName( sTemp ); pPkgFolder->doSetParent( pCurrent ); pCurrent = pPkgFolder; @@ -532,7 +530,7 @@ void ZipPackage::getZipFileContents() { nStreamIndex++; sTemp = rName.copy( nStreamIndex ); - pPkgStream = new ZipPackageStream( *this, m_xContext, m_nFormat, m_bAllowRemoveOnInsert ); + ZipPackageStream *pPkgStream = new ZipPackageStream(*this, m_xContext, m_nFormat, m_bAllowRemoveOnInsert); pPkgStream->SetPackageMember( true ); pPkgStream->setZipEntryOnLoading( rEntry ); pPkgStream->setName( sTemp ); |