On Wed, Feb 20, 2002 at 11:54:04AM +0100, Lars Gullik Bjønnes wrote: > Martin Vermeer <[EMAIL PROTECTED]> writes:
... > >> > >> Please help find the stupid problem. > > > | First-off, I see that it trips over the first starred layout (Part*) that > | it encounters. The non-starred ones before that are processed OK. > > the question is if this is because of the '*' or something else... > > -- > Lgb Think I got it (famous last words :-), or at least part of the problem. When compiling lyxlayout, I get lyxlayout.C: In method `const class string & LyXLayout::name() const': lyxlayout.C:740: warning: returning reference to temporary lyxlayout.C: In method `const class string & LyXLayout::obsoleted_by() const': lyxlayout.C:752: warning: returning reference to temporary Perhaps we should heed these warnings. I believe that in lyxtextclass.C on line 268 below, lay.name() returns "pølse", the content of a pointer to an evaporated temp. 257 case TC_STYLE: 258 if (lexrc.next()) { 259 string const name = subst(lowercase(lexrc.getString()), 260 '_', ' '); 261 if (hasLayout(name)) { 262 LyXLayout & lay = GetLayout(name); 263 error = do_readStyle(lexrc, lay); 264 } else { 265 LyXLayout lay; 266 lyxerr << "Name before:" << name << endl; 267 lay.setName(name); 268 lyxerr << "lay.name() after:" << lay.name() << endl; 269 if (!(error = do_readStyle(lexrc, lay))) { 270 layoutlist.push_back(lay); 271 } 272 } How to fix it is another story... Martin
msg33248/pgp00000.pgp
Description: PGP signature