Re: [orca-list] Spellchecking in LO and Orca
- From: chrys87 <chrys87 web de>
- To: orca-list gnome org
- Subject: Re: [orca-list] Spellchecking in LO and Orca
- Date: Mon, 07 Oct 2013 22:33:21 +0200
Sorry,
i found a stupid bug...
here an correction:
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")
aLocale.Language = "de"
79 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
nextcursor.goLeft(1,false)
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
Am 07.10.2013 21:54, schrieb chrys87:
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
_______________________________________________
orca-list mailing list
orca-list gnome org
https://mail.gnome.org/mailman/listinfo/orca-list
Visit http://live.gnome.org/Orca for more information on Orca.
The manual is at
http://library.gnome.org/users/gnome-access-guide/nightly/ats-2.html
The FAQ is at http://live.gnome.org/Orca/FrequentlyAskedQuestions
Log bugs and feature requests at http://bugzilla.gnome.org
Find out how to help at http://live.gnome.org/Orca/HowCanIHelp
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]