--===============0136778750== Content-Type: multipart/signed; boundary="nextPart1316013.EZGYVtOSo2"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit --nextPart1316013.EZGYVtOSo2 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline =46irst of all; please look at this page I wrote for this specific subject; http://techbase.kde.org/Development/Tutorials/KOffice_Overview On Monday 18 June 2007 17:28:19 Tomas Mecir wrote: > 2. inherit from KoTextEditingPlugin. Again, the trader queries and > such are already implemented, but the problem here (apart from being > limited to KoText only, which is probably not avoidable in any case) > is that the KoTextEditingPlugin seems to be aimed for plug-ins that > need real-time updates about the status of the text. The plug-ins done > in this project do not need this functionality, though, for the most > part (the word count one does, but that's it). [] > Or is there some other solution possible, that I am not seeing ? > > By the way, for the reference, the list of plug-ins that the SoC > project entails looks like this: > * Bookmarks plugin Bookmarks seems to be a core thing that I agree should not become a=20 plugin. Adding the public APIs in KoText and the widgets etc in the=20 shapes/text plugin seems to be the way to go. > * Uppercase Text (change text to all lowercase, title cased, or > capitalized)=20 IIRC this widget requires; 1) access to the current (text) selection 2) access to the document to alter the selection-text. 3) a way to show itself in the GUI. The first is a bit of a disappointment in that I expected the selection to= =20 be stored in a QTextCursor in the active KoCanvasResourceProvider. Alas,=20 a QTextCursor can't be stored in a QVariant. I guess we need to add=20 several fields or a custom made struct for this purpose instead. =46or 2 the same issue goes; we need to store the current shape and use a=20 dynamic_cast to fetch the KoShapeData from the user object which will=20 then give the QTextDocument we change. =46or 3, yeah, I guess my explanation in the docs wasn't clear enough. Sorr= y=20 for that :) If you run KWord and press the right mouse button while the text tool is=20 active you'll see the 'Autocorrect' menu option. This will execute the=20 code in /koffice/plugins/autocorrection/Autocorrection::checkSection() See the api docs for KoTextEditingFactory::showInMenu() > * Text replacement: Use thesaurus to do text replacement=20 > for similar words, another example is text replacement by texting > language.=20 Similar to the previous one. > * Colorization plugin=20 Same thing. > * An optional plugin that shows a word count in a docker This one should use the Docker plugin structure, I think. > I hope there is some easy answer to all this that I just don't see :) Let me know if there are any problems left! =2D-=20 Thomas Zander --nextPart1316013.EZGYVtOSo2 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQBGdr0pCojCW6H2z/QRAtkrAJwMbWTd/olJVNuaaChe+01gkiT98wCePd8b UGIDPZR2KB7FgAWzKFPbCU4= =PMK7 -----END PGP SIGNATURE----- --nextPart1316013.EZGYVtOSo2-- --===============0136778750== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ koffice-devel mailing list koffice-devel@kde.org https://mail.kde.org/mailman/listinfo/koffice-devel --===============0136778750==--