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

List:       koffice-devel
Subject:    Re: [kword] line-spacing: custom vs exactly
From:       Nicolas Goutte <nicog () snafu ! de>
Date:       2002-11-06 13:04:49
[Download RAW message or body]

As far as I know:
- if you have for example "exactly" 14 pt, it will remain 14pt, even if you 
specify a 16 pt character somewhere in the line.
- with "at least" 14 pt, this 16 pt character would force a higher line space 
to be able to fit the character.
- the same idea applies for the "at most" 14 pt, if all characters are 8 pt 
high, you would not need 14 pt high. So you can reduce it (what you cannot do 
with "exactly" or "at least".)

The other problem might be the pehaviour of inline pictures. However, I have 
no idea how common word processors handle it normally.

Have a nice day/evening/night!

On Tuesday 05 November 2002 22:29, David Faure wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On Tuesday 05 November 2002 20:32, Nicolas Goutte wrote:
> > On Tuesday 05 November 2002 17:37, Ariya Hidayat wrote:
> > > I have to admit, this "custom linespacing" is quite difficult to export
> > > to another format, like RTF for example. As the spec says, RTF defines
> > > single, one-and-half, double, multiple, "at least", and "exacly". Yet I
> > > can't find which is associated better with KWord's "custom"
> > > linespacing. I'll appreciate any kind of help. (David ? Laurent ?
> > > Nicolas ?)
>
> I guess Laurent missed the fact that "exactly" was already implemented, and
> called "custom". LS_EXACTLY should be removed, and in the GUI 'custom'
> should probably be changed to 'exactly'.
>
> However looking at the implementation (KoTextParag::lineSpacing), I see
> that the new types of linespacing aren't properly implemented....
> As the comment above says:
>             // Tricky. During formatting height doesn't include the
> linespacing, // but afterwards (e.g. when drawing the cursor), it does !
>
> Therefore, for the LS_MULTIPLE case, assuming n =
> m_layout.lineSpacingValue()-1, we want a linespacing of n * height....
> (LS_DOUBLE is n=1 and LS_ONEANDHALF is n=0.5) During formatting
> (isValid==false) the height is the height of the text alone -> n*height.
> During painting (and when moving the cursor, etc.) (isValid==true) 'height'
> includes the linespacing already, so we must return....
>   n / (n+1) * height   (make a drawing to see that :)
>
> So the code should be:
> case LS_MULTIPLE:
>  return isValid() ? n / (n+1) * height : n * height;
>
> (Verification: one can check that the code for LS_DOUBLE and LS_ONEANDHALF
> obeys the formula above). I'll make that change (please test :).
>
> LS_AT_LEAST: what does this one mean exactly? What can make the linespacing
> bigger than the specified linespacing?
>
> - --
> David FAURE, david@mandrakesoft.com, faure@kde.org
> http://people.mandrakesoft.com/~david/
> Contributing to: http://www.konqueror.org/, http://www.koffice.org/
> Get the latest KOffice - http://download.kde.org/stable/koffice-1.2/
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.0.7 (GNU/Linux)
>
> iD8DBQE9yDhV72KcVAmwbhARAqI6AJ0e1AScEQpvgoWvGFfLbidJZKVQfACgo9C9
> NzvoXQQswrS5Z1UevS+bBm8=
> =cjXY
> -----END PGP SIGNATURE-----
>
> _______________________________________________
> koffice-devel mailing list
> koffice-devel@mail.kde.org
> http://mail.kde.org/mailman/listinfo/koffice-devel

_______________________________________________
koffice-devel mailing list
koffice-devel@mail.kde.org
http://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