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
SMART_READER_LITE
LIVE PREVIEW

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


slide-1
SLIDE 1

I m p r

  • v

i n g t h e X H T M L e x p

  • r

t f i l t e r

A n d m e n t

  • r

i n g s t u d e n t s t h r

  • 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

slide-2
SLIDE 2

Paolo Morelli:

An Obscure Little Feature An Obscure Little Feature An Obscure Little Feature An Obscure Little Feature

slide-3
SLIDE 3

A n I n t e r e s t i n g S t

  • r

y

  • A little feature
  • Students
  • Forks
  • Licenses
slide-4
SLIDE 4

T h e X H T M L E x p

  • r

t

  • One of many export

filters

  • File Export XHTML

→ →

  • Not the HTML export!
slide-5
SLIDE 5

E x p

  • r

t i n g t

  • 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
slide-6
SLIDE 6

H a b i b ' s W

  • 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).

slide-7
SLIDE 7

H a b i b ' s C

  • 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#

slide-8
SLIDE 8

Paolo Morelli:

New Features New Features New Features New Features

slide-9
SLIDE 9

I m p r

  • v

i n g F

  • 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.
slide-10
SLIDE 10

I m p r

  • v

i n g L a y

  • 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.

slide-11
SLIDE 11

I m p r

  • 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.

slide-12
SLIDE 12

I m p r

  • 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.

slide-13
SLIDE 13

I m p r

  • 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.

slide-14
SLIDE 14

B e f

  • r

e a n d A f t e r ( b y H a b i b )

  • Fonts
  • Layout
  • Images
  • Shapes
  • Scaling
slide-15
SLIDE 15

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

slide-16
SLIDE 16

B e f

  • r

e

slide-17
SLIDE 17

A f t e r

slide-18
SLIDE 18

Paolo Morelli:

Integration and difficulties Integration and difficulties Integration and difficulties Integration and difficulties

slide-19
SLIDE 19

F

  • u

r Y e a r s A r e L

  • 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.
slide-20
SLIDE 20

W h e r e ' s t h e X H T M L E x p

  • 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.

slide-21
SLIDE 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

  • ur knowledge) Walter Zorn's

JavaScript library.

  • LGPL 2.1+, Apache Category B.
  • Good case for Apache Legal.
slide-22
SLIDE 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.
slide-23
SLIDE 23

F u t u r e D e v e l

  • 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!
slide-24
SLIDE 24

T h a n k s f

  • r

a t t e n t i

  • n

Andrea Pescetti

pescetti@apache.org www.openoffice.org

Image credits: Flickr, PLIO Archives.