Comment 152 for bug 129403

Revision history for this message
In , Scotz-oo (scotz-oo) wrote :

gang65:

I am thrilled that someone is finally looking into this bug.

From your screen shots I'm going to make the guess that OO Write originally showed the behavior of wrapping spaces down to the following line. In fact I bet if your printable characters were just right, a single space would wrap down to the next line. My guess is that rather than code up a proper way of handling this, someone just killed the display of any and all spaces where lines would wrap within a paragraph.

The key may be to think of characters that use ink, and characters that don't. In this second case that would be the space (in its various flavors) and maybe the tab. Although the non-breaking space doesn't use ink, by its very nature it will not appear where a line wraps.

Unless it's preceded by a newline (CR-LF or LF) a no-ink character must never appear at the beginning of a line, even if that means it ends up on the previous line several inches off the right edge of the virtual paper.

A good general rule is: A line may wrap just before the start of the first inky character after any no-ink character.

Exception to the good general rule: If the line would otherwise be too long, it may wrap between any two inky characters.

Now how do we show these no-ink characters (specifically spaces) when they appear outside the boundary of the text zone? If they're still within the boundary of the virtual paper, I'd say go ahead and show them (if show non-printing characters is enabled) as those dots. If they're outside the boundary then maybe don't show anything but the cursor stuck at the right-hand edge of the paper.

Starting with comment 81, fl dummied up some screenshots of what extra spaces might look like. See: http://openoffice.org/bugzilla/show_bug.cgi?id=20878#c81

It's been suggested the cursor should not be able to travel out where these extra spaces are. If that means while the spaces are within the text zone (for example with a non-justified paragraph style), then I suggest not. If that means outside the text zone but still on the virtual paper (right-hand margin) then that's debatable. But if that means not showing the cursor if it'd be off the right-hand edge of the paper, then I completely agree. Keep the cursor on the paper.

Maybe a few of us could photoshop some screenshots to show desired behavior.

S~