Issue 35464 - pasting strings longer 64K into memo fields does not work
Summary: pasting strings longer 64K into memo fields does not work
Status: ACCEPTED
Alias: None
Product: Base
Classification: Application
Component: code (show other issues)
Version: 680m56
Hardware: PC Windows XP
: P3 Trivial (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-10-13 15:45 UTC by Frank Schönheit
Modified: 2017-05-20 10:47 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
database file (2.39 KB, application/vnd.sun.xml.base)
2004-10-13 15:48 UTC, Frank Schönheit
no flags Details
dBase file (158 bytes, application/octet-stream)
2004-10-13 15:48 UTC, Frank Schönheit
no flags Details
all files in one (IZ did not allow me to attach the last manually ..) (1.42 KB, application/x-compressed)
2004-10-13 15:50 UTC, Frank Schönheit
no flags Details
sample document to copy'n'paste into the memo field (70.37 KB, text/plain)
2004-10-13 15:53 UTC, Frank Schönheit
no flags Details
sample form (6.42 KB, application/vnd.sun.xml.writer)
2004-10-13 15:54 UTC, Frank Schönheit
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description Frank Schönheit 2004-10-13 15:45:55 UTC
- save the attached database and dBase file to an arbitrary location
- open the database file, adjust it's settings (Edit|Database|Properties) so
that it points to
  the proper location of the .dbf file
- The dBase table contains a text and a memo field
- create a simple form bound to the table, with one single line and one multi
line text field,
  both to both the two table columns
- open the form document for data entry
- open the attached text.txt, copy it's whole content to the clipboard
- place the cursor in the multi line text control of the form, and chose "Paste"
from the
  context menu
=> assertion: Overflowing rtl::OUString -> UniString cut to zero
=> the text is not pasted
Comment 1 Frank Schönheit 2004-10-13 15:48:09 UTC
Created attachment 18365 [details]
database file
Comment 2 Frank Schönheit 2004-10-13 15:48:40 UTC
Created attachment 18366 [details]
dBase file
Comment 3 Frank Schönheit 2004-10-13 15:50:32 UTC
Created attachment 18367 [details]
all files in one (IZ did not allow me to attach the last manually ..)
Comment 4 Frank Schönheit 2004-10-13 15:53:47 UTC
Created attachment 18368 [details]
sample document to copy'n'paste into the memo field
Comment 5 Frank Schönheit 2004-10-13 15:54:05 UTC
Created attachment 18369 [details]
sample form
Comment 6 Frank Schönheit 2004-10-13 15:57:15 UTC
- memo.odb is the database file
- memo.dbf is the dBase file
- memo.zip contains memo.odb, memo.dbf, and memo.dbt (the memo file belonging
  to memo.dbf)
- text.txt contains a sample text to copy'n'paste to the memo control (I suppose
nearly
  every other  text does it, too)
- memo.oot contains a sample form. You may need to adjust it's settings to point
  to the database file
Comment 7 Frank Schönheit 2004-10-19 13:35:57 UTC
update: all the hassle with binding the control to a memo field is not
necessary: simply create a multi line text field, and paste the attached
text.txt's content into it.
Comment 8 Frank Schönheit 2004-10-19 15:30:32 UTC
adjusting summary: The problem is that the underlying TextView implementation
uses the tools/String class, which itself can not work with strings longer than
64K. A Paste operation into the TextView requires (for an intermediate step) a
single string which contains the whole text, so pasting fails when the string is
longer than 64K.

Solutions:
- some more sophisticated code in pasting, which breaks up the pasted string
(which originally is a ::rtl::OUString, which can be longer than 64K) into pieces.
OR
- replace all occurences of String in the TextView/TextEngine class with
::rtl::OUString

The latter is the better solution, but also much more expensive. Given that this
issue is in the product for quite a while, and we're close to a 2.0 Beta, I
re-target this to "OOo Later"
Comment 9 Marcus 2017-05-20 10:47:29 UTC
Reset assigne to the default "issues@openoffice.apache.org".