]> git.lyx.org Git - features.git/commitdiff
cosmetics
authorAndré Pönitz <poenitz@gmx.net>
Sat, 29 Sep 2007 21:37:28 +0000 (21:37 +0000)
committerAndré Pönitz <poenitz@gmx.net>
Sat, 29 Sep 2007 21:37:28 +0000 (21:37 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20601 a592a061-630c-0410-9148-cb99ea01b6c8

src/VSpace.cpp
src/VSpace.h

index 0b5929d3bfe4a039b3bf615d6a31abc5cf2467eb..eabd077452c4e6aa029170ee47834a581634d4cb 100644 (file)
@@ -249,10 +249,12 @@ bool isValidGlueLength(string const & data, GlueLength * result)
        unit_index = 1;  // entries at index 0 are sentinels
 
        // construct "pattern" from "data"
-       while (!isEndOfData (buffer)) {
-               if (pattern_index > 20) return false;
-               pattern[pattern_index] = nextToken (buffer);
-               if (pattern[pattern_index] == 'E') return false;
+       while (!isEndOfData(buffer)) {
+               if (pattern_index > 20)
+                       return false;
+               pattern[pattern_index] = nextToken(buffer);
+               if (pattern[pattern_index] == 'E')
+                       return false;
                ++pattern_index;
        }
        pattern[pattern_index] = '\0';
@@ -324,7 +326,8 @@ bool isValidLength(string const & data, Length * result)
        pattern[pattern_index] = '\0';
 
        // only the most basic pattern is accepted here
-       if (compare(pattern, "nu") != 0) return false;
+       if (compare(pattern, "nu") != 0)
+               return false;
 
        // It _was_ a correct length string.
        // Store away the values we found.
@@ -345,7 +348,7 @@ VSpace::VSpace()
 {}
 
 
-VSpace::VSpace(vspace_kind k)
+VSpace::VSpace(VSpaceKind k)
        : kind_(k), len_(), keep_(false)
 {}
 
@@ -397,30 +400,6 @@ VSpace::VSpace(string const & data)
 }
 
 
-VSpace::vspace_kind VSpace::kind() const
-{
-       return kind_;
-}
-
-
-GlueLength const & VSpace::length() const
-{
-       return len_;
-}
-
-
-bool VSpace::keep() const
-{
-       return keep_;
-}
-
-
-void VSpace::setKeep(bool val)
-{
-       keep_ = val;
-}
-
-
 bool VSpace::operator==(VSpace const & other) const
 {
        if (kind_ != other.kind_)
index 6715e935b596410c6f6e98ede2d4fd1b8dfe0573..b982b939f9bbab10e53e4ee147f15b0f663243a3 100644 (file)
@@ -26,7 +26,7 @@ class BufferView;
 class VSpace {
 public:
        /// The different kinds of spaces.
-       enum vspace_kind {
+       enum VSpaceKind {
                DEFSKIP,
                SMALLSKIP,
                MEDSKIP,
@@ -35,26 +35,27 @@ public:
                LENGTH ///< user-defined length
        };
 
+       ///
        VSpace();
-
-       explicit VSpace(vspace_kind k);
-
+       ///
+       explicit VSpace(VSpaceKind k);
+       ///
        explicit VSpace(Length const & l);
-
+       ///
        explicit VSpace(GlueLength const & l);
 
        /// Constructor for reading from a .lyx file
        explicit VSpace(std::string const & data);
 
        /// return the type of vertical space
-       vspace_kind kind() const;
+       VSpaceKind kind() const { return kind_; }
        /// return the length of this space
-       GlueLength const & length() const;
+       GlueLength const & length() const { return len_; }
 
        // a flag that switches between \vspace and \vspace*
-       bool keep() const;
+       bool keep() const { return keep_; }
        /// if set true, use \vspace* when type is not DEFSKIP
-       void setKeep(bool val);
+       void setKeep(bool keep) { keep_ = keep; }
        ///
        bool operator==(VSpace const &) const;
 
@@ -71,7 +72,7 @@ public:
 
 private:
        /// This VSpace kind
-       vspace_kind kind_;
+       VSpaceKind kind_;
        /// the specified length
        GlueLength len_;
        /// if true, use \vspace* type