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

List:       koffice-devel
Subject:    Re: save a kword file as a spread sheet
From:       Werner Trobin <trobin () kde ! org>
Date:       2004-10-27 10:47:28
Message-ID: 200410271247.28950.trobin () kde ! org
[Download RAW message or body]

On Wednesday 27 October 2004 10:49, David Faure wrote:
> On Wednesday 27 October 2004 10:41, Werner Trobin wrote:
> > Merging the code is not really possible, IMHO. The two problems we have
> > to solve are:
> > - Which mimetypes of the graph have a path to the target mimetype? (for
> > the filter dialog box)
>
> Yes, so how do you suggest we exclude some paths from that graph?
> I like Tomas' idea, I think it's simple enough; but maybe a very high
> weight could mean the same thing? If it doesn't prevent using this filter
> (as the final filter when exporting to text/plain), that is.

IMHO we should allow strange paths, as we pick the shortest one anyway, we 
just shouldn't "advertize" them. This means that the second part of the 
algorihtm shouldn't be changed, we only have to fix the first part (to get a 
useful list that's passed to the file dialog).

The current algorithm is a BFS (breadth-first search) that processes the 
reversed graph. One way to get rid of strange paths would be to add a flag to 
the nodes in the graph, able to stop processing of this path (quite similar 
to Tomas' suggestion). I.e. as soon as we reach a text/plain node we stop to 
explore that branch of the graph. This also fixes Nicolas' problem of 
KPresenter -> KWord vs. KPresenter -> text/plain -> KWord.

Another way would be to keep track of the accumulated weight of the possible 
paths and stop processing after some limit is reached. The result should be 
the same, if we properly select weights and threasholds. Maybe this one is a 
bit trickier to work out (due to all the weights and one single threshold 
that has to work for all cases). The advantage of that is that we won't need 
another flag.

Ciao,
Werner
_______________________________________________
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