[ArtisticTextShape] Merge text ranges with same style
ClosedPublic

Authored by anthonyfieroni on Aug 18 2018, 4:52 AM.

Diff Detail

Repository
R8 Calligra
Lint
Lint Skipped
Unit
Unit Tests Skipped
anthonyfieroni created this revision.Aug 18 2018, 4:52 AM
Restricted Application added a project: Calligra: 3.0. · View Herald TranscriptAug 18 2018, 4:52 AM
Restricted Application added a subscriber: Calligra-Devel-list. · View Herald Transcript
anthonyfieroni requested review of this revision.Aug 18 2018, 4:52 AM

The change in appendText(const QString &text):
The original appended to an existing range while you add a new range.
I would think you could just leave the old code untouched, no?

Basically we want to be unchanged, but when it merged, now, it does not have guaranteed that appending to last will be nor same behavior nor correct.

Hmm, I assumed it only got in here when appending a text to
a) an empty shape (no need for merging),
b) at the end of an existing text, in which case using the the existing formatting of the last range should ok. I just can't see why using a defaultfont in this case is correct.

What have I missed?

You are right, when i see docs

/// Appends plain text to the last text range
void appendText(const QString &plainText);

danders accepted this revision.Aug 20 2018, 7:39 AM
This revision is now accepted and ready to land.Aug 20 2018, 7:39 AM
This revision was automatically updated to reflect the committed changes.