[prev in list] [next in list] [prev in thread] [next in thread] 

List:       koffice-devel
Subject:    Re: Spell checking
From:       Thorsten Zachmann <t.zachmann () zagge ! de>
Date:       2010-03-31 3:54:41
Message-ID: 201003310554.42021.t.zachmann () zagge ! de
[Download RAW message or body]

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. 

When looking at this I found the following code in 
plugins/textshape/Layout::decorateParagraph() which is no longer in use but 
still there:

                    bool misspelled = 
fmt.boolProperty(KoCharacterStyle::Spelling);
                    if (misspelled) {
                        qreal y = line.position().y() + line.ascent() + 
painter->fontMetrics().underlinePos();
                        drawDecorationLine(painter, QColor(255, 0, 0), 
KoCharacterStyle::SingleLine,
                                KoCharacterStyle::WaveLine, painter-
>fontMetrics().lineWidth(), x1, x2, y);
                    }
                } 

Does anything speak against bringing it back to use for printing the red lines 
for misspelled words?

Thorsten
_______________________________________________
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