Martin Vermeer wrote:

On Thu, Jan 26, 2006 at 09:11:25AM +0100, Helge Hafting wrote:
Martin Vermeer wrote:

So here it is, the complete patch, still a bit further polished.


Sorry, this does not compile.
Changes to paragraph.h seems to break other stuff:

...

../../src/paragraph.h:276: error: default argument for parameter of type 'const BufferParams&' has type 'int'
make[4]: *** [math_casesinset.lo] Error 1

Ah yes, my mistake. Just remove the whole argument.

Alternatively, the attached, still bigger, patch ;-/


There seems to be a philosophical unclarity around our use of
defaultfont, especially where languages are concerned.

On the one hand, the default font/language is the one that is chosen for
new documents when they are created. A sensible user sets it to the
language he uses most (e.g., Helge to Norwegian).

Yes, that is how I use this too.

Then, when writing the occasional Swedish document, you set the
document/buffer language to Swedish. So far, so good.

Now what complicates things is, that defaultfont is also used to
*reduce* fonts against. So if you want to represent a font "minimally",
you reduce it to defaultfont using a statement like

font.reduce(defaultFont());

So this is the philosophical mix-up: defaultfont.language means

1) The most often used language; but also
2) the absence of explicit language information.

What I did was to make defaultfont *only* the font that is offered when
creating a new doc. It has no other role. Font reduction (on-screen, or
in the .lyx file) always takes place against the buffer/document font.
Perfect.  That is the way it must be.

This concerns of course especially the language attribute.

See the patch.

1) When creating a new lyxtext, language info is taken from
bufferparams (though the added lang parameter).

2) When creating a new paragraph, same thing.

3) The current cursor is now handed through to tabular inset cells too.
Fixes the L-cursor problem in tabular.

4) etc.
The list of fixes look nice, but it still doesn't compile when this patch
is applied to todays cvs.


pariterator.C:183:2: warning: #warning const correctness!
if g++ -DHAVE_CONFIG_H -I. -I. -I. -Winvalid-pch --include=./pch.h -I../boost - Wextra -Wall -I/usr/X11R6/include -fno-exceptions -O2 -MT rowpainter.o -MD -M
P -MF ".deps/rowpainter.Tpo" -c -o rowpainter.o rowpainter.C; \
then mv -f ".deps/rowpainter.Tpo" ".deps/rowpainter.Po"; else rm -f ".de
ps/rowpainter.Tpo"; exit 1; fi
rowpainter.C: In member function ‘void<unnamed>::RowPainter::paintText()’:
rowpainter.C:659: error: ‘const class LyXText’ has no member named ‘defaultfont_
rowpainter.C:712: error: ‘const class LyXText’ has no member named ‘defaultfont_
’
make[3]: *** [rowpainter.o] Error 1
make[3]: Leaving directory `/usr/src/lyx-devel/src'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/usr/src/lyx-devel/src'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/usr/src/lyx-devel/src'
make: *** [all-recursive] Error 1

Todays cvs doesn't seem to compile on its own either - but that is a linker error.
I'll check to see if it goes away by doing the autgen.sh+configure thing.

Helge Hafting

Reply via email to