The Free Software Conference 2012 -- orginized by FSF.hu -- was held today @
Budapest. I gave a talk about hacking on new Writer features
(slides).
We (with Andras) also ran the LibreOffice booth, and in idle cycles I also had
time to kill
this
annoying bug. This year speakers got a t-shirt and a fine lunch, thanks for
the organizers! :)
During the weekend I was in Munich to visit our second LibreOffice hackfest
this year. The archivements are detailed
here. Here
are a few interestings details I learned during this event:
Laszlo explained on the train to Munich that single line spacing is 15% of
the font size, by definition. That finally explains why it is that the height
of a 12pt single-line paragraph in Writer is not 240 but 276 twips.
Finally Michael motivated (and also helped!) me to improve the copy&paste in
the new RTF filter, so it seems that removing the old filter completely is
near.
The ability to sign each other's gpg key was a great idea. I didn't know too
much about this topic, so I read up on this
here. (Additionally, the
gpg-key2ps command from signing-party -- yes, there is such a package! --
is useful.)
We set up a nice icecream farm from the laptops, one more aspect that boosted
our productivity.
Speaking about icecream -- there were two reasons why I didn't really use it:
it required re-configuring your build tree (--enable-icecream)
it required shutting down your firewall
It turns out none of this is really needed, so let me share the way to avoid
these problems:
look into the
wiki, you only need to open a few ports, even broadcasting/auto-discovery works with a started firewall
use CCACHE_PREFIX="icecc" make build-nocheck PARALLELISM=30 to enable icecream for a single make run
Additionally, if you run openSUSE 12.2, by default the daemon reports that the
box can't compile x86_64 binaries (probably it hasn't been updated to deal with
the 3.0 kernel or something), a quick workaround is to install Lubos' updated
package:
It's possible you noticed that in each LibreOffice release notes, we have a
line saying something like "improved DOCX support", but is rarely explained in
detail. I'm posting here a few screenshots to correct this. The first series is
a list of import fixes which are already available in our shipping 3.6 release.
In each case I provide a test document, and a screenshot how it looked like
with LibreOffice 3.3 and how it looks like with LibreOffice 3.6 today. Click on
the images to get a larger image:
If you want to try these out yourself, get a
daily build and play with it! :) If
something goes wrong, report it to us in the
Bugzilla, so we can try fix it
before 4.0 is released. And remember, there are lots more improvements
coming in LibreOffice 4.0,
stay tuned!
It all started with this
bugreport about a year ago. RTF has two different markups to describe shapes.
The old one (used till Word 6.0) is called Drawing Objects, the new one talks
about Shapes. The first picture shows the "support" for this syntax in
LibreOffice 3.4, and the situation did not change with my RTF import rework, as
I wasn't aware of any document still using this old syntax. So when I got this
bugreport, I knew it'll take some time to produce the correct layout, but now
during the LibreOffice conference I spent quite some time on this, and at the
end even the Hebrew text is imported correctly. ;-)
Thanks to Lior who politely nagged me from time to time, this is now available
on master (see the second picture), which will become LibreOffice 4.0.
When you want to have pages with different properties in Writer, you use page
styles. If you want to do something similar in Word, you have to use sections.
One of the benefits of page styles is that you can use them multiple times, and
-- as usual with styles -- whenever you change your mind, you can edit just the
style, and all its uses will be updated consistently. There is, however, one
feature that Word sections have and we lacked so far: sections can have
different headers and footers on first, left and right pages. In Writer, you
had to use two different page styles if you wanted to achieve the same:
typically named "First page", then a "Default". This was because Writer could
differentiate only between right and left pages, not first ones.
In LibreOffice 3.7, there will be a new checkbox to "unshare" the header and
footer of the first page with right/left pages:
Right now, only ODF filters are updated to open / save this feature (as
suggested by this old
proposal) -- in later versions it's planned to update the DOCX, DOC and RTF
filters as well, removing quite some code from import filters working around
this limitation of Writer core.
More than 10 years ago, a bug was
opened in the OpenOffice.org bugzilla to support this feature. Later this got
imported to LibreOffice's
bugtracker. Now that LibreOffice 3.6 is out, time to talk more about what
features will show up in 3.7, and this will be one of them:
Now that it's there, let's have a look at the details:
ODF 1.2 already
supports
commenting text ranges, but LibreOffice support was missing.
Word already supported it as well, and now LibreOffice RTF/DOCX import/export filters are updated to take care of the new feature.
If I was already messing with comments, I also implemented roundtrip of
comment author initials to ODF (see
proposal), so now if
you open a DOCX/RTF file in LibreOffice, save it as ODF, and later save it back
to DOCX/RTF, this information won't be lost.
Finally, one known limitation is that the text range currently can't include
multiple paragraphs -- something to improve later if necessary.
You may remember that LibreOffice 3.5 learned to
import
RTF OLE objects (including math expressions) in Writer. In LibreOffice 3.7, the same is now true for math expressions expressed using native RTF math markup:
If you are interested in the details, then the nice thing about this
implementation is that:
The importer internally turns RTF markup to OOXML tokens, and that does the hard job.
The non-XML-specific part of the existing OOXML export was abstracted to a
base class, and that's the driver of the RTF exporter.
So if you like this new feature, don't forget to thank Luboš Luňák, who is the
author of the OOXML math import/export. :-) In case you way to play with this
feature, test documents are
available.
Note that just like in Impress, Writer produces far from perfect result if the
prerendered output of the diagram is not present in the document. In practice,
we can open files produced by Word 2010 just fine, but problems with Word 2007
are expected.
In case you way to play with this feature, a test document is
available.
The Hungarian Linux in the Education Conference 2012 was held today @ Budapest,
I held a generic session about LibreOffice
(slides), also talked a few
guys into submitting Easy Hacks. ;)
Other interesting stuff: a free
Logo interpreter
in PyUNO by Laszlo, available here.
We were in Hamburg during this weekend, and I think all of us had great
fun, kudos go to the organizers! If you are curious, here are the topics I
worked on besides mentoring when I was asked to do so: