Opened 18 years ago

Closed 15 years ago

#2178 closed defect (fixed)

create empty layout in all text classes

Reported by: Georg Baum Owned by: lasgouttes
Priority: high Milestone: 1.6.0
Component: layout Version: 1.4.0cvs
Severity: major Keywords:
Cc: j.spitzmueller@…, uwestoehr@…, rgheck@…

Description

An empty layout is needed for docbook, fixed width table cells (see
toggleFixedWidth() in tabular.C, where "Standard" is used wrongly), ERT insets
and maybe more.
This should automatically be provided by LyXTextClass for all text classes.

Change History (35)

comment:1 by Georg Baum, 18 years ago

You can see one aspect of the missing empty layout in e.g. a g-brief-de
document. The default layout is Brieftext here, and it has a static label
"Text:". This is shown in ERT boxes, but it should not.

comment:2 by Juergen Spitzmueller, 17 years ago

blocked: 4037

comment:3 by Juergen Spitzmueller, 17 years ago

Cc: j.spitzmueller@… added

comment:4 by Juergen Spitzmueller, 17 years ago

* #4037 has been marked as a duplicate of this bug. *

comment:5 by Juergen Spitzmueller, 17 years ago

Milestone: 1.5.2
Severity: minormajor

This also breaks g-brief documents with tables, see attachement 2032 from bug
4037.

This is a major issue. A user reported that he cannot upgrade from
LyX 1.3 because of this:
http://marc.info/?l=lyx-devel&m=118399190607136&w=2

comment:6 by Juergen Spitzmueller, 17 years ago

see attachement 2032

attachment 2032.

comment:7 by Juergen Spitzmueller, 17 years ago

blocked: 4037

comment:8 by Uwe Stöhr, 17 years ago

blocked: 4224

comment:9 by Uwe Stöhr, 17 years ago

Cc: uwestoehr@… added

comment:10 by Juergen Spitzmueller, 17 years ago

A quick fix for the g-breif issue would be to reintroduce the Standard layout in
g-brief. Almost any other layout has it (except for hollywood, I think).

Is it worth it, or shall we wait for a proper fix?

comment:11 by Uwe Stöhr, 17 years ago

Subject: Re: create empty layout in all text classes

Is it worth it

Yes.

comment:12 by Georg Baum, 17 years ago

Subject: Re: create empty layout in all text classes

Is it worth it

Yes.

But it would not fix the bug unless you made it the default style. And the
latter would be annoying for users. Remember that the style name "Standard"
has no special meaning at all. The only special style is the one marked as
default in the layout file, and it can have an arbitrary name.

comment:13 by Juergen Spitzmueller, 17 years ago

But it would not fix the bug unless you made it the default style.

my proposal includes this change.

And the latter would be annoying for users. Remember that the style name
"Standard" has no special meaning at all. The only special style is the one
marked as default in the layout file, and it can have an arbitrary name.

Problem is that we have (really existing) users who are forced to stick with 1.3
because of this bug. Cf.
http://marc.info/?l=lyx-devel&m=118399190607136&w=2

This is embarrasing.

comment:14 by Juergen Spitzmueller, 17 years ago

anyway, this simple change wouldn't fix the case for existing documents (that
have been converted to 1.4/1.5 already). So it's not such a good idea anyway.

comment:15 by Juergen Spitzmueller, 17 years ago

Milestone: 1.5.21.5.3

1.5.2 is frozen. This bug has to be postponed to 1.5.3.

comment:16 by Juergen Spitzmueller, 16 years ago

Milestone: 1.5.31.5.4

1.5.3 is released.

comment:17 by Richard Heck, 16 years ago

So what we really need to do here seems to be what Georg originally suggested:
We need an EMPTY layout that's used in certain cases, and is even forced to be
used in those cases. Right? It would not need to appear in the list of layouts,
and it would not need to be "Standard". Just forced in tables and such.

comment:18 by Juergen Spitzmueller, 16 years ago

Cc: rgheck@… added

ad comment 12: yes, that's correct IMHO.

comment:19 by Juergen Spitzmueller, 16 years ago

Milestone: 1.5.41.5.5

Soft freeze for 1.5.4: from now on, only critical bugs and regressions are
allowed.

comment:20 by Richard Heck, 16 years ago

Keywords: fixedintrunk added
Resolution: fixed
Status: newclosed

Hopefully fixed at 22966.

comment:21 by Uwe Stöhr, 16 years ago

Resolution: fixed
Status: closedreopened

Not FIXED since the patch will not be 1.5.4.

comment:22 by Juergen Spitzmueller, 16 years ago

Keywords: fixedintrunk removed

not yet fixed in trunk. Try attachment 2032.

comment:23 by Richard Heck, 16 years ago

Right. I missed this. If you create a table, you can see that (a) the layout is
actually set correctly, but (b) LyX gets confused because it can't tell that we
are in a table. Same problem on reading that attachment.

The fix is to change this code:
bool Paragraph::forceEmptyLayout() const
{

return inInset() && inInset()->forceEmptyLayout();

}

bool Paragraph::allowParagraphCustomization() const
{

return inInset() && inInset()->allowParagraphCustomization(0);

}

bool Paragraph::useEmptyLayout() const
{

return inInset() && inInset()->useEmptyLayout();

}
in Paragraph.cpp so that it treats table cells as requiring empty layout. A
better fix, and I seem to remember seeing a comment about this elsewhere in the
code, would be to have a real InsetTableCell-type inset.

comment:24 by Juergen Spitzmueller, 16 years ago

The fix is to change this code:

could you dio this?

comment:25 by Richard Heck, 16 years ago

I could add the same hack we have elsewhere, I suppose.

comment:26 by Juergen Spitzmueller, 16 years ago

Milestone: 1.5.51.6.0

I fear this is too complicated and fragile for the 1.5 series.

comment:27 by Richard Heck, 16 years ago

I agree. And we don't even have the table stuff working yet.

comment:28 by Richard Heck, 16 years ago

Keywords: fixedintrunk added

Putative fix committed at 23662. This does work with attachment 2032.

comment:29 by Juergen Spitzmueller, 16 years ago

excellent. Am I right that this has gotten too complicated for branch?

comment:30 by Richard Heck, 16 years ago

At this late stage, I wouldn't try this in branch. It'll need extensive testing,
and by the time it gets it, we'll be at beta 2. It's too bad, but even porting
it to branch would be a lot of work at this point.

comment:31 by Juergen Spitzmueller, 16 years ago

o.k.

comment:32 by Dov Feldstern, 16 years ago

hmmm... the patch applied in r23662 seems to cause some new problems. See
http://permalink.gmane.org/gmane.editors.lyx.devel/104068 for details.

comment:33 by Richard Heck, 16 years ago

Additional fix committed at r23756. Perhaps this will do it.

comment:34 by Richard Heck, 16 years ago

Another attempt at 23879. I hope very much that one will do. ;-)

comment:35 by Juergen Spitzmueller, 15 years ago

Keywords: fixedintrunk removed
Resolution: fixed
Status: reopenedclosed

LyX 1.6.0 is released.

Note: See TracTickets for help on using tickets.