]> git.lyx.org Git - lyx.git/blobdiff - src/Layout.cpp
simplify setInsetFont, removing a potential bug (an invalid DocIterator was built...
[lyx.git] / src / Layout.cpp
index 96acc0e087592e545ece7cd4f6b642fa4c89bf31..79694fe0be2ca0f28d42f44f8829db79aca494df 100644 (file)
@@ -115,7 +115,7 @@ Layout::Layout ()
        labelbottomsep = 0.0;
        parsep = 0;
        align = LYX_ALIGN_BLOCK;
-       alignpossible = LYX_ALIGN_BLOCK;
+       alignpossible = LYX_ALIGN_NONE | LYX_ALIGN_LAYOUT;
        labeltype = LABEL_NO_LABEL;
        endlabeltype = END_LABEL_NO_LABEL;
        // Should or should not. That is the question.
@@ -375,22 +375,22 @@ bool Layout::read(Lexer & lexrc, TextClass const & tclass)
 
                case LT_LEFTMARGIN:     // left margin type
                        if (lexrc.next())
-                               leftmargin = lexrc.getString();
+                               leftmargin = lexrc.getDocString();
                        break;
 
                case LT_RIGHTMARGIN:    // right margin type
                        if (lexrc.next())
-                               rightmargin = lexrc.getString();
+                               rightmargin = lexrc.getDocString();
                        break;
 
                case LT_LABELINDENT:    // label indenting flag
                        if (lexrc.next())
-                               labelindent = lexrc.getString();
+                               labelindent = lexrc.getDocString();
                        break;
 
                case LT_PARINDENT:      // paragraph indent. flag
                        if (lexrc.next())
-                               parindent = lexrc.getString();
+                               parindent = lexrc.getDocString();
                        break;
 
                case LT_PARSKIP:        // paragraph skip size
@@ -420,7 +420,7 @@ bool Layout::read(Lexer & lexrc, TextClass const & tclass)
 
                case LT_LABELSEP:       // label separator
                        if (lexrc.next()) {
-                               labelsep = subst(lexrc.getString(), 'x', ' ');
+                               labelsep = from_utf8(subst(lexrc.getString(), 'x', ' '));
                        }
                        break;
 
@@ -552,7 +552,7 @@ void Layout::readAlignPossible(Lexer & lexrc)
        };
 
        lexrc.pushTable(alignTags, AT_LAYOUT);
-       alignpossible = LYX_ALIGN_NONE;
+       alignpossible = LYX_ALIGN_NONE | LYX_ALIGN_LAYOUT;
        int lineno = lexrc.getLineNo();
        do {
                int le = lexrc.lex();