]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetSpace.cpp
Fix empty width support for Box inset
[lyx.git] / src / insets / InsetSpace.cpp
index 081b98c44cf35e3ce898b7930cc9cb1cc6264111..03c9367b9acaaca31edd5bb066ec454d93d6b2fa 100644 (file)
@@ -621,7 +621,8 @@ void InsetSpace::latex(otexstream & os, OutputParams const & runparams) const
 }
 
 
-int InsetSpace::plaintext(odocstream & os, OutputParams const &) const
+int InsetSpace::plaintext(odocstringstream & os,
+        OutputParams const &, size_t) const
 {
        switch (params_.kind) {
        case InsetSpaceParams::HFILL:
@@ -813,7 +814,9 @@ void InsetSpace::validate(LaTeXFeatures & features) const
 
 void InsetSpace::toString(odocstream & os) const
 {
-       plaintext(os, OutputParams(0));
+       odocstringstream ods;
+       plaintext(ods, OutputParams(0));
+       os << ods.str();
 }
 
 
@@ -837,9 +840,9 @@ bool InsetSpace::isStretchableSpace() const
 }
 
 
-docstring InsetSpace::contextMenuName() const
+string InsetSpace::contextMenuName() const
 {
-       return from_ascii("context-space");
+       return "context-space";
 }
 
 
@@ -859,7 +862,8 @@ void InsetSpace::string2params(string const & in, InsetSpaceParams & params)
                params.math = true;
        else {
                params.math = false;
-               LASSERT(name == "space", /**/);
+               // we can try to read this even if the name is wrong
+               LATTEST(name == "space");
        }
 
        // There are cases, such as when we are called via getStatus() from