D29177: [KJotsEdit] Don't mess with margins when pasting rich text

Igor Poboiko noreply at phabricator.kde.org
Sat Apr 25 13:36:43 BST 2020


poboiko created this revision.
poboiko added a reviewer: dvratil.
Herald added a project: KDE PIM.
poboiko requested review of this revision.

REVISION SUMMARY
  Original code contained weird html parsing, removing `margin-*: *px;' style properties from raw HTML.
  However, when inserted, `QTextDocument` sees no margins and decides to set them to the default 12px,
  which breaks even copy-pasting of non-formatted text (see attached).
  
  Instead just use standard `QTextDocument` manipulation methods to remove margins. It fixes both pasting
  formatted and non-formatted text.
  
  BUG: 302107

REPOSITORY
  R573 KJots

BRANCH
  spacing-paste (branched from master)

REVISION DETAIL
  https://phabricator.kde.org/D29177

AFFECTED FILES
  src/kjotsedit.cpp

To: poboiko, dvratil
Cc: kde-pim, fbampaloukas, dcaliste, dvasin, rodsevich, winterz, vkrause, mlaurent, knauss, dvratil
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20200425/74ca244e/attachment.html>


More information about the kde-pim mailing list