clean up "text in custom shapes"

Regina Henschel rb.henschel at t-online.de
Sun Sep 8 13:56:59 UTC 2019


Hi all,

I have started to familiarize myself with the topic 'text in custom 
shapes'. My goal is to clean up the current mess and eliminate mistakes.

It is possible to rotate the text area into which the text is written in 
addition to a rotation of the shape itself. That is done in ODF by the 
attribute draw:text-rotate-angle of the element 
<draw:enhanced-geometry>. That corresponds to the property 
TextRotateAngle of our API. And OOXML has a similar attribute "rot" of 
the element bodyPr. So there is no principle problem with this 
attribute. But the import of OOXML is buggy (tdf#127437) and the text 
frame solution for custom shapes in Writer does not allow rotation.

But OOXML has two attributes in this area that have no counterpart in ODF.

1. The attribute "vert" of the bodyPr element.
The attribute "vert" defines the text orientation. Possible values are 
"eaVert", "horz", "mongolianVert", "vert", "vert270", "wordArtVert" and 
"wordArtVertRtl". The UI of my MS Offic 365 has it as "Text direction". 
The UI of my MS Office 365 has only "horz" = Horizontal, "eaVert" = 
Vertical, "vert" = Rotate all text 90°", "vert270" = Rotate all text 
270°" and "wordArtVert" = Stacked.

 From this I have expected a property with enum-values in LO. But I have 
only found a property "TextPreRotateAngle" (without API).

There seems to be a lot of confusion between text orientation and text 
area rotation. So simulating the "vert" and "vert270" text orientation 
by using text area rotation has at least the bugs tdf#127438 and 
tdf#127439. I expect, that some bugs in Calc about wrong text or wrong 
shape rotation belong in this category too.

2. The attribute "upright" of the bodyPr element
The attribute "upright" defines, that the text is always shown upright 
and all transformations applied to the text or to the containing shape 
are ignored.
I find it in the UI of MS Office 365 only in Word, but it works in 
PowerPoint and Excel too. In the UI it is a checkbox "Do not rotate 
text". In binary MS Office it seems to be the flag fRotateText.

I see it for OOXML only as comment in 
https://opengrok.libreoffice.org/xref/core/oox/source/drawingml/textbodypropertiescontext.cxx?r=e7c0bc48#103. 
So it seems to be not implemented at all.
For binary import I see it in 
https://opengrok.libreoffice.org/xref/core/filter/source/msfilter/msdffimp.cxx?r=71740e63#2831, 
where it is immediately interpreted and not available after import is 
finished.

What to do with attribute "upright"?


Something wrong? Something missing?

Kind regards
Regina


More information about the LibreOffice mailing list