]> git.lyx.org Git - lyx.git/blobdiff - src/lyxlength.C
unneeded header
[lyx.git] / src / lyxlength.C
index d139a4793d7e358527abac659462e796d71ad94f..fded92c19bcfe53b595f0d24e86a7cc713607f6f 100644 (file)
 #include "lengthcommon.h"
 #include "lyxrc.h"
 
+#include "support/docstream.h"
 #include <sstream>
 #include <iomanip>
 
 
+namespace lyx {
+
+
 using std::ostringstream;
 using std::string;
 
@@ -58,6 +62,14 @@ string const LyXLength::asString() const
 }
 
 
+docstring const LyXLength::asDocstring() const
+{
+       odocstringstream os;
+       os << val_ << unit_name[unit_]; // setw?
+       return os.str();
+}
+
+
 string const LyXLength::asLatexString() const
 {
        ostringstream os;
@@ -264,3 +276,6 @@ bool operator!=(LyXLength const & l1, LyXLength const & l2)
 {
        return !(l1 == l2);
 }
+
+
+} // namespace lyx