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

List:       koffice-devel
Subject:    Re: tab filling
From:       Krister Wicksell Eriksson <krister.wicksell () spray ! se>
Date:       2002-03-19 16:38:42
[Download RAW message or body]

On Tuesday 19 March 2002 16.59, Thomas Zander wrote:
> Maybe I am stepping into this far too late, and I am missing the context.
>
> In the style dialog is an option to configure the tab leader (on the
> tabulators tab) Maybe you can get that to work by putting the tab leader
> config in the style.

That was until yesterday just a combobox with no logic behind it (thus it did 
not work).

>
> If that is done the suggestion of david below is just a change in the
> default style created for a TOC.

Just changed KWInsertTOCCommand::findOrCreateTOCStyle
>
> On Tue, Mar 19, 2002 at 04:53:32PM +0100, David Faure wrote:
> > On Monday 18 March 2002 15:03, Krister Wicksell Eriksson wrote:
> > > > > When drawing the tab one must know the type of filling so I put a
> > > > > new var in KoTestStringChar, it don't feels like this is the right
> > > > > place to put it cause only tab chars will use it. Any better way to
> > > > > do it?
> > > >
> > > > Hmm, can't you access the tabulator array from there, to find out
> > > > which type of filling should be used? I guess it requires a small
> > > > iteration to find out the tab number, but I think this is much better
> > > > than adding 4 bytes per char.
> > > >
> > > > In fact, a way to optimize this, to avoid iterating through all chars
> > > > since the beginning of the paragraph: this needs a cache. A simple
> > > > char index -> tab number  association, e.g. a QMap (QDict too
> > > > expensive for so few items). I'd use QMap<int,int>, to be filled in
> > > > during formatting (KoTextFormatter), with (char index, tab number).
> > > > Then the drawing code can use that map to quickly find out the tab
> > > > number, and use the tab array to get the filling type.
> > >
> > > Great idea, will try to implement it.
> >
> > Thanks (saw the commits etc.).
> > Next step: can you make the table of contents use one of those fillings
> > for its tabs? kword/contents.cc
> >
> > --
> > David FAURE, david@mandrakesoft.com, faure@kde.org
> > http://people.mandrakesoft.com/~david/, http://www.konqueror.org/
> > KDE, Making The Future of Computing Available Today
> >
> > _______________________________________________
> > koffice-devel mailing list
> > koffice-devel@mail.kde.org
> > http://mail.kde.org/mailman/listinfo/koffice-devel

-- 
krister.wicksell@spray.se
http://hem.spray.se/krister.wicksell/
_______________________________________________
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