summaryrefslogtreecommitdiff
path: root/package
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2016-11-08 09:33:15 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2016-11-08 09:21:06 +0000
commitdca61b588a2426cfe9a18e4a1074b380e42884d7 (patch)
treedb4436c600c08086c0da7fb09c290705b33beb4d /package
parent6aa8e86f3a80b7cbfb81500a6bb5cfeaca97791b (diff)
loplugin:expandablemethods in lotuswordpro..package
Change-Id: Ic9827c998f4f78775fdf5c1eaf9d4749d4986102 Reviewed-on: https://gerrit.libreoffice.org/30682 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'package')
-rw-r--r--package/inc/ZipOutputStream.hxx1
-rw-r--r--package/inc/ZipPackageStream.hxx2
-rw-r--r--package/source/zipapi/ZipOutputStream.cxx17
-rw-r--r--package/source/zippackage/ZipPackageStream.cxx17
4 files changed, 12 insertions, 25 deletions
diff --git a/package/inc/ZipOutputStream.hxx b/package/inc/ZipOutputStream.hxx
index e532c3add02a..79fb84d47926 100644
--- a/package/inc/ZipOutputStream.hxx
+++ b/package/inc/ZipOutputStream.hxx
@@ -74,7 +74,6 @@ private:
// ScheduledThread handling helpers
void consumeScheduledThreadEntry(ZipOutputEntry* pCandidate);
void consumeFinishedScheduledThreadEntries();
- void consumeAllScheduledThreadEntries();
public:
void reduceScheduledThreadsToGivenNumberOrLess(
diff --git a/package/inc/ZipPackageStream.hxx b/package/inc/ZipPackageStream.hxx
index d6e1763e86af..605432ed169d 100644
--- a/package/inc/ZipPackageStream.hxx
+++ b/package/inc/ZipPackageStream.hxx
@@ -117,8 +117,6 @@ public:
{ m_xBaseEncryptionData->m_nIterationCount = nNewCount;}
void setSize (const sal_Int64 nNewSize);
- void CloseOwnStreamIfAny();
-
ZipPackageStream( ZipPackage & rNewPackage,
const css::uno::Reference < css::uno::XComponentContext >& xContext,
sal_Int32 nFormat,
diff --git a/package/source/zipapi/ZipOutputStream.cxx b/package/source/zipapi/ZipOutputStream.cxx
index 38039636b56d..603a61423eb4 100644
--- a/package/source/zipapi/ZipOutputStream.cxx
+++ b/package/source/zipapi/ZipOutputStream.cxx
@@ -148,16 +148,6 @@ void ZipOutputStream::consumeFinishedScheduledThreadEntries()
m_aEntries = aNonFinishedEntries;
}
-void ZipOutputStream::consumeAllScheduledThreadEntries()
-{
- while(!m_aEntries.empty())
- {
- ZipOutputEntry* pCandidate = m_aEntries.back();
- m_aEntries.pop_back();
- consumeScheduledThreadEntry(pCandidate);
- }
-}
-
void ZipOutputStream::reduceScheduledThreadsToGivenNumberOrLess(sal_Int32 nThreads)
{
while(static_cast< sal_Int32 >(m_aEntries.size()) > nThreads)
@@ -181,7 +171,12 @@ void ZipOutputStream::finish()
comphelper::ThreadPool::getSharedOptimalPool().waitUntilDone(mpThreadTaskTag);
// consume all processed entries
- consumeAllScheduledThreadEntries();
+ while(!m_aEntries.empty())
+ {
+ ZipOutputEntry* pCandidate = m_aEntries.back();
+ m_aEntries.pop_back();
+ consumeScheduledThreadEntry(pCandidate);
+ }
sal_Int32 nOffset= static_cast < sal_Int32 > (m_aChucker.GetPosition());
for (ZipEntry* p : m_aZipList)
diff --git a/package/source/zippackage/ZipPackageStream.cxx b/package/source/zippackage/ZipPackageStream.cxx
index 90fb399379b3..17a6fac66f6b 100644
--- a/package/source/zippackage/ZipPackageStream.cxx
+++ b/package/source/zippackage/ZipPackageStream.cxx
@@ -139,16 +139,6 @@ void ZipPackageStream::setZipEntryOnLoading( const ZipEntry &rInEntry )
m_bToBeCompressed = false;
}
-void ZipPackageStream::CloseOwnStreamIfAny()
-{
- if ( m_xStream.is() )
- {
- m_xStream->closeInput();
- m_xStream.clear();
- m_bHasSeekable = false;
- }
-}
-
uno::Reference< io::XInputStream > const & ZipPackageStream::GetOwnSeekStream()
{
if ( !m_bHasSeekable && m_xStream.is() )
@@ -905,7 +895,12 @@ void ZipPackageStream::successfullyWritten( ZipEntry *pEntry )
{
if ( !IsPackageMember() )
{
- CloseOwnStreamIfAny();
+ if ( m_xStream.is() )
+ {
+ m_xStream->closeInput();
+ m_xStream.clear();
+ m_bHasSeekable = false;
+ }
SetPackageMember ( true );
}