From f5ff7a967b09a715c56630aff92cfb636e7c232b Mon Sep 17 00:00:00 2001 From: László Németh Date: Mon, 14 Jun 2021 09:22:35 +0200 Subject: tdf#143176 Old Hungarian transliteration: fix AutoCorrect->Apply MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- editeng/inc/edtspell.hxx | 3 ++- editeng/qa/unit/core-test.cxx | 3 ++- editeng/source/editeng/edtspell.cxx | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) (limited to 'editeng') 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 -- cgit