[prev in list] [next in list] [prev in thread] [next in thread]
List: koffice-devel
Subject: Re: Spell checking
From: Thomas Zander <zander () kde ! org>
Date: 2010-03-31 6:45:21
Message-ID: 201003310845.21737.zander () kde ! org
[Download RAW message or body]
On Wednesday 31. March 2010 05.54.41 Thorsten Zachmann wrote:
> On Sunday 28 March 2010 19:59:21 Thomas Zander wrote:
> > > 1. Spell checking underlines are drawn even if forPrint in
> > >
> > >
> > >
> > > virtual void paint(QPainter &painter, const KoViewConverter &converter,
> > > bool forPrint);
> > >
> > >
> > >
> > > is set to true. This results the printouts and presentations in all
> > > apps besides kword to have the red underlines in printouts. KWord
> > > works around this problem by removing the
> > > QTextLayout::additionalFormat before printing. Any idea on how to not
> > > draw the underline in case forPrint is set.
> >
> > Try to move that code to komain?
>
> How does moving code to komain help for the case that the underlines of
> misspelled words are printed when forPrint is set to true.
>
> Removing the additionalFormat by going over all shapes in document is
> something I really love to avoid doing.
The reason its on the additional formats is for two points;
1) using additionalFormats doesn't alter the document so we avoid saving or
copy/pasting the spellcheck output.
2) its painted in the same pass by Qt, so its a significant speed gain.
Text painting is rather performance critical so the theoretically perfect
solution is often not the right one. Same in this case.
I think its not a problem to remove the spell check output on printing, to be
honest. Its a small price to pay to keep stuff fast. Moving the removal code to
the printing code sounds easy enough to me without it making stuff slow on
normal usage.
> Does anything speak against bringing it back to use for printing the red
> lines for misspelled words?
The opposite of the two above issues; where to store this info (can't use
QTextBlockFormat or QTextCharFormat) and painting speed.
Please show some profiling numbers to see how badly it affects speed if you can.
Thanks.
--
Thomas Zander
_______________________________________________
koffice-devel mailing list
koffice-devel@kde.org
https://mail.kde.org/mailman/listinfo/koffice-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic