Monday, July 29, 2019

A better LibreOffice than LibreOffice

Turning LibreOffice users into happy LibreOffice users.

 
After readings and advises from other IT directors, one of my customers and strong supporter of LibreOffice, noticed that just switching programs and teaching user to avoid pitfalls in interoperability is not enough for a smooth migration, and something more than following the migration best practices has to be done for a successful switch. He then asked me to deliver a better LibreOffice than LibreOffice.

Challenge accepted. Together we started to investigate the needs of his organization, a civil company with strong military ties and with significant part of the workforce serving the military. We discovered a set of employees with repetitive tasks, usually performed by reusing old documents and updating them. The straightforward solution was to define a set of document templates and deploy it in the user computers.

But that was not enough. LibreOffice templates are accessed by a bunch of clicks with dialogs navigation, a sequence that needs to be memorized. Besides, templates dialog covers all kind of documents types and more clicks to narrow the selection. There had to be some easier way to get a brand new document from a corporate controlled template. Also, my customer also wanted to let a fingerprint in the solution and he wanted the solution to bear the company logo when user access it, including the high ranked military.

The solution was to create an extension that added a new menu to LibreOffice, specially crafted to address the needs of the workforce and help them do their job as quickly as possible.

So we packed the templates, a Basic macro needed for their document handling in an extension. The Basic macro was used to create a simplified template dialog, allowing a 2-click selection and other internal document handling macros. All new features are accessed from the top menu and a specific toolbar, with icons representing the company brand.

Thanks to the extension mechanism, the “better LibreOffice than LibreOffice” became a reality. The extension used all nice features of versioning, updating, as well as easy of deployment and maintenance. A few days after the news were spread, other departments such as engineering, legal, contracts, human resources and others asked to include their templates into the solution, turning more and more users happy to use LibreOffice.

Happy extensioning!

Monday, April 29, 2019

New Help: Copy BASIC and PYTHON code to Clipboard on a Click

The next release for LibreOffice will have a small but handy improvement for every macro developer, either experienced or beginner.

Hover the mouse on BASIC and Python code in the new Help pages and a tip shows that when you click your mouse, the code exerpt is copied in the system clipboard. You can paste in the BASIC IDE (Integrated Development environment) or any other text application in your system.



With this little feature, you save time of typing the exerpt to test in your IDE or document. Another alternative was to use a collateral file, however, collateral files with embedded macros is likely to trigger security warnings in most LibreOffice installations. Just copying the fragment is easier.

Happy Basic macro programming!
Happy Python macro programming!

Monday, January 14, 2019

Report on the New LIbreOffice Help Pages Online Editor

The Online Help Editor is getting a shape

I have improved and fixed a bit the XHP editor, and changed the page address:

https://newdesign.libreoffice.org/help_editor/index.html

 The editor is still work in progress, but starts to become interesting for creating and editing Help pages.

What's new

  • Mike Saunders implementation of the autocompletion of XHP tags for Codemirror editor.
  • The left and right panes are now fixed in browser screen and scrollable,
  • The right pane uses 99% of the current Help transformation rendering, plus
  • some visual debug information left intentionally to help Author in adjusting <embed>s, <image>s and <link>s . 
  • You can now open a Help page directly from the interface. 
    • The help page is normally source/text/AAA/BBB/myHelpPage.xhp  
    • Type /AAA/BBB/myHelpPage.xhp in the text box and click Open File to load in the editor. 
    • Press Render page to see it on the right. 
  • A set of buttons with XHP snippets to shorten editing workload: 
    • For <paragraph>s, <note>s, <heading>s, <emph>s, <menuitem>s, etc... select the raw text or contents and click the corresponding button. The raw text will be wrapped with the opening and closing tag. For paragraph-like contents, an unique id will be created automatically, a feture required for translations. 
    • Other snippets builds fragments of XHP tags, such as <table>s, <tablerow>, <list>s, <section>s, and more.
    • Just play with and do not forget to render the page on the right. 

Restrictions

  • The editor works with Firefox only. Issues with Chrome and Edge. Other browsers not yet tested.
  • Saving files not implemented. However you can copy the editor contents and finish the patch in you preferred editor
  • More XHP checking are under development, specially id's unicity and DTD checking
  • If you get a blank page on the right, this is because you hit a bug in the browser transformation. Unfortunately debugging the browser transformation is very hard, support is almost none.

Invitation for developers and testers

  • You are invited to test the editor, report bugs and suggest improvements.  
  • The user interface is simple HTML and Javascript. If you have skills in these technologies you are a potential developer for the editor, but we know that PHP will be the right tech choice in near future.  
  • The source code is in the dev-tool repository. 
    • To clone the dev-tool repository : 
    •  git clone https://gerrit.libreoffice.org/dev-tools dev-tools 
    • The editor is in dev-tools/help3/html/ 
  • If you have a web server working in your computer (Apache, Nginx, etc...) you can run the editor locally: create a link between the web server root and the editor. For example, under Debian-like Linux: 
    • sudo cd /var/www/html 
    • sudo ln -s help-editor /dev-tools/help3/html 
    • and point your browser to http://localhost/help-editor 

Seeking Help and discussion on the editor

Please use the documentation list, the developer list and our IRC channels to get in touch with the development of the editor. 

Ackowledgements

The Javascript editor used is CodeMirror and was carefully selected by Mike Saunders who also set the initial confguration for working with XML and our XML dialect XHP, as well as configured the autocompletion features.

The XHP snippets were originally designed for the KDE Kate editor and ported to the online editor.