Architecture Refactor Suggestion: App-irrelevent Format Filters

Boudewijn Rempt boud at valdyas.org
Sun Oct 21 09:19:47 BST 2012


On Sunday 21 October 2012 Oct, Yue Liu wrote:
> Hi,
> 
> Currently filters are loaded based on application's native mime-type.
> And now we have multiple applications with same native format, such as
> Karbon and Flow, Words and Authors. Applications with same native
> format should have same set of format filters, but format filter codes
> are sorted under application categories.
> 
> So I suggest change it from current structure
> 
> filters/xxx_app/[im,ex]port/xxx_filter

It's even messier in some places, where the odf2html filter is embedded in the epub filter.

> 
> to
> 
> filters/xxx2xxx

I wouldn't mind that change, but then, for Krita, we moved all the filters to the Krita folter anyway.

> 
> And tell distributions package filters as one component, not with
> apps, to avoid conflicts between same-format apps. At least Arch and
> Chakra is already doing it this way.

Fedora also did/does that already, which meant lots of bug reports since people only installed the app, not the filter component and then complained that they couldn't even open a simple jpeg in Krita!

There's a complication here with the Tables filters: some of them link directly to Tables and actually don't go though an ODS intermediate. Those probably should be moved to the tables folder itself.

> 
> Note: this is a problem for some Karbon filters, since they used
> KarbonPart to access shapes for shape painting. We can modify
> KoDocument::paintContent(painter, rect) to do that instead.
> 

Ah, so Karbon has the same problem already, too.


-- 
Boudewijn Rempt
http://www.valdyas.org, http://www.krita.org, http://www.boudewijnrempt.nl



More information about the calligra-devel mailing list