Re: lyxtexts & insettext

2003-03-23 Thread Andre Poenitz
On Fri, Mar 21, 2003 at 03:37:56PM +, José Matos wrote: > > Row *, Row *, Row * your boat > > gently down the ... > > I think that this would be the only place where Lars allows a raw pointer, > as long as it has a boat... That's the point. You'd need at least an assert or use a boost::we

Re: [patch] fix 2 crashes

2003-03-23 Thread Alfredo Braunstein
John Levon wrote: >> special casing. (with my original patch you don't get a single assert). > > I've already told you this isn't true if you don't want to believe > that is not my problem :) Uh... You did so? I really don't remember... Sorry. (I must have selective memory ;) Damn, I'm prett

Re: math editor problems - 1.3.1

2003-03-23 Thread Nirmal Govind
> In this case it might be the \mathrm in your equation which then > includes \mathbf (maybe you pressed C-m by mistake within the equation?). Thanks Amir.. after reading your post, I looked more carefully and there was a C-m in there for no reason.. > I should add however, that when I deleted

lyx2lyx help

2003-03-23 Thread John Levon
Current CVS expects all documents to start with a \layout, signifying the start of a new paragraph. Some older documents don't actually do that, the subcaption testcase being a case in point. Can some lyx2lyxer sketch out a fix for this ? thanks john

CJK-LyX-1.3.1

2003-03-23 Thread cghan
Hello, CJK-LyX-1.3.1 has been uploaded at the following ftp site, ftp://stone.phys.pusan.ac.kr/pub/CJK-LyX . THis one is much more stable than the buggy CJK-LyX-1.3.0 (sorry for that!). Be sure that your xforms-1,0-i18n is updated to the current version, 'xforms-1.0-i18n_6'. Regards, cghan

[PATCH] lyx2lyx: subcaption in LyX file format 2.15

2003-03-23 Thread John Levon
On Mon, Mar 24, 2003 at 01:38:49AM +0100, Markus Grabner wrote: > LyX 1.3.0 and 1.3.1 can't correctly import subfigure captions > stored in the ancient lyx 2.15 file format. Subfigure captions are only > read up to the first whitespace character, the rest is ignored. Here's a fix. lyx2lyx p

xforms warning

2003-03-23 Thread John Levon
g++ -DHAVE_CONFIG_H -I. -I. -I../../../src -I../../../images -I../../../src -I../../../src/frontends -I../../../src/frontends/controllers -I../../../boost -isystem /usr/X11R6/include -g -O -fno-exceptions -W -Wall -Winline -c xforms_resize.C -MT xforms_resize.lo -MD -MP -MF .deps/xforms_resize.TPl

Re: [FULL PATCH] The full RowList patch in a 99% percent finished state.

2003-03-23 Thread John Levon
On Mon, Mar 24, 2003 at 12:24:52AM +0100, Lars Gullik Bj?nnes wrote: > This is now _very_ close to something I'd like to commit. > (Or the actual thing I'd like to commit...) I'm afraid the serious drawing update problems seem to be yours. Try this : Enter a line of text "fefwefwefewlmklf wefml

subcaption in LyX file format 2.15

2003-03-23 Thread Markus Grabner
Hi! LyX 1.3.0 and 1.3.1 can't correctly import subfigure captions stored in the ancient lyx 2.15 file format. Subfigure captions are only read up to the first whitespace character, the rest is ignored. See attached files: lyx_215.lyx was created with an older version of LyX lyx_221.lyx was

Re: y coordinate for rows

2003-03-23 Thread John Levon
On Sun, Mar 23, 2003 at 11:51:08PM +0100, Alfredo Braunstein wrote: > An option would be to keep also the top_row in adition to the anchor_row. > Pretty cheap (we compute it anyway). Sounds good. regards, john

Re: [patch] fix 2 crashes

2003-03-23 Thread John Levon
On Sun, Mar 23, 2003 at 11:05:41PM +0100, Alfredo Braunstein wrote: > special casing. (with my original patch you don't get a single assert). I've already told you this isn't true if you don't want to believe that is not my problem :) regards john

Re: [patch] fix 2 crashes

2003-03-23 Thread Alfredo Braunstein
Lars Gullik Bjønnes wrote: > I am not talking about vector, only about list. Sorry then. Regards, Alfredo

Re: [patch] fix 2 crashes

2003-03-23 Thread Lars Gullik Bjønnes
Alfredo Braunstein <[EMAIL PROTECTED]> writes: | > Iterators are only invalidatd if deleted... | | Not for vector: if you have an iterator pointing to the last element and you | erase other element, your iterator becomes invalid (even if you don't | delete the element pointed by the iterator). I

Re: [patch] fix 2 crashes

2003-03-23 Thread Alfredo Braunstein
Lars Gullik Bjønnes wrote: > Iterators are only invalidatd if deleted... Not for vector: if you have an iterator pointing to the last element and you erase other element, your iterator becomes invalid (even if you don't delete the element pointed by the iterator). > This is guaranteed by the sta

Re: y coordinate for rows

2003-03-23 Thread Alfredo Braunstein
John Levon wrote: > This could get complicated ... all I know is that O(n) across all the > rows just to place the cursor is really very silly. An option would be to keep also the top_row in adition to the anchor_row. Pretty cheap (we compute it anyway). Regards, Alfredo

Re: [patch] fix 2 crashes

2003-03-23 Thread Lars Gullik Bjønnes
Alfredo Braunstein <[EMAIL PROTECTED]> writes: | Lars Gullik Bjønnes wrote: | | > I have some 10 (incremental) patches now, that replaces the manual | > Row* list with a std::list (aka RowList). As part of this process | > all raw Row* is changed to RowList::iterator. | | Actually, Lars, I have

Re: [patch] fix 2 crashes

2003-03-23 Thread Alfredo Braunstein
Lars Gullik Bjønnes wrote: > I have some 10 (incremental) patches now, that replaces the manual > Row* list with a std::list (aka RowList). As part of this process > all raw Row* is changed to RowList::iterator. Actually, Lars, I have a (general) question related to this. What assumptions can be

Re: [patch] fix 2 crashes

2003-03-23 Thread Alfredo Braunstein
John Levon wrote: > It doesn't eliminate any special casing surely. If you think it does I'd > be happy to see a patch ... I'll look at it. Note that it will eliminate the need for most the _missing_ special casing. (with my original patch you don't get a single assert). Regards, Alfredo

Re: [FULL PATCH] The full RowList patch in a 99% percent finished state.

2003-03-23 Thread Lars Gullik Bjønnes
John Levon <[EMAIL PROTECTED]> writes: | On Sun, Mar 23, 2003 at 04:14:38PM +0100, Lars Gullik Bj?nnes wrote: | | > Fix a crashing bug... | | Harrumph, you could have at least "finished" the patch before getting me | to test it. I'm thinking LYX_ALIGN_BLOCK here. Why did you kill this | code ?

Re: y coordinate for rows

2003-03-23 Thread John Levon
On Sun, Mar 23, 2003 at 10:51:00PM +0100, Alfredo Braunstein wrote: > Ok, but I'd wait for Lars rowlist patch. When he finishes it ... > scrolled tables yes. nested tables no. I've taken the userguide and started > mangling it randomly without any problem. Not very methodic, as you see ;) I don

Re: y coordinate for rows

2003-03-23 Thread Alfredo Braunstein
John Levon wrote: >> -I've removed all useless row->height(0) (done already by the ctor) > > Any chance you could make a separate patch for this (which could go in > regardless) ? Ok, but I'd wait for Lars rowlist patch. >> -top_y() and top_y(int) are both called intensively by insets. I'm >> r

Re: [patch] fix 2 crashes

2003-03-23 Thread John Levon
On Sun, Mar 23, 2003 at 10:36:36PM +0100, Alfredo Braunstein wrote: > >> And if you are so against it, then we can make lastPos to return n > >> (instead of max(0,n-1) on a paragraph with n chars (maybe changing its > >> name). And we can eliminate all the special casing. > > > > I'd rather just

Re: [patch] fix 2 crashes

2003-03-23 Thread Alfredo Braunstein
John Levon wrote: > I'm tempted to go write a header that doesn't do this now :) :) >> And if you are so against it, then we can make lastPos to return n >> (instead of max(0,n-1) on a paragraph with n chars (maybe changing its >> name). And we can eliminate all the special casing. > > I'd rath

Re: y coordinate for rows

2003-03-23 Thread John Levon
On Sun, Mar 23, 2003 at 09:54:53PM +0100, Alfredo Braunstein wrote: > Good idea. But anchor_row_ is not necesarily at the top of the screen now > (it will be mostly the cursor row) Ah, bugger, good point. >... maybe we should go up and down from anchor_row_ simulaneously? This could get complic

Re: [patch] fix 2 crashes

2003-03-23 Thread John Levon
On Sun, Mar 23, 2003 at 09:48:31PM +0100, Alfredo Braunstein wrote: > Well it's maybe not guaranteed (as I've said, I have tried to but failed to > find a proof on the stl documentation). But it will surely work on every > vector or string implementation (on which iterators are wrappers to I'm te

Re: valid cursor positions

2003-03-23 Thread Alfredo Braunstein
John Levon wrote: > On Sun, Mar 23, 2003 at 11:01:34AM +0100, Kornelia Pietsch wrote: > >> Alfredo has a very valid point: Cursor positions should be valid from 0 >> up to _and including_ size() in a paragraph. This might require a small > > This is not what me and Alfredo are arguing about. For

Re: y coordinate for rows

2003-03-23 Thread Alfredo Braunstein
John Levon wrote: > Start from anchor_row_. Most getRowNearY() calls are in responsible to > cursor clicks etc. If you reach rowlist.end(), start from begin() until > you reach anchor_row_ again. Good idea. But anchor_row_ is not necesarily at the top of the screen now (it will be mostly the curs

Re: [patch] fix 2 crashes

2003-03-23 Thread Alfredo Braunstein
John Levon wrote: > On Sun, Mar 23, 2003 at 09:28:21PM +0100, Alfredo Braunstein wrote: > >> It's the same thing as: >> >> vector a(10); >> >> if(&a[11] == &*a.end()) >> cout << "yes" << endl; >> >> This does _not_ crash and prints yes (and in fact is perfectly valid and >> can

Re: [patch] fix 2 crashes

2003-03-23 Thread John Levon
On Sun, Mar 23, 2003 at 09:28:21PM +0100, Alfredo Braunstein wrote: > It's the same thing as: > > vector a(10); > > if(&a[11] == &*a.end()) > cout << "yes" << endl; > > This does _not_ crash and prints yes (and in fact is perfectly valid and can > even be useful). This does not

Re: [patch] fix 2 crashes

2003-03-23 Thread Alfredo Braunstein
Lars Gullik Bjønnes wrote: > char a[] = "Lars"; > a[-1] yields what? AFAIK the implementation is allowed to crash. > Dead sure it can crash if you _access_ a[-1], but this doesn't takes out the fact that you can compare &a[-1] with some iterator (and it will not crash). It's the same t

Re: y coordinate for rows

2003-03-23 Thread John Levon
On Sun, Mar 23, 2003 at 08:58:50PM +0100, Alfredo Braunstein wrote: > We are storing the positions of rows, so we have a cheap map from rows to > positions, not the other way around. > For getting getRowNearY to work faster we should have some way of doing > binary search, something hard to do wit

Re: y coordinate for rows

2003-03-23 Thread Alfredo Braunstein
> I guess I should read the patch and find out why getRowNearY won't work > with it We are storing the positions of rows, so we have a cheap map from rows to positions, not the other way around. For getting getRowNearY to work faster we should have some way of doing binary search, something hard

Re: rsync problem

2003-03-23 Thread John Levon
On Sun, Mar 23, 2003 at 11:46:20AM -0800, Kayvan A. Sylvan wrote: > Is there a problem with baywatch? It was a bit wobbly earlier, it's ok again now. john

rsync problem

2003-03-23 Thread Kayvan A. Sylvan
Is there a problem with baywatch? - Forwarded message from Cron Daemon <[EMAIL PROTECTED]> - Date: 23 Mar 2003 18:01:48 - From: [EMAIL PROTECTED] (Cron Daemon) To: [EMAIL PROTECTED] Subject: Cron <[EMAIL PROTECTED]> cd /cvs/lyx; rsync -aCz --delete cvs.lyx.org::lyxcvs . failed to co

The lyx patches & autoconf etc.

2003-03-23 Thread John Levon
http://sources.redhat.com/automake/automake.html#FAQ "AM_MAINTAINER_MODE AM_MAINTAINER_MODE disables the so called "rebuild rules" by default. If you have AM_MAINTAINER_MODE in configure.ac, and run ./configure && make, then make will *never* attempt to rebuilt configure, Makefile.ins, Lex or Ya

Re: y coordinate for rows

2003-03-23 Thread John Levon
On Fri, Mar 21, 2003 at 05:08:52PM +0100, Alfredo Braunstein wrote: > I cannot see any performance difference at first sight (but John said that > top_y() was a bottleneck, so I don't know). Well, it was dwarfing the rest of the stuff in the profiles, that is all. > -I've removed all useless row

Re: lyxtexts & insettext

2003-03-23 Thread José Abílio Oliveira Matos
On Fri, Mar 21, 2003 at 02:00:53PM +0100, Lars Gullik Bjønnes wrote: > | > > Probably you meant "raw" pointers, no? > | > > | > No I meant (raw) "row" pointer > | > | Oh, I see, and Lars knows it? If he knows he is loosing qualities. > > I have no idea what you are talking about! > (My qualit

Re: [FULL PATCH] The full RowList patch in a 99% percent finished state.

2003-03-23 Thread John Levon
On Sun, Mar 23, 2003 at 04:14:38PM +0100, Lars Gullik Bj?nnes wrote: > Fix a crashing bug... Harrumph, you could have at least "finished" the patch before getting me to test it. I'm thinking LYX_ALIGN_BLOCK here. Why did you kill this code ? regards john

Re: [patch] metrics 2.

2003-03-23 Thread John Levon
On Sun, Mar 23, 2003 at 01:03:56PM +0100, Kornelia Pietsch wrote: > There are still quite a few occasions where the metrics() call is too > late (the tables e.g.). > > I think this can be solved by calling metrics() in the screen's update > but I got stuck in the whole RowPainter/LyXText/whatever

Re: valid cursor positions

2003-03-23 Thread John Levon
On Sun, Mar 23, 2003 at 11:01:34AM +0100, Kornelia Pietsch wrote: > Alfredo has a very valid point: Cursor positions should be valid from 0 > up to _and including_ size() in a paragraph. This might require a small This is not what me and Alfredo are arguing about. For starters we're talking about

Re: [patch] fix 2 crashes

2003-03-23 Thread John Levon
On Sun, Mar 23, 2003 at 10:34:20AM +0100, Alfredo Braunstein wrote: > IMHO, if you don't like the -1 value and you want to add all the special > casing, then you should put an assert(size > 0) in lastPos, but don't An assert is absolutely fine with me. regards, john

Re: [PATCH] Rowlist 10/10

2003-03-23 Thread Lars Gullik Bjønnes
I could have split this more, but I won't do it unless absolutely needed. -- Lgb

[PATCH] Rowlist 10/10

2003-03-23 Thread Lars Gullik Bjønnes
diff -ruN --exclude=CVS -x '*.o' -x '*.libs*' -x '*~' -x '*.#*' -x '*.deps*' lyx-rowlist9/src/bufferview_funcs.C lyx-rowlist10/src/bufferview_funcs.C --- lyx-rowlist9/src/bufferview_funcs.C 2003-03-22 04:21:51.0 +0100 +++ lyx-rowlist10/src/bufferview_funcs.C 2003-03-22 13:30:37.0 +0

[PATCH] Rowlist 9/10

2003-03-23 Thread Lars Gullik Bjønnes
diff -ru --exclude=CVS -x '*.o' -x '*.libs*' -x '*~' -x '*.#*' -x '*.deps*' lyx-rowlist8/src/frontends/screen.C lyx-rowlist9/src/frontends/screen.C --- lyx-rowlist8/src/frontends/screen.C 2003-03-22 20:35:19.0 +0100 +++ lyx-rowlist9/src/frontends/screen.C 2003-03-22 20:43:41.0 +0100

[PATCH] Rowlist 8/10

2003-03-23 Thread Lars Gullik Bjønnes
Binary files lyx-rowlist7/src/lyx and lyx-rowlist8/src/lyx differ diff -ru --exclude=CVS -x '*.o' -x '*.libs*' -x '*~' -x '*.#*' -x '*.deps*' lyx-rowlist7/src/text2.C lyx-rowlist8/src/text2.C --- lyx-rowlist7/src/text2.C 2003-03-22 19:06:42.0 +0100 +++ lyx-rowlist8/src/text2.C 2003-03-22 19

[PATCH] Rowlist 7/10

2003-03-23 Thread Lars Gullik Bjønnes
diff -ru --exclude=CVS -x '*.o' -x '*.libs*' -x '*~' -x '*.#*' -x '*.deps*' lyx-rowlist6/src/BufferView_pimpl.C lyx-rowlist7/src/BufferView_pimpl.C --- lyx-rowlist6/src/BufferView_pimpl.C 2003-03-22 19:04:08.0 +0100 +++ lyx-rowlist7/src/BufferView_pimpl.C 2003-03-22 19:06:20.0 +0100

[PATCH] Rowlist 6/10

2003-03-23 Thread Lars Gullik Bjønnes
Binary files lyx-rowlist5/src/lyx and lyx-rowlist6/src/lyx differ diff -ru --exclude=CVS -x '*.o' -x '*.libs*' -x '*~' -x '*.#*' -x '*.deps*' lyx-rowlist5/src/lyxtext.h lyx-rowlist6/src/lyxtext.h --- lyx-rowlist5/src/lyxtext.h 2003-03-22 19:01:12.0 +0100 +++ lyx-rowlist6/src/lyxtext.h 2003-

[PATCH] Rowlist 5/10

2003-03-23 Thread Lars Gullik Bjønnes
diff -ru --exclude=CVS -x '*.o' -x '*.libs*' -x '*~' -x '*.#*' -x '*.deps*' lyx-rowlist4/src/bufferview_funcs.C lyx-rowlist5/src/bufferview_funcs.C --- lyx-rowlist4/src/bufferview_funcs.C 2003-03-19 15:45:09.0 +0100 +++ lyx-rowlist5/src/bufferview_funcs.C 2003-03-22 04:21:51.0 +0100

[PATCH] Rowlist 4/10

2003-03-23 Thread Lars Gullik Bjønnes
diff -ru --exclude=CVS -x '*.o' -x '*.libs*' -x '*~' -x '*.#*' -x '*.deps*' lyx-rowlist3/src/frontends/screen.C lyx-rowlist4/src/frontends/screen.C --- lyx-rowlist3/src/frontends/screen.C 2003-03-22 19:34:56.0 +0100 +++ lyx-rowlist4/src/frontends/screen.C 2003-03-22 19:44:49.0 +0100

[PATCH] Rowlist 3/10

2003-03-23 Thread Lars Gullik Bjønnes
diff -ru --exclude=CVS -x '*.o' -x '*.libs*' -x '*~' -x '*.#*' -x '*.deps*' lyx-rowlist2/src/frontends/screen.C lyx-rowlist3/src/frontends/screen.C --- lyx-rowlist2/src/frontends/screen.C 2003-03-22 18:57:58.0 +0100 +++ lyx-rowlist3/src/frontends/screen.C 2003-03-22 19:34:56.0 +0100

[PATCH] Rowlist 2/10

2003-03-23 Thread Lars Gullik Bjønnes
diff -ru --exclude=CVS -x '*.o' -x '*.libs*' -x '*~' -x '*.#*' -x '*.deps*' lyx-rowlist/src/insets/insetert.C lyx-rowlist2/src/insets/insetert.C --- lyx-rowlist/src/insets/insetert.C 2003-03-22 18:34:10.0 +0100 +++ lyx-rowlist2/src/insets/insetert.C 2003-03-22 19:13:44.0 +0100 @@ -4

[patch] metrics 2.

2003-03-23 Thread Kornelia Pietsch
Second shot. This basically works, i.e. basic insets (labels), math, and simple text (notes etc) work, nested tables don't. There are still quite a few occasions where the metrics() call is too late (the tables e.g.). I think this can be solved by calling metrics() in the screen's update but I

Re: [patch] fix 2 crashes

2003-03-23 Thread Lars Gullik Bjønnes
Alfredo Braunstein <[EMAIL PROTECTED]> writes: | | You are right (*) (I have to admit that I tried to look at the stl | documentation to prove you wrong and failed miserably. Apart from | discovering that I exchanged rbegin with rend ;)) Actually for rbegin you might be right... char a[5] = "La

Re: size of lyx binary file

2003-03-23 Thread Lars Gullik Bjønnes
Paolo Pumilia <[EMAIL PROTECTED]> writes: | I have just compiled 1.3.1 with xforms default libraries and found that | size of the binary file is almost double of the 1.2.2 release: | | lyx-1.3.1/src/lyx 8.0M | lyx-1.2.2/src/lyx 4.4M | | After stripping, size reduces to

valid cursor positions

2003-03-23 Thread Kornelia Pietsch
I just read lyx-devel via mail archive: Alfredo has a very valid point: Cursor positions should be valid from 0 up to _and including_ size() in a paragraph. This might require a small wrapper around a suitable STL container, but afterwards it works like a charm without any special casing whatsoev

Re: [patch] fix 2 crashes

2003-03-23 Thread Alfredo Braunstein
Lars Gullik Bjønnes wrote: > Alfredo Braunstein <[EMAIL PROTECTED]> writes: > > | > And it is not the [-1] element... > | > | ?? Yes it is. > | > | string s; > | assert(&*s.rend() == &s[-1]); > > Not portable, works only on this specific implementation. You are right (*) (I have to admit that

Re: [patch] fix 2 crashes

2003-03-23 Thread Alfredo Braunstein
John Levon wrote: > Alfredo, please understand this one point. > It is consistent. It is not wise. I don't understand this. Maybe I'm too dumb. (and I always thought that these two were pretty much related) IMHO, if you don't like the -1 value and you want to add all the special casing, then yo