summaryrefslogtreecommitdiff
path: root/shell
diff options
context:
space:
mode:
authorPhilipp Hofer <philipp.hofer@protonmail.com>2020-11-12 13:16:05 +0100
committerChristian Lohmaier <lohmaier+LibreOffice@googlemail.com>2020-11-19 10:44:14 +0100
commit7c9a2c4b97c145a358084bed4b875396d3dc3e5c (patch)
tree28875b0ca8e1137ac1efae3851d299ddf5a68e08 /shell
parent02d65d7a19981d342d9ef3996b296b4efda905a4 (diff)
tdf#123936 Formatting files in module shell with clang-format
Change-Id: Iba0c34cff0e04b18a3b4c5b7bb2aa42e14aedb81 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105707 Tested-by: Jenkins Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
Diffstat (limited to 'shell')
-rw-r--r--shell/inc/filepath.hxx2
-rw-r--r--shell/inc/global.hxx2
-rw-r--r--shell/inc/iso8601_converter.hxx2
-rw-r--r--shell/inc/metainforeader.hxx30
-rw-r--r--shell/inc/shlxthdl.hxx16
-rw-r--r--shell/inc/stream_helper.hxx22
-rw-r--r--shell/inc/types.hxx26
-rw-r--r--shell/inc/utilities.hxx30
-rw-r--r--shell/inc/xml_parser.hxx15
-rw-r--r--shell/inc/zipfile.hxx28
-rw-r--r--shell/qa/zip/testzipimpl.cxx16
-rw-r--r--shell/qa/zip/testzipimpl.hxx7
-rw-r--r--shell/qa/zip/ziptest.cxx16
-rw-r--r--shell/source/tools/lngconvex/cmdline.cxx19
-rw-r--r--shell/source/tools/lngconvex/cmdline.hxx13
-rw-r--r--shell/source/win32/ooofilereader/keywordstag.cxx20
-rw-r--r--shell/source/win32/zipfile/zipexcptn.hxx6
17 files changed, 111 insertions, 159 deletions
diff --git a/shell/inc/filepath.hxx b/shell/inc/filepath.hxx
index cc1d42a1ccef..7472ccf8252f 100644
--- a/shell/inc/filepath.hxx
+++ b/shell/inc/filepath.hxx
@@ -10,10 +10,8 @@
#ifndef INCLUDED_SHELL_INC_INTERNAL_FILEPATH_HXX
#define INCLUDED_SHELL_INC_INTERNAL_FILEPATH_HXX
-
// typedefs to allow using Unicode paths on Windows
-
#include <string>
#if defined _WIN32
diff --git a/shell/inc/global.hxx b/shell/inc/global.hxx
index 07b7d5f79e7d..fb812bcf8140 100644
--- a/shell/inc/global.hxx
+++ b/shell/inc/global.hxx
@@ -21,7 +21,7 @@
#define INCLUDED_SHELL_INC_INTERNAL_GLOBAL_HXX
#if !defined WIN32_LEAN_AND_MEAN
-# define WIN32_LEAN_AND_MEAN
+#define WIN32_LEAN_AND_MEAN
#endif
#include <windows.h>
diff --git a/shell/inc/iso8601_converter.hxx b/shell/inc/iso8601_converter.hxx
index a8a0b4ed2ae2..daf2afd0b51a 100644
--- a/shell/inc/iso8601_converter.hxx
+++ b/shell/inc/iso8601_converter.hxx
@@ -22,7 +22,6 @@
#include <string>
-
/* Converts ISO 8601 compliant date/time
representation to the representation
conforming to the current locale,
@@ -30,7 +29,6 @@
*/
std::wstring iso8601_date_to_local_date(const std::wstring& iso8601date);
-
/* Converts ISO 8601 compliant duration
representation to the representation
conforming to the current locale
diff --git a/shell/inc/metainforeader.hxx b/shell/inc/metainforeader.hxx
index 7ff0a734fc3f..6a4e82527e0f 100644
--- a/shell/inc/metainforeader.hxx
+++ b/shell/inc/metainforeader.hxx
@@ -35,9 +35,9 @@ class CMetaInfoReader : public CBaseReader
public:
virtual ~CMetaInfoReader() override;
- CMetaInfoReader( const Filepath_t& DocumentName );
+ CMetaInfoReader(const Filepath_t& DocumentName);
- CMetaInfoReader( StreamInterface* stream );
+ CMetaInfoReader(StreamInterface* stream);
/** check if the Tag is in the target meta.xml file.
@@ -46,7 +46,6 @@ public:
*/
bool hasTag(const std::wstring& TagName) const;
-
/** Get a specific tag content, compound tags will be returned as comma separated list.
@param TagName
@@ -61,7 +60,7 @@ public:
@param AttributeName
the name of the attribute.
*/
- bool hasTagAttribute(const std::wstring& TagName, const std::wstring& AttributeName);
+ bool hasTagAttribute(const std::wstring& TagName, const std::wstring& AttributeName);
/** Get a specific attribute content.
@@ -70,14 +69,13 @@ public:
@param AttributeName
the name of the attribute.
*/
- std::wstring getTagAttribute(const std::wstring& TagName, const std::wstring& AttributeName);
+ std::wstring getTagAttribute(const std::wstring& TagName, const std::wstring& AttributeName);
/** Get the default language of the whole document.
*/
- LocaleSet_t getDefaultLocale( );
+ LocaleSet_t getDefaultLocale();
protected: // protected because its only an implementation relevant class
-
/** start_element occurs when a tag is start.
@param raw_name
@@ -87,10 +85,8 @@ protected: // protected because its only an implementation relevant class
@param attributes
attribute structure.
*/
- virtual void start_element(
- const string_t& raw_name,
- const string_t& local_name,
- const xml_tag_attribute_container_t& attributes) override;
+ virtual void start_element(const string_t& raw_name, const string_t& local_name,
+ const xml_tag_attribute_container_t& attributes) override;
/** end_element occurs when a tag is closed
@@ -99,8 +95,7 @@ protected: // protected because its only an implementation relevant class
@param local_name
local name of the tag.
*/
- virtual void end_element(
- const string_t& raw_name, const string_t& local_name) override;
+ virtual void end_element(const string_t& raw_name, const string_t& local_name) override;
/** characters occurs when receiving characters
@@ -117,25 +112,24 @@ protected:
@param XmlAttributes
attribute structure of the tag to save in.
*/
- ITag* chooseTagReader(
- const std::wstring& tag_name, const XmlTagAttributes_t& XmlAttributes );
+ ITag* chooseTagReader(const std::wstring& tag_name, const XmlTagAttributes_t& XmlAttributes);
/** save the received content into structure.
@param tag_name
the name of the tag.
*/
- void saveTagContent( const std::wstring& tag_name );
+ void saveTagContent(const std::wstring& tag_name);
private:
- XmlTags_t m_AllMetaInfo;
+ XmlTags_t m_AllMetaInfo;
private:
std::stack<ITag*> m_TagBuilderStack;
private:
CKeywordsTag* m_pKeywords_Builder;
- CDummyTag* m_pDummy_Builder;
+ CDummyTag* m_pDummy_Builder;
CSimpleTag* m_pSimple_Builder;
};
diff --git a/shell/inc/shlxthdl.hxx b/shell/inc/shlxthdl.hxx
index 2f1c1b1e8146..00b8bf876777 100644
--- a/shell/inc/shlxthdl.hxx
+++ b/shell/inc/shlxthdl.hxx
@@ -23,20 +23,20 @@
#include <objbase.h>
// {087B3AE3-E237-4467-B8DB-5A38AB959AC9}
-const CLSID CLSID_INFOTIP_HANDLER =
-{0x87b3ae3, 0xe237, 0x4467, {0xb8, 0xdb, 0x5a, 0x38, 0xab, 0x95, 0x9a, 0xc9}};
+const CLSID CLSID_INFOTIP_HANDLER
+ = { 0x87b3ae3, 0xe237, 0x4467, { 0xb8, 0xdb, 0x5a, 0x38, 0xab, 0x95, 0x9a, 0xc9 } };
// {C52AF81D-F7A0-4aab-8E87-F80A60CCD396}
-const CLSID CLSID_COLUMN_HANDLER =
-{ 0xc52af81d, 0xf7a0, 0x4aab, { 0x8e, 0x87, 0xf8, 0xa, 0x60, 0xcc, 0xd3, 0x96 } };
+const CLSID CLSID_COLUMN_HANDLER
+ = { 0xc52af81d, 0xf7a0, 0x4aab, { 0x8e, 0x87, 0xf8, 0xa, 0x60, 0xcc, 0xd3, 0x96 } };
// {63542C48-9552-494a-84F7-73AA6A7C99C1}
-const CLSID CLSID_PROPERTYSHEET_HANDLER =
-{ 0x63542c48, 0x9552, 0x494a, { 0x84, 0xf7, 0x73, 0xaa, 0x6a, 0x7c, 0x99, 0xc1 } };
+const CLSID CLSID_PROPERTYSHEET_HANDLER
+ = { 0x63542c48, 0x9552, 0x494a, { 0x84, 0xf7, 0x73, 0xaa, 0x6a, 0x7c, 0x99, 0xc1 } };
// {3B092F0C-7696-40e3-A80F-68D74DA84210}
-const CLSID CLSID_THUMBVIEWER_HANDLER =
-{ 0x3b092f0c, 0x7696, 0x40e3, { 0xa8, 0xf, 0x68, 0xd7, 0x4d, 0xa8, 0x42, 0x10 } };
+const CLSID CLSID_THUMBVIEWER_HANDLER
+ = { 0x3b092f0c, 0x7696, 0x40e3, { 0xa8, 0xf, 0x68, 0xd7, 0x4d, 0xa8, 0x42, 0x10 } };
extern HINSTANCE g_hModule;
diff --git a/shell/inc/stream_helper.hxx b/shell/inc/stream_helper.hxx
index bcd2f28f04ff..99976cc562d8 100644
--- a/shell/inc/stream_helper.hxx
+++ b/shell/inc/stream_helper.hxx
@@ -28,25 +28,27 @@ struct IStream;
class BufferStream : public StreamInterface
{
public:
- BufferStream(IStream *str);
+ BufferStream(IStream* str);
~BufferStream() override;
- unsigned long sread (unsigned char *vuf, unsigned long size) override;
- long stell () override;
- long sseek (long offset, int origin) override;
+ unsigned long sread(unsigned char* vuf, unsigned long size) override;
+ long stell() override;
+ long sseek(long offset, int origin) override;
+
private:
- IStream *stream;
+ IStream* stream;
};
class FileStream : public StreamInterface
{
public:
- FileStream(const Filepath_char_t *filename);
+ FileStream(const Filepath_char_t* filename);
~FileStream() override;
- unsigned long sread (unsigned char *buf, unsigned long size) override;
- long stell () override;
- long sseek (long offset, int origin) override;
+ unsigned long sread(unsigned char* buf, unsigned long size) override;
+ long stell() override;
+ long sseek(long offset, int origin) override;
+
private:
- FILE *file;
+ FILE* file;
};
#endif
diff --git a/shell/inc/types.hxx b/shell/inc/types.hxx
index 6834bc60963d..140d03245199 100644
--- a/shell/inc/types.hxx
+++ b/shell/inc/types.hxx
@@ -31,9 +31,9 @@
// XmlTags_t, tags defined with tag name and xml tag.
// Contents: Definitions of xml tag used in parser.
-typedef std::map<std::wstring, std::wstring> XmlTagAttributes_t;
-typedef std::pair<std::wstring, XmlTagAttributes_t> XmlTag_t;
-typedef std::map<std::wstring, XmlTag_t> XmlTags_t;
+typedef std::map<std::wstring, std::wstring> XmlTagAttributes_t;
+typedef std::pair<std::wstring, XmlTagAttributes_t> XmlTag_t;
+typedef std::map<std::wstring, XmlTag_t> XmlTags_t;
const XmlTag_t EMPTY_XML_TAG = std::make_pair(std::wstring(), XmlTagAttributes_t());
@@ -45,14 +45,14 @@ const XmlTag_t EMPTY_XML_TAG = std::make_pair(std::wstring(), XmlTagAttributes_t
typedef ::std::wstring Language_t;
typedef ::std::wstring Country_t;
-typedef ::std::pair<Language_t, Country_t > LocaleSet_t;
+typedef ::std::pair<Language_t, Country_t> LocaleSet_t;
typedef ::std::wstring Content_t;
-typedef ::std::pair<LocaleSet_t, Content_t > Chunk_t;
-typedef ::std::vector< Chunk_t > ChunkBuffer_t;
+typedef ::std::pair<LocaleSet_t, Content_t> Chunk_t;
+typedef ::std::vector<Chunk_t> ChunkBuffer_t;
const LocaleSet_t EMPTY_LOCALE = ::std::make_pair(::std::wstring(), ::std::wstring());
-const Chunk_t EMPTY_CHUNK = ::std::make_pair( EMPTY_LOCALE, ::std::wstring());
+const Chunk_t EMPTY_CHUNK = ::std::make_pair(EMPTY_LOCALE, ::std::wstring());
//+-------------------------------------------------------------------------
// Declare: StyleName_t, style name of a style-locale pair.
@@ -60,18 +60,18 @@ const Chunk_t EMPTY_CHUNK = ::std::make_pair( EMPTY_LOCALE, ::std::wstring());
// Contents: Definitions of Style Names.
typedef ::std::wstring StyleName_t;
-typedef ::std::pair <StyleName_t, LocaleSet_t> StyleLocalePair_t;
-typedef ::std::map<StyleName_t, LocaleSet_t> StyleLocaleMap_t;
+typedef ::std::pair<StyleName_t, LocaleSet_t> StyleLocalePair_t;
+typedef ::std::map<StyleName_t, LocaleSet_t> StyleLocaleMap_t;
-const StyleLocalePair_t EMPTY_STYLELOCALE_PAIR = ::std::make_pair(::std::wstring(), EMPTY_LOCALE );
+const StyleLocalePair_t EMPTY_STYLELOCALE_PAIR = ::std::make_pair(::std::wstring(), EMPTY_LOCALE);
class StreamInterface
{
public:
virtual ~StreamInterface() {}
- virtual unsigned long sread (unsigned char* vuf, unsigned long size) = 0;
- virtual long stell () = 0;
- virtual long sseek (long offset, int origin) = 0;
+ virtual unsigned long sread(unsigned char* vuf, unsigned long size) = 0;
+ virtual long stell() = 0;
+ virtual long sseek(long offset, int origin) = 0;
};
#endif
diff --git a/shell/inc/utilities.hxx b/shell/inc/utilities.hxx
index a199c83db5e9..1941d85e658a 100644
--- a/shell/inc/utilities.hxx
+++ b/shell/inc/utilities.hxx
@@ -23,7 +23,7 @@
#include <malloc.h>
#if !defined WIN32_LEAN_AND_MEAN
- #define WIN32_LEAN_AND_MEAN
+#define WIN32_LEAN_AND_MEAN
#endif
#include <windows.h>
@@ -41,25 +41,21 @@
*/
std::wstring StringToWString(const std::string& String);
-
/** Convert a wstring to a string
using CP_ACP
*/
std::string WStringToString(const std::wstring& String);
-
/** Convert a string to a wstring
using CP_UTF8
*/
std::wstring UTF8ToWString(const std::string& String);
-
/** Retrieve a string from the
resources of this module
*/
std::wstring GetResString(int ResId);
-
/** helper function to judge if the string is only has spaces.
@returns
<TRUE>if the provided string contains only but at least one space
@@ -72,33 +68,27 @@ bool HasOnlySpaces(const std::wstring& String);
Windows Locale Identifier corresponding to input LocaleSet.
*/
-
/** Convert a long path name using Windows api call GetShortPathName
*/
-std::wstring getShortPathName( const std::wstring& aLongName );
-
-
-LCID LocaleSetToLCID( const LocaleSet_t & Locale );
+std::wstring getShortPathName(const std::wstring& aLongName);
+LCID LocaleSetToLCID(const LocaleSet_t& Locale);
#ifdef DEBUG
-inline void OutputDebugStringFormatW( LPCWSTR pFormat, ... )
+inline void OutputDebugStringFormatW(LPCWSTR pFormat, ...)
{
- WCHAR buffer[1024];
+ WCHAR buffer[1024];
va_list args;
- va_start( args, pFormat );
- StringCchVPrintfW( buffer, sizeof(buffer)/sizeof(*buffer), pFormat, args );
- va_end( args );
- OutputDebugStringW( buffer );
+ va_start(args, pFormat);
+ StringCchVPrintfW(buffer, sizeof(buffer) / sizeof(*buffer), pFormat, args);
+ va_end(args);
+ OutputDebugStringW(buffer);
}
#else
-static inline void OutputDebugStringFormatW( LPCWSTR, ... )
-{
-}
+static inline void OutputDebugStringFormatW(LPCWSTR, ...) {}
#endif
-
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/shell/inc/xml_parser.hxx b/shell/inc/xml_parser.hxx
index 37c44781cc5a..e07c860dd699 100644
--- a/shell/inc/xml_parser.hxx
+++ b/shell/inc/xml_parser.hxx
@@ -26,15 +26,12 @@
class xml_parser_exception final : public std::runtime_error
{
public:
-
- xml_parser_exception(
- const std::string& error_msg) :
- std::runtime_error(error_msg)
- {}
-
+ xml_parser_exception(const std::string& error_msg)
+ : std::runtime_error(error_msg)
+ {
+ }
};
-
// Simple wrapper around expat, the xml parser library
// created by James Clark
@@ -88,9 +85,9 @@ public:
/** Returns the currently used document handler or null if
no document handler was set before. */
- i_xml_parser_event_handler* get_document_handler() const { return document_handler_;}
-private:
+ i_xml_parser_event_handler* get_document_handler() const { return document_handler_; }
+private:
void init();
private:
diff --git a/shell/inc/zipfile.hxx b/shell/inc/zipfile.hxx
index 1d774f77362a..f845368bf78a 100644
--- a/shell/inc/zipfile.hxx
+++ b/shell/inc/zipfile.hxx
@@ -33,12 +33,11 @@ class StreamInterface;
class ZipFile
{
public:
- typedef std::vector<std::string> Directory_t;
+ typedef std::vector<std::string> Directory_t;
typedef std::unique_ptr<Directory_t> DirectoryPtr_t;
- typedef std::vector<char> ZipContentBuffer_t;
+ typedef std::vector<char> ZipContentBuffer_t;
public:
-
/** Checks whether a file is a zip file or not
@precond The given parameter must be a string with length > 0
@@ -52,10 +51,9 @@ public:
IOException if the specified file doesn't exist
AccessViolationException if read access to the file is denied
*/
- static bool IsZipFile(const Filepath_t &FileName);
-
- static bool IsZipFile(void *stream);
+ static bool IsZipFile(const Filepath_t& FileName);
+ static bool IsZipFile(void* stream);
/** Returns whether the version of the specified zip file may be uncompressed with the
currently used zlib version or not
@@ -72,12 +70,11 @@ public:
IOException if the specified file doesn't exist or is no zip file
AccessViolationException if read access to the file is denied
*/
- static bool IsValidZipFileVersionNumber(const Filepath_t &FileName);
+ static bool IsValidZipFileVersionNumber(const Filepath_t& FileName);
- static bool IsValidZipFileVersionNumber(void *stream);
+ static bool IsValidZipFileVersionNumber(void* stream);
public:
-
/** Constructs a zip file from a zip file
@precond The given parameter must be a string with length > 0
@@ -90,10 +87,9 @@ public:
WrongZipVersionException if the zip file cannot be uncompressed
with the used zlib version
*/
- ZipFile(const Filepath_t &FileName);
-
- ZipFile(StreamInterface *stream);
+ ZipFile(const Filepath_t& FileName);
+ ZipFile(StreamInterface* stream);
/** Destroys a zip file
*/
@@ -117,7 +113,8 @@ public:
ZipContentMissException if the specified zip content
does not exist in this zip file
*/
- void GetUncompressedContent(const std::string &ContentName, /*inout*/ ZipContentBuffer_t &ContentBuffer);
+ void GetUncompressedContent(const std::string& ContentName,
+ /*inout*/ ZipContentBuffer_t& ContentBuffer);
/** Returns a list with the content names contained within this file
@@ -129,10 +126,9 @@ public:
iterating over a ZipFileDirectory returned by
GetDirectory
*/
- bool HasContent(const std::string &ContentName) const;
+ bool HasContent(const std::string& ContentName) const;
private:
-
/** Returns the length of the longest file name
in the current zip file
@@ -141,7 +137,7 @@ private:
long GetFileLongestFileNameLength() const;
private:
- StreamInterface *m_pStream;
+ StreamInterface* m_pStream;
bool m_bShouldFree;
};
diff --git a/shell/qa/zip/testzipimpl.cxx b/shell/qa/zip/testzipimpl.cxx
index 8fe27d9caffb..e669b6a8b40d 100644
--- a/shell/qa/zip/testzipimpl.cxx
+++ b/shell/qa/zip/testzipimpl.cxx
@@ -19,8 +19,9 @@
#include "testzipimpl.hxx"
-TestZipImpl::TestZipImpl(StreamInterface *stream) :
- zipFile(ZipFile(stream)), expectedContents()
+TestZipImpl::TestZipImpl(StreamInterface* stream)
+ : zipFile(ZipFile(stream))
+ , expectedContents()
{
expectedContents.push_back("mimetype");
expectedContents.push_back("Configurations2/statusbar/");
@@ -42,22 +43,17 @@ TestZipImpl::TestZipImpl(StreamInterface *stream) :
sort(expectedContents.begin(), expectedContents.end());
}
-TestZipImpl::~TestZipImpl()
-{
-}
+TestZipImpl::~TestZipImpl() {}
bool TestZipImpl::test_directory()
{
ZipFile::DirectoryPtr_t contents = zipFile.GetDirectory();
- vector<string> &stringVector = *contents;
+ vector<string>& stringVector = *contents;
sort(stringVector.begin(), stringVector.end());
return expectedContents == stringVector;
}
-bool TestZipImpl::test_hasContentCaseInSensitive()
-{
- return zipFile.HasContent("mimetype");
-}
+bool TestZipImpl::test_hasContentCaseInSensitive() { return zipFile.HasContent("mimetype"); }
bool TestZipImpl::test_getContent()
{
diff --git a/shell/qa/zip/testzipimpl.hxx b/shell/qa/zip/testzipimpl.hxx
index b0f4b91b172d..ae1ff8cedd72 100644
--- a/shell/qa/zip/testzipimpl.hxx
+++ b/shell/qa/zip/testzipimpl.hxx
@@ -30,11 +30,12 @@ using namespace std;
class TestZipImpl
{
- private:
+private:
ZipFile zipFile;
vector<string> expectedContents;
- public:
- explicit TestZipImpl(StreamInterface *stream);
+
+public:
+ explicit TestZipImpl(StreamInterface* stream);
~TestZipImpl();
bool test_directory();
bool test_hasContentCaseInSensitive();
diff --git a/shell/qa/zip/ziptest.cxx b/shell/qa/zip/ziptest.cxx
index 7af18912abd2..2ebe056d5b8b 100644
--- a/shell/qa/zip/ziptest.cxx
+++ b/shell/qa/zip/ziptest.cxx
@@ -18,7 +18,7 @@
*/
#if !defined WIN32_LEAN_AND_MEAN
-# define WIN32_LEAN_AND_MEAN
+#define WIN32_LEAN_AND_MEAN
#endif
#include <windows.h>
#include <ole2.h>
@@ -38,6 +38,7 @@ class Test : public CppUnit::TestFixture
private:
wstring documentName;
LPSTREAM pStream;
+
public:
Test();
void test_file_directory();
@@ -58,7 +59,9 @@ public:
CPPUNIT_TEST_SUITE_REGISTRATION(Test);
-Test::Test() : documentName(), pStream(nullptr)
+Test::Test()
+ : documentName()
+ , pStream(nullptr)
{
const wchar_t* pSrcRoot = _wgetenv(L"SRC_ROOT");
if (pSrcRoot)
@@ -69,7 +72,8 @@ Test::Test() : documentName(), pStream(nullptr)
documentName.append(L"shell/qa/zip/simpledocument.odt");
// Create an IStream pointer from the file
- HANDLE hFile = CreateFileW(documentName.c_str(), GENERIC_READ, 0, nullptr, OPEN_EXISTING, 0, nullptr);
+ HANDLE hFile
+ = CreateFileW(documentName.c_str(), GENERIC_READ, 0, nullptr, OPEN_EXISTING, 0, nullptr);
DWORD dwFileSize = GetFileSize(hFile, nullptr);
HGLOBAL hGlobal = GlobalAlloc(GMEM_MOVEABLE, dwFileSize);
@@ -90,7 +94,8 @@ void Test::test_file_directory()
FileStream stream(documentName.c_str());
TestZipImpl testImpl(&stream);
bool isPassed = testImpl.test_directory();
- CPPUNIT_ASSERT_MESSAGE("FileStream: Content does not match with expected directory names.", isPassed);
+ CPPUNIT_ASSERT_MESSAGE("FileStream: Content does not match with expected directory names.",
+ isPassed);
}
void Test::test_file_hasContentCaseInSensitive()
@@ -114,7 +119,8 @@ void Test::test_stream_directory()
BufferStream stream(pStream);
TestZipImpl testImpl(&stream);
bool isPassed = testImpl.test_directory();
- CPPUNIT_ASSERT_MESSAGE("BufferStream: Content does not match with expected directory names.", isPassed);
+ CPPUNIT_ASSERT_MESSAGE("BufferStream: Content does not match with expected directory names.",
+ isPassed);
}
void Test::test_stream_hasContentCaseInSensitive()
diff --git a/shell/source/tools/lngconvex/cmdline.cxx b/shell/source/tools/lngconvex/cmdline.cxx
index ffbd228e582a..e3f24e1d8b5c 100644
--- a/shell/source/tools/lngconvex/cmdline.cxx
+++ b/shell/source/tools/lngconvex/cmdline.cxx
@@ -17,27 +17,22 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-
#include <stdexcept>
#include "cmdline.hxx"
-
/** Simple command line abstraction
*/
// Creation
-
-CommandLine::CommandLine(size_t argc, char* argv[]) :
- m_argc(argc),
- m_argv(argv)
+CommandLine::CommandLine(size_t argc, char* argv[])
+ : m_argc(argc)
+ , m_argv(argv)
{
}
-
// Query
-
/** Returns an argument by name. If there are
duplicate argument names in the command line,
the first one wins.
@@ -58,13 +53,13 @@ std::string CommandLine::get_arg(const std::string& ArgumentName) const
{
std::string arg_value;
size_t i;
- for ( i = 0; i < m_argc; i++)
+ for (i = 0; i < m_argc; i++)
{
std::string arg = m_argv[i];
- if (ArgumentName == arg && ((i+1) < m_argc) && !is_arg_name(m_argv[i+1]))
+ if (ArgumentName == arg && ((i + 1) < m_argc) && !is_arg_name(m_argv[i + 1]))
{
- arg_value = m_argv[i+1];
+ arg_value = m_argv[i + 1];
break;
}
}
@@ -75,10 +70,8 @@ std::string CommandLine::get_arg(const std::string& ArgumentName) const
return arg_value;
}
-
// Command
-
/** Returns whether a given argument is an argument name
*/
bool CommandLine::is_arg_name(const std::string& Argument)
diff --git a/shell/source/tools/lngconvex/cmdline.hxx b/shell/source/tools/lngconvex/cmdline.hxx
index bbf5afa5b0e5..507ace6174de 100644
--- a/shell/source/tools/lngconvex/cmdline.hxx
+++ b/shell/source/tools/lngconvex/cmdline.hxx
@@ -24,23 +24,18 @@
#include <sal/config.h>
-
/** Simple command line abstraction
*/
class CommandLine
{
public:
-
// Creation
-
CommandLine(size_t argc, char* argv[]);
-
// Query
-
/** Returns an argument by name. If there are
duplicate argument names in the command line,
the first one wins.
@@ -59,18 +54,16 @@ public:
*/
std::string get_arg(const std::string& ArgumentName) const;
-
private:
-
/** Returns whether a given argument is an argument name
*/
static bool is_arg_name(const std::string& Argument);
private:
- size_t m_argc;
- char** m_argv;
+ size_t m_argc;
+ char** m_argv;
-// prevent copy and assignment
+ // prevent copy and assignment
private:
CommandLine(const CommandLine&) = delete;
CommandLine& operator=(const CommandLine&) = delete;
diff --git a/shell/source/win32/ooofilereader/keywordstag.cxx b/shell/source/win32/ooofilereader/keywordstag.cxx
index 8a8600e2823f..4bc63e0423b0 100644
--- a/shell/source/win32/ooofilereader/keywordstag.cxx
+++ b/shell/source/win32/ooofilereader/keywordstag.cxx
@@ -21,15 +21,9 @@
/*********************** CKeywordsTag ***********************/
-void CKeywordsTag::startTag()
-{
- m_sCurrentKeyword.clear();
-}
+void CKeywordsTag::startTag() { m_sCurrentKeyword.clear(); }
-void CKeywordsTag::endTag()
-{
- m_slKeywords.push_back(m_sCurrentKeyword);
-}
+void CKeywordsTag::endTag() { m_slKeywords.push_back(m_sCurrentKeyword); }
void CKeywordsTag::addCharacters(const std::wstring& characters)
{
@@ -41,13 +35,13 @@ void CKeywordsTag::addAttributes(const XmlTagAttributes_t& /*attributes*/)
// there are no attributes for keywords
}
-std::wstring CKeywordsTag::getTagContent( )
+std::wstring CKeywordsTag::getTagContent()
{
- auto keywords_Iter= m_slKeywords.cbegin( );
- auto keywords_Iter_end = m_slKeywords.cend( );
+ auto keywords_Iter = m_slKeywords.cbegin();
+ auto keywords_Iter_end = m_slKeywords.cend();
- std::wstring ret_KeyWord_String = ( keywords_Iter != keywords_Iter_end) ? *keywords_Iter++ : L"";
- for ( ; keywords_Iter != keywords_Iter_end; ++keywords_Iter)
+ std::wstring ret_KeyWord_String = (keywords_Iter != keywords_Iter_end) ? *keywords_Iter++ : L"";
+ for (; keywords_Iter != keywords_Iter_end; ++keywords_Iter)
ret_KeyWord_String += L"," + *keywords_Iter;
return ret_KeyWord_String;
}
diff --git a/shell/source/win32/zipfile/zipexcptn.hxx b/shell/source/win32/zipfile/zipexcptn.hxx
index 6fb7c0d971b7..f6c6205058da 100644
--- a/shell/source/win32/zipfile/zipexcptn.hxx
+++ b/shell/source/win32/zipfile/zipexcptn.hxx
@@ -24,7 +24,6 @@
#include <stdexcept>
-
class RuntimeException : public std::exception
{
public:
@@ -37,7 +36,6 @@ private:
int m_Error;
};
-
class ZipException : public RuntimeException
{
public:
@@ -46,7 +44,6 @@ public:
virtual const char* what() const throw() override;
};
-
class Win32Exception : public RuntimeException
{
public:
@@ -59,21 +56,18 @@ private:
mutable char* m_MsgBuff;
};
-
class ZipContentMissException : public ZipException
{
public:
explicit ZipContentMissException(int Error);
};
-
class AccessViolationException : public Win32Exception
{
public:
explicit AccessViolationException(int Error);
};
-
class IOException : public Win32Exception
{
public: