36
1 LibreOffice Paris 2011 Conference - Non coding extensions Building community around non coding extensions, create and deploy non coding extensions Kálmán “KAMI” Szalai LibreOffice Conference Paris, France 14 October, 2011

LibreOffice/OpenOffice.org - non coding extensions

Embed Size (px)

DESCRIPTION

 

Citation preview

Page 1: LibreOffice/OpenOffice.org - non coding extensions

1LibreOffice Paris 2011 Conference - Non coding extensions

Building community around non coding extensions, create and deploy non coding extensions

Kálmán “KAMI” Szalai

LibreOffice ConferenceParis, France14 October, 2011

Page 2: LibreOffice/OpenOffice.org - non coding extensions

2LibreOffice Paris 2011 Conference - Non coding extensions

About → Kami

OpenOffice.org contributor since 2003LibreOffice contributor since 2010Extension development

● Non-coding extensions (OxygenOffice templates, galleries)

● SmART (ex Diagram) [with Tibor Hornyák]● Barcode [with Dániel Darabos]● Validator [with Tibor Hornyák]● WatchWindow [with Tibor Hornyák]

Other Free Software activities: Mozilla, Ubuntu

System Administrator at a mobile phone monitoring company – http://www.synaptel.com/

Page 3: LibreOffice/OpenOffice.org - non coding extensions

3LibreOffice Paris 2011 Conference - Non coding extensions

What is LibreOffice Extension?

Extending LibreOffice capabilitiesOne file with „.oxt” extensionEasy to install and removeEffective update mechanism

● Build-in into LibreOfficeEasy entry point for

● Programmers● Content developers

Page 4: LibreOffice/OpenOffice.org - non coding extensions

4LibreOffice Paris 2011 Conference - Non coding extensions

Levels of extension deployment

Shared extension installation● Installed by the LibreOffice itself or by the system

administrator● User can't add, update or remove it● System administrator can manage it via CLI, „Package

Manager” or replace the extensions' dir● Available for all users

Page 5: LibreOffice/OpenOffice.org - non coding extensions

5LibreOffice Paris 2011 Conference - Non coding extensions

Levels of extension deployment

Per-user extension installation● Installed and managed by the user● User can manage it via CLI or „Package Manager”● Available for that user only who installed it

Page 6: LibreOffice/OpenOffice.org - non coding extensions

6LibreOffice Paris 2011 Conference - Non coding extensions

Type of Extensions

There are two types of extensions● Code extension● Non-coding extensions

Page 7: LibreOffice/OpenOffice.org - non coding extensions

7LibreOffice Paris 2011 Conference - Non coding extensions

Code extension

Implements UNO Component● This is what we use as „Extension” in general● Integrates into the UI: menu elements and toolbars

Calc Add-Ins● Create one or more Calc function

Page 8: LibreOffice/OpenOffice.org - non coding extensions

8LibreOffice Paris 2011 Conference - Non coding extensions

Non-coding extensions

Contains Open Document Format files or special LibreOffice files:

● Templates („.ott”, „.ots”, „.otp”, „.otd”)● Dictionaries● Galleries● AutoCorrect● AutoTexts● Databases● Settings

Page 9: LibreOffice/OpenOffice.org - non coding extensions

9LibreOffice Paris 2011 Conference - Non coding extensions

Structure of extensions

„.oxt” files are ZIP filesStructured set of files and directories

● META-INF/manifest.xml● description/*● licenses/*● readmes/*● Paths.xcu● description.xml● gallery/*, autotext/*, template/*

Page 10: LibreOffice/OpenOffice.org - non coding extensions

10LibreOffice Paris 2011 Conference - Non coding extensions

META-INF/manifest.xml

<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE manifest:manifest PUBLIC "-//OpenOffice.org//DTD Manifest 1.0//EN" "Manifest.dtd">

<manifest:manifest xmlns:manifest="http://openoffice.org/2001/manifest">

<manifest:file-entry manifest:media-type="application/vnd.sun.star.configuration-data"

manifest:full-path ="Paths.xcu"/>

<manifest:file-entry manifest:media-type="application/vnd.sun.star.package-bundle-description"

manifest:full-path="description/description_en-US.txt" />

<manifest:file-entry manifest:media-type="application/vnd.sun.star.package-bundle-description;locale=de"

manifest:full-path="description/description_de-DE.txt" />

</manifest:manifest>

Page 11: LibreOffice/OpenOffice.org - non coding extensions

11LibreOffice Paris 2011 Conference - Non coding extensions

Paths.xcu

<?xml version='1.0' encoding='UTF-8'?><oor:component-data oor:package="org.openoffice.Office" oor:name="Paths" xmlns:install="http://openoffice.org/2004/installation" xmlns:oor="http://openoffice.org/2001/registry" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

<node oor:name="Paths"> <node oor:name="Gallery" oor:op="fuse">

<node oor:name="InternalPaths"> <node oor:name="%origin%/gallery" oor:op="fuse"/>

</node></node>

</node></oor:component-data>

Page 12: LibreOffice/OpenOffice.org - non coding extensions

12LibreOffice Paris 2011 Conference - Non coding extensions

description.xml (1 of 2)

<?xml version="1.0" encoding="UTF-8"?>

<description xmlns="http://openoffice.org/extensions/description/2006" xmlns:d="http://openoffice.org/extensions/description/2006"

xmlns:xlink="http://www.w3.org/1999/xlink">

<identifier value="net.sf.ooop.oxygenoffice.accessories" />

<version value="2.8.0.0" />

<dependencies>

<OpenOffice.org-minimal-version value="2.0" d:name="OpenOffice.org 2.0"/>

</dependencies>

<update-information>

<src xlink:href="http://ooop.sourceforge.net/update/extensions.xml" />

</update-information>

<registration>

<simple-license accept-by="admin" default-license-id="en-US" suppress-on-update="true" >

<license-text xlink:href="licenses/license_de-DE.txt" lang="de-DE" />

<license-text xlink:href="licenses/license_en-US.txt" lang="en-US" license-id="en-US" />

</simple-license>

</registration>

Page 13: LibreOffice/OpenOffice.org - non coding extensions

13LibreOffice Paris 2011 Conference - Non coding extensions

description.xml (2 of 2)

<extension-description>

<src xlink:href="description/description_en.txt" lang="en" />

<src xlink:href="description/description_de.txt" lang="de" />

</extension-description>

<release-notes>

<src xlink:href="readme/readme_en.txt" lang="en" />

<src xlink:href="readme/readme_de.txt" lang="de" />

</release-notes>

<publisher>

<name xlink:href="http://ooop.sf.net/" lang="en">OxygenOffice Professional Team</name>

</publisher>

<icon>

<default xlink:href="App1.png" />

</icon>

</description>

Page 14: LibreOffice/OpenOffice.org - non coding extensions

14LibreOffice Paris 2011 Conference - Non coding extensions

Update information

Additional update information on the server<?xml version="1.0" encoding="UTF-8"?><description xmlns="http://openoffice.org/extensions/update/2006" xmlns:xlink="http://www.w3.org/1999/xlink"> <identifier value="net.sf.ooop.oxygenoffice.accessories"/> <version value="2.0" /> <update-download> <src xlink:href="http://ooop.sourceforge.net/download/extension.oxt" /> </update-download></description>

Page 15: LibreOffice/OpenOffice.org - non coding extensions

15LibreOffice Paris 2011 Conference - Non coding extensions

Extension builder scripts

You can build extensions easilyExample scripts

● https://ooop.svn.sourceforge.net/svnroot/ooop/trunk/utils/

Page 16: LibreOffice/OpenOffice.org - non coding extensions

16LibreOffice Paris 2011 Conference - Non coding extensions

Templates: Language (in)dependent

Use common/* directory for language independent templates

● Feature Request: localizable template names in common section

Language dependent templates only visible when the template language = UI language

● Feature Request: language selector @ „Templates and Documents” dialog

Page 17: LibreOffice/OpenOffice.org - non coding extensions

17LibreOffice Paris 2011 Conference - Non coding extensions

Templates: Languages

Paths.xcu● Language independent

– <node oor:name="%origin%/template" oor:op="fuse"/>

– Files under: template/<categories>/ or template/<other_dir>/ using the trick

● Language dependent– <node oor:name="%origin%/template/$(vlang)"

oor:op="fuse"/>– Files under: template/<language id>/<categories>/ or

template/<other_dir>/ using the trick

Page 18: LibreOffice/OpenOffice.org - non coding extensions

18LibreOffice Paris 2011 Conference - Non coding extensions

Templates: Built in categories

officorr → “Business Correspondence”offimisc → “Other Business Documents”personal → “Personal Correspondence and Documents”forms → “Forms and Contracts”finance → “Finances”educate → “Education”layout → “Presentation Backgrounds”presnt → “Presentations”misc → “Miscellaneous”common → “Language independent”

Page 19: LibreOffice/OpenOffice.org - non coding extensions

19LibreOffice Paris 2011 Conference - Non coding extensions

Templates: Small trick

Redefine directory names for templates● Filename: .nametranslation.table

encoding="UTF-8"[TRANSLATIONNAMES]Docs=DokumentációkProj=Projekt tervek

Page 20: LibreOffice/OpenOffice.org - non coding extensions

20LibreOffice Paris 2011 Conference - Non coding extensions

Templates: Missing functionality

SearchTaggingMultiple level subdirs

● Second level sub-directories are simply invisible in LibreOffice

Template name localization● For language independent templates

– For example templates in common/ folder

Page 21: LibreOffice/OpenOffice.org - non coding extensions

21LibreOffice Paris 2011 Conference - Non coding extensions

Galleries: Building it by hand

Embedded elements● Open: Tools → Gallery● Select the object and hold the button until „+” sign

appearor

● Select the object and CTRL+hold the button● Drag it to the gallery

Linked elements● Select theme (in Gallery) → Properties → Files → Add

Page 22: LibreOffice/OpenOffice.org - non coding extensions

22LibreOffice Paris 2011 Conference - Non coding extensions

Galleries: Automated way

Gengal – easy way to add linked gallery elements● Not packed with LibreOffice 3.4 (BUG?)

Dia filter importer● https://fedorahosted.org/openoffice.org-diafilter/

Page 23: LibreOffice/OpenOffice.org - non coding extensions

23LibreOffice Paris 2011 Conference - Non coding extensions

Galleries: Missing functionality

Localization (gallery themes, elements)SearchTaggingXML based files (still using binary files)BUG: Themes with same name override each otherBUG: Linked elements cannot be seen or inserted – wrong path for %origin% variable

Page 24: LibreOffice/OpenOffice.org - non coding extensions

24LibreOffice Paris 2011 Conference - Non coding extensions

Galleries: Localization

Not trivial and not possible without rebuildingGallery code lives in: /svx/

● source/gallery2/galtheme.src● Inc/galtheme.hrc

Useful environment variables● GALLERY_ENABLE_ID_DIALOG – Assign to L10n name● GALLERY_SHOW_PRIVATE_TITLE – L10n name● AVOID_BURN_IN_FOR_GALLERY_THEME – Do not

force color setting (not need in general)No L10n for elements only for themes not for every gallery elements

Page 25: LibreOffice/OpenOffice.org - non coding extensions

25LibreOffice Paris 2011 Conference - Non coding extensions

Setting-override with extension

Two step-by-step guide● http://blogs.oracle.com/kkoll/entry/using_extensions_to_c

hange_openoffice● http://wiki.services.openoffice.org/wiki/Documentation/Ad

ministration_Guide/Deactivating_Registration_Wizard

Page 26: LibreOffice/OpenOffice.org - non coding extensions

26LibreOffice Paris 2011 Conference - Non coding extensions

AutoText & Autocorr

Create the required AutoTexts and Auto CorrectionsCopy

● autotext/<name>.bau or● autocorr/acor_<lang>.dat

to the extension

Page 27: LibreOffice/OpenOffice.org - non coding extensions

27LibreOffice Paris 2011 Conference - Non coding extensions

Deliver extensions to our users

Extensions & Templates site● Currently in beta test stage

– http://extensions-test.libreoffice.org/– http://templates-test.libreoffice.org/

● Need more extensions and templates● Status update about LibreOffice Extensions & Templates

site:– 15th of October, morning, La Cantine:

Status and Future of the LibreOffice Extension and Template Repository by Andreas Mantke

Page 28: LibreOffice/OpenOffice.org - non coding extensions

28LibreOffice Paris 2011 Conference - Non coding extensions

Corporate Extension deployment

Shared folder + login script● Simply copy the extension to the right directory

– Shared: /opt/libreoffice3.4/share/extensions/<EXT>/● CLI

– Shared: unopkg add --shared <EXT>– User: unopkg add <EXT>

Use Tools → Extension manager● User● Shared (run LO as root :o( )

Page 29: LibreOffice/OpenOffice.org - non coding extensions

29LibreOffice Paris 2011 Conference - Non coding extensions

Idea: Distribute templates in Extensions

Provide collection of templates for categories and/or languages

● Templates for (Hungarian) lawyers● Templates for kids● Hungarian templates

„On-the-fly” template extension generation● Users select or search templates (categories, languages,

quality)→ They can download it as an extensionEasier to install for long-term usage Automatic updates

Page 30: LibreOffice/OpenOffice.org - non coding extensions

30LibreOffice Paris 2011 Conference - Non coding extensions

Call for Template Workgroup

Tasks● Create high quality templates● Fix and sort already available templates● Discuss related topics

– „Templates and Documents” dialog redesign● http://wiki.services.openoffice.org/wiki/Feature_-_Templates

– Define categories (they are hardcoded in the source)● LibreOffice brand new template site uses lots more categories

● Unite template creators● Build community around template localization

– Design and build localization workflow for template L10n

● Using dedicated sites or apps like OmegaT

Page 31: LibreOffice/OpenOffice.org - non coding extensions

31LibreOffice Paris 2011 Conference - Non coding extensions

Ideas around templates

Possibility of multi-languages templates● Same layout for every language

– Smart script, or– ODF changes

Store templates in a repository for template development● Using version management (GIT)

– Commit in uncompressed form (flat file)– Store the base template plus the language dependent

content for each language● Or use document management system

Page 32: LibreOffice/OpenOffice.org - non coding extensions

32LibreOffice Paris 2011 Conference - Non coding extensions

An offer (you can't refuse)

Use already collected templates and galleries as a base of further workHuge collection of templates and galleries

https://ooop.svn.sourceforge.net/svnroot/ooop/trunk/extras/source/

Licenses – all files are available under free licenseshttps://ooop.svn.sourceforge.net/svnroot/ooop/trunk/documents/license/

Page 33: LibreOffice/OpenOffice.org - non coding extensions

33LibreOffice Paris 2011 Conference - Non coding extensions

Are you a volunteer?

Review the templates and gallery elementsFix possible problems (design, spelling, etc.)Localize the templatesUpload to our brand new template site

● Still beta: http://templates-test.libreoffice.org/Move the selected templates to a official LibreOffice repositoryDiscuss the best possible solution

Page 34: LibreOffice/OpenOffice.org - non coding extensions

34LibreOffice Paris 2011 Conference - Non coding extensions

Are you a developer?

Fix the bugs and add feature for● Gallery● Templates

Documents and Templates dialog redesign● http://wiki.services.openoffice.org/wiki/Feature_-_Templates

– Rather old page– Let's start the brainstorming again

Page 35: LibreOffice/OpenOffice.org - non coding extensions

35LibreOffice Paris 2011 Conference - Non coding extensions

Links

Extensionshttp://wiki.services.openoffice.org/wiki/Documentation/DevGuide/Extensions/Extensions

Non-code extensionshttp://wiki.services.openoffice.org/wiki/Non-code_extensions

LibreOffice Template & Extensions● http://templates-test.libreoffice.org/● http://extensions-test.libreoffice.org/

Our Templates and Galleries collection → LibreOfficehttps://ooop.svn.sourceforge.net/svnroot/ooop/trunk/extras/source/

Page 36: LibreOffice/OpenOffice.org - non coding extensions

36LibreOffice Paris 2011 Conference - Non coding extensions

Thank you for your attention

Building community around non coding extensions, create and deploy non coding extensions

Any questions, ideas● [email protected]

Kálmán “KAMI” Szalai

LibreOffice ConferenceParis, France14 October, 2011