Description: Use macro to change writing mode of a Shape textbox. Comparing the text inside the shape without a textbox, the results are different. Steps to Reproduce: 1.Open the attached document. There are two shapes. One has the textbox attached and the other doesn't. 2.Insert following Basic code as a macro and execute it. Sub Main Dim oDrawPage As Variant Dim oObj1 As Variant Dim oObj2 As Variant Dim oObj3 As Variant Dim oObj4 As Variant Dim nTextWritingMode As Long oDrawPage = ThisComponent.getDrawPage() oObj1 = oDrawPage.getByIndex(0) oObj1.TextWritingMode = 2 msgbox "WritingMode:" & oObj1.TextWritingMode oObj2 = oDrawPage.getByIndex(1) oObj2.TextWritingMode = 2 msgbox "WritingMode:" & oObj2.TextWritingMode End Sub Actual Results: The text in the textbox stays left-to-right. Expected Results: The text in the textbox should be top-to-down (TB-RL). Reproducible: Always User Profile Reset: No Additional Info:
Created attachment 156796 [details] Sample document with two kinds of shapes.
Created attachment 156797 [details] Failed to change writing mode.
Note that the following code also does not work. Sub Main Dim oDrawPage As Variant Dim oObj1 As Variant Dim oObj2 As Variant Dim oObj3 As Variant Dim oObj4 As Variant Dim nTextWritingMode As Long oDrawPage = ThisComponent.getDrawPage() oObj1 = oDrawPage.getByIndex(0) oObj1.WritingMode = 2 msgbox "WritingMode:" & oObj1.WritingMode oObj2 = oDrawPage.getByIndex(1) oObj2.WritingMode = 2 msgbox "WritingMode:" & oObj2.WritingMode End Sub
Patch in gerrit: https://gerrit.libreoffice.org/c/core/+/86638
also reproduced in Version: 5.2.0.0.alpha1+ Build ID: 5b168b3fa568e48e795234dc5fa454bf24c9805e CPU Threads: 4; OS Version: Linux 4.15; UI Render: default; Locale: ca-ES (ca_ES.UTF-8)
and Version: 4.5.0.0.alpha0+ Build ID: 2851ce5afd0f37764cbbc2c2a9a63c7adc844311 Locale: ca_ES
Mark Hung committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/340b0eedaac17ff26799b09f6bbb2b115712e2d5 tdf#129655 Sync TextWritingMode to frame direction. It will be available in 6.5.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Mark Hung committed a patch related to this issue. It has been pushed to "libreoffice-6-4": https://git.libreoffice.org/core/commit/bc47eabad3f593aedd71307334fa50b222604bdd tdf#129655 Sync TextWritingMode to frame direction. It will be available in 6.4.1. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.