]> git.lyx.org Git - lyx.git/blobdiff - src/LaTeXFeatures.C
Fix configure bug with gettext
[lyx.git] / src / LaTeXFeatures.C
index cf839c676274929039cd04abe66e0f47b1cdfb10..90c752cad794ec18e7398b5da3d054957b79b49d 100644 (file)
@@ -1,11 +1,11 @@
 // -*- C++ -*-
 /* This file is part of
- * ======================================================
+ * ====================================================== 
  * 
  *           LyX, The Document Processor
  *        
  *           Copyright 1995 Matthias Ettrich
- *           Copyright 1995-1999 the LyX Team.
+ *           Copyright 1995-2000 the LyX Team.
  *
  * ====================================================== */
 
@@ -23,7 +23,6 @@
 #include "bufferparams.h"
 #include "layout.h"
 
-extern LyXRC * lyxrc;
 
 LaTeXFeatures::LaTeXFeatures(int n)
        : layout(n, false)
@@ -78,7 +77,7 @@ string LaTeXFeatures::getPackages(BufferParams const & params)
        // color.sty
        if (color) {
                if (params.graphicsDriver == "default")
-                       packages +="\\usepackage{color}\n";
+                       packages += "\\usepackage{color}\n";
                else
                        packages += "\\usepackage[" 
                                + params.graphicsDriver + "]{color}\n";
@@ -127,10 +126,24 @@ string LaTeXFeatures::getPackages(BufferParams const & params)
                packages += "\\doublespacing\n";
                break;
        case Spacing::Other:
-               char value[30];
-               sprintf(value, "%.2f", params.spacing.getValue());
+               //char value[30];
+               //sprintf(value, "%.2f", params.spacing.getValue());
+#ifdef HAVE_SSTREAM
+               ostringstream value;
+#else
+               char val[30];
+               ostrstream value(val, 30);
+               
+#endif
+               value << params.spacing.getValue(); // setw?
+#ifdef HAVE_SSTREAM
                packages += string("\\setstretch{") 
-                         + value + "}\n";
+                         + value.str().c_str() + "}\n";
+#else
+               value << '\0';
+               packages += string("\\setstretch{") 
+                         + value.str() + "}\n";
+#endif
                break;
        }
 
@@ -238,7 +251,7 @@ string LaTeXFeatures::getTClassPreamble(BufferParams const & params)
 }      
 
 
-void LaTeXFeatures::showStruct(BufferParams & params) {
+void LaTeXFeatures::showStruct(BufferParams const & params) {
        lyxerr << "LyX needs the following commands when LaTeXing:"
        // packs
               << "\n***** Packages:" << getPackages(params)