summaryrefslogtreecommitdiff
path: root/package
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-08-21 20:06:19 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-08-22 09:34:43 +0200
commit7a769391772b1184d801a123fb226017e8d65848 (patch)
tree41e5a167d37a549d54bf4ad0b12b48b9c3221ac9 /package
parentd5b07dc9c0185e59077e54c91792476dcbba8d44 (diff)
loplugin:constmethod in package
Change-Id: I44bc86a179164e1d039dd3a5f2c8a23396d870b3 Reviewed-on: https://gerrit.libreoffice.org/77931 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'package')
-rw-r--r--package/inc/CRC32.hxx2
-rw-r--r--package/inc/ZipOutputEntry.hxx2
-rw-r--r--package/inc/ZipOutputStream.hxx4
-rw-r--r--package/inc/ZipPackageStream.hxx2
-rw-r--r--package/source/xstor/owriteablestream.hxx4
-rw-r--r--package/source/xstor/xstorage.hxx4
-rw-r--r--package/source/zipapi/CRC32.cxx2
-rw-r--r--package/source/zipapi/MemoryByteGrabber.hxx2
-rw-r--r--package/source/zipapi/XUnbufferedStream.hxx2
-rw-r--r--package/source/zipapi/ZipOutputStream.cxx2
-rw-r--r--package/source/zippackage/ZipPackageStream.cxx2
11 files changed, 14 insertions, 14 deletions
diff --git a/package/inc/CRC32.hxx b/package/inc/CRC32.hxx
index e19ed60d99c3..0791875217cb 100644
--- a/package/inc/CRC32.hxx
+++ b/package/inc/CRC32.hxx
@@ -39,7 +39,7 @@ public:
/// @throws css::uno::RuntimeException
void update(const css::uno::Sequence< sal_Int8 > &b);
/// @throws css::uno::RuntimeException
- sal_Int32 getValue();
+ sal_Int32 getValue() const;
/// @throws css::uno::RuntimeException
void reset();
};
diff --git a/package/inc/ZipOutputEntry.hxx b/package/inc/ZipOutputEntry.hxx
index 7234d890f4c2..3bace59698b5 100644
--- a/package/inc/ZipOutputEntry.hxx
+++ b/package/inc/ZipOutputEntry.hxx
@@ -57,7 +57,7 @@ public:
ZipEntry* getZipEntry() { return m_pCurrentEntry; }
ZipPackageStream* getZipPackageStream() { return m_pCurrentStream; }
- bool isEncrypt() { return m_bEncryptCurrentEntry; }
+ bool isEncrypt() const { return m_bEncryptCurrentEntry; }
void closeEntry();
diff --git a/package/inc/ZipOutputStream.hxx b/package/inc/ZipOutputStream.hxx
index b527abde1443..aeb7ab1f86e8 100644
--- a/package/inc/ZipOutputStream.hxx
+++ b/package/inc/ZipOutputStream.hxx
@@ -63,7 +63,7 @@ public:
/// @throws css::io::IOException
/// @throws css::uno::RuntimeException
void finish();
- const css::uno::Reference< css::io::XOutputStream >& getStream();
+ const css::uno::Reference< css::io::XOutputStream >& getStream() const;
static sal_uInt32 getCurrentDosTime();
static void setEntry( ZipEntry *pEntry );
@@ -87,7 +87,7 @@ public:
void reduceScheduledThreadTasksToGivenNumberOrLess(
sal_Int32 nThreadTasks);
- const std::shared_ptr<comphelper::ThreadTaskTag>& getThreadTaskTag() { return mpThreadTaskTag; }
+ const std::shared_ptr<comphelper::ThreadTaskTag>& getThreadTaskTag() const { return mpThreadTaskTag; }
};
#endif
diff --git a/package/inc/ZipPackageStream.hxx b/package/inc/ZipPackageStream.hxx
index 7909c8818107..ffd791c8aca0 100644
--- a/package/inc/ZipPackageStream.hxx
+++ b/package/inc/ZipPackageStream.hxx
@@ -87,7 +87,7 @@ public:
css::uno::Sequence<sal_Int8> GetEncryptionKey(Bugs bugs = Bugs::None);
- sal_Int32 GetStartKeyGenID();
+ sal_Int32 GetStartKeyGenID() const;
sal_Int32 GetEncryptionAlgorithm() const;
sal_Int32 GetBlockSize() const;
diff --git a/package/source/xstor/owriteablestream.hxx b/package/source/xstor/owriteablestream.hxx
index 629d679fdccf..818aec0b7942 100644
--- a/package/source/xstor/owriteablestream.hxx
+++ b/package/source/xstor/owriteablestream.hxx
@@ -161,10 +161,10 @@ public:
void SetToBeCommited() { m_bFlushed = true; }
- bool HasCachedEncryptionData() { return m_bHasCachedEncryptionData; }
+ bool HasCachedEncryptionData() const { return m_bHasCachedEncryptionData; }
::comphelper::SequenceAsHashMap& GetCachedEncryptionData() { return m_aEncryptionData; }
- bool IsModified() { return m_bHasDataToFlush || m_bFlushed; }
+ bool IsModified() const { return m_bHasDataToFlush || m_bFlushed; }
bool IsEncrypted();
void SetDecrypted();
diff --git a/package/source/xstor/xstorage.hxx b/package/source/xstor/xstorage.hxx
index dabdd9af049e..d4f48e282627 100644
--- a/package/source/xstor/xstorage.hxx
+++ b/package/source/xstor/xstorage.hxx
@@ -133,7 +133,7 @@ struct OStorage_Impl
/// Count of registered modification listeners
oslInterlockedCount m_nModifiedListenerCount;
- bool HasModifiedListener()
+ bool HasModifiedListener() const
{
return m_nModifiedListenerCount > 0 && m_pAntiImpl != nullptr;
}
@@ -321,7 +321,7 @@ public:
void ChildIsDisposed( const css::uno::Reference< css::uno::XInterface >& xChild );
- sal_Int32 GetRefCount_Impl() { return m_refCount; }
+ sal_Int32 GetRefCount_Impl() const { return m_refCount; }
// XInterface
diff --git a/package/source/zipapi/CRC32.cxx b/package/source/zipapi/CRC32.cxx
index 9413a27cefd8..2440630db856 100644
--- a/package/source/zipapi/CRC32.cxx
+++ b/package/source/zipapi/CRC32.cxx
@@ -39,7 +39,7 @@ void CRC32::reset()
{
nCRC=0;
}
-sal_Int32 CRC32::getValue()
+sal_Int32 CRC32::getValue() const
{
return nCRC;
}
diff --git a/package/source/zipapi/MemoryByteGrabber.hxx b/package/source/zipapi/MemoryByteGrabber.hxx
index 9b1c096ae056..9f52204ead67 100644
--- a/package/source/zipapi/MemoryByteGrabber.hxx
+++ b/package/source/zipapi/MemoryByteGrabber.hxx
@@ -36,7 +36,7 @@ public:
}
MemoryByteGrabber(css::uno::Sequence<sal_Int8> &&) = delete;
- const sal_Int8 * getCurrentPos () { return mpBuffer + mnCurrent; }
+ const sal_Int8 * getCurrentPos () const { return mpBuffer + mnCurrent; }
sal_Int32 remainingSize() const { return mnEnd - mnCurrent; }
diff --git a/package/source/zipapi/XUnbufferedStream.hxx b/package/source/zipapi/XUnbufferedStream.hxx
index afb70cc46ba0..a864de48f2ba 100644
--- a/package/source/zipapi/XUnbufferedStream.hxx
+++ b/package/source/zipapi/XUnbufferedStream.hxx
@@ -79,7 +79,7 @@ public:
const css::uno::Reference < css::io::XInputStream >& xRawStream,
const ::rtl::Reference< EncryptionData >& rData );
- sal_Int64 getSize() { return mnZipSize; }
+ sal_Int64 getSize() const { return mnZipSize; }
virtual ~XUnbufferedStream() override;
diff --git a/package/source/zipapi/ZipOutputStream.cxx b/package/source/zipapi/ZipOutputStream.cxx
index 8ea040bd55e3..6bf3bd33f49e 100644
--- a/package/source/zipapi/ZipOutputStream.cxx
+++ b/package/source/zipapi/ZipOutputStream.cxx
@@ -188,7 +188,7 @@ void ZipOutputStream::finish()
}
}
-const css::uno::Reference< css::io::XOutputStream >& ZipOutputStream::getStream()
+const css::uno::Reference< css::io::XOutputStream >& ZipOutputStream::getStream() const
{
return m_xStream;
}
diff --git a/package/source/zippackage/ZipPackageStream.cxx b/package/source/zippackage/ZipPackageStream.cxx
index 7332cdc366b6..dc49729fc1fe 100644
--- a/package/source/zippackage/ZipPackageStream.cxx
+++ b/package/source/zippackage/ZipPackageStream.cxx
@@ -255,7 +255,7 @@ uno::Sequence<sal_Int8> ZipPackageStream::GetEncryptionKey(Bugs const bugs)
return aResult;
}
-sal_Int32 ZipPackageStream::GetStartKeyGenID()
+sal_Int32 ZipPackageStream::GetStartKeyGenID() const
{
// generally should all the streams use the same Start Key
// but if raw copy without password takes place, we should preserve the imported algorithm