Setting language for paragraph points to dialog label 'Character'
Steps to Reproduce:
1. Open the attached file
2. Right Click Hello
3. the context menu contains -> Set language for paragraph
4. Expand -> Click More
Character dialog opens
Well I was in search where I could find Paragraph Style Direct Format in a dialog.
If you change the language in the status bar to something different from default, you get Paragraph Style Direct Format. However kind of surprised by the existence of Paragraph Style Direct Format as such (an surely no clue where that can be managed)
Clear Direct Formatting doesn't remove.. that's for sure. And if you change the default document language.. and set it back to default.. this already persistent change (as it's written as DF indefinitely)
User Profile Reset: No
Version: 220.127.116.11.alpha0+ (x64) / LibreOffice Community
Build ID: 4e0a7df2dfa10bc52d5dbda34f43e0bc0df22ae7
CPU threads: 4; OS: Windows 6.3 Build 9600; UI render: Skia/Raster; VCL: win
Locale: en-US (nl_NL); UI: en-US
Created attachment 173582 [details]
True, "More..." applies the language on the selection for both the top level and the sub menu "Set Language for Paragraph". We could just hide it there since language cannot be set as P-DF. Which would be an option too, of course, to add the Font tab.
Mike, what do you think?
(In reply to Heiko Tietze from comment #2)
> language cannot be set as P-DF
Wrong, it can be (and is) set as paragraph direct formatting.
(In reply to Mike Kaganski from comment #3)
> Wrong, it can be (and is) set as paragraph direct formatting.
True, if the whole paragraph is selected both options change the D-PS. What I meant is "cannot be set via dialog".
(In reply to Heiko Tietze from comment #4)
> What I meant is "cannot be set via dialog".
No, what you see is just a regression. The dialog should set *paragraph* DF when called for paragraph (irrespective of its caption).
Compare v.5.0 and v.7.2+:
1. Open attachment 173582 [details]
2. Put text cursor to "Hello"
3. Menu Tools->Language->For Paragraph->More
4. Set Western Text Font's Language to some value and close the dialog
5. Put text cursor to the end of the paragraph (after the space after the "Hello") and check the language in the status bar
6. Save (as) and close
7. Open in 7.2+ to inspect in Style Inspector
The differences are:
* In 5.0, step 5 shows the language set at step 4; step 7 shows that only Paragraph DF contains Char Locale property in the Hello paragraph.
* In 7.2+, step 5 gives "Italian (Italy)" which was there initially (so only language of the word was defined in step 4); step 7 shows that both Paragraph DF and Character DF are set when you are inside the "Hello" word.
So this is just a regression needing a separate issue, bibisection, and fixing. If this question is only caused by the regression, then it could be converted to such; otherwise, the question should be clarified with the updated information in mind.
See also bug 103036 comment 7.
Already in oldest of 6.3 repo, someone else can continue narrowing it down
I didn't go into the detail mentioned in comment 5, but just checked whether it was the "Character" dialog that is used for paragraph properties. That was already true as far back as I can check in LO 3.5.
svx/sdi/svx.sdi:SfxVoidItem FontDialogForParagraph SID_CHAR_DLG_FOR_PARAGRAPH
The way this is used is that the entire paragraph is selected, and then the character dialog is applied to the whole selection.
It is probably not terribly hard, but it is non-trivial to change this. So I won't.
broken in LO 6.1 with commit ce9594d40a8d72370624b045761df4e0078d601e
Author: Jan Holesovsky on Tue Jan 16 13:41:34 2018 +0100
lokdialog: Convert the Format -> Character... dialog to async exec.
Browsing the code change, there is nothing that suggests what could be the cause. The result can easily be seen even in the older version. Before the change, going to the space after hello shows the new paragraph language - since it affected the whole paragraph. After the change, only the word itself is changed, and not the space character at the end.
The problem is that the artificial selection is lost.
It is looking for rWrtSh.IsSelFullPara(), but it is getting an empty rWrtSh.GetSelText()
proposed fix at https://gerrit.libreoffice.org/c/core/+/151678
Justin Luth committed a patch related to this issue.
It has been pushed to "master":
tdf#143368 sw CHAR_DLG_FOR_PARAGRAPH: restore selection
It will be available in 7.6.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:
Affected users are encouraged to test the fix and report feedback.
Justin, is this fixed?
(In reply to Mike Kaganski from comment #5)
> So this is just a regression needing a separate issue, bibisection, and
Based on this, and the fixed regression, I should have marked this as fixed earlier.