summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCaolán McNamara <caolan.mcnamara@collabora.com>2023-05-23 19:58:39 +0100
committerCaolán McNamara <caolan.mcnamara@collabora.com>2023-05-26 13:18:12 +0200
commit7113ed198f7850b2bbd98f873f7787c76935cee6 (patch)
tree1f7495d739f6ab2ef707fce96f32baa970f86127
parentBump version to 22.05.15.2 (diff)
downloadcore-7113ed198f7850b2bbd98f873f7787c76935cee6.tar.gz
core-7113ed198f7850b2bbd98f873f7787c76935cee6.zip
tdf#155350 Do AutoCorrect of Input Method text
for all of SvxAutoCorrect::IsAutoCorrectChar() chars not just quotes Change-Id: I368836ea3c2dcdcc7fbe6906d7ae886f312d73d3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152107 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org> (cherry picked from commit 1e206d5b53ed1e11f2bab2437dd6fccdab4586ce) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152225 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
-rw-r--r--editeng/source/editeng/impedit2.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/editeng/source/editeng/impedit2.cxx b/editeng/source/editeng/impedit2.cxx
index 9f2296ed957b..08413f123916 100644
--- a/editeng/source/editeng/impedit2.cxx
+++ b/editeng/source/editeng/impedit2.cxx
@@ -371,8 +371,9 @@ bool ImpEditEngine::Command( const CommandEvent& rCEvt, EditView* pView )
// #102812# convert quotes in IME text
// works on the last input character, this is especially in Korean text often done
// quotes that are inside of the string are not replaced!
+ // See also tdf#155350
const sal_Unicode nCharCode = aSel.Min().GetNode()->GetChar( aSel.Min().GetIndex() );
- if ( ( GetStatus().DoAutoCorrect() ) && ( ( nCharCode == '\"' ) || ( nCharCode == '\'' ) ) )
+ if ( ( GetStatus().DoAutoCorrect() ) && SvxAutoCorrect::IsAutoCorrectChar(nCharCode) )
{
aSel = DeleteSelected( aSel );
aSel = AutoCorrect( aSel, nCharCode, mpIMEInfos->bWasCursorOverwrite );