Ask Your Question

how do i disable spell check from command line [closed]

asked 2013-04-26 08:23:44 +0200

Datalärare gravatar image

updated 2013-06-27 22:04:57 +0200

manj_k gravatar image

I want to be able to switch off (and on obviously) the spell checker from time to time, because when our students are making certain tests they are not allowed to use spell checking. I do not want to do this manually on all the computers, but rather scripting it centralized. Is it possible?

edit retag flag offensive reopen merge delete

Closed for the following reason question is not relevant or outdated by Alex Kemp
close date 2015-10-30 20:46:38.375297


Which platform and LO version?

oweng gravatar imageoweng ( 2013-04-26 08:33:56 +0200 )edit

3 Answers

Sort by » oldest newest most voted

answered 2013-04-27 03:14:18 +0200

oweng gravatar image

If you wish to lock down the settings you are probably going to need to play with the LibreOffice API to turn off / suppress display of the Tools > Options menu item. This should not actually be too difficult. Refer this thread about disabling, for example, the File > Open... menu item. The very last example under the Office Development section of the Developer's Guide Examples is what you are after i.e., DisableCommandsTest.

I have not read up on what the exact command/s required are, so will leave this to you.

edit flag offensive delete link more

answered 2013-04-26 09:03:26 +0200

oweng gravatar image

I am not sure how effective (or safe) this would be, but if you are looking to script a solution, you could consider taking a copy of the registry file (registrymodifications.cxu) in the User Profile before and after turning on/off the automatic spelling options. Under Tools > Options... > Languages Settings > Writing aids > Options:

  • Check spelling as you type
  • Check grammar as you type

You could then copy over the version you require, before and after a test. An edited diff on before / after copies of this file would seem to indicate these are the entries that matter if you want to use a regular expression to target just these XML elements:

< <item oor:path="/org.openoffice.Office.Linguistic/General/DictionaryList"><prop oor:name="ActiveDictionaries" oor:op="fuse"><value><it>IgnoreAllList</it></value></prop></item>
> <item oor:path="/org.openoffice.Office.Linguistic/General/DictionaryList"><prop oor:name="ActiveDictionaries" oor:op="fuse"><value><it>standard.dic</it><it>IgnoreAllList</it></value></prop></item>
< <item oor:path="/org.openoffice.Office.Linguistic/GrammarChecking"><prop oor:name="IsAutoCheck" oor:op="fuse"><value>true</value></prop></item>
> <item oor:path="/org.openoffice.Office.Linguistic/GrammarChecking"><prop oor:name="IsAutoCheck" oor:op="fuse"><value>false</value></prop></item>
< <item oor:path="/org.openoffice.Office.Linguistic/SpellChecking"><prop oor:name="IsSpellAuto" oor:op="fuse"><value>true</value></prop></item>
> <item oor:path="/org.openoffice.Office.Linguistic/SpellChecking"><prop oor:name="IsSpellAuto" oor:op="fuse"><value>false</value></prop></item>
edit flag offensive delete link more

answered 2013-04-26 12:42:28 +0200

Datalärare gravatar image

updated 2013-04-26 12:43:53 +0200

Thanks for your answer oweng. Unfortunately this is just a QD solution. As you pointed out it might not be so secure. At first I didn't understand what you meant, but now I realize that from the sake of the test the students are undertaking it is not secure. The students can easily activate the spellcheck again, the same way I deactivated it. I thought that a write protect on the file should do the trick, but no, "something" enabled the write right on the file again. So... I changed the owner of the file to root, but that didn't work since LibreOffice (or "something") changed the owner back to the logged on user.

So... I guess I'm back to square uno

Oh btw, I'm using LO 3.5 on Ubuntu 12.04

Any other ideas?

edit flag offensive delete link more


Yeah, I was just thinking of quick and dirty solutions also. Refer my second answer.

oweng gravatar imageoweng ( 2013-04-27 03:03:59 +0200 )edit

Question Tools


Asked: 2013-04-26 08:23:44 +0200

Seen: 1,076 times

Last updated: Apr 27 '13