[Libreoffice-commits] core.git: include/package package/inc package/source

Noel Grandin noel.grandin at collabora.co.uk
Wed Nov 1 06:15:05 UTC 2017


 include/package/Deflater.hxx                              |    3 +--
 include/package/Inflater.hxx                              |    3 +--
 package/inc/ByteChucker.hxx                               |    3 +--
 package/inc/ByteGrabber.hxx                               |    3 +--
 package/inc/CRC32.hxx                                     |    3 +--
 package/inc/ZipEnumeration.hxx                            |    3 +--
 package/inc/ZipPackage.hxx                                |    3 +--
 package/inc/ZipPackageBuffer.hxx                          |    3 +--
 package/source/manifest/ManifestImport.hxx                |    4 ++--
 package/source/xstor/oseekinstream.hxx                    |    3 +--
 package/source/xstor/selfterminatefilestream.hxx          |    3 +--
 package/source/zipapi/MemoryByteGrabber.hxx               |    3 +--
 package/source/zipapi/XUnbufferedStream.hxx               |    3 +--
 package/source/zippackage/ZipPackageFolderEnumeration.hxx |    3 +--
 package/source/zippackage/ZipPackageSink.hxx              |    3 +--
 package/source/zippackage/wrapstreamforshare.hxx          |    3 +--
 16 files changed, 17 insertions(+), 32 deletions(-)

New commits:
commit ee1d6af9b73256e13975ec4e95aff6d69a00fed9
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date:   Tue Oct 31 14:15:25 2017 +0200

    loplugin:finalclasses in package
    
    Change-Id: I020ea1f3bea5c3deab05b9a2154102548c7622cf
    Reviewed-on: https://gerrit.libreoffice.org/44132
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
    Tested-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/include/package/Deflater.hxx b/include/package/Deflater.hxx
index d29cea948889..dc2e6df699af 100644
--- a/include/package/Deflater.hxx
+++ b/include/package/Deflater.hxx
@@ -27,11 +27,10 @@ struct z_stream_s;
 
 namespace ZipUtils {
 
-class DLLPUBLIC_PACKAGE Deflater
+class DLLPUBLIC_PACKAGE Deflater final
 {
     typedef struct z_stream_s z_stream;
 
-protected:
     css::uno::Sequence< sal_Int8 > sInBuffer;
     bool                    bFinish;
     bool                    bFinished;
diff --git a/include/package/Inflater.hxx b/include/package/Inflater.hxx
index a974534bc901..c978c8a8c918 100644
--- a/include/package/Inflater.hxx
+++ b/include/package/Inflater.hxx
@@ -27,11 +27,10 @@ struct z_stream_s;
 
 namespace ZipUtils {
 
-class DLLPUBLIC_PACKAGE Inflater
+class DLLPUBLIC_PACKAGE Inflater final
 {
     typedef struct z_stream_s z_stream;
 
-protected:
     bool                    bFinished, bNeedDict;
     sal_Int32               nOffset, nLength, nLastInflateError;
     z_stream*               pStream;
diff --git a/package/inc/ByteChucker.hxx b/package/inc/ByteChucker.hxx
index 7e1b07c6680f..b3870c0c6163 100644
--- a/package/inc/ByteChucker.hxx
+++ b/package/inc/ByteChucker.hxx
@@ -30,9 +30,8 @@
 namespace com { namespace sun { namespace star {
     namespace io { class XSeekable; class XOutputStream; }
 } } }
-class ByteChucker
+class ByteChucker final
 {
-protected:
     css::uno::Reference < css::io::XOutputStream > xStream;
     css::uno::Reference < css::io::XSeekable > xSeek;
     css::uno::Sequence < sal_Int8 > a1Sequence, a2Sequence, a4Sequence;
diff --git a/package/inc/ByteGrabber.hxx b/package/inc/ByteGrabber.hxx
index 865e3486b489..60a8e1e9f0e5 100644
--- a/package/inc/ByteGrabber.hxx
+++ b/package/inc/ByteGrabber.hxx
@@ -32,9 +32,8 @@
 namespace com { namespace sun { namespace star {
     namespace io { class XSeekable; class XInputStream; }
 } } }
-class ByteGrabber
+class ByteGrabber final
 {
-protected:
     ::osl::Mutex m_aMutex;
 
     css::uno::Reference < css::io::XInputStream > xStream;
diff --git a/package/inc/CRC32.hxx b/package/inc/CRC32.hxx
index 854d11849b2a..778756475414 100644
--- a/package/inc/CRC32.hxx
+++ b/package/inc/CRC32.hxx
@@ -25,9 +25,8 @@
 namespace com { namespace sun { namespace star {
     namespace io { class XInputStream; }
 } } }
-class CRC32
+class CRC32 final
 {
-protected:
     sal_uInt32 nCRC;
 public:
     CRC32();
diff --git a/package/inc/ZipEnumeration.hxx b/package/inc/ZipEnumeration.hxx
index 0b6402a50c21..c84ae2ce2410 100644
--- a/package/inc/ZipEnumeration.hxx
+++ b/package/inc/ZipEnumeration.hxx
@@ -21,9 +21,8 @@
 
 #include "HashMaps.hxx"
 
-class ZipEnumeration
+class ZipEnumeration final
 {
-protected:
     EntryHash       &rEntryHash;
     EntryHash::const_iterator aIterator;
 public:
diff --git a/package/inc/ZipPackage.hxx b/package/inc/ZipPackage.hxx
index f89dd57d7be4..61b0fc883575 100644
--- a/package/inc/ZipPackage.hxx
+++ b/package/inc/ZipPackage.hxx
@@ -57,7 +57,7 @@ enum InitialisationMode
     e_IMode_XStream
 };
 
-class ZipPackage : public cppu::WeakImplHelper
+class ZipPackage final : public cppu::WeakImplHelper
                     <
                        css::lang::XInitialization,
                        css::lang::XSingleServiceFactory,
@@ -68,7 +68,6 @@ class ZipPackage : public cppu::WeakImplHelper
                        css::beans::XPropertySet
                     >
 {
-protected:
     rtl::Reference<comphelper::RefCountedMutex> m_aMutexHolder;
 
     css::uno::Sequence< css::beans::NamedValue > m_aStorageEncryptionKeys;
diff --git a/package/inc/ZipPackageBuffer.hxx b/package/inc/ZipPackageBuffer.hxx
index 8e902b35aa37..64a24563cb83 100644
--- a/package/inc/ZipPackageBuffer.hxx
+++ b/package/inc/ZipPackageBuffer.hxx
@@ -24,14 +24,13 @@
 #include <com/sun/star/io/XInputStream.hpp>
 #include <cppuhelper/implbase.hxx>
 
-class ZipPackageBuffer : public ::cppu::WeakImplHelper
+class ZipPackageBuffer final : public ::cppu::WeakImplHelper
 <
     css::io::XInputStream,
     css::io::XOutputStream,
     css::io::XSeekable
 >
 {
-protected:
     css::uno::Sequence < sal_Int8 > m_aBuffer;
     sal_Int64 m_nBufferSize, m_nEnd, m_nCurrent;
     bool m_bMustInitBuffer;
diff --git a/package/source/manifest/ManifestImport.hxx b/package/source/manifest/ManifestImport.hxx
index 9eac12e61a43..86cafa4ef1d7 100644
--- a/package/source/manifest/ManifestImport.hxx
+++ b/package/source/manifest/ManifestImport.hxx
@@ -48,9 +48,8 @@ struct ManifestScopeEntry
 
 typedef ::std::vector< ManifestScopeEntry > ManifestStack;
 
-class ManifestImport : public cppu::WeakImplHelper < css::xml::sax::XDocumentHandler >
+class ManifestImport final : public cppu::WeakImplHelper < css::xml::sax::XDocumentHandler >
 {
-protected:
     std::vector< css::beans::PropertyValue > aSequence;
     ManifestStack aStack;
     bool bIgnoreEncryptData;
@@ -125,6 +124,7 @@ public:
     virtual void SAL_CALL ignorableWhitespace( const OUString& aWhitespaces ) override;
     virtual void SAL_CALL processingInstruction( const OUString& aTarget, const OUString& aData ) override;
     virtual void SAL_CALL setDocumentLocator( const css::uno::Reference< css::xml::sax::XLocator >& xLocator ) override;
+
 private:
     /// @throws css::uno::RuntimeException
     void doFileEntry(StringHashMap &rConvertedAttribs);
diff --git a/package/source/xstor/oseekinstream.hxx b/package/source/xstor/oseekinstream.hxx
index b8de87c29579..673e3a04742c 100644
--- a/package/source/xstor/oseekinstream.hxx
+++ b/package/source/xstor/oseekinstream.hxx
@@ -24,10 +24,9 @@
 
 #include "ocompinstream.hxx"
 
-class OInputSeekStream : public OInputCompStream
+class OInputSeekStream final : public OInputCompStream
                         , public css::io::XSeekable
 {
-protected:
     css::uno::Reference < css::io::XSeekable > m_xSeekable;
 
 public:
diff --git a/package/source/xstor/selfterminatefilestream.hxx b/package/source/xstor/selfterminatefilestream.hxx
index 661cbcf2fc68..4aecd337d9eb 100644
--- a/package/source/xstor/selfterminatefilestream.hxx
+++ b/package/source/xstor/selfterminatefilestream.hxx
@@ -27,10 +27,9 @@
 
 struct OWriteStream_Impl;
 
-class OSelfTerminateFileStream : public cppu::WeakImplHelper< css::io::XInputStream,
+class OSelfTerminateFileStream final : public cppu::WeakImplHelper< css::io::XInputStream,
                                                                css::io::XSeekable >
 {
-protected:
     css::uno::Reference< css::ucb::XSimpleFileAccess3 > m_xFileAccess;
 
     OUString m_aURL;
diff --git a/package/source/zipapi/MemoryByteGrabber.hxx b/package/source/zipapi/MemoryByteGrabber.hxx
index c5436c2a34f0..c09b4cfb20b0 100644
--- a/package/source/zipapi/MemoryByteGrabber.hxx
+++ b/package/source/zipapi/MemoryByteGrabber.hxx
@@ -23,9 +23,8 @@
 #include <com/sun/star/io/XSeekable.hpp>
 #include <string.h>
 
-class MemoryByteGrabber
+class MemoryByteGrabber final
 {
-protected:
     const css::uno::Sequence < sal_Int8 > maBuffer;
     const sal_Int8 *mpBuffer;
     sal_Int32 mnCurrent, mnEnd;
diff --git a/package/source/zipapi/XUnbufferedStream.hxx b/package/source/zipapi/XUnbufferedStream.hxx
index c9d44ebde07e..47bb3ce583be 100644
--- a/package/source/zipapi/XUnbufferedStream.hxx
+++ b/package/source/zipapi/XUnbufferedStream.hxx
@@ -41,12 +41,11 @@ namespace com { namespace sun { namespace star { namespace uno {
 #define UNBUFF_STREAM_WRAPPEDRAW    2
 
 class EncryptionData;
-class XUnbufferedStream : public cppu::WeakImplHelper
+class XUnbufferedStream final : public cppu::WeakImplHelper
 <
     css::io::XInputStream
 >
 {
-protected:
     rtl::Reference<comphelper::RefCountedMutex> maMutexHolder;
 
     css::uno::Reference < css::io::XInputStream > mxZipStream;
diff --git a/package/source/zippackage/ZipPackageFolderEnumeration.hxx b/package/source/zippackage/ZipPackageFolderEnumeration.hxx
index d4f8b8b1cdba..e5d33b1d5ce5 100644
--- a/package/source/zippackage/ZipPackageFolderEnumeration.hxx
+++ b/package/source/zippackage/ZipPackageFolderEnumeration.hxx
@@ -24,13 +24,12 @@
 #include <com/sun/star/lang/XServiceInfo.hpp>
 #include <HashMaps.hxx>
 
-class ZipPackageFolderEnumeration : public cppu::WeakImplHelper
+class ZipPackageFolderEnumeration final : public cppu::WeakImplHelper
 <
     css::container::XEnumeration,
     css::lang::XServiceInfo
 >
 {
-protected:
     ContentHash& rContents;
     ContentHash::const_iterator aIterator;
 public:
diff --git a/package/source/zippackage/ZipPackageSink.hxx b/package/source/zippackage/ZipPackageSink.hxx
index e7e4cdbef192..d0ba9a6bedae 100644
--- a/package/source/zippackage/ZipPackageSink.hxx
+++ b/package/source/zippackage/ZipPackageSink.hxx
@@ -22,9 +22,8 @@
 #include <com/sun/star/io/XActiveDataSink.hpp>
 #include <cppuhelper/implbase.hxx>
 
-class ZipPackageSink : public ::cppu::WeakImplHelper< css::io::XActiveDataSink >
+class ZipPackageSink final : public ::cppu::WeakImplHelper< css::io::XActiveDataSink >
 {
-protected:
     css::uno::Reference < css::io::XInputStream > xStream;
 public:
     ZipPackageSink();
diff --git a/package/source/zippackage/wrapstreamforshare.hxx b/package/source/zippackage/wrapstreamforshare.hxx
index 649284a69bc7..238483b769f7 100644
--- a/package/source/zippackage/wrapstreamforshare.hxx
+++ b/package/source/zippackage/wrapstreamforshare.hxx
@@ -26,10 +26,9 @@
 #include <cppuhelper/implbase.hxx>
 #include <rtl/ref.hxx>
 
-class WrapStreamForShare : public cppu::WeakImplHelper < css::io::XInputStream
+class WrapStreamForShare final : public cppu::WeakImplHelper < css::io::XInputStream
                                                         , css::io::XSeekable >
 {
-protected:
     rtl::Reference< comphelper::RefCountedMutex > m_xMutex;
     css::uno::Reference < css::io::XInputStream > m_xInStream;
     css::uno::Reference < css::io::XSeekable > m_xSeekable;


More information about the Libreoffice-commits mailing list