Reformat edited code to clang-format style

presentation
Ulrich Huber 7 years ago
parent e550c73168
commit 0eeead66b2
  1. 4
      src/control/xojfile/XojExportHandler.cpp
  2. 7
      src/model/PageType.cpp
  3. 3
      src/model/PageType.h
  4. 2
      src/view/background/LineBackgroundPainter.cpp
  5. 2
      src/view/background/StavesBackgroundPainter.h

@ -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";
}

@ -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;
}

@ -13,7 +13,8 @@
#include <XournalType.h>
enum class PageTypeFormat {
enum class PageTypeFormat
{
Plain,
Ruled,
Lined,

@ -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;

@ -15,7 +15,7 @@
#include <XournalType.h>
class StavesBackgroundPainter : public BaseBackgroundPainter
class StavesBackgroundPainter: public BaseBackgroundPainter
{
public:
StavesBackgroundPainter();

Loading…
Cancel
Save