i m p r o v i n g t h e x h t m l e x p o r t f i l t e r

I m p r o v i n g t h e X H T M L e x p o r t - PowerPoint PPT Presentation

I m p r o v i n g t h e X H T M L e x p o r t f i l t e r A n d m e n t o r i n g s t u d e n t s t h r o u g h p a t c h e s a n d l i c e n s e s Andrea Pescetti


  1. I m p r o v i n g t h e X H T M L e x p o r t f i l t e r A n d m e n t o r i n g s t u d e n t s t h r o u g h p a t c h e s a n d l i c e n s e s Andrea Pescetti pescetti@apache.org

  2. An Obscure Little Feature An Obscure Little Feature An Obscure Little Feature An Obscure Little Feature Paolo Morelli:

  3. A n I n t e r e s t i n g S t o r y • A little feature • Students • Forks • Licenses

  4. T h e X H T M L E x p o r t • One of many export filters • File Export XHTML → → • Not the HTML export!

  5. E x p o r t i n g t o X H T M L • Available in all modules, but focusing on Impress here. • Produces one .html file, not a slide-by-slide gallery. • Code: main/filter/source/xslt

  6. H a b i b ' s W o r k • Improvements by Habib Louafi, a PhD student in Canada. • Extends the XHTML filter with features that make it mature. • Published in May 2013 (Louafi-Coulombe).

  7. H a b i b ' s C o d e • Full diff: 6666 lines. • Based on versions 2.4 (2008) and 3.1 (2009). • Contributed under Apache License v2 in June 2013: #i122494#

  8. New Features New Features New Features New Features Paolo Morelli:

  9. I m p r o v i n g F o n t s • Fonts used to be replaced by the browser's default font. • style_collector.xsl collects styles, style_mapping_css.xsl converts them to CSS. • Now fixed: font is preserved.

  10. I m p r o v i n g L a y o u t • Text boxes in a slide used to be exported sequentially in XHTML. • All layout lost (body.xsl) • Now properly placed with coordinates and CSS.

  11. I m p r o v i n g I m a g e s • Images used to be converted to base64 and rendered as data streams embedded in XHTML. • Problems with some browsers. • Now solved: the “Link” option is used to preserve image.

  12. I m p r o v i n g S h a p e s • Shapes used to be ignored. • Now converted using the JavaScript Vector Graphics Library by Walter Zorn. • Support for rectangles, circles, ellipses, lines.

  13. I m p r o v i n g S c a l i n g • The export did not support scaling. • Scaling parameter added to resize the output (for mobile). • Done by calling ImageMagick from a Java-based application.

  14. B e f o r e a n d A f t e r ( b y H a b i b ) • Fonts • Layout • Images • Shapes • Scaling

  15. O r i g i n a l F i l e

  16. B e f o r e

  17. A f t e r

  18. Integration and difficulties Integration and difficulties Integration and difficulties Integration and difficulties Paolo Morelli:

  19. F o u r Y e a r s A r e L o n g • Habib's code cannot be used immediately. • Code in both OpenOffice and LibreOffice has evolved, entire directories were reorganized. • Need to refactor the patch.

  20. W h e r e ' s t h e X H T M L E x p o r t ? • On Windows, XHTML export is not installed by default. • Decision taken (undocumented) before 3.3.0: #i119663# • Need to enable it with a custom installation.

  21. D e p e n d e n c y I s s u e s • Habib's approach includes in full the late (to the best of our knowledge) Walter Zorn's JavaScript library. • LGPL 2.1+, Apache Category B. • Good case for Apache Legal.

  22. C u r r e n t S t a t u s • Vadim Yedzinovich, a new contributor, is being mentored to work on this. • Patch aligned and being sliced in several components. • First fixes to appear in 4.1.

  23. F u t u r e D e v e l o p m e n t s • Repurpose the XHTML export to an HTML5 export. • Scaling: CSS3's transform. • Shapes: HTML5's <canvas> and no JavaScript. • Volunteers welcome!

  24. T h a n k s f o r a t t e n t i o n Andrea Pescetti pescetti@apache.org www.openoffice.org Image credits: Flickr, PLIO Archives.

Recommend


More recommend