Improving interoperability of Writers features By Szymon Kos - - PowerPoint PPT Presentation

improving interoperability of writer s features
SMART_READER_LITE
LIVE PREVIEW

Improving interoperability of Writers features By Szymon Kos - - PowerPoint PPT Presentation

Improving interoperability of Writers features By Szymon Kos Sofuware Engineer at Collabora Productjvity szymon.klos@collabora.com +SzymonKos www.collaboraoffice.com Agenda DOCX / DOTM support for AutoText Documents embedding


slide-1
SLIDE 1

www.collaboraoffice.com

Improving interoperability of Writer’s features

By Szymon Kłos

Sofuware Engineer at Collabora Productjvity

szymon.klos@collabora.com +SzymonKłos

slide-2
SLIDE 2

www.collaboraoffice.com

Agenda

  • DOCX / DOTM support for AutoText
  • Documents embedding in DOC / DOCX
  • Watermark
slide-3
SLIDE 3

AutoText

slide-4
SLIDE 4

www.collaboraoffice.com

What is AutoText?

  • Content generator based on saved patuerns
  • Useful to insert ofuen used parts of the document
  • Content may be complex, not only plain text (tables, images, ...)
  • Shortcuts can be used eg. type “dt” (dummy text) and press F3
slide-5
SLIDE 5

www.collaboraoffice.com

How AutoText patuerns are imported?

  • New by example from selectjon
  • Loaded from fjle
  • Not every normal document
  • Special storage inside (glossary in case of DOCX)
  • One fjle can contain multjple entries
  • Import was possible from DOC
  • DOCX support was missing
slide-6
SLIDE 6

www.collaboraoffice.com

What has been done?

  • Support for importjng patuerns from DOCX and DOTM
  • Reading glossary.xml using writerfjlter
  • Each glossary entry added to new sectjon
  • One difgerence in DOTM – additjonal empty line on the

beginning of each sectjon → removed

slide-7
SLIDE 7

www.collaboraoffice.com

Demo

slide-8
SLIDE 8

Documents embedding in DOC/DOCX

slide-9
SLIDE 9

www.collaboraoffice.com

Embedding documents

  • Two modes:
  • Icon – opens new window with embedded fjle
  • Content – opens “in-place”
  • Before we had many issues:
  • error dialogs
  • missing content
  • non editable embeddings
  • Embeddings opened in very small windows
  • Problems depending on fjle formats (DOC in DOCX,

DOCX in DOCX, etc.)

  • Implementatjon depending on platgorm
slide-10
SLIDE 10

www.collaboraoffice.com

Many difgerent cases

Embedded Main DOC DOCX XLS XLSX DOC

  • pens web

view Word if installed / small window Excel if installed / error DOCX Missing icon, in-place small window In-place

slide-11
SLIDE 11

www.collaboraoffice.com

Causes

  • Only basic functjonality was supported
  • All over the code “TODO” annotatjons
  • Assumptjon that document is inserted in content mode

(ignored icon mode) – caused incorrect size of windows

  • Missing support for Windows when MS Offjce wasn’t installed

(some linux-only code to extract OLE storages)

slide-12
SLIDE 12

www.collaboraoffice.com

Slightly improved UX

  • Passing document tjtle to MS

Offjce when used (before was “Untjtled”)

  • Inform user on the window’s tjtle

bar which document is embedded

  • Updated menu entry “Update”
slide-13
SLIDE 13

Watermark

slide-14
SLIDE 14

www.collaboraoffice.com

Evolutjon

  • Extend watermark from

the TSCP classifjcatjon with possibility to change text, font, color, angle and transparency

  • Add some simple UI to

insert & edit watermarks

  • Should be a quick task...
slide-15
SLIDE 15

www.collaboraoffice.com

How watermark works?

  • Shape inserted into header → enables header
  • Thanks to that appears on each page
  • Placed in the background to not cover text
  • Have to be applied to all page styles
slide-16
SLIDE 16

www.collaboraoffice.com

Demo

slide-17
SLIDE 17

www.collaboraoffice.com

Interoperability problems

  • Saved watermark wasn’t detected by other offjce suits
  • Old export bugs:
  • Resized text on each save in DOC
  • Missing import/export of propertjes
  • DOCX: font
  • RTF: font, size, color, transparency (was visible as plain text)
slide-18
SLIDE 18

www.collaboraoffice.com

Broken DOC export

Watermark should have some padding. “best fjt” not “fjll the frame”

slide-19
SLIDE 19

www.collaboraoffice.com

Poor RTF support for text shapes

Watermark was imported as a plain text. Font, color, size and transparency propertjes weren’t loaded or saved.

slide-20
SLIDE 20

Thank you!

By Szymon Kłos

szymon.klos@collabora.com +SzymonKłos