]> git.lyx.org Git - lyx.git/blobdiff - src/lyxlength.C
* src/LaTeX.C: beautification: use identical user messages
[lyx.git] / src / lyxlength.C
index 3b893bbb59caabcacf1141ae0366d473a5c2741f..fded92c19bcfe53b595f0d24e86a7cc713607f6f 100644 (file)
@@ -19,6 +19,7 @@
 #include "lengthcommon.h"
 #include "lyxrc.h"
 
+#include "support/docstream.h"
 #include <sstream>
 #include <iomanip>
 
@@ -61,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;