[orca-list] Spellchecking in LO and Orca
- From: chrys87 <chrys87 web de>
- To: orca-list gnome org
- Subject: [orca-list] Spellchecking in LO and Orca
- Date: Mon, 07 Oct 2013 21:54:55 +0200
Hi List,
I have a little trouble with spellchecking.
orca announces evertypes "missspelled" i typed (libreoffice,
Thunderbird) (maybe i do somethng wrong?). But i have to complete some
work here.
so i write an initial code to libreoffice that moves me to the next
missspelled word.
maybe this is interesting to you. you have to insert it as macro. you
have to change the spelllchecking language. for now its german.
you can also define the macro as shortcut.
REM ***** BASIC *****
REM Version 0.1
REM Author Chrys
sub GoToNextMissspelledWord
rem -------------------------------------------------------------
rem define variables
dim found as boolean
Dim currCursor As Object
dim viewCursor as object
Dim emptyArgs(0) As New com.sun.star.beans.PropertyValue
Dim aLocale As New com.sun.star.lang.Locale
rem -------------------------------------------------------------
rem go to next missspelled word
found = false
viewCursor = thisComponent.getCurrentController.getViewCursor
currCursor = viewCursor.getText.createTextCursorByRange(viewCursor)
oldCursor = viewCursor.getText.createTextCursorByRange(viewCursor)
vSpeller = createUnoService("com.sun.star.linguistic2.SpellChecker")
rem change this-------
aLocale.Language = "de"
aLocale.Country = "DE"
NextWord:
currCursor.gotoNextWord(false)
currCursor.gotoStartOfWord(false)
currCursor.gotoEndOfWord(true)
found = not vSpeller.isvalid(currCursor.String , aLocale,
emptyArgs()
if not found then
dim nextCursor as Object
nextcursor = currcursor
nextcursor.gotoEndOfWord(false)
if nextcursor.goRight(1,false) then
GoTo NextWord
end if
end if
if found then
currCursor.gotoStartOfWord(false)
viewCursor.gotoRange(currCursor, false)
else
msgbox("Keine weiteren Fehler gefunden. Gehe zum Anfang.")
currCursor.gotostart(false)
viewCursor.gotoRange(currCursor, false)
end if
end sub
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]