summaryrefslogtreecommitdiff
path: root/offapi
diff options
context:
space:
mode:
authorRegina Henschel <rb.henschel@t-online.de>2022-08-17 02:31:44 +0200
committerMiklos Vajna <vmiklos@collabora.com>2022-09-14 08:32:08 +0200
commitc70ee4a6b9071468255e5d4fdb893e9c9bdf4fad (patch)
tree1df672814e562a42f0da889acbc9789322a67685 /offapi
parentc97c60f70e9e6de594f7e0e0b85f17944c640dcf (diff)
tdf#149551 use 'WritingMode' instead of TextPreRotateAngle
Commit 7e23cbdbb6ec0247a29ed8a8f744c01e10963ea0 changed the code so, that TextPreRotateAngle is used to track ooxml vert attribute. This patch changes it so, that the style attribute WritingMode is used. Now text direction can be written in 'writing-mode' attribute in the graphic properties in ODF, same for shapes as for frames. The needed conversion from WritingMode BT-LR and TB_LR90 to TextPreRotateAngle for rendering of text in custom shapes is now in one place in class SdrObjectCustomshape. The shape edit engine cannot yet render it itself. Some unit tests are adapted to use WritingMode property instead of TextPreRotateAngle. The value text::WritingMode2::TB_RL90 is introduced, corresponding to vert='vert' and textDirection='tbRl' or ='rl' in OOXML. It is used for frames too, so that the original text direction is preserved and vert='eaVert' can be distinguished from vert='vert'. TextPreRotateAngle is currently still used in SmartArt import for 'upr' and 'grav' and in emulating 'upright' but no longer to emulate text direction. Change-Id: Idc4339bbfc3592fe90b154d75e2c404a1fa30856 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138813 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'offapi')
-rw-r--r--offapi/com/sun/star/text/WritingMode2.idl10
1 files changed, 10 insertions, 0 deletions
diff --git a/offapi/com/sun/star/text/WritingMode2.idl b/offapi/com/sun/star/text/WritingMode2.idl
index 3d5d1badc6f2..f75108337a69 100644
--- a/offapi/com/sun/star/text/WritingMode2.idl
+++ b/offapi/com/sun/star/text/WritingMode2.idl
@@ -81,6 +81,16 @@ published constants WritingMode2
@since LibreOffice 6.3
*/
const short BT_LR = 5;
+
+ /** text within a line is written top-to-bottom so as if a horizontal
+ left-to-right line is clockwise rotated by 90deg. Lines and blocks
+ are placed right-to-left. This corresponds to OOXML attribute
+ vert="vert" for shapes and ECMA w:val="tbRl" attribute in
+ <w:textDirection> element.
+
+ @since LibreOffice 7.5
+ */
+ const short TB_RL90 = 6;
};