]> git.lyx.org Git - lyx.git/blobdiff - src/Text.cpp
char * for string literals is deprecated...
[lyx.git] / src / Text.cpp
index 8e6361a6f09449a8b8cc0acff6ed780668787888..f0b474cc57486a3419e3d101a9bcf1abfc0d3005 100644 (file)
@@ -104,14 +104,14 @@ void readParToken(Buffer const & buf, Paragraph & par, Lexer & lex,
 
                if (par.forcePlainLayout()) {
                        // in this case only the empty layout is allowed
-                       layoutname = tclass.emptyLayoutName();
+                       layoutname = tclass.plainLayoutName();
                } else if (par.usePlainLayout()) {
                        // in this case, default layout maps to empty layout 
                        if (layoutname == tclass.defaultLayoutName())
-                               layoutname = tclass.emptyLayoutName();
+                               layoutname = tclass.plainLayoutName();
                } else { 
                        // otherwise, the empty layout maps to the default
-                       if (layoutname == tclass.emptyLayoutName())
+                       if (layoutname == tclass.plainLayoutName())
                                layoutname = tclass.defaultLayoutName();
                }
 
@@ -382,11 +382,11 @@ void Text::breakParagraph(Cursor & cur, bool inverse_logic)
        if (sensitive) {
                if (cur.pos() == 0)
                        // set to standard-layout
-               //FIXME Check if this should be emptyLayout() in some cases
+               //FIXME Check if this should be plainLayout() in some cases
                        pars_[cpit].applyLayout(tclass.defaultLayout());
                else
                        // set to standard-layout
-                       //FIXME Check if this should be emptyLayout() in some cases
+                       //FIXME Check if this should be plainLayout() in some cases
                        pars_[next_par].applyLayout(tclass.defaultLayout());
        }
 
@@ -1304,9 +1304,9 @@ bool Text::read(Buffer const & buf, Lexer & lex,
                        lex.pushToken(token);
 
                        Paragraph par;
+                       par.setInsetOwner(insetPtr);
                        par.params().depth(depth);
                        par.setFont(0, Font(inherit_font, buf.params().language));
-                       par.setInsetOwner(insetPtr);
                        pars_.push_back(par);
 
                        // FIXME: goddamn InsetTabular makes us pass a Buffer
@@ -1332,7 +1332,7 @@ bool Text::read(Buffer const & buf, Lexer & lex,
 }
 
 // Returns the current font and depth as a message.
-docstring Text::currentState(Cursor & cur)
+docstring Text::currentState(Cursor const & cur) const
 {
        LASSERT(this == cur.text(), /**/);
        Buffer & buf = cur.buffer();
@@ -1411,7 +1411,7 @@ docstring Text::currentState(Cursor & cur)
 }
 
 
-docstring Text::getPossibleLabel(Cursor & cur) const
+docstring Text::getPossibleLabel(Cursor const & cur) const
 {
        pit_type pit = cur.pit();