shameless self-promoting website
»Rejourn root
»LibreOffice Community Blogs
Posted Wednesday, 04 November 2015 by Miklos
Tags: en libreoffice

Both LibreOffice Writer and Impress has the ability to export the document as PNG, which is one way to create thumbnails for documents — i.e. being able to preview them before the real loading of the document happens. It turns out Calc did not have this feature, and given that ScModelObj also supports the css::view::XRenderable interface (just like Writer), I hoped that it won’t be too complex to add one.

You can refer to Fridrich’s overview blog post for the complete list of steps on how to add a new filter to LibreOffice, here the following steps were needed:

  • improve DocumentToGraphicRenderer, so that it can handle that Calc does not implement the text::XTextViewCursorSupplier interface (Writer uses this one to expose the cursor is on what page)

  • register png_Portable_Network_Graphic as filter type for Calc

  • create a new calc_png_Export filter fragment

  • register a Calc graphic filters configuration type and filter group in Configuration_filter and CustomTarget_registry

  • testcase

If you can’t wait till LibreOffice 5.1 is released to try out this new feature, you can get a daily build. :-)