]> git.lyx.org Git - lyx.git/blobdiff - src/Spacing.h
paragraph-spacing, redoparagraph in deleteemptyparagraphmechanism, got rid of some...
[lyx.git] / src / Spacing.h
index 7a5db054f1a6e1057bb059a3e3fced7d944782ec..094d7d3d1c9fd14cb2241632c2c7fce2daa7bff9 100644 (file)
@@ -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())