diff options
| author | Jabier Arraiza <jabier.arraiza@marker.es> | 2018-08-05 00:45:18 +0000 |
|---|---|---|
| committer | Jabier Arraiza <jabier.arraiza@marker.es> | 2018-08-05 00:45:18 +0000 |
| commit | 6a5a7c515541c4a851b98294db60fbd34215a2eb (patch) | |
| tree | 9b180016938eda69ca7644d9250680fa4f0aa5f0 /src | |
| parent | Fixes pointed by Tav (diff) | |
| download | inkscape-6a5a7c515541c4a851b98294db60fbd34215a2eb.tar.gz inkscape-6a5a7c515541c4a851b98294db60fbd34215a2eb.zip | |
Fixing coding style
Diffstat (limited to 'src')
| -rw-r--r-- | src/extension/internal/emf-inout.cpp | 20 | ||||
| -rw-r--r-- | src/extension/internal/wmf-print.cpp | 4 | ||||
| -rw-r--r-- | src/style-internal.cpp | 112 | ||||
| -rw-r--r-- | src/style-internal.h | 2 |
4 files changed, 69 insertions, 69 deletions
diff --git a/src/extension/internal/emf-inout.cpp b/src/extension/internal/emf-inout.cpp index 25228fe89..a0803aafc 100644 --- a/src/extension/internal/emf-inout.cpp +++ b/src/extension/internal/emf-inout.cpp @@ -32,22 +32,22 @@ #include <cstdint> #include <3rdparty/libuemf/symbol_convert.h> +#include "clear-n_.h" +#include "display/drawing-item.h" +#include "display/drawing.h" #include "document.h" -#include "object/sp-root.h" -#include "object/sp-path.h" -#include "print.h" -#include "extension/system.h" -#include "extension/print.h" #include "extension/db.h" #include "extension/input.h" #include "extension/output.h" -#include "display/drawing.h" -#include "display/drawing-item.h" -#include "clear-n_.h" -#include "svg/svg.h" +#include "extension/print.h" +#include "extension/system.h" +#include "inkscape.h" // even though it is included indirectly by emf-inout.h +#include "object/sp-path.h" +#include "object/sp-root.h" +#include "print.h" #include "svg/css-ostringstream.h" +#include "svg/svg.h" #include "util/units.h" // even though it is included indirectly by emf-inout.h -#include "inkscape.h" // even though it is included indirectly by emf-inout.h #include "emf-print.h" #include "emf-inout.h" diff --git a/src/extension/internal/wmf-print.cpp b/src/extension/internal/wmf-print.cpp index 3f6df1162..223c7c4d2 100644 --- a/src/extension/internal/wmf-print.cpp +++ b/src/extension/internal/wmf-print.cpp @@ -605,9 +605,9 @@ int PrintWmf::create_pen(SPStyle const *style, const Geom::Affine &transform) for (i=0;i<n_dash;i++) { int mark = style->stroke_dasharray.values[i].value; if (mark > mark_long) { - mark_long = mark; + mark_long = mark; } - if (mark<mark_short) { + if (mark < mark_short) { mark_short = mark; } } diff --git a/src/style-internal.cpp b/src/style-internal.cpp index 88bb50b46..14b523302 100644 --- a/src/style-internal.cpp +++ b/src/style-internal.cpp @@ -393,62 +393,62 @@ SPILength::merge( const SPIBase* const parent ) { } } -void -SPILength::setDouble(double v) { - unit = SP_CSS_UNIT_NONE; - value = v; - computed = v; - value_default = v; +void SPILength::setDouble(double v) +{ + unit = SP_CSS_UNIT_NONE; + value = v; + computed = v; + value_default = v; } // Generate a string and allow emove name for parsing dasharray, etc. -const Glib::ustring -SPILength::toString(bool wname) const +const Glib::ustring SPILength::toString(bool wname) const { - Inkscape:CSSOStringStream os; - if (wname) { - os << name << ":"; - } - switch (this->unit) { - case SP_CSS_UNIT_NONE: - os << this->computed; - break; - case SP_CSS_UNIT_PX: - os << this->computed << "px"; - break; - case SP_CSS_UNIT_PT: - os << Inkscape::Util::Quantity::convert(this->computed, "px", "pt") << "pt"; - break; - case SP_CSS_UNIT_PC: - os << Inkscape::Util::Quantity::convert(this->computed, "px", "pc") << "pc"; - break; - case SP_CSS_UNIT_MM: - os << Inkscape::Util::Quantity::convert(this->computed, "px", "mm") << "mm"; - break; - case SP_CSS_UNIT_CM: - os << Inkscape::Util::Quantity::convert(this->computed, "px", "cm") << "cm"; - break; - case SP_CSS_UNIT_IN: - os << Inkscape::Util::Quantity::convert(this->computed, "px", "in") << "in"; - break; - case SP_CSS_UNIT_EM: - os << this->value << "em"; - break; - case SP_CSS_UNIT_EX: - os << this->value << "ex"; - break; - case SP_CSS_UNIT_PERCENT: - os << (this->value * 100.0) << "%"; - break; - default: - /* Invalid */ - break; - } - if (wname) { - os << important_str(); - os << ";"; - } - return os.str(); +Inkscape: + CSSOStringStream os; + if (wname) { + os << name << ":"; + } + switch (this->unit) { + case SP_CSS_UNIT_NONE: + os << this->computed; + break; + case SP_CSS_UNIT_PX: + os << this->computed << "px"; + break; + case SP_CSS_UNIT_PT: + os << Inkscape::Util::Quantity::convert(this->computed, "px", "pt") << "pt"; + break; + case SP_CSS_UNIT_PC: + os << Inkscape::Util::Quantity::convert(this->computed, "px", "pc") << "pc"; + break; + case SP_CSS_UNIT_MM: + os << Inkscape::Util::Quantity::convert(this->computed, "px", "mm") << "mm"; + break; + case SP_CSS_UNIT_CM: + os << Inkscape::Util::Quantity::convert(this->computed, "px", "cm") << "cm"; + break; + case SP_CSS_UNIT_IN: + os << Inkscape::Util::Quantity::convert(this->computed, "px", "in") << "in"; + break; + case SP_CSS_UNIT_EM: + os << this->value << "em"; + break; + case SP_CSS_UNIT_EX: + os << this->value << "ex"; + break; + case SP_CSS_UNIT_PERCENT: + os << (this->value * 100.0) << "%"; + break; + default: + /* Invalid */ + break; + } + if (wname) { + os << important_str(); + os << ";"; + } + return os.str(); } bool @@ -2056,16 +2056,16 @@ SPIDashArray::read( gchar const *str ) { gchar *e = NULL; bool LineSolid = true; - + for (auto token : tokens) { SPILength spilength("temp"); spilength.read(token.c_str()); if (spilength.value > 0.00000001) LineSolid = false; double dash = spilength.value; - //Currently inkscape handle unit conversion in dasharray but need - //a active document to do it, so put document inside a check for units - //and supose units are not included in tests + // Currently inkscape handle unit conversion in dasharray but need + // a active document to do it, so put document inside a check for units + // and supose units are not included in tests if (spilength.unit == SPCSSUnit::SP_CSS_UNIT_PERCENT) { SPDocument *document = SP_ACTIVE_DOCUMENT; dash = document->getViewBox().width() * spilength.value; diff --git a/src/style-internal.h b/src/style-internal.h index c0e86d510..f716601f6 100644 --- a/src/style-internal.h +++ b/src/style-internal.h @@ -1013,7 +1013,7 @@ public: // To do: make private, change double to SVGLength public: - std::vector<SPILength> values; + std::vector<SPILength> values; }; /// Filter type internal to SPStyle |
