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

List:       koffice-devel
Subject:    Re: Problem with old KWord's <LINESPACE>
From:       Nicolas Goutte <nicolasg () snafu ! de>
Date:       2004-02-06 17:08:07
Message-ID: 200402061808.08059.nicolasg () snafu ! de
[Download RAW message or body]

On Friday 06 February 2004 16:25, David Faure wrote:
> On Thursday 05 February 2004 23:54, Nicolas Goutte wrote:
> > The tag is processed at lines 222 to 227 in the file koffice/lib/kotext/
> > koparaglayout.cc . Only layout.lineSpacing is set (line 226), but the
> > type is not set.
>
> Looks like a bug.
> layout.lineSpacingType = KoParagLayout::LS_CUSTOM;  is missing.
> Since LINESPACE stored a pt value, the corresponding feature is obviously
> 'custom'.

I have checked the revision 1.1.2.45 of the file koffice/kword/kwtextparag.cc

The code for loading there is:

    element = parentElem.namedItem( "LINESPACE" ).toElement(); 
      // not in KWord-v1 DTD, used by KWord-0.8
    if ( !element.isNull() )
        lineSpacing.setPT( KWDocument::getAttribute( element, "pt", 0.0 ) );

    element = parentElem.namedItem( "LINESPACING" ).toElement();
     // KWord-v2 DTD
    if ( !element.isNull() )
        lineSpacing.setPT( KWDocument::getAttribute( element, "value", 
0.0 ) );

So at that time <LINESPACE> and <LINESPACING> had the same function. So indeed 
today it should be KoParagLayout::LS_CUSTOM

Remains just the problem how to handle <LINESPACE pt="0"> Did it had a special 
meaning? (In the above file, a <LINESPACING> was not saved if 0, so what was 
the behaviour before?)

Have a nice day!

_______________________________________________
koffice-devel mailing list
koffice-devel@mail.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