From f99d41a25a326865183879853b97ed3265499042 Mon Sep 17 00:00:00 2001 From: Jean-Marc Lasgouttes Date: Thu, 12 Jul 2007 09:25:52 +0000 Subject: [PATCH] * Layout.cpp (read): fix ObsoletedBy and DependsOn for layout names that contain underscores. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19053 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/Layout.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Layout.cpp b/src/Layout.cpp index 903fb24162..96acc0e087 100644 --- a/src/Layout.cpp +++ b/src/Layout.cpp @@ -241,7 +241,8 @@ bool Layout::read(Lexer & lexrc, TextClass const & tclass) case LT_OBSOLETEDBY: // replace with a known style if (lexrc.next()) { - docstring const style = lexrc.getDocString(); + docstring const style = + subst(lexrc.getDocString(), '_', ' '); if (tclass.hasLayout(style)) { docstring const tmpname = name_; @@ -262,7 +263,7 @@ bool Layout::read(Lexer & lexrc, TextClass const & tclass) case LT_DEPENDSON: if (lexrc.next()) - depends_on_ = lexrc.getDocString(); + depends_on_ = subst(lexrc.getDocString(), '_', ' '); break; case LT_MARGIN: // margin style definition. -- 2.39.2