From 0eeead66b22871df63567754ab72fe6b432bd84d Mon Sep 17 00:00:00 2001 From: Ulrich Huber Date: Wed, 10 Jul 2019 16:37:01 +0200 Subject: [PATCH] Reformat edited code to clang-format style --- src/control/xojfile/XojExportHandler.cpp | 4 ++-- src/model/PageType.cpp | 7 ++++--- src/model/PageType.h | 3 ++- src/view/background/LineBackgroundPainter.cpp | 2 +- src/view/background/StavesBackgroundPainter.h | 2 +- 5 files changed, 10 insertions(+), 8 deletions(-) diff --git a/src/control/xojfile/XojExportHandler.cpp b/src/control/xojfile/XojExportHandler.cpp index 0261dbb6..5f1d7c1d 100644 --- a/src/control/xojfile/XojExportHandler.cpp +++ b/src/control/xojfile/XojExportHandler.cpp @@ -60,8 +60,8 @@ void XojExportHandler::writeSolidBackground(XmlNode* background, PageRef p) string format; format = PageTypeHandler::getStringForPageTypeFormat(bgFormat); - if (bgFormat != PageTypeFormat::Plain && bgFormat != PageTypeFormat::Ruled && - bgFormat != PageTypeFormat::Lined && bgFormat != PageTypeFormat::Graph) + if (bgFormat != PageTypeFormat::Plain && bgFormat != PageTypeFormat::Ruled && bgFormat != PageTypeFormat::Lined && + bgFormat != PageTypeFormat::Graph) { format = "plain"; } diff --git a/src/model/PageType.cpp b/src/model/PageType.cpp index 83849996..fd163a58 100644 --- a/src/model/PageType.cpp +++ b/src/model/PageType.cpp @@ -1,13 +1,13 @@ #include "PageType.h" PageType::PageType() - : format(PageTypeFormat::Lined) + : format(PageTypeFormat::Lined) { XOJ_INIT_TYPE(PageType); } PageType::PageType(PageTypeFormat format) - : format(format) + : format(format) { XOJ_INIT_TYPE(PageType); } @@ -59,6 +59,7 @@ bool PageType::isSpecial() { XOJ_CHECK_TYPE(PageType); - return this->format == PageTypeFormat::Pdf || this->format == PageTypeFormat::Image || this->format == PageTypeFormat::Copy; + return this->format == PageTypeFormat::Pdf || this->format == PageTypeFormat::Image || + this->format == PageTypeFormat::Copy; } diff --git a/src/model/PageType.h b/src/model/PageType.h index 0beb2e43..ea846590 100644 --- a/src/model/PageType.h +++ b/src/model/PageType.h @@ -13,7 +13,8 @@ #include -enum class PageTypeFormat { +enum class PageTypeFormat +{ Plain, Ruled, Lined, diff --git a/src/view/background/LineBackgroundPainter.cpp b/src/view/background/LineBackgroundPainter.cpp index 77df6c73..e898cfaa 100644 --- a/src/view/background/LineBackgroundPainter.cpp +++ b/src/view/background/LineBackgroundPainter.cpp @@ -50,7 +50,7 @@ void LineBackgroundPainter::paintBackgroundRuled() Util::cairo_set_source_rgbi(cr, this->foregroundColor1); cairo_set_line_width(cr, lineWidth * lineWidthFactor); - int numLines = (int)((height - headerSize - footerSize) / (roulingSize + lineWidth * lineWidthFactor)); + int numLines = (int) ((height - headerSize - footerSize) / (roulingSize + lineWidth * lineWidthFactor)); double offset = headerSize; diff --git a/src/view/background/StavesBackgroundPainter.h b/src/view/background/StavesBackgroundPainter.h index ac5f3e9c..013ca4ce 100644 --- a/src/view/background/StavesBackgroundPainter.h +++ b/src/view/background/StavesBackgroundPainter.h @@ -15,7 +15,7 @@ #include -class StavesBackgroundPainter : public BaseBackgroundPainter +class StavesBackgroundPainter: public BaseBackgroundPainter { public: StavesBackgroundPainter();