summaryrefslogtreecommitdiff
path: root/vcl/source
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2017-11-08 11:28:04 +0100
committerStephan Bergmann <sbergman@redhat.com>2017-11-08 15:35:18 +0100
commitb536e10390c171e96b6477c04d66023a1da543c4 (patch)
tree4c04275831cea51f0a343d00e382f519a08bcd90 /vcl/source
parent958c09acc1058a4a0eba28ac94f2883fff64d600 (diff)
Retrofit "KeepEmptyLinesAtTheStartOfBlocks: false" into .clang-format
...even if that can cause reformatting of already formatted code. The problem I came across is that without this something like > namespace { > > void f1(); > > void f2(); > > } (which is quite a common style in the current code base) would be changed to > namespace > { > > void f1(); > > void f2(); > } instead of > namespace > { > void f1(); > > void f2(); > } and I found no other clang-format style option that would result in the presence or absence of an empty line be identical at the start and end of the namespace block. vmiklos asked to reformat the existing new (i.e., non-blacklisted) files at the same time, so this commit includes that. Some of those new files had not been formatted at all, so this commit includes their full reformatting changes. Change-Id: I54daf0c11098d07d02c802104cf7f56372e61f7c Reviewed-on: https://gerrit.libreoffice.org/44450 Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'vcl/source')
-rw-r--r--vcl/source/helper/errcode.cxx163
1 files changed, 120 insertions, 43 deletions
diff --git a/vcl/source/helper/errcode.cxx b/vcl/source/helper/errcode.cxx
index e1554020fced..0e1d9430e1c7 100644
--- a/vcl/source/helper/errcode.cxx
+++ b/vcl/source/helper/errcode.cxx
@@ -21,9 +21,7 @@
VCL_DLLPUBLIC std::ostream& operator<<(std::ostream& os, const ErrCode& err)
{
- os << err.toHexString()
- << "("
- << (err.IsWarning() ? "Warning" : "Error");
+ os << err.toHexString() << "(" << (err.IsWarning() ? "Warning" : "Error");
if (err.IsDynamic())
os << " Dynamic";
else
@@ -31,50 +29,129 @@ VCL_DLLPUBLIC std::ostream& operator<<(std::ostream& os, const ErrCode& err)
os << " Area:";
switch (err.GetArea())
{
- case ErrCodeArea::Io: os << "Io"; break;
- case ErrCodeArea::Sv: os << "Sv"; break;
- case ErrCodeArea::Sfx: os << "Sfx"; break;
- case ErrCodeArea::Inet: os << "Inet"; break;
- case ErrCodeArea::Vcl: os << "Vcl"; break;
- case ErrCodeArea::Svx: os << "Svx"; break;
- case ErrCodeArea::So: os << "So"; break;
- case ErrCodeArea::Sbx: os << "Sbx"; break;
- case ErrCodeArea::Db: os << "Db"; break;
- case ErrCodeArea::Java: os << "Java"; break;
- case ErrCodeArea::Uui: os << "Uui"; break;
- case ErrCodeArea::Lib2: os << "Lib2"; break;
- case ErrCodeArea::Chaos: os << "Chaos"; break;
- case ErrCodeArea::Sc: os << "Sc"; break;
- case ErrCodeArea::Sd: os << "Sd"; break;
- case ErrCodeArea::Sw: os << "Sw"; break;
- default: os << "Unknown";
+ case ErrCodeArea::Io:
+ os << "Io";
+ break;
+ case ErrCodeArea::Sv:
+ os << "Sv";
+ break;
+ case ErrCodeArea::Sfx:
+ os << "Sfx";
+ break;
+ case ErrCodeArea::Inet:
+ os << "Inet";
+ break;
+ case ErrCodeArea::Vcl:
+ os << "Vcl";
+ break;
+ case ErrCodeArea::Svx:
+ os << "Svx";
+ break;
+ case ErrCodeArea::So:
+ os << "So";
+ break;
+ case ErrCodeArea::Sbx:
+ os << "Sbx";
+ break;
+ case ErrCodeArea::Db:
+ os << "Db";
+ break;
+ case ErrCodeArea::Java:
+ os << "Java";
+ break;
+ case ErrCodeArea::Uui:
+ os << "Uui";
+ break;
+ case ErrCodeArea::Lib2:
+ os << "Lib2";
+ break;
+ case ErrCodeArea::Chaos:
+ os << "Chaos";
+ break;
+ case ErrCodeArea::Sc:
+ os << "Sc";
+ break;
+ case ErrCodeArea::Sd:
+ os << "Sd";
+ break;
+ case ErrCodeArea::Sw:
+ os << "Sw";
+ break;
+ default:
+ os << "Unknown";
}
os << " Class:";
switch (err.GetClass())
{
- case ErrCodeClass::NONE: os << "NONE"; break;
- case ErrCodeClass::Abort: os << "Abort"; break;
- case ErrCodeClass::General: os << "General"; break;
- case ErrCodeClass::NotExists: os << "NotExists"; break;
- case ErrCodeClass::AlreadyExists: os << "AlreadyExists"; break;
- case ErrCodeClass::Access: os << "Access"; break;
- case ErrCodeClass::Path: os << "Path"; break;
- case ErrCodeClass::Locking: os << "Locking"; break;
- case ErrCodeClass::Parameter: os << "Parameter"; break;
- case ErrCodeClass::Space: os << "Space"; break;
- case ErrCodeClass::NotSupported: os << "NotSupported"; break;
- case ErrCodeClass::Read: os << "Read"; break;
- case ErrCodeClass::Write: os << "Write"; break;
- case ErrCodeClass::Unknown: os << "Unknown"; break;
- case ErrCodeClass::Version: os << "Version"; break;
- case ErrCodeClass::Format: os << "Format"; break;
- case ErrCodeClass::Create: os << "Create"; break;
- case ErrCodeClass::Import: os << "Import"; break;
- case ErrCodeClass::Export: os << "Export"; break;
- case ErrCodeClass::So: os << "So"; break;
- case ErrCodeClass::Sbx: os << "Sbx"; break;
- case ErrCodeClass::Runtime: os << "Runtime"; break;
- case ErrCodeClass::Compiler: os << "Compiler"; break;
+ case ErrCodeClass::NONE:
+ os << "NONE";
+ break;
+ case ErrCodeClass::Abort:
+ os << "Abort";
+ break;
+ case ErrCodeClass::General:
+ os << "General";
+ break;
+ case ErrCodeClass::NotExists:
+ os << "NotExists";
+ break;
+ case ErrCodeClass::AlreadyExists:
+ os << "AlreadyExists";
+ break;
+ case ErrCodeClass::Access:
+ os << "Access";
+ break;
+ case ErrCodeClass::Path:
+ os << "Path";
+ break;
+ case ErrCodeClass::Locking:
+ os << "Locking";
+ break;
+ case ErrCodeClass::Parameter:
+ os << "Parameter";
+ break;
+ case ErrCodeClass::Space:
+ os << "Space";
+ break;
+ case ErrCodeClass::NotSupported:
+ os << "NotSupported";
+ break;
+ case ErrCodeClass::Read:
+ os << "Read";
+ break;
+ case ErrCodeClass::Write:
+ os << "Write";
+ break;
+ case ErrCodeClass::Unknown:
+ os << "Unknown";
+ break;
+ case ErrCodeClass::Version:
+ os << "Version";
+ break;
+ case ErrCodeClass::Format:
+ os << "Format";
+ break;
+ case ErrCodeClass::Create:
+ os << "Create";
+ break;
+ case ErrCodeClass::Import:
+ os << "Import";
+ break;
+ case ErrCodeClass::Export:
+ os << "Export";
+ break;
+ case ErrCodeClass::So:
+ os << "So";
+ break;
+ case ErrCodeClass::Sbx:
+ os << "Sbx";
+ break;
+ case ErrCodeClass::Runtime:
+ os << "Runtime";
+ break;
+ case ErrCodeClass::Compiler:
+ os << "Compiler";
+ break;
}
os << " Code:" << OUString::number(err.GetRest());
}