[Libreoffice] [PUSHED] Re: SmNodeToTextVisitor Fixes

Luke Dixon 6b8b4567 at gmail.com
Sun Dec 19 07:45:50 PST 2010


Hi Jonas,

I'm very sorry for not responding very quickly. And I'm very sorry for
sending pretty much the same message twice, I forgot to CC the list.

> That's not all true... I added all the brackets initially because I
> had some problems with a few isolated things...
> Try writing binom a b + c in the command text field... Then enter
> visual editor an move as much to the right as possible, e.g. the
> rightmost position in the toplevel line, and write + d
> Now "+d" will be in the toplevel line... But if you enter the command
> text editor and changes c to e, then +d will be in the second line of
> the binom...
> I don't think this is parsing error... But an unpleasant obscurity in
> the format... I'm not even sure I fixed this one with my excessive use
> of brackets... But the issue is there now... We should probably fix it
> and add a unit test for it to avoid regressions...
> The problem is that when binom has these obscurities maybe some of the
> other command have similar obscurities... :(

Yep, I'm very sorry for breaking things. I've attached a patch for this
particular problem (with a test).

In trying to work out the correct form for binoms, I found that even
"binom {a} {b + c} + d" doesn't seem to work when it goes through the
parser, so I guess it needs to be "{ binom {a} {b + c} } + d".

I've noticed other stuff I've messed up though, so I'm going to continue
on this some more :)

> Btw, you latest patch didn't introduce this issue... So it's probably
> been there for a while...
> 
> > Oh, another thing I noticed was that there seems to be a crash when
> > moving to the right of an SmPlaceNode and deleting it
> Interesting... I've had that bug once, but I've never been able to
> reproduce it... Can't this time either... Do you have any more
> specific steps ?

I described this pretty badly, sorry, the steps I use are:
1. type something in the visual editor eg. "A + B = C"
2. press enter to go to a new line
3. press the right arrow key to move to the right of the place node
When I do this the underline that goes with the caret moves up a little
bit and the caret gets shorter.
4. press enter or backspace and it crashes (every time for me)

I really haven't looked at it any further at this point. The
libreoffice-3-3 version seems to work fine though.

Regards,
Luke


More information about the LibreOffice mailing list