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

List:       koffice-devel
Subject:    Re: Review Request: Exact row height in KWord tables added
From:       "Thomas Zander" <zander () kde ! org>
Date:       2010-03-22 12:56:22
Message-ID: 20100322125622.25846.79571 () localhost
[Download RAW message or body]



> On 2010-03-22 09:12:48, Thomas Zander wrote:
> > /trunk/koffice/plugins/textshape/Layout.cpp, line 1102
> > <http://reviewboard.kde.org/r/3319/diff/1/?file=21019#file21019line1102>
> > 
> > Using a boolean to decide if we call QTextLayout::draw() means we decide for a \
> > whole block. Which may very well have a lot of lines. This is not correct as we \
> > should determine painting per line. 
> > What about just setting the cliprect before calling the layout-draw()  ?
> > Probably needs a QPainter::save() / QPainter::restore() too.
> 
> Miroslav Nohaj wrote:
> About the QTextLayout::draw() and whole block - currently every block in that loop \
> is a single line, not more lines - I've noticed that when I added drawing \
> boundingRect of the drawn blocks with red just to see what and when is drawn... So \
> avoiding a single draw() will (currently) avoid drawing of a single line, not more. \
>  Yes, I was thinking about setting the clipping area of painter, but that might \
> result in drawing in the places where the original clipping area would forbid me, \
> right?

Every block is one paragraph, can contain multiple lines if you don't press enter \
before the cell width is reached.

For the other one; read the APi docs for QPainter::setClipRect() and all its \
arguments.


- Thomas


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://reviewboard.kde.org/r/3319/#review4603
-----------------------------------------------------------


On 2010-03-22 12:39:40, Miroslav Nohaj wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://reviewboard.kde.org/r/3319/
> -----------------------------------------------------------
> 
> (Updated 2010-03-22 12:39:40)
> 
> 
> Review request for KOffice.
> 
> 
> Summary
> -------
> 
> This adds the exact row height to the tables of KWord (exact row height is an \
> attribute from MS Word document as a complement to the minimum row height). The \
> text which does not fit in a cell in a row of small height is not displayed this \
> way (does not go outside the cell). The other option would be to clip the text, but \
> as that didn't work for the QTextLayout::draw(...) this approach of not showing was \
> chosen. Clipping would be nicer, not showing is faster. 
> 
> Diffs
> -----
> 
> /trunk/koffice/libs/kotext/styles/KoTableRowStyle.h 1105136 
> /trunk/koffice/libs/kotext/styles/KoTableRowStyle.cpp 1105136 
> /trunk/koffice/plugins/textshape/Layout.cpp 1105136 
> /trunk/koffice/plugins/textshape/TableLayout.cpp 1105136 
> 
> Diff: http://reviewboard.kde.org/r/3319/diff
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Miroslav
> 
> 

_______________________________________________
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