From ee1d6af9b73256e13975ec4e95aff6d69a00fed9 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Tue, 31 Oct 2017 14:15:25 +0200 Subject: loplugin:finalclasses in package Change-Id: I020ea1f3bea5c3deab05b9a2154102548c7622cf Reviewed-on: https://gerrit.libreoffice.org/44132 Reviewed-by: Noel Grandin Tested-by: Noel Grandin --- 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 +-- 14 files changed, 15 insertions(+), 28 deletions(-) (limited to 'package') 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 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 #include -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 #include -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 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 #include -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 #include -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 #include -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; -- cgit