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

List:       koffice-devel
Subject:    Re: Continuing thumbnail obsession
From:       David Faure <david () mandrakesoft ! com>
Date:       2002-02-28 17:18:48
[Download RAW message or body]

On Thursday 28 February 2002 13:37, Simon MacMullen wrote:
> My continuing obsession with thumbnails has now created one for koffice
> files:
> 
> http://www.babysimon.co.uk/kde/kofficepreview.png

Wow. This is amazing. Thought about this in the past, but it's cool to see
this begin actually done, especially in such a generic way. Very nice.
(The kofficecore design pays a lot).

> If you look carefully at the code you may see traces of the HTML preview and
> Philippe Fremy's KParts tutorial :)
;)
That tutorial could be updated for KDE 3 ... the whole "declaring a part"
or "finding a part" code that used to be necessary with KDE 2 has been made
much simpler by KDE 3 (I gave all details in the tutorials I wrote for IBM
developerWorks, but they're not online yet).

> However, it's not quite as I would like it. I can't seem to control the
> scaling in a very meaningful way. What I would like to do is find out how
> wide the document "wants" to be, then scale for that (particularly important
> for KWord docs). But I can't mind a method that tells me this. Is there one?

Hmm, each applications handles the KoPageLayout itself.
The way to gain access to this from KoDocument would be to centralize even
more code in kofficecore, e.g. storing the page layout there and porting the
koffice apps to use that variable instead of storing it themselves.

> Also, when adjusting the zoom parameters which are passed to
> KoDocument::paintEverything, font sizes don't seem to change. I recall this
> used to be a problem but I don't know whether it's been fixed yet (ummm, I'm
> afraid I hardly use KOffice...).

Is that with KOffice-1.1[.1] or with KOffice-CVS ? It's about KWord, right ?
This sounds like a 1.1 bug, it should be fine with KWord-CVS.

> Also, it completely fails to work with KPresenter. I don't know why.

It doesn't implement paintContent at the moment... Needs to be ported
to the new design in KPresenter. This means, embedding a kpresenter doc
doesn't paint anything either. Needs to be fixed. Laurent, maybe ? ;)
Hmm, but this means it's indeed about the CVS version...
So the font size problem surprises me.
Can you test what happens when embedding a kword doc ? Should be the same code.

> The attached patch provides two .desktop files to switch it on and off - one
> for KOffice and one for MSOffice. I don't know if this is the best way to do
> it - should it be lots of little .desktops or one big one maybe?

A little one sounds good to me. Otherwise the preview menu in konqueror would
become really overcrowded, no ?

> What else? Oh, to reply to the list admin's question, yes, it probably is
> quite slow. "Unfortunately" I developed it on my fast work machine. It might
> go faster if it "reused" the KoDocuments (like the HTML preview reuses
> KHTML), but it would probably need a QDict of them. Hmmm...
Hmmmm too ;)
I think the longest part is the loading. So reusing KoDocument to save a new/delete
wouldn't buy much speed, I'm afraid.

-- 
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
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic