I want to avoid spellchecking of some words/phrases in my doc.
I want to use macro like this:
Sub setNoLangToSpecificText(sSpecificText As String)
Dim oSrchDescr As Variant
Dim aFound As Variant
Dim oNextText As Variant
Dim oLoc As New com.sun.star.lang.Locale
Dim i As Long
oLoc.Language = ""
oSrchDescr = ThisComponent.createSearchDescriptor()
oSrchDescr.SearchRegularExpression = True
oSrchDescr.setSearchString(sSpecificText)
aFound = ThisComponent.findAll(oSrchDescr)
For i = 0 To aFound.getCount() - 1
oNextText = aFound.getByIndex(i)
oNextText.CharLocale = oLoc
Next i
End Sub
What should I assing to oLoc.language to set the text’s language to “None (Do not check spellig)”
When I assing empty string “”, it will use Default locale.