Ticket #1730 (closed bug: fixed)

Opened 16 years ago

Last modified 15 years ago

copy-paste-format-internal --Copied text from Sophie loses format when pasted

Reported by: deyan Owned by: deni
Priority: critical Milestone: M12_RELEASE
Component: uncategorized Version: 2.0
Keywords: Cc: deni
Category: unknown Effort:
Importance: 99 Ticket_group:
Estimated Number of Hours: 0 Add Hours to Ticket: 0
Billable?: yes Total Hours: 0
Analysis_owners: vlado, deyan, boyan Design_owners: vlado, tanya, deni
Imp._owners: vlado, tanya, deni Test_owners:
Analysis_reviewers: meddle Changelog:
Design_reviewers: meddle, meddle, todor, pap Imp._reviewers: meddle, meddle, todor, pap
Test_reviewers: dido Analysis_score: 2.5
Design_score: 3.5 Imp._score: 3
Test_score: 0

Description (last modified by boyan) (diff)

  1. Create 2 text frames in Sophie and type some text in both of them.
  2. Change the style of the text in one of the frames, copy it, and paste it in the other frame.

The formatting is lost.

Change History

comment:1 Changed 16 years ago by deyan

  • Owner set to deyan
  • Status changed from new to s1a_analysis_started
  • Milestone set to M09_BETA1

comment:2 Changed 16 years ago by deyan

  • Status changed from s1a_analysis_started to s1b_analysis_finished

comment:3 Changed 16 years ago by deyan

  • Description modified (diff)

comment:4 Changed 16 years ago by vlado

  • Description modified (diff)

comment:5 Changed 16 years ago by vlado

  • Design_owners set to vlado
  • Status changed from s1b_analysis_finished to s1c_analysis_ok
  • Imp._owners set to vlado

comment:6 Changed 16 years ago by vlado

  • Owner changed from deyan to vlado
  • Status changed from s1c_analysis_ok to s2a_design_started

comment:7 Changed 16 years ago by vlado

  • Status changed from s2a_design_started to s2b_design_finished

comment:8 Changed 16 years ago by vlado

  • Status changed from s2b_design_finished to s2c_design_ok

comment:9 Changed 16 years ago by vlado

  • Status changed from s2c_design_ok to s3a_implementation_started

comment:10 Changed 16 years ago by vlado

  • Status changed from s3a_implementation_started to s3b_implementation_finished

-> Copy/Paste of formatted text is not supported for now (only plain text).
-> The pasted text is appended after the existing one in the frame.

comment:11 Changed 16 years ago by vlado

Bug fixed on branch branches/private/vlado/demo1-bugfix in [3918].

comment:12 Changed 16 years ago by meddle

  • Status changed from s3b_implementation_finished to s3c_implementation_ok
  • Analysis_reviewers set to meddle
  • Analysis_score changed from 0 to 3
  • Imp._reviewers set to meddle
  • Design_score changed from 0 to 3
  • Design_reviewers set to meddle
  • Imp._score changed from 0 to 3

If we consider this as a quick fix for the demo, it works, but that thing just kills one of the optimizations you made returning the pasting to the old logic, character by character, other thing when we paste and the cursor is not in the end of the current text, let's say in the middle of it, the pasted text is appended to the end of the text and not when the cursor is. May be later this bug have to be reopened.

Merged to the trunk in [3937].

3p 20m

comment:13 Changed 16 years ago by dido

  • Status changed from s3c_implementation_ok to new
  • Test_reviewers set to dido

Not fixed or not committed.

comment:14 Changed 16 years ago by dido

  • Status changed from new to s1c_analysis_ok

comment:15 Changed 16 years ago by tanya

  • Status changed from s1c_analysis_ok to s2a_design_started
  • Total Hours set to 0
  • Add Hours to Ticket set to 0
  • Billable? set
  • Owner changed from vlado to tanya
  • Estimated Number of Hours set to 0

comment:16 Changed 16 years ago by tanya

  • Design_owners changed from vlado to vlado, tanya
  • Status changed from s2a_design_started to s3b_implementation_finished
  • Imp._owners changed from vlado to vlado, tanya

comment:17 Changed 16 years ago by tanya

comment:18 Changed 16 years ago by tanya

comment:19 Changed 16 years ago by tanya

comment:20 Changed 16 years ago by meddle

  • Status changed from s3b_implementation_finished to s2c_design_ok
  • Analysis_score changed from 3 to 2.5
  • Imp._reviewers changed from meddle to meddle, meddle, todor
  • Design_score changed from 3 to 2.5
  • Design_reviewers changed from meddle to meddle, meddle, todor
  • Imp._score changed from 3 to 2.5

So... because of that that the styling comes with the first letter, and not every time is copied we will fail it.

comment:21 Changed 15 years ago by vanya

  • Milestone changed from M09_BETA1 to M12_RELEASE

comment:22 Changed 15 years ago by boyan

  • Status changed from s2c_design_ok to new

Now the existing text is preserved but still the formatting is lost. Since the task is too old, moving it to analysis_finished

comment:23 Changed 15 years ago by boyan

  • Status changed from new to s1b_analysis_finished
  • Description modified (diff)
  • Analysis_owners changed from vlado, deyan to vlado, deyan, boyan

Changing description to be actual.

comment:24 Changed 15 years ago by deyan

  • Importance set to 99
  • Summary changed from Copied text from Sophie loses format when pasted to copy-paste-format-internal --Copied text from Sophie loses format when pasted

Batch update from file report_1.csv

comment:25 Changed 15 years ago by deni

  • Status changed from s1b_analysis_finished to s2a_design_started

comment:26 Changed 15 years ago by deni

  • Status changed from s2a_design_started to s2b_design_finished
  • The main idea is that ImmHotTextTransferable should carry HotTextData to paste text inside Sophie.
    • Add HotTextData in ImmHotTextTransferable.registerData(List<DndData> dataList).
    • Process HotTextData in ON_PASTE operation in HotTextLogic.
  • HotTextData will still be carried in the form of RawBinData. Converting ImmHotText to OutputStream will be done in two phases:
    • persisting ImmHotText to Storage (using MasterPersister);
    • creating an XML Document and writing it in the stream (using some helper methods of ZipPackagePersister;
  • Move some logic from ZipPackagePersister to public static helper methods:
    • public static void unpackXml(InputStream stream, Storage target) throws IOException - reads from a given InputStream and unpacks the XML data into Storage.
    • public static void writeXmlToStream(Document xml, OutputStream stream) throws IOException - writes the given XML Document in the given OutputStream.
  • In ImmHotText.replace(HotInterval interval, ImmHotText insertText) make sure not to change the ID of the text when applying styles.


comment:27 Changed 15 years ago by deni

  • Design_owners changed from vlado, tanya to vlado, tanya, deni
  • Imp._owners changed from vlado, tanya to vlado, tanya, deni
  • changed ImmHotText.getNormalizedStyleValues() to respect style values that begin before or end after the end of a subtext in [8201].
  • removed an anonimous class in [8203].

comment:28 Changed 15 years ago by pap

  • Status changed from s2b_design_finished to s2c_design_ok
  • Design_score changed from 2.5 to 3.5
  • Design_reviewers changed from meddle, meddle, todor to meddle, meddle, todor, pap
  • Seems Ok.
  • I am glad you wrote tests or them methods you changed. I hope you did that before the actual change :)
  • It would be good if you fix bad code by your own initiative (I mean variable names, spacing and such things).
  • Good luck.

comment:29 Changed 15 years ago by deni

  • Owner changed from tanya to deni
  • Status changed from s2c_design_ok to s3a_implementation_started

comment:30 Changed 15 years ago by deni

  • Status changed from s3a_implementation_started to s3b_implementation_finished
  • fixed drag-out of AllResourcesPalette to copy styled text, too and removed the unnecessary linefeeds at the end of rtf data in RTFTextImportManager in [8208]

comment:31 Changed 15 years ago by deyan

  • Priority changed from major to critical

Batch update from file 0911261.csv

comment:32 Changed 15 years ago by pap

  • Cc deni added
  • Status changed from s3b_implementation_finished to s3c_implementation_ok
  • Imp._score changed from 2.5 to 3
  • Imp._reviewers changed from meddle, meddle, todor to meddle, meddle, todor, pap
  • Commited to trunk in [8223].
  • Left commented out code in HotTextData.
  • The paste(EventR3, DndTransferable) method would better be ImmHotText getText(DndTransferable).
  • It would be better if you call the getText in pasteText(EventR3, ImmHotText) and make it use a transferrable and I hope you get the idea.
  • I don't like giving the EventR3 as a parameter. It is much better to require a TextView.
  • I don't understand why did you make a second unpackXml method in ZipPackagePersister. You could've changed it to have InputStream as an argument and change the 2 places where it is called.
  • Attachments(links) are not transfered between frames.

comment:33 Changed 15 years ago by deyan

  • Status changed from s3c_implementation_ok to closed
  • Resolution set to fixed

links should be fixed

Note: See TracTickets for help on using tickets.