summaryrefslogtreecommitdiff
path: root/package
diff options
context:
space:
mode:
authorPhilipp Hofer <philipp.hofer@protonmail.com>2020-11-12 13:09:45 +0100
committerChristian Lohmaier <lohmaier+LibreOffice@googlemail.com>2020-11-19 19:23:33 +0100
commiteb4c2e96f38a6b5280a83709e55fbb5b8d7e9d36 (patch)
treea1a8ab31f7869b5b2d32629323e6f98074676622 /package
parent4d4e95be173e84b5040af46a459b3c071bfd744a (diff)
tdf#123936 Formatting files in module package with clang-format
Change-Id: I3ff80c6c636003d468f384e0d6fbfb5233e0b4da Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105696 Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com> Tested-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
Diffstat (limited to 'package')
-rw-r--r--package/inc/EncryptedDataHeader.hxx3
-rw-r--r--package/inc/PackageConstants.hxx26
-rw-r--r--package/inc/ZipEnumeration.hxx7
-rw-r--r--package/source/xstor/disposelistener.hxx6
-rw-r--r--package/source/zipapi/ZipEnumeration.cxx15
-rw-r--r--package/source/zippackage/ZipPackageFolderEnumeration.cxx26
-rw-r--r--package/source/zippackage/ZipPackageFolderEnumeration.hxx21
-rw-r--r--package/source/zippackage/ZipPackageSink.cxx11
-rw-r--r--package/source/zippackage/ZipPackageSink.hxx10
9 files changed, 59 insertions, 66 deletions
diff --git a/package/inc/EncryptedDataHeader.hxx b/package/inc/EncryptedDataHeader.hxx
index 26d8e62d02db..6860c50abb48 100644
--- a/package/inc/EncryptedDataHeader.hxx
+++ b/package/inc/EncryptedDataHeader.hxx
@@ -42,7 +42,8 @@
*/
const sal_uInt32 n_ConstHeader = 0x05024d4dL; // "MM\002\005"
-const sal_Int32 n_ConstHeaderSize = 38; // + salt length + iv length + digest length + mediatype length
+const sal_Int32 n_ConstHeaderSize
+ = 38; // + salt length + iv length + digest length + mediatype length
const sal_Int16 n_ConstCurrentVersion = 1;
#endif
diff --git a/package/inc/PackageConstants.hxx b/package/inc/PackageConstants.hxx
index b81c0dd0a904..141da220ec69 100644
--- a/package/inc/PackageConstants.hxx
+++ b/package/inc/PackageConstants.hxx
@@ -30,22 +30,22 @@ const sal_Int32 n_ConstDigestLength = 1024;
const sal_Int32 n_ConstDigestDecrypt = 1056; // 1024 + 32
// the constants related to the manifest.xml entries
-#define PKG_MNFST_FULLPATH 0 //FullPath (Put full-path property first for MBA)
-#define PKG_MNFST_VERSION 1 //Version
-#define PKG_MNFST_MEDIATYPE 2 //MediaType
-
-#define PKG_MNFST_INIVECTOR 3 //InitialisationVector
-#define PKG_MNFST_SALT 4 //Salt
-#define PKG_MNFST_ITERATION 5 //IterationCount
-#define PKG_MNFST_UCOMPSIZE 6 //Size
-#define PKG_MNFST_DIGEST 7 //Digest
-#define PKG_MNFST_ENCALG 8 //EncryptionAlgorithm
-#define PKG_MNFST_STARTALG 9 //StartKeyAlgorithm
-#define PKG_MNFST_DIGESTALG 10 //DigestAlgorithm
+#define PKG_MNFST_FULLPATH 0 //FullPath (Put full-path property first for MBA)
+#define PKG_MNFST_VERSION 1 //Version
+#define PKG_MNFST_MEDIATYPE 2 //MediaType
+
+#define PKG_MNFST_INIVECTOR 3 //InitialisationVector
+#define PKG_MNFST_SALT 4 //Salt
+#define PKG_MNFST_ITERATION 5 //IterationCount
+#define PKG_MNFST_UCOMPSIZE 6 //Size
+#define PKG_MNFST_DIGEST 7 //Digest
+#define PKG_MNFST_ENCALG 8 //EncryptionAlgorithm
+#define PKG_MNFST_STARTALG 9 //StartKeyAlgorithm
+#define PKG_MNFST_DIGESTALG 10 //DigestAlgorithm
#define PKG_MNFST_DERKEYSIZE 11 //DerivedKeySize
#define PKG_SIZE_NOENCR_MNFST 3
-#define PKG_SIZE_ENCR_MNFST 12
+#define PKG_SIZE_ENCR_MNFST 12
// the properties related constants
#define ENCRYPTION_KEY_PROPERTY "EncryptionKey"
diff --git a/package/inc/ZipEnumeration.hxx b/package/inc/ZipEnumeration.hxx
index cc4156a0ee52..f0a810ea29cd 100644
--- a/package/inc/ZipEnumeration.hxx
+++ b/package/inc/ZipEnumeration.hxx
@@ -23,12 +23,13 @@
class ZipEnumeration final
{
- EntryHash &rEntryHash;
+ EntryHash& rEntryHash;
EntryHash::const_iterator aIterator;
+
public:
bool hasMoreElements();
- const ZipEntry * nextElement();
- ZipEnumeration( EntryHash &rNewEntryHash );
+ const ZipEntry* nextElement();
+ ZipEnumeration(EntryHash& rNewEntryHash);
~ZipEnumeration();
};
diff --git a/package/source/xstor/disposelistener.hxx b/package/source/xstor/disposelistener.hxx
index 5abb727cdbff..79b0976d8188 100644
--- a/package/source/xstor/disposelistener.hxx
+++ b/package/source/xstor/disposelistener.hxx
@@ -25,18 +25,18 @@
#include <osl/mutex.hxx>
class OStorage;
-class OChildDispListener_Impl : public ::cppu::WeakImplHelper < css::lang::XEventListener >
+class OChildDispListener_Impl : public ::cppu::WeakImplHelper<css::lang::XEventListener>
{
::osl::Mutex m_aMutex;
OStorage* m_pStorage;
public:
- explicit OChildDispListener_Impl( OStorage& aStorage );
+ explicit OChildDispListener_Impl(OStorage& aStorage);
virtual ~OChildDispListener_Impl() override;
void OwnerIsDisposed();
- virtual void SAL_CALL disposing( const css::lang::EventObject& Source ) override;
+ virtual void SAL_CALL disposing(const css::lang::EventObject& Source) override;
};
#endif
diff --git a/package/source/zipapi/ZipEnumeration.cxx b/package/source/zipapi/ZipEnumeration.cxx
index 794ac1a7b9fc..9849c6854f61 100644
--- a/package/source/zipapi/ZipEnumeration.cxx
+++ b/package/source/zipapi/ZipEnumeration.cxx
@@ -21,18 +21,13 @@
/** Provides an Enumeration over the contents of a Zip file */
-ZipEnumeration::ZipEnumeration( EntryHash & rNewEntryHash)
-: rEntryHash(rNewEntryHash)
-, aIterator(rEntryHash.begin())
+ZipEnumeration::ZipEnumeration(EntryHash& rNewEntryHash)
+ : rEntryHash(rNewEntryHash)
+ , aIterator(rEntryHash.begin())
{
}
-ZipEnumeration::~ZipEnumeration()
-{
-}
-bool ZipEnumeration::hasMoreElements()
-{
- return (aIterator != rEntryHash.end());
-}
+ZipEnumeration::~ZipEnumeration() {}
+bool ZipEnumeration::hasMoreElements() { return (aIterator != rEntryHash.end()); }
const ZipEntry* ZipEnumeration::nextElement()
{
diff --git a/package/source/zippackage/ZipPackageFolderEnumeration.cxx b/package/source/zippackage/ZipPackageFolderEnumeration.cxx
index bcedad425f18..72b4650f24dd 100644
--- a/package/source/zippackage/ZipPackageFolderEnumeration.cxx
+++ b/package/source/zippackage/ZipPackageFolderEnumeration.cxx
@@ -30,25 +30,23 @@ using namespace com::sun::star;
#define THROW_WHERE ""
#endif
-ZipPackageFolderEnumeration::ZipPackageFolderEnumeration ( ContentHash &rInput)
-: rContents (rInput)
-, aIterator (rContents.begin())
+ZipPackageFolderEnumeration::ZipPackageFolderEnumeration(ContentHash& rInput)
+ : rContents(rInput)
+ , aIterator(rContents.begin())
{
}
-ZipPackageFolderEnumeration::~ZipPackageFolderEnumeration()
-{
-}
+ZipPackageFolderEnumeration::~ZipPackageFolderEnumeration() {}
-sal_Bool SAL_CALL ZipPackageFolderEnumeration::hasMoreElements( )
+sal_Bool SAL_CALL ZipPackageFolderEnumeration::hasMoreElements()
{
- return (aIterator != rContents.end() );
+ return (aIterator != rContents.end());
}
-uno::Any SAL_CALL ZipPackageFolderEnumeration::nextElement( )
+uno::Any SAL_CALL ZipPackageFolderEnumeration::nextElement()
{
uno::Any aAny;
- if (aIterator == rContents.end() )
- throw container::NoSuchElementException(THROW_WHERE );
+ if (aIterator == rContents.end())
+ throw container::NoSuchElementException(THROW_WHERE);
aAny <<= (*aIterator).second->xTunnel;
++aIterator;
return aAny;
@@ -59,13 +57,13 @@ OUString ZipPackageFolderEnumeration::getImplementationName()
return "ZipPackageFolderEnumeration";
}
-uno::Sequence< OUString > ZipPackageFolderEnumeration::getSupportedServiceNames()
+uno::Sequence<OUString> ZipPackageFolderEnumeration::getSupportedServiceNames()
{
- uno::Sequence< OUString > aNames { "com.sun.star.packages.PackageFolderEnumeration" };
+ uno::Sequence<OUString> aNames{ "com.sun.star.packages.PackageFolderEnumeration" };
return aNames;
}
-sal_Bool SAL_CALL ZipPackageFolderEnumeration::supportsService( OUString const & rServiceName )
+sal_Bool SAL_CALL ZipPackageFolderEnumeration::supportsService(OUString const& rServiceName)
{
return cppu::supportsService(this, rServiceName);
}
diff --git a/package/source/zippackage/ZipPackageFolderEnumeration.hxx b/package/source/zippackage/ZipPackageFolderEnumeration.hxx
index e5d33b1d5ce5..5544478cd475 100644
--- a/package/source/zippackage/ZipPackageFolderEnumeration.hxx
+++ b/package/source/zippackage/ZipPackageFolderEnumeration.hxx
@@ -24,28 +24,25 @@
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <HashMaps.hxx>
-class ZipPackageFolderEnumeration final : public cppu::WeakImplHelper
-<
- css::container::XEnumeration,
- css::lang::XServiceInfo
->
+class ZipPackageFolderEnumeration final
+ : public cppu::WeakImplHelper<css::container::XEnumeration, css::lang::XServiceInfo>
{
ContentHash& rContents;
ContentHash::const_iterator aIterator;
+
public:
//ZipPackageFolderEnumeration (unordered_map < OUString, css::uno::Reference < css::container::XNamed >, hashFunc, eqFunc > &rInput);
- ZipPackageFolderEnumeration (ContentHash &rInput);
+ ZipPackageFolderEnumeration(ContentHash& rInput);
virtual ~ZipPackageFolderEnumeration() override;
// XEnumeration
- virtual sal_Bool SAL_CALL hasMoreElements( ) override;
- virtual css::uno::Any SAL_CALL nextElement( ) override;
+ virtual sal_Bool SAL_CALL hasMoreElements() override;
+ virtual css::uno::Any SAL_CALL nextElement() override;
// XServiceInfo
- virtual OUString SAL_CALL getImplementationName( ) override;
- virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) override;
- virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames( ) override;
-
+ virtual OUString SAL_CALL getImplementationName() override;
+ virtual sal_Bool SAL_CALL supportsService(const OUString& ServiceName) override;
+ virtual css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() override;
};
#endif
diff --git a/package/source/zippackage/ZipPackageSink.cxx b/package/source/zippackage/ZipPackageSink.cxx
index b6e087e3b4de..103af9d6edef 100644
--- a/package/source/zippackage/ZipPackageSink.cxx
+++ b/package/source/zippackage/ZipPackageSink.cxx
@@ -20,17 +20,16 @@
#include "ZipPackageSink.hxx"
ZipPackageSink::ZipPackageSink()
-: xStream ( css::uno::Reference < css::io::XInputStream > (nullptr))
+ : xStream(css::uno::Reference<css::io::XInputStream>(nullptr))
{
}
-ZipPackageSink::~ZipPackageSink()
-{
-}
-void SAL_CALL ZipPackageSink::setInputStream( const css::uno::Reference< css::io::XInputStream >& aStream )
+ZipPackageSink::~ZipPackageSink() {}
+void SAL_CALL
+ZipPackageSink::setInputStream(const css::uno::Reference<css::io::XInputStream>& aStream)
{
xStream = aStream;
}
-css::uno::Reference< css::io::XInputStream > SAL_CALL ZipPackageSink::getInputStream( )
+css::uno::Reference<css::io::XInputStream> SAL_CALL ZipPackageSink::getInputStream()
{
return xStream;
}
diff --git a/package/source/zippackage/ZipPackageSink.hxx b/package/source/zippackage/ZipPackageSink.hxx
index d0ba9a6bedae..9bc406c89e12 100644
--- a/package/source/zippackage/ZipPackageSink.hxx
+++ b/package/source/zippackage/ZipPackageSink.hxx
@@ -22,14 +22,16 @@
#include <com/sun/star/io/XActiveDataSink.hpp>
#include <cppuhelper/implbase.hxx>
-class ZipPackageSink final : public ::cppu::WeakImplHelper< css::io::XActiveDataSink >
+class ZipPackageSink final : public ::cppu::WeakImplHelper<css::io::XActiveDataSink>
{
- css::uno::Reference < css::io::XInputStream > xStream;
+ css::uno::Reference<css::io::XInputStream> xStream;
+
public:
ZipPackageSink();
virtual ~ZipPackageSink() override;
- virtual void SAL_CALL setInputStream( const css::uno::Reference< css::io::XInputStream >& aStream ) override;
- virtual css::uno::Reference< css::io::XInputStream > SAL_CALL getInputStream( ) override;
+ virtual void SAL_CALL
+ setInputStream(const css::uno::Reference<css::io::XInputStream>& aStream) override;
+ virtual css::uno::Reference<css::io::XInputStream> SAL_CALL getInputStream() override;
};
#endif