Documentation
Ce document en français.
The use of this software subjects you to our Terms Of Use and Data Protection Policy.
Introduction:
gDriveOOo is part of a Suite of LibreOffice and/or OpenOffice extensions allowing to offer you innovative services in these office suites.
This extension allows you to work in LibreOffice on your files on your phone (files that you have downloaded to your Android phone), even while offline.
It uses Google Drive API to synchronize your remote Google Drive files with the help of a local HsqlDB 2.7.2 database.
This extension is seen by LibreOffice as a Content Provider responding to the URL: vnd-google://*
.
Being free software I encourage you:
- To duplicate its source code.
- To make changes, corrections, improvements.
- To open issue if needed.
In short, to participate in the development of this extension.
Because it is together that we can make Free Software smarter.
Requirement:
The gDriveOOo extension uses the OAuth2OOo extension to work.
It must therefore meet the requirement of the OAuth2OOo extension.
The gDriveOOo extension uses the jdbcDriverOOo extension to work.
It must therefore meet the requirement of the jdbcDriverOOo extension.
Additionally, gDriveOOo requires the jdbcDriverOOo extension to be configured to provide com.sun.star.sdb
as the API level, which is the default configuration.
Installation:
It seems important that the file was not renamed when it was downloaded.
If necessary, rename it before installing it.
-
Install OAuth2OOo.oxt extension 
You must first install this extension, if it is not already installed.
-
Install jdbcDriverOOo.oxt extension 
You must install this extension, if it is not already installed.
-
Install gDriveOOo.oxt extension 
Restart LibreOffice after installation.
Be careful, restarting LibreOffice may not be enough.
-
On Windows to ensure that LibreOffice restarts correctly, use Windows Task Manager to verify that no LibreOffice services are visible after LibreOffice shuts down (and kill it if so).
-
Under Linux or macOS you can also ensure that LibreOffice restarts correctly, by launching it from a terminal with the command
soffice
and using the key combination Ctrl + C
if after stopping LibreOffice, the terminal is not active (no command prompt).
Use:
Open your Google Drive:
In File -> Open enter in the first drop-down list:
- For a named Url: vnd-google://your_account@gmail.com
or
- For an unnamed Url (anonymous): vnd-google:///
And validate not by the Open button but by the Enter key.
If you don’t give your_account@gmail.com, you will be asked for…
Anonymous Urls allow you to remain anonymous (your account does not appear in the Url) while named Urls allow you to access several accounts simultaneously.
After authorizing the OAuth2OOo application to access your Drive files, your Google Drive should open!!! normally 
In order to be able to keep using system dialog windows for opening and saving files in LibreOffice, it is now possible to create custom menus for the commands: Open Remote and Save Remote.
In the Menu tab of the Tools -> Customize window, select Macros in Category to access the two macros: OpenRemote
and SaveRemote
under: My Macros -> gDriveOOo.
You will first need to add the OpenRemote
macro to one of the menus with the Scope set to LibreOffice, then you will need to open the applications (Writer, Calc, Draw…) possibly using a new document, and add the OpenRemote
and SaveRemote
macros with the Scope set to the application you want to add the menus to.
The OpenRemote
macro supports any type of Scope, while the SaveRemote
macro should only be assigned to application-type scopes because it requires a document to already be open in LibreOffice.
This only needs to be done once for LibreOffice and each application, and unfortunately I haven’t found anything simpler yet.
How to build the extension:
Normally, the extension is created with Eclipse for Java and LOEclipse. To work around Eclipse, I modified LOEclipse to allow the extension to be created with Apache Ant.
To create the gDriveOOo extension with the help of Apache Ant, you need to:
- Install the Java SDK version 8 or higher.
- Install Apache Ant version 1.10.0 or higher.
- Install LibreOffice and its SDK version 7.x or higher.
- Clone the gDriveOOo repository on GitHub into a folder.
- From this folder, move to the directory:
source/gDriveOOo/
- In this directory, edit the file:
build.properties
so that the office.install.dir
and sdk.dir
properties point to the folders where LibreOffice and its SDK were installed, respectively.
- Start the archive creation process using the command:
ant
- You will find the generated archive in the subfolder:
dist/
Has been tested with:
-
LibreOffice 7.3.7.2 - Lubuntu 22.04 - Python version 3.10.12
-
LibreOffice 7.5.4.2(x86) - Windows 10 - Python version 3.8.16 (under Lubuntu 22.04 / VirtualBox 6.1.38)
-
LibreOffice 7.4.3.2(x64) - Windows 10(x64) - Python version 3.8.15 (under Lubuntu 22.04 / VirtualBox 6.1.38)
-
LibreOffice 24.8.0.3 (x86_64) - Windows 10(x64) - Python version 3.9.19 (under Lubuntu 22.04 / VirtualBox 6.1.38)
-
Does not work with OpenOffice see bug 128569. Having no solution, I encourage you to install LibreOffice.
I encourage you in case of problem 
to create an issue
I will try to solve it 
Historical:
What has been done for version 0.0.5:
-
Integration and use of the new HsqlDB v2.5.1 system versioning.
-
Writing of a new Replicator interface, launched in the background (python Thread) responsible for:
-
Perform the necessary procedures when creating a new user (initial Pull).
-
Carry out pulls regularly (every ten minutes) in order to synchronize any external changes (Pull all changes).
-
Replicate on demand all changes to the hsqldb 2.5.1 database using system versioning (Push all changes).
-
Writing of a new DataBase interface, responsible for making all calls to the database.
-
Setting up a cache on the Identifiers, see method: _getUser(), allowing access to a Content (file or folder) without access to the database for subsequent calls.
-
Management of duplicate file/folder names by SQL Views: Child, Twin, Uri, and Title generating unique names if duplicates names exist.
Although this functionality is only needed for gDriveOOo, it is implemented globally…
-
Many other fix…
What has been done for version 0.0.6:
-
Using new scheme: vnd-google:// as claimed by draft-king-vnd-urlscheme-03.txt
- Achievement of handling duplicate file/folder names by SQL views in HsqlDB:
- A Twin view grouping all the duplicates by parent folder and ordering them by creation date, modification date.
- A Uri view generating unique indexes for each duplicate.
- A Title view generating unique names for each duplicate.
- A recursive view Path to generate a unique path for each file / folder.
-
Creation of a Provider able to respond to the two types of Urls supported (named and anonymous).
Regular expressions (regex), declared in the UCB configuration file, are now used by OpenOffice/LibreOffice to send URLs to the appropriate ContentProvider.
-
Use of the new UNO struct DateTimeWithTimezone provided by the extension jdbcDriverOOo since its version 0.0.4.
Although this struct already exists in LibreOffice, its creation was necessary in order to remain compatible with OpenOffice (see Enhancement Request 128560).
- Modification of the Replicator interface, in order to allow:
- To choose the data synchronization order (local first then remote or vice versa).
- Synchronization of local changes by atomic operations performed in chronological order to fully support offline work.
To do this, three SQL procedures GetPushItems, GetPushProperties and UpdatePushItems are used for each user who has accessed his files / folders.
- Rewrite of the options window accessible by: Tools -> Options -> Internet -> gDriveOOo in order to allow:
- Access to the two log files concerning the activities of the UCP and the data replicator.
- Choice of synchronization order.
- The modification of the interval between two synchronizations.
- Access to the underlying HsqlDB 2.7.2 database managing your Google Drive metadata.
-
The presence or absence of a trailing slash in the Url is now supported.
- Many other fix…
What has been done for version 1.0.1:
What has been done for version 1.0.2:
What has been done for version 1.0.3:
- Support for version 1.2.0 of the OAuth2OOo extension. Previous versions will not work with OAuth2OOo extension 1.2.0 or higher.
What has been done for version 1.0.4:
- Support for version 1.2.1 of the OAuth2OOo extension. Previous versions will not work with OAuth2OOo extension 1.2.1 or higher.
What has been done for version 1.0.5:
- Support for version 1.2.3 of the OAuth2OOo extension. Fixed issue #12.
What has been done for version 1.0.6:
- Support for version 1.2.4 of the OAuth2OOo extension. Many issues resolved.
What has been done for version 1.0.7:
- Now use Python dateutil package to convert to UNO DateTime.
What has been done for version 1.1.0:
- All Python packages necessary for the extension are now recorded in a requirements.txt file following PEP 508.
- Now if you are not on Windows then the Python packages necessary for the extension can be easily installed with the command:
pip install requirements.txt
- Modification of the Requirement section.
What has been done for version 1.1.1:
- Fixed a regression preventing the creation of new files.
- Integration of a fix to workaround the issue #159988.
What has been done for version 1.1.2:
- The creation of the database, during the first connection, uses the UNO API offered by the jdbcDriverOOo extension since version 1.3.2. This makes it possible to record all the information necessary for creating the database in 6 text tables which are in fact 6 csv files.
- Rewriting the SQL views necessary for managing duplicates. Now a folder or file’s path is calculated by a recursive view that supports duplicates.
- Although the extension supports handling duplicate files and folder, it is no longer possible to create or rename them.
- Installing the extension will disable the option to create a backup copy (ie: .bak file) in LibreOffice. If this option is validated then the extension is no longer capable of saving files.
- The extension will ask you to install the OAuth2OOo and jdbcDriverOOo extensions in versions 1.3.4 and 1.3.2 respectively minimum.
- Many fixes.
What has been done for version 1.1.3:
What has been done for version 1.1.4:
- Updated the Python setuptools package to version 73.0.1.
- The extension will ask you to install the OAuth2OOo and jdbcDriverOOo extensions in versions 1.3.7 and 1.4.5 respectively minimum.
- Changes to extension options that require a restart of LibreOffice will result in a message being displayed.
- Support for LibreOffice version 24.8.x.
What has been done for version 1.1.5:
- Disabling data replication in the extension options will display an explicit message in the replicator log.
- The extension will ask you to install the OAuth2OOo and jdbcDriverOOo extensions in versions 1.3.8 and 1.4.6 respectively minimum.
- Modification of the extension options accessible via: Tools -> Options… -> Internet -> gDriveOOo in order to comply with the new graphic charter.
What has been done for version 1.1.6:
- In order to meet the request of issue #16, the management of the Shared with me folder has been implemented.
- Preparation of the extension to the use of a more restricted scope of rights and not requiring the Casa tier 2 certification which is now chargeable. Thanks Google…
- Remote modifications of the contents of the files are taken into account by the replicator.
- If necessary, it is possible to request an initial synchronization in the extension options. It is also possible to request the download of all files already viewed that have a local copy.
- The replicator provides more comprehensive logging.
- Shared folders are now recognizable by their icon.
- Many fixes.
What has been done for version 1.2.0:
- The extension will ask you to install the OAuth2OOo and jdbcDriverOOo extensions in versions 1.4.0 and 1.4.6 respectively minimum.
- It is possible to build the extension archive (ie: the oxt file) with the Apache Ant utility and the build.xml script file.
- The extension will refuse to install under OpenOffice regardless of version or LibreOffice other than 7.x or higher.
- Added binaries needed for Python libraries to work on Linux and LibreOffice 24.8 (ie: Python 3.9).
- The ability to not specify the user’s account name in the URL is working again.
What has been done for version 1.2.1:
What has been done for version 1.3.0:
- Updated the Python packaging package to version 25.0.
- Downgrade the Python setuptools package to version 75.3.2. to ensure support for Python 3.8.
- Passive registration deployment that allows for much faster installation of extensions and differentiation of registered UNO services from those provided by a Java or Python implementation. This passive registration is provided by the LOEclipse extension via PR#152 and PR#157.
- Modified LOEclipse to support the new
rdb
file format produced by the unoidl-write
compilation utility. idl
files have been updated to support both available compilation tools: idlc and unoidl-write.
- It is now possible to build the oxt file of the gDriveOOo extension only with the help of Apache Ant and a copy of the GitHub repository. The How to build the extension section has been added to the documentation.
- Implemented PEP 570 in logging to support unique multiple arguments.
- To ensure the correct creation of the gDriveOOo database, it will be checked that the jdbcDriverOOo extension has
com.sun.star.sdb
as API level.
- Wrote two macros
OpenRemote
and SaveRemote
to create custom menus and be able to keep the system dialog window for opening and saving files in LibreOffice. To make it easier to create these custom menus, the section How to customize LibreOffice menus has been added to the documentation.
- Requires the jdbcDriverOOo extension at least version 1.5.0.
- Requires the OAuth2OOo extension at least version 1.5.0.
What remains to be done for version 1.3.0: