diff options
author | Kohei Yoshida <kohei@libreoffice.org> | 2022-05-06 19:37:14 -0400 |
---|---|---|
committer | Kohei Yoshida <kohei@libreoffice.org> | 2022-05-07 04:52:50 +0200 |
commit | f15e6293cf78d67963a6e512f60a11ae58da72c5 (patch) | |
tree | 777fd99553c788309747c539a0d5f49565bd2225 /editeng/source/uno | |
parent | 431c692e4e58a4861e4ab7b4d30b1edf0aab0496 (diff) |
tdf#107765: Check the updated language and apply it to the cell.
During the normal spell-checking in Calc, the user may change the
language on the string segment with a spelling error, which is supposed
to be applied back to that segment in the cell, but was not. This change
should fix it.
In case the new language is applied to the entire cell string, we will
set the new lanuage to the cell as a cell attribute and keep the string
as a simple string. Otherwise, the new language gets applied to the
edit engine string.
This commit also changes the return value of EditEngine::GetLanguage()
to include the string span information in addition to the language
value.
Change-Id: I713ec7aefe571f721321cd8ea687f616ab4dd61a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133966
Tested-by: Jenkins
Reviewed-by: Kohei Yoshida <kohei@libreoffice.org>
Diffstat (limited to 'editeng/source/uno')
-rw-r--r-- | editeng/source/uno/unofored.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/editeng/source/uno/unofored.cxx b/editeng/source/uno/unofored.cxx index 49eb5368e7a3..425e07bb8206 100644 --- a/editeng/source/uno/unofored.cxx +++ b/editeng/source/uno/unofored.cxx @@ -267,7 +267,7 @@ SfxItemState SvxEditEngineForwarder::GetItemState( sal_Int32 nPara, sal_uInt16 n LanguageType SvxEditEngineForwarder::GetLanguage( sal_Int32 nPara, sal_Int32 nIndex ) const { - return rEditEngine.GetLanguage(nPara, nIndex); + return rEditEngine.GetLanguage(nPara, nIndex).nLang; } sal_Int32 SvxEditEngineForwarder::GetFieldCount( sal_Int32 nPara ) const |