Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
XDG Integration
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Silent mode is enabled
All outbound communications are blocked.
Learn more
.
Show more breadcrumbs
JennaHuntsman
XDG Integration
Commits
84581e77
Commit
84581e77
authored
3 years ago
by
Rye Mutt
Browse files
Options
Downloads
Patches
Plain Diff
Optimize out spellcheck overhead
parent
2bfada29
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
indra/llui/lllineeditor.cpp
+3
-3
3 additions, 3 deletions
indra/llui/lllineeditor.cpp
indra/llui/llspellcheck.cpp
+4
-4
4 additions, 4 deletions
indra/llui/llspellcheck.cpp
indra/llui/lltextbase.cpp
+3
-3
3 additions, 3 deletions
indra/llui/lltextbase.cpp
with
10 additions
and
10 deletions
indra/llui/lllineeditor.cpp
+
3
−
3
View file @
84581e77
...
...
@@ -593,7 +593,7 @@ void LLLineEditor::addToDictionary()
{
if
(
canAddToDictionary
())
{
LLSpellChecker
::
instance
().
addToCustomDictionary
(
getMisspelledWord
(
mCursorPos
));
LLSpellChecker
::
instance
Fast
().
addToCustomDictionary
(
getMisspelledWord
(
mCursorPos
));
}
}
...
...
@@ -606,7 +606,7 @@ void LLLineEditor::addToIgnore()
{
if
(
canAddToIgnore
())
{
LLSpellChecker
::
instance
().
addToIgnoreList
(
getMisspelledWord
(
mCursorPos
));
LLSpellChecker
::
instance
Fast
().
addToIgnoreList
(
getMisspelledWord
(
mCursorPos
));
}
}
...
...
@@ -2686,7 +2686,7 @@ void LLLineEditor::showContextMenu(S32 x, S32 y)
std
::
string
misspelled_word
=
getMisspelledWord
(
mCursorPos
);
if
((
is_misspelled
=
!
misspelled_word
.
empty
())
==
true
)
{
LLSpellChecker
::
instance
().
getSuggestions
(
misspelled_word
,
mSuggestionList
);
LLSpellChecker
::
instance
Fast
().
getSuggestions
(
misspelled_word
,
mSuggestionList
);
}
}
...
...
This diff is collapsed.
Click to expand it.
indra/llui/llspellcheck.cpp
+
4
−
4
View file @
84581e77
...
...
@@ -402,7 +402,7 @@ const std::string LLSpellChecker::getDictionaryUserPath()
// static
bool
LLSpellChecker
::
getUseSpellCheck
()
{
return
(
LLSpellChecker
::
instance
Exists
())
&&
(
LLSpellChecker
::
instance
().
mHunspell
)
;
return
LLSpellChecker
::
instance
Fast
().
mHunspell
;
}
bool
LLSpellChecker
::
canRemoveDictionary
(
const
std
::
string
&
dict_language
)
...
...
@@ -411,7 +411,7 @@ bool LLSpellChecker::canRemoveDictionary(const std::string& dict_language)
const
LLSD
dict_info
=
getDictionaryData
(
dict_language
);
return
(
dict_info
[
"user_installed"
].
asBoolean
())
&&
(
(
!
getUseSpellCheck
())
||
(
!
LLSpellChecker
::
instance
().
isActiveDictionary
(
dict_language
))
);
(
(
!
getUseSpellCheck
())
||
(
!
isActiveDictionary
(
dict_language
))
);
}
void
LLSpellChecker
::
removeDictionary
(
const
std
::
string
&
dict_language
)
...
...
@@ -481,8 +481,8 @@ boost::signals2::connection LLSpellChecker::setSettingsChangeCallback(const sett
void
LLSpellChecker
::
setUseSpellCheck
(
const
std
::
string
&
dict_language
)
{
if
(
(((
dict_language
.
empty
())
&&
(
getUseSpellCheck
()))
||
(
!
dict_language
.
empty
()))
&&
(
LLSpellChecker
::
instance
().
mDictLanguage
!=
dict_language
)
)
(
LLSpellChecker
::
instance
Fast
().
mDictLanguage
!=
dict_language
)
)
{
LLSpellChecker
::
instance
().
initHunspell
(
dict_language
);
LLSpellChecker
::
instance
Fast
().
initHunspell
(
dict_language
);
}
}
This diff is collapsed.
Click to expand it.
indra/llui/lltextbase.cpp
+
3
−
3
View file @
84581e77
...
...
@@ -1449,7 +1449,7 @@ void LLTextBase::deselect()
bool
LLTextBase
::
getSpellCheck
()
const
{
return
(
LLSpellChecker
::
getUseSpellCheck
())
&&
(
!
mReadOnly
)
&&
(
mSpellCheck
)
;
return
(
!
mReadOnly
)
&&
(
mSpellCheck
)
&&
(
LLSpellChecker
::
getUseSpellCheck
());
}
const
std
::
string
&
LLTextBase
::
getSuggestion
(
U32
index
)
const
...
...
@@ -1490,7 +1490,7 @@ void LLTextBase::addToDictionary()
{
if
(
canAddToDictionary
())
{
LLSpellChecker
::
instance
().
addToCustomDictionary
(
getMisspelledWord
(
mCursorPos
));
LLSpellChecker
::
instance
Fast
().
addToCustomDictionary
(
getMisspelledWord
(
mCursorPos
));
}
}
...
...
@@ -1503,7 +1503,7 @@ void LLTextBase::addToIgnore()
{
if
(
canAddToIgnore
())
{
LLSpellChecker
::
instance
().
addToIgnoreList
(
getMisspelledWord
(
mCursorPos
));
LLSpellChecker
::
instance
Fast
().
addToIgnoreList
(
getMisspelledWord
(
mCursorPos
));
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment