]> git.lyx.org Git - lyx.git/blobdiff - src/lyxgluelength.C
* support/qstring_helpers.h: erase ucs4_to_qstring() method.
[lyx.git] / src / lyxgluelength.C
index d153dc3dcd9b720f8776fa45e0be9a8a4f12da4f..fbea55bbd0354fa397088258e4eaed6a6ab2f0ed 100644 (file)
@@ -1,23 +1,27 @@
-/* This file is part of
- * ======================================================
+/**
+ * \file lyxgluelength.C
+ * This file is part of LyX, the document processor.
+ * Licence details can be found in the file COPYING.
  *
- *           LyX, The Document Processor
+ * \author Lars Gullik Bjønnes
+ * \author Matthias Ettrich
+ * \author John Levon
  *
- *           Copyright 1995 Matthias Ettrich
- *           Copyright 1995-2001 The LyX Team.
- *
- * ====================================================== */
+ * Full author contact details are available in file CREDITS.
+ */
 
 #include <config.h>
 
-#ifdef __GNUG__
-#pragma implementation
-#endif
-
 #include "lyxgluelength.h"
 #include "lengthcommon.h"
 
-#include "Lsstream.h"
+#include <sstream>
+
+
+namespace lyx {
+
+using std::ostringstream;
+using std::string;
 
 
 LyXGlueLength::LyXGlueLength(LyXLength const & len)
@@ -45,7 +49,7 @@ string const LyXGlueLength::asString() const
 
        if (plus_.zero() && minus_.zero()) {
                buffer << unit_name[len_.unit()];
-               return STRCONV(buffer.str());
+               return buffer.str();
        }
 
        // just len and plus
@@ -54,7 +58,7 @@ string const LyXGlueLength::asString() const
                        buffer << unit_name[len_.unit()];
                buffer << '+' << plus_.value();
                buffer << unit_name[plus_.unit()];
-               return STRCONV(buffer.str());
+               return buffer.str();
        }
 
        // just len and minus
@@ -63,7 +67,7 @@ string const LyXGlueLength::asString() const
                        buffer << unit_name[len_.unit()];
                buffer << '-' << minus_.value();
                buffer << unit_name[minus_.unit()];
-               return STRCONV(buffer.str());
+               return buffer.str();
        }
 
        // ok, len, plus AND minus
@@ -74,7 +78,7 @@ string const LyXGlueLength::asString() const
                        buffer << unit_name[len_.unit()];
                buffer << "+-" << minus_.value();
                buffer << unit_name[minus_.unit()];
-               return STRCONV(buffer.str());
+               return buffer.str();
        }
 
        // this is so rare a case, why bother minimising units ?
@@ -83,7 +87,7 @@ string const LyXGlueLength::asString() const
        buffer << '+' << plus_.value() << unit_name[plus_.unit()];
        buffer << '-' << minus_.value() << unit_name[minus_.unit()];
 
-       return STRCONV(buffer.str());
+       return buffer.str();
 }
 
 
@@ -97,7 +101,7 @@ string const LyXGlueLength::asLatexString() const
                buffer << " plus " << plus_.value() << unit_name[plus_.unit()];
        if (!minus_.zero())
                buffer << " minus " << minus_.value() << unit_name[minus_.unit()];
-       return STRCONV(buffer.str());
+       return buffer.str();
 }
 
 
@@ -131,3 +135,6 @@ bool operator!=(LyXGlueLength const & l1, LyXGlueLength const & l2)
 {
        return !(l1 == l2);
 }
+
+
+} // namespace lyx