[ wxwindows-Patches-1882985 ] Fix formatting of multi-line strings

SourceForge.net noreply at sourceforge.net
Sun Feb 3 13:40:27 PST 2008


Patches item #1882985, was opened at 2008-01-30 20:59
Message generated for change (Comment added) made by neis
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=309863&aid=1882985&group_id=9863

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Grid
Group: bug fix
>Status: Pending
Resolution: Accepted
Priority: 5
Private: No
Submitted By: Jon Trauntvein (j_trauntvein)
Assigned to: Nobody/Anonymous (nobody)
Summary: Fix formatting of multi-line strings

Initial Comment:
This patch fixes a formatting bug for a multi-line string that is composed with DOS line endings (\r\n).  If the following string was supplied:

"this is\r\n"
"a multi-line\r\n"
"string"

The trailing 'e' on the second line was lost when the cell was formatted.

----------------------------------------------------------------------

>Comment By: Stefan Neis (neis)
Date: 2008-02-03 21:40

Message:
Logged In: YES 
user_id=32202
Originator: NO

Speaking about the second occurence, I would guess (based on reading the
code, _not_ on testing) that in the if condition, the value.length() also
should be replaced by tval.length(), shouldn't it? At least for strings
that are ending in a line break, there should be a difference ...

----------------------------------------------------------------------

Comment By: Vadim Zeitlin (vadz)
Date: 2008-02-03 21:05

Message:
Logged In: YES 
user_id=71618
Originator: NO

I guess the second occurrence of value.Mid() should be replaced with
tval.Mid() too, shouldn't it? I've changed it too but I don't have any test
code to check this so it would be great if you could retest please.

Also, at least in the trunk we really should remove this function
completely and use wxTextBuffer instead but this will have to wait for
another day, I'll just leave a TODO comment in the sources for now...

Thanks!

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=309863&aid=1882985&group_id=9863




More information about the wx-dev mailing list