]> git.lyx.org Git - lyx.git/blobdiff - src/bufferparams.C
Fix my breakage. Sorry guys.
[lyx.git] / src / bufferparams.C
index 7629623a86542829a6e14c3a204be53916fbb0d4..ee7082b828dfa75543f8b1bf243908a2dfacf626 100644 (file)
@@ -38,7 +38,7 @@
 #include "frontends/Alert.h"
 
 #include "support/lyxalgo.h" // for lyx::count
-#include "support/tostr.h"
+#include "support/convert.h"
 #include "support/translator.h"
 
 #include <boost/array.hpp>
@@ -263,6 +263,7 @@ SpaceTranslator const init_spacetranslator()
        translator.addPair("single", Spacing::Single);
        translator.addPair("onehalf", Spacing::Onehalf);
        translator.addPair("double", Spacing::Double);
+       translator.addPair("other", Spacing::Other);
        return translator;
 }
 
@@ -277,8 +278,9 @@ SpaceTranslator const & spacetranslator()
 }
 
 
-struct BufferParams::Impl
+class BufferParams::Impl
 {
+public:
        Impl();
 
        AuthorList authorlist;
@@ -583,7 +585,7 @@ string const BufferParams::readToken(LyXLex & lex, string const & token)
        } else if (token == "\\spacing") {
                string nspacing;
                lex >> nspacing;
-               float tmp_val = 0.0;
+               string tmp_val;
                if (nspacing == "other") {
                        lex >> tmp_val;
                }
@@ -636,10 +638,10 @@ void BufferParams::writeFile(ostream & os) const
 
        os << "\\papersize " << string_papersize[papersize2]
           << "\n\\paperpackage " << string_paperpackages[paperpackage]
-          << "\n\\use_geometry " << tostr(use_geometry)
+          << "\n\\use_geometry " << convert<string>(use_geometry)
           << "\n\\use_amsmath " << use_amsmath
           << "\n\\cite_engine " << citeenginetranslator().find(cite_engine)
-          << "\n\\use_bibtopic " << tostr(use_bibtopic)
+          << "\n\\use_bibtopic " << convert<string>(use_bibtopic)
           << "\n\\paperorientation " << string_orientation[orientation]
           << '\n';
 
@@ -708,7 +710,7 @@ void BufferParams::writeFile(ostream & os) const
                }
        }
 
-       os << "\\tracking_changes " << tostr(tracking_changes) << "\n";
+       os << "\\tracking_changes " << convert<string>(tracking_changes) << "\n";
 
        if (tracking_changes) {
                AuthorList::Authors::const_iterator it = pimpl_->authorlist.begin();