diff options
author | László Németh <nemeth@numbertext.org> | 2021-06-14 09:22:35 +0200 |
---|---|---|
committer | László Németh <nemeth@numbertext.org> | 2021-07-03 18:50:40 +0200 |
commit | ac647b3da0e47ebe1c83093ca3cc1aae9efd55b2 (patch) | |
tree | 02583a94b129bb20342d9d7b3f40f0bd6654bfe4 /editeng | |
parent | fix potential use-after-free in SwClipboardChangeListener (diff) | |
download | core-ac647b3da0e47ebe1c83093ca3cc1aae9efd55b2.tar.gz core-ac647b3da0e47ebe1c83093ca3cc1aae9efd55b2.zip |
tdf#143176 Old Hungarian transliteration: fix AutoCorrect->Apply
and "Apply and Edit Changes".
Transliteration worked only during typing, because
AutoCorrect->Apply and "Apply and Edit Changes" remove
right-to-left text direction silently, which resulted
missing transliteration of text (with Default Paragraph
Style and right-to-left direction) to Old Hungarian.
Change-Id: I1481d958494828b6dce66f2eeecb44b327c70db4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118346
Tested-by: Jenkins
Reviewed-by: László Németh <nemeth@numbertext.org>
(cherry picked from commit f5ff7a967b09a715c56630aff92cfb636e7c232b)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118305
Diffstat (limited to 'editeng')
-rw-r--r-- | editeng/inc/edtspell.hxx | 3 | ||||
-rw-r--r-- | editeng/qa/unit/core-test.cxx | 3 | ||||
-rw-r--r-- | editeng/source/editeng/edtspell.cxx | 2 |
3 files changed, 5 insertions, 3 deletions
diff --git a/editeng/inc/edtspell.hxx b/editeng/inc/edtspell.hxx index 91e2218dad06..3332fce4e1e6 100644 --- a/editeng/inc/edtspell.hxx +++ b/editeng/inc/edtspell.hxx @@ -131,7 +131,8 @@ public: virtual bool ChgAutoCorrWord( sal_Int32& rSttPos, sal_Int32 nEndPos, SvxAutoCorrect& rACorrect, OUString* pPara ) override; - virtual bool TransliterateRTLWord( sal_Int32& rSttPos, sal_Int32 nEndPos ) override; + virtual bool TransliterateRTLWord( sal_Int32& rSttPos, sal_Int32 nEndPos, + bool bApply = false ) override; virtual LanguageType GetLanguage( sal_Int32 nPos ) const override; diff --git a/editeng/qa/unit/core-test.cxx b/editeng/qa/unit/core-test.cxx index dca5a0a8babf..0859a018ca0a 100644 --- a/editeng/qa/unit/core-test.cxx +++ b/editeng/qa/unit/core-test.cxx @@ -427,7 +427,8 @@ private: return false; } - virtual bool TransliterateRTLWord( sal_Int32& /*rSttPos*/, sal_Int32 /*nEndPos*/ ) override + virtual bool TransliterateRTLWord( sal_Int32& /*rSttPos*/, + sal_Int32 /*nEndPos*/, bool /*bApply*/ ) override { return false; } diff --git a/editeng/source/editeng/edtspell.cxx b/editeng/source/editeng/edtspell.cxx index f3aa07e25c1e..fdd0593418cc 100644 --- a/editeng/source/editeng/edtspell.cxx +++ b/editeng/source/editeng/edtspell.cxx @@ -681,7 +681,7 @@ bool EdtAutoCorrDoc::ChgAutoCorrWord( sal_Int32& rSttPos, } bool EdtAutoCorrDoc::TransliterateRTLWord( sal_Int32& /*rSttPos*/, - sal_Int32 /*nEndPos*/ ) + sal_Int32 /*nEndPos*/, bool /*bApply*/ ) { // Paragraph-start or a blank found, search for the word // shortcut in Auto |