Bug Hunting Session
Bug 36324 - Keeping Language for Paragraph Style (it switches with the input language of the keyboard)
Summary: Keeping Language for Paragraph Style (it switches with the input language of ...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
3.5.4 release
Hardware: x86 (IA32) Windows (All)
: high minor
Assignee: Not Assigned
URL:
Whiteboard: target:4.0.0
Keywords:
: 34871 57947 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-04-17 05:42 UTC by Mark Simon
Modified: 2012-12-10 16:24 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:


Attachments
This was in Dutch once, in English now, but always resets to Dutch. (662.00 KB, application/msword)
2011-05-04 12:36 UTC, Scott M. Sanders
Details
UI Tools > Options...: "Ignore system input language" (38.42 KB, image/png)
2012-12-09 21:33 UTC, manj_k
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Simon 2011-04-17 05:42:04 UTC
I have a paragraph style which I use for code samples which includes, among other things, a language of [none], so that (a) it doesn’t bother me with spelling errors and (b) I can use non-curly quotes.

When I set a paragraph to this style, it will revert to my current language which is English (Australia).

In my testing, I have found

(a) if I try to set the paragraph to a different language, say Afrikaans, the same thing happens.

(b) if I use a character style which I have also set for code samples, this does not happen.

I conclude that the problem lies in the behavior of the default character style associated with the paragraph style.

I have also noticed that it takes a few moments for the language to be reset. So, for example, If I change to the paragraph style and then quickly type two straight quotes, they will work. If, however, I continue to type, then the language will revert.

Finally, I cannot reproduce this behavior reliably. Sometimes my paragraphs behave just as I would like.

Thanks,

Mark
Comment 1 Kohei Yoshida 2011-04-18 12:59:14 UTC
I have hard time reproducing this with my limited attempt.

Be sure to give us more information to help us reproduce this (when you notice more patterns).  Thanks.
Comment 2 Mark Simon 2011-04-19 05:34:42 UTC
I cannot create the problem reliably. I created a new document and a dummy paragraph style called “test”, and it behaves properly. However, in my working document, I sometimes get the problem, and at other times everything is OK. At this stage I don’t know what triggers the problem.

At the moment, I have a style called “CodeSample”, with language set to [none], and linked with -None- . I use the Courier New font, and some indentation and paragraph spacing.

I set it to no language so that it will not check spelling or change the quotes to curly quotes.

Sometimes when I am using this style, I notice that the language has changed to English [Australia] in the status bar. Sometimes Ctrl-M will set the character style to its Default, and I can continue. Sometimes it doesn’t seem to work.

Using the Status Bar, I can set the language for the Paragraph to its Default, and this usually helps. However sometimes when I start typing text, the language switches back to English ... !

But it’s all Sometimes. I can’t work out the exact conditions.

I am using Windows XP with the latest service pack.

Thanks,

Mark
Comment 3 Mark Simon 2011-04-20 02:48:05 UTC
I cannot create the problem reliably. I created a new document and a dummy paragraph style called “test”, and it behaves properly. However, in my working document, I sometimes get the problem, and at other times everything is OK. At this stage I don’t know what triggers the problem.

At the moment, I have a style called “CodeSample”, with language set to [none], and linked with -None- . I use the Courier New font, and some indentation and paragraph spacing.

I set it to no language so that it will not check spelling or change the quotes to curly quotes.

Sometimes when I am using this style, I notice that the language has changed to English [Australia] in the status bar. Sometimes Ctrl-M will set the character style to its Default, and I can continue. Sometimes it doesn’t seem to work.

Using the Status Bar, I can set the language for the Paragraph to its Default, and this usually helps. However sometimes when I start typing text, the language switches back to English ... !

But it’s all Sometimes. I can’t work out the exact conditions.

I am using Windows XP with the latest service pack.

Thanks,

Mark
Comment 4 Scott M. Sanders 2011-05-04 12:33:20 UTC
I get this a lot too. The file I'll attach was originally Dutch, but all the text is now in English. No other apps really care, but LibreOffice puts red underlines for nearly every word. Naturally I have tried setting all text (or all selection or all paragraph) language to English and save it, many times, but when I reopen it, all the red underlines are back.
Comment 5 Scott M. Sanders 2011-05-04 12:36:17 UTC
Created attachment 46331 [details]
This was in Dutch once, in English now, but always resets to Dutch.
Comment 6 Scott M. Sanders 2011-05-04 12:37:37 UTC
Nearly every word in the Contents anyway.
Comment 7 Urmas 2011-08-15 17:27:57 UTC
The text will derive its language from current keyboard. It's a wonderful feature.
Comment 8 Björn Michaelsen 2011-12-23 12:01:15 UTC
[This is an automated message.]
This bug was filed before the changes to Bugzilla on 2011-10-16. Thus it
started right out as NEW without ever being explicitly confirmed. The bug is
changed to state NEEDINFO for this reason. To move this bug from NEEDINFO back
to NEW please check if the bug still persists with the 3.5.0 beta1 or beta2 prereleases.
Details on how to test the 3.5.0 beta1 can be found at:
http://wiki.documentfoundation.org/QA/BugHunting_Session_3.5.0.-1

more detail on this bulk operation: http://nabble.documentfoundation.org/RFC-Operation-Spamzilla-tp3607474p3607474.html
Comment 9 Björn Michaelsen 2011-12-23 16:59:45 UTC
needinfo keyword redundant by needinfo status.
Comment 10 [REDACTED] 2012-06-24 09:40:52 UTC
I have a similar problem.

Steps to reproduce:
-Write something. The language is that of the paragraph.
-Change the input language of your keyboard (not the keyboard layout, just the input language) to a different language to that of your paragraph.
-Contiunue writting. The language has automatically switched to that of the input language.
-Set again the paragraph language to the original language.
-Continue writting. The paragraph language switches again automatically.

The same problem was described for OOo. The bug was never solved. Here is the bug issue for more information:
https://issues.apache.org/ooo/show_bug.cgi?id=100762

It seems that LO recognizes the input language as a default.
Comment 11 Jeremy Brown 2012-09-23 19:52:08 UTC
I can confirm this problem for my LibreOffice install on Windows 7. However, I do not believe the same problem is present in Linux varieties, at least not on Kubuntu.

Here's the way to test out the difference.
1. On your Windows and Linux systems, make sure you have keyboards for 2 languages in your system dock, e.g. English (USA) and French (Canada).
2. Launch LibreOffice Writer.
3. Choose your system keyboard as English from your keyboard chooser.
4. Use the LibreOffice Tools->Language->For all Text to set the document language to English.
5. Type "Hello World. How are you?" Note that the LibreOffice status bar indicates the current language is English (USA).
6. Use your system dock to change the language to French (Candada).
7. Type "Hello World. How are you?"
8.a. Windows: Note that the LibreOffice status bar is now reporting the current language as French (Canada)
8.b. Linux: Note that the LibreOffice status bar is still reporting the current language as English (USA)


I agree with Urmas that this is normally a great feature on Windows, since it conforms with how users generally expect things to work, and it is the same thing that MS Word does, for example.

However, I believe there should at least be an option to allow LibreOffice on windows to operate the same way as it does on Linux. Maybe a checkbox option on the Tools->Language->For all Text->More... dialog, something like:
x Ignore system keyboard locale

This is important on Windows for two reasons:
1. It is obviously annoying some users who use major world languages (e.g. English, Dutch, etc.)
2. There are minority language groups that have no locale for their language under Windows. Although they can create a keyboard that will type the characters of their language, the keyboard still has to be created as belonging to one of the languages that Microsoft does define. This essentially means that, although LibreOffice will gladly display these languages in its language lists, (see, for example, Teke-Eboo & Teke-Tyee that I asked to have added) users under Windows can never type in these languages, because LibreOffice will always take the system keyboard language to override the document/paragraph/selection language.

I'm personally very interested in seeing this bug resolved. If anyone could help point me to what files contain the code for this, I'd try to hack away at this.
Comment 12 Urmas 2012-09-25 18:42:28 UTC
A particular idiocy of this behavior is introducing language-invariant stuff in documents: like spaces or punctuation having a specific language. Such symbols should be merged with the current run while being entered.
Comment 13 Not Assigned 2012-11-12 10:28:50 UTC
Jeremy Brown committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=b4d1aaa074e2be9fd778134c40f99d2ab8a01e93

fdo#36324 fdo#42929 - option to ingore system input language changes



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 14 manj_k 2012-12-09 21:15:53 UTC
Marked as RESOLVED FIXED due to comment #13
(and http://wiki.documentfoundation.org/Releases/4.0.0/Beta1#List_of_fixed_bugs).

Tested successfully with
LibO-Dev 4.0.0.0.beta1 
(Build ID: 87906242e87d3ddb2ba9827818f2d1416d80cc7),
on WinXP 32b.

System input languages: DE, EL, EN, ES, FR (different keyboard layouts).
Comment 15 manj_k 2012-12-09 21:20:40 UTC
*** Bug 57947 has been marked as a duplicate of this bug. ***
Comment 16 manj_k 2012-12-09 21:33:15 UTC
Created attachment 71243 [details]
UI Tools > Options...: "Ignore system input language"
Comment 17 manj_k 2012-12-10 16:24:45 UTC
*** Bug 34871 has been marked as a duplicate of this bug. ***