vmiklos.hu
shameless self-promoting website
»Root
»Rejourn root
»LibreOffice Community Blogs
Search:
Tags:
»hu (1201)
»en (541)
»hacking (416)
»film (286)
»libreoffice (92)
»geek (82)
»bringa (60)
»konyv (44)
»misc (37)
»zene (32)
»munka (28)
»fun (27)
»frugalware (23)
»sieles (7)
»bitlbee (5)
»gsoc2009 (4)
»git (3)
»szinhaz (3)
»gsoc2008 (3)
»opensuse (3)
»gsoc2011 (2)
»go-oo (2)
»kde (1)
»libwpd (1)
»karacsony (1)
»upc (1)
»google (1)
»fail (1)
»openstack (1)
»mdadm (1)
»w3c (1)
»java (1)
»greasemonkey (1)
»auto (1)
»otrs (1)
»gsoc2010 (1)
»bme (1)
»python (1)
»howto (1)
»openoffice (1)
»networking (1)
»gpsbabel (1)
»supybot (1)
»lcov (1)
»nyaralas (1)
  • Sunday, 31 January 2016
    Mail merge embedding in LibreOffice Writer FOSDEM talk (Comments)

    Yesterday I gave a Mail merge embedding in LibreOffice Writer talk at FOSDEM 2016, in the Open document editors developer room. The room was well-crowded — seems this year LibreOffice Online was a hot topic. ;-)

    We also had a hackfest with about 20 hackers attending, (again) kindly hosted by Betacowork on Thursday and Friday, before FOSDEM.

    There were a few topics I hacked on:

    • .uno:Paste AnchorType param for Writer

    • tdf#97371 DOCX import regression fix about TextBoxes

    • tdf#96175 RTF export feature about company doc property

    • refactoring around Writer’s new (in 5.1) hide-whitespace feature, as requested by Ashod

    • code coverage: RtfExport::WriteRevTab() was completely untested previously, now fixed

    A full list of achievements is available, if you were at the hackfest and you did not contribute to that section, please write a line about what did you hack on. :-)

    Quite some other slides are now available on Planet, don’t miss them.


  • Tuesday, 12 January 2016
    RTF page background export in LibreOffice Writer (Comments)

    While I added support for page background colors in the RTF import back in 2013, the export part was missing up to now.

    If you set a solid color fill for a page style, and you export it to RTF, here is how the reference rendering output looks like:

    However, in Libreoffice only the background of the paragraph reflected the color set by the user:

    After implementing this feature in the RTF export filter, it now looks much closer to the reference:

    At the moment only solid fill is implemented, so other advanced fill types like graphics or gradients are still missing.


  • Friday, 11 December 2015
    Rich RTF comment export in LibreOffice Writer (Comments)

    As it has been reported in tdf#94377, the state of Writer comment contents in the RTF export filter wasn’t great.

    With two recent changes, however, the situation is now much better:

    • I’ve added support for multiple paragraphs

    • I’ve added support for both paragraph and text portion formatting

    It wasn’t necessary to implement this from scratch, because comment contents uses the same editeng store as the shape text, and there formatting was already handled. A benefit of this code sharing is that shape text also handles multiple paragraphs without a problem now. :-)

    The commits are backported to libreoffice-5-1, so users will see them already in the upcoming 5.1.0 release.


  • Thursday, 26 November 2015
    Sanitizing member variable names in LibreOffice Writer (Comments)

    Robinson just branched off libreoffice-5-1 from master in LibreOffice’s core.git repository, so time to talk about what happened behind the scenes in the 5.0 → 5.1 development cycle from my side.

    One stylistic detail that annoyed me for a while was the inconsistency around naming class member variables. In new code it’s common to give them an m_ (or at least an m) prefix, but in older code that wasn’t that common, and various custom hacks were invented to differentiate between pointers which point to the same memory address, but one being a parameter of a member function, and the other being a member variable.

    Probably the worst scenario is when one was an abbreviation of the other, like pTable and pTbl or pCursor and pCrsr. I took this as an opportunity to play with Clang’s LibTooling, and I wrote two tools back during the Cambridge hackfest to automate the process of finding and fixing missing prefixes.

    To scope the renaming, I changed all classes in the sw module having more than 20 unprefixed members to follow the above convention, hopefully this nicely improves code readability, together with the mass-rename of pointless abbreviations, also done before the branch-off, so affecting both libreoffice-5-1 and master. :-)


  • Wednesday, 04 November 2015
    PNG export in LibreOffice Calc (Comments)

    Both LibreOffice Writer and Impress has the ability to export the document as PNG, which is one way to create thumbnails for documents — i.e. being able to preview them before the real loading of the document happens. It turns out Calc did not have this feature, and given that ScModelObj also supports the css::view::XRenderable interface (just like Writer), I hoped that it won’t be too complex to add one.

    You can refer to Fridrich’s overview blog post for the complete list of steps on how to add a new filter to LibreOffice, here the following steps were needed:

    • improve DocumentToGraphicRenderer, so that it can handle that Calc does not implement the text::XTextViewCursorSupplier interface (Writer uses this one to expose the cursor is on what page)

    • register png_Portable_Network_Graphic as filter type for Calc

    • create a new calc_png_Export filter fragment

    • register a Calc graphic filters configuration type and filter group in Configuration_filter and CustomTarget_registry

    • testcase

    If you can’t wait till LibreOffice 5.1 is released to try out this new feature, you can get a daily build. :-)


  • Tuesday, 20 October 2015
    Flat ODF support in LibreOffice's Android port (Comments)

    While LibreOffice’s Android port has as good support for ODF as the desktop version, flat ODF was lagging behind. There were two reasons for this:

    With these two fixes my favorite test documents (of which the ODF version worked already previously) in flat ODF version also load properly in all Writer, Calc and Impress — as can be seen on the above montage of screenshots.


  • Friday, 09 October 2015
    Restarting timer of the presenter console (Comments)

    This use-case came up during this year’s LibreOffice conference. I started the Impress slideshow a few minutes in advance, so the audience could check if they are at the correct room, seeing the title side. Right after starting the slideshow, the presentation timer also started to count. I had to stop and start the presentation, so I had an idea how much time my talk took so far. The side effect of this workaround was that the audience saw an ugly short flash while the presentation was not running at the moment I started talking.

    Because hacking the presenter console requires you to have two monitors, it’s not something I looked into during the conference’s hackfest, but now here it is: I added a button to just restart the timer, then it’s not needed to stop/start the presentation manually.

    The icon is just a placeholder for now, the real design is in progress.


  • Friday, 25 September 2015
    LibreOffice's Android port (Comments)

    (via Andras Timar)

    I had the pleasure to share where we are wrt. the Android port of LibreOffice yesterday. Abstract on the conference website, slides at the usual place, video record "soon" as usual. :-)


  • Wednesday, 16 September 2015
    Fixing Base form image backgrounds (Comments)

    In this post I want to go further, and after touching Calc, here is my first story about Base. Of course I lie, it seems that Base forms are kind of read-only Writer documents, at least that’s how I could fix the bug I’m describing here. :-) The topic is still the same, rounding rough edges after the fill attributes rework, this time a stretched background of a Base form. (Which was not stretched at all, it was simply centered both horizontally and vertically on the page.)

    I’m not entirely sure how the document from tdf#92586 is created, but the interesting part from styles.xml is:

    <style:page-layout-properties ... style:repeat="no-repeat">
         <style:background-image ... style:repeat="stretch"/>
    </style:page-layout-properties>

    So the schema allows specifying the way how the bitmap is repeated at two places, and in the past the later attribute won, and with the rework this got lost.

    An additional problem that the commit had to solve is that the attribute on the page-layout-properties XML element is mapped to our FillBitmapMode API, while the attribute with the same name on the background-image XML element is mapped to the BackGraphicLocation API, which is specific to Writer. As a result, now there is a compatibility map from the old enumeration to the new one, that’s how the bug document is now rendered the same again, as in the past.

    The fix is already backported to the libreoffice-5-0 branch.


  • Wednesday, 02 September 2015
    Fixing Calc header image backgrounds (Comments)

    I think this is my first Calc bugfix. :-) The problem I wanted to fix is that while LibreOffice 4.4 learned advanced fill attributes (gradients, hatches, etc) for page headers / footers in Writer, this broke the saving of simple graphic header backgrounds in Calc. Seeing that no-one stepped up to fix this, I tried to do this myself — and luckily the problem was in the ODF export filter, which is much more familiar to me, compared to Calc core.

    Part of that larger feature was changes to the ODF filter, and the bug was exactly about touching shared ODF filter code to please Writer without testing other LibreOffice applications.

    The actual problem was overlapping constants: as in multiple constants had the same numeric value. Such issues are sometimes hard to track down, in this case it wasn’t that hard: the context filter that tried to make sure we don’t write duplicated XML attributes removed the background property when it tried to guard header repeat offsets.

    Given that this affected the LibreOffice 4.4 and 5.0 series, both branches got a backport of the commit, and so the next release from those lines will have the fix.


more »