Index ¦ Archives ¦ RSS

Semi-transparent text in Draw/Impress

Estimated read time: 1 minutes

Draw/Impress now has support for semi-transparent shape text, next to the existing transparency support in the context of shape fill colors and shape border colors.

First, thanks Vector who made this work by Collabora possible.

Here is how it looks:

https://lh3.googleusercontent.com/FJ55-BJ_Mc75TiyrPYuvtOscHOqFp81sEI4SfJvybPzaXG5Y2n4mIoLRzkXydEEmtEf--l9s_h-L4CyYjuGpTyOngOTi8YAzIFp8bQBEn0k2DWsRzJHLdfttf74wTbdPgZUzgSnOYQ=w640
Figure 1. Semi-transparent text in Draw

What you can see is that next to the existing character color, now you can also set a transparency percentage to decide if the text should be entirely transparent, entirely opaque or something between the two.

The primary focus was Draw in this case, but this also helps PPTX support, as the importer/exporter now handles this for Impress documents as well.

All this is available in LibreOffice master (towards 6.5), so you can try it out right now, if interested.


Better math import from PPTX into Impress

Estimated read time: 1 minutes

Impress now has a much improved math handling in its importer from PPTX, eliminating annoying duplicated objects you had to delete after import, manually.

First, thanks TU Dresden who made this work by Collabora possible.

Here is how it looks:

https://lh3.googleusercontent.com/zI1fDb7tfl0a-6e1JljnBuCz67cGBSpx3s_tMViW_xWpTjy0FrsLGws-VAXWcdQhmSwXddr9wjADs5UvhNu_sNjETT7VfMJB8pdQ4PxPpHliCVbuMOx67Wwrd6brfE-eJtWIb2K36A=w640
Figure 1. Impress, new math import from PPTX
https://lh3.googleusercontent.com/rpC9KOUaadEoYKekczLTZakB98SBwqbKGqmwf_VLY6D-8OpBLh9Lpxi_RDl6CMQHJKqsz0NnxgTN8kn63CB9fGmP6AWUKIqK0huvjoRCxvoh6dtd0BMRXclsWlaKr3jbdzb1TOJ1LQ=w640
Figure 2. Reference rendering
https://lh3.googleusercontent.com/hUBhfLLFPZFDa50EMPEQxl2kih91oKIfQFBxNK7F9uWGexGbUKnV1FMQZgvmj4EctmCwlxlYK56hPSX0RZS_MpOAKZZagmfOALZ3LRrvBgoOGAx9dsM1N3dp9bGvPU7c0WVvROu8iQ=w640
Figure 3. Impress, old math import from PPTX

What you can see is that the in the old case we managed to read both the actual math object and its replacement image from PPTX, which caused visible duplication due to working transparency handling. The new way just imports the math objects, and ignores the replacement graphic.

This new way (handling of the OOXML a14 feature flag) is enabled by default, except for Calc documents, where more works is needed before it can be enabled.

All this is available in LibreOffice master (towards 6.4), so you can try it out right now, if interested.


Continuous endnotes in Writer

Estimated read time: 1 minutes

Writer now has a new "continuous endnotes" compatibility setting in its layout, allowing rendering endnotes in a way which is closer to what Word users expect.

First, thanks TU Dresden who made this work by Collabora possible.

Here is how it looks:

https://lh3.googleusercontent.com/g4kmuKduOm-Xc5sHH5oBx9y-U8S6hK5pgamrLxG-5fM9XCRJwMJFEPKxWXrG6IzEQLVpHdxCHI0c45EjDax02SpDbIzyQjZvUd-gsvpTWlkgZ0p3Y5-FDXARIPggF0KyIwG1AFwoiQ=w640
Figure 1. Writer, new ContinuousEndnodes layout flag enabled
https://lh3.googleusercontent.com/dlUGc11qUKVvvkKXh5mhj9BlEw4bLxgKxW_t3pNAAu2rnuWuIrFtWdlKk-8nadbSur8CaDe-CIUNJiSJlQSTvA22Q89TkY-uRsdJH3EKX6RcyUJsr-W5YqJrVqaM4KgXAIDPxPXPvg=w640
Figure 2. Reference rendering
https://lh3.googleusercontent.com/odkN2eqFxYthY7qhxHwStIlodTZJmcUa5wzh6p74PWPT6jKtsAmAvZyNzTjwff_CrDm5AtTcdAq_Rw2QyMNQN1Xr_ypIYL_cEZ3g1DRJof9em6acQ1fxrNQWsx_LxUmBhmu4TkTmPw=w640
Figure 3. Writer, old separate endnote page layout

What you can see is that endnotes unconditionally start after the end of the document content in Word, while endnotes are unconditionally on separate endnote pages in Writer. The new ContinuousEndnotes layout compatibility flag in Writer allows rendering endnotes the Word way.

This new flag is enabled by default for DOC files, disabled otherwise.

All this is available in LibreOffice master (towards 6.4), so you can try it out right now, if interested.


Allow-overlap shape property in Writer

Estimated read time: 1 minutes

Writer now has a new "allow overlap" shape property for anchored objects, which can ensure that objects with overlapping positioning properties don’t actually overlap.

First, thanks TU Dresden who made this work by Collabora possible.

Here is a video showing how it works:

Figure 1. Allow-overlap shape property in Writer

Under the hood, this is a full new Writer feature, since previously shapes were always allowed to overlap with each other:

  • macros get a new AllowOverlap shape property (true by default)

  • layout takes this into account if you set the property on the UI

  • both DOCX and ODT filters serialize and load this property (ODT proposal)

All this is available in LibreOffice master (towards 6.4), so you can try it out right now, if interested.


Bottom to top, left to right writing direction in Writer conference talk

Estimated read time: 1 minutes

Yesterday I gave a Bottom to top, left to right writing direction in Writer talk at the LibreOffice Conference 2019. The room was well-crowded — perhaps because it was on the first day and in the largest room. ;-)

It contains some details which are not available in previous btLr blog posts, like what natural languages use this direction, how to replace real-world clocks without breaking compatibility and more!

I expect quite some other slides from other Collaborans and the wider community will be available on Planet, don’t miss them.

You can get a snapshot / demo of Collabora Office 6.2 and try the presented feature out yourself right now: try unstable snapshot. Collabora is a major contributor to LibreOffice and all of this work will be available in TDF’s next release, too (6.4).


btLr text direction in Writer, part 4

Estimated read time: 2 minutes

The problem

https://lh3.googleusercontent.com/meDrX3a3jwfCHpHSpQfS7Tqvy7Cxaumoo5RlnjJ7Qj0fhDgPXeOv7FgRn4Xqesv8IWW3feCV-_lhWOyzZo9ZD5yaxkBrYxd9doRm9x8BJAAdu3QQ1Jj6MIiy5q5FO_d2v5YSbsBUvg=w320

I already wrote about the btLr text direction in the context of Writer table cells as a result of a Collabora hack week (part 1, part 2, part 3). This post is meant to be the final one (for now), given that both table cells and shapes / text frames are now working nicely with all major formats.

The result

The first topic is that whenever I looked at supporting the new bottom-to-top, left-to-right direction, I always first checked if the more common top-to-bottom, right-to-left direction is working or not (this is used for e.g. Japanese rotated text). Turns out that Writer text frames were not exported to drawingML (part of DOCX), so I fixed that.

Similarly, there is the older shape markup in DOCX: VML. The tbRl direction from that was broken, too, now working nicely.

Then I could actually look at the btLr import from VML, which is now correct.

One of the motivations for this work was to get rid of the old, miserable hack where we did character-level rotation during import (which falls apart for multi-paragraph text). If the import mapping in itself is not painful enough, we had to undo the effect of this import hack at export time. When I could remove the last usage of this dreaded checkFrameBtlr() function in the export code, I mentally did a little dance. ;-)

Back to btLR fixing, exporting Writer text frames to DOCX is not interesting when you do DOCX editing, but it’s very much relevant when you do ODT → DOCX conversion. And the btLr case was of course not handled, fixed now.

RTF was broken in 4 different ways: import and export was broken for the btLr and the tbRl cases for text frames.

The last thing was the binary DOC export, where btLr text frames were not handled.

With these sorted out, I think the topic of table cells and shapes / text frames are now supported reasonably well. ODF could do the btLr writing direction for sections and pages as well, but I don’t see that as a priority. And hey, Word doesn’t support them, either. :-)

Want to start using this?

You can get a snapshot / demo of Collabora Office and try it out yourself right now: try unstable snapshot. Collabora is a major contributor to LibreOffice and all of this work will be available in TDF’s next release, too (6.4).


Commenting on images and charts in Writer

Estimated read time: 1 minutes

The problem

Years ago I posted about work to attach comments to text ranges. This improved compatibility with Word greatly, but it was always a piece of text that was commented, never frames. If you just selected a frame and tried to comment by selecting the menu entry or the Ctrl-Alt-C shortcut, nothing happened, because frame selection did not interpret comment insertion.

Result

https://lh3.googleusercontent.com/PvlDM6Ox1UBEXj57F4SyBN5hlv1sjJHjI4VjmwIoM-3btxSR1Uh5HAwch_tw95vDOhdSZnEbDPkuYYAU2iiHvSeHafFtToGQzntEqO8wGgkDgmIOxGBXWw6vdTPQlgPPF3lFd0ES8Q=w640
Figure 1. Comment on an at-char anchored image in Writer

Examples for frames are images or charts. This needs explicit handling, so at the moment the at-char and as-char anchor types are supported, and you can simply insert the comment to a frame once the frame is selected. This works in both desktop Writer and Online.

Want to start using this?

You can get a snapshot / demo of Collabora Office and try it out yourself right now: try unstable snapshot. Collabora is a major contributor to LibreOffice and all of this work will be available in TDF’s next release too (6.4).


btLr text direction in Writer, part 3

Estimated read time: 2 minutes

I already wrote about the btLr text direction in the context of Writer table cells as a result of a Collabora hack week (part 1, part 2). The next step in this journey is btLr text direction of Writer Text Frames, and building on top of that: DOCX Text Boxes. Here is a series of screenshots showing the result:

https://lh3.googleusercontent.com/mHrS3KHuLf4tnWOZTw83jJiF3bJ6Ti8fiHXSJlqBFwrdDEpCdS9m_mTfHQPhOXNbZ5atXkagrGO7fSAJPSUo9pEm73UMr_kT6oVwOLCjZwxR9NB_EsLxHUXmUtUiSq0Zr-C0_TNLMg=w640
Figure 1. tdf104353.docx, baseline
https://lh3.googleusercontent.com/haH8Tu0CiUQ9OHWn3Pc9PJ8pP6fEwpGZtrtYUrtkYLYH_BLnLknIA5hBruslE2XIJnuoFjGxYhuFj3GqH4Peu2slIH83ss9vIPMXSn_E5q2Lr80cz2_h7rPuI1DRgJYou6AaOQzAaw=w640
Figure 2. tdf104353.docx, current
https://lh3.googleusercontent.com/ZZKDSlC3-VmuVbvvR7nlsNUi6A-mWAj6wJgg2TMzBMg0MQ01kN0iwnHvw_16GDopYT2hNuJwUKWZ5ugbg6TjkJWJ_V5rHwv2fpwumuGLLF29hYYtEPOb0v2en5UHY5p8kHyxTWtYZA=w640
Figure 3. tdf104353.docx, reference

You can see that the bug document is some kind of card you can print and fold in the middle: no matter if you are in front of the card or you are behind it, you always see the name and details of the person. Sure, you can do the same with a table with no borders, but using a Text Frame for this purpose is a sane use-case.

The text from the 3 paragraphs used to have the same horizontal position, and now it’s laid out the same way as Word does it.

Technically, this result is just the last commit in a series. I fixed the following problems since the last blog post on this topic:

All this is available in LibreOffice master (towards 6.4), so you can try it out right now, if interested.


Importing charts from DOCX drawingML group shapes in Writer

Estimated read time: 1 minutes

https://lh3.googleusercontent.com/Jw_BHWWDubfGASjfFszFu6q9VRXaELjjLun974YCt7pQv3P-WIKqkISu5GHwTNndCHi8jGqv_FvYTZFXdWfxASIzXbgw0Et-7rAQZ3LzxA5Ntxx0GTxRH3y4m3hOYVLMKAyXtCQECQ=w640
Figure 1. Chart in drawingML group shape in DOCX, imported into Writer

Years ago I posted about a large rework to where Collabora helped a customer to make Writer read the drawingML markup for DOCX shapes. You can read the various benefits of this switch in that article — but similar to other large reworks, this also broke some previously working corner-cases, where test coverage lacked.

One of these is charts in group shapes. This needs explicit handling, as Writer normally handles charts as TextEmbeddedObjects, while code that imports charts from OOXML is not specific to Writer. The fix just tells the generic drawingML import to use a Writer-specific service name for the charts.

This is available in LibreOffice master (towards 6.3).


btLr text direction in Writer, part 2

Estimated read time: 1 minutes

I already wrote about the btLr text direction in the context of Writer table cells as a result of a Collabora hack week. This is meant to be an update to present what happened in the past 2 months. Here is a video showing the results:

Figure 1. Before / after screen recording for the below mentioned changes

I fixed the following problems since the last blog post on this topic:

All this is available in LibreOffice master (towards 6.3), so you can try it out right now, if interested.

© Miklos Vajna. Built using Pelican. Theme by Giulio Fidente on github.