How to Troubleshoot Apps for the Modern Connected Worker
LibreOffice/OpenOffice.org - non coding extensions
1. Building community around non coding
extensions, create and deploy non coding
extensions
Kálmán “KAMI” Szalai
LibreOffice Conference
Paris, France
14 October, 2011
1
LibreOffice Paris 2011 Conference - Non coding extensions
2. About → Kami
OpenOffice.org contributor since 2003
LibreOffice contributor since 2010
Extension 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/ 2
LibreOffice Paris 2011 Conference - Non coding extensions
3. What is LibreOffice Extension?
Extending LibreOffice capabilities
One file with „.oxt” extension
Easy to install and remove
Effective update mechanism
● Build-in into LibreOffice
Easy entry point for
● Programmers
● Content developers
3
LibreOffice Paris 2011 Conference - Non coding extensions
4. 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
4
LibreOffice Paris 2011 Conference - Non coding extensions
5. 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
5
LibreOffice Paris 2011 Conference - Non coding extensions
6. Type of Extensions
There are two types of extensions
● Code extension
● Non-coding extensions
6
LibreOffice Paris 2011 Conference - Non coding extensions
7. 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
7
LibreOffice Paris 2011 Conference - Non coding extensions
8. Non-coding extensions
Contains Open Document Format files or special
LibreOffice files:
● Templates („.ott”, „.ots”, „.otp”, „.otd”)
● Dictionaries
● Galleries
● AutoCorrect
● AutoTexts
● Databases
● Settings
8
LibreOffice Paris 2011 Conference - Non coding extensions
9. Structure of extensions
„.oxt” files are ZIP files
Structured set of files and directories
● META-INF/manifest.xml
● description/*
● licenses/*
● readmes/*
● Paths.xcu
● description.xml
● gallery/*, autotext/*, template/*
9
LibreOffice Paris 2011 Conference - Non coding extensions
14. 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>
14
LibreOffice Paris 2011 Conference - Non coding extensions
15. Extension builder scripts
You can build extensions easily
Example scripts
● https://ooop.svn.sourceforge.net/svnroot/ooop/trunk/utils/
15
LibreOffice Paris 2011 Conference - Non coding extensions
16. 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
16
LibreOffice Paris 2011 Conference - Non coding extensions
17. 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
17
LibreOffice Paris 2011 Conference - Non coding extensions
18. 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”
18
LibreOffice Paris 2011 Conference - Non coding extensions
19. Templates: Small trick
Redefine directory names for templates
● Filename: .nametranslation.table
encoding="UTF-8"
[TRANSLATIONNAMES]
Docs=Dokumentációk
Proj=Projekt tervek
19
LibreOffice Paris 2011 Conference - Non coding extensions
20. Templates: Missing functionality
Search
Tagging
Multiple level subdirs
● Second level sub-directories are simply invisible in
LibreOffice
Template name localization
● For language independent templates
– For example templates in common/ folder
20
LibreOffice Paris 2011 Conference - Non coding extensions
21. Galleries: Building it by hand
Embedded elements
● Open: Tools → Gallery
● Select the object and hold the button until „+” sign
appear
or
● Select the object and CTRL+hold the button
● Drag it to the gallery
Linked elements
● Select theme (in Gallery) → Properties → Files → Add
21
LibreOffice Paris 2011 Conference - Non coding extensions
22. 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/
22
LibreOffice Paris 2011 Conference - Non coding extensions
23. Galleries: Missing functionality
Localization (gallery themes, elements)
Search
Tagging
XML based files (still using binary files)
BUG: Themes with same name override each other
BUG: Linked elements cannot be seen or inserted – wrong
path for %origin% variable
23
LibreOffice Paris 2011 Conference - Non coding extensions
24. Galleries: Localization
Not trivial and not possible without rebuilding
Gallery 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
24
LibreOffice Paris 2011 Conference - Non coding extensions
25. 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
25
LibreOffice Paris 2011 Conference - Non coding extensions
26. AutoText & Autocorr
Create the required AutoTexts and Auto Corrections
Copy
● autotext/<name>.bau or
● autocorr/acor_<lang>.dat
to the extension
26
LibreOffice Paris 2011 Conference - Non coding extensions
27. 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
27
LibreOffice Paris 2011 Conference - Non coding extensions
28. 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( )
28
LibreOffice Paris 2011 Conference - Non coding extensions
29. 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 extension
Easier to install for long-term usage
Automatic updates
29
LibreOffice Paris 2011 Conference - Non coding extensions
30. 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
30
LibreOffice Paris 2011 Conference - Non coding extensions
31. 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
31
LibreOffice Paris 2011 Conference - Non coding extensions
32. An offer (you can't refuse)
Use already collected templates and galleries as a base of
further work
Huge collection of templates and galleries
https://ooop.svn.sourceforge.net/svnroot/ooop/trunk/extras/source/
Licenses – all files are available under free licenses
https://ooop.svn.sourceforge.net/svnroot/ooop/trunk/documents/license/
32
LibreOffice Paris 2011 Conference - Non coding extensions
33. Are you a volunteer?
Review the templates and gallery elements
Fix possible problems (design, spelling, etc.)
Localize the templates
Upload to our brand new template site
● Still beta: http://templates-test.libreoffice.org/
Move the selected templates to a official LibreOffice
repository
Discuss the best possible solution
33
LibreOffice Paris 2011 Conference - Non coding extensions
34. 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
34
LibreOffice Paris 2011 Conference - Non coding extensions
36. Thank you for your attention
Building community around non coding extensions, create
and deploy non coding extensions
Any questions, ideas
● kami911@gmail.com
Kálmán “KAMI” Szalai
LibreOffice Conference
Paris, France
14 October, 2011
36
LibreOffice Paris 2011 Conference - Non coding extensions