]> git.lyx.org Git - lyx.git/blobdiff - src/Spacing.C
fix build, thesaurus
[lyx.git] / src / Spacing.C
index b80f55ffb13c554ac0c93cb5d9cb57fe198d2f47..30dd365a8f9696bff178414e6aea46d11375e96b 100644 (file)
@@ -4,7 +4,7 @@
  *           LyX, The Document Processor
  *        
  *           Copyright 1995 Matthias Ettrich
- *           Copyright 1995-2000 The LyX Team.
+ *           Copyright 1995-2001 The LyX Team.
  *
  * ====================================================== */
 
 using std::ios;
 using std::ostream;
 
-/// how can I put this inside of Spacing (class)
-static
-char const * spacing_string[] = {"single", "onehalf", "double", "other"};
-
-
+string const Spacing::spacing_string[]
+       = {"single", "onehalf", "double", "other"};
 float Spacing::getValue() const 
 {
        switch (space) {
@@ -55,8 +53,8 @@ void Spacing::set(Spacing::Space sp, float val)
 
 void Spacing::set(Spacing::Space sp, string const & val)
 {
-       float fval;
-       istringstream istr(val);
+       float fval = 0.0;
+       istringstream istr(val.c_str());
        istr >> fval;
        set(sp, fval);
 }