Firebird’s Dialects

After spending some time trying to figure out why firebird didn’t like quoted identifiers I discovered that I had missed that the database supports multiple sql “dialects” (quoted identifiers are needed e.g. in ‘CREATE TABLE “aTableName”….’ — Base uses quoted identifiers everywhere in fact — previously quotation marks were replaced with spaces which was a somewhat ugly/wrong solution to the problem). These dialects are:

  • 1: The original dialect for IB5.5 and earlier which doesn’t supported quote identifiers, the various sql date/time types etc.
  • 3: The dialect for IB6 and newer which supports quoted identifiers, various sql date/time types etc.

Previously dialect 1 had been in use, and I had no clue that this was the issue. As part of the journey towards discovering this I did however manage to add support for passing usernames/password to firebird (although this is unused so far — remote db support still needs to be added, but only really involves parsing a connection string — embedded dbs are accessed without usernames and passwords), some of the database metadata definitions were also cleaned up/implemented.

In other news, the sdbc driver can now list the names of all the columns in a table except for the first column. It doesn’t seem to be an off-by-one error as the methods to get column names are all called and return data as expected — but it definitely is a bug somewhere in the driver.

Tagged with: , , ,
Posted in GSOC2013, LibreOffice

Firebird now in master

Firebird has now been integrated into LibreOffice master!

It now builds on Mac and Windows in addition to Linux. (I’ve only tested on Linux but will be testing/fixing  as necessary on Mac/Windows this week.)

The database driver itself is almost unusable at the moment as I’ve been refactoring various things to do with transaction control and execution of statements. More and more functionality should be appearing in the course of this week, making the driver more usable .

For now hsqldb will still be the default embedded db. To use firebird for embedded files you either have to set EmbeddedDatabases/DefaultEmbeddedDatabase/Value in the registry to “sdbc:embedded:firebird”; or create a new .odb file with base, edit the content.xml within and replace “sdbc:embedded:hsqldb” with “sdbc:embedded:firebird”, then reopen the .odb. At the moment the driver can only work with databases embedded in the .odb; support for external and/or remote databases however doesn’t look particularly complicated so should hopefully appear soon.

Tagged with: , , ,
Posted in GSOC2013, LibreOffice

Embedded Firebird now working

The embedded firebird driver can now create new .odb’s using firebird, and open and save existing files — when running the firebird db is stored in a temporary file, this is copied into the .odb file every time it is saved — and extracted as necessary on startup. The sdbc driver is still somewhat incomplete meaning that this isn’t particularly usable yet, however in principle LO can now use Firebird as it’s embedded Database. This means I can now work on the actual sdbc driver!

Odb with embedded firebird db

Firebird .ODB

Currently it is only usable on Linux: Windows compiles but crashes — I’ll be setting up a debug build to run over the weekend meaning I should hopefully be able to debug at the beginning of next week. Mac is currently not buildable — it looks like fixing this shouldn’t be too difficult though, I’ve managed to obtain a mac which I’ll be setting up soon in order to work on this.

The sdbc driver won’t be exclusive to embedded firebird — it should eventually be able to also support external firebird database files, and even connect to remote firebird servers — this should be only a very small amount of work, mostly to do with the gui needed to set up a connection.


Tagged with: , , ,
Posted in GSOC2013, LibreOffice

Firebird building within LO

Things have been taking slighty longer than expected with the first stage of the Firebird integration project, I have however finally gotten Firebird building within LibreOffice both on Linux and Windows (Mac OS still to be tested).

Firebird (2.5) is officially only supported using MSVS 7 or 8 on Windows, however LibreOffice should support 10 (2010) or 11 (2011), hence I had to do some work patching Firebird to compile within the LibreOffice build system. This now works and LibreOffice build successfully — unfortunately the sdbc driver itself now crashes on Windows, which will need fixing.

I’m now starting to look at the SDBC driver itself (which Javier Fernandez and Andres Gomez of Igalia originally started writing) as well as looking at how to have the firebird db stored within the .odb file itself (the driver currently assumes a db in a temp. directory). Whereas HSQLDB writes directly to the .odb, for Firebird — at least initially — the database file will be stored externally and extracted from / written into the .odb file as appropriate. Ideally the driver would be able to deal both with having a completely separate db file, and having the db within the .odb — it looks like this should not be particularly difficult to implement.

Tagged with: , , ,
Posted in GSOC2013, LibreOffice

GSOC 2013: LibreOffice Firebird SQL Connector

Yesterday I found out that I’d been accepted into the Google Summer of Code 2013 to work on LibreOffice! Many thanks to the Mentors for accepting me!

My project involves implementing an SDBC driver for the Firbird SQL Database for LO Base, with a view to having this replace the current default of HSQLDB, which depends on Java, meaning that Java could the eventually be removed as a fixed dependency for full LibreOffice functionality. Further to this I’d also be looking at migratiom of files from HSQLDB to Firebird, and also implementing some unit tests for the database functionality, something that has been previously been missing from LO Base. (Currently .odb files use HSQLDB for their internal database, although it is also possible to use other external databases — this connector would mean that future .odb files would use Firebird internally.) There are a number of other developers who are also working on this at the moment, meaning development should be fast and exciting!

I’m currently concentrating on exams which finish at the end of the next week, after which I’ll be free to work on this full time. I’ll also be continuing with the Firefox OS Impress Remote which I started work on some time ago (but this will be completely independent of the GSOC). I now have a Firefox Phone meaning I can get on to testing things on actual hardware, and have also been doing some experimentation on implementing the UI using jQuery mobile, meaning something testable/usable isn’t too far away.

Continuing on from my GSOC project last year, there are two fellow students working on the Impress Remote this summer: Artur Dryomov will be working improving the Impress Remote / Current app, Siqi Liu will be working on an iOS version of the remote app.

Tagged with: , , ,
Posted in GSOC2013, LibreOffice

Some Find Bar Improvements

The LibreOffice Find Bar has gained “Match Case” and “Find All” buttons to match the functionality of it’s Firefox Equivalent:

LibreOffice Find Bar

The “Match Case” checkbox has made it into 4.1, I’m not sure whether the “Find All” will make it as it was created after the deadline for including new features in 4.1.

I’m also working on a slight bug affecting the up/down search in the find bar where the search “gets stuck” when changing search direction.

Tagged with: , ,
Posted in LibreOffice

Impress Remote for Firefox OS — Proof of Concept

I’ve started working on a version of the Impress Remote for Firefox OS. It currently only supports using TCP (i.e. Wifi or wired network), I’m going to start working on adding Bluetooth support once I get hold of some suitable hardware, probably later this month.

Most of the backend has been done, and a basic app exists:

I’m now starting to work on a proper User Interface which will be based on that of the Android Impress Remote.

Tagged with: , , ,
Posted in FirefoxOS, LibreOffice

Impress Remote first icon

More good news: the Libreoffice Design Team has come up with a first prototype icon for the remote (I hear they are working on further versions) — here’s a screenshot in context:

Most of the development recently has been on improving the general reliability, stability and usability of the app. It’s looking highly likely that the first official release will be as part of Libreoffice 3.7 which arrives in November.

Tagged with: , , , ,
Posted in GSOC2012, LibreOffice

Bluetooth on Windows for Impress Remote

Windows users will be glad to know that Impress Remote now supports bluetooth on windows, albeit only using the Microsoft Bluetooth Stack, and not (at least for the moment) any of the other stacks. I am however looking into adding support for the Widcomm stack, and maybe even the Bluesoleil stack. Control over wifi/network also works on windows now.

(I believe that Mac bluetooth support is also being worked on, although I currently can’t give any more information on that. Due to a lack of a Mac I can’t really work on that. I believe that control over Wifi/Network works, but haven’t personally tested that yet.)

In further news: the app is continually improving, and becoming more usable. On Friday I finally managed to fix a bug causing a flickering/endless looping when slides were changed too vigorously. I’m now trying to iron out other niggles as well as make the user interface look the way it should.

Posted in GSOC2012, LibreOffice

Bluetooth in Impress Remote

The Impress Remote Control now supports bluetooth, albeit currently only on Linux machines. I’m going to be adding windows support as soon as the bluetooth dongle for my windows desktop arrives. In the meantime I’ve been working on a bit of cleanup, and have also added the option of manually adding servers for connection (e.g. in case discovery fails for whatever reason):

In addition to that the app now automatically detects when it’s on an emulator, meaning it can also be tested almost fully on the emulator.

Tagged with: , ,
Posted in GSOC2012, LibreOffice