Forwarding a bug report discovered during discussion in a Chinese LO discussion group.
In mainland China (and I've heard in other places that uses CJK text, too), it's conventional to use "two-character width" indent for the first line of a paragraph. LO correctly implement this with automatic first-line indent for Chinese text.
However it seems to only work for single spacing, and changing the line spacing to anything else proportional would change the indent width as well.
Steps to Reproduce:
1. Create a new document with Writer;
2. Type or paste a paragraph of Chinese text (at least two lines for better visual cues), leave them in "Default Style", not "Text Body";
3. Set the first-line indent to automatic (either directly change paragraph format or modify the paragraph style, then "Indents & Spacing" tab -> Indent -> check the box in front of "Automatic" under "First line"), also make sure the "Line Spacing" on the same tab is "Single";
4. Notice that the first line is nicely indented by two characters, so far so good;
5. Go back to the Format/Style dialog, same "Indents & Spacing" tab, change "Line Spacing" to "Double".
The first line is now indented by four character's width
The first line indent keeps at two character's width
User Profile Reset: Yes
The effect is proportional to the spacing, as "1.5 Lines" spacing gives three-character-width indent. The "At least" spacing doesn't seem to affect the indent.
I don't know what the indent convention for western text is, and whether it should depend on line spacing; but for Chinese (and I assume most other CJK) text, it should keep constant regardless of the line spacing.
The original reporter uses LO 6.2.8 on Windows:
版本: 220.127.116.11 (x64)
Build ID: f82ddfca21ebc1e222a662a32b25c0c9d20169ee
CPU 线程: 8; 操作系统: Windows 10.0; UI 渲染: 默认; VCL: win;
区域语言: zh-CN (zh_CN); UI 语言: zh-CN
I can reproduce on both 6.3.4
版本: 18.104.22.168 (x64)
Build ID: 60da17e045e08f1793c57c00ba83cdfce946d0aa
CPU 线程: 2; 操作系统: Windows 10.0; UI 渲染: 默认; VCL: win;
区域语言: zh-CN (zh_CN); UI 语言: zh-CN
... and 6.4.0 beta1
Version: 22.214.171.124.beta1 (x64)
Build ID: 4d7e5b0c40ed843384704eca3ce21981d4e98920
CPU threads: 2; OS: Windows 10.0 Build 18363; UI render: default; VCL: win;
Locale: zh-CN (zh_CN); UI-Language: en-US
Created attachment 156622 [details]
Example document with Chinese text, automatic first-line indent, double line spacing
This should be reproducible with any Chinese text, but for convenience I'm attaching an example document. Here I changed format by modifying the "Default Style" paragraph style, with automatic first-line indent and double line spacing.
It should show the wrong "four-character width" indent. Change the line spacing back to single and see the correct "two-character width" indent.
According to bug 64975, Japanese text and Korean text use "one-character width" first line indent. I assume that they don't want this indent width to be depending on line spacing, either.
Set platfotm to all as in the Chinese discussion group people already reprodced on Debian.
Build ID: 03fd45dce6afa83fc1fcbcd890edb36affd61981
CPU 线程: 4; 操作系统: Linux 5.0; UI 渲染: 默认; VCL: gtk3;
区域语言: zh-CN (zh_CN.UTF-8); UI 语言: zh-CN
Ubuntu 18.04 X64
Set to NEW.
(In reply to Kevin Suo from comment #4)
> void SwTextMargin::CtorInitTextMargin(...)
Before trying to solve this ourselves, let's first ping the paragraph-indent meta bug and see if any developer there can provide some pointers.