Bug 68478 - [PATCH] improve KWordWrap and word wrapping in konqueror
Summary: [PATCH] improve KWordWrap and word wrapping in konqueror
Status: RESOLVED INTENTIONAL
Alias: None
Product: kdelibs
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Stephan Kulow
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-11-18 08:20 UTC by Ken Deeter
Modified: 2003-12-07 02:50 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
described patch (57.76 KB, patch)
2003-11-18 08:22 UTC, Ken Deeter
Details
added some comments (58.05 KB, patch)
2003-11-18 08:33 UTC, Ken Deeter
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ken Deeter 2003-11-18 08:20:15 UTC
Version:            (using KDE Devel)
Installed from:    Compiled sources

I am attaching a patch that provides a useful utility function for word wrapping as a public static function in KWordWrap in the kdeui library, and also a small part to change khtml to use this function so that it word-wraps more languages properly.

It is based on code found in the Qt library version 3.2+. I had to pull it out because it is contained all within private classes that are not exported in the Qt API.

It doesn't solve all problems, but it should still do better than anything KDE has before. Qt also goes into various per-script type stuff that I did not bother to pull out, as it requires a greater infrastructural change to support in most applications.

Most of the stuff that I added is either public static member functions and file-static arrays and such. I'm not sure if this breaks ABI, but it would be great to get it into 3.2 in some form, as I think this kind of thing can be considered an more an i18n-bug than a feature.

I've been trying to work it into the kate part as well, but can't seem to find exactly where to plug in.
Comment 1 Ken Deeter 2003-11-18 08:22:25 UTC
Created attachment 3264 [details]
described patch

Includes code pulled out of Qt, based on the unicode line breaking algorithm.
handles cjk languages as well as western, and parentheses, brackets and the
like.
Comment 2 Ken Deeter 2003-11-18 08:23:07 UTC
Oh, and its based on 11/15/2003 HEAD branch of cvs.
Comment 3 Ken Deeter 2003-11-18 08:33:36 UTC
Created attachment 3265 [details]
added some comments
Comment 4 Stephan Kulow 2003-11-18 09:34:10 UTC
forget about it. You can't take GPL code and put it in LGPL code
Comment 5 Sashmit Bhaduri 2003-12-07 00:49:52 UTC
Perhaps also send the trolls a patch to expose said functions in qt. 
Comment 6 Ken Deeter 2003-12-07 02:50:11 UTC
Ive filed bug 69760 as a workaround.. wrote a different patch not based on the qt stuff that should still make wrapping a bit better in konqueror