Bug 166572 - Text boxes with writing-mode="lr-tb" open incorrectly
Summary: Text boxes with writing-mode="lr-tb" open incorrectly
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
25.2.3.2 release
Hardware: x86-64 (AMD64) Windows (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: CJK Vertical-Text
  Show dependency treegraph
 
Reported: 2025-05-13 23:05 UTC by fengzf
Modified: 2025-12-25 17:12 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
The document in which the error occurred (25.29 MB, application/msword)
2025-05-13 23:09 UTC, fengzf
Details

Note You need to log in before you can comment on or make changes to this bug.
Description fengzf 2025-05-13 23:05:42 UTC
Description:
在文檔中,設置了一些文本框,作為插入到字符,且設置了框的環繞邊距、框內文字的豎排等屬性,但保存後重新打開文檔時,卻顯示全部文字框變為橫排、且環繞值也變了,導致已排版文檔無法正常使用。
已經錯誤的文本框,需要重新設置文字豎排,且環繞距離也需要重新設置,這導致無法正常工作。

Steps to Reproduce:
1.編輯
2.保存
3.再次打開

Actual Results:
文檔顯示錯誤,無法正常使用

Expected Results:
正確保存文本框及其內容的各項參數設置


Reproducible: Sometimes


User Profile Reset: No

Additional Info:
以前反饋過的標點超出邊界無法顯示的問題,可以通過在亞洲字體設置中不允許標點符號溢出來解決,但如果允許溢出而仍正確顯示標點就更好了!
Comment 1 fengzf 2025-05-13 23:09:14 UTC
Created attachment 200789 [details]
The document in which the error occurred
Comment 2 Takenori Yasuda 2025-05-14 13:28:13 UTC
Regarding writing direction:
I created a sample file using text boxes and investigated the issue.
As a result, I suspect that the problem lies in the value of "style:writing-mode" within "style:paragraph-properties" in the content.xml.
Specifically:
* writing-mode="tb-rl" → works as expected
* writing-mode="lr-tb" → causes the issue


In the attached file:

<style:style style:name="gr529" style:family="graphic">
    <style:graphic-properties fo:min-height="0cm" fo:min-width="0cm"
        style:writing-mode="lr-tb" loext:decorative="false" style:run-through="foreground"
        style:wrap="run-through" style:number-wrapped-paragraphs="no-limit"
        style:vertical-pos="from-top" style:vertical-rel="paragraph"
        style:horizontal-pos="from-left" style:horizontal-rel="paragraph"
        draw:wrap-influence-on-position="once-concurrent" loext:allow-overlap="true"
        style:flow-with-text="false" />
    <style:paragraph-properties style:writing-mode="lr-tb" /> <!-- This part -->
</style:style>

<style:style style:name="gr531" style:family="graphic">
    <style:graphic-properties svg:stroke-color="#808080" draw:fill="none"
        draw:textarea-horizontal-align="justify" draw:textarea-vertical-align="middle"
        draw:auto-grow-height="false" fo:min-height="14.924cm" fo:min-width="10.555cm"
        loext:decorative="false" style:run-through="background" style:wrap="run-through"
        style:number-wrapped-paragraphs="no-limit" style:vertical-pos="from-top"
        style:vertical-rel="paragraph" style:horizontal-pos="from-left"
        style:horizontal-rel="paragraph" draw:wrap-influence-on-position="once-concurrent"
        loext:allow-overlap="true" style:flow-with-text="false" />
    <!-- The expected paragraph-properties entry is missing here -->
</style:style>

However, I don't understand why this occurs.
While I was able to reproduce the issue by directly modifying content.xml, I was not able to reproduce it by simply following the steps provided in the original report.


My environment:
Version: 25.2.3.2 (X86_64) / LibreOffice Community
Build ID: bbb074479178df812d175f709636b368952c2ce3
CPU threads: 8; OS: Windows 11 X86_64 (10.0 build 26100); UI render: Skia/Raster; VCL: win
Locale: ja-JP (ja_JP); UI: ja-JP
Calc: CL threaded Jumbo
Comment 3 Mateusz Wlazłowski 2025-05-14 15:34:49 UTC
Comment on attachment 200789 [details]
The document in which the error occurred

Translated with chatgpt:

 Description:
In the document, several text boxes were created and inserted as characters. Properties such as wrap margins and vertical text orientation were set. However, after saving and reopening the document, all text boxes appear with horizontal text and altered wrap values, making the previously formatted document unusable.
Incorrect text boxes must be manually reset to vertical text, and wrap distances must be reconfigured, which makes normal work difficult.

Steps to Reproduce:

    Edit

    Save

    Reopen

Actual Results:
The document displays incorrectly and cannot be used normally.

Expected Results:
Text boxes and all their content properties should be correctly saved.

Reproducible: Sometimes

User Profile Reset: No

Additional Info:
The previously reported issue of punctuation marks overflowing beyond the text boundary can be resolved by disabling punctuation overflow in the Asian typography settings. However, it would be even better if punctuation could still display correctly even when overflow is allowed!
Comment 4 Buovjaga 2025-12-25 17:12:54 UTC
Let's set to NEW in any case, so this does not get forgotten.