X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2FSpacing.h;h=094d7d3d1c9fd14cb2241632c2c7fce2daa7bff9;hb=fe4e2a84c664ab13a2cfbfcbdb953d72c77eb268;hp=7a5db054f1a6e1057bb059a3e3fced7d944782ec;hpb=3df345c9383480f68fad51feae8b9c64425c8729;p=lyx.git diff --git a/src/Spacing.h b/src/Spacing.h index 7a5db054f1..094d7d3d1c 100644 --- a/src/Spacing.h +++ b/src/Spacing.h @@ -26,12 +26,15 @@ public: /// Double, /// - Other + Other, + /// + Default }; /// - Spacing() { - space = Single; - value = getValue(); + Spacing() : space(Single), value(1.0) {} + /// + bool isDefault() const { + return space == Default; } /// float getValue() const; @@ -42,7 +45,13 @@ public: /// void set(Spacing::Space sp, char const * val) ; /// - void writeFile(std::ostream &) const; + void writeFile(std::ostream &, bool para = false) const; + /// + friend bool operator==(Spacing const & a, Spacing const & b) { + if (a.space == b.space && a.getValue() == b.getValue()) + return true; + return false; + } /// friend bool operator!=(Spacing const & a, Spacing const & b) { if (a.space == b.space && a.getValue() == b.getValue())