[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi] Urgent wx-related production problem
From: |
Greg Chicares |
Subject: |
[lmi] Urgent wx-related production problem |
Date: |
Sat, 02 Feb 2008 03:39:31 +0000 |
User-agent: |
Thunderbird 2.0.0.9 (Windows/20071031) |
Problem: Spurious duplication of initial element when pasting
data from ms 'excel' into an lmi textcontrol: anomaly observed
with wx-2.8.6, but not with a 2006-12-04 wx snapshot.
To reproduce: Copy a column of data such as
1
2
3
from 'excel' to the clipboard. Start lmi; do
File | New | Illustration
Tab to the "Comments" textcontrol on the first tab; right-click
there and choose "Paste". The textcontrol now contains
11;2;3
when it should contain
1;2;3
without duplication of the first element, '1'. Even pasting a
single 'excel' cell containing
abc
results in
abcabc
However, no anomaly is observed when pasting plain text, e.g.
echo "1789" >/dev/clipboard
(in which case lmi's Skeleton::UponPaste() is not called).
Software versions: The defective behavior is observed with
lmi HEAD, wxWidgets-2.8.6
and also with what we released yesterday:
lmi-20080125T1921Z [non-branch tag], wxWidgets-2.8.6
whereas correct behavior (no duplication) is observed with
lmi HEAD, 'wxWidgets-2006-12-04' historical snapshot
Other software is identical:
MinGW gcc-3.4.4
libxml, libxslt: no change
msw-xp, ms 'excel': no change
All behaviors reported here were observed in production builds
created by Wendy at one site, and confirmed in separate builds
created by me at a different site; and with very different
versions of ms 'excel' (probably 2003 and 1997 vintages).
Analysis: Apply diagnostic patch [1] to lmi HEAD and rebuild
with wxWidgets-2.8.6; repeat steps to reproduce (above).
Result for a column of data:
*** Original string:
1
2
3
*** Redelimited string:
1;2;3
*** GetValue() after WriteText():
11;2;3
[file /lmi/src/lmi/main_wx.cpp, line 808]
That output was copied to the msw clipboard with Ctrl-C
and pasted, removing superfluous leading and trailing
lines. Here's the relevant part through an 'od' lens:
/tmp[0]$</dev/clipboard od -t a
[...]
0000120 i g i n a l sp s t r i n g : cr nl
0000140 1 cr cr nl 2 cr cr nl 3 cr cr nl cr nl * *
Results for a single cell:
*** Original string:
abc
*** Redelimited string:
abc
*** GetValue() after WriteText():
abcabc
[file /lmi/src/lmi/main_wx.cpp, line 808]
and relevant 'od' output:
0000120 i g i n a l sp s t r i n g : cr nl
0000140 a b c cr cr nl cr nl * * * sp R e d e
---------
[1] Non-production patch for analysis only:
Index: main_wx.cpp
===================================================================
RCS file: /sources/lmi/lmi/main_wx.cpp,v
retrieving revision 1.91
diff -r1.91 main_wx.cpp
800a801,809
> warning()
> << "*** Original string:\n"
> << original_string
> << "\n*** Redelimited string: \n"
> << redelimit_with_semicolons(original_string)
> << "\n*** GetValue() after WriteText(): \n"
> << target->GetValue()
> << LMI_FLUSH
> ;
- [lmi] Urgent wx-related production problem,
Greg Chicares <=