]> git.lyx.org Git - lyx.git/blobdiff - src/factory.cpp
Fix part of bug #6127: Roundtrip Lyx->Latex->Lyx fails.
[lyx.git] / src / factory.cpp
index 56bb5fbca4f2122b9354d0b98d3da709ca7892bd..e03daaa1ad43ce4047779e89b84457e51950e7fd 100644 (file)
@@ -387,22 +387,22 @@ Inset * createInsetHelper(Buffer & buf, FuncRequest const & cmd)
                        else if (name == "hrulefill")
                                isp.kind = InsetSpaceParams::HRULEFILL;
                        else if (name == "hspace") {
-                               if (len.empty() || !isValidLength(len)) {
+                               if (len.empty() || !isValidGlueLength(len)) {
                                        lyxerr << "LyX function 'space-insert hspace' "
                                               << "needs a valid length argument." << endl;
                                        break;
                                }
                                isp.kind = InsetSpaceParams::CUSTOM;
-                               isp.length = Length(len);
+                               isp.length = GlueLength(len);
                        }
                        else if (name == "hspace*") {
-                               if (len.empty() || !isValidLength(len)) {
+                               if (len.empty() || !isValidGlueLength(len)) {
                                        lyxerr << "LyX function 'space-insert hspace*' "
                                               << "needs a valid length argument." << endl;
                                        break;
                                }
                                isp.kind = InsetSpaceParams::CUSTOM_PROTECTED;
-                               isp.length = Length(len);
+                               isp.length = GlueLength(len);
                        }
                        else {
                                lyxerr << "Wrong argument for LyX function 'space-insert'." << endl;