]> git.lyx.org Git - lyx.git/commitdiff
avoid one string copy by s/from_utf8(lex.getString())/lex.getDocString()/
authorGeorg Baum <Georg.Baum@post.rwth-aachen.de>
Wed, 22 Nov 2006 09:15:38 +0000 (09:15 +0000)
committerGeorg Baum <Georg.Baum@post.rwth-aachen.de>
Wed, 22 Nov 2006 09:15:38 +0000 (09:15 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16009 a592a061-630c-0410-9148-cb99ea01b6c8

src/MenuBackend.C
src/buffer.C
src/text.C

index 44f32e0e5a9ab5657206cf3289f80b27064268aa..356c4eb44f986a902f495ca54ce84cccfe953df3 100644 (file)
@@ -351,7 +351,7 @@ Menu & Menu::read(LyXLex & lex)
                        lex.next(true);
                        docstring const mlabel = _(lex.getString());
                        lex.next(true);
-                       docstring const mname = from_utf8(lex.getString());
+                       docstring const mname = lex.getDocString();
                        add(MenuItem(MenuItem::Submenu, mlabel, mname,
                                     optional));
                        optional = false;
@@ -939,7 +939,7 @@ void MenuBackend::read(LyXLex & lex)
                        break;
                case md_menu: {
                        lex.next(true);
-                       docstring const name = from_utf8(lex.getString());
+                       docstring const name = lex.getDocString();
                        if (hasMenu(name)) {
                                getMenu(name).read(lex);
                        } else {
index 22eb727982f87bf98ff8cf097bc64165f2beacef..538e94ee1ad167e7e40d1a3700a4a65576ca7590 100644 (file)
@@ -460,7 +460,7 @@ int Buffer::readHeader(LyXLex & lex)
                                docstring const s = bformat(_("Unknown token: "
                                                                        "%1$s %2$s\n"),
                                                         from_utf8(token),
-                                                        from_utf8(lex.getString()));
+                                                        lex.getDocString());
                                errorList.push_back(ErrorItem(_("Document header error"),
                                        s, -1, 0, 0));
                        }
index 5442eba7a76c4494d033f34cbdea22a99c03689b..af93b7c45f3602150e392380a8fe4a70db521197 100644 (file)
@@ -218,7 +218,7 @@ void readParToken(Buffer const & buf, Paragraph & par, LyXLex & lex,
                        par.insertInset(par.size(), inset, font, change);
                else {
                        lex.eatLine();
-                       docstring line = from_utf8(lex.getString());
+                       docstring line = lex.getDocString();
                        errorList.push_back(ErrorItem(_("Unknown Inset"), line,
                                            par.id(), 0, par.size()));
                }
@@ -348,7 +348,7 @@ void readParToken(Buffer const & buf, Paragraph & par, LyXLex & lex,
                lex.eatLine();
                errorList.push_back(ErrorItem(_("Unknown token"),
                        bformat(_("Unknown token: %1$s %2$s\n"), from_utf8(token),
-                       from_utf8(lex.getString())),
+                       lex.getDocString()),
                        par.id(), 0, par.size()));
        }
 }