The idea of additions is to better integrate extensions. On various places it should be possible to get more content from external storage. It is an “addition” as it rather provides presets than extensions like macros or templates; but the procedure behind might be similar.
On various places it should be possible to get more content such as macros or templates from external storage. This requirement is now fulfilled with the Additions Dialog.
Before the Additions Dialog
Go extensions.libreoffice.org and search what you want to install.
Open the Extension Manager and click Add button.
Select the file to install it.
After the Additions Dialog
Just need to write name of the extension and click install button.
Extensions can be
- sorted according to their comments number, rating and download number
- installed using by threads to prevent congestion
Glade is used to design the Additions Dialog.
cURL is used to establish the connection between the dialog and the API.
Installation is performed by the Extension Manager class functions.
Sorting is performed by the C++ standard sort function(std::sort). There are 3 types of sorting for extensions:
- Download Number
- Comment Number
How to add shortcut from other dialogs
The only thing should do is adding uno command with a parameter.
Example for template dialog with C++
uno::Sequence<beans::PropertyValue> aArgs(1); aArgs.Name = "AdditionsTag"; aArgs.Value <<= OUString("Templates"); comphelper::dispatchCommand(".uno:AdditionsDialog", aArgs);
Detailed code: https://gerrit.libreoffice.org/c/core/+/99339
How to work
First, information about all of the extensions are gotten by the cURL GET call. After this process, images of the extensions are downloaded to local folder via cURL download function using by a new Thread. The aim of the using new thread is increasing user experience without any congestion or error. At end of the downloads, user can see the extensions on the list. First, all extensions are sorted by their download numbers. If user search anything, a new cURL request is not called. The search process is done on the client side using by C++ standard sort function(std::sort). When the user press the install button, file of the extension is downloaded by cURL. When the download is done, an Extension Manager class function, addExtension, is called. After the installation, install button of the extension is disabled. Therefore, user can easily understand whether the installation is finished or not.
(sorted by date) https://gerrit.libreoffice.org/c/core/+/95593 https://gerrit.libreoffice.org/c/core/+/98226 https://gerrit.libreoffice.org/c/core/+/98554 https://gerrit.libreoffice.org/c/core/+/99250 https://gerrit.libreoffice.org/c/core/+/99338 https://gerrit.libreoffice.org/c/core/+/99388 https://gerrit.libreoffice.org/c/core/+/99809 https://gerrit.libreoffice.org/c/core/+/100449 https://gerrit.libreoffice.org/c/core/+/99007 https://gerrit.libreoffice.org/c/core/+/100340 https://gerrit.libreoffice.org/c/core/+/100778 https://gerrit.libreoffice.org/c/core/+/100657 https://gerrit.libreoffice.org/c/core/+/100714 https://gerrit.libreoffice.org/c/core/+/101013 https://gerrit.libreoffice.org/c/core/+/101297 https://gerrit.libreoffice.org/c/core/+/101097 https://gerrit.libreoffice.org/c/core/+/101433 https://gerrit.libreoffice.org/c/core/+/101537
I would like to thank all the LibreOffice committee, especially my mentors Muhammet Kara and Heiko Tietze. I learned a lot of things during the GSoC. Although GSoC is finished, I will continue to contribute to LibreOffice. I am very happy to be part of the LibreOffice community. Thank you all for giving me this opportunity.